summaryrefslogtreecommitdiff
path: root/Master/tlpkg/dviout/dvispc.txt
diff options
context:
space:
mode:
authorTakuji Tanaka <ttk@t-lab.opal.ne.jp>2021-05-16 11:34:18 +0000
committerTakuji Tanaka <ttk@t-lab.opal.ne.jp>2021-05-16 11:34:18 +0000
commitea1b469e3a8432f0522040ce3f03bb6a216e7b4e (patch)
tree5e3a4427ce8a9ac7bfaabcf4ec6c46f972ec78c3 /Master/tlpkg/dviout/dvispc.txt
parent0e18620a87e0545fea07d46726ca3b3458ba49c2 (diff)
dviout Ver.3.19.0
Sync with https://www.tug.org/svn/dviout/tags/3.19.0/inst/ git-svn-id: svn://tug.org/texlive/trunk@59220 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/dviout/dvispc.txt')
-rw-r--r--Master/tlpkg/dviout/dvispc.txt223
1 files changed, 117 insertions, 106 deletions
diff --git a/Master/tlpkg/dviout/dvispc.txt b/Master/tlpkg/dviout/dvispc.txt
index 43949949ad1..965ec7e9630 100644
--- a/Master/tlpkg/dviout/dvispc.txt
+++ b/Master/tlpkg/dviout/dvispc.txt
@@ -18,35 +18,39 @@ Usage: dvispc [-c] [-bv] input_dvi_file [output_dvi_file]
-p: T:preamble L:postamble pages with - (eg: -pT-L -pT2/4-8L -p-4 etc.)
-t: comaptible to DLT (the followings are suboptions if necessary eg. -t02)
0:str 1:ch 2:ch2 3:cmd 4:c-sum 5:dir/name 6:err 7:page 8:oct 9:str0
- output_text_file : stdout if it is not specified.
- input_text_file : stdin if it is not specified.
+
+color specials: color push/pop, background
+tpic specials: pn
*****************************************************
-[1] ** DVI ファイルとテキストファイルとの間の相互変換 **
+[1] ** Translation between DVI file <-> Text file **
*****************************************************
--a: DVIファイルを可読なテキスト形式に変換します。
+-a: transform DVI file into a text file (the option -v can be valid)
--x: -a オプションの逆変換で可読なテキスト形式からDVIファイルへ変換します。
- stack の深さとunderflow, page数, アドレスなどは自動修正される。
- -x0 は -x -t9 と等価
- 最初の文字が小文字のアルファベット以外で [ ] \ のいずれでもない行は無視
- される。
- 有効な行は以下の形で、各ブロックは空白で区切られる
+-x: transform a text to DVI file.
+ stack depth, page numbers and address are automatically corrected.
+ -x0 is equivalent to -x -t9
+ The text should be the same format obtained by -a option.
+ The line which starts with an alphabetical character of the lower
+ case or the character [ or ] or \ has only been interpreted.
+ The valid line is of the following format with several blocks separated by
+ spaces.
<key> <number><comment> ... <number><comment> '<string>' <any comment>
- <key>: code を表すキーワード
- <number>: 10進数または、0x で始まる16進数、または 0 で始まる8進数
- <comment>: 空であるか、先頭が数字(含16進数)や空白を含まない文字列。
- <number> に続けて空白を入れずに表記。コード生成では無視される。
- <any comment>: 空であっても、間に空白があってもよい。コード生成では無視。
+ <key>: key word
+ <number>: decimal, hexadecimal starting with 0x or 0X, octal starting with 0
+ <comment>: void or a string without a space and not starting with a figure
+ indicate after <number> without a space.
+ This is ignored.
+ <any comment>: void or any string. This is ignored.
- <number><comment> のブロックの数、および '<string>' が必要かどうかは、
-  <key> によって以下のように定まっている。
+ The number of the blocks of <number><comment> and the existence of '<string>'
+ is determined by <key> as follows.
-<key> のリスト(X: 1 - 4 XX: 0 - 127 YY: 0 - 63)
+List of <key> (X: 1 - 4 XX: 0 - 127 YY: 0 - 63)
<key> <number><comment> '<string>'
pre : 5 1
bop : 11 0
@@ -63,155 +67,162 @@ Usage: dvispc [-c] [-bv] input_dvi_file [output_dvi_file]
dir : 1 0
post_post : 6 - 9 0
- DTL において不正なコードを表す以下も有効(Text -> DVI)
+ The following is used in DTL for illegal code
opcode : 1 0
- DTL における以下の表記も可能です。
+ The following expression in DTL are also valid.
push -> [ pop -> ]
fntnum -> fn set -> s put -> p right -> r down -> d
setrule -> sr putrule -> pr fnt -> f fntdef -> fd
-dvispc を使って、DVIファイル -> テキスト形式 -> 編集 -> DVIファイル が可能です
-以下によって、foo1.dvi の 4,5,6,8 ページのみを抽出して、foo2.dvi が作成される。
+dvispc can read the format of the DVIware DTL (dt2dv/dv2dt) by Geoffrey Tobin.
+
+Transformations: [DVI file -> a text -> edit it -> DVI file] is possible
+The following command makes foo2.dvi by extracting the pages 4,5,6,8 from
+foo.dvi.
dvispc -atpT4-6/8L foo1.dvi | dvispc -x foo2.dvi
-次のようにしても同じです。
+The following command is the same as the above.
dvispc -atpT4-6/8L foo1.dvi | dvispc -x > foo2.dvi
--p オプション:DVI -> Text における出力指定(指定した順に出力される)
+-x : 0: toggle length follows from the given string
+ 1: toggle omit unnecessary definitions of fonts
+ 2: toggle igonore the first line "variety ..."
+ (If it is not ignored and it exists, then -t option is set).
+
+-p : Output instruction for DVI -> Text
T: preambre
L: postambre
- <n>: <n>ページ
- <n1>-<n2>: <n1>ページから<n2>ページまで
- <n1> の指定がないと、<n1>は 1 と解釈される
- <n2> の指定がないと、<n2>は最後のページと解釈される
- これらは、必要なら適当な区切りで区切って並べて指定できる
+ <n>: page <n>
+ <n1>-<n2>: from the page <n1> to the page <n2>
+ If <n1> is omitted, <n1> is assumed to be 1.
+ If <n2> is omitted, <n2> is assumed to be the last page number.
- -pT-L デフォルト(全てを解釈)
- -pTL preambre と postambre のみ
- -p3-15/20L 3ページから15ページまでと20ページとpostambre
+ There are indicated by separating by appropriate characters if necessary.
--x : 0: toggle 文字列の長さは、実際に指定した文字列に従う
- 1: toggle 不要なフォント定義を削る
- 2: toggle 先頭の "variety ..." の行を無視
- (無視しない場合は、存在すると -t オプションが設定される)
+ -pT-L default (total as in the original order)
+ -pTL preambre and postambre
+ -p3-15/20L the pages 3,4,5,...,15 and 20 in this order and postambre
--r -rorg_1=new_1/org_2=new_2/... は、キーワード org_i を new_i で置き換える
- (i = 1,2...)
- ここで org_i は、最後の数字を除いたもので、例えば以下のように指定する
+-r -rorg_1=new_1/org_2=new_2/... means org_i is replaced by new_i for i=1,2..
+ Here org_i is the keyword omitting figures. For example
-rxxx=special/setchar=set_char_
- -x オプションでは、new_i の最初の文字は、小文字のアルファベットとなる必要が
- ある。
+ The first letter of orig_i should be an alphabet in the small case if the
+ option -x is indicated.
--t オプション:Geoffrey Tobin氏 による DVIware DTL (dt2dv/dv2dt) の形式での書き
- 込み読み込みとなる。以下の 0 から 9 までのサブオプション(トグルスイッチ)が
- 指定できる。
+-t : Transformation is done according to the DTL(dt2dv/dv2dt) by Geoffrey Tobin.
+ The following suboptions (0-9: toggle switch) can be indicated such as -t02.
- -t をサブオプション無しで指定すると、上記のスイッチが全て On になるほか、-j
- がOff になり、-x0 -x1 -x2 に対応するスイッチが On で、 On DVI -> Text では、
- 先頭に以下の行が出力される。
+ The option -t with no suboption means that the following all suboptions
+ and the options corresponding to the switches -x0 -x1 -x2 are all On and -j
+ is Off and also the following line is inserted at the top in case of
+ DVI -> Text.
variety sequences-6
- 逆にこの行が先頭にあれば、Text -> DVI では、自動的に -t が指定される。
+ If in case of Text -> dvi this line exists at the top, -t is automatically
+ set.
0: str
- 文字列は、' ' で囲って表記されるが、' -> \' および \ -> \\ と表す。
- 0 から 31 および、127以上のコードの文字は、以下と同様に16進表示で表す。
+ A string is indicated by '...' with the transformations ' -> \' and
+ \ -> \\. A character whose code is smaller that 32 or larger than 126 is
+ expressed by hexadecimal as in the following.
1: ch
- 0 から 127 までのコードの文字は、( ) で囲って表記する。
- ただし、( -> \(, ) -> \), \ -> \\ と表す。また、0 から 31 および 127 の
- コードの文字は、独立させて \03 のように \ を先頭に 2 桁の16進数で表す。
+ Characters with the code between 0 and 127 are indicated by (...).
+ Here the transformations ( -> \(, ) -> \) and \ -> \\ are used and the
+ character with the code between 0 and 31 or 127 is independently shown by
+ hexadecimal character starting with \ such as \12.
2: ch2
- 128 以上のコードの文字は、コードを10進数で表す。
+ The code of a character larger than 128 is expressed in digits.
3: cmd
- コマンドをDTL形式の短いキーワードで表す。
+ The key word corresponding to a code is in the format as in DTL.
4: c-sum
- フォント定義におけるチェックサムを8進数で表す。
- 5: dir/name
- フォント名の文字列をディレクトリと名前の2つの文字列に分解して表記。
+ check sum in the font definition is expressed by octal.
+ 5: dir/name
+ The string of fontname is expressed by dividing into the directory and name.
6: err
- 未定義のコードを opcode x として表記。
+ The illegal code is expressed by opcode x (x: code).
7: page
- ページ番号を表記しない。
+ The page number is not shown.
8: oct
- フォント定義のチェックサムを8進数で表したとき、先頭に 0 をつけない。
+ The octal number for the check sum of the font definition is expressed
+ without the top 0.
9: str0
- Text -> DVI のとき、文字列の長さを、実際に指定した文字列で決める。
-
+ The length of a string is determined by the given string in case of
+ Text -> DVI.
--l DVIファイルにおけるアドレスを10進数で先頭につける。
- アドレスをつけると、最初に
+-l: The address of the code is shown at the top of line.
+ In this case
0: pre 2 ...
- という行が出現する。Text -> DVI では、この行があれば自動的に -l が設定される。
+ exists at the head.
+ In case of Text -> DVI, the option -l is set if this line exists.
--j オプション(トグルスイッチ):文字が JISコードならば、対応する文字を表記。
+-j: toggle, If the code of the character is within JIS code, then the
+ corresponding character is shown.
- *************************************************
-[2] ** ページ独立性が破れているDVI ファイルの修正 **
- *************************************************
+ ************************************************************
+[2] ** Modify a DVI file to be page-independent in specials **
+ ************************************************************
+DVI file should be page-independent in principle. But some specials break this
+principle.
-DVIファイルは、本来ページ独立性が保たれるよう設計されていますが、一部の specials
-の処理に関しては、これが破られるDVIファイルが作成されることがあります。
-
-たとえば、dvips オプションでの color specials はこの典型的な例で、100ページのDVI
-ファイルで、2ページに文字を赤にする設定が書いてあって、99ページ目にそれを終える
-設定が書いてあったとすると、50ページ目にはこの色の情報は何も書かれていません。
+For example, color specials of graphics package of LaTeX2e for dvips break this.
+Suppose there is a command to make letters red at page 2 of a document with the
+total pages 100 and it continues up to page 99. Then there is no command to
+make letters red at page 50.
\usepackages[dvips]{graphicx, color}
...
-{\color{red}% 2ページ目
+{\color{red}% page 2
...
...
-...% 99ページ目
+...% page 99
}
...
-dvips など、最初のページから順に解釈するものは、問題ありませんが、dviout で 50ペ
-ージ目のみを表示する、などの場合に不具合が生じます。dvidvi などで、ページを切り
-出して新たにDVIを作成するときも、同様な不具合が生じます。
-
-dvispc は、このようなDVIファイルを、ページ独立なDVIファイルに修正します。
+dvips reads a DVI file from the first page and therefore it correctly interprets
+color specials. But some other DVIwares such as dviout (previewer) cannot do so
+because it may be requested only to display the page 50. The same problem
+occurs for some DVI tools such as dvidvi.
-対応している specials は、dvips/dviout など用のもので
+dvispc modifies such a DVI file to be page-independent. Supporting specials are
-color specials: color push/pop, background
-tpic specials : pn
+ color specials: color push/pop, background
+ tpic specials : sh, pn
- --- 仕様 ---
--c: 上記の修正を行う。
--d: 修正の必要性をチェック。
--s: specials を全て抜き出して表示します(-p... でページ指定可)。
-以上のパラメータ、あるいは -a -x を指定しない場合は、デフォルト動作となり、上記
-の修正を行います。
+ --- specifications ---
+-c: the above modification will be done
+-s: show all specials in DVI file
+-d: check the necessity of the modification
-color specials: push/pop に対し、次のページにスタックを繰り越すことがないよう
- に、各ページの最後に必要な数の color pop を置く。このとき次のページの先頭で、
- スタックを回復するために必要な color push を置く。
+If none of the parameters -s -d -a -x is indicated, dvispc modifies DVI file as
+described.
- スタックのアンダーフローとオーバーフロー(500程度を越える)のチェックをしてい
- る。オーバーフローは通常は TeX のソースの書き方のエラーと考えられる。アンダー
- フローがあった場合は、そのページの先頭に color push Black を必要な個数置くこ
- とによって修正する。
+color specials: dvispc inserts necessary specials "color pop" at the end of each
+ page so that the stack becomes empty there. Then it also inserts necessary
+ specials "color push" at the top of the following page.
+ dvispc checks the underflow and overflow (the limit is about 500 in dvispc)
+ of this stack. Usually the overflow of stack occurs by the wrong source of
+ TeX. In the case of the unerflow, dvispc writes specials "color push Black"
+ at the top of the corresponding page to recover the error.
-background : 背景色が定義されており、その後のページで再定義がないページには、
- ページの先頭に背景色の定義を(高々1つ)おく。
+background : If the "background" color is defined in a page and the
+ definition is not written in another page where the definition should be
+ valid, then the definition is inserted at the top of the page.
-tpic specials : pn が定義されたら、その後のページに pn の定義を置く(スタックで
- はないので、高々1つ)
+tpic specials : If tpic special "pn" is defined, then the same special will be
+ inserted at the top of the following pages.
-ページの先頭に置かれる順序は、
+The order to be inserted at the top of each page is as follows
color push -> background -> pn (tpic special)
-
-となっている。