emath saloon (Read Only)

新規発言一覧最新記事過去一覧検索HOME

スレッド

└◇574:
layout の枠表示 [tdb] 02/14 13:40

 └◇576:Re:layout の枠表示 [トノ] 02/15 09:31
  └◇577:Re[2]:layout の枠表示 [tdb] 02/15 17:08<-last


574● layout の枠表示[ tdb ] 2008 02/14 13:40
ちょっとしたお遊び,ということで saloon で。

2ch の unix 板
http://pc11.2ch.net/test/read.cgi/unix/1193135030/
で

No.223
> レイアウトの確認用に、文章領域、傍注領域、脚注領域、ヘッダ、フッタ等を 
> 枠線で囲んで表示させたいのですが、そのような機能はありませんか? 

という話題が出ています。
emath だったらどうするかを考えてみました。

pszahyou環境を使って,\begin{document}で,枠を eps 画像にします。
\@outputpage にフックをかけて,上で作った画像を読み込みます。

http://emath.s40.xrea.com/temp/EMprlayout00sty.zip
(テキストファイルのエンコードは JIS です。)

注1. 画像ファイル名は
         oddlayout.eps, evenlayout.eps
   で,同名のファイルがあると上書きされますから,ご注意願います。

注2. EMprlayout.sty を読み込むだけで動作しますが,
   \@outputpage にフックをかけている他のスタイルファイルとの併用は出来ません。
   (emath でいえば,emathBt.sty)

注3. twocolumn には対応していません。
スレッド一覧


576● Re:layout の枠表示[ トノ ] 2008 02/15 09:31
今となっては役に立たない昔話で申し訳ないのですが‥‥

LaTeX 2.09 の時代には、testpage.sty というパッケージ(当時でいう
補助スタイル)がありました(EastWind 版あたりでは標準的に
含まれていたはず)。LaTeX2e では、今試したところエラーには
なりませんでしたが、まともには動いていないはずです。

出力ルーチンに手を加えるようなパッケージや処理とは
相性が悪い(縦書きもだめ)はずですが、
レイアウト・パラメーターの調整結果を実測できるので、
LaTeX を使い始めた頃には随分とお世話になった記憶があります。
何とも懐かしい‥‥。

\documentstyle[testpage]{book}\relax
\makeatletter
\def\sampletext{%
    \@tempcnta=\z@
    \@whilenum\@tempcnta<20 \do{%
        \advance\@tempcnta by\@ne
        When they entered, 
        they found hanging upon the wall a splendid portrait 
        of their master as they had last seen him, 
        in all the wonder of his exquisite youth and beauty.  
        Lying on the floor was a dead man, 
        in evening dress, with a knife in his heart.  
        He was withered, wrinkled, and loathsome of visage.  
        It was not till they had examined the rings 
        that they recognized who it was.
        \@nameuse{par}%
    }%
}
\makeatother
\author{Oscar Wilde}
\title{The Picture of Dorian Gray}
\date{}
\begin{document}
\maketitle
\sampletext
\twocolumn \sampletext
\end{document}
スレッド一覧


577● Re[2]:layout の枠表示[ tdb ] 2008 02/15 17:08
コメントを頂き,有難うございます。m(..)m

> LaTeX 2.09 の時代には、testpage.sty というパッケージ(当時でいう
> 補助スタイル)がありました(EastWind 版あたりでは標準的に
> 含まれていたはず)。LaTeX2e では、今試したところエラーには
> なりませんでしたが、まともには動いていないはずです。

Togashi さんが作られた

%   testpage.sty : Frame each field in page by H.Togashi
%   only for LATEX VERSION 2.09 <24 May 1989> and the compatibles
%   17 Jan 1993 version 1.1 add \notestpage

のことでしょうか。
ずいぶんすっきりしてますね。
現在の \@outputpage と合体させれば,emath とは無関係に動作するでしょう。

そういわれてみれば,奥村先生の掲示板 Q&A にも登場していましたね。
No.17590 からのスレッドです。
http://oku.edu.mie-u.ac.jp/~okumura/texfaq/qa/17590.html

testpage.sty の在り処が
http://oku.edu.mie-u.ac.jp/~okumura/texfaq/qa/17602.html
で言及されていますが,URL の変更があったようです:
http://mec2.tm.chiba-u.jp/~hirata/gaiyou/
スレッド一覧

CGIROOM