From ac08384409ab08d956d3066744af1f45126c6374 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 13 May 2012 13:01:45 +0000 Subject: include uptex support files and binaries git-svn-id: svn://tug.org/texlive/trunk@26326 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/source/uplatex/base/ujclasses.dtx | 4149 ++++++++++++++++++++ Master/texmf-dist/source/uplatex/base/ukinsoku.dtx | 521 +++ Master/texmf-dist/source/uplatex/base/uplatex.dtx | 870 ++++ Master/texmf-dist/source/uplatex/base/uplcls.ins | 38 + Master/texmf-dist/source/uplatex/base/uplfmt.ins | 24 + Master/texmf-dist/source/uplatex/base/uplfonts.dtx | 1875 +++++++++ Master/texmf-dist/source/uplatex/base/uplvers.dtx | 165 + 7 files changed, 7642 insertions(+) create mode 100644 Master/texmf-dist/source/uplatex/base/ujclasses.dtx create mode 100644 Master/texmf-dist/source/uplatex/base/ukinsoku.dtx create mode 100644 Master/texmf-dist/source/uplatex/base/uplatex.dtx create mode 100644 Master/texmf-dist/source/uplatex/base/uplcls.ins create mode 100644 Master/texmf-dist/source/uplatex/base/uplfmt.ins create mode 100644 Master/texmf-dist/source/uplatex/base/uplfonts.dtx create mode 100644 Master/texmf-dist/source/uplatex/base/uplvers.dtx (limited to 'Master/texmf-dist/source/uplatex') diff --git a/Master/texmf-dist/source/uplatex/base/ujclasses.dtx b/Master/texmf-dist/source/uplatex/base/ujclasses.dtx new file mode 100644 index 00000000000..03ac70a99fc --- /dev/null +++ b/Master/texmf-dist/source/uplatex/base/ujclasses.dtx @@ -0,0 +1,4149 @@ +% \iffalse meta-comment +%% File: ujclasses.dtx +% +% pLaTeX class files: +% Copyright 1995-2001 ASCII Corporation. +% and modified for upLaTeX +% +% This file is part of the upLaTeX2e system. +% ----------------------------------------- +% +% \fi +% +% \CheckSum{4413} +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +% +% \setcounter{StandardModuleDepth}{1} +% \StopEventually{} +% +% \iffalse +% \changes{v1.0}{1995/04/19}{first edition} +% \changes{v1.0a}{1995/08/30}{ページスタイル部分の調整} +% \changes{v1.0b}{1995/11/08}{ページスタイル部分の調整} +% \changes{v1.0c}{1996/01/30}{\LaTeX\ \texttt{!<1995/12/01!>}での修正を反映} +% \changes{v1.0d}{1996/02/29}{デフォルトページスタイルの修正} +% \changes{v1.0e}{1996/03/14}{itemize, enumerate環境の修正} +% \changes{v1.0f}{1996/07/10}{面付けオプションを追加} +% \changes{v1.0g}{1996/09/03}{トンボの横に作成日時を出力するようにした} +% \changes{v1.1}{1997/01/16}{\LaTeX\ \texttt{!<1996/06/01!>}版に対応} +% \changes{v1.1a}{1997/01/23}{\LaTeX\ \texttt{!<1996/12/01!>}版に対応} +% \changes{v1.1a}{1997/01/25}{互換モードでp\LaTeX~2.09のa4jなどの +% 用紙オプションに対応} +% \changes{v1.1b}{1997/01/28}{日本語ファミリの宣言を再度、実装} +% \changes{v1.1d}{1997/01/29}{2eモードでa4jなどのオプションに対応} +% \changes{v1.1e}{1997/04/08}{トップマージンの値を修正} +% \changes{v1.1f}{1997/07/08}{縦組クラスでベースラインがおかしいのを修正} +% \changes{v1.1g}{1997/08/25}{片面印刷のとき、sectionレベルが出力されない +% のを修正} +% \changes{v1.1h}{1997/09/03}{landscape指定時の値を修正} +% \changes{v1.1i}{1997/12/12}{report, bookクラスで片面印刷時に、 +% bothstyleスタイルにすると、コンパイルエラーになるのを修正} +% \changes{v1.1j}{1998/02/03}{互換モード時のa5pのトップマージンを0.7in増加} +% \changes{v1.1k}{1998/03/23}{reportとbookクラスで番号を付けない見出しの +% ペナルティが\cs{M@}だったのを\cs{@M}に修正} +% \changes{v1.1m}{1998/04/07}{\cs{today}の計算手順を変更} +% \changes{v1.1n}{1998/10/13}{report,bookクラスの表番号が +% 見出しレベルに関係なくchapter番号が出力されてしまうのを修正} +% \changes{v1.1n}{1998/10/13}{mentukeオプションがエラーになっていたのを修正} +% \changes{v1.1o}{1998/12/24}{secnumdepthカウンタを$-1$以下にすると、 +% 見出し文字列も消えてしまうのを修正} +% \changes{v1.1p}{1999/1/6}{\cs{oddsidemargin}のポイントへの変換を後ろに} +% \changes{v1.1q}{1999/05/18}{縦組時のみに設定するようにした} +% \changes{v1.1r}{1999/08/09}{トップマージンの計算式を修正} +% \changes{v1.2}{2001/09/04}{\cs{chapter}の出力位置がアスタリスク形式と +% そうでないときと違うのを修正(ありがとう、鈴木@津さん)} +% \changes{v1.3}{2001/10/04}{目次のページ番号の書体を\cs{rmfamily}から +% \cs{normalfont}に変更(ありがとう、鈴木た@MILNさん)} +% \changes{v1.4}{2002/04/09}{縦組スタイルで\cs{flushbottom}しないようにした} +% \changes{v1.5}{2004/01/15}{\cs{part},\cs{chapter}の\cs{@afterindentfalse}を +% \cs{@afterindenttrue}に変更。 +% \cs{section},\cs{subsection},\cs{subsubsection}の前後空きの伸縮幅を修正。 +% (ありがとうございます、鈴木た@MILNさん)} +% \changes{v1.6}{2006/06/27}{フォントコマンドを修正。ありがとう、ymtさん。} +% \changes{v1.6_u00}{2011/05/07}{pLaTeX用からupLaTeX用に修正。} +% \fi +% +% \iffalse +\NeedsTeXFormat{pLaTeX2e} +%<*driver> +\ProvidesFile{ujclasses.dtx} +% +%<*yoko> +%
\ProvidesClass{ujarticle} +%\ProvidesClass{ujreport} +%\ProvidesClass{ujbook} +%<10pt&!bk>\ProvidesFile{ujsize10.clo} +%<11pt&!bk>\ProvidesFile{ujsize11.clo} +%<12pt&!bk>\ProvidesFile{ujsize12.clo} +%<10pt&bk>\ProvidesFile{ujbk10.clo} +%<11pt&bk>\ProvidesFile{ujbk11.clo} +%<12pt&bk>\ProvidesFile{ujbk12.clo} +% +%<*tate> +%
\ProvidesClass{utarticle} +%\ProvidesClass{utreport} +%\ProvidesClass{utbook} +%<10pt&!bk>\ProvidesFile{utsize10.clo} +%<11pt&!bk>\ProvidesFile{utsize11.clo} +%<12pt&!bk>\ProvidesFile{utsize12.clo} +%<10pt&bk>\ProvidesFile{utbk10.clo} +%<11pt&bk>\ProvidesFile{utbk11.clo} +%<12pt&bk>\ProvidesFile{utbk12.clo} +% + [2011/05/07 v1.6_u00 +% Standard upLaTeX class] +%<10pt|11pt|12pt> Standard upLaTeX file (size option)] +%<*driver> +] +\documentclass{jltxdoc} +\GetFileInfo{jclasses.dtx} +\title{up\LaTeXe{}の標準クラス\space\fileversion} +\author{Ken Nakano \& TTK} +\date{作成日:\filedate} +\begin{document} + \maketitle + \tableofcontents + \DocInput{\filename} +\end{document} +% +% \fi +% +% このファイルは、up\LaTeXe{}の標準クラスファイルです。 +% p\LaTeXe{}の標準クラスファイルをup\LaTeXe{}用に修正したものです。 +% \dst{}プログラムによって、横組用のクラスファイルと縦組用のクラスファイル +% を作成することができます。 +% +% 次に\dst{}プログラムのためのオプションを示します。 +% +% \DeleteShortVerb{\|} +% \begin{center} +% \begin{tabular}{l|l} +% \emph{オプション} & \emph{意味}\\\hline +% article & articleクラスを生成\\ +% report & reportクラスを生成\\ +% book & bookクラスを生成\\ +% 10pt & 10ptサイズの設定を生成\\ +% 11pt & 11ptサイズの設定を生成\\ +% 12pt & 12ptサイズの設定を生成\\ +% bk & bookクラス用のサイズの設定を生成\\ +% tate & 縦組用の設定を生成\\ +% yoko & 横組用の設定を生成\\ +% \end{tabular} +% \end{center} +% \MakeShortVerb{\|} +% +% +% \section{オプションスイッチ} +% ここでは、後ほど使用するいくつかのコマンドやスイッチを定義しています。 +% +% \begin{macro}{\c@@paper} +% 用紙サイズを示すために使います。 +% A4, A5, B4, B5 用紙はそれぞれ、1, 2, 3, 4 として表されます。 +% \begin{macrocode} +%<*article|report|book> +\newcounter{@paper} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\if@landscape} +% 用紙を横向きにするかどうかのスイッチです。デフォルトは、縦向きです。 +% \begin{macrocode} +\newif\if@landscape \@landscapefalse +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@ptsize} +% 組版をするポイント数の一の位を保存するために使います。 +% 0, 1, 2 のいずれかです。 +% \begin{macrocode} +\newcommand{\@ptsize}{} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\if@restonecol} +% 二段組時に用いるテンポラリスイッチです。 +% \begin{macrocode} +\newif\if@restonecol +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\if@titlepage} +% タイトルページやアブストラクト(概要)を +% 独立したページにするかどうかのスイッチです。 +% reportとbookスタイルのデフォルトでは、独立したページになります。 +% \begin{macrocode} +\newif\if@titlepage +%
\@titlepagefalse +%\@titlepagetrue +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\if@openright} +% chapterレベルを奇数ページからはじめるかどうかのスイッチです。 +% reportクラスのデフォルトは、``no''です。 +% bookクラスのデフォルトは、``yes''です。 +% \begin{macrocode} +%\newif\if@openright +% \end{macrocode} +% \end{macro} +% +% \changes{v1.0c}{1995/12/25}{Macro \cs{if@openbib} removed} +% +% \begin{macro}{\if@mainmatter} +% スイッチ|\@mainmatter|が真の場合、本文を処理しています。 +% このスイッチが偽の場合は、|\chapter|コマンドは見出し番号を出力しません。 +% \begin{macrocode} +%\newif\if@mainmatter \@mainmattertrue +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hour} +% \begin{macro}{\minute} +% \begin{macrocode} +\hour\time \divide\hour by 60\relax +\@tempcnta\hour \multiply\@tempcnta 60\relax +\minute\time \advance\minute-\@tempcnta +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\if@stysize} +% \changes{v1.1a}{1997/01/25}{Add \cs{if@stysize}.} +% p\LaTeXe~2.09互換モードで、スタイルオプションにa4j,a5pなどが指定された +% ときの動作をエミュレートするためのフラグです。 +% \begin{macrocode} +\newif\if@stysize \@stysizefalse +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\if@enablejfam} +% \changes{v1.1b}{1997/01/28}{Add \cs{if@enablejfam}} +% 日本語ファミリを宣言するために用いるフラグです。 +% \begin{macrocode} +\newif\if@enablejfam \@enablejfamtrue +% \end{macrocode} +% 和欧文両対応の数式文字コマンドを有効にするときに用いるフラグです。 +% マクロの展開順序が複雑になるのを避けるため、 +% デフォルトではfalseとしてあります。 +% \begin{macrocode} +\newif\if@mathrmmc \@mathrmmcfalse +% \end{macrocode} +% \end{macro} +% +% \section{オプションの宣言} +% ここでは、クラスオプションの宣言を行なっています。 +% +% \subsection{用紙オプション} +% 用紙サイズを指定するオプションです。 +% \begin{macrocode} +\DeclareOption{a4paper}{\setcounter{@paper}{1}% + \setlength\paperheight {297mm}% + \setlength\paperwidth {210mm}} +\DeclareOption{a5paper}{\setcounter{@paper}{2}% + \setlength\paperheight {210mm} + \setlength\paperwidth {148mm}} +\DeclareOption{b4paper}{\setcounter{@paper}{3}% + \setlength\paperheight {364mm} + \setlength\paperwidth {257mm}} +\DeclareOption{b5paper}{\setcounter{@paper}{4}% + \setlength\paperheight {257mm} + \setlength\paperwidth {182mm}} +% \end{macrocode} +% \changes{v1.0a}{1995/09/26}{Change b4paper width/height 352x250 to 364x257} +% \changes{v1.0a}{1995/09/26}{Change b5paper width/height 250x176 to 257x182} +% ドキュメントクラスに、以下のオプションを指定すると、通常よりもテキストを +% 組み立てる領域の広いスタイルとすることができます。 +% \begin{macrocode} +% +\DeclareOption{a4j}{\setcounter{@paper}{1}\@stysizetrue + \setlength\paperheight {297mm}% + \setlength\paperwidth {210mm}} +\DeclareOption{a5j}{\setcounter{@paper}{2}\@stysizetrue + \setlength\paperheight {210mm} + \setlength\paperwidth {148mm}} +\DeclareOption{b4j}{\setcounter{@paper}{3}\@stysizetrue + \setlength\paperheight {364mm} + \setlength\paperwidth {257mm}} +\DeclareOption{b5j}{\setcounter{@paper}{4}\@stysizetrue + \setlength\paperheight {257mm} + \setlength\paperwidth {182mm}} +% +\DeclareOption{a4p}{\setcounter{@paper}{1}\@stysizetrue + \setlength\paperheight {297mm}% + \setlength\paperwidth {210mm}} +\DeclareOption{a5p}{\setcounter{@paper}{2}\@stysizetrue + \setlength\paperheight {210mm} + \setlength\paperwidth {148mm}} +\DeclareOption{b4p}{\setcounter{@paper}{3}\@stysizetrue + \setlength\paperheight {364mm} + \setlength\paperwidth {257mm}} +\DeclareOption{b5p}{\setcounter{@paper}{4}\@stysizetrue + \setlength\paperheight {257mm} + \setlength\paperwidth {182mm}} +% \end{macrocode} +% +% \subsection{サイズオプション} +% 基準となるフォントの大きさを指定するオプションです。 +% \begin{macrocode} +\if@compatibility + \renewcommand{\@ptsize}{0} +\else + \DeclareOption{10pt}{\renewcommand{\@ptsize}{0}} +\fi +\DeclareOption{11pt}{\renewcommand{\@ptsize}{1}} +\DeclareOption{12pt}{\renewcommand{\@ptsize}{2}} +% \end{macrocode} +% +% \subsection{横置きオプション} +% このオプションが指定されると、用紙の縦と横の長さを入れ換えます。 +% \changes{v1.1h}{1997/09/03}{オプションの処理時に縦横の値を交換} +% \changes{v1.1h}{1997/09/03}{landscapeオプションを互換モードでも有効に} +% \begin{macrocode} +\DeclareOption{landscape}{\@landscapetrue + \setlength\@tempdima{\paperheight}% + \setlength\paperheight{\paperwidth}% + \setlength\paperwidth{\@tempdima}} +% \end{macrocode} +% +% \subsection{トンボオプション} +% |tombow|オプションが指定されると、用紙サイズに合わせてトンボを出力します。 +% このとき、トンボの脇にDVIを作成した日付が出力されます。 +% 作成日付の出力を抑制するには、|tombow|ではなく、|tombo|と指定をします。 +% \changes{v1.0g}{1996/09/03}{Add to \cs{@bannertoken}.} +% \changes{v1.1a}{1997/01/23}{日付出力オプション} +% \begin{macrocode} +\DeclareOption{tombow}{% + \tombowtrue \tombowdatetrue + \setlength{\@tombowwidth}{.1\p@}% + \@bannertoken{% + \jobname\space:\space\number\year/\number\month/\number\day + (\number\hour:\number\minute)} + \maketombowbox} +\DeclareOption{tombo}{% + \tombowtrue \tombowdatefalse + \setlength{\@tombowwidth}{.1\p@}% + \maketombowbox} +% \end{macrocode} +% +% \subsection{面付けオプション} +% このオプションが指定されると、トンボオプションを指定したときと同じ +% 位置に文章を出力します。作成したDVIをフィルムに面付け出力する場合など +% に指定をします。 +% \changes{v1.0f}{1996/07/10}{面付けオプションを追加} +% \changes{v1.1n}{1998/10/13} +% {動作していなかったのを修正。ありがとう、刀祢さん} +% \begin{macrocode} +\DeclareOption{mentuke}{% + \tombowtrue \tombowdatefalse + \setlength{\@tombowwidth}{\z@}% + \maketombowbox} +% \end{macrocode} +% +% \subsection{組方向オプション} +% このオプションが指定されると、縦組で組版をします。 +% \changes{v1.0g}{1997/01/25}{Insert \cs{hbox}, to switch tate-mode.} +% \changes{v1.1d}{1997/02/05}{開始ページがおかしくなるのを修正} +% \changes{v1.1f}{1997/07/08}{縦組時にベースラインがおかしくなるのを修正} +% \begin{macrocode} +\DeclareOption{tate}{% + \AtBeginDocument{\tate\message{《縦組モード》}% + \adjustbaseline}% +} +% \end{macrocode} +% +% \subsection{両面、片面オプション} +% twosideオプションが指定されると、両面印字出力に適した整形を行ないます。 +% \begin{macrocode} +\DeclareOption{oneside}{\@twosidefalse} +\DeclareOption{twoside}{\@twosidetrue} +% \end{macrocode} +% +% \subsection{二段組オプション} +% 二段組にするかどうかのオプションです。 +% \begin{macrocode} +\DeclareOption{onecolumn}{\@twocolumnfalse} +\DeclareOption{twocolumn}{\@twocolumntrue} +% \end{macrocode} +% +% \subsection{表題ページオプション} +% |@titlepage|が真の場合、表題を独立したページに出力します。 +% \begin{macrocode} +\DeclareOption{titlepage}{\@titlepagetrue} +\DeclareOption{notitlepage}{\@titlepagefalse} +% \end{macrocode} +% +% \subsection{右左起こしオプション} +% chapterを右ページあるいは左ページから +% はじめるかどうかを指定するオプションです。 +% \begin{macrocode} +%\if@compatibility +%\@openrighttrue +%\else +%\DeclareOption{openright}{\@openrighttrue} +%\DeclareOption{openany}{\@openrightfalse} +%\fi +% \end{macrocode} +% +% \subsection{数式のオプション} +% \Lopt{leqno}を指定すると、数式番号を数式の左側に出力します。 +% \Lopt{fleqn}を指定するとディスプレイ数式を左揃えで出力します。 +% \begin{macrocode} +\DeclareOption{leqno}{\input{leqno.clo}} +\DeclareOption{fleqn}{\input{fleqn.clo}} +% \end{macrocode} +% +% \subsection{参考文献のオプション} +% 参考文献一覧を``オープンスタイル''の書式で出力します。 +% これは各ブロックが改行で区切られ、|\bibindent|のインデントが付く書式です。 +% \changes{v1.0c}{1995/12/25}{openbibオプションを再実装} +% \begin{macrocode} +\DeclareOption{openbib}{% +% \end{macrocode} +% 参考文献環境内の最初のいくつかのフックを満たします。 +% \begin{macrocode} + \AtEndOfPackage{% + \renewcommand\@openbib@code{% + \advance\leftmargin\bibindent + \itemindent -\bibindent + \listparindent \itemindent + \parsep \z@ + }% +% \end{macrocode} +% そして、|\newblock|を再定義します。 +% \begin{macrocode} + \renewcommand\newblock{\par}}} +% \end{macrocode} +% +% \subsection{日本語ファミリ宣言の抑制、和欧文両対応の数式文字} +% p\LaTeXe{}は、このあと、数式モードで直接、日本語を記述できるように +% 数式ファミリを宣言します。しかし、\TeX{}で扱える数式ファミリの数が +% 16個なので、その他のパッケージと組み合わせた場合、 +% 数式ファミリを宣言する領域を超えてしまう場合があるかもしれません。 +% そのときには、残念ですが、そのパッケージか、数式内に直接、 +% 日本語を記述するのか、どちらかを断念しなければなりません。 +% このクラスオプションは、 +% 数式内に日本語を記述するのをあきらめる場合に用います。 +% +% |disablejfam|オプションを指定しても|\textmc|や|\textgt|などを用いて、 +% 数式内に日本語を記述することは可能です。 +% +% |mathrmmc|オプションは、 +% |\mathrm|と|\mathbf|を和欧文両対応にするためのクラスオプションです。 +% \changes{v1.1d}{1992/02/04}{disablejfamの判断を間違えてたのを修正} +% \begin{macrocode} +\if@compatibility + \@mathrmmctrue +\else + \DeclareOption{disablejfam}{\@enablejfamfalse} + \DeclareOption{mathrmmc}{\@mathrmmctrue} +\fi +% \end{macrocode} +% +% +% \subsection{ドラフトオプション} +% |draft|オプションを指定すると、オーバフルボックスの起きた箇所に、 +% 5ptの罫線が引かれます。 +% \begin{macrocode} +\DeclareOption{draft}{\setlength\overfullrule{5pt}} +\DeclareOption{final}{\setlength\overfullrule{0pt}} +% +% \end{macrocode} +% +% \subsection{オプションの実行} +% オプションの実行、およびサイズクラスのロードを行ないます。 +% \begin{macrocode} +%<*article|report|book> +%<*article> +%\ExecuteOptions{a4paper,10pt,oneside,onecolumn,final,tate} +%\ExecuteOptions{a4paper,10pt,oneside,onecolumn,final} +%
+%<*report> +%\ExecuteOptions{a4paper,10pt,oneside,onecolumn,final,openany,tate} +%\ExecuteOptions{a4paper,10pt,oneside,onecolumn,final,openany} +%
+%<*book> +%\ExecuteOptions{a4paper,10pt,twoside,onecolumn,final,openright,tate} +%\ExecuteOptions{a4paper,10pt,twoside,onecolumn,final,openright} +% +\ProcessOptions\relax +%\input{utbk1\@ptsize.clo} +%\input{utsize1\@ptsize.clo} +%\input{ujbk1\@ptsize.clo} +%\input{ujsize1\@ptsize.clo} +% \end{macrocode} +% 縦組用クラスファイルの場合は、ここで\file{plext.sty}も読み込みます。 +% \changes{v1.0e}{1996/03/21}{\cs{usepackage} to \cs{RequirePackage}} +% \begin{macrocode} +%\RequirePackage{plext} +% +% \end{macrocode} +% +% \section{フォント} +% +% ここでは、\LaTeX{}のフォントサイズコマンドの定義をしています。 +% フォントサイズコマンドの定義は、次のコマンドを用います。 +% +% |\@setfontsize||\size|\meta{font-size}\meta{baselineskip} +% +% \begin{description} +% \item[\meta{font-size}] これから使用する、フォントの実際の大きさです。 +% \item[\meta{baselineskip}] 選択されるフォントサイズ用の通常の +% |\baselineskip|の値です(実際は、|\baselinestretch| * \meta{baselineskip} +% の値です)。 +% \end{description} +% +% 数値コマンドは、次のように\LaTeX{}カーネルで定義されています。 +% \begin{center} +% \begin{tabular}{ll@{\qquad}ll@{\qquad}ll} +% \verb=\@vpt= & 5 & \verb=\@vipt= & 6 & \verb=\@viipt= & 7 \\ +% \verb=\@viiipt= & 8 & \verb=\@ixpt= & 9 & \verb=\@xpt= & 10 \\ +% \verb=\@xipt= & 10.95 & \verb=\@xiipt= & 12 & \verb=\@xivpt= & 14.4\\ +% ... +% \end{tabular} +% \end{center} +% +% \begin{macro}{\normalsize} +% \begin{macro}{\@normalsize} +% 基本サイズとするユーザレベルのコマンドは|\normalsize|です。 +% \LaTeX{}の内部では|\@normalsize|を使用します。 +% +% |\normalsize|マクロは、|\abovedisplayskip|と +% |\abovedisplayshortskip|、および|\belowdisplayshortskip|の値も設定をします。 +% |\belowdisplayskip|は、つねに|\abovedisplayskip|と同値です。 +% +% また、リスト環境のトップレベルのパラメータは、つねに|\@listI|で与えられます。 +% \begin{macrocode} +%<*10pt|11pt|12pt> +\renewcommand{\normalsize}{% +%<10pt&yoko> \@setfontsize\normalsize\@xpt{15}% +%<11pt&yoko> \@setfontsize\normalsize\@xipt{15.5}% +%<12pt&yoko> \@setfontsize\normalsize\@xiipt{16.5}% +%<10pt&tate> \@setfontsize\normalsize\@xpt{17}% +%<11pt&tate> \@setfontsize\normalsize\@xipt{17}% +%<12pt&tate> \@setfontsize\normalsize\@xiipt{18}% +%<*10pt> + \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ + \abovedisplayshortskip \z@ \@plus3\p@ + \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ +% +%<*11pt> + \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@ + \abovedisplayshortskip \z@ \@plus3\p@ + \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@ +% +%<*12pt> + \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@ + \abovedisplayshortskip \z@ \@plus3\p@ + \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@ +% + \belowdisplayskip \abovedisplayskip + \let\@listi\@listI} +% \end{macrocode} +% +% ここで、ノーマルフォントを選択し、初期化をします。 +% このとき、縦組モードならば、デフォルトのエンコードを変更します。 +% \begin{macrocode} +%\def\kanjiencodingdefault{JT2}% +%\kanjiencoding{\kanjiencodingdefault}% +\normalsize +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\Cht} +% \begin{macro}{\Cdp} +% \begin{macro}{\Cwd} +% \begin{macro}{\Cvs} +% \begin{macro}{\Chs} +% 基準となる長さの設定をします。これらのパラメータは\file{platex.dtx}で定義 +% されています。 +% \begin{macrocode} +\setbox0\hbox{\char\euc"A1A1}% +\setlength\Cht{\ht0} +\setlength\Cdp{\dp0} +\setlength\Cwd{\wd0} +\setlength\Cvs{\baselineskip} +\setlength\Chs{\wd0} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\small} +% |\small|コマンドの定義は、|\normalsize|に似ています。 +% \begin{macrocode} +\newcommand{\small}{% +%<*10pt> + \@setfontsize\small\@ixpt{11}% + \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@ + \abovedisplayshortskip \z@ \@plus2\p@ + \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ + \def\@listi{\leftmargin\leftmargini + \topsep 4\p@ \@plus2\p@ \@minus2\p@ + \parsep 2\p@ \@plus\p@ \@minus\p@ + \itemsep \parsep}% +% +%<*11pt> + \@setfontsize\small\@xpt\@xiipt + \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ + \abovedisplayshortskip \z@ \@plus3\p@ + \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ + \def\@listi{\leftmargin\leftmargini + \topsep 6\p@ \@plus2\p@ \@minus2\p@ + \parsep 3\p@ \@plus2\p@ \@minus\p@ + \itemsep \parsep}% +% +%<*12pt> + \@setfontsize\small\@xipt{13.6}% + \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@ + \abovedisplayshortskip \z@ \@plus3\p@ + \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@ + \def\@listi{\leftmargin\leftmargini + \topsep 9\p@ \@plus3\p@ \@minus5\p@ + \parsep 4.5\p@ \@plus2\p@ \@minus\p@ + \itemsep \parsep}% +% + \belowdisplayskip \abovedisplayskip} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\footnotesize} +% |\footnotesize|コマンドの定義は、|\normalsize|に似ています。 +% \begin{macrocode} +\newcommand{\footnotesize}{% +%<*10pt> + \@setfontsize\footnotesize\@viiipt{9.5}% + \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@ + \abovedisplayshortskip \z@ \@plus\p@ + \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@ + \def\@listi{\leftmargin\leftmargini + \topsep 3\p@ \@plus\p@ \@minus\p@ + \parsep 2\p@ \@plus\p@ \@minus\p@ + \itemsep \parsep}% +% +%<*11pt> + \@setfontsize\footnotesize\@ixpt{11}% + \abovedisplayskip 8\p@ \@plus2\p@ \@minus4\p@ + \abovedisplayshortskip \z@ \@plus\p@ + \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ + \def\@listi{\leftmargin\leftmargini + \topsep 4\p@ \@plus2\p@ \@minus2\p@ + \parsep 2\p@ \@plus\p@ \@minus\p@ + \itemsep \parsep}% +% +%<*12pt> + \@setfontsize\footnotesize\@xpt\@xiipt + \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ + \abovedisplayshortskip \z@ \@plus3\p@ + \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ + \def\@listi{\leftmargin\leftmargini + \topsep 6\p@ \@plus2\p@ \@minus2\p@ + \parsep 3\p@ \@plus2\p@ \@minus\p@ + \itemsep \parsep}% +% + \belowdisplayskip \abovedisplayskip} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\scriptsize} +% \begin{macro}{\tiny} +% \begin{macro}{\large} +% \begin{macro}{\Large} +% \begin{macro}{\LARGE} +% \begin{macro}{\huge} +% \begin{macro}{\Huge} +% これらは先ほどのマクロよりも簡単です。これらはフォントサイズを変更する +% だけで、リスト環境とディスプレイ数式のパラメータは変更しません。 +% \begin{macrocode} +%<*10pt> +\newcommand{\scriptsize}{\@setfontsize\scriptsize\@viipt\@viiipt} +\newcommand{\tiny}{\@setfontsize\tiny\@vpt\@vipt} +\newcommand{\large}{\@setfontsize\large\@xiipt{17}} +\newcommand{\Large}{\@setfontsize\Large\@xivpt{21}} +\newcommand{\LARGE}{\@setfontsize\LARGE\@xviipt{25}} +\newcommand{\huge}{\@setfontsize\huge\@xxpt{28}} +\newcommand{\Huge}{\@setfontsize\Huge\@xxvpt{33}} +% +%<*11pt> +\newcommand{\scriptsize}{\@setfontsize\scriptsize\@viiipt{9.5}} +\newcommand{\tiny}{\@setfontsize\tiny\@vipt\@viipt} +\newcommand{\large}{\@setfontsize\large\@xiipt{17}} +\newcommand{\Large}{\@setfontsize\Large\@xivpt{21}} +\newcommand{\LARGE}{\@setfontsize\LARGE\@xviipt{25}} +\newcommand{\huge}{\@setfontsize\huge\@xxpt{28}} +\newcommand{\Huge}{\@setfontsize\Huge\@xxvpt{33}} +% +%<*12pt> +\newcommand{\scriptsize}{\@setfontsize\scriptsize\@viiipt{9.5}} +\newcommand{\tiny}{\@setfontsize\tiny\@vipt\@viipt} +\newcommand{\large}{\@setfontsize\large\@xivpt{21}} +\newcommand{\Large}{\@setfontsize\Large\@xviipt{25}} +\newcommand{\LARGE}{\@setfontsize\LARGE\@xxpt{28}} +\newcommand{\huge}{\@setfontsize\huge\@xxvpt{33}} +\let\Huge=\huge +% +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% +% \section{レイアウト} +% +% \subsection{用紙サイズの決定} +% +% \begin{macro}{\columnsep} +% \begin{macro}{\columnseprule} +% |\columnsep|は、二段組のときの、左右(あるいは上下)の段間の幅です。 +% このスペースの中央に|\columnseprule|の幅の罫線が引かれます。 +% \changes{v1.0g}{1997/01/25}{\cs{columnsep}: 10pt to 3\cs{Cwd} or 2\cs{Cwd}.} +% \begin{macrocode} +%<*article|report|book> +\if@stysize +% \setlength\columnsep{3\Cwd} +% \setlength\columnsep{2\Cwd} +\else + \setlength\columnsep{10\p@} +\fi +\setlength\columnseprule{0\p@} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{段落の形} +% +% \begin{macro}{\lineskip} +% \begin{macro}{\normallineskip} +% これらの値は、行が近付き過ぎたときの\TeX の動作を制御します。 +% \begin{macrocode} +\setlength\lineskip{1\p@} +\setlength\normallineskip{1\p@} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\baselinestretch} +% これは、|\baselineskip|の倍率を示すために使います。 +% デフォルトでは、\emph{何もしません}。このコマンドが``empty''でない場合、 +% |\baselineskip|の指定の\texttt{plus}や\texttt{minus}部分は無視される +% ことに注意してください。 +% \begin{macrocode} +\renewcommand{\baselinestretch}{} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\parskip} +% \begin{macro}{\parindent} +% |\parskip|は段落間に挿入される、縦方向の追加スペースです。 +% |\parindent|は段落の先頭の字下げ幅です。 +% \begin{macrocode} +\setlength\parskip{0\p@ \@plus \p@} +\setlength\parindent{1\Cwd} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\smallskipamount} +% \begin{macro}{\medskipamount} +% \begin{macro}{\bigskipamount} +% これら3つのパラメータの値は、\LaTeX{}カーネルの中で設定されています。 +% これらはおそらく、サイズオプションの指定によって変えるべきです。 +% しかし、\LaTeX~2.09や\LaTeXe{}の以前のリリースの両方との互換性を保つために、 +% これらはまだ同じ値としています。 +% \begin{macrocode} +%<*10pt|11pt|12pt> +\setlength\smallskipamount{3\p@ \@plus 1\p@ \@minus 1\p@} +\setlength\medskipamount{6\p@ \@plus 2\p@ \@minus 2\p@} +\setlength\bigskipamount{12\p@ \@plus 4\p@ \@minus 4\p@} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@lowpenalty} +% \begin{macro}{\@medpenalty} +% \begin{macro}{\@highpenalty} +% |\nopagebreak|と|\nolinebreak|コマンドは、これらのコマンドが置かれた場所に、 +% ペナルティを起いて、分割を制御します。 +% 置かれるペナルティは、コマンドの引数によって、 +% |\@lowpenalty|, |\@medpenalty|, |\@highpenalty|のいずれかが使われます。 +% \begin{macrocode} +\@lowpenalty 51 +\@medpenalty 151 +\@highpenalty 301 +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsection{ページレイアウト} +% +% \subsubsection{縦方向のスペース} +% +% \begin{macro}{\headheight} +% \begin{macro}{\headsep} +% \begin{macro}{\topskip} +% |\headheight|は、ヘッダが入るボックスの高さです。 +% |\headsep|は、ヘッダの下端と本文領域との間の距離です。 +% |\topskip|は、本文領域の上端と1行目のテキストのベースラインとの距離です。 +% \begin{macrocode} +%<*10pt|11pt|12pt> +\setlength\headheight{12\p@} +%<*tate> +\if@stysize + \ifnum\c@@paper=2 % A5 + \setlength\headsep{6mm} + \else % A4, B4, B5 and other + \setlength\headsep{8mm} + \fi +\else + \setlength\headsep{8mm} +\fi +% +%<*yoko> +%\setlength\headsep{25\p@} +%<10pt&bk>\setlength\headsep{.25in} +%<11pt&bk>\setlength\headsep{.275in} +%<12pt&bk>\setlength\headsep{.275in} +% +\setlength\topskip{1\Cht} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\footskip} +% |\footskip|は、本文領域の下端とフッタの下端との距離です。 +% フッタのボックスの高さを示す、|\footheight|は削除されました。 +% \begin{macrocode} +%\setlength\footskip{14mm} +%<*yoko> +%\setlength\footskip{30\p@} +%<10pt&bk>\setlength\footskip{.35in} +%<11pt&bk>\setlength\footskip{.38in} +%<12pt&bk>\setlength\footskip{30\p@} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\maxdepth} +% \changes{v1.1c}{1995/12/25}{\cs{@maxdepth}の設定を除外した} +% \TeX のプリミティブレジスタ|\maxdepth|は、|\topskip|と同じような +% 働きをします。|\@maxdepth|レジスタは、つねに|\maxdepth|のコピーでなくては +% いけません。これは|\begin{document}|の内部で設定されます。 +% \TeX{}と\LaTeX~2.09では、|\maxdepth|は\texttt{4pt}に固定です。 +% \LaTeXe{}では、|\maxdepth|$+$|\topskip|を基本サイズの1.5倍にしたいので、 +% |\maxdepth|を|\topskip|の半分の値で設定します。 +% \begin{macrocode} +\if@compatibility + \setlength\maxdepth{4\p@} +\else + \setlength\maxdepth{.5\topskip} +\fi +% \end{macrocode} +% \end{macro} +% +% \subsubsection{本文領域} +% |\textheight|と|\textwidth|は、本文領域の通常の高さと幅を示します。 +% 縦組でも横組でも、``高さ''は行数を、``幅''は字詰めを意味します。 +% 後ほど、これらの長さに|\topskip|の値が加えられます。 +% +% \begin{macro}{\textwidth} +% 基本組の字詰めです。 +% +% 互換モードの場合: +% \begin{macrocode} +\if@compatibility +% \end{macrocode} +% \changes{v1.1a}{1997/01/25}{Add paper option with compatibility mode.} +% \changes{v1.1h}{1997/09/03}{landscapeでの指定を追加} +% 互換モード:|a4j|や|b5j|のクラスオプションが指定された場合の設定: +% \begin{macrocode} + \if@stysize + \ifnum\c@@paper=2 % A5 + \if@landscape +%<10pt&yoko> \setlength\textwidth{47\Cwd} +%<11pt&yoko> \setlength\textwidth{42\Cwd} +%<12pt&yoko> \setlength\textwidth{40\Cwd} +%<10pt&tate> \setlength\textwidth{27\Cwd} +%<11pt&tate> \setlength\textwidth{25\Cwd} +%<12pt&tate> \setlength\textwidth{23\Cwd} + \else +%<10pt&yoko> \setlength\textwidth{28\Cwd} +%<11pt&yoko> \setlength\textwidth{25\Cwd} +%<12pt&yoko> \setlength\textwidth{24\Cwd} +%<10pt&tate> \setlength\textwidth{46\Cwd} +%<11pt&tate> \setlength\textwidth{42\Cwd} +%<12pt&tate> \setlength\textwidth{38\Cwd} + \fi + \else\ifnum\c@@paper=3 % B4 + \if@landscape +%<10pt&yoko> \setlength\textwidth{75\Cwd} +%<11pt&yoko> \setlength\textwidth{69\Cwd} +%<12pt&yoko> \setlength\textwidth{63\Cwd} +%<10pt&tate> \setlength\textwidth{53\Cwd} +%<11pt&tate> \setlength\textwidth{49\Cwd} +%<12pt&tate> \setlength\textwidth{44\Cwd} + \else +%<10pt&yoko> \setlength\textwidth{60\Cwd} +%<11pt&yoko> \setlength\textwidth{55\Cwd} +%<12pt&yoko> \setlength\textwidth{50\Cwd} +%<10pt&tate> \setlength\textwidth{85\Cwd} +%<11pt&tate> \setlength\textwidth{76\Cwd} +%<12pt&tate> \setlength\textwidth{69\Cwd} + \fi + \else\ifnum\c@@paper=4 % B5 + \if@landscape +%<10pt&yoko> \setlength\textwidth{60\Cwd} +%<11pt&yoko> \setlength\textwidth{55\Cwd} +%<12pt&yoko> \setlength\textwidth{50\Cwd} +%<10pt&tate> \setlength\textwidth{34\Cwd} +%<11pt&tate> \setlength\textwidth{31\Cwd} +%<12pt&tate> \setlength\textwidth{28\Cwd} + \else +%<10pt&yoko> \setlength\textwidth{37\Cwd} +%<11pt&yoko> \setlength\textwidth{34\Cwd} +%<12pt&yoko> \setlength\textwidth{31\Cwd} +%<10pt&tate> \setlength\textwidth{55\Cwd} +%<11pt&tate> \setlength\textwidth{51\Cwd} +%<12pt&tate> \setlength\textwidth{47\Cwd} + \fi + \else % A4 ant other + \if@landscape +%<10pt&yoko> \setlength\textwidth{73\Cwd} +%<11pt&yoko> \setlength\textwidth{68\Cwd} +%<12pt&yoko> \setlength\textwidth{61\Cwd} +%<10pt&tate> \setlength\textwidth{41\Cwd} +%<11pt&tate> \setlength\textwidth{38\Cwd} +%<12pt&tate> \setlength\textwidth{35\Cwd} + \else +%<10pt&yoko> \setlength\textwidth{47\Cwd} +%<11pt&yoko> \setlength\textwidth{43\Cwd} +%<12pt&yoko> \setlength\textwidth{40\Cwd} +%<10pt&tate> \setlength\textwidth{67\Cwd} +%<11pt&tate> \setlength\textwidth{61\Cwd} +%<12pt&tate> \setlength\textwidth{57\Cwd} + \fi + \fi\fi\fi + \else +% \end{macrocode} +% 互換モード:デフォルト設定 +% \begin{macrocode} + \if@twocolumn + \setlength\textwidth{52\Cwd} + \else +%<10pt&!bk&yoko> \setlength\textwidth{327\p@} +%<11pt&!bk&yoko> \setlength\textwidth{342\p@} +%<12pt&!bk&yoko> \setlength\textwidth{372\p@} +%<10pt&bk&yoko> \setlength\textwidth{4.3in} +%<11pt&bk&yoko> \setlength\textwidth{4.8in} +%<12pt&bk&yoko> \setlength\textwidth{4.8in} +%<10pt&tate> \setlength\textwidth{67\Cwd} +%<11pt&tate> \setlength\textwidth{61\Cwd} +%<12pt&tate> \setlength\textwidth{57\Cwd} + \fi + \fi +% \end{macrocode} +% 2eモードの場合: +% \begin{macrocode} +\else +% \end{macrocode} +% 2eモード:|a4j|や|b5j|のクラスオプションが指定された場合の設定: +% 二段組では用紙サイズの8割、一段組では用紙サイズの7割を版面の幅として +% 設定します。 +% \begin{macrocode} + \if@stysize + \if@twocolumn +% \setlength\textwidth{.8\paperwidth} +% \setlength\textwidth{.8\paperheight} + \else +% \setlength\textwidth{.7\paperwidth} +% \setlength\textwidth{.7\paperheight} + \fi + \else +% \end{macrocode} +% 2eモード:デフォルト設定 +% \begin{macrocode} +% \setlength\@tempdima{\paperheight} +% \setlength\@tempdima{\paperwidth} + \addtolength\@tempdima{-2in} +% \addtolength\@tempdima{-1.3in} +% \setlength\@tempdimb{327\p@} +% \setlength\@tempdimb{342\p@} +% \setlength\@tempdimb{372\p@} +% \setlength\@tempdimb{67\Cwd} +% \setlength\@tempdimb{61\Cwd} +% \setlength\@tempdimb{57\Cwd} + \if@twocolumn + \ifdim\@tempdima>2\@tempdimb\relax + \setlength\textwidth{2\@tempdimb} + \else + \setlength\textwidth{\@tempdima} + \fi + \else + \ifdim\@tempdima>\@tempdimb\relax + \setlength\textwidth{\@tempdimb} + \else + \setlength\textwidth{\@tempdima} + \fi + \fi + \fi +\fi +\@settopoint\textwidth +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textheight} +% 基本組の行数です。 +% +% 互換モードの場合: +% \begin{macrocode} +\if@compatibility +% \end{macrocode} +% \changes{v1.1a}{1997/01/25}{Add paper option with compatibility mode.} +% \changes{v1.1f}{1997/09/03}{landscapeでの指定を追加} +% 互換モード:|a4j|や|b5j|のクラスオプションが指定された場合の設定: +% \begin{macrocode} + \if@stysize + \ifnum\c@@paper=2 % A5 + \if@landscape +%<10pt&yoko> \setlength\textheight{17\Cvs} +%<11pt&yoko> \setlength\textheight{17\Cvs} +%<12pt&yoko> \setlength\textheight{16\Cvs} +%<10pt&tate> \setlength\textheight{26\Cvs} +%<11pt&tate> \setlength\textheight{26\Cvs} +%<12pt&tate> \setlength\textheight{25\Cvs} + \else +%<10pt&yoko> \setlength\textheight{28\Cvs} +%<11pt&yoko> \setlength\textheight{25\Cvs} +%<12pt&yoko> \setlength\textheight{24\Cvs} +%<10pt&tate> \setlength\textheight{16\Cvs} +%<11pt&tate> \setlength\textheight{16\Cvs} +%<12pt&tate> \setlength\textheight{15\Cvs} + \fi + \else\ifnum\c@@paper=3 % B4 + \if@landscape +%<10pt&yoko> \setlength\textheight{38\Cvs} +%<11pt&yoko> \setlength\textheight{36\Cvs} +%<12pt&yoko> \setlength\textheight{34\Cvs} +%<10pt&tate> \setlength\textheight{48\Cvs} +%<11pt&tate> \setlength\textheight{48\Cvs} +%<12pt&tate> \setlength\textheight{45\Cvs} + \else +%<10pt&yoko> \setlength\textheight{57\Cvs} +%<11pt&yoko> \setlength\textheight{55\Cvs} +%<12pt&yoko> \setlength\textheight{52\Cvs} +%<10pt&tate> \setlength\textheight{33\Cvs} +%<11pt&tate> \setlength\textheight{33\Cvs} +%<12pt&tate> \setlength\textheight{31\Cvs} + \fi + \else\ifnum\c@@paper=4 % B5 + \if@landscape +%<10pt&yoko> \setlength\textheight{22\Cvs} +%<11pt&yoko> \setlength\textheight{21\Cvs} +%<12pt&yoko> \setlength\textheight{20\Cvs} +%<10pt&tate> \setlength\textheight{34\Cvs} +%<11pt&tate> \setlength\textheight{34\Cvs} +%<12pt&tate> \setlength\textheight{32\Cvs} + \else +%<10pt&yoko> \setlength\textheight{35\Cvs} +%<11pt&yoko> \setlength\textheight{34\Cvs} +%<12pt&yoko> \setlength\textheight{32\Cvs} +%<10pt&tate> \setlength\textheight{21\Cvs} +%<11pt&tate> \setlength\textheight{21\Cvs} +%<12pt&tate> \setlength\textheight{20\Cvs} + \fi + \else % A4 and other + \if@landscape +%<10pt&yoko> \setlength\textheight{27\Cvs} +%<11pt&yoko> \setlength\textheight{26\Cvs} +%<12pt&yoko> \setlength\textheight{25\Cvs} +%<10pt&tate> \setlength\textheight{41\Cvs} +%<11pt&tate> \setlength\textheight{41\Cvs} +%<12pt&tate> \setlength\textheight{38\Cvs} + \else +%<10pt&yoko> \setlength\textheight{43\Cvs} +%<11pt&yoko> \setlength\textheight{42\Cvs} +%<12pt&yoko> \setlength\textheight{39\Cvs} +%<10pt&tate> \setlength\textheight{26\Cvs} +%<11pt&tate> \setlength\textheight{26\Cvs} +%<12pt&tate> \setlength\textheight{22\Cvs} + \fi + \fi\fi\fi +% \addtolength\textheight{\topskip} +% \addtolength\textheight{\baselineskip} +% \addtolength\textheight{\Cht} +% \addtolength\textheight{\Cdp} +% \end{macrocode} +% 互換モード:デフォルト設定 +% \begin{macrocode} + \else +%<10pt&!bk&yoko> \setlength\textheight{578\p@} +%<10pt&bk&yoko> \setlength\textheight{554\p@} +%<11pt&yoko> \setlength\textheight{580.4\p@} +%<12pt&yoko> \setlength\textheight{586.5\p@} +%<10pt&tate> \setlength\textheight{26\Cvs} +%<11pt&tate> \setlength\textheight{25\Cvs} +%<12pt&tate> \setlength\textheight{24\Cvs} + \fi +% \end{macrocode} +% 2eモードの場合: +% \begin{macrocode} +\else +% \end{macrocode} +% 2eモード:|a4j|や|b5j|のクラスオプションが指定された場合の設定: +% 縦組では用紙サイズの70\%(book)か78\%(ariticle,report)、 +% 横組では70\%(book)か75\%(article,report)を版面の高さに設定します。 +% \begin{macrocode} + \if@stysize +% \setlength\textheight{.75\paperwidth} +% \setlength\textheight{.78\paperwidth} +% \setlength\textheight{.70\paperheight} +% \setlength\textheight{.75\paperheight} +% \end{macrocode} +% 2eモード:デフォルト値 +% \begin{macrocode} + \else +% \setlength\@tempdima{\paperwidth} +% \setlength\@tempdima{\paperheight} + \addtolength\@tempdima{-2in} +% \addtolength\@tempdima{-1.5in} + \divide\@tempdima\baselineskip + \@tempcnta\@tempdima + \setlength\textheight{\@tempcnta\baselineskip} + \fi +\fi +% \end{macrocode} +% 最後に、|\textheight|に|\topskip|の値を加えます。 +% \begin{macrocode} +\addtolength\textheight{\topskip} +\@settopoint\textheight +% \end{macrocode} +% \end{macro} +% +% \subsubsection{マージン} +% +% \begin{macro}{\topmargin} +% |\topmargin|は、``印字可能領域''---用紙の上端から1インチ内側---% +% の上端からヘッダ部分の上端までの距離です。 +% +% 2.09互換モードの場合: +% \begin{macrocode} +\if@compatibility +%<*yoko> + \if@stysize + \setlength\topmargin{-.3in} + \else +% \setlength\topmargin{27\p@} +%<10pt&bk> \setlength\topmargin{.75in} +%<11pt&bk> \setlength\topmargin{.73in} +%<12pt&bk> \setlength\topmargin{.73in} + \fi +% +%<*tate> + \if@stysize + \ifnum\c@@paper=2 % A5 + \setlength\topmargin{.8in} + \else % A4, B4, B5 and other + \setlength\topmargin{32mm} + \fi + \else + \setlength\topmargin{32mm} + \fi + \addtolength\topmargin{-1in} + \addtolength\topmargin{-\headheight} + \addtolength\topmargin{-\headsep} +% +% \end{macrocode} +% 2eモードの場合: +% \begin{macrocode} +\else + \setlength\topmargin{\paperheight} + \addtolength\topmargin{-\headheight} + \addtolength\topmargin{-\headsep} +% \addtolength\topmargin{-\textwidth} +% \addtolength\topmargin{-\textheight} + \addtolength\topmargin{-\footskip} +% \end{macrocode} +% \changes{v1.1e}{1997/04/08}{横組クラスでの調整量を +% -2.4インチから-2.0インチにした。} +% \changes{v1.1j}{1998/02/03}{互換モード時のa5pのトップマージンを0.7in増加} +% \begin{macrocode} + \if@stysize + \ifnum\c@@paper=2 % A5 + \addtolength\topmargin{-1.3in} + \else + \addtolength\topmargin{-2.0in} + \fi + \else +% \addtolength\topmargin{-2.0in} +% \addtolength\topmargin{-2.8in} + \fi +% \end{macrocode} +% \changes{v1.1d}{1997/02/05}{\cs{tompargin}を半分にするのはアキ領域の計算後} +% \changes{v1.1r}{1999/08/09}{\cs{if@stysize}フラグに限らず半分にする} +% \begin{macrocode} + \addtolength\topmargin{-.5\topmargin} +\fi +\@settopoint\topmargin +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\marginparsep} +% \begin{macro}{\marginparpush} +% |\marginparsep|は、本文と傍注の間にあけるスペースの幅です。 +% 横組では本文の左(右)端と傍注、 +% 縦組では本文の下(上)端と傍注の間になります。 +% |\marginparpush|は、傍注と傍注との間のスペースの幅です。 +% \begin{macrocode} +\if@twocolumn + \setlength\marginparsep{10\p@} +\else +% \setlength\marginparsep{15\p@} +% \setlength\marginparsep{10\p@} +\fi +%\setlength\marginparpush{7\p@} +%<*yoko> +%<10pt>\setlength\marginparpush{5\p@} +%<11pt>\setlength\marginparpush{5\p@} +%<12pt>\setlength\marginparpush{7\p@} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\oddsidemargin} +% \begin{macro}{\evensidemargin} +% \begin{macro}{\marginparwidth} +% まず、互換モードでの長さを示します。 +% +% 互換モード、縦組の場合: +% \begin{macrocode} +\if@compatibility +% \setlength\oddsidemargin{0\p@} +% \setlength\evensidemargin{0\p@} +% \end{macrocode} +% 互換モード、横組、bookクラスの場合: +% \begin{macrocode} +%<*yoko> +%<*bk> +%<10pt> \setlength\oddsidemargin {.5in} +%<11pt> \setlength\oddsidemargin {.25in} +%<12pt> \setlength\oddsidemargin {.25in} +%<10pt> \setlength\evensidemargin {1.5in} +%<11pt> \setlength\evensidemargin {1.25in} +%<12pt> \setlength\evensidemargin {1.25in} +%<10pt> \setlength\marginparwidth {.75in} +%<11pt> \setlength\marginparwidth {1in} +%<12pt> \setlength\marginparwidth {1in} +% +% \end{macrocode} +% 互換モード、横組、reportとarticleクラスの場合: +% \begin{macrocode} +%<*!bk> + \if@twoside +%<10pt> \setlength\oddsidemargin {44\p@} +%<11pt> \setlength\oddsidemargin {36\p@} +%<12pt> \setlength\oddsidemargin {21\p@} +%<10pt> \setlength\evensidemargin {82\p@} +%<11pt> \setlength\evensidemargin {74\p@} +%<12pt> \setlength\evensidemargin {59\p@} +%<10pt> \setlength\marginparwidth {107\p@} +%<11pt> \setlength\marginparwidth {100\p@} +%<12pt> \setlength\marginparwidth {85\p@} + \else +%<10pt> \setlength\oddsidemargin {60\p@} +%<11pt> \setlength\oddsidemargin {54\p@} +%<12pt> \setlength\oddsidemargin {39.5\p@} +%<10pt> \setlength\evensidemargin {60\p@} +%<11pt> \setlength\evensidemargin {54\p@} +%<12pt> \setlength\evensidemargin {39.5\p@} +%<10pt> \setlength\marginparwidth {90\p@} +%<11pt> \setlength\marginparwidth {83\p@} +%<12pt> \setlength\marginparwidth {68\p@} + \fi +% +% \end{macrocode} +% 互換モード、横組、二段組の場合: +% \begin{macrocode} + \if@twocolumn + \setlength\oddsidemargin {30\p@} + \setlength\evensidemargin {30\p@} + \setlength\marginparwidth {48\p@} + \fi +% +% \end{macrocode} +% 縦組、横組にかかわらず、スタイルオプション設定ではゼロです。 +% \changes{v1.0g}{1997/01/25}{\cs{oddsidemargin}, \cs{evensidemagin}: +% 0pt if specified papersize at \cs{documentstyle} option.} +% \begin{macrocode} + \if@stysize + \if@twocolumn\else + \setlength\oddsidemargin{0\p@} + \setlength\evensidemargin{0\p@} + \fi + \fi +% \end{macrocode} +% +% 互換モードでない場合: +% \begin{macrocode} +\else + \setlength\@tempdima{\paperwidth} +% \addtolength\@tempdima{-\textheight} +% \addtolength\@tempdima{-\textwidth} +% \end{macrocode} +% +% |\oddsidemargin|を計算します。 +% \begin{macrocode} + \if@twoside +% \setlength\oddsidemargin{.6\@tempdima} +% \setlength\oddsidemargin{.4\@tempdima} + \else + \setlength\oddsidemargin{.5\@tempdima} + \fi + \addtolength\oddsidemargin{-1in} +% \end{macrocode} +% \changes{v1.1p}{1999/1/6}{\cs{oddsidemargin}のポイントへの変換を後ろに} +% |\evensidemargin|を計算します。 +% \begin{macrocode} + \setlength\evensidemargin{\paperwidth} + \addtolength\evensidemargin{-2in} +% \addtolength\evensidemargin{-\textheight} +% \addtolength\evensidemargin{-\textwidth} + \addtolength\evensidemargin{-\oddsidemargin} + \@settopoint\oddsidemargin % 1999.1.6 + \@settopoint\evensidemargin +% \end{macrocode} +% |\marginparwidth|を計算します。 +% ここで、|\@tempdima|の値は、\linebreak +% |\paperwidth| $-$ |\textwidth|です。 +% \changes{v1.1d}{1995/11/24}{typo: \cs{marginmarwidth} to \cs{marginparwidth}} +% \begin{macrocode} +%<*yoko> + \if@twoside + \setlength\marginparwidth{.6\@tempdima} + \addtolength\marginparwidth{-.4in} + \else + \setlength\marginparwidth{.5\@tempdima} + \addtolength\marginparwidth{-.4in} + \fi + \ifdim \marginparwidth >2in + \setlength\marginparwidth{2in} + \fi +% +% \end{macrocode} +% +% 縦組の場合は、少し複雑です。 +% \begin{macrocode} +%<*tate> + \setlength\@tempdima{\paperheight} + \addtolength\@tempdima{-\textwidth} + \addtolength\@tempdima{-\topmargin} + \addtolength\@tempdima{-\headheight} + \addtolength\@tempdima{-\headsep} + \addtolength\@tempdima{-\footskip} + \setlength\marginparwidth{.5\@tempdima} +% + \@settopoint\marginparwidth +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \subsection{脚注} +% +% \begin{macro}{\footnotesep} +% |\footnotesep|は、それぞれの脚注の先頭に置かれる``支柱''の高さです。 +% このクラスでは、通常の|\footnotesize|の支柱と同じ長さですので、 +% 脚注間に余計な空白は入りません。 +% \begin{macrocode} +%<10pt>\setlength\footnotesep{6.65\p@} +%<11pt>\setlength\footnotesep{7.7\p@} +%<12pt>\setlength\footnotesep{8.4\p@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\footins} +% |\skip\footins|は、本文の最終行と最初の脚注との間の距離です。 +% \begin{macrocode} +%<10pt>\setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@} +%<11pt>\setlength{\skip\footins}{10\p@ \@plus 4\p@ \@minus 2\p@} +%<12pt>\setlength{\skip\footins}{10.8\p@ \@plus 4\p@ \@minus 2\p@} +% \end{macrocode} +% \end{macro} +% +% \subsection{フロート} +% すべてのフロートパラメータは、\LaTeX{}のカーネルでデフォルトが定義 +% されています。そのため、カウンタ以外のパラメータは|\renewcommand|で +% 設定する必要があります。 +% +% \subsubsection{フロートパラメータ} +% +% \begin{macro}{\floatsep} +% \begin{macro}{\textfloatsep} +% \begin{macro}{\intextsep} +% フロートオブジェクトが本文のあるページに置かれるとき、 +% フロートとそのページにある別のオブジェクトの距離は、 +% これらのパラメータで制御されます。これらのパラメータは、一段組モードと +% 二段組モードの段抜きでないフロートの両方で使われます。 +% +% |\floatsep|は、ページ上部あるいは下部のフロート間の距離です。 +% +% |\textfloatsep|は、ページ上部あるいは下部のフロートと本文との距離です。 +% +% |\intextsep|は、本文の途中に出力されるフロートと本文との距離です。 +% \begin{macrocode} +%<*10pt> +\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@} +\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} +\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@} +% +%<*11pt> +\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@} +\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} +\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@} +% +%<*12pt> +\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 4\p@} +\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} +\setlength\intextsep {14\p@ \@plus 4\p@ \@minus 4\p@} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\dblfloatsep} +% \begin{macro}{\dbltextfloatsep} +% 二段組モードで、|\textwidth|の幅を持つ、段抜きのフロートオブジェクトが +% 本文と同じページに置かれるとき、本文とフロートとの距離は、 +% |\dblfloatsep|と|\dbltextfloatsep|によって制御されます。 +% +% |\dblfloatsep|は、ページ上部あるいは下部のフロートと本文との距離です。 +% +% |\dbltextfloatsep|は、ページ上部あるいは下部のフロート間の距離です。 +% \begin{macrocode} +%<*10pt> +\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@} +\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} +% +%<*11pt> +\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@} +\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} +% +%<*12pt> +\setlength\dblfloatsep {14\p@ \@plus 2\p@ \@minus 4\p@} +\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@fptop} +% \begin{macro}{\@fpsep} +% \begin{macro}{\@fpbot} +% フロートオブジェクトが、独立したページに置かれるとき、 +% このページのレイアウトは、次のパラメータで制御されます。 +% これらのパラメータは、一段組モードか、二段組モードでの一段出力の +% フロートオブジェクトに対して使われます。 +% +% ページ上部では、|\@fptop|の伸縮長が挿入されます。 +% ページ下部では、|\@fpbot|の伸縮長が挿入されます。 +% フロート間には|\@fpsep|が挿入されます。 +% +% なお、そのページを空白で満たすために、|\@fptop|と|\@fpbot|の +% 少なくともどちらか一方に、|plus ...fil|を含めてください。 +% \begin{macrocode} +%<*10pt> +\setlength\@fptop{0\p@ \@plus 1fil} +\setlength\@fpsep{8\p@ \@plus 2fil} +\setlength\@fpbot{0\p@ \@plus 1fil} +% +%<*11pt> +\setlength\@fptop{0\p@ \@plus 1fil} +\setlength\@fpsep{8\p@ \@plus 2fil} +\setlength\@fpbot{0\p@ \@plus 1fil} +% +%<*12pt> +\setlength\@fptop{0\p@ \@plus 1fil} +\setlength\@fpsep{10\p@ \@plus 2fil} +\setlength\@fpbot{0\p@ \@plus 1fil} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@dblfptop} +% \begin{macro}{\@dblfpsep} +% \begin{macro}{\@dblfpbot} +% 二段組モードでの二段抜きのフロートに対しては、 +% これらのパラメータが使われます。 +% \begin{macrocode} +%<*10pt> +\setlength\@dblfptop{0\p@ \@plus 1fil} +\setlength\@dblfpsep{8\p@ \@plus 2fil} +\setlength\@dblfpbot{0\p@ \@plus 1fil} +% +%<*11pt> +\setlength\@dblfptop{0\p@ \@plus 1fil} +\setlength\@dblfpsep{8\p@ \@plus 2fil} +\setlength\@dblfpbot{0\p@ \@plus 1fil} +% +%<*12pt> +\setlength\@dblfptop{0\p@ \@plus 1fil} +\setlength\@dblfpsep{10\p@ \@plus 2fil} +\setlength\@dblfpbot{0\p@ \@plus 1fil} +% +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsubsection{フロートオブジェクトの上限値} +% +% \begin{macro}{\c@topnumber} +% \Lcount{topnumber}は、本文ページの上部に出力できるフロートの最大数です。 +% \begin{macrocode} +%<*article|report|book> +\setcounter{topnumber}{2} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\c@bottomnumber} +% \Lcount{bottomnumber}は、本文ページの下部に出力できるフロートの最大数です。 +% \begin{macrocode} +\setcounter{bottomnumber}{1} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\c@totalnumber} +% \Lcount{totalnumber}は、本文ページに出力できるフロートの最大数です。 +% \begin{macrocode} +\setcounter{totalnumber}{3} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\c@dbltopnumber} +% \Lcount{dbltopnumber}は、二段組時における、本文ページの上部に出力できる +% 段抜きのフロートの最大数です。 +% \begin{macrocode} +\setcounter{dbltopnumber}{2} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\topfraction} +% これは、本文ページの上部に出力されるフロートが占有できる最大の割り合いです。 +% \begin{macrocode} +\renewcommand{\topfraction}{.7} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bottomfraction} +% これは、本文ページの下部に出力されるフロートが占有できる最大の割り合いです。 +% \begin{macrocode} +\renewcommand{\bottomfraction}{.3} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textfraction} +% これは、本文ページに最低限、入らなくてはならない本文の割り合いです。 +% \begin{macrocode} +\renewcommand{\textfraction}{.2} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\floatpagefraction} +% これは、フロートだけのページで最低限、入らなくてはならない +% フロートの割り合いです。 +% \begin{macrocode} +\renewcommand{\floatpagefraction}{.5} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dbltopfraction} +% これは、2段組時における本文ページに、 +% 2段抜きのフロートが占めることができる最大の割り合いです。 +% \begin{macrocode} +\renewcommand{\dbltopfraction}{.7} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dblfloatpagefraction} +% これは、2段組時におけるフロートだけのページに最低限、 +% 入らなくてはならない2段抜きのフロートの割り合いです。 +% \begin{macrocode} +\renewcommand{\dblfloatpagefraction}{.5} +% \end{macrocode} +% \end{macro} +% +% +% +% \section{ページスタイル}\label{sec:pagestyle} +% p\LaTeXe{}では、つぎの6種類のページスタイルを使用できます。 +% \pstyle{empty}は\file{latex.dtx}で定義されています。 +% +% \begin{tabular}{ll} +% empty & ヘッダにもフッタにも出力しない\\ +% plain & フッタにページ番号のみを出力する\\ +% headnombre & ヘッダにページ番号のみを出力する\\ +% footnombre & フッタにページ番号のみを出力する\\ +% headings & ヘッダに見出しとページ番号を出力する\\ +% bothstyle & ヘッダに見出し、フッタにページ番号を出力する\\ +% \end{tabular} +% +% ページスタイル\pstyle{foo}は、|\ps@foo|コマンドとして定義されます。 +% +% \begin{macro}{\@evenhead} +% \begin{macro}{\@oddhead} +% \begin{macro}{\@evenfoot} +% \begin{macro}{\@oddfoot} +% これらは|\ps@...|から呼び出され、ヘッダとフッタを出力するマクロです。 +% +% \DeleteShortVerb{\|} +% \begin{tabular}{ll} +% |\@oddhead| & 奇数ページのヘッダを出力\\ +% |\@oddfoot| & 奇数ページのフッタを出力\\ +% |\@evenhead| & 偶数ページのヘッダを出力\\ +% |\@evenfoot| & 偶数ページのフッタを出力\\ +% \end{tabular} +% \MakeShortVerb{\|} +% +% これらの内容は、横組の場合は|\textwidth|の幅を持つ|\hbox|に入れられ、 +% 縦組の場合は|\textheight|の幅を持つ|\hbox|に入れられます。 +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsection{マークについて} +% ヘッダに入る章番号や章見出しは、見出しコマンドで実行されるマークコマンドで +% 決定されます。ここでは、実行されるマークコマンドの定義を行なっています。 +% これらのマークコマンドは、\TeX{}の|\mark|機能を用いて、 +% `left'と`right'の2種類のマークを生成するように定義しています。 +% +% \begin{flushleft} +% |\markboth{|\meta{LEFT}|}{|\meta{RIGHT}|}|: 両方のマークに追加します。 +% +% |\markright{|\meta{RIGHT}|}|: `右'マークに追加します。 +% +% |\leftmark|: |\@oddhead|, |\@oddfoot|, |\@evenhead|, |\@evenfoot|マクロで +% 使われ、現在の``左''マークを出力します。 +% |\leftmark|は\TeX{}の|\botmark|コマンドのような働きをします。 +% 初期値は空でなくてはいけません。 +% +% |\rightmark|: |\@oddhead|, |\@oddfoot|, |\@evenhead|, |\@evenfoot|マクロで +% 使われ、現在の``右''マークを出力します。 +% |\rightmark|は\TeX{}の|\firstmark|コマンドのような働きをします。 +% 初期値は空でなくてはいけません。 +% \end{flushleft} +% +% マークコマンドの動作は、左マークの`範囲内の'右マークのために +% 合理的になっています。たとえば、左マークは|\chapter|コマンドによって +% 変更されます。そして右マークは|\section|コマンドによって変更されます。 +% しかし、同一ページに複数の|\markboth|コマンドが現れたとき、 +% おかしな結果となることがあります。 +% +% |\tableofcontents|のようなコマンドは、|\@mkboth|コマンドを用いて、 +% あるページスタイルの中でマークを設定しなくてはなりません。 +% |\@mkboth|は、|\ps@...|コマンドによって、|\markboth|(ヘッダを設定する)か、 +% |\@gobbletwo|(何もしない)に|\let|されます。 +% +% \changes{v1.0a}{1995/08/30}{柱の書体がノンブルに影響するバグの修正} +% +% \subsection{plainページスタイル} +% \pstyle{jpl@in}に|\let|するために、ここで定義をします。 +% +% \begin{macro}{\ps@plain} +% \begin{macrocode} +\def\ps@plain{\let\@mkboth\@gobbletwo + \let\ps@jpl@in\ps@plain + \let\@oddhead\@empty + \def\@oddfoot{\reset@font\hfil\thepage\hfil}% + \let\@evenhead\@empty + \let\@evenfoot\@oddfoot} +% \end{macrocode} +% \end{macro} +% +% \subsection{jpl@inページスタイル} +% \changes{v1.0d}{1996/02/29}{\pstyle{jpl@in}の初期値を定義} +% +% \pstyle{jpl@in}スタイルは、クラスファイル内部で使用するものです。 +% \LaTeX{}では、bookクラスを\pstyle{headings}としています。 +% しかし、\cs{tableofcontnts}コマンドの内部では\pstyle{plain}として +% 設定されるため、一つの文書でのページ番号の位置が上下に出力される +% ことになります。 +% +% そこで、p\LaTeXe{}では、\cs{tableofcontents}や\cs{theindex}のページスタイル +% を\pstyle{jpl@in}にし、実際に出力される形式は、ほかのページスタイル +% で|\let|をしています。したがって、\pstyle{headings}のとき、目次ページの +% ページ番号はヘッダ位置に出力され、\pstyle{plain}のときには、フッタ位置に +% 出力されます。 +% +% ここで、定義をしているのは、その初期値です。 +% +% \begin{macro}{\ps@jpl@in} +% \begin{macrocode} +\let\ps@jpl@in\ps@plain +% \end{macrocode} +% \end{macro} +% +% \subsection{headnombreページスタイル} +% +% \begin{macro}{\ps@headnombre} +% \pstyle{headnombre}スタイルは、ヘッダにページ番号のみを出力します。 +% \begin{macrocode} +\def\ps@headnombre{\let\@mkboth\@gobbletwo + \let\ps@jpl@in\ps@headnombre +% \def\@evenhead{\thepage\hfil}% +% \def\@oddhead{\hfil\thepage}% +% \def\@evenhead{\hfil\thepage}% +% \def\@oddhead{\thepage\hfil}% + \let\@oddfoot\@empty\let\@evenfoot\@empty} +% \end{macrocode} +% \end{macro} +% +% \subsection{footnombreページスタイル} +% +% \begin{macro}{\ps@footnombre} +% \pstyle{footnombre}スタイルは、フッタにページ番号のみを出力します。 +% \begin{macrocode} +\def\ps@footnombre{\let\@mkboth\@gobbletwo + \let\ps@jpl@in\ps@footnombre +% \def\@evenfoot{\thepage\hfil}% +% \def\@oddfoot{\hfil\thepage}% +% \def\@evenfoot{\hfil\thepage}% +% \def\@oddfoot{\thepage\hfil}% + \let\@oddhead\@empty\let\@evenhead\@empty} +% \end{macrocode} +% \end{macro} +% +% \subsection{headingsスタイル} +% \pstyle{headings}スタイルは、ヘッダに見出しとページ番号を出力します。 +% +% \begin{macro}{\ps@headings} +% このスタイルは、両面印刷と片面印刷とで形式が異なります。 +% \begin{macrocode} +\if@twoside +% \end{macrocode} +% 横組の場合は、奇数ページが右に、偶数ページが左にきます。 +% 縦組の場合は、奇数ページが左に、偶数ページが右にきます。 +% \begin{macrocode} + \def\ps@headings{\let\ps@jpl@in\ps@headnombre + \let\@oddfoot\@empty\let\@evenfoot\@empty +% \def\@evenhead{\thepage\hfil\leftmark}% +% \def\@oddhead{{\rightmark}\hfil\thepage}% +% \def\@evenhead{{\leftmark}\hfil\thepage}% +% \def\@oddhead{\thepage\hfil\rightmark}% + \let\@mkboth\markboth +%<*article> + \def\sectionmark##1{\markboth{% + \ifnum \c@secnumdepth >\z@ \thesection.\hskip1zw\fi + ##1}{}}% + \def\subsectionmark##1{\markright{% + \ifnum \c@secnumdepth >\@ne \thesubsection.\hskip1zw\fi + ##1}}% +%
+%<*report|book> + \def\chaptermark##1{\markboth{% + \ifnum \c@secnumdepth >\m@ne +% \if@mainmatter + \@chapapp\thechapter\@chappos\hskip1zw +% \fi + \fi + ##1}{}}% + \def\sectionmark##1{\markright{% + \ifnum \c@secnumdepth >\z@ \thesection.\hskip1zw\fi + ##1}}% +% + } +% \end{macrocode} +% 片面印刷の場合: +% \changes{v1.1g}{1997/08/25}{片面印刷のとき、sectionレベルが出力されない +% のを修正} +% \begin{macrocode} +\else % if not twoside + \def\ps@headings{\let\ps@jpl@in\ps@headnombre + \let\@oddfoot\@empty +% \def\@oddhead{{\rightmark}\hfil\thepage}% +% \def\@oddhead{\thepage\hfil\rightmark}% + \let\@mkboth\markboth +%<*article> + \def\sectionmark##1{\markright{% + \ifnum \c@secnumdepth >\m@ne \thesection.\hskip1zw\fi + ##1}}% +%
+%<*report|book> +\def\chaptermark##1{\markright{% + \ifnum \c@secnumdepth >\m@ne +% \if@mainmatter + \@chapapp\thechapter\@chappos\hskip1zw +% \fi + \fi + ##1}}% +% + } +\fi +% \end{macrocode} +% \end{macro} +% +% \subsection{bothstyleスタイル} +% +% \begin{macro}{\ps@bothstyle} +% \pstyle{bothstyle}スタイルは、 +% ヘッダに見出しを、フッタにページ番号を出力します。 +% +% このスタイルは、両面印刷と片面印刷とで形式が異なります。 +% \changes{v1.0d}{1995/08/23}{横組の evenfoot が中央揃えになっていたのを修正} +% \changes{v1.0d}{1996/03/05}{横組で偶数ページと奇数ページの設定が逆なのを修正} +% \begin{macrocode} +\if@twoside + \def\ps@bothstyle{\let\ps@jpl@in\ps@footnombre +%<*yoko> + \def\@evenhead{\leftmark\hfil}% right page + \def\@evenfoot{\thepage\hfil}% right page + \def\@oddhead{\hfil\rightmark}% left page + \def\@oddfoot{\hfil\thepage}% left page +% +%<*tate> + \def\@evenhead{\hfil\leftmark}% right page + \def\@evenfoot{\hfil\thepage}% right page + \def\@oddhead{\rightmark\hfil}% left page + \def\@oddfoot{\thepage\hfil}% left page +% + \let\@mkboth\markboth +%<*article> + \def\sectionmark##1{\markboth{% + \ifnum \c@secnumdepth >\z@ \thesection.\hskip1zw\fi + ##1}{}}% + \def\subsectionmark##1{\markright{% + \ifnum \c@secnumdepth >\@ne \thesubsection.\hskip1zw\fi + ##1}}% +% +%<*report|book> +\def\chaptermark##1{\markboth{% + \ifnum \c@secnumdepth >\m@ne +% \if@mainmatter + \@chapapp\thechapter\@chappos\hskip1zw +% \fi + \fi + ##1}{}}% + \def\sectionmark##1{\markright{% + \ifnum \c@secnumdepth >\z@ \thesection.\hskip1zw\fi + ##1}}% +% + } +% \end{macrocode} +% \changes{v1.1g}{1997/08/25}{片面印刷のとき、sectionレベルが出力されない +% のを修正} +% \changes{v1.1i}{1997/12/12}{report, bookクラスで片面印刷時に、 +% bothstyleスタイルにすると、コンパイルエラーになるのを修正} +% \begin{macrocode} +\else % if one column + \def\ps@bothstyle{\let\ps@jpl@in\ps@footnombre +% \def\@oddhead{\hfil\rightmark}% +% \def\@oddfoot{\hfil\thepage}% +% \def\@oddhead{\rightmark\hfil}% +% \def\@oddfoot{\thepage\hfil}% + \let\@mkboth\markboth +%<*article> + \def\sectionmark##1{\markright{% + \ifnum \c@secnumdepth >\m@ne \thesection.\hskip1zw\fi + ##1}}% +% +%<*report|book> + \def\chaptermark##1{\markright{% + \ifnum \c@secnumdepth >\m@ne +% \if@mainmatter + \@chapapp\thechapter\@chappos\hskip1zw +% \fi + \fi + ##1}}% +% + } +\fi +% \end{macrocode} +% \end{macro} +% +% \subsection{myheadingスタイル} +% +% \begin{macro}{\ps@myheadings} +% \changes{v1.0d}{1995/08/23}{横組モードの左右が逆であったのを修正} +% \pstyle{myheadings}ページスタイルは簡潔に定義されています。 +% ユーザがページスタイルを設計するときのヒナ型として使用することができます。 +% \begin{macrocode} +\def\ps@myheadings{\let\ps@jpl@in\ps@plain% + \let\@oddfoot\@empty\let\@evenfoot\@empty +% \def\@evenhead{\thepage\hfil\leftmark}% +% \def\@oddhead{{\rightmark}\hfil\thepage}% +% \def\@evenhead{{\leftmark}\hfil\thepage}% +% \def\@oddhead{\thepage\hfil\rightmark}% + \let\@mkboth\@gobbletwo +% \let\chaptermark\@gobble + \let\sectionmark\@gobble +%
\let\subsectionmark\@gobble +} +% \end{macrocode} +% \end{macro} +% +% +% \section{文書コマンド} +% +% \subsubsection{表題} +% +% \begin{macro}{\title} +% \begin{macro}{\autor} +% \begin{macro}{\date} +% 文書のタイトル、著者、日付の情報のための、 +% これらの3つのコマンドは\file{latex.dtx}で提供されています。 +% これらのコマンドは次のように定義されています。 +% \begin{macrocode} +%\newcommand*{\title}[1]{\gdef\@title{#1}} +%\newcommand*{\author}[1]{\gdef\@author{#1}} +%\newcommand*{\date}[1]{\gdef\@date{#1}} +% \end{macrocode} +% |\date|マクロのデフォルトは、今日の日付です。 +% \begin{macrocode} +%\date{\today} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{environment}{titlepage} +% 通常の環境では、ページの最初と最後を除き、タイトルページ環境は何もしません。 +% また、ページ番号の出力を抑制します。レポートスタイルでは、 +% ページ番号を1にリセットし、そして最後で1に戻します。 +% 互換モードでは、ページ番号はゼロに設定されますが、 +% 右起こしページ用のページパラメータでは誤った結果になります。 +% 二段組スタイルでも一段組のページが作られます。 +% +% 最初に互換モードの定義を作ります。 +% \begin{macrocode} +\if@compatibility +\newenvironment{titlepage} + {% +% \cleardoublepage + \if@twocolumn\@restonecoltrue\onecolumn + \else\@restonecolfalse\newpage\fi + \thispagestyle{empty}% + \setcounter{page}\z@ + }% + {\if@restonecol\twocolumn\else\newpage\fi + } +% \end{macrocode} +% +% そして、\LaTeX{}ネイティブのための定義です。 +% \begin{macrocode} +\else +\newenvironment{titlepage} + {% +% \cleardoublepage + \if@twocolumn + \@restonecoltrue\onecolumn + \else + \@restonecolfalse\newpage + \fi + \thispagestyle{empty}% + \setcounter{page}\@ne + }% + {\if@restonecol\twocolumn \else \newpage \fi +% \end{macrocode} +% 二段組モードでなければ、タイトルページの直後のページのページ番号も1に +% します。 +% \begin{macrocode} + \if@twoside\else + \setcounter{page}\@ne + \fi + } +\fi +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\maketitle} +% このコマンドは、表題を作成し、出力します。 +% 表題ページを独立させるかどうかによって定義が異なります。 +% reportとbookクラスのデフォルトは独立した表題です。 +% articleクラスはオプションで独立させることができます。 +% +% \begin{macro}{\p@thanks} +% 縦組のときは、|\thanks|コマンドを|\p@thanks|に|\let|します。 +% このコマンドは|\footnotetext|を使わず、直接、文字を|\@thanks|に格納 +% していきます。 +% \begin{macrocode} +\def\p@thanks#1{\footnotemark + \protected@xdef\@thanks{\@thanks + \protect{\noindent$\m@th^\thefootnote$~#1\protect\par}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\if@titlepage + \newcommand{\maketitle}{\begin{titlepage}% + \let\footnotesize\small + \let\footnoterule\relax +% \let\thanks\p@thanks + \let\footnote\thanks +% \end{macrocode} +% \changes{v1.1d}{1997/02/12}{縦組クラスの表紙を縦書きにするようにした} +% \begin{macrocode} +% \vbox to\textheight\bgroup\tate\hsize\textwidth + \null\vfil + \vskip 60\p@ + \begin{center}% + {\LARGE \@title \par}% + \vskip 3em% + {\Large + \lineskip .75em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par}% + \vskip 1.5em% + {\large \@date \par}% % Set date in \large size. + \end{center}\par +% \vfil{\centering\@thanks}\vfil\null +% \egroup +% \@thanks\vfil\null + \end{titlepage}% +% \end{macrocode} +% \Lcount{footnote}カウンタをリセットし、|\thanks|と|\maketitle|コマンドを +% 無効にし、いくつかの内部マクロを空にして格納領域を節約します。 +% \begin{macrocode} + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\p@thanks\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty +% \end{macrocode} +% タイトルが組版されたら、|\title|コマンドなどの宣言を無効にできます。 +% |\and|の定義は、|\author|の引数でのみ使用しますので、破棄します。 +% \begin{macrocode} + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax + }% +\else + \newcommand{\maketitle}{\par + \begingroup + \renewcommand{\thefootnote}{\fnsymbol{footnote}}% + \def\@makefnmark{\hbox{\ifydir $\m@th^{\@thefnmark}$ + \else\hbox{\yoko$\m@th^{\@thefnmark}$}\fi}}% +%<*tate> + \long\def\@makefntext##1{\parindent 1zw\noindent + \hbox to 2zw{\hss\@makefnmark}##1}% +% +%<*yoko> + \long\def\@makefntext##1{\parindent 1em\noindent + \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1}% +% + \if@twocolumn + \ifnum \col@number=\@ne \@maketitle + \else \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \thispagestyle{jpl@in}\@thanks +% \end{macrocode} +% ここでグループを閉じ、\Lcount{footnote}カウンタをリセットし、 +% |\thanks|, |\maketitle|, |\@maketitle|を無効にし、 +% いくつかの内部マクロを空にして格納領域を節約します。 +% \begin{macrocode} + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\p@thanks\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@maketitle} +% 独立した表題ページを作らない場合の、表題の出力形式です。 +% \begin{macrocode} + \def\@maketitle{% + \newpage\null + \vskip 2em% + \begin{center}% +% \let\footnote\thanks +% \let\footnote\p@thanks + {\LARGE \@title \par}% + \vskip 1.5em% + {\large + \lineskip .5em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par}% + \vskip 1em% + {\large \@date}% + \end{center}% + \par\vskip 1.5em} +\fi +% \end{macrocode} +% \end{macro} +% +% \subsubsection{概要} +% +% \begin{environment}{abstract} +% 要約文のための環境です。bookクラスでは使えません。 +% reportスタイルと、|titlepage|オプションを指定したarticleスタイルでは、 +% 独立したページに出力されます。 +% \begin{macrocode} +%<*article|report> +\if@titlepage + \newenvironment{abstract}{% + \titlepage + \null\vfil + \@beginparpenalty\@lowpenalty + \begin{center}% + {\bfseries\abstractname}% + \@endparpenalty\@M + \end{center}}% + {\par\vfil\null\endtitlepage} +\else + \newenvironment{abstract}{% + \if@twocolumn + \section*{\abstractname}% + \else + \small + \begin{center}% + {\bfseries\abstractname\vspace{-.5em}\vspace{\z@}}% + \end{center}% + \quotation + \fi}{\if@twocolumn\else\endquotation\fi} +\fi +% +% \end{macrocode} +% \end{environment} +% +% +% \subsection{章見出し} +% +% \subsection{マークコマンド} +% +% \begin{macro}{\chaptermark} +% \begin{macro}{\sectionmark} +% \begin{macro}{\subsectionmark} +% \begin{macro}{\subsubsectionmark} +% \begin{macro}{\paragraphmark} +% \begin{macro}{\subparagraphmark} +% |\...mark|コマンドを初期化します。これらのコマンドはページスタイルの +% 定義で使われます(第\ref{sec:pagestyle}節参照)。 +% これらのたいていのコマンドは\file{latex.dtx}ですでに定義されています。 +% \begin{macrocode} +%\newcommand*{\chaptermark}[1]{} +%\newcommand*{\sectionmark}[1]{} +%\newcommand*{\subsectionmark}[1]{} +%\newcommand*{\subsubsectionmark}[1]{} +%\newcommand*{\paragraph}[1]{} +%\newcommand*{\subparagraph}[1]{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsubsection{カウンタの定義} +% +% \begin{macro}{\c@secnumdepth} +% \Lcount{secnumdepth}には、番号を付ける、見出しコマンドのレベルを設定します。 +% \begin{macrocode} +%
\setcounter{secnumdepth}{3} +%\setcounter{secnumdepth}{2} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\c@chapter} +% \begin{macro}{\c@section} +% \begin{macro}{\c@subsection} +% \begin{macro}{\c@subsubsection} +% \begin{macro}{\c@paragraph} +% \begin{macro}{\c@subparagraph} +% これらのカウンタは見出し番号に使われます。 +% 最初の引数は、二番目の引数が増加するたびにリセットされます。 +% 二番目のカウンタはすでに定義されているものでなくてはいけません。 +% \begin{macrocode} +\newcounter{part} +%<*book|report> +\newcounter{chapter} +\newcounter{section}[chapter] +% +%
\newcounter{section} +\newcounter{subsection}[section] +\newcounter{subsubsection}[subsection] +\newcounter{paragraph}[subsubsection] +\newcounter{subparagraph}[paragraph] +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\thepart} +% \begin{macro}{\thechapter} +% \begin{macro}{\thesection} +% \begin{macro}{\thesubsection} +% \begin{macro}{\thesubsubsection} +% \begin{macro}{\theparagraph} +% \begin{macro}{\thesubparagraph} +% |\theCTR|が実際に出力される形式の定義です。 +% +% |\arabic{|\Lcount{COUNTER}|}|は、\Lcount{COUNTER}の値を +% 算用数字で出力します。 +% +% |\roman{|\Lcount{COUNTER}|}|は、\Lcount{COUNTER}の値を +% 小文字のローマ数字で出力します。 +% +% |\Roman{|\Lcount{COUNTER}|}|は、\Lcount{COUNTER}の値を +% 大文字のローマ数字で出力します。 +% +% |\alph{|\Lcount{COUNTER}|}|は、\Lcount{COUNTER}の値を +% $1=$~a, $2=$~b のようにして出力します。 +% +% |\Roman{|\Lcount{COUNTER}|}|は、\Lcount{COUNTER}の値を +% $1=$~A, $2=$~B のようにして出力します。 +% +% |\kansuji{|\Lcount{COUNTER}|}|は、\Lcount{COUNTER}の値を +% 漢数字で出力します。 +% +% |\rensuji{|\meta{obj}|}|は、\meta{obj}を横に並べて出力します。 +% したがって、横組のときには、何も影響しません。 +% +% \begin{macrocode} +%<*tate> +\renewcommand{\thepart}{\rensuji{\@Roman\c@part}} +%
\renewcommand{\thesection}{\rensuji{\@arabic\c@section}} +%<*report|book> +\renewcommand{\thechapter}{\rensuji{\@arabic\c@chapter}} +\renewcommand{\thesection}{\thechapter{}・\rensuji{\@arabic\c@section}} +% +\renewcommand{\thesubsection}{\thesection{}・\rensuji{\@arabic\c@subsection}} +\renewcommand{\thesubsubsection}{% + \thesubsection{}・\rensuji{\@arabic\c@subsubsection}} +\renewcommand{\theparagraph}{% + \thesubsubsection{}・\rensuji{\@arabic\c@paragraph}} +\renewcommand{\thesubparagraph}{% + \theparagraph{}・\rensuji{\@arabic\c@subparagraph}} +% +%<*yoko> +\renewcommand{\thepart}{\@Roman\c@part} +%
\renewcommand{\thesection}{\@arabic\c@section} +%<*report|book> +\renewcommand{\thechapter}{\@arabic\c@chapter} +\renewcommand{\thesection}{\thechapter.\@arabic\c@section} +% +\renewcommand{\thesubsection}{\thesection.\@arabic\c@subsection} +\renewcommand{\thesubsubsection}{% + \thesubsection.\@arabic\c@subsubsection} +\renewcommand{\theparagraph}{% + \thesubsubsection.\@arabic\c@paragraph} +\renewcommand{\thesubparagraph}{% + \theparagraph.\@arabic\c@subparagraph} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@chapapp} +% \begin{macro}{\@chappos} +% |\@chapapp|の初期値は`|\prechaptername|'です。 +% +% |\@chappos|の初期値は`|\postchaptername|'です。 +% +% |\appendix|コマンドは|\@chapapp|を`|\appendixname|'に、 +% |\@chappos|を空に再定義します。 +% \begin{macrocode} +%<*report|book> +\newcommand{\@chapapp}{\prechaptername} +\newcommand{\@chappos}{\postchaptername} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsubsection{前付け、本文、後付け} +% +% \begin{macro}{\frontmatter} +% \begin{macro}{\mainmatter} +% \begin{macro}{\backmatter} +% \changes{v1.1}{1997/01/15}{\cs{frontmatter}, \cs{mainmatter}, \cs{backmatter} +% を\LaTeX\ の定義に修正} +% 一冊の本は論理的に3つに分割されます。 +% 表題や目次や「はじめに」あるいは権利などの前付け、 +% そして本文、それから用語集や索引や奥付けなどの後付けです。 +% \begin{macrocode} +%<*book> +\newcommand\frontmatter{% + \if@openright \cleardoublepage \else \clearpage \fi + \@mainmatterfalse\pagenumbering{roman}} +\newcommand{\mainmatter}{% + \if@openright \cleardoublepage \else \clearpage \fi + \@mainmattertrue\pagenumbering{arabic}} +\newcommand{\backmatter}{% + \if@openright \cleardoublepage \else \clearpage \fi + \@mainmatterfalse} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsubsection{ボックスの組み立て} +% クラスファイル定義の、この部分では、|\@startsection|と|\secdef|の +% 二つの内部マクロを使います。これらの構文を次に示します。 +% +% |\@startsection|マクロは6つの引数と1つのオプション引数`*'を取ります。 +% +% |\@startsection|\meta{name}\meta{level}\meta{indent}^^A +% \meta{beforeskip}\meta{afterskip}\meta{style} +% optional *\\ +% \null\hphantom{\bslash @startsection}^^A +% |[|\meta{altheading}|]|\meta{heading} +% +% それぞれの引数の意味は、次のとおりです。 +% +% \begin{description} +% \item[\meta{name}] レベルコマンドの名前です(例:section)。 +% \item[\meta{level}] 見出しの深さを示す数値です(chapter=1, section=2, +% $\ldots$)。``\meta{level}$<=$カウンタ\Lcount{secnumdepth}の値''のとき、 +% 見出し番号が出力されます。 +% \item[\meta{indent}] 見出しに対する、左マージンからのインデント量です。 +% \item[\meta{beforeskip}] 見出しの上に置かれる空白の絶対値です。 +% 負の場合は、見出しに続くテキストのインデントを抑制します。 +% \item[\meta{afterskip}] 正のとき、見出しの後の垂直方向のスペースとなります。 +% 負の場合は、見出しの後の水平方向のスペースとなります。 +% \item[\meta{style}] 見出しのスタイルを設定するコマンドです。 +% \item[\meta{$*$}] 見出し番号を付けないとき、対応するカウンタは増加します。 +% \item[\meta{heading}] 新しい見出しの文字列です。 +% \end{description} +% +% 見出しコマンドは通常、|\@startsection|と6つの引数で定義されています。 +% +% |\secdef|マクロは、 +% 見出しコマンドを|\@startsection|を用いないで定義するときに使います。 +% このマクロは、2つの引数を持ちます。 +% +% |\secdef|\meta{unstarcmds}\meta{starcmds} +% +% \begin{description} +% \item[\meta{unstarcmds}] 見出しコマンドの普通の形式で使われます。 +% \item[\meta{starcmds}] $*$形式の見出しコマンドで使われます。 +% \end{description} +% +% |\secdef|は次のようにして使うことができます。 +% \begin{verbatim} +% \def\chapter {... \secdef \CMDA \CMDB } +% \def\CMDA [#1]#2{....} % \chapter[...]{...} の定義 +% \def\CMDB #1{....} % \chapter*{...} の定義 +% \end{verbatim} +% +% +% \subsubsection{partレベル} +% +% \begin{macro}{\part} +% このコマンドは、新しいパート(部)をはじめます。 +% +% articleクラスの場合は、簡単です。 +% +% 新しい段落を開始し、小さな空白を入れ、段落後のインデントをしないようにし、 +% |\secdef|で作成します。 +% \begin{macrocode} +%<*article> +\newcommand{\part}{\par\addvspace{4ex}% + \@afterindenttrue + \secdef\@part\@spart} +%
+% \end{macrocode} +% reportとbookスタイルの場合は、少し複雑です。 +% +% まず、右ページからはじまるように改ページをします。 +% そして、部扉のページスタイルを\pstyle{empty}にします。 +% 2段組の場合でも、1段組で作成しますが、後ほど2段組に戻すために、 +% |\@restonecol|スイッチを使います。 +% \changes{v1.1}{1997/01/15}{\cs{part}を\LaTeX\ の定義に修正} +% \begin{macrocode} +%<*report|book> +\newcommand{\part}{% + \if@openright \cleardoublepage \else \clearpage \fi + \thispagestyle{empty}% + \if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi + \null\vfil + \secdef\@part\@spart} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@part} +% このマクロが実際に部レベルの見出しを作成します。 +% このマクロも文書クラスによって定義が異なります。 +% +% articleクラスの場合は、\Lcount{secnumdepth}が$-1$よりも大きいとき、 +% 見出し番号を付けます。このカウンタが$-1$以下の場合には付けません。 +% \begin{macrocode} +%<*article> +\def\@part[#1]#2{% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{part}% + \addcontentsline{toc}{part}{% + \prepartname\thepart\postpartname\hspace{1zw}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + \markboth{}{}% + {\parindent\z@\raggedright + \interlinepenalty\@M\reset@font + \ifnum \c@secnumdepth >\m@ne + \Large\bfseries\prepartname\thepart\postpartname + \par\nobreak + \fi + \huge\bfseries#2\par}% + \nobreak\vskip3ex\@afterheading} +%
+% \end{macrocode} +% +% reportとbookクラスの場合は、\Lcount{secnumdepth}が$-2$よりも大きいときに、 +% 見出し番号を付けます。$-2$以下では付けません。 +% +% \begin{macrocode} +%<*report|book> +\def\@part[#1]#2{% + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{part}{% + \prepartname\thepart\postpartname\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + \markboth{}{}% + {\centering + \interlinepenalty\@M\reset@font + \ifnum \c@secnumdepth >-2\relax + \huge\bfseries\prepartname\thepart\postpartname + \par\vskip20\p@ + \fi + \Huge\bfseries#2\par}% + \@endpart} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@spart} +% このマクロは、番号を付けないときの体裁です。 +% \begin{macrocode} +%<*article> +\def\@spart#1{{% + \parindent\z@\raggedright + \interlinepenalty\@M\reset@font + \huge\bfseries#1\par}% + \nobreak\vskip3ex\@afterheading} +%
+% \end{macrocode} +% \changes{v1.1k}{1998/03/23}{reportとbookクラスで番号を付けない見出しの +% ペナルティが\cs{M@}だったのを\cs{@M}に修正} +% \begin{macrocode} +%<*report|book> +\def\@spart#1{{% + \centering + \interlinepenalty\@M\reset@font + \Huge\bfseries#1\par}% + \@endpart} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@endpart} +% |\@part|と|\@spart|の最後で実行されるマクロです。 +% 両面印刷モードのときは、白ページを追加します。 +% 二段組モードのときには、これ以降のページを二段組に戻します。 +% \begin{macrocode} +%<*report|book> +\def\@endpart{\vfil\newpage + \if@twoside\null\thispagestyle{empty}\newpage\fi +% \end{macrocode} +% 二段組文書のとき、スイッチを二段組モードに戻す必要があります。 +% \begin{macrocode} + \if@tempswa\twocolumn\fi} +% +% \end{macrocode} +% \end{macro} +% +% \subsubsection{chapterレベル} +% +% \begin{macro}{chapter} +% 章レベルは、必ずページの先頭から開始します。 +% |openright|オプションが指定されている場合は、右ページからはじまる +% ように|\cleardoublepage|を呼び出します。 +% そうでなければ、|\clearpage|を呼び出します。 +% なお、縦組の場合でも右ページからはじまるように、 +% フォーマットファイルで|\clerdoublepage|が定義されています。 +% +% 章見出しが出力されるページのスタイルは、\pstyle{jpl@in}になります。 +% \pstyle{jpl@in}は、\pstyle{headnomble}か\pstyle{footnomble}のいずれかです。 +% 詳細は、第\ref{sec:pagestyle}節を参照してください。 +% +% また、|\@topnum|をゼロにして、 +% 章見出しの上にトップフロートが置かれないようにしています。 +% \begin{macrocode} +%<*report|book> +\newcommand{\chapter}{% + \if@openright\cleardoublepage\else\clearpage\fi + \thispagestyle{jpl@in}% + \global\@topnum\z@ + \@afterindenttrue + \secdef\@chapter\@schapter} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@chapter} +% このマクロは、章見出しに番号を付けるときに呼び出されます。 +% \Lcount{secnumdepth}が$-1$よりも大きく、 +% |\@mainmatter|が真(bookクラスの場合)のときに、番号を出力します。 +% \begin{macrocode} +\def\@chapter[#1]#2{% + \ifnum \c@secnumdepth >\m@ne +% \if@mainmatter + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter\space\@chappos}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\@chapapp\thechapter\@chappos}#1}% +% \else\addcontentsline{toc}{chapter}{#1}\fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \@makechapterhead{#2}\@afterheading} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@makechapterhead} +% このマクロが実際に章見出しを組み立てます。 +% \changes{v1.1o}{1998/12/24}{secnumdepthカウンタを$-1$以下にすると、 +% 見出し文字列も消えてしまうのを修正} +% \changes{v1.2}{2001/09/04}{\cs{chapter}の出力位置がアスタリスク形式と +% そうでないときと違うのを修正(ありがとう、鈴木@津さん)} +% \begin{macrocode} +\def\@makechapterhead#1{\hbox{}% + \vskip2\Cvs + {\parindent\z@ + \raggedright + \reset@font\huge\bfseries + \leavevmode + \ifnum \c@secnumdepth >\m@ne + \setlength\@tempdima{\linewidth}% +% \if@mainmatter + \setbox\z@\hbox{\@chapapp\thechapter\@chappos\hskip1zw}% + \addtolength\@tempdima{-\wd\z@}% + \unhbox\z@\nobreak +% \fi + \vtop{\hsize\@tempdima#1}% + \else + #1\relax + \fi}\nobreak\vskip3\Cvs} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@schapter} +% このマクロは、章見出しに番号を付けないときに呼び出されます。 +% \begin{macrocode} +\def\@schapter#1{% +%
\if@twocolumn\@topnewpage[\@makeschapterhead{#1}]\else + \@makeschapterhead{#1}\@afterheading +%
\fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@makeschapterhead} +% 番号を付けない場合の形式です。 +% \changes{v1.2}{2001/09/04}{\cs{chapter}の出力位置がアスタリスク形式と +% そうでないときと違うのを修正(ありがとう、鈴木@津さん)} +% \begin{macrocode} +\def\@makeschapterhead#1{\hbox{}% + \vskip2\Cvs + {\parindent\z@ + \raggedright + \reset@font\huge\bfseries + \leavevmode + \setlength\@tempdima{\linewidth}% + \vtop{\hsize\@tempdima#1}}\vskip3\Cvs} +% +% \end{macrocode} +% \end{macro} +% +% \subsubsection{下位レベルの見出し} +% +% \begin{macro}{\section} +% 見出しの前後に空白を付け、|\Large\bfseries|で出力をします。 +% \begin{macrocode} +\newcommand{\section}{\@startsection{section}{1}{\z@}% + {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}% + {.5\Cvs \@plus.3\Cvs}% + {\reset@font\Large\bfseries}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\subsection} +% 見出しの前後に空白を付け、|\large\bfseries|で出力をします。 +% \begin{macrocode} +\newcommand{\subsection}{\@startsection{subsection}{2}{\z@}% + {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}% + {.5\Cvs \@plus.3\Cvs}% + {\reset@font\large\bfseries}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\subsubsection} +% 見出しの前後に空白を付け、|\normalsize\bfseries|で出力をします。 +% \begin{macrocode} +\newcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}% + {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}% + {.5\Cvs \@plus.3\Cvs}% + {\reset@font\normalsize\bfseries}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\paragraph} +% 見出しの前に空白を付け、|\normalsize\bfseries|で出力をします。 +% 見出しの後ろで改行されません。 +% \begin{macrocode} +\newcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}% + {3.25ex \@plus 1ex \@minus .2ex}% + {-1em}% + {\reset@font\normalsize\bfseries}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\subparagraph} +% 見出しの前に空白を付け、|\normalsize\bfseries|で出力をします。 +% 見出しの後ろで改行されません。 +% \begin{macrocode} +\newcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}% + {3.25ex \@plus 1ex \@minus .2ex}% + {-1em}% + {\reset@font\normalsize\bfseries}} +% \end{macrocode} +% \end{macro} +% +% +% \subsubsection{付録} +% +% \begin{macro}{\appendix} +% articleクラスの場合、|\appendix|コマンドは次のことを行ないます。 +% +% \begin{itemize} +% \item \Lcount{section}と\Lcount{subsection}カウンタをリセットする。 +% \item |\thesection|を英小文字で出力するように再定義する。 +% \end{itemize} +% +% \begin{macrocode} +%<*article> +\newcommand{\appendix}{\par + \setcounter{section}{0}% + \setcounter{subsection}{0}% +% \renewcommand{\thesection}{\rensuji{\@Alph\c@section}}} +% \renewcommand{\thesection}{\@Alph\c@section}} +%
+% \end{macrocode} +% +% reportとbookクラスの場合、|\appendix|コマンドは次のことを行ないます。 +% +% \begin{itemize} +% \item \Lcount{chapter}と\Lcount{section}カウンタをリセットする。 +% \item |\@chapapp|を|\appendixname|に設定する。 +% \item |\@chappos|を空にする。 +% \item |\thechapter|を英小文字で出力するように再定義する。 +% \end{itemize} +% +% \begin{macrocode} +%<*report|book> +\newcommand{\appendix}{\par + \setcounter{chapter}{0}% + \setcounter{section}{0}% + \renewcommand{\@chapapp}{\appendixname}% + \renewcommand{\@chappos}\space% +% \renewcommand{\thechapter}{\rensuji{\@Alph\c@chapter}}} +% \renewcommand{\thechapter}{\@Alph\c@chapter}} +% +% \end{macrocode} +% \end{macro} +% +% +% +% \subsection{リスト環境} +% ここではリスト環境について説明をしています。 +% +% リスト環境のデフォルトは次のように設定されます。 +% +% まず、|\rigtmargin|, |\listparindent|, |\itemindent|をゼロにします。 +% そして、K番目のレベルのリストは|\@listK|で示されるマクロが呼び出されます。 +% ここで`K'は小文字のローマ数字で示されます。たとえば、3番目のレベルのリスト +% として|\@listiii|が呼び出されます。 +% |\@listK|は|\leftmargin|を|\leftmarginK|に設定します。 +% +% \begin{macro}{\leftmargin} +% \begin{macro}{\leftmargini} +% \begin{macro}{\leftmarginii} +% \begin{macro}{\leftmarginiii} +% \begin{macro}{\leftmarginiv} +% \begin{macro}{\leftmarginv} +% \begin{macro}{\leftmarginvi} +% 二段組モードのマージンは少しだけ小さく設定してあります。 +% \begin{macrocode} +\if@twocolumn + \setlength\leftmargini {2em} +\else + \setlength\leftmargini {2.5em} +\fi +% \end{macrocode} +% 次の3つの値は、|\labelsep|とデフォルトラベル(`(m)', `vii.', `M.')の +% 幅の合計よりも大きくしてあります。 +% \begin{macrocode} +\setlength\leftmarginii {2.2em} +\setlength\leftmarginiii {1.87em} +\setlength\leftmarginiv {1.7em} +\if@twocolumn + \setlength\leftmarginv {.5em} + \setlength\leftmarginvi{.5em} +\else + \setlength\leftmarginv {1em} + \setlength\leftmarginvi{1em} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\labelsep} +% \begin{macro}{\labelwidth} +% |\labelsep|はラベルとテキストの項目の間の距離です。 +% |\labelwidth|はラベルの幅です。 +% \begin{macrocode} +\setlength \labelsep {.5em} +\setlength \labelwidth{\leftmargini} +\addtolength\labelwidth{-\labelsep} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@beginparpenalty} +% \begin{macro}{\@endparpenalty} +% これらのペナルティは、リストや段落環境の前後に挿入されます。 +% \begin{macro}{\@itempenalty} +% このペナルティは、リスト項目の間に挿入されます。 +% \begin{macrocode} +\@beginparpenalty -\@lowpenalty +\@endparpenalty -\@lowpenalty +\@itempenalty -\@lowpenalty +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\partopsep} +% リスト環境の前に空行がある場合、|\parskip|と|\topsep|に|\partopsep|が +% 加えられた値の縦方向の空白が取られます。 +% \begin{macrocode} +%<10pt>\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@} +%<11pt>\setlength\partopsep{3\p@ \@plus 1\p@ \@minus 1\p@} +%<12pt>\setlength\partopsep{3\p@ \@plus 2\p@ \@minus 2\p@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@listi} +% \begin{macro}{\@listI} +% |\@listi|は、|\leftmargin|, |\parsep|, |\topsep|, |\itemsep|などの +% トップレベルの定義をします。 +% この定義は、フォントサイズコマンドによって変更されます(たとえば、 +% |\small|の中では``小さい''リストパラメータになります)。 +% +% このため、|\normalsize|がすべてのパラメータを戻せるように、 +% |\@listI|は|\@listi|のコピーを保存するように定義されています。 +% \begin{macrocode} +%<*10pt|11pt|12pt> +\def\@listi{\leftmargin\leftmargini +%<*10pt> + \parsep 4\p@ \@plus2\p@ \@minus\p@ + \topsep 8\p@ \@plus2\p@ \@minus4\p@ + \itemsep4\p@ \@plus2\p@ \@minus\p@} +% +%<*11pt> + \parsep 4.5\p@ \@plus2\p@ \@minus\p@ + \topsep 9\p@ \@plus3\p@ \@minus5\p@ + \itemsep4.5\p@ \@plus2\p@ \@minus\p@} +% +%<*12pt> + \parsep 5\p@ \@plus2.5\p@ \@minus\p@ + \topsep 10\p@ \@plus4\p@ \@minus6\p@ + \itemsep5\p@ \@plus2.5\p@ \@minus\p@} +% +\let\@listI\@listi +% \end{macrocode} +% ここで、パラメータを初期化しますが、厳密には必要ありません。 +% \begin{macrocode} +\@listi +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@listii} +% \begin{macro}{\@listiii} +% \begin{macro}{\@listiv} +% \begin{macro}{\@listv} +% \begin{macro}{\@listvi} +% 下位レベルのリスト環境のパラメータの設定です。 +% これらは保存用のバージョンを持たないことと、 +% フォントサイズコマンドによって変更されないことに注意をしてください。 +% 言い換えれば、このクラスは、本文サイズが +% |\normalsize|で現れるリストの入れ子についてだけ考えています。 +% \begin{macrocode} +\def\@listii{\leftmargin\leftmarginii + \labelwidth\leftmarginii \advance\labelwidth-\labelsep +%<*10pt> + \topsep 4\p@ \@plus2\p@ \@minus\p@ + \parsep 2\p@ \@plus\p@ \@minus\p@ +% +%<*11pt> + \topsep 4.5\p@ \@plus2\p@ \@minus\p@ + \parsep 2\p@ \@plus\p@ \@minus\p@ +% +%<*12pt> + \topsep 5\p@ \@plus2.5\p@ \@minus\p@ + \parsep 2.5\p@ \@plus\p@ \@minus\p@ +% + \itemsep\parsep} +\def\@listiii{\leftmargin\leftmarginiii + \labelwidth\leftmarginiii \advance\labelwidth-\labelsep +%<10pt> \topsep 2\p@ \@plus\p@\@minus\p@ +%<11pt> \topsep 2\p@ \@plus\p@\@minus\p@ +%<12pt> \topsep 2.5\p@\@plus\p@\@minus\p@ + \parsep\z@ + \partopsep \p@ \@plus\z@ \@minus\p@ + \itemsep\topsep} +\def\@listiv {\leftmargin\leftmarginiv + \labelwidth\leftmarginiv + \advance\labelwidth-\labelsep} +\def\@listv {\leftmargin\leftmarginv + \labelwidth\leftmarginv + \advance\labelwidth-\labelsep} +\def\@listvi {\leftmargin\leftmarginvi + \labelwidth\leftmarginvi + \advance\labelwidth-\labelsep} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \subsubsection{enumerate環境} +% enumerate環境は、カウンタ\Lcount{enumi}, \Lcount{enumii}, \Lcount{enumiii}, +% \Lcount{enumiv}を使います。\Lcount{enumN}はN番目のレベルの番号を制御します。 +% +% \begin{macro}{\theenumi} +% \begin{macro}{\theenumii} +% \begin{macro}{\theenumiii} +% \begin{macro}{\theenumiv} +% 出力する番号の書式を設定します。 +% これらは、すでに\file{ltlists.dtx}で定義されています。 +% \begin{macrocode} +%<*article|report|book> +%<*tate> +\renewcommand{\theenumi}{\rensuji{\@arabic\c@enumi}} +\renewcommand{\theenumii}{\rensuji{(\@alph\c@enumii)}} +\renewcommand{\theenumiii}{\rensuji{\@roman\c@enumiii}} +\renewcommand{\theenumiv}{\rensuji{\@Alph\c@enumiv}} +% +%<*yoko> +\renewcommand{\theenumi}{\@arabic\c@enumi} +\renewcommand{\theenumii}{\@alph\c@enumii} +\renewcommand{\theenumiii}{\@roman\c@enumiii} +\renewcommand{\theenumiv}{\@Alph\c@enumiv} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\labelenumi} +% \begin{macro}{\labelenumii} +% \begin{macro}{\labelenumiii} +% \begin{macro}{\labelenumiv} +% enumerate環境のそれぞれの項目のラベルは、 +% |\labelenumi| \ldots\ |\labelenumiv|で生成されます。 +% \begin{macrocode} +%<*tate> +\newcommand{\labelenumi}{\theenumi} +\newcommand{\labelenumii}{\theenumii} +\newcommand{\labelenumiii}{\theenumiii} +\newcommand{\labelenumiv}{\theenumiv} +% +%<*yoko> +\newcommand{\labelenumi}{\theenumi.} +\newcommand{\labelenumii}{(\theenumii)} +\newcommand{\labelenumiii}{\theenumiii.} +\newcommand{\labelenumiv}{\theenumiv.} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\p@enumii} +% \begin{macro}{\p@enumiii} +% \begin{macro}{\p@enumiv} +% |\ref|コマンドによって、 +% enumerate環境のN番目のリスト項目が参照されるときの書式です。 +% \begin{macrocode} +\renewcommand{\p@enumii}{\theenumi} +\renewcommand{\p@enumiii}{\theenumi(\theenumii)} +\renewcommand{\p@enumiv}{\p@enumiii\theenumiii} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{environment}{enumerate} +% \changes{v1.1q}{1999/05/18}{縦組時のみに設定するようにした} +% トップレベルで使われたときに、最初と最後に半行分のスペースを開けるように、 +% 変更します。この環境は、\file{ltlists.dtx}で定義されています。 +% +% \begin{macrocode} +\renewenvironment{enumerate} + {\ifnum \@enumdepth >\thr@@\@toodeep\else + \advance\@enumdepth\@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth}% + \list{\csname label\@enumctr\endcsname}{% + \iftdir + \ifnum \@listdepth=\@ne \topsep.5\normalbaselineskip + \else\topsep\z@\fi + \parskip\z@ \itemsep\z@ \parsep\z@ + \labelwidth1zw \labelsep.3zw + \ifnum \@enumdepth=\@ne \leftmargin1zw\relax + \else\leftmargin\leftskip\fi + \advance\leftmargin 1zw + \fi + \usecounter{\@enumctr}% + \def\makelabel##1{\hss\llap{##1}}}% + \fi}{\endlist} +% \end{macrocode} +% \end{environment} +% +% +% \subsubsection{itemize環境} +% +% \begin{macro}{\labelitemi} +% \begin{macro}{\labelitemii} +% \begin{macro}{\labelitemiii} +% \begin{macro}{\labelitemiv} +% itemize環境のそれぞれの項目のラベルは、 +% |\labelenumi| \ldots\ |\labelenumiv|で生成されます。 +% \changes{v1.1a}{1997/01/28}{Bug fix: \cs{labelitemii}.} +% \begin{macrocode} +\newcommand{\labelitemi}{\textbullet} +\newcommand{\labelitemii}{% + \iftdir + {\textcircled{~}} + \else + {\normalfont\bfseries\textendash} + \fi +} +\newcommand{\labelitemiii}{\textasteriskcentered} +\newcommand{\labelitemiv}{\textperiodcentered} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{environment}{itemize} +% \changes{v1.0e}{1996/03/14}{縦組時のみに設定するようにした} +% トップレベルで使われたときに、最初と最後に半行分のスペースを開けるように、 +% 変更します。この環境は、\file{ltlists.dtx}で定義されています。 +% \begin{macrocode} +\renewenvironment{itemize} + {\ifnum \@itemdepth >\thr@@\@toodeep\else + \advance\@itemdepth\@ne + \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% + \expandafter + \list{\csname \@itemitem\endcsname}{% + \iftdir + \ifnum \@listdepth=\@ne \topsep.5\normalbaselineskip + \else\topsep\z@\fi + \parskip\z@ \itemsep\z@ \parsep\z@ + \labelwidth1zw \labelsep.3zw + \ifnum \@itemdepth =\@ne \leftmargin1zw\relax + \else\leftmargin\leftskip\fi + \advance\leftmargin 1zw + \fi + \def\makelabel##1{\hss\llap{##1}}}% + \fi}{\endlist} +% \end{macrocode} +% \end{environment} +% +% +% \subsubsection{description環境} +% +% \begin{environment}{description} +% \changes{v1.0e}{1996/03/14}{\cs{topskip}や\cs{parkip}などの値を縦組時のみに +% 設定するようにした} +% description環境を定義します。 +% 縦組時には、インデントが3字分だけ深くなります。 +% \begin{macrocode} +\newenvironment{description} + {\list{}{\labelwidth\z@ \itemindent-\leftmargin + \iftdir + \leftmargin\leftskip \advance\leftmargin3\Cwd + \rightmargin\rightskip + \labelsep=1zw \itemsep\z@ + \listparindent\z@ \topskip\z@ \parskip\z@ \partopsep\z@ + \fi + \let\makelabel\descriptionlabel}}{\endlist} +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\descriptionlabel} +% ラベルの形式を変更する必要がある場合は、|\descriptionlabel|を +% 再定義してください。 +% \begin{macrocode} +\newcommand{\descriptionlabel}[1]{% + \hspace\labelsep\normalfont\bfseries #1} +% \end{macrocode} +% \end{macro} +% +% +% \subsubsection{verse環境} +% +% \begin{environment}{verse} +% verse環境は、リスト環境のパラメータを使って定義されています。 +% 改行をするには|\\|を用います。|\\|は|\@centercr|に|\let|されています。 +% \begin{macrocode} +\newenvironment{verse} + {\let\\\@centercr + \list{}{\itemsep\z@ \itemindent -1.5em% + \listparindent\itemindent + \rightmargin\leftmargin \advance\leftmargin 1.5em}% + \item\relax}{\endlist} +% \end{macrocode} +% \end{environment} +% +% \subsubsection{quotation環境} +% +% \begin{environment}{quotation} +% quotation環境もまた、list環境のパラメータを使用して定義されています。 +% この環境の各行は、|\textwidth|よりも小さく設定されています。 +% この環境における、段落の最初の行はインデントされます。 +% \begin{macrocode} +\newenvironment{quotation} + {\list{}{\listparindent 1.5em% + \itemindent\listparindent + \rightmargin\leftmargin + \parsep\z@ \@plus\p@}% + \item\relax}{\endlist} +% \end{macrocode} +% \end{environment} +% +% \subsubsection{quote環境} +% +% \begin{environment}{quote} +% quote環境は、段落がインデントされないことを除き、quotation環境と同じです。 +% \begin{macrocode} +\newenvironment{quote} + {\list{}{\rightmargin\leftmargin}% + \item\relax}{\endlist} +% \end{macrocode} +% \end{environment} +% +% +% +% \subsection{フロート} +% +% \file{ltfloat.dtx}では、フロートオブジェクトを操作するためのツールしか +% 定義していません。タイプが\texttt{TYPE}のフロートオブジェクトを +% 扱うマクロを定義するには、次の変数が必要です。 +% +% \begin{description} +% \item[\texttt{\bslash fps@TYPE}] +% タイプ\texttt{TYPE}のフロートを置くデフォルトの位置です。 +% +% \item[\texttt{\bslash ftype@TYPE}] +% タイプ\texttt{TYPE}のフロートの番号です。 +% 各\texttt{TYPE}には、一意な、2の倍数の\texttt{TYPE}番号を割り当てます。 +% たとえば、図が番号1ならば、表は2です。次のタイプは4となります。 +% +% \item[\texttt{\bslash ext@TYPE}] +% タイプ\texttt{TYPE}のフロートの目次を出力するファイルの拡張子です。 +% たとえば、|\ext@figure|は`lot'です。 +% +% \item[\texttt{\bslash fnum@TYPE}] +% キャプション用の図番号を生成するマクロです。 +% たとえば、|\fnum@figure|は`図|\thefigure|'を作ります。 +% \end{description} +% +% \subsubsection{figure環境} +% ここでは、figure環境を実装しています。 +% +% \begin{macro}{\c@figure} +% \begin{macro}{\thefigure} +% 図番号です。 +% \begin{macrocode} +%
\newcounter{figure} +%\newcounter{figure}[chapter] +%<*tate> +%
\renewcommand{\thefigure}{\rensuji{\@arabic\c@figure}} +% \end{macrocode} +% \changes{v1.1d}{1997/02/14}{\cs{ifnum}文の構文エラーを訂正。} +% \begin{macrocode} +%<*report|book> +\renewcommand{\thefigure}{% + \ifnum\c@chapter>\z@\thechapter{}・\fi\rensuji{\@arabic\c@figure}} +% +% +%<*yoko> +%
\renewcommand{\thefigure}{\@arabic\c@figure} +%<*report|book> +\renewcommand{\thefigure}{% + \ifnum\c@chapter>\z@\thechapter.\fi\@arabic\c@figure} +% +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\fps@figure} +% \begin{macro}{\ftype@figure} +% \begin{macro}{\ext@figure} +% \begin{macro}{\fnum@figure} +% フロートオブジェクトタイプ``figure''のためのパラメータです。 +% \begin{macrocode} +\def\fps@figure{tbp} +\def\ftype@figure{1} +\def\ext@figure{lof} +%\def\fnum@figure{\figurename\thefigure} +%\def\fnum@figure{\figurename~\thefigure} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{environment}{figure} +% \begin{environment}{figure*} +% |*|形式は2段抜きのフロートとなります。 +% \begin{macrocode} +\newenvironment{figure} + {\@float{figure}} + {\end@float} +\newenvironment{figure*} + {\@dblfloat{figure}} + {\end@dblfloat} +% \end{macrocode} +% \end{environment} +% \end{environment} +% +% \subsubsection{table環境} +% ここでは、table環境を実装しています。 +% +% \begin{macro}{\c@table} +% \begin{macro}{\thetable} +% \changes{v1.1n}{1998/10/13} +% {report, bookクラスでchapterカウンタを考慮していなかったのを修正。 +% ありがとう、平川@慶應大さん。} +% 表番号です。 +% \begin{macrocode} +%
\newcounter{table} +%\newcounter{table}[chapter] +%<*tate> +%
\renewcommand{\thetable}{\rensuji{\@arabic\c@table}} +%<*report|book> +\renewcommand{\thetable}{% + \ifnum\c@chapter>\z@\thechapter{}・\fi\rensuji{\@arabic\c@table}} +% +% +%<*yoko> +%
\renewcommand{\thetable}{\@arabic\c@table} +%<*report|book> +\renewcommand{\thetable}{% + \ifnum\c@chapter>\z@\thechapter.\fi\@arabic\c@table} +% +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\fps@table} +% \begin{macro}{\ftype@table} +% \begin{macro}{\ext@table} +% \begin{macro}{\fnum@table} +% フロートオブジェクトタイプ``table''のためのパラメータです。 +% \begin{macrocode} +\def\fps@table{tbp} +\def\ftype@table{2} +\def\ext@table{lot} +%\def\fnum@table{\tablename\thetable} +%\def\fnum@table{\tablename~\thetable} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{environment}{table} +% \begin{environment}{table*} +% |*|形式は2段抜きのフロートとなります。 +% \begin{macrocode} +\newenvironment{table} + {\@float{table}} + {\end@float} +\newenvironment{table*} + {\@dblfloat{table}} + {\end@dblfloat} +% \end{macrocode} +% \end{environment} +% \end{environment} +% +% \subsection{キャプション} +% +% \begin{macro}{\@makecaption} +% |\caption|コマンドは、キャプションを組み立てるために|\@mkcaption|を呼出ます。 +% このコマンドは二つの引数を取ります。 +% 一つは、\meta{number}で、フロートオブジェクトの番号です。 +% もう一つは、\meta{text}でキャプション文字列です。 +% \meta{number}には通常、`図 3.2'のような文字列が入っています。 +% このマクロは、|\parbox|の中で呼び出されます。書体は|\normalsize|です。 +% +% \begin{macro}{\abovecaptionskip} +% \begin{macro}{\belowcaptionskip} +% これらの長さはキャプションの前後に挿入されるスペースです。 +% \begin{macrocode} +\newlength\abovecaptionskip +\newlength\belowcaptionskip +\setlength\abovecaptionskip{10\p@} +\setlength\belowcaptionskip{0\p@} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% キャプション内で複数の段落を作成することができるように、 +% このマクロは|\long|で定義をします。 +% \begin{macrocode} +\long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \iftdir\sbox\@tempboxa{#1\hskip1zw#2}% + \else\sbox\@tempboxa{#1: #2}% + \fi + \ifdim \wd\@tempboxa >\hsize + \iftdir #1\hskip1zw#2\relax\par + \else #1: #2\relax\par\fi + \else + \global \@minipagefalse + \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip} +% \end{macrocode} +% \end{macro} +% +% \subsection{コマンドパラメータの設定} +% +% \subsubsection{arrayとtabular環境} +% +% \begin{macro}{\arraycolsep} +% array環境のカラムは2|\arraycolsep|で分離されます。 +% \begin{macrocode} +\setlength\arraycolsep{5\p@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tabcolsep} +% tabular環境のカラムは2|\tabcolsep|で分離されます。 +% \begin{macrocode} +\setlength\tabcolsep{6\p@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\arrayrulewidth} +% arrayとtabular環境内の罫線の幅です。 +% \begin{macrocode} +\setlength\arrayrulewidth{.4\p@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\doublerulesep} +% arrayとtabular環境内の罫線間を調整する空白です。 +% \begin{macrocode} +\setlength\doublerulesep{2\p@} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{tabbing環境} +% +% \begin{macro}{\tabbingsep} +% |\'|コマンドで置かれるスペースを制御します。 +% \begin{macrocode} +\setlength\tabbingsep{\labelsep} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{minipage環境} +% +% \begin{macro}{\@mpfootins} +% minipageにも脚注を付けることができます。 +% |\skip||\@mpfootins|は、通常の|\skip||\footins|と同じような動作をします。 +% \begin{macrocode} +\skip\@mpfootins = \skip\footins +% \end{macrocode} +% \end{macro} +% +% \subsubsection{framebox環境} +% +% \begin{macro}{\fboxsep} +% \begin{macro}{\fboxrule} +% |\fboxsep|は、|\fbox|と|\framebox|での、 +% テキストとボックスの間に入る空白です。 +% |\fboxrule|は|\fbox|と|\framebox|で作成される罫線の幅です。 +% \begin{macrocode} +\setlength\fboxsep{3\p@} +\setlength\fboxrule{.4\p@} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsubsection{equationとeqnarray環境} +% +% \begin{macro}{\theequation} +% equationカウンタは、新しい章の開始でリセットされます。 +% また、equation番号には、章番号が付きます。 +% +% このコードは|\chapter|定義の後、より正確にはchapterカウンタの定義の後、 +% でなくてはいけません。 +% \begin{macrocode} +%
\renewcommand{\theequation}{\@arabic\c@equation} +%<*report|book> +\@addtoreset{equation}{chapter} +\renewcommand{\theequation}{% + \ifnum\c@chapter>\z@\thechapter.\fi \@arabic\c@equation} +% +% \end{macrocode} +% \end{macro} +% +% +% \section{フォントコマンド} +% |disablejfam|オプションが指定されていない場合には、以下の設定がなさ +% れます。 +% まず、数式内に日本語を直接、記述するために数式記号用文字に +% ``JY2/mc/m/n''を登録します。数式バージョンがboldの場合は、 +% ``JY2/gt/m/n''を用います。 +% これらは、|\mathmc|, |\mathgt|として登録されます。 +% また、日本語数式ファミリとして|\symmincho|がこの段階で設定されます。 +% |mathrmmc|オプションが指定されていた場合には、これに引き続き +% |\mathrm|と|\mathbf|を和欧文両対応にするための作業がなされます。この際、 +% 他のマクロとの衝突を避けるため|\AtBeginDocument| +% を用いて展開順序を遅らせる必要があります。 +% +% |disablejfam|オプションが指定されていた場合には、 +% |\mathmc|と|\mathgt|に対してエラーを出すだけのダミーの定義を +% 与える設定のみが行われます。 +% +% \textbf{変更} +% +% \changes{v1.6}{2006/06/27}{フォントコマンドを修正。ありがとう、ymtさん。} +% p\LaTeX{} 2.09 +% compatibility mode では和文数式フォントfam が2重定義されていた +% ので、その部分を変更しました。 +% \begin{macrocode} +\if@enablejfam + \if@compatibility\else + \DeclareSymbolFont{mincho}{JY2}{mc}{m}{n} + \DeclareSymbolFontAlphabet{\mathmc}{mincho} + \SetSymbolFont{mincho}{bold}{JY2}{gt}{m}{n} + \jfam\symmincho + \DeclareMathAlphabet{\mathgt}{JY2}{gt}{m}{n} + \fi + \if@mathrmmc + \AtBeginDocument{% + \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc} + \reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt} + }% + \fi +\else + \DeclareRobustCommand{\mathmc}{% + \@latex@error{Command \noexpand\mathmc invalid with\space + `disablejfam' class option.}\@eha + } + \DeclareRobustCommand{\mathgt}{% + \@latex@error{Command \noexpand\mathgt invalid with\space + `disablejfam' class option.}\@eha + } +\fi +% \end{macrocode} +% +% ここでは\LaTeX~2.09で一般的に使われていたコマンドを定義しています。 +% これらのコマンドはテキストモードと数式モードの\emph{どちらでも}動作します。 +% これらは互換性のために提供をしますが、できるだけ|\text...|と|\math...|を +% 使うようにしてください。 +% +% \begin{macro}{\mc} +% \begin{macro}{\gt} +% \begin{macro}{\rm} +% \begin{macro}{\sf} +% \begin{macro}{\tt} +% これらのコマンドはフォントファミリを変更します。 +% 互換モードの同名コマンドと異なり、すべてのコマンドがデフォルトフォントに +% リセットしてから、対応する属性を変更することに注意してください。 +% \begin{macrocode} +\DeclareOldFontCommand{\mc}{\normalfont\mcfamily}{\mathmc} +\DeclareOldFontCommand{\gt}{\normalfont\gtfamily}{\mathgt} +\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} +\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} +\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\bf} +% このコマンドはボールド書体にします。ノーマル書体に変更するには、 +% |\mdseries|と指定をします。 +% \begin{macrocode} +\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\it} +% \begin{macro}{\sl} +% \begin{macro}{\sc} +% これらのコマンドはフォントシェイプを切替えます。 +% スラント体とスモールキャップの数式アルファベットはありませんので、 +% 数式モードでは何もしませんが、警告メッセージを出力します。 +% |\upshape|コマンドで通常のシェイプにすることができます。 +% \begin{macrocode} +\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} +\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} +\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\cal} +% \begin{macro}{\mit} +% これらのコマンドは数式モードでだけ使うことができます。 +% 数式モード以外では何もしません。 +% 現在のNFSSは、これらのコマンドが警告を生成するように定義していますので、 +% `手ずから'定義する必要があります。 +% \begin{macrocode} +\DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal} +\DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% +% \section{相互参照} +% +% \subsection{目次} +% |\section|コマンドは、\file{.toc}ファイルに、次のような行を出力します。 +% +% |\contentsline{section}{|\meta{title}|}{|\meta{page}|}| +% +% \meta{title}には項目が、\meta{page}にはページ番号が入ります。 +% |\section|に見出し番号が付く場合は、\meta{title}は、 +% |\numberline{|\meta{num}|}{|\meta{heading}|}|となります。 +% \meta{num}は|\thesection|コマンドで生成された見出し番号です。 +% \meta{heading}は見出し文字列です。この他の見出しコマンドも同様です。 +% +% figure環境での|\caption|コマンドは、\file{.lof}ファイルに、 +% 次のような行を出力します。 +% +% |\contentsline{figure}{\numberline{|\meta{num}|}{|% +% \meta{caption}|}}{|\meta{page}|}| +% +% \meta{num}は、|\thefigure|コマンドで生成された図番号です。 +% \meta{caption}は、キャプション文字列です。table環境も同様です。 +% +% |\contentsline{|\meta{name}|}|コマンドは、|\l@|\meta{name}に展開されます。 +% したがって、目次の体裁を記述するには、|\l@chapter|, |\l@section|などを +% 定義します。図目次のためには|\l@figure|です。 +% これらの多くのコマンドは|\@dottedtocline|コマンドで定義されています。 +% このコマンドは次のような書式となっています。 +% +% |\@dottedtocline{|\meta{level}|}{|\meta{indent}|}{|^^A +% \meta{numwidth}|}{|\meta{title}|}{|\meta{page}|}| +% +% \begin{description} +% \item[\meta{level}] ``\meta{level} $<=$ \Lcount{tocdepth}''のときにだけ、 +% 生成されます。|\chapter|はレベル0、|\section|はレベル1、$\ldots$ です。 +% \item[\meta{indent}] 一番外側からの左マージンです。 +% \item[\meta{numwidth}] 見出し番号(|\numberline|コマンドの\meta{num})が +% 入るボックスの幅です。 +% \end{description} +% +% \begin{macro}{\c@tocdepth} +% \Lcount{tocdepth}は、目次ページに出力をする見出しレベルです。 +% \begin{macrocode} +%
\setcounter{tocdepth}{3} +%\setcounter{tocdepth}{2} +% \end{macrocode} +% \end{macro} +% +% また、目次を生成するために次のパラメータも使います。 +% +% \begin{macro}{\@pnumwidth} +% ページ番号の入るボックスの幅です。 +% \begin{macrocode} +\newcommand{\@pnumwidth}{1.55em} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@tocmarg} +% 複数行にわたる場合の右マージンです。 +% \begin{macrocode} +\newcommand{\@tocrmarg}{2.55em} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@dotsep} +% ドットの間隔(mu単位)です。2や1.7のように指定をします。 +% \begin{macrocode} +\newcommand{\@dotsep}{4.5} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\toclineskip} +% この長さ変数は、目次項目の間に入るスペースの長さです。 +% デフォルトはゼロとなっています。縦組のとき、スペースを少し広げます。 +% \begin{macrocode} +\newdimen\toclineskip +%\setlength\toclineskip{\z@} +%\setlength\toclineskip{2\p@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\numberline} +% \begin{macro}{\@lnumwidth} +% |\numberline|マクロの定義を示します。オリジナルの定義では、ボックスの幅を +% |\@tempdima|にしていますが、この変数はいろいろな箇所で使われますので、 +% 期待した値が入らない場合があります。 +% +% たとえば、p\LaTeXe{}での|\selectfont|は、和欧文のベースラインを調整する +% ために|\@tempdima|変数を用いています。そのため、|\l@...|マクロの中で +% フォントを切替えると、|\numberline|マクロのボックス +% の幅が、ベースラインを調整するときに計算した値になってしまいます。 +% +% フォント選択コマンドの後、あるいは|\numberline|マクロの中でフォントを +% 切替えてもよいのですが、一時変数を意識したくないので、 +% 見出し番号の入るボックスを|\@lnumwidth|変数を用いて組み立てるように +% |\numberline|マクロを再定義します。 +% \begin{macrocode} +\newdimen\@lnumwidth +\def\numberline#1{\hbox to\@lnumwidth{#1\hfil}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@dottedtocline} +% 目次の各行間に|\toclineskip|を入れるように変更します。 +% このマクロは\file{ltsect.dtx}で定義されています。 +% \changes{v1.3}{2001/10/04}{第5引数の書体を\cs{rmfamily}から\cs{normalfont}に変更} +% \begin{macrocode} +\def\@dottedtocline#1#2#3#4#5{% + \ifnum #1>\c@tocdepth \else + \vskip\toclineskip \@plus.2\p@ + {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip + \parindent #2\relax\@afterindenttrue + \interlinepenalty\@M + \leavevmode + \@lnumwidth #3\relax + \advance\leftskip \@lnumwidth \hbox{}\hskip -\leftskip + {#4}\nobreak + \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}% + \hfill\nobreak + \hb@xt@\@pnumwidth{\hss\normalfont \normalcolor #5}% + \par}% + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\addcontentsline} +% ページ番号を|\rensuji|で囲むように変更します。 +% 横組のときにも`|\rensuji|'コマンドが出力されますが、 +% このコマンドによる影響はありません。 +% +% このマクロは\file{ltsect.dtx}で定義されています。 +% \begin{macrocode} +\def\addcontentsline#1#2#3{% + \protected@write\@auxout + {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble +%\@temptokena{\rensuji{\thepage}}}% +%\@temptokena{\thepage}}% + {\string\@writefile{#1}% + {\protect\contentsline{#2}{#3}{\the\@temptokena}}}% +} +% \end{macrocode} +% \end{macro} +% +% +% \subsubsection{本文目次} +% +% \begin{macro}{\tableofcontents} +% 目次を生成します。 +% \begin{macrocode} +\newcommand{\tableofcontents}{% +%<*report|book> + \if@twocolumn\@restonecoltrue\onecolumn + \else\@restonecolfalse\fi +% +%
\section*{\contentsname +% \chapter*{\contentsname + \@mkboth{\contentsname}{\contentsname}% + }\@starttoc{toc}% +% \if@restonecol\twocolumn\fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\l@part} +% partレベルの目次です。 +% \begin{macrocode} +\newcommand*{\l@part}[2]{% + \ifnum \c@tocdepth >-2\relax +%
\addpenalty{\@secpenalty}% +% \addpenalty{-\@highpenalty}% + \addvspace{2.25em \@plus\p@}% + \begingroup + \parindent\z@\rightskip\@pnumwidth + \parfillskip-\@pnumwidth + {\leavevmode\large\bfseries + \setlength\@lnumwidth{4zw}% + #1\hfil\nobreak + \hbox to\@pnumwidth{\hss#2}}\par + \nobreak +%
\if@compatibility + \global\@nobreaktrue + \everypar{\global\@nobreakfalse\everypar{}}% +%
\fi + \endgroup + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\l@chapter} +% chapterレベルの目次です。 +% \begin{macrocode} +%<*report|book> +\newcommand*{\l@chapter}[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \addvspace{1.0em \@plus\p@}% + \begingroup + \parindent\z@ \rightskip\@pnumwidth \parfillskip-\rightskip + \leavevmode\bfseries + \setlength\@lnumwidth{4zw}% + \advance\leftskip\@lnumwidth \hskip-\leftskip + #1\nobreak\hfil\nobreak\hbox to\@pnumwidth{\hss#2}\par + \penalty\@highpenalty + \endgroup + \fi} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\l@section} +% sectionレベルの目次です。 +% \begin{macrocode} +%<*article> +\newcommand*{\l@section}[2]{% + \ifnum \c@tocdepth >\z@ + \addpenalty{\@secpenalty}% + \addvspace{1.0em \@plus\p@}% + \begingroup + \parindent\z@ \rightskip\@pnumwidth \parfillskip-\rightskip + \leavevmode\bfseries + \setlength\@lnumwidth{1.5em}% + \advance\leftskip\@lnumwidth \hskip-\leftskip + #1\nobreak\hfil\nobreak\hbox to\@pnumwidth{\hss#2}\par + \endgroup + \fi} +%
+% \end{macrocode} +% +% \begin{macrocode} +%<*report|book> +%\newcommand*{\l@section}{\@dottedtocline{1}{1zw}{4zw}} +%\newcommand*{\l@section}{\@dottedtocline{1}{1.5em}{2.3em}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\l@subsection} +% \begin{macro}{\l@subsubsection} +% \begin{macro}{\l@paragraph} +% \begin{macro}{\l@subparagraph} +% 下位レベルの目次項目の体裁です。 +% \begin{macrocode} +%<*tate> +%<*article> +\newcommand*{\l@subsection} {\@dottedtocline{2}{1zw}{4zw}} +\newcommand*{\l@subsubsection}{\@dottedtocline{3}{2zw}{6zw}} +\newcommand*{\l@paragraph} {\@dottedtocline{4}{3zw}{8zw}} +\newcommand*{\l@subparagraph} {\@dottedtocline{5}{4zw}{9zw}} +%
+%<*report|book> +\newcommand*{\l@subsection} {\@dottedtocline{2}{2zw}{6zw}} +\newcommand*{\l@subsubsection}{\@dottedtocline{3}{3zw}{8zw}} +\newcommand*{\l@paragraph} {\@dottedtocline{4}{4zw}{9zw}} +\newcommand*{\l@subparagraph} {\@dottedtocline{5}{5zw}{10zw}} +% +% +%<*yoko> +%<*article> +\newcommand*{\l@subsection} {\@dottedtocline{2}{1.5em}{2.3em}} +\newcommand*{\l@subsubsection}{\@dottedtocline{3}{3.8em}{3.2em}} +\newcommand*{\l@paragraph} {\@dottedtocline{4}{7.0em}{4.1em}} +\newcommand*{\l@subparagraph} {\@dottedtocline{5}{10em}{5em}} +%
+%<*report|book> +\newcommand*{\l@subsection} {\@dottedtocline{2}{3.8em}{3.2em}} +\newcommand*{\l@subsubsection}{\@dottedtocline{3}{7.0em}{4.1em}} +\newcommand*{\l@paragraph} {\@dottedtocline{4}{10em}{5em}} +\newcommand*{\l@subparagraph} {\@dottedtocline{5}{12em}{6em}} +%
+% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \subsubsection{図目次と表目次} +% +% \begin{macro}{\listoffigures} +% 図の一覧を作成します。 +% \begin{macrocode} +\newcommand{\listoffigures}{% +%<*report|book> + \if@twocolumn\@restonecoltrue\onecolumn + \else\@restonecolfalse\fi + \chapter*{\listfigurename +% +%
\section*{\listfigurename + \@mkboth{\listfigurename}{\listfigurename}}% + \@starttoc{lof}% +% \if@restonecol\twocolumn\fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\l@figure} +% 図目次の体裁です。 +% \begin{macrocode} +%\newcommand*{\l@figure}{\@dottedtocline{1}{1zw}{4zw}} +%\newcommand*{\l@figure}{\@dottedtocline{1}{1.5em}{2.3em}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\listoftables} +% \changes{v1.0c}{1995/12/28}{fix the \cs{listoftable} typo.} +% 表の一覧を作成します。 +% \begin{macrocode} +\newcommand{\listoftables}{% +%<*report|book> + \if@twocolumn\@restonecoltrue\onecolumn + \else\@restonecolfalse\fi + \chapter*{\listtablename +% +%
\section*{\listtablename + \@mkboth{\listtablename}{\listtablename}}% + \@starttoc{lot}% +% \if@restonecol\twocolumn\fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\l@table} +% 表目次の体裁は、図目次と同じにします。 +% \begin{macrocode} +\let\l@table\l@figure +% \end{macrocode} +% \end{macro} +% +% +% \subsection{参考文献} +% +% \begin{macro}{\bibindent} +% オープンスタイルの参考文献で使うインデント幅です。 +% \begin{macrocode} +\newdimen\bibindent +\setlength\bibindent{1.5em} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newblock} +% |\newblock|のデフォルト定義は、小さなスペースを生成します。 +% \begin{macrocode} +\newcommand{\newblock}{\hskip .11em\@plus.33em\@minus.07em} +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{thebibliography} +% 参考文献や関連図書のリストを作成します。 +% \begin{macrocode} +\newenvironment{thebibliography}[1] +%
{\section*{\refname\@mkboth{\refname}{\refname}}% +%{\chapter*{\bibname\@mkboth{\bibname}{\bibname}}% + \list{\@biblabel{\@arabic\c@enumiv}}% + {\settowidth\labelwidth{\@biblabel{#1}}% + \leftmargin\labelwidth + \advance\leftmargin\labelsep + \@openbib@code + \usecounter{enumiv}% + \let\p@enumiv\@empty + \renewcommand\theenumiv{\@arabic\c@enumiv}}% + \sloppy +% \end{macrocode} +% \changes{v1.1a}{1997/01/23}{\LaTeX\ \texttt{!<1996/12/01!>}に合わせて修正} +% \begin{macrocode} + \clubpenalty4000 + \@clubpenalty\clubpenalty + \widowpenalty4000% + \sfcode`\.\@m} + {\def\@noitemerr + {\@latex@warning{Empty `thebibliography' environment}}% + \endlist} +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\@openbib@code} +% |\@openbib@code|のデフォルト定義は何もしません。 +% この定義は、\Lopt{openbib}オプションによって変更されます。 +% \begin{macrocode} +\let\@openbib@code\@empty +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@biblabel} +% The label for a |\bibitem[...]| command is produced by this +% macro. The default from \file{latex.dtx} is used. +% \begin{macrocode} +% \renewcommand*{\@biblabel}[1]{[#1]\hfill} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@cite} +% The output of the |\cite| command is produced by this macro. The +% default from \file{latex.dtx} is used. +% \begin{macrocode} +% \renewcommand*{\@cite}[1]{[#1]} +% \end{macrocode} +% \end{macro} +% +% +% \subsection{索引} +% +% \begin{environment}{theindex} +% 2段組の索引を作成します。 +% 索引の先頭のページのスタイルは\pstyle{jpl@in}とします。したがって、 +% \pstyle{headings}と\pstyle{bothstyle}に適した位置に出力されます。 +% \begin{macrocode} +\newenvironment{theindex} + {\if@twocolumn\@restonecolfalse\else\@restonecoltrue\fi + \columnseprule\z@ \columnsep 35\p@ +%
\twocolumn[\section*{\indexname}]% +% \twocolumn[\@makeschapterhead{\indexname}]% + \@mkboth{\indexname}{\indexname}% + \thispagestyle{jpl@in}\parindent\z@ + \parskip\z@ \@plus .3\p@\relax + \let\item\@idxitem} + {\if@restonecol\onecolumn\else\clearpage\fi} +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\@idxitem} +% \begin{macro}{\subitem} +% \begin{macro}{\subsubitem} +% 索引項目の字下げ幅です。|\@idxitem|は|\item|の項目の字下げ幅です。 +% \begin{macrocode} +\newcommand{\@idxitem}{\par\hangindent 40\p@} +\newcommand{\subitem}{\@idxitem \hspace*{20\p@}} +\newcommand{\subsubitem}{\@idxitem \hspace*{30\p@}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\indexspace} +% 索引の``文字''見出しの前に入るスペースです。 +% \begin{macrocode} +\newcommand{\indexspace}{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax} +% \end{macrocode} +% \end{macro} +% +% +% \subsection{脚注} +% +% \begin{macro}{\footnoterule} +% 本文と脚注の間に引かれる罫線です。 +% \begin{macrocode} +\renewcommand{\footnoterule}{% + \kern-3\p@ + \hrule width .4\columnwidth + \kern 2.6\p@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\c@footnote} +% reportとbookクラスでは、chapterレベルでリセットされます。 +% \begin{macrocode} +%\@addtoreset{footnote}{chapter} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@makefntext} +% このマクロにしたがって脚注が組まれます。 +% +% |\@makefnmark|は脚注記号を組み立てるマクロです。 +% \begin{macrocode} +%<*tate> +\newcommand\@makefntext[1]{\parindent 1zw + \noindent\hbox to 2zw{\hss\@makefnmark}#1} +% +%<*yoko> +\newcommand\@makefntext[1]{\parindent 1em + \noindent\hbox to 1.8em{\hss\@makefnmark}#1} +% +% \end{macrocode} +% \end{macro} +% +% +% \section{今日の日付} +% 組版時における現在の日付を出力します。 +% +% \iffalse meta-comment! +% 注意:ここで \DisableCrossrefs, \EnableCrossrefs をしているのは、 +% platex jclasses.dtx で dvi を作るときにエラーになるため。 +% \fi +% \DisableCrossrefs +% \begin{macro}{\if西暦} +% \begin{macro}{\西暦} +% \begin{macro}{\和暦} +% \changes{v1.0h}{1996/12/17}{Typo:和歴 to 和暦} +% |\today|コマンドの`年'を、 +% 西暦か和暦のどちらで出力するかを指定するコマンドです。 +% \begin{macrocode} +\newif\if西暦 \西暦false +\def\西暦{\西暦true} +\def\和暦{\西暦false} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \EnableCrossrefs +% +% \begin{macro}{\heisei} +% \changes{v1.1m}{1998/04/07}{\cs{today}の計算手順を変更} +% |\today|コマンドを|\rightmark|で指定したとき、|\rightmark|を出力する部分 +% で和暦のための計算ができないので、クラスファイルを読み込む時点で計算して +% おきます。 +% \begin{macrocode} +\newcount\heisei \heisei\year \advance\heisei-1988\relax +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\today} +% 縦組の場合は、漢数字で出力します。 +% \begin{macrocode} +\def\today{{% + \iftdir + \if西暦 + \kansuji\number\year 年 + \kansuji\number\month 月 + \kansuji\number\day 日 + \else + 平成\ifnum\heisei=1 元年\else\kansuji\number\heisei 年\fi + \kansuji\number\month 月 + \kansuji\number\day 日 + \fi + \else + \if西暦 + \number\year~年 + \number\month~月 + \number\day~日 + \else + 平成\ifnum\heisei=1 元年\else\number\heisei~年\fi + \number\month~月 + \number\day~日 + \fi + \fi}} +% \end{macrocode} +% \end{macro} +% +% +% +% +% \section{初期設定} +% +% \begin{macro}{\prepartname} +% \begin{macro}{\postpartname} +% \begin{macro}{\prechaptername} +% \begin{macro}{\postchaptername} +% \begin{macrocode} +\newcommand{\prepartname}{第} +\newcommand{\postpartname}{部} +%\newcommand{\prechaptername}{第} +%\newcommand{\postchaptername}{章} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\contentsname} +% \begin{macro}{\listfigurename} +% \begin{macro}{\listtablename} +% \begin{macrocode} +\newcommand{\contentsname}{目 次} +\newcommand{\listfigurename}{図 目 次} +\newcommand{\listtablename}{表 目 次} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\refname} +% \begin{macro}{\bibname} +% \begin{macro}{\indexname} +% \begin{macrocode} +%
\newcommand{\refname}{参考文献} +%\newcommand{\bibname}{関連図書} +\newcommand{\indexname}{索 引} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\figurename} +% \begin{macro}{\tablename} +% \begin{macrocode} +\newcommand{\figurename}{図} +\newcommand{\tablename}{表} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\appendixname} +% \begin{macro}{\abstractname} +% \begin{macrocode} +\newcommand{\appendixname}{付 録} +%\newcommand{\abstractname}{概 要} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \changes{v1.0d}{1996/02/29}{articleとreportのデフォルトを +% \pstyle{plain}に修正} +% \changes{v1.4}{2002/04/09}{縦組スタイルで\cs{flushbottom}しないようにした} +% \begin{macrocode} +%\pagestyle{headings} +%\pagestyle{plain} +\pagenumbering{arabic} +\raggedbottom +\if@twocolumn + \twocolumn + \sloppy +\else + \onecolumn +\fi +% \end{macrocode} +% |\@mparswitch|は傍注を左右(縦組では上下)どちらのマージンに +% 出力するかの指定です。偽の場合、傍注は一方の側にしか出力されません。 +% このスイッチを真とすると、とくに縦組の場合、奇数ページでは本文の上に、 +% 偶数ページでは本文の下に傍注が出力されますので、おかしなことになります。 +% +% また、縦組のときには、傍注を本文の下に出すようにしています。 +% |\reversemarginpar|とすると本文の上側に出力されます。 +% ただし、二段組の場合は、つねに隣接するテキスト側のマージンに出力されます。 +% \begin{macrocode} +%<*tate> +\normalmarginpar +\@mparswitchfalse +% +%<*yoko> +\if@twoside + \@mparswitchtrue +\else + \@mparswitchfalse +\fi +% +% +% \end{macrocode} +% +% +% +% \Finale +% +\endinput diff --git a/Master/texmf-dist/source/uplatex/base/ukinsoku.dtx b/Master/texmf-dist/source/uplatex/base/ukinsoku.dtx new file mode 100644 index 00000000000..3dd6951bfcd --- /dev/null +++ b/Master/texmf-dist/source/uplatex/base/ukinsoku.dtx @@ -0,0 +1,521 @@ +% \iffalse meta-comment +%% File: ukinsoku.dtx +% +% pLaTeX kinsoku file: +% Copyright 1995 ASCII Corporation. +% and modified for upLaTeX +% +% This file is part of upLaTeX2e system. +% ------------------------------------- +% +% \fi +% +% \CheckSum{401} +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +% +% \setcounter{StandardModuleDepth}{1} +% \StopEventually{} +% +% \iffalse +%<*driver> +\NeedsTeXFormat{pLaTeX2e} +% \fi +\ProvidesFile{ukinsoku.dtx}[2011/05/07 v1.0_u00 upLaTeX Kernel] +% \iffalse +\documentclass{jltxdoc} +\GetFileInfo{ukinsoku.dtx} +\title{禁則パラメータ\space\fileversion} +\author{Ken Nakano \& TTK} +\date{作成日:\filedate} +\begin{document} + \maketitle + \DocInput{\filename} +\end{document} +% +% \fi +% +% このファイルは、禁則と文字間スペースの設定について説明をしています。 +% 日本語\TeX{}の機能についての詳細は、『日本語\TeX テクニカルブックI』を +% 参照してください。 +% +% なお、このファイルのコード部分は、 +% 以前のバージョンで配布された\file{ukinsoku.tex}と同一です。 +% +% \begin{macrocode} +%<*plcore> +% \end{macrocode} +% +% \section{禁則} +% +% ある文字を行頭禁則の対象にするには、|\prebreakpenalty|に正の値を指定します。 +% ある文字を行末禁則の対象にするには、|\postbreakpenalty|に正の値を指定します。 +% 数値が大きいほど、行頭、あるいは行末で改行されにくくなります。 +% +% \subsection{半角文字に対する禁則} +% ここでは、半角文字に対する禁則の設定を行なっています。 +% +% \begin{macrocode} +%% +%% 行頭、行末禁則パラメータ +%% +%% 1byte characters +\prebreakpenalty`!=10000 +\prebreakpenalty`"=10000 +\postbreakpenalty`\#=500 +\postbreakpenalty`\$=500 +\postbreakpenalty`\%=500 +\postbreakpenalty`\&=500 +\postbreakpenalty`\`=10000 +\prebreakpenalty`'=10000 +\prebreakpenalty`)=10000 +\postbreakpenalty`(=10000 +\prebreakpenalty`*=500 +\prebreakpenalty`+=500 +\prebreakpenalty`-=10000 +\prebreakpenalty`.=10000 +\prebreakpenalty`,=10000 +\prebreakpenalty`/=500 +\prebreakpenalty`;=10000 +\prebreakpenalty`?=10000 +\prebreakpenalty`:=10000 +\prebreakpenalty`]=10000 +\postbreakpenalty`[=10000 +% \end{macrocode} +% +% \subsection{全角文字に対する禁則} +% ここでは、全角文字に対する禁則の設定を行なっています。 +% +% \begin{macrocode} +%%全角文字 +\prebreakpenalty`、=10000 +\prebreakpenalty`。=10000 +\prebreakpenalty`,=10000 +\prebreakpenalty`.=10000 +\prebreakpenalty`・=10000 +\prebreakpenalty`:=10000 +\prebreakpenalty`;=10000 +\prebreakpenalty`?=10000 +\prebreakpenalty`!=10000 +\prebreakpenalty`゛=10000%\jis"212B +\prebreakpenalty`゜=10000%\jis"212C +\prebreakpenalty`´=10000%\jis"212D +\postbreakpenalty``=10000%\jis"212E +\prebreakpenalty`々=10000%\jis"2139 +\prebreakpenalty`…=250%\jis"2144 +\prebreakpenalty`‥=250%\jis"2145 +\postbreakpenalty`‘=10000%\jis"2146 +\prebreakpenalty`’=10000%\jis"2147 +\postbreakpenalty`“=10000%\jis"2148 +\prebreakpenalty`”=10000%\jis"2149 +\prebreakpenalty`)=10000 +\postbreakpenalty`(=10000 +\prebreakpenalty`}=10000 +\postbreakpenalty`{=10000 +\prebreakpenalty`]=10000 +\postbreakpenalty`[=10000 +%%\postbreakpenalty`‘=10000 +%%\prebreakpenalty`’=10000 +\postbreakpenalty`〔=10000%\jis"214C +\prebreakpenalty`〕=10000%\jis"214D +\postbreakpenalty`〈=10000%\jis"2152 +\prebreakpenalty`〉=10000%\jis"2153 +\postbreakpenalty`《=10000%\jis"2154 +\prebreakpenalty`》=10000%\jis"2155 +\postbreakpenalty`「=10000%\jis"2156 +\prebreakpenalty`」=10000%\jis"2157 +\postbreakpenalty`『=10000%\jis"2158 +\prebreakpenalty`』=10000%\jis"2159 +\postbreakpenalty`【=10000%\jis"215A +\prebreakpenalty`】=10000%\jis"215B +\prebreakpenalty`ー=10000 +\prebreakpenalty`+=200 +\prebreakpenalty`−=200% U+2212 MINUS SIGN +\prebreakpenalty`-=200% U+FF0D FULLWIDTH HYPHEN-MINUS +\prebreakpenalty`==200 +\postbreakpenalty`#=200 +\postbreakpenalty`$=200 +\postbreakpenalty`%=200 +\postbreakpenalty`&=200 +\prebreakpenalty`ぁ=150 +\prebreakpenalty`ぃ=150 +\prebreakpenalty`ぅ=150 +\prebreakpenalty`ぇ=150 +\prebreakpenalty`ぉ=150 +\prebreakpenalty`っ=150 +\prebreakpenalty`ゃ=150 +\prebreakpenalty`ゅ=150 +\prebreakpenalty`ょ=150 +\prebreakpenalty`ゎ=150%\jis"246E +\prebreakpenalty`ァ=150 +\prebreakpenalty`ィ=150 +\prebreakpenalty`ゥ=150 +\prebreakpenalty`ェ=150 +\prebreakpenalty`ォ=150 +\prebreakpenalty`ッ=150 +\prebreakpenalty`ャ=150 +\prebreakpenalty`ュ=150 +\prebreakpenalty`ョ=150 +\prebreakpenalty`ヮ=150%\jis"256E +\prebreakpenalty`ヵ=150%\jis"2575 +\prebreakpenalty`ヶ=150%\jis"2576 +%% kinsoku JIS X 0208 additional +\prebreakpenalty`ヽ=10000 +\prebreakpenalty`ヾ=10000 +\prebreakpenalty`ゝ=10000 +\prebreakpenalty`ゞ=10000 +%% +%% kinsoku JIS X 0213 +%% +\prebreakpenalty`〳=10000 +\prebreakpenalty`〴=10000 +\prebreakpenalty`〵=10000 +\prebreakpenalty`〻=10000 +\postbreakpenalty`⦅=10000 +\prebreakpenalty`⦆=10000 +\postbreakpenalty`⦅=10000 +\prebreakpenalty`⦆=10000 +\postbreakpenalty`〘=10000 +\prebreakpenalty`〙=10000 +\postbreakpenalty`〖=10000 +\prebreakpenalty`〗=10000 +\postbreakpenalty`«=10000 +\prebreakpenalty`»=10000 +\postbreakpenalty`〝=10000 +\prebreakpenalty`〟=10000 +\prebreakpenalty`‼=10000 +\prebreakpenalty`⁇=10000 +\prebreakpenalty`⁈=10000 +\prebreakpenalty`⁉=10000 +\postbreakpenalty`¡=10000 +\postbreakpenalty`¿=10000 +\prebreakpenalty`ː=10000 +\prebreakpenalty`ª=10000 +\prebreakpenalty`º=10000 +\prebreakpenalty`¹=10000 +\prebreakpenalty`²=10000 +\prebreakpenalty`³=10000 +\postbreakpenalty`€=10000 +\prebreakpenalty`ゕ=150 +\prebreakpenalty`ゖ=150 +\prebreakpenalty`ㇰ=150 +\prebreakpenalty`ㇱ=150 +\prebreakpenalty`ㇲ=150 +\prebreakpenalty`ㇳ=150 +\prebreakpenalty`ㇴ=150 +\prebreakpenalty`ㇵ=150 +\prebreakpenalty`ㇶ=150 +\prebreakpenalty`ㇷ=150 +\prebreakpenalty`ㇸ=150 +\prebreakpenalty`ㇹ=150 +%%\prebreakpenalty`ㇷ゚=150 +\prebreakpenalty`ㇺ=150 +\prebreakpenalty`ㇻ=150 +\prebreakpenalty`ㇼ=150 +\prebreakpenalty`ㇽ=150 +\prebreakpenalty`ㇾ=150 +\prebreakpenalty`ㇿ=150 +%% +%% kinsoku JIS X 0212 +%% +%%\postbreakpenalty`¡=10000 +%%\postbreakpenalty`¿=10000 +%%\prebreakpenalty`º=10000 +%%\prebreakpenalty`ª=10000 +\prebreakpenalty`™=10000 +%% +%% kinsoku 半角片仮名 +%% +\prebreakpenalty`。=10000 +\prebreakpenalty`、=10000 +\prebreakpenalty`゙=10000 +\prebreakpenalty`゚=10000 +\prebreakpenalty`」=10000 +\postbreakpenalty`「=10000 +% \end{macrocode} +% +% \section{文字間のスペース} +% +% ある英字の前後と、その文字に隣合う漢字に挿入されるスペースを制御するには、 +% |\xspcode|を用います。 +% +% ある漢字の前後と、その文字に隣合う英字に挿入されるスペースを制御するには、 +% |\inhibitxspcode|を用います。 +% +% \subsection{ある英字と前後の漢字の間の制御} +% ここでは、英字に対する設定を行なっています。 +% +% 指定する数値とその意味は次のとおりです。 +% +% \begin{center} +% \begin{tabular}{ll} +% 0 & 前後の漢字の間での処理を禁止する。\\ +% 1 & 直前の漢字との間にのみ、スペースの挿入を許可する。\\ +% 2 & 直後の漢字との間にのみ、スペースの挿入を許可する。\\ +% 3 & 前後の漢字との間でのスペースの挿入を許可する。\\ +% \end{tabular} +% \end{center} +% +% \begin{macrocode} +%% +%% xspcode +\xspcode`(=1 +\xspcode`)=2 +\xspcode`[=1 +\xspcode`]=2 +\xspcode``=1 +\xspcode`'=2 +\xspcode`;=2 +\xspcode`,=2 +\xspcode`.=2 +%% for 8bit Latin +\xspcode"80=3 +\xspcode"81=3 +\xspcode"82=3 +\xspcode"83=3 +\xspcode"84=3 +\xspcode"85=3 +\xspcode"86=3 +\xspcode"87=3 +\xspcode"88=3 +\xspcode"89=3 +\xspcode"8A=3 +\xspcode"8B=3 +\xspcode"8C=3 +\xspcode"8D=3 +\xspcode"8E=3 +\xspcode"8F=3 +\xspcode"90=3 +\xspcode"91=3 +\xspcode"92=3 +\xspcode"93=3 +\xspcode"94=3 +\xspcode"95=3 +\xspcode"96=3 +\xspcode"97=3 +\xspcode"98=3 +\xspcode"99=3 +\xspcode"9A=3 +\xspcode"9B=3 +\xspcode"9C=3 +\xspcode"9D=3 +\xspcode"9E=3 +\xspcode"9F=3 +\xspcode"A0=3 +\xspcode"A1=3 +\xspcode"A2=3 +\xspcode"A3=3 +\xspcode"A4=3 +\xspcode"A5=3 +\xspcode"A6=3 +\xspcode"A7=3 +\xspcode"A8=3 +\xspcode"A9=3 +\xspcode"AA=3 +\xspcode"AB=3 +\xspcode"AC=3 +\xspcode"AD=3 +\xspcode"AE=3 +\xspcode"AF=3 +\xspcode"B0=3 +\xspcode"B1=3 +\xspcode"B2=3 +\xspcode"B3=3 +\xspcode"B4=3 +\xspcode"B5=3 +\xspcode"B6=3 +\xspcode"B7=3 +\xspcode"B8=3 +\xspcode"B9=3 +\xspcode"BA=3 +\xspcode"BB=3 +\xspcode"BC=3 +\xspcode"BD=3 +\xspcode"BE=3 +\xspcode"BF=3 +\xspcode"C0=3 +\xspcode"C1=3 +\xspcode"C2=3 +\xspcode"C3=3 +\xspcode"C4=3 +\xspcode"C5=3 +\xspcode"C6=3 +\xspcode"C7=3 +\xspcode"C8=3 +\xspcode"C9=3 +\xspcode"CA=3 +\xspcode"CB=3 +\xspcode"CC=3 +\xspcode"CD=3 +\xspcode"CE=3 +\xspcode"CF=3 +\xspcode"D0=3 +\xspcode"D1=3 +\xspcode"D2=3 +\xspcode"D3=3 +\xspcode"D4=3 +\xspcode"D5=3 +\xspcode"D6=3 +\xspcode"D7=3 +\xspcode"D8=3 +\xspcode"D9=3 +\xspcode"DA=3 +\xspcode"DB=3 +\xspcode"DC=3 +\xspcode"DD=3 +\xspcode"DE=3 +\xspcode"DF=3 +\xspcode"E0=3 +\xspcode"E1=3 +\xspcode"E2=3 +\xspcode"E3=3 +\xspcode"E4=3 +\xspcode"E5=3 +\xspcode"E6=3 +\xspcode"E7=3 +\xspcode"E8=3 +\xspcode"E9=3 +\xspcode"EA=3 +\xspcode"EB=3 +\xspcode"EC=3 +\xspcode"ED=3 +\xspcode"EE=3 +\xspcode"EF=3 +\xspcode"F0=3 +\xspcode"F1=3 +\xspcode"F2=3 +\xspcode"F3=3 +\xspcode"F4=3 +\xspcode"F5=3 +\xspcode"F6=3 +\xspcode"F7=3 +\xspcode"F8=3 +\xspcode"F9=3 +\xspcode"FA=3 +\xspcode"FB=3 +\xspcode"FC=3 +\xspcode"FD=3 +\xspcode"FE=3 +\xspcode"FF=3 +% \end{macrocode} +% +% \subsection{ある漢字と前後の英字の間の制御} +% ここでは、漢字に対する設定を行なっています。 +% +% 指定する数値とその意味は次のとおりです。 +% +% \begin{center} +% \begin{tabular}{ll} +% 0 & 前後の英字との間にスペースを挿入することを禁止する。\\ +% 1 & 直前の英字との間にスペースを挿入することを禁止する。\\ +% 2 & 直後の英字との間にスペースを挿入することを禁止する。\\ +% 3 & 前後の英字との間でのスペースの挿入を許可する。\\ +% \end{tabular} +% \end{center} +% +% \begin{macrocode} +%% +%% inhibitxspcode +\inhibitxspcode`、=1 +\inhibitxspcode`。=1 +\inhibitxspcode`,=1 +\inhibitxspcode`.=1 +\inhibitxspcode`;=1 +\inhibitxspcode`?=1 +\inhibitxspcode`)=1 +\inhibitxspcode`(=2 +\inhibitxspcode`]=1 +\inhibitxspcode`[=2 +\inhibitxspcode`}=1 +\inhibitxspcode`{=2 +\inhibitxspcode`‘=2 +\inhibitxspcode`’=1 +\inhibitxspcode`“=2 +\inhibitxspcode`”=1 +\inhibitxspcode`〔=2 +\inhibitxspcode`〕=1 +\inhibitxspcode`〈=2 +\inhibitxspcode`〉=1 +\inhibitxspcode`《=2 +\inhibitxspcode`》=1 +\inhibitxspcode`「=2 +\inhibitxspcode`」=1 +\inhibitxspcode`『=2 +\inhibitxspcode`』=1 +\inhibitxspcode`【=2 +\inhibitxspcode`】=1 +\inhibitxspcode`—=0% U+2014 EM DASH +\inhibitxspcode`―=0% U+2015 HORIZONTAL BAR +\inhibitxspcode`〜=0% U+301C WAVE DASH +\inhibitxspcode`~=0% U+FF5E FULLWIDTH TILDE +\inhibitxspcode`…=0 +\inhibitxspcode`¥=0% U+00A5 YEN SIGN +\inhibitxspcode`¥=0% U+FFE5 FULLWIDTH YEN SIGN +\inhibitxspcode`°=1 +\inhibitxspcode`′=1 +\inhibitxspcode`″=1 +%% +%% inhibitxspcode JIS X 0213 +%% +\inhibitxspcode`⦅=2 +\inhibitxspcode`⦆=1 +\inhibitxspcode`⦅=2 +\inhibitxspcode`⦆=1 +\inhibitxspcode`〘=2 +\inhibitxspcode`〙=1 +\inhibitxspcode`〖=2 +\inhibitxspcode`〗=1 +\inhibitxspcode`«=2 +\inhibitxspcode`»=1 +\inhibitxspcode`〝=2 +\inhibitxspcode`〟=1 +\inhibitxspcode`‼=1 +\inhibitxspcode`⁇=1 +\inhibitxspcode`⁈=1 +\inhibitxspcode`⁉=1 +\inhibitxspcode`¡=2 +\inhibitxspcode`¿=2 +\inhibitxspcode`ª=1 +\inhibitxspcode`º=1 +\inhibitxspcode`¹=1 +\inhibitxspcode`²=1 +\inhibitxspcode`³=1 +\inhibitxspcode`€=2 +%% +%% inhibitxspcode JIS X 0212 +%% +%%\inhibitxspcode`¡=1 +%%\inhibitxspcode`¿=1 +%%\inhibitxspcode`º=1 +%%\inhibitxspcode`ª=1 +\inhibitxspcode`™=1 +%% +%% inhibitxspcode 半角片仮名 +%% +\inhibitxspcode`。=1 +\inhibitxspcode`、=1 +\inhibitxspcode`「=2 +\inhibitxspcode`」=1 +% \end{macrocode} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \Finale +% +\endinput diff --git a/Master/texmf-dist/source/uplatex/base/uplatex.dtx b/Master/texmf-dist/source/uplatex/base/uplatex.dtx new file mode 100644 index 00000000000..1eea733727f --- /dev/null +++ b/Master/texmf-dist/source/uplatex/base/uplatex.dtx @@ -0,0 +1,870 @@ +% \iffalse meta-comment +%% File: uplatex.dtx +% +% pLaTeX base file: +% Copyright 1995,1996 ASCII Corporation. +% and modified for upLaTeX +% +% This file is part of upLaTeX2e system. +% ------------------------------------- +% +% \fi +% +% \CheckSum{367} +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +% +% \setcounter{StandardModuleDepth}{1} +% \def\chuui#1{\par\vskip.5\baselineskip +% \noindent\bfseries{注意:}\par +% \noindent\bgroup\bf#1} +% \def\endchuui{\egroup\vskip.5\baselineskip} +% \StopEventually{} +% +% \iffalse +% \changes{v1.0}{1995/05/08}{first edition} +% \changes{v1.0a}{1995/08/25}{互換性について、\dst{}の使い方、参考文献を追加} +% \changes{v1.0b}{1996/02/01}{\file{omake-sh.ins}, \file{omake-pl.ins}を +% \dst{}の変更にともなう変更をした} +% \changes{v1.0c}{1997/01/23}{\LaTeX\ \textt{!<1996/12/01!>}に合わせて修正} +% \changes{v1.0c_u00}{2011/05/07}{pLaTeX用からupLaTeX用に修正。} +% \fi +% +% \iffalse +%<*driver> +\NeedsTeXFormat{pLaTeX2e} +% \fi +\ProvidesFile{uplatex.dtx}[2011/05/07 v1.0c_u00 upLaTeX document file] +% \iffalse +\documentclass{jltxdoc} +\usepackage{plext} +\GetFileInfo{platex.dtx} +\title{p\LaTeXe{}について} +\author{Ken Nakano \& TTK} +\date{作成日:\filedate} +\begin{document} + \MakeShortVerb{\+} + \maketitle + \DocInput{\filename} +\end{document} +% +% \fi +% +% +% \section{概要}\label{platex:intro} +% この文書は、p\LaTeXe{}の概要を示していますが、使い方のガイドでは +% ありません。p\LaTeXe{}の機能についての説明は、\cite{platex2e-book}を +% 参照してください。日本語\TeX{}については\cite{jtex-tech}を参照してください。 +% +% p\LaTeXe{}では\cite{tate-book}で説明されている、いくつかの拡張コマンドの +% 動作を修正しています。その詳細については、\file{plext.dtx}を参照して +% ください。 +% +% \LaTeX{}の機能については、\cite{latex-book2}や\cite{latex-comp}などを +% 参照してください。新しい機能については\file{usrguide.tex}を参照してください。 +% +% この文書の構成は次のようになっています。 +% +% \begin{quote} +% \begin{description} +% \item[第\ref{platex:intro}節] +% この節です。この文書についての概要と、 +% \dst{}のためのオプションについて述べています。 +% +% \item[第\ref{platex:plcore}節] +% p\LaTeXe{}で拡張した機能についての概要です。 +% 付属のクラスファイルやパッケージファイルについても簡単に +% 説明しています。 +% +% \item[第\ref{platex:compatibility}節] +% 旧バージョンのp\LaTeX{}との互換性について述べています。 +% +% \item[付録\ref{app:pldoc}] +% p\LaTeXe{}のdtxファイルをまとめて一つのDVIファイルにするための +% 文書ファイル説明をしています。 +% +% \item[付録\ref{app:omake}] +% 付録\ref{app:pldoc}で説明をした文書ファイルを処理するshスクリプト(手順)、 +% \dst{}文書ファイル内の入れ子の対応を調べるperlスクリプトなどについて +% 説明しています。 +% \end{description} +% \end{quote} +% +% +% \subsection{\dst{}プログラムのためのオプション} +% この文書を\dst{}プログラムによって処理することによって、 +% いくつかの異なるファイルを生成することができます。 +% +% この文書の\dst{}プログラムのためのオプションは、次のとおりです。 +% +% \DeleteShortVerb{\|} +% \begin{center} +% \begin{tabular}{l|p{.8\linewidth}} +% \emph{オプション} & \emph{意味}\\\hline +% plcore & フォーマットファイルを作るためのファイルを生成\\ +% pldoc & p\LaTeXe{}のソースファイルをまとめて組版するための +% 文書ファイルを生成\\[2mm] +% shprog & 上記のファイルを作成するためのshスクリプトを生成\\ +% plprog & 入れ子構造を調べる簡単なperlスクリプトを生成\\ +% Xins & 上記のshスクリプトやperlスクリプトを取り出すための +% \dst{}バッチファイルを生成\\ +% \end{tabular} +% \end{center} +% \MakeShortVerb{\|} +% +% \subsubsection{ファイルの取り出し方} +% +% たとえば、この文書の``plcore''の部分を``\file{platex.ltx}''という +% ファイルにするときの手順はつぎのようになります。 +% +% \begin{enumerate} +% \item platex docstrip +% \item 入力ファイルの拡張子(dtx)を入力する。 +% \item 出力ファイルの拡張子(ltx)を入力する。 +% \item \dst{}オプション(plcore)を入力する。 +% \item 入力ファイル名(platex)を入力する。 +% \item \file{platex.ltx}が存在する場合は、確認を求めてくるので、 +% ``y''を入力する。 +% \item 別の処理を行なうかを問われるので、``n''を入力する。 +% \end{enumerate} +% これで、\file{platex.ltx}が作られます。 +% +% あるいは、次のような内容のファイル\file{batch.ins}を作成し、 +% |platex fmt.ins|することでも\file{platex.ltx}を作ることができます。 +% +% \begin{verbatim} +% \def\batchfile{batch.ins} +% \input docstrip.tex +% \generateFile{platex.ltx}{t}{\from{platex.dtx}{plcore}} +% \end{verbatim} +% +% \dst プログラムの詳細は、\file{docstrip.dtx}を参照してください。 +% +% +% +% \section{p\LaTeXe{}の機能について}\label{platex:plcore} +% p\LaTeXe{}の機能は、いくつものファイルに分割されて実装されています。 +% これらのファイルはつぎの3種類に分類することができます。 +% +% \begin{itemize} +% \item フォーマットファイル +% \item クラスファイル +% \item パッケージファイル +% \end{itemize} +% +% フォーマットファイルには、基本的な機能が定義されており、 +% p\LaTeXe{}の核となるファイルです。このファイルに定義されているマクロは、 +% 実行時の速度を高めるために、あらかじめ\TeX の内部形式の形で保存されて +% います。 +% +% クラスファイルとパッケージファイルは、従来、スタイルファイルと呼ばれていた +% ものです。\LaTeXe{}ではそれらを、レイアウトに関するものをクラスファイルと +% 呼び、マクロの拡張をするものをパッケージファイルと呼んで区別するように +% なりました。 +% +% \TeX{}文書が使用するクラスは、文書のプリアンブルで|\documentclass|コマンド +% を用いて指定します。|\documentclass|ではなく、旧版の|\documentstyle|を +% 用いると、自動的に\emph{2.09互換モード}に入ります。 +% 互換モードは旧版の文書を組版するためだけに作られていますので、 +% 新しく文書を作成する場合は、|\documentclass|コマンドを用いてください。 +% 互換モードでは\LaTeX{}の新機能も使えなくなります。 +% +% 旧版では、|\documentstyle|のオプションでマクロファイルを読み込んで +% いましたが、\LaTeX{}では、|\usepackage|コマンドを用いて読み込みます。 +% +% \subsection{フォーマットファイル} +% フォーマットファイルには、基本的な機能が定義されていますが、 +% これらは\TeX{}の内部形式に変換された形式となっています。 +% フォーマットファイルを作成するには、 +% ソースファイル``platex.ltx''を|iniptex|プログラムで処理します。 +% +% 次のリストが、その内容です。 +% ただし、このバージョンでは、\LaTeX{}からp\LaTeXe{}への拡張を +% \file{plcore.ltx}をロードすることで行ない、 +% \file{latex.ltx}には直接、手を加えないようにしています。 +% したがって\file{platex.ltx}はとても短いものとなっています。 +% \file{latex.ltx}には\LaTeX{}のコマンドが、 +% \file{plcore.ltx}にはp\LaTeXe{}で拡張したコマンドが定義されています。 +% +% \begin{macrocode} +%<*plcore> +\let\orgdump\dump +\let\dump\relax +\input latex.ltx +\typeout{**************************^^J% + *^^J% + * making upLaTeX format^^J% + *^^J% + **************************} +\makeatletter +\input uplcore.ltx +\makeatother +\the\everyjob +\let\dump\orgdump +\dump +%\endinput +% +% \end{macrocode} +% +% 実際にp\LaTeXe{}への拡張を行なっている\file{plcore.ltx}は、 +% \dst{}プログラムによって、次のファイルの断片が連結されたものです。 +% +% \begin{itemize} +% \item \file{plvers.dtx}は、p\LaTeXe{}のフォーマットバージョンを +% 定義しています。 +% \item \file{plfonts.dtx}は、\NFSS2を拡張しています。 +% \item \file{plcore.dtx}は、上記以外のコマンドでフォーマットファイルに +% 格納されるコマンドを定義しています。 +% \end{itemize} +% +% プリロードフォントや組版パラメータなどの設定は、 +% \file{pldefs.ltx}をロードすることで行なっています。 +% このファイルに記述されている設定を変更すれば、 +% p\LaTeXe{}をカスタマイズすることができます。 +% カスタマイズする場合は、このファイルを直接、修正するのではなく、 +% \file{pldefs.cfg}という名前でコピーをして、そのファイルを編集します。 +% \file{pldefs.cfg}は\file{pldefs.ltx}の代わりに読み込まれます。 +% +% +% \subsubsection{バージョン} +% p\LaTeXe{}のバージョンやフォーマットファイル名は、 +% \file{plvers.dtx}で定義しています。 +% +% +% \subsubsection{\NFSS2コマンド} +% \LaTeX{}では、フォント選択機構として\NFSS2を用いています。 +% p\LaTeXe{}では、オリジナルの\NFSS2 と同様のインターフェイスで、 +% 和文フォントを選択できるように、\file{plfonts.dtx}で\NFSS2を拡張しています。 +% +% p\LaTeXe{}の\NFSS2は、フォントを切替えるコマンドを指定するときに、 +% それが欧文書体か和文書体のいずれかを対象とするものかを、 +% できるだけ意識しないようにする方向で拡張しています。 +% いいかえれば、コマンドが(可能な限りの)判断をします。 +% したがって数多くある英語版のクラスファイルやパッケージファイルなどで +% 書体の変更を行っている箇所を修正する必要はあまりありません。 +% +% \file{plfonts.dtx}ファイルでは、\NFSS2コマンドの定義のほか、プリロード +% フォントの設定、和文エンコードの定義、組版パラメータなどの設定、 +% フォント定義ファイルなどの記述も含まれています。 +% +% \NFSS2についての詳細は、\LaTeXe に付属の\file{fntguide.tex}を参照して +% ください。 +% +% +% \subsubsection{出力ルーチンとフロート} +% \file{plcore.dtx}は、次の項目に関するコマンドを日本語処理用に修正や拡張 +% をしています。 +% +% \begin{itemize} +% \item プリアンブルコマンド +% \item 改ページ +% \item 改行 +% \item オブジェクトの出力順序 +% \item トンボ +% \item 脚注マクロ +% \item 相互参照 +% \item 疑似タイプ入力 +% \end{itemize} +% +% +% \subsection{クラスファイルとパッケージファイル} +% クラスファイルとパッケージファイルは、従来、スタイルファイルと呼ばれていた +% ものです。\LaTeX{}ではそれらを、レイアウトに関するものをクラスファイルと +% 呼び、マクロの拡張をするものをパッケージファイルと呼んで区別するように +% なりました。 +% +% p\LaTeXe{}が提供をする、クラスファイルやパッケージファイルのいくつかは、 +% オリジナルのファイルを修正しています。 +% 修正箇所には``\texttt{platex}''条件が付けられています。 +% +% p\LaTeXe{}に付属のクラスファイルは、次のとおりです。 +% +% \begin{itemize} +% \item jbook.cls,jarticle.cls,jreport.cls\par +% 横組用の標準クラスファイル。\file{jclasses.dtx}から作成される。 +% +% \item tbook.cls,tarticle.cls,treport.cls\par +% 縦組用の標準クラスファイル。\file{jclasses.dtx}から作成される。 +% +% \item jltxdoc.cls\par +% \file{.dtx}ファイルを組版するためのクラスファイル。 +% \file{jltxdoc.dtx}から作成される。 +% +% \item jltxguid.cls\par +% \file{usrguide.tex}や\file{fntguide.tex}などを組版するための +% クラスファイル。 +% \end{itemize} +% +% また、p\LaTeXe{}に付属のパッケージファイルは、次のとおりです。 +% +% \begin{itemize} +% \item oldpfont.sty\par +% p\LaTeX~2.09のフォントコマンドを提供するパッケージ。 +% \file{oldpfont.dtx}から作成される。 +% +% \item ptrace.sty\par +% \file{tracefnt.sty}で再定義された\NFSS2コマンドをp\LaTeXe{}用に +% 再々定義するためのパッケージ。 +% +% \item ascmac.sty, tascmac.sty\par +% 旧バージョンのp\LaTeX{}で配布されていたファイル。 +% +% \item plext.sty\par +% 縦組用の拡張コマンドなどが定義されているファイル。 +% \end{itemize} +% +% +% \section{旧バージョンとの互換性}\label{platex:compatibility} +% ここでは、このバージョンと以前のバージョンとの互換性や拡張部分について +% 説明をしています。 +% +% \subsection{p\LaTeX~2.09との互換性} +% p\LaTeXe{}は、\LaTeX{}の上位互換という形を取っていますが、 +% いくつかのパラメータなども変更しています。 +% したがって英文書など、\LaTeX{}でも処理できるファイルを +% p\LaTeXe{}で処理しても、完全に同じ結果になるとは限りません。 +% これは、英語版の\LaTeX{}でも同じです。 +% 詳細は、\LaTeXe に付属の\file{usrguide.tex}を参照してください。 +% +% 多くのクラスファイルやパッケージフィルはそのまま使えると思います。 +% ただし、それらがp\LaTeXe{}で拡張しているコマンドと同じ名前のコマンドを +% 再定義している場合は、コマンドの拡張の仕方によってはエラーになることも +% あります。用いようとしている、クラスファイルやパッケージファイルが +% うまく動くかどうかを、完全に確かめる方法は残念ながらありません。 +% 一番簡単なのは、動かしてみることです。不幸にもうまく動かない場合は、 +% ログファイルや付属の文書ファイルを参考に原因を調べてください。 +% +% +% +% \appendix +% +% \section{文書ファイル}\label{app:pldoc} +% \changes{v1.0c}{1997/01/25}{Add to filecontents environment for pldoc.dic.} +% ここでは、このパッケージに含まれているdtxファイルをまとめて組版をするための +% 文書ファイルについて説明をしています。個別に処理した場合と異なり、 +% 変更履歴や索引も付きます。全体で、およそ150ページ程度になります。 +% +% |filecontents|環境は、引数に指定されたファイルが存在するときは何も +% しませんが、存在しないときは、環境内の内容でファイルを作成します。 +% \file{pldoc.dic}ファイルは、mendexプログラムで索引を処理するときに +% \cs{西暦}, \cs{和暦}に対する「読み」を付けるために必要です。 +% \begin{macrocode} +%<*pldoc> +\begin{filecontents}{pldoc.dic} +西暦 せいれき +和暦 われき +\end{filecontents} +% \end{macrocode} +% 文書クラスには、\file{jltxdoc}クラスを用います。 +% \file{plext.dtx}の中でサンプルを組み立てていますので、 +% \file{plext}パッケージが必要です。 +% \begin{macrocode} +\documentclass{jltxdoc} +\usepackage{plext} +\listfiles + +% \end{macrocode} +% いくつかの\TeX{}プリミティブとコマンドを索引に出力しないようにします。 +% \begin{macrocode} +\DoNotIndex{\def,\long,\edef,\xdef,\gdef,\let,\global} +\DoNotIndex{\if,\ifnum,\ifdim,\ifcat,\ifmmode,\ifvmode,\ifhmode,% + \iftrue,\iffalse,\ifvoid,\ifx,\ifeof,\ifcase,\else,\or,\fi} +\DoNotIndex{\box,\copy,\setbox,\unvbox,\unhbox,\hbox,% + \vbox,\vtop,\vcenter} +\DoNotIndex{\@empty,\immediate,\write} +\DoNotIndex{\egroup,\bgroup,\expandafter,\begingroup,\endgroup} +\DoNotIndex{\divide,\advance,\multiply,\count,\dimen} +\DoNotIndex{\relax,\space,\string} +\DoNotIndex{\csname,\endcsname,\@spaces,\openin,\openout,% + \closein,\closeout} +\DoNotIndex{\catcode,\endinput} +\DoNotIndex{\jobname,\message,\read,\the,\m@ne,\noexpand} +\DoNotIndex{\hsize,\vsize,\hskip,\vskip,\kern,\hfil,\hfill,\hss,\vss,\unskip} +\DoNotIndex{\m@ne,\z@,\z@skip,\@ne,\tw@,\p@,\@minus,\@plus} +\DoNotIndex{\dp,\wd,\ht,\setlength,\addtolength} +\DoNotIndex{\newcommand, \renewcommand} + +% \end{macrocode} +% 索引と変更履歴の見出しに\cs{part}を用いるように設定をします。 +% \begin{macrocode} +\IndexPrologue{\part*{索 引}% + \markboth{索 引}{索 引}% + \addcontentsline{toc}{part}{索 引}% +イタリック体の数字は、その項目が説明されているページを示しています。 +下線の引かれた数字は、定義されているページを示しています。 +その他の数字は、その項目が使われているページを示しています。} +% +\GlossaryPrologue{\part*{変更履歴}% + \markboth{変更履歴}{変更履歴}% + \addcontentsline{toc}{part}{変更履歴}} + +% \end{macrocode} +% 標準の|\changes|コマンドを、複数ファイルの文書に合うように修正しています。 +% \begin{macrocode} +\makeatletter +\def\changes@#1#2#3{% + \let\protect\@unexpandable@protect + \edef\@tempa{\noexpand\glossary{#2\space\currentfile\space#1\levelchar + \ifx\saved@macroname\@empty + \space\actualchar\generalname + \else + \expandafter\@gobble + \saved@macroname\actualchar + \string\verb\quotechar*% + \verbatimchar\saved@macroname + \verbatimchar + \fi + :\levelchar #3}}% + \@tempa\endgroup\@esphack} +\makeatother +\RecordChanges +\CodelineIndex +\EnableCrossrefs +\setcounter{IndexColumns}{2} +\settowidth\MacroIndent{\ttfamily\scriptsize 000\ } +% \end{macrocode} +% ここからが本文ページとなります。 +% \changes{v1.0c}{1997/01/29}{Rename pltpatch to plpatch.} +% \begin{macrocode} +\begin{document} + \title{The p\LaTeXe\ Sources} + \author{Ken Nakano} + +% This command will be used to input the patch file +% if that file exists. +\newcommand{\includeltpatch}{% + \def\currentfile{plpatch.ltx} + \part{plpatch} + {\let\ttfamily\relax + \xdef\filekey{\filekey, \thepart={\ttfamily\currentfile}}}% + Things we did wrong\ldots + \IndexInput{plpatch.ltx}} + +% Get the date from plvers.dtx +\makeatletter +\let\patchdate=\@empty +\begingroup + \def\ProvidesFile#1\pfmtversion#2{\date{#2}\endinput} + \input{plvers.dtx} +\global\let\X@date=\@date + +% Add the patch version if available. + \long\def\Xdef#1#2#3\def#4#5{% + \xdef\X@date{#2}% + \xdef\patchdate{#5}% + \endinput}% + \InputIfFileExists{plpatch.ltx} + {\let\def\Xdef}{\global\let\includeltpatch\relax} +\endgroup + +\ifx\@date\X@date + \def\Xpatch{0} + \ifx\patchdate\Xpatch\else + \edef\@date{\@date\space Patch level\patchdate} + \fi +\else + \@warning{plpatch.ltx does not match plvers.dtx!} + \let\includeltpatch\relax +\fi +\makeatother + +\pagenumbering{roman} +\maketitle +\renewcommand\maketitle{} +\tableofcontents +\clearpage +\pagenumbering{arabic} + +\DocInclude{plvers} % pLaTeX version + +\DocInclude{plfonts} % NFSS2 commands + +\DocInclude{plcore} % kernel commands + +\DocInclude{plext} % external commands + +\DocInclude{pl209} % 2.09 compatibility mode commands + +\DocInclude{kinsoku} % kinsoku parameter + +\DocInclude{jclasses} % Standard class + +\DocInclude{jltxdoc} % dtx documents class + +\includeltpatch % patch file + +% \end{macrocode} +% \file{ltxdoc.cfg}に|\AtEndOfClass{\OnlyDescription}|が指定されている場合は、 +% ここで終了します。 +% \begin{macrocode} +\StopEventually{\end{document}} + +% \end{macrocode} +% 変更履歴と索引を組版します。 +% 変更履歴ファイルと索引の作り方の詳細については、 +% おまけ\ref{app:shprog}を参照してください。 +% \begin{macrocode} +\clearpage +\pagestyle{headings} +% Make TeX shut up. +\hbadness=10000 +\newcount\hbadness +\hfuzz=\maxdimen +% +\PrintChanges +\clearpage +% +\begingroup + \def\endash{--} + \catcode`\-\active + \def-{\futurelet\temp\indexdash} + \def\indexdash{\ifx\temp-\endash\fi} + + \PrintIndex +\endgroup +% \end{macrocode} +% \file{ltxdoc.cfg}に2度目の|\PrintIndex|が指定されているかもしれません。 +% そこで、最後に、変更履歴や索引が2度組版されないように|\PrintChanges|および +% |\PrintIndex|コマンドを何も実行しないようにします。 +% \begin{macrocode} +\let\PrintChanges\relax +\let\PrintIndex\relax +\end{document} +% +% \end{macrocode} +% +% +% +% \section{おまけプログラム}\label{app:omake} +% +% \subsection{シェルスクリプト\file{mkpldoc.sh}}\label{app:shprog} +% ここでは、p\LaTeXe{}のマクロ定義ファイルをまとめて組版するときに便利な、 +% シェルスクリプト\footnote{このシェルスクリプトはUNIX用です。 +% しかしrmコマンドをdeleteコマンドにするなどすれば、簡単にDOSなどのバッチ +% ファイルに修正することができます。}について説明をしています。 +% また、このシェルスクリプトを取り出すための、 +% \dst{}バッチファイルについても説明をしています。 +% +% このシェルスクリプトの使用方法は次のとおりです。 +% \begin{verbatim} +% sh mkpldoc.sh +% \end{verbatim} +% +% \subsubsection{\file{mkpldoc.sh}の内容} +% まず、以前に\file{pldoc.tex}を処理したときに作成された、 +% 目次ファイルや索引ファイルなどを削除します。 +% \changes{v1.0c}{1997/01/23}{Don't copy gind.ist and gglo.ist from +% \$TEXMF/tex/latex2e/base directory.} +% \begin{macrocode} +%<*shprog> +rm pldoc.toc pldoc.idx pldoc.glo +% \end{macrocode} +% そして、\file{ltxdoc.cfg}を空にします。 +% このファイルは、\file{jltxdoc.cls}の定義を変更するものですが、 +% ここでは、変更されたくありません。 +% \begin{macrocode} +echo "" > ltxdoc.cfg +% \end{macrocode} +% そして、\file{pldoc.tex}を処理します。 +% \begin{macrocode} +platex pldoc.tex +% \end{macrocode} +% 索引と変更履歴を作成します。 +% このスクリプトでは、変更履歴や索引を生成するのにmendexプログラムを用いて +% います。mendexはmakeindexの上位互換のファイル整形コマンドで、 +% 索引語の読みを自動的に付けるなどの機能があります。 +% +% |-s|オプションは、索引ファイルを整形するためのスタイルオプションです。 +% 索引用の\file{gind.ist}と変更履歴用の\file{gglo.ist}は、 +% \LaTeX{}のディストリビューションに付属しています。 +% +% |-o|は、出力するファイル名を指定するオプションです。 +% +% |-f|は、項目に``読み''がなくてもエラーとしないオプションです。 +% makeindexコマンドには、このオプションがありません。 +% \begin{macrocode} +mendex -s gind.ist -d pldoc.dic -o pldoc.ind pldoc.idx +mendex -f -s gglo.ist -o pldoc.gls pldoc.glo +% \end{macrocode} +% \file{ltxdoc.cfg}の内容を|\includeonly{}|にし、\file{pldoc.tex}を処理します。 +% このコマンドは、引数に指定されたファイルだけを``|\include|''するための +% コマンドですが、ここでは何も|\include|したく\emph{ない}ので、 +% 引数には何も指定をしません。 +% しかし、|\input|で指定されているファイルは読み込まれます。 +% したがって、目次や索引や変更履歴のファイルが処理されます。 +% この処理は、主に、これらでエラーが出るかどうかの確認です。 +% \begin{macrocode} +echo "\includeonly{}" > ltxdoc.cfg +platex pldoc.tex +% \end{macrocode} +% 最後に、再び\file{ltxdoc.cfg}を空にして、\file{pldoc.tex}を処理をします。 +% 本文を1ページから開始していますので、この後、もう一度処理をする +% 必要はありません。 +% \begin{macrocode} +echo "" > ltxdoc.cfg +platex pldoc.tex +# EOT +% +% \end{macrocode} +% +% +% \subsection{perlスクリプト\file{dstcheck.pl}}\label{app:plprog} +% \dst{}文書ファイルは、\LaTeX{}のソースとその文書を同時に管理する方法として、 +% とてもすぐれていると思います。しかし、たとえば\file{jclasses.dtx}のように、 +% 条件が多くなると、入れ子構造がわからなくなってしまいがちです。 +% \LaTeX{}で処理すれば、エラーによってわかりますが、 +% 文書ファイルが大きくなると面倒です。 +% +% ここでは、\dst{}文書ファイルの入れ子構造を調べるのに便利な、 +% perlスクリプトについて説明をしています。 +% +% このperlスクリプトの使用方法は次のとおりです。 +% +% \begin{verbatim} +% perl dstcheck.pl file-name +% \end{verbatim} +% +% \subsubsection{\file{dstcheck.pl}の内容} +% 最初に、このperlスクリプトが何をするのかを簡単に記述したコメントを +% 付けます。 +% \begin{macrocode} +%<*plprog> +## +## DOCSTRIP 文書内の環境や条件の入れ子を調べる perl スクリプト +## +% \end{macrocode} +% このスクリプトは、入れ子の対応を調べるために、次のスタックを用います。 +% \meta{条件}あるいは\meta{環境}を開始するコードが現れたときに、 +% それらはスタックにプッシュされ、終了するコードでポップされます。 +% したがって、現在の\meta{条件}あるいは\meta{環境}と、 +% スタックから取り出した\meta{条件}あるいは\meta{環境}と一致すれば、 +% 対応が取れているといえます。そうでなければエラーです。 +% +% |@dst|スタックには、\meta{条件}が入ります。 +% 条件の開始は、``|%<*|\meta{条件}|>|''です。 +% 条件の終了は、``|%|''です。 +% \meta{条件}には、|>|文字が含まれません。 +% |@env|スタックには、\meta{環境}が入ります。 +% +% 先頭を明示的に示すために、ダミーの値を初期値として用います。 +% スタックは、\meta{条件}あるいは\meta{環境}の名前と、その行番号をペアにして +% 操作をします。 +% \begin{macrocode} +push(@dst,"DUMMY"); push(@dst,"000"); +push(@env,"DUMMY"); push(@env,"000"); +% \end{macrocode} +% この|while|ループの中のスクリプトは、文書ファイルの1行ごとに実行をします。 +% \begin{macrocode} +while (<>) { +% \end{macrocode} +% 入力行が条件を開始する行なのかを調べます。 +% 条件の開始行ならば、|@dst|スタックに\meta{条件}と行番号をプッシュします。 +% \begin{macrocode} + if (/^%<\*([^>]+)>/) { # check conditions + push(@dst,$1); + push(@dst,$.); +% \end{macrocode} +% そうでなければ、条件の終了行なのかを調べます。 +% 現在行が条件の終了を示している場合は、|@dst|スタックをポップします。 +% \begin{macrocode} + } elsif (/^%<\/([^>]+)>/) { + $linenum = pop(@dst); + $conditions = pop(@dst); +% \end{macrocode} +% 現在行の\meta{条件}と、スタックから取り出した\meta{条件}が一致しない場合、 +% その旨のメッセージを出力します。 +% +% なお、|DUMMY|と一致した場合は、一番外側のループが合っていないと +% いうことを示しています。このとき、これらのダミー値をスタックに戻します。 +% いつでもスタックの先頭をダミー値にするためです。 +% \begin{macrocode} + if ($1 ne $conditions) { + if ($conditions eq "DUMMY") { + print "$ARGV: `' (l.$.) is not started.\n"; + push(@dst,"DUMMY"); + push(@dst,"000"); + } else { + print "$ARGV: `<*$conditions>' (l.$linenum) is ended "; + print "by `<*$1>' (l.$.)\n"; + } + } + } +% \end{macrocode} +% 環境の入れ子も条件と同じように調べます。 +% +% verbatim環境のときに、その内側をスキップしていることに注意をしてください。 +% \begin{macrocode} + if (/^% *\\begin\{verbatim\}/) { # check environments + while(<>) { + last if (/^% *\\end\{verbatim\}/); + } + } elsif (/^% *\\begin\{([^{}]+)\}\{(.*)\}/) { + push(@env,$1); + push(@env,$.); + } elsif (/^% *\\begin\{([^{}]+)\}/) { + push(@env,$1); + push(@env,$.); + } elsif (/^% *\\end\{([^{}]+)\}/) { + $linenum = pop(@env); + $environment = pop(@env); + if ($1 ne $environment) { + if ($environment eq "DUMMY") { + print "$ARGV: `\\end{$1}' (l.$.) is not started.\n"; + push(@env,"DUMMY"); + push(@env,"000"); + } else { + print "$ARGV: \\begin{$environement} (l.$linenum) is ended "; + print "by \\end{$1} (l.$.)\n"; + } + } + } +% \end{macrocode} +% ここまでが、最初の|while|ループです。 +% \begin{macrocode} +} +% \end{macrocode} +% 文書ファイルを読み込んだ後、終了していない条件があるかどうかを確認します。 +% すべての条件の対応がとれていれば、この時点での|@dst|スタックには +% ダミー値しか入っていません。したがって、対応が取れている場合は、 +% 最初の2つのポップによって、ダミー値が設定されます。 +% ダミー値でなければ、ダミー値になるまで、取り出した値を出力します。 +% \begin{macrocode} +$linenum = pop(@dst); +$conditions = pop(@dst); +while ($conditions ne "DUMMY") { + print "$ARGV: `<*$conditions>' (l.$linenum) is not ended.\n"; + $linenum = pop(@dst); + $conditions = pop(@dst); +} +% \end{macrocode} +% 環境の入れ子についても、条件の入れ子と同様に確認をします。 +% \begin{macrocode} +$linenum = pop(@env); +$environment = pop(@env); +while ($environment ne "DUMMY") { + print "$ARGV: `\\begin{$environment}' (l.$linenum) is not ended.\n"; + $linenum = pop(@env); + $environment = pop(@env); +} +exit; +% +% \end{macrocode} +% +% \subsection{\dst{}バッチファイル} +% \changes{v1.0b}{1996/02/01}{\dst{}にともなう変更} +% \changes{v1.0c}{1997/01/23}{\dst{}にともなう変更} +% ここでは、付録\ref{app:shprog}と付録\ref{app:plprog}で説明をした二つの +% スクリプトを、このファイルから取り出すための\dst{}バッチファイルについて +% 説明をしています。 +% +% まず、\dst{}パッケージをロードします。 +% また、実行経過のメッセージを出力しないようにしています。 +% \begin{macrocode} +%<*Xins> +\input docstrip +\keepsilent +% \end{macrocode} +% \dst{}プログラムは、連続する二つのパーセント記号(\%\%)ではじまる行を +% メタコメントとみなし、条件によらず出力をします。 +% しかし、``\%''は\TeX{}ではコメントであっても、shやperlにとってはコメント +% ではありません。そこで、メタコメントとして出力する文字を``\#\#''と +% 変更します。 +% \begin{macrocode} +{\catcode`#=12 \gdef\MetaPrefix{## }} +% \end{macrocode} +% そして、プリアンブルに出力されるメッセージを宣言します。 +% ここでは、とくに何も指定していませんが、宣言をしないとデフォルトの記述が +% `\%\%'付きで出力されてしまうため、それを抑制する目的で使用しています。 +% \begin{macrocode} +\declarepreamble\thispre +\endpreamble +\usepreamble\thispre +% \end{macrocode} +% ポストアンブルも同様に、宣言をしないと`|\endinput|'が出力されます。 +% \begin{macrocode} +\declarepostamble\thispost +\endpostamble +\usepostamble\thispost +% \end{macrocode} +% |\generate|コマンドで、どのファイルに、どのファイルのどの部分を出力するのか +% を指定します。 +% \begin{macrocode} +\generate{ + \file{dstcheck.pl}{\from{platex.dtx}{plprog}} + \file{mkpldoc.sh}{\from{platex.dtx}{shprog}} +} +\endbatchfile +% +% \end{macrocode} +% +% \newpage +% \begin{thebibliography}{1} +% \bibitem{tex-book} +% Donald~E. Knuth. +% \newblock ``{\em The TeX Book}''. +% \newblock Addison-Wesley, 1984. +% \newblock (邦訳:斎藤信男監修, 鷺谷好輝訳, +% \TeX ブック 改訂新版, アスキー出版局, 1989) +% +% \bibitem{tate-book} +% インプレス・ラボ監修, アスキー書籍編集部編 +% \newblock 『縦組対応 パーソナル日本語\TeX{}』 +% \newblock アスキー出版局, 1994 +% +% \bibitem{latex-comp} +% Michel Goossens, Frank Mittelbach, Alexander Samarin. +% \newblock ``{\em The {\LaTeX} Companion}''. +% \newblock Addison-Wesley, 1994. +% +% \bibitem{latex-book2} +% Laslie Lamport. +% \newblock ``{\em {\LaTeX:} A Document Preparation System}''. +% \newblock Addison-Wesley, second edition, 1994. +% +% \bibitem{latex-book} +% Laslie Lamport. +% \newblock ``{\em {\LaTeX:} A Document Preparation System}''. +% \newblock Addison-Wesley, 1986. +% \newblock (邦訳:倉沢良一監修, 大野俊治・小暮博通・藤浦はる美訳, +% 文書処理システム \LaTeX, アスキー, 1990) +% +% \bibitem{jtex-tech} +% アスキー出版技術部責任編集 +% \newblock 『日本語\TeX テクニカルブックI』 +% \newblock アスキー, 1990. +% +% \bibitem{platex2e-book} +% 中野 賢 +% \newblock 『日本語\LaTeXe ブック』 +% \newblock アスキー, 1996. +% +% \bibitem{perl} +% 河野真治著 +% \newblock 『入門perl』 +% \newblock アスキー出版局, 1994 +% \end{thebibliography} +% +% \iffalse +% ここで、このあとに組版されるかもしれない文書のために、 +% 節見出しの番号を算用数字に戻します。 +% \fi +% +% \renewcommand{\thesection}{\arabic{section}} +% +% \Finale +% +\endinput diff --git a/Master/texmf-dist/source/uplatex/base/uplcls.ins b/Master/texmf-dist/source/uplatex/base/uplcls.ins new file mode 100644 index 00000000000..a3ff1606099 --- /dev/null +++ b/Master/texmf-dist/source/uplatex/base/uplcls.ins @@ -0,0 +1,38 @@ +\input docstrip +\keepsilent +\ifToplevel{\askonceonly} +\usedir{tex/uplatex/base} + +\Msg{*** Generating the upLaTeX class files ***} + +% +% 横組用クラスファイル +% +\generate{ + \file{ujarticle.cls}{\from{ujclasses.dtx}{article,yoko}} + \file{ujreport.cls}{\from{ujclasses.dtx}{report,yoko}} + \file{ujbook.cls}{\from{ujclasses.dtx}{book,yoko}} + \file{ujsize10.clo}{\from{ujclasses.dtx}{10pt,yoko}} + \file{ujsize11.clo}{\from{ujclasses.dtx}{11pt,yoko}} + \file{ujsize12.clo}{\from{ujclasses.dtx}{12pt,yoko}} + \file{ujbk10.clo}{\from{ujclasses.dtx}{10pt,bk,yoko}} + \file{ujbk11.clo}{\from{ujclasses.dtx}{11pt,bk,yoko}} + \file{ujbk12.clo}{\from{ujclasses.dtx}{12pt,bk,yoko}} +} + +% +% 縦組用クラスファイル +% +\generate{ + \file{utarticle.cls}{\from{ujclasses.dtx}{article,tate}} + \file{utreport.cls}{\from{ujclasses.dtx}{report,tate}} + \file{utbook.cls}{\from{ujclasses.dtx}{book,tate}} + \file{utsize10.clo}{\from{ujclasses.dtx}{10pt,tate}} + \file{utsize11.clo}{\from{ujclasses.dtx}{11pt,tate}} + \file{utsize12.clo}{\from{ujclasses.dtx}{12pt,tate}} + \file{utbk10.clo}{\from{ujclasses.dtx}{10pt,bk,tate}} + \file{utbk11.clo}{\from{ujclasses.dtx}{11pt,bk,tate}} + \file{utbk12.clo}{\from{ujclasses.dtx}{12pt,bk,tate}} +} + +\endbatchfile diff --git a/Master/texmf-dist/source/uplatex/base/uplfmt.ins b/Master/texmf-dist/source/uplatex/base/uplfmt.ins new file mode 100644 index 00000000000..300082f57b2 --- /dev/null +++ b/Master/texmf-dist/source/uplatex/base/uplfmt.ins @@ -0,0 +1,24 @@ +\input docstrip +\keepsilent +\usedir{tex/uplatex/base} +\ifToplevel{\askonceonly} + +\Msg{*** Generating the upLaTeX files for making the documents ***} + +\generate{ + \file{uplatex.ltx}{\from{uplatex.dtx}{plcore}} + \file{uplcore.ltx}{\from{uplvers.dtx}{plcore} + \from{uplfonts.dtx}{plcore} + \from{plcore.dtx}{plcore} + \from{uplvers.dtx}{plfinal}} + \file{ukinsoku.tex}{\from{ukinsoku.dtx}{plcore}} + \file{upldefs.ltx}{\from{uplfonts.dtx}{pldefs,xpt}} + \file{jy2mc.fd}{\from{uplfonts.dtx}{JY2mc}} + \file{jy2gt.fd}{\from{uplfonts.dtx}{JY2gt}} + \file{jt2mc.fd}{\from{uplfonts.dtx}{JT2mc}} + \file{jt2gt.fd}{\from{uplfonts.dtx}{JT2gt}} +% \file{plext.sty}{\from{plext.dtx}{package}} + \file{uptrace.sty}{\from{uplfonts.dtx}{trace}} +} + +\endbatchfile diff --git a/Master/texmf-dist/source/uplatex/base/uplfonts.dtx b/Master/texmf-dist/source/uplatex/base/uplfonts.dtx new file mode 100644 index 00000000000..8dfb4d48195 --- /dev/null +++ b/Master/texmf-dist/source/uplatex/base/uplfonts.dtx @@ -0,0 +1,1875 @@ +% \iffalse meta-comment +%% File: uplfonts.dtx +% +% pLaTeX fonts files: +% Copyright 1995-2001 ASCII Corporation. +% and modified for upLaTeX +% +% This file is part of the upLaTeX2e system. +% ------------------------------------- +% +% \fi +% +% \CheckSum{1685} +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +% +% \setcounter{StandardModuleDepth}{1} +% \StopEventually{} +% +% \iffalse +% \changes{v1.0}{1994/09/16}{first edition} +% \changes{v1.1}{1995/02/21}{\cs{selectfont}アルゴリズム変更} +% \changes{v1.1b}{1995/04/25}{\cs{selectfont}修正} +% \changes{v1.1c}{1995/08/22}{縦横フォント同時切り替え} +% \changes{v1.2}{1995/11/09}{\cs{DeclareFixedFont}の日本語化} +% \changes{v1.3}{1996/03/25}{数式ファミリの定義変更} +% \changes{v1.3a}{1997/01/25}{\LaTeX\ \texttt{!<1996/12/01!>に対応}} +% \changes{v1.3b}{1997/01/28}{\cs{textmc}, \cs{textgt}の動作修正} +% \changes{v1.3c}{1997/04/08}{和文エンコード関連の修正} +% \changes{v1.3d}{1997/06/25}{\cs{em},\cs{emph}で和文を強調書体に} +% \changes{v1.3e}{1997/07/10}{fdファイル名の小文字化が効いていなかったのを修正} +% \changes{v1.3f}{1998/08/10}{\cs{DeclareFixedCommand}を\cs{@onlypreamble}に +% してしまっていたのを修正} +% \changes{v1.3g}{1999/04/05}{plpatch.ltxの内容を反映} +% \changes{v1.3h}{1999/08/09}{\cs{strut}の改善} +% \changes{v1.3i}{2000/07/13}{\cs{text..}コマンドの左側に\cs{xkanjiskip}が +% 入らないのを修正} +% \changes{v1.3j}{2000/10/24}{\cs{adjustbaseline}で余分なアキが入らない +% ようにした} +% \changes{v1.3k}{2001/05/10}{\cs{adjustbaseline}の調整量} +% \changes{v1.3l}{2002/04/05}{\cs{adjustbaseline}でフォントの基準値が縦書き +% 以外では設定されないのを修正} +% \changes{v1.3m}{2004/06/14}{\cs{fontfamily}コマンド内部フラグ変更} +% \changes{v1.3n}{2004/08/10}{和文エンコーディングの切り替えを有効化} +% \changes{v1.3o}{2005/01/04}{\cs{fontfamily}中のフラグ修正} +% \changes{v1.3p}{2006/01/04}{\cs{DeclareFontEncoding@}中で +% \cs{LastDeclaredEncodeng}の再定義が抜けていたので追加} +% \changes{v1.4}{2006/06/27}{\cs{reDeclareMathAlphabet}を修正。 +% ありがとう、ymtさん。} +% \changes{v1.5}{2006/11/10}{\cs{reDeclareMathAlphabet}を修正。 +% ありがとう、ymtさん。} +% \changes{v1.5_u01}{2011/05/07}{pLaTeX用からupLaTeX用に修正。} +% \fi +% +% \iffalse +%<*driver> +\NeedsTeXFormat{pLaTeX2e} +% \fi +\ProvidesFile{uplfonts.dtx}[2011/05/07 v1.5_u00 upLaTeX New Font Selection Scheme] +% \iffalse +\documentclass{jltxdoc} +\GetFileInfo{uplfonts.dtx} +\title{up\LaTeXe{}のフォントコマンド\space\fileversion} +\author{Ken Nakano \& Hideaki Togashi \& TTK} +\date{作成日:\filedate} +\begin{document} + \maketitle + \tableofcontents + \DocInput{\filename} +\end{document} +% +% \fi +% +% \section{概要}\label{plfonts:intro} +% ここでは、和文書体を\NFSS2のインターフェイスで選択するための +% コマンドやマクロについて説明をしています。 +% また、フォント定義ファイルや初期設定ファイルなどの説明もしています。 +% 新しいフォント選択コマンドの使い方については、\file{fntguide.tex}や +% \file{usrguide.tex}を参照してください。 +% +% \begin{description} +% \item[第\ref{plfonts:intro}節] この節です。このファイルの概要と +% \dst{}プログラムのためのオプションを示しています。 +% \item[第\ref{plfonts:codes}節] 実際のコードの部分です。 +% \item[第\ref{plfonts:pldefs}節] プリロードフォントやエラーフォントなどの +% 初期設定について説明をしています。 +% \item[第\ref{plfonts:fontdef}節] フォント定義ファイルについて +% 説明をしています。 +% \end{description} +% +% +% \subsection{\dst{}プログラムのためのオプション} +% \dst{}プログラムのためのオプションを次に示します。 +% +% \DeleteShortVerb{\|} +% \begin{center} +% \begin{tabular}{l|p{0.7\linewidth}} +% \emph{オプション} & \emph{意味}\\\hline +% plcore & \file{uplfonts.ltx}を生成します。\\ +% trace & \file{uptrace.sty}を生成します。\\ +% JY2mc & 横組用、明朝体のフォント定義ファイルを生成します。\\ +% JY2gt & 横組用、ゴシック体のフォント定義ファイルを生成します。\\ +% JT2mc & 縦組用、明朝体のフォント定義ファイルを生成します。\\ +% JT2gt & 縦組用、ゴシック体のフォント定義ファイルを生成します。\\ +% pldefs & \file{upldefs.ltx}を生成します。次の4つのオプションを付加する +% ことで、プリロードするフォントを選択することができます。 +% デフォルトは10ptです。\\ +% xpt & 10pt プリロード\\ +% xipt & 11pt プリロード\\ +% xiipt & 12pt プリロード\\ +% ori & \file{plfonts.tex}に似たプリロード\\ +% \end{tabular} +% \end{center} +% \MakeShortVerb{\|} +% +% +% +% \section{コード}\label{plfonts:codes} +% この節で、具体的に\NFSS2を拡張するコマンドやマクロの定義を行なっています。 +% +% \subsection{準備} +% \NFSS2を拡張するための準備です。 +% 和文フォントの属性を格納するオブジェクトや長さ変数、 +% 属性を切替える際の判断材料として使うリストなどを定義しています。 +% +% +% \subsubsection{和文フォント属性} +% ここでは、和文フォントの属性を格納するためのオブジェクトについて +% 説明をしています。 +% +% \begin{macro}{\k@encoding} +% \begin{macro}{\ck@encoding} +% \begin{macro}{\cy@encoding} +% \begin{macro}{\ct@encoding} +% 和文エンコードを示すオブジェクトです。 +% |\ck@encoding|は、最後に選択された和文エンコード名を示しています。 +% |\cy@encoding|と|\ct@encoding|はそれぞれ、最後に選択された、 +% 横組用と縦組用の和文エンコード名を示しています。 +% \begin{macrocode} +%<*plcore> +\let\k@encoding\@empty +\let\ck@encoding\@empty +\def\cy@encoding{JY2} +\def\ct@encoding{JT2} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\k@family} +% 和文書体のファミリを示すオブジェクトです。 +% \begin{macrocode} +\let\k@family\@empty +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\k@series} +% 和文書体のシリーズを示すオブジェクトです。 +% \begin{macrocode} +\let\k@series\@empty +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\k@shape} +% 和文書体のシェイプを示すオブジェクトです。 +% \begin{macrocode} +\let\k@shape\@empty +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\curr@kfontshape} +% 現在の和文フォント名を示すオブジェクトです。 +% \begin{macrocode} +\def\curr@kfontshape{\k@encoding/\k@family/\k@series/\k@shape} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\rel@fontshape} +% 関連付けされたフォント名を示すオブジェクトです。 +% \begin{macrocode} +\def\rel@fontshape{\f@encoding/\f@family/\f@series/\f@shape} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{長さ変数} +% ここでは、和文フォントの幅や高さなどを格納する変数について説明をしています。 +% +% 頭文字が大文字の変数は、ノーマルサイズの書体の大きさで、基準値となります。 +% これらは、\file{jart10.clo}などの補助クラスファイルで設定されます。 +% +% 小文字だけからなる変数は、 +% フォントが変更されたときに(|\selectfont|内で)更新されます。 +% +% \begin{macro}{\Cht} +% \begin{macro}{\cht} +% |\Cht|は基準となる和文フォントの文字の高さを示します。 +% |\cht|は現在の和文フォントの文字の高さを示します。 +% なお、この``高さ''はベースラインより上の長さです。 +% \begin{macrocode} +\newdimen\Cht +\newdimen\cht +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\Cdp} +% \begin{macro}{\cdp} +% |\Cdp|は基準となる和文フォントの文字の深さを示します。 +% |\cdp|は現在の和文フォントの文字の深さを示します。 +% なお、この``深さ''はベースラインより下の長さです。 +% \begin{macrocode} +\newdimen\Cdp +\newdimen\cdp +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\Cwd} +% \begin{macro}{\cwd} +% |\Cwd|は基準となる和文フォントの文字の幅を示します。 +% |\cwd|は現在の和文フォントの文字の幅を示します。 +% \begin{macrocode} +\newdimen\Cwd +\newdimen\cwd +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\Cvs} +% \begin{macro}{\cvs} +% |\Cvs|は基準となる行送りを示します。 +% ノーマルサイズの|\baselineskip|と同値です。 +% |\cvs|は現在の行送りを示します。 +% \begin{macrocode} +\newdimen\Cvs +\newdimen\cvs +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\Chs} +% \begin{macro}{\chs} +% |\Chs|は基準となる字送りを示します。|\Cwd|と同値です。 +% |\chs|は現在の字送りを示します。 +% \begin{macrocode} +\newdimen\Chs +\newdimen\chs +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\cHT} +% |\cHT|は、現在のフォントの高さに深さを加えた長さを示します。 +% |\set@fontsize|コマンド(実際は|\size@update|)で更新されます。 +% \begin{macrocode} +\newdimen\cHT +% \end{macrocode} +% \end{macro} +% +% \subsubsection{一時コマンド} +% +% \begin{macro}{\afont} +% \LaTeX{}内部の|\do@subst@correction|マクロでは、 +% |\fontname\font|で返される外部フォント名を用いて、 +% \LaTeX{}フォント名を定義しています。したがって、|\font|をそのまま使うと、 +% 和文フォント名に欧文の外部フォントが登録されたり、 +% 縦組フォント名に横組用の外部フォントが割り付けられたりしますので、 +% |\jfont|か|\tfont|を用いるようにします。 +% |\afont|は、|\font|コマンドの保存用です。 +% \begin{macrocode} +\let\afont\font +% \end{macrocode} +% \end{macro} +% +% +% \subsubsection{フォントリスト} +% ここでは、フォントのエンコードやファミリの名前を登録するリストについて +% 説明をしています。 +% +% p\LaTeXe{}の\NFSS2では、一つのコマンドで和文か欧文のいずれか、あるいは両方を +% 変更するため、コマンドに指定された引数が何を示すのかを判断しなくては +% なりません。この判断材料として、リストを用います。 +% +% このときの具体的な判断手順については、エンコード選択コマンドや +% ファミリ選択コマンドなどの定義を参照してください。 +% +% \begin{macro}{\inlist} +% 次のコマンドは、エンコードやファミリのリスト内に第二引数で指定された文字列 +% があるかどうかを調べるマクロです。 +% \begin{macrocode} +\def\inlist@#1#2{% + \def\in@@##1<#1>##2##3\in@@{% + \ifx\in@##2\in@false\else\in@true\fi}% + \in@@#2<#1>\in@\in@@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\enc@elt} +% \begin{macro}{\fam@elt} +% |\enc@elt|と|\fam@elt|は、登録されているエンコードに対して、 +% なんらかの処理を逐次的に行ないたいときに使用することができます。 +% \begin{macrocode} +\def\fam@elt{\noexpand\fam@elt} +\def\enc@elt{\noexpand\enc@elt} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\fenc@list} +% \begin{macro}{\kenc@list} +% \begin{macro}{\kyenc@list} +% \begin{macro}{\ktenc@list} +% |\fenc@list|には、|\DeclareFontEncoding|コマンドで宣言されたエンコード名が +% 格納されていきます。 +% +% |\kyenc@list|には、|\DeclareYokoKanjiEncoding|コマンドで宣言された +% エンコード名が格納されていきます。 +% |\ktenc@list|には、|\DeclareTateKanjiEncoding|コマンドで宣言された +% エンコード名が格納されていきます。 +% +% \changes{v1.1b}{1995/03/28}{リストの初期値を変更} +% \changes{v1.1b}{1995/05/10}{リスト内の空白を削除} +% +% ここで、これらのリストに具体的な値を入れて初期化をするのは、 +% リストにエンコードの登録をするように|\DeclareFontEncoding|を再定義 +% する前に、欧文エンコードが宣言されるため、リストに登録されないからです。 +% \changes{v1.1}{1997/01/25}{Add TS1 encoding to the starting member of +% \cs{fenc@list}.} +% \begin{macrocode} +\def\fenc@list{\enc@elt\enc@elt\enc@elt\enc@elt% + \enc@elt\enc@elt\enc@elt} +\let\kenc@list\@empty +\let\kyenc@list\@empty +\let\ktenc@list\@empty +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\kfam@list} +% \begin{macro}{\ffam@list} +% \begin{macro}{\notkfam@list} +% \begin{macro}{\notffam@list} +% |\kfam@list|には、|\DeclareKanjiFamily|コマンドで宣言されたファミリ名が +% 格納されていきます。 +% +% |\ffam@list|には、|\DeclareFontFamily|コマンドで宣言されたファミリ名が +% 格納されていきます。 +% +% |\notkfam@list|には、和文ファミリではないと推測されたファミリ名が +% 格納されていきます。このリストは|\fontfamily|コマンドで作成されます。 +% +% |\notffam@list|には欧文ファミリではないと推測されたファミリ名が +% 格納されていきます。このリストは|\fontfamily|コマンドで作成されます。 +% +% \changes{v1.1b}{1995/03/28}{リストの初期値を変更} +% \changes{v1.1b}{1995/05/10}{リスト内の空白を削除} +% +% ここで、これらのリストに具体的な値を入れて初期化をするのは、 +% リストにファミリの登録をするように、|\DeclareFontFamily|が +% 再定義される前に、このコマンドが使用されるため、 +% リストに登録されないからです。 +% \begin{macrocode} +\def\kfam@list{\fam@elt\fam@elt} +\def\ffam@list{\fam@elt\fam@elt\fam@elt% + \fam@elt\fam@elt\fam@elt} +% \end{macrocode} +% \changes{v1.1c}{1996/03/06}{\cs{notkfam@list}と\cs{notffam@list}の +% 初期値を変更} +% つぎの二つのリストの初期値として、上記の値を用います。 +% これらのファミリ名は、和文でないこと、欧文でないことがはっきりしています。 +% \begin{macrocode} +\let\notkfam@list\ffam@list +\let\notffam@list\kfam@list +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \subsubsection{支柱} +% 行間の調整などに用いる支柱です。 +% 支柱のもととなるボックスの大きさは、フォントサイズが変更されるたびに、 +% |\set@fontsize|コマンドによって変化します。 +% +% フォントサイズが変更されたときに、|\set@fontsize|コマンドで更新されます。 +% +% \begin{macro}{\tstrutbox} +% \begin{macro}{\zstrutbox} +% |\tstrutbox|は高さと深さが5対5、 +% |\zstrutbox|は高さと深さが7対3の支柱ボックスとなります。 +% これらは縦組ボックスの行間の調整などに使います。 +% なお、横組ボックス用の支柱は|\strutbox|で、高さと深さが7対3となっています。 +% \begin{macrocode} +\newbox\tstrutbox +\newbox\zstrutbox +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\strut} +% \begin{macro}{\tstrut} +% \begin{macro}{\zstrut} +% |\strutbox|は|\yoko|ディレクションで組まれていますので、 +% 縦組ボックス内で|\unhcopy|をするとエラーとなります。 +% このマクロは\file{ltplain.dtx}で定義されています。 +% +% \changes{v1.1c}{1995/08/24}{``\cs{centerling}~\cs{strut}''の幅がゼロに +% なってしまうのを修正} +% \changes{v1.3h}{1999/08/09}{縦組のとき、幅のあるボックスになってしまう +% のを修正} +% \begin{macrocode} +\def\strut{\relax + \ifydir + \ifmmode\copy\strutbox\else\unhcopy\strutbox\fi + \else + \ifmmode\copy\tstrutbox\else\unhcopy\tstrutbox\fi + \fi} +\def\tstrut{\relax\hbox{\tate + \ifmmode\copy\tstrutbox\else\unhcopy\tstrutbox\fi}} +\def\zstrut{\relax\hbox{\tate + \ifmmode\copy\zstrutbox\else\unhcopy\zstrutbox\fi}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% +% \subsection{コマンド} +% 次のコマンドの定義をしています。 +% +% \DeleteShortVerb{\|} +% \MakeShortVerb{\+} +% \begin{center} +% \begin{tabular}{l|l} +% \emph{コマンド} & \emph{意味}\\\hline +% +\Declare{Font|YokoKanji|TateKanji}Encoding+ & エンコードの宣言\\ +% +\Declare{Yoko|Tate}KanjiEncodingDefaults+ & +% デフォルトの和文エンコードの宣言\\ +% +\Declare{Font|Kanji}Family+ & ファミリの宣言\\ +% +\DeclareKanjiSubstitution+ & 和文の代用フォントの宣言\\ +% +\DeclareErrorKanjiFont+ & 和文のエラーフォントの宣言 \\ +% +\DeclareFixedFont+ & フォントの名前の宣言 \\ +% +\reDeclareMathAlphabet+ & 和欧文を同時に切り替えるコマンド宣言\\ +% +\{Declare|Set}RelationFont+ & 従属書体の宣言\\ +% +\userelfont+ & 欧文書体を従属書体にする\\ +% +\selectfont+ & フォントを切り替える\\ +% +\set@fontsize+ & フォントサイズの変更\\ +% +\adjustbaseline+ & ベースラインシフト量の設定\\ +% +\{font|roman|kanji}encoding+ & エンコードの指定\\ +% +\{font|roman|kanji}family+ & ファミリの指定\\ +% +\{font|roman|kanji}series+ & シリーズの指定\\ +% +\{font|roman|kanji}shape+ & シェイプの指定\\ +% +\use{font|roman|kanji}+ & 書体の切り替え\\ +% +\normalfont+ & デフォルト値の設定に切り替える\\ +% +\mcfamily+,+\gtfamily+ & 和文書体を明朝体、ゴシック体にする\\ +% +\textunderscore+ & テキストモードでの下線マクロ\\ +% \end{tabular} +% \end{center} +% \DeleteShortVerb{\+} +% \MakeShortVerb{\|} +% +% +% \begin{macro}{\DeclareFontEncoding} +% \begin{macro}{\DeclareFontEncoding@} +% 欧文エンコードを宣言するためのコマンドです。 +% \file{ltfssbas.dtx}で定義されているものを、 +% |\fenc@list|を作るように再定義をしています。 +% \changes{v1.3p}{2006/01/04}{\cs{DeclareFontEncoding@}中で +% \cs{LastDeclaredEncodeng}の再定義が抜けていたので追加} +% \begin{macrocode} +\def\DeclareFontEncoding{% + \begingroup + \nfss@catcodes + \expandafter\endgroup + \DeclareFontEncoding@} +% +\def\DeclareFontEncoding@#1#2#3{% + \expandafter + \ifx\csname T@#1\endcsname\relax + \def\cdp@elt{\noexpand\cdp@elt}% + \xdef\cdp@list{\cdp@list\cdp@elt{#1}% + {\default@family}{\default@series}% + {\default@shape}}% + \expandafter\let\csname#1-cmd\endcsname\@changed@cmd + \def\enc@elt{\noexpand\enc@elt}% + \xdef\fenc@list{\fenc@list\enc@elt<#1>}% + \else + \@font@info{Redeclaring font encoding #1}% + \fi + \global\@namedef{T@#1}{#2}% + \global\@namedef{M@#1}{\default@M#3}% + \xdef\LastDeclaredEncoding{#1}% + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% \begin{macro}{\DeclareKanjiEncoding} +% \begin{macro}{\DeclareYokoKanjiEncoding} +% \begin{macro}{\DeclareYokoKanjiEncoding@} +% \begin{macro}{\DeclareTateKanjiEncoding} +% \begin{macro}{\DeclareTateKanjiEncoding@} +% 和文エンコードの宣言をするコマンドです。 +% \changes{v1.3c}{1997/04/08}{和文エンコード宣言コマンドを縦組用と横組用で +% 分けるようにした。} +% \begin{macrocode} +\def\DeclareKanjiEncoding#1{% + \@latex@warning{% + The \string\DeclareKanjiEncoding\space is obsoleted command. Please use + \MessageBreak + the \string\DeclareTateKanjiEncoding\space for `Tate-kumi' encoding, and + \MessageBreak + the \string\DeclareYokoKanjiEncoding\space for `Yoko-kumi' encoding. + \MessageBreak + I treat the `#1' encoding as `Yoko-kumi'.} + \DeclareYokoKanjiEncoding{#1}% +} +\def\DeclareYokoKanjiEncoding{% + \begingroup + \nfss@catcodes + \expandafter\endgroup + \DeclareYokoKanjiEncoding@} +% +\def\DeclareYokoKanjiEncoding@#1#2#3{% + \expandafter + \ifx\csname T@#1\endcsname\relax + \def\cdp@elt{\noexpand\cdp@elt}% + \xdef\cdp@list{\cdp@list\cdp@elt{#1}% + {\default@k@family}{\default@k@series}% + {\default@k@shape}}% + \expandafter\let\csname#1-cmd\endcsname\@changed@kcmd + \def\enc@elt{\noexpand\enc@elt}% + \xdef\kyenc@list{\kyenc@list\enc@elt<#1>}% + \xdef\kenc@list{\kenc@list\enc@elt<#1>}% + \else + \@font@info{Redeclaring KANJI (yoko) font encoding #1}% + \fi + \global\@namedef{T@#1}{#2}% + \global\@namedef{M@#1}{\default@KM#3}% + } +% +\def\DeclareTateKanjiEncoding{% + \begingroup + \nfss@catcodes + \expandafter\endgroup + \DeclareTateKanjiEncoding@} +% +\def\DeclareTateKanjiEncoding@#1#2#3{% + \expandafter + \ifx\csname T@#1\endcsname\relax + \def\cdp@elt{\noexpand\cdp@elt}% + \xdef\cdp@list{\cdp@list\cdp@elt{#1}% + {\default@k@family}{\default@k@series}% + {\default@k@shape}}% + \expandafter\let\csname#1-cmd\endcsname\@changed@kcmd + \def\enc@elt{\noexpand\enc@elt}% + \xdef\ktenc@list{\ktenc@list\enc@elt<#1>}% + \xdef\kenc@list{\kenc@list\enc@elt<#1>}% + \else + \@font@info{Redeclaring KANJI (tate) font encoding #1}% + \fi + \global\@namedef{T@#1}{#2}% + \global\@namedef{M@#1}{\default@KM#3}% + } +% +\@onlypreamble\DeclareKanjiEncoding +\@onlypreamble\DeclareYokoKanjiEncoding +\@onlypreamble\DeclareYokoKanjiEncoding@ +\@onlypreamble\DeclareTateKanjiEncoding +\@onlypreamble\DeclareTateKanjiEncoding@ +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \begin{macro}{\DeclareKanjiEncodingDefaults} +% 和文エンコードのデフォルト値を宣言するコマンドです。 +% \begin{macrocode} +\def\DeclareKanjiEncodingDefaults#1#2{% + \ifx\relax#1\else + \ifx\default@KT\@empty\else + \@font@info{Overwriting KANJI encoding scheme text defaults}% + \fi + \gdef\default@KT{#1}% + \fi + \ifx\relax#2\else + \ifx\default@KM\@empty\else + \@font@info{Overwriting KANJI encoding scheme math defaults}% + \fi + \gdef\default@KM{#2}% + \fi} +\let\default@KT\@empty +\let\default@KM\@empty +\@onlypreamble\DeclareKanjiEncodingDefaults +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\DeclareFontFamily} +% 欧文ファミリを宣言するためのコマンドです。 +% |\ffam@list|を作るように再定義をします。 +% \begin{macrocode} +\def\DeclareFontFamily#1#2#3{% + \@ifundefined{T@#1}% + {\@latex@error{Encoding scheme `#1' unknown}\@eha}% + {\edef\tmp@item{{#2}}% + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\ffam@list}% + \ifin@ \else + \def\fam@elt{\noexpand\fam@elt}% + \xdef\ffam@list{\ffam@list\fam@elt<#2>}% + \fi + \def\reserved@a{#3}% + \global + \expandafter\let\csname #1+#2\expandafter\endcsname + \ifx \reserved@a\@empty + \@empty + \else \reserved@a + \fi + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DeclareKanjiFamily} +% 欧文ファミリを宣言するためのコマンドです。 +% \begin{macrocode} +\def\DeclareKanjiFamily#1#2#3{% + \@ifundefined{T@#1}% + {\@latex@error{KANJI Encoding scheme `#1' unknown}\@eha}% + {\edef\tmp@item{{#2}}% + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\kfam@list}% + \ifin@ \else + \def\fam@elt{\noexpand\fam@elt}% + \xdef\kfam@list{\kfam@list\fam@elt<#2>}% + \fi + \def\reserved@a{#3}% + \global + \expandafter\let\csname #1+#2\expandafter\endcsname + \ifx \reserved@a\@empty + \@empty + \else \reserved@a + \fi + }% +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\DeclareKanjiSubstitution} +% \begin{macro}{\DeclareErrorKanjiFont} +% 目的の和文フォントが見つからなかったときに使うフォントの宣言をする +% コマンドです。 +% それぞれ、|\DeclareFontSubstitution|と|\DeclareErrorFont|に対応します。 +% \begin{macrocode} +\def\DeclareKanjiSubstitution#1#2#3#4{% + \expandafter\ifx\csname T@#1\endcsname\relax + \@latex@error{KANJI Encoding scheme `#1' unknown}\@eha + \else + \begingroup + \def\reserved@a{#1}% + \toks@{}% + \def\cdp@elt##1##2##3##4{% + \def\reserved@b{##1}% + \ifx\reserved@a\reserved@b + \addto@hook\toks@{\cdp@elt{#1}{#2}{#3}{#4}}% + \else + \addto@hook\toks@{\cdp@elt{##1}{##2}{##3}{##4}}% + \fi}% + \cdp@list + \xdef\cdp@list{\the\toks@}% + \endgroup + \global\@namedef{D@#1}{\def\default@family{#2}% + \def\default@series{#3}% + \def\default@shape{#4}}% + \fi} +% +\def\DeclareErrorKanjiFont#1#2#3#4#5{% + \xdef\error@kfontshape{% + \noexpand\expandafter\noexpand\split@name\noexpand\string + \expandafter\noexpand\csname#1/#2/#3/#4/#5\endcsname + \noexpand\@nil}% + \gdef\default@k@family{#2}% + \gdef\default@k@series{#3}% + \gdef\default@k@shape{#4}% + \global\let\k@family\default@k@family + \global\let\k@series\default@k@series + \global\let\k@shape\default@k@shape + \gdef\f@size{#5}% + \gdef\f@baselineskip{#5pt}} +% +\@onlypreamble\DeclareKanjiSubstitution +\@onlypreamble\DeclareErrorKanjiFont +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% \begin{macro}{\DeclareFixedFont} +% フォント名を宣言するコマンドです。 +% +% \changes{v1.2}{1995/11/09}{\cs{DeclareFixedFont}の日本語化} +% \changes{v1.3c}{1997/04/09}{縦横エンコード・リストの分離による拡張} +% \changes{v1.3f}{1998/08/10}{プリアンブル・コマンドにしてしまっていたのを解除} +% \begin{macrocode} +\def\DeclareFixedFont#1#2#3#4#5#6{% + \begingroup + \let\afont\font + \math@fontsfalse + \every@math@size{}% + \fontsize{#6}\z@ + \edef\tmp@item{{#2}}% + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\kyenc@list}% + \ifin@ + \usekanji{#2}{#3}{#4}{#5}% + \let\font\jfont + \else + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\ktenc@list}% + \ifin@ + \usekanji{#2}{#3}{#4}{#5}% + \let\font\tfont + \else + \useroman{#2}{#3}{#4}{#5}% + \let\font\afont + \fi + \fi + \global\expandafter\let\expandafter#1\the\font + \let\font\afont + \endgroup + } +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\reDeclareMathAlphabet} +% \changes{v1.0}{1997/01/30}{\cs{reDeclareMathAlphabet}を追加。 +% ありがとう、ymtさん。} +% \changes{v1.4}{2006/06/27}{\cs{reDeclareMathAlphabet}を修正。 +% ありがとう、ymtさん。} +% \changes{v1.5}{2006/11/10}{\cs{reDeclareMathAlphabet}を修正。 +% ありがとう、ymtさん。} +% 数式モード内で、数式文字用の和欧文フォントを同時に切り替えるコマンドです。 +% +% p\LaTeXe{}には、本来の動作モードと2.09互換モードの二つがあり、 +% 両モードで数式文字を変更するコマンドや動作が異なります。 +% 本来の動作モードでは、|\mathrm{...}|のように|\math??|に引数を指定して +% 使います。このときは引数にだけ影響します。2.09互換モードでは、|\rm|の +% ような二文字コマンドを使います。このコマンドには引数を取らず、書体は +% グルーピングの範囲で反映されます。二文字コマンドは、ネイティブモード +% でも使えるようになっていて、動作も2.09互換モードのコマンドと同じです。 +% +% しかし、内部的には|\math??|という一つのコマンドがすべての動作を受け持ち、 +% |\math??|コマンドや|\??|コマンドから呼び出された状態に応じて、動作を変え +% ています。したがって、欧文フォントと和文フォントの両方を一度に変更する、 +% 数式文字変更コマンドを作るとき、それぞれの状態に合った動作で動くように +% フォント切り替えコマンドを実行させる必要があります。 +% +% \textbf{使い方} +% \begin{verbatim} +% usage: \reDeclareMathAlphabet{\mathAA}{\mathBB}{\mathCC} +% \end{verbatim} +% 欧文・和文両用の数式文字変更コマンド |\mathAA| を(再)定義します。 +% 欧文用のコマンド |\mathBB| と、和文用の |\mathCC| を (p)\LaTeX{} 標準の +% 方法で定義しておいた後、上のように記述します。なお、|{\mathBB}{\mathCC}| +% の部分については |{\@mathBB}{\@mathCC}| のように @ をつけた記述 +% をしてもかまいません(互換性のため)。上のような命令を発行すると、 +% |\mathAA| が、欧文に対しては |\mathBB|、 和文に対しては |\mathCC| の意味を +% 持つようになります。 +% 通常は、|\reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc}| のように +% |AA=BB| として用います。また、|\mathrm| は \LaTeX{} kernel において +% 標準のコマンドとして既に定義されているので、この場合は |\mathrm| の +% 再定義となります。native mode での |\rm| のような two letter command +% (old font command) に対しても同様なことが引きおこります。つまり、 +% 数式モードにおいて、新たな |\rm| は、\LaTeX{} original の |\rm| と |\mc| +% (正確に言えば |\mathrm| と |\mathmc| であるが)の意味を合わせ持つように +% なります。 +% +% \textbf{補足} +% \begin{itemize} +% \item +% |\mathAA| を再定義する他の命令(|\DeclareSymbolFontAlphabet| を用いる +% パッケージの使用等)との衝突を避けるためには、|\AtBeginDocument| を併用 +% するなどして展開位置の制御を行ってください。 +% \item +% テキストモード時のエラー表示用に |\mathBB| のみを用いることを除いて、 +% |\mathBB| と |\mathCC| の順は実際には意味を持ちません。和文、欧文の順に +% 定義しても問題はありません。 +% \item +% 第2,3引き数には |{\@mathBB}{\@mathCC}| のように |@| をつけた記述も +% 行えます。ただし、形式は統一してください。判断は第2引き数で行って +% いるため、 |{\@mathBB}{\mathCC}| のような記述ではうまく動作しません。 +% また、|\makeatletter| な状態で |{\@mathBB }{\@mathCC }| のような |@| と +% 余分なスペースをつけた場合には無限ループを引き起こすことがあります。 +% このような記述は避けるようにして下さい。 +% \item +% |\reDeclareMathAlphabet| を実行する際には、|\mathBB|, |\mathCC| が定義 +% されている必要はありません。実際に |\mathAA| を用いる際にはこれらの +% |\mathBB|, |\mathCC| が (p)\LaTeX{}標準の方法で定義されている必要があります。 +% \item +% 他の部分で |\mathAA| を全く定義しない場合を除き、|\mathAA| は +% |\reDeclareMathAlphabet| を実行する以前で (p)\LaTeX{}標準の方法で定義され +% ている必要があります(|\mathrm| や |\mathbf| の標準的なコマンドは、 +% \LaTeX{} kernel で既に定義されています)。 +% |\DeclareMathAlphabet| の場合には、|\reDeclareMathAlphabet| よりも前で1度 +% |\mathAA| を定義してあれば、|\reDeclareMathAlphabet| の後ろで再度 +% |\DeclareMathAlphabet| を用いて |\mathAA| の内部の定義内容を変更すること +% には問題ありません。 +% |\DeclareSymbolFontAlphabet| の場合、再定義においても |\mathAA| が直接 +% 定義されるので、|\mathAA| に対する最後の |\DeclareSymbolFontAlphabet| の +% さらに後で |\reDeclareMathAlphabet| を実行しなければ有効とはなりません。 +% \item +% |\documentstyle| の互換モードの場合、|\rm| 等の two letter command +% (old font command) は、|\reDeclareMathAlphabet| とは関連することのない +% 別個のコマンドとして定義されます。従って、この場合には +% |\reDeclareMathAlphabet| を用いても |\rm| 等は数式モードにおいて +% 欧文・和文両用のものとはなりません。 +% \end{itemize} +% \begin{macrocode} +\def\reDeclareMathAlphabet#1#2#3{% + \edef#1{\noexpand\protect\expandafter\noexpand\csname% + \expandafter\@gobble\string#1\space\space\endcsname}% + \edef\@tempa{\expandafter\@gobble\string#2}% + \edef\@tempb{\expandafter\@gobble\string#3}% + \edef\@tempc{\string @\expandafter\@gobbletwo\string#2}% + \ifx\@tempc\@tempa% + \edef\@tempa{\expandafter\@gobbletwo\string#2}% + \edef\@tempb{\expandafter\@gobbletwo\string#3}% + \fi + \expandafter\edef\csname\expandafter\@gobble\string#1\space\space\endcsname% + {\noexpand\DualLang@mathalph@bet% + {\expandafter\noexpand\csname\@tempa\space\endcsname}% + {\expandafter\noexpand\csname\@tempb\space\endcsname}% + }% +} +\@onlypreamble\reDeclareMathAlphabet +\def\DualLang@mathalph@bet#1#2{% + \relax\ifmmode + \ifx\math@bgroup\bgroup% 2e normal style (\mathrm{...}) + \bgroup\let\DualLang@Mfontsw\DLMfontsw@standard + \else + \ifx\math@bgroup\relax% 2e two letter style (\rm->\mathrm) + \let\DualLang@Mfontsw\DLMfontsw@oldstyle + \else + \ifx\math@bgroup\@empty% 2.09 oldlfont style ({\mathrm ...}) + \let\DualLang@Mfontsw\DLMfontsw@oldlfont + \else% panic! assume 2e normal style + \bgroup\let\DualLang@Mfontsw\DLMfontsw@standard + \fi + \fi + \fi + \else + \let\DualLang@Mfontsw\@firstoftwo + \fi + \DualLang@Mfontsw{#1}{#2}% +} +\def\DLMfontsw@standard#1#2#3{#1{#2{#3}}\egroup} +\def\DLMfontsw@oldstyle#1#2{#1\relax\@fontswitch\relax{#2}} +\def\DLMfontsw@oldlfont#1#2{#1\relax#2\relax} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\DeclareRelationFont} +% \begin{macro}{\SetRelationFont} +% 和文書体に対する従属書体を宣言するコマンドです。\emph{従属書体}とは、 +% ある和文書体とペアになる欧文書体のことです。 +% 主に多書体パッケージ|skfonts|を用いるための仕組みです。 +% +% |\DeclareRelationFont|コマンドの最初の4つの引数の組が和文書体の属性、 +% その後の4つの引数の組が従属書体の属性です。 +% \begin{verbatim} +% \DeclareRelationFont{JY2}{mc}{m}{n}{T1}{cmr}{m}{n} +% \DeclareRelationFont{JY2}{gt}{m}{n}{T1}{cmr}{bx}{n} +% \end{verbatim} +% 上記の例は、明朝体の従属書体としてコンピュータモダンローマン、 +% ゴシック体の従属書体としてコンピュータモダンボールドを宣言しています。 +% カレント和文書体が|\JY2/mc/m/n|となると、 +% 自動的に欧文書体が|\T1/cmr/m/n|になります。 +% また、和文書体が|\JY2/gt/m/n|になったときは、 +% 欧文書体が|\T1/cmr/bx/n|になります。 +% +% 和文書体のシェイプ指定を省略するとエンコード/ファミリ/シリーズの組合せで +% 従属書体が使われます。このときは、|\selectfont|が呼び出された時点での +% シェイプ(|\f@shape|)の値が使われます。 +% +% |\DeclareRelationFont|の設定値はグローバルに有効です。 +% |\SetRelationFont|の設定値はローカルに有効です。 +% フォント定義ファイルで宣言をする場合は、 +% |\DeclareRelationFont|を使ってください。 +% \begin{macrocode} +\def\all@shape{all}% +\def\DeclareRelationFont#1#2#3#4#5#6#7#8{% + \def\rel@shape{#4}% + \ifx\rel@shape\@empty + \global + \expandafter\def\csname rel@#1/#2/#3/all\endcsname{% + \romanencoding{#5}\romanfamily{#6}% + \romanseries{#7}}% + \else + \global + \expandafter\def\csname rel@#1/#2/#3/#4\endcsname{% + \romanencoding{#5}\romanfamily{#6}% + \romanseries{#7}\romanshape{#8}}% + \fi +} +\def\SetRelationFont#1#2#3#4#5#6#7#8{% + \def\rel@shape{#4}% + \ifx\rel@shape\@empty + \expandafter\def\csname rel@#1/#2/#3/all\endcsname{% + \romanencoding{#5}\romanfamily{#6}% + \romanseries{#7}}% + \else + \expandafter\def\csname rel@#1/#2/#3/#4\endcsname{% + \romanencoding{#5}\romanfamily{#6}% + \romanseries{#7}\romanshape{#8}}% + \fi +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% \begin{macro}{\if@knjcmd} +% \begin{macro}{\userelfont} +% |\if@knjcmd|は欧文書体を従属書体にするかどうかのフラグです。 +% このフラグが真になると、欧文書体に従属書体が使われます。 +% このフラグは|\userelfont|コマンドによって、\emph{真}となります。 +% そして|\selectfont|実行後には\emph{偽}に初期化されます。 +% \begin{macrocode} +\newif\if@knjcmd +\def\userelfont{\@knjcmdtrue} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\selectfont} +% |\selectfont|のオリジナルからの変更部分は、次の3点です。 +% \begin{itemize} +% \item 和文書体を変更する部分 +% \item 従属書体に変更する部分 +% \item 和欧文のベースラインを調整する部分 +% \end{itemize} +% +% \changes{v1.0c}{1995/08/22}{縦横両方のフォントを切り替えるようにした} +% \changes{v1.2}{1995/11/22}{エラーフォントに対応した} +% \changes{v1.3n}{2004/08/10}{和文エンコーディングの切り替えを有効化} +% |\selectfont|コマンドは、まず、和文フォントを切り替えます。 +% \begin{macrocode} +% +%<*plcore|trace> +\DeclareRobustCommand\selectfont{% + \let\tmp@error@fontshape\error@fontshape + \let\error@fontshape\error@kfontshape + \edef\tmp@item{{\k@encoding}}% + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\kyenc@list}% + \ifin@ + \let\cy@encoding\k@encoding + \edef\ct@encoding{\csname t@enc@\k@encoding\endcsname}% + \else + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\ktenc@list}% + \ifin@ + \let\ct@encoding\k@encoding + \edef\cy@encoding{\csname y@enc@\k@encoding\endcsname}% + \else + \@latex@error{KANJI Encoding scheme `\k@encoding' unknown}\@eha + \fi + \fi + \let\font\tfont + \let\k@encoding\ct@encoding + \xdef\font@name{\csname\curr@kfontshape/\f@size\endcsname}% + \pickup@font + \font@name + \let\font\jfont + \let\k@encoding\cy@encoding + \xdef\font@name{\csname\curr@kfontshape/\f@size\endcsname}% + \pickup@font + \font@name + \expandafter\def\expandafter\k@encoding\tmp@item + \kenc@update + \let\error@fontshape\tmp@error@fontshape +% \end{macrocode} +% 次に、|\if@knjcmd|が真の場合、 +% 欧文書体を現在の和文書体に関連付けされたフォントに変えます。 +% このフラグは|\userelfont|コマンドによって\emph{真}となります。 +% このフラグはここで再び、\emph{偽}に設定されます。 +% \begin{macrocode} + \if@knjcmd \@knjcmdfalse + \expandafter\ifx + \csname rel@\k@encoding/\k@family/\k@series/\k@shape\endcsname\relax + \expandafter\ifx + \csname rel@\k@encoding/\k@family/\k@series/all\endcsname\relax + \else + \csname rel@\k@encoding/\k@family/\k@series/all\endcsname + \fi + \else + \csname rel@\k@encoding/\k@family/\k@series/\k@shape\endcsname + \fi + \fi +% \end{macrocode} +% そして、欧文フォントを切り替えます。 +% \begin{macrocode} + \let\font\afont + \xdef\font@name{\csname\curr@fontshape/\f@size\endcsname}% + \pickup@font + \font@name +%\ifnum \tracingfonts>\tw@ +% \@font@info{Roman:Switching to \font@name}\fi + \enc@update +% \end{macrocode} +% 最後に、サイズが変更されていれば、ベースラインの調整などを行ないます。 +% 英語版の|\selectfont|では最初に行なっていますが、 +% p\LaTeXe{}ではベースラインシフトの調整をするために、 +% 書体を確定しなければならないため、一番最後に行ないます +% +% \changes{v1.1b}{1995/04/26}{ベースラインの調整をサイズ変更時に +% 行なうようにした} +% \begin{macrocode} + \ifx\f@linespread\baselinestretch \else + \set@fontsize\baselinestretch\f@size\f@baselineskip + \fi + \size@update} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\KanjiEncodingPair} +% 和文の縦横のエンコーディングはそれぞれ対にして扱うため、セット化します +% \changes{v1.3n}{2004/08/10}{和文エンコーディングの切り替えを有効化} +% \begin{macrocode} +\def\KanjiEncodingPair#1#2{\@namedef{t@enc@#1}{#2}\@namedef{y@enc@#2}{#1}} +\KanjiEncodingPair{JY2}{JT2} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\set@fontsize} +% |\fontsize|コマンドの内部形式です。 +% ベースラインの設定と、支柱の設定を行ないます。 +% \begin{macrocode} +\def\set@fontsize#1#2#3{% + \@defaultunits\@tempdimb#2pt\relax\@nnil + \edef\f@size{\strip@pt\@tempdimb}% + \@defaultunits\@tempskipa#3pt\relax\@nnil + \edef\f@baselineskip{\the\@tempskipa}% + \edef\f@linespread{#1}% + \let\baselinestretch\f@linespread + \def\size@update{% + \baselineskip\f@baselineskip\relax + \baselineskip\f@linespread\baselineskip + \normalbaselineskip\baselineskip +% \end{macrocode} +% ここで、ベースラインシフトの調整と支柱を組み立てます。 +% \begin{macrocode} + \adjustbaseline + \setbox\strutbox\hbox{\yoko + \vrule\@width\z@ + \@height.7\baselineskip \@depth.3\baselineskip}% + \setbox\tstrutbox\hbox{\tate + \vrule\@width\z@ + \@height.5\baselineskip \@depth.5\baselineskip}% + \setbox\zstrutbox\hbox{\tate + \vrule\@width\z@ + \@height.7\baselineskip \@depth.3\baselineskip}% +% \end{macrocode} +% フォントサイズとベースラインに関する診断情報を出力します。 +% \begin{macrocode} +%<*trace> + \ifnum \tracingfonts>\tw@ + \ifx\f@linespread\@empty + \let\reserved@a\@empty + \else + \def\reserved@a{\f@linespread x}% + \fi + \@font@info{Changing size to\space + \f@size/\reserved@a \f@baselineskip}% + \aftergroup\type@restoreinfo + \fi +% + \let\size@update\relax}} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\adjustbaseline} +% 現在の和文フォントの空白(EUCコード\texttt{0xA1A1})の中央に +% 現在の欧文フォントの``/''の中央がくるようにベースラインシフトを設定します。 +% \changes{v1.0c}{1995/08/31}{欧文書体の基準を`M'から`/'に変更} +% \changes{v1.2}{1995/11/21}{縦組時のみ調整するようにした} +% \changes{v1.3j}{2000/10/24}{文頭に鈎括弧などがあるときに余計なアキがで +% る問題に対処} +% \changes{v1.3l}{2002/04/05}{\cs{adjustbaseline}でフォントの基準値が縦書き +% 以外では設定されないのを修正} +% +% 当初はまずベースラインシフト量をゼロにしていましたが、 +% \cs{tbaselineshift}を連続して変更した後に鈎括弧類を使うと余計なアキが +% でる問題が起こるため、\cs{tbaselineshift}をゼロクリアする処理を削除し +% ました。 +% +% しかし、それではベースラインシフトを調整済みの欧文ボックスと比較して +% しまうため、計算した値が大きくなってしまいます。そこで、このボックス +% の中でゼロにするようにしました。また、``/''と比較していたのを``M''に +% しました。 +% \changes{v1.3k}{2001/05/10}{\cs{adjustbaseline}の調整量} +% \begin{macrocode} +\newbox\adjust@box +\newdimen\adjust@dimen +\def\adjustbaseline{% +% \end{macrocode} +% 和文フォントの基準値を設定します。 +% \begin{macrocode} + \setbox\adjust@box\hbox{\char\euc"A1A1}% + \cht\ht\adjust@box + \cdp\dp\adjust@box + \cwd\wd\adjust@box + \cvs\normalbaselineskip + \chs\cwd + \cHT\cht \advance\cHT\cdp +% \end{macrocode} +% 基準となる欧文フォントの文字を含んだボックスを作成し、 +% ベースラインシフト量の計算を行ないます。 +% 計算式は次のとおりです。 +% +% \begin{eqnarray*} +% \textmc{ベースラインシフト量} &=& +% \{ (\textmc{全角空白の深さ}) - (\textmc{/の深さ}) \} \\ +% &&- \frac{(\textmc{全角空白の高さ$+$深さ}) +% - (\textmc{/の高さ$+$深さ})}{2} +% \end{eqnarray*} +% +% \begin{macrocode} + \iftdir + \setbox\adjust@box\hbox{\tbaselineshift\z@ M}% + \adjust@dimen\ht\adjust@box + \advance\adjust@dimen\dp\adjust@box + \advance\adjust@dimen-\cHT + \divide\adjust@dimen\tw@ + \advance\adjust@dimen\cdp + \advance\adjust@dimen-\dp\adjust@box + \tbaselineshift\adjust@dimen +% \ifnum \tracingfonts>\tw@ +% \typeout{baselineshift:\the\tbaselineshift} +% \fi + \fi} +% +%<*plcore> +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\romanencoding} +% \begin{macro}{\kanjiencoding} +% \begin{macro}{\fontencoding} +% 書体のエンコードを指定するコマンドです。 +% |\fontencoding|コマンドは和欧文のどちらかに影響します。 +% |\DeclareKanjiEncoding|で指定されたエンコードは和文エンコードとして、 +% |\DeclareFontEncoding|で指定されたエンコードは欧文エンコードとして +% 認識されます。 +% +% |\kanjiencoding|と|\romanencoding|は与えられた引数が、 +% エンコードとして登録されているかどうかだけを確認し、 +% それが和文か欧文かのチェックは行なっていません。 +% そのため、高速に動作をしますが、|\kanjiencoding|に欧文エンコードを指定したり、 +% 逆に|\romanencoding|に和文エンコードを指定した場合はエラーとなります。 +% \begin{macrocode} +\DeclareRobustCommand\romanencoding[1]{% + \expandafter\ifx\csname T@#1\endcsname\relax + \@latex@error{Encoding scheme `#1' unknown}\@eha + \else + \edef\f@encoding{#1}% + \ifx\cf@encoding\f@encoding + \let\enc@update\relax + \else + \let\enc@update\@@enc@update + \fi + \fi +} +\DeclareRobustCommand\kanjiencoding[1]{% + \expandafter\ifx\csname T@#1\endcsname\relax + \@latex@error{KANJI Encoding scheme `#1' unknown}\@eha + \else + \edef\k@encoding{#1}% + \ifx\ck@encoding\k@encoding + \let\kenc@update\relax + \else + \let\kenc@update\@@kenc@update + \fi + \fi +} +\DeclareRobustCommand\fontencoding[1]{% + \edef\tmp@item{{#1}}% + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\kenc@list}% + \ifin@ \kanjiencoding{#1}\else\romanencoding{#1}\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@@kenc@update} +% |\kanjiencoding|コマンドのコードからもわかるように、 +% |\ck@encoding|と|\k@encoding|が異なる場合、 +% |\kenc@update|コマンドは|\@@kenc@update|コマンドと等しくなります。 +% +% |\@@kenc@update|コマンドは、そのエンコードでのデフォルト値を設定するための +% コマンドです。欧文用の|\@@enc@update|コマンドでは、 +% \mlineplus{2}行目と\mlineplus{3}行目のような代入もしていますが、 +% 和文用にはコメントにしてあります。 +% これらは|\DeclareTextCommand|や|\ProvideTextCommand|などで +% エンコードごとに設定されるコマンドを使うための仕組みです。 +% しかし、和文エンコードに依存するようなコマンドやマクロを作成することは、 +% 現時点では、ないと思います。 +% +% \changes{v1.0c}{1995/08/22}{縦横用エンコードの保存} +% \begin{macrocode} +\def\@@kenc@update{% +% \expandafter\let\csname\ck@encoding -cmd\endcsname\@changed@kcmd +% \expandafter\let\csname\k@encoding-cmd\endcsname\@current@cmd + \default@KT + \csname T@\k@encoding\endcsname + \csname D@\k@encoding\endcsname + \let\kenc@update\relax + \let\ck@encoding\k@encoding + \edef\tmp@item{{\k@encoding}}% + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\kyenc@list}% + \ifin@ \let\cy@encoding\k@encoding + \else + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\ktenc@list}% + \ifin@ \let\ct@encoding\k@encoding + \else + \@latex@error{KANJI Encoding scheme `\k@encoding' unknown}\@eha + \fi + \fi +} +\let\kenc@update\relax +% \end{macrocode} +% +% |\@changed@cmd|の和文エンコーディングバージョン。 +% \changes{v1.3n}{2004/08/10}{和文エンコーディングの切り替えを有効化} +% \begin{macrocode} +\def\@changed@kcmd#1#2{% + \ifx\protect\@typeset@protect + \@inmathwarn#1% + \expandafter\ifx\csname\ck@encoding\string#1\endcsname\relax + \expandafter\ifx\csname ?\string#1\endcsname\relax + \expandafter\def\csname ?\string#1\endcsname{% + \TextSymbolUnavailable#1% + }% + \fi + \global\expandafter\let + \csname\cf@encoding \string#1\expandafter\endcsname + \csname ?\string#1\endcsname + \fi + \csname\ck@encoding\string#1% + \expandafter\endcsname + \else + \noexpand#1% + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@notkfam} +% \begin{macro}{\@notffam} +% |\fontfamily|コマンド内で使用するフラグです。 +% |@notkfam|フラグは和文ファミリでなかったことを、 +% |@notffam|フラグは欧文ファミリでなかったことを示します。 +% +% \changes{v1.2}{1995/11/21}{\cs{fontfamily}コマンド用のフラグ追加} +% \begin{macrocode} +\newif\if@notkfam +\newif\if@notffam +% \end{macrocode} +% \changes{v1.3m}{2004/06/14}{\cs{fontfamily}コマンド内部フラグ変更} +% \begin{macrocode} +\newif\if@tempswz +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% \begin{macro}{\romanfamily} +% \begin{macro}{\kanjifamily} +% \begin{macro}{\fontfamily} +% 書体のファミリを指定するコマンドです。 +% +% |\kanjifamily|と|\romanfamily|は与えられた引数が、 +% 和文あるいは欧文のファミリとして正しいかのチェックは行なっていません。 +% そのため、高速に動作をしますが、|\kanjifamily|に欧文ファミリを指定したり、 +% 逆に|\romanfamily|に和文ファミリを指定した場合は、エラーとなり、 +% 代用フォントかエラーフォントが使われます。 +% \begin{macrocode} +\DeclareRobustCommand\romanfamily[1]{\edef\f@family{#1}} +\DeclareRobustCommand\kanjifamily[1]{\edef\k@family{#1}} +% \end{macrocode} +% +% |\fontfamily|は、指定された値によって、和文ファミリか欧文ファミリ、 +% \emph{あるいは両方}のファミリを切り替えます。 +% 和欧文ともに無効なファミリ名が指定された場合は、和欧文ともに代替書体が +% 使用されます。 +% +% 引数が|\rmfamily|のような名前で与えられる可能性があるため、 +% まず、これを展開したものを作ります。 +% +% また、和文ファミリと欧文ファミリのそれぞれになかったことを示すフラグを +% 偽にセットします。 +% +% \changes{v1.2}{1995/11/21}{代用フォントが使われないバグを修正} +% \changes{v1.3m}{2004/06/14}{\cs{fontfamily}コマンド内部フラグ変更} +% \changes{v1.3o}{2005/01/04}{\cs{fontfamily}中のフラグ修正} +% \begin{macrocode} +\DeclareRobustCommand\fontfamily[1]{% + \edef\tmp@item{{#1}}% + \@notkfamfalse + \@notffamfalse +% \end{macrocode} +% 次に、この引数が|\kfam@list|に登録されているかどうかを調べます。 +% 登録されていれば、|\k@family|にその値を入れます。 +% \begin{macrocode} + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\kfam@list}% + \ifin@ \edef\k@family{#1}% +% \end{macrocode} +% そうでないときは、|\notkfam@list|に登録されているかどうかを調べます。 +% 登録されていれば、この引数は和文ファミリではありませんので、 +% |\@notkfam|フラグを真にして、欧文ファミリのルーチンに移ります。 +% +% このとき、|\efam@list|を調べるのではないことに注意をしてください。 +% |\efam@list|を調べ、これにないファミリを和文ファミリであるとすると、 +% たとえば、欧文ナールファミリが定義されているけれども、和文ナールファミリ +% が未定義の場合、|\fontfamily{nar}|という指定は、|nar|が|\efam@list|にだけ、 +% 登録されているため、和文書体をナールにすることができません。 +% +% 逆に、|\kfam@list|に登録されていないからといって、|\k@family|に|nar|を設定 +% すると、|cmr|のようなファミリも|\k@family|に設定される可能性があります。 +% したがって、「欧文でない」を明示的に示す|\notkfam@list|を見る必要があります。 +% \begin{macrocode} + \else + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\notkfam@list}% + \ifin@ \@notkfamtrue +% \end{macrocode} +% |\notkfam@list|に登録されていない場合は、 +% フォント定義ファイルが存在するかどうかを調べます。 +% ファイルが存在する場合は、|\k@family|を変更します。 +% ファイルが存在しない場合は、|\notkfam@list|に登録します。 +% +% |\kenc@list|に登録されているエンコードと、指定された和文ファミリの +% 組合せのフォント定義ファイルが存在する場合は、|\k@family|に指定された +% 値を入れます。 +% \changes{v1.3c}{1997/04/24}% +% {フォント定義ファイル名を小文字に変換してから探すようにした。} +% \changes{v1.3e}{1997/07/10}{fdファイル名の小文字化が効いていなかったのを +% 修正。ありがとう、大岩さん} +% \begin{macrocode} + \else + \@tempswzfalse + \def\fam@elt{\noexpand\fam@elt}% + \message{(I search kanjifont definition file:}% + \def\enc@elt<##1>{\message{.}% + \edef\reserved@a{\lowercase{\noexpand\IfFileExists{##1#1.fd}}}% + \reserved@a{\@tempswztrue}{}\relax}% + \kenc@list + \message{)}% + \if@tempswz + \edef\k@family{#1}% +% \end{macrocode} +% つぎの部分が実行されるのは、和文ファミリとして認識できなかった場合です。 +% この場合は、|\@notkfam|フラグを真にして、|\notkfam@list|に登録します。 +% \changes{v1.1b}{1995/05/10}{\cs{notkfam@list}に、 +% エンコードごとに登録されてしまうのを修正した。欧文についても同様。} +% \begin{macrocode} + \else + \@notkfamtrue + \xdef\notkfam@list{\notkfam@list\fam@elt<#1>}% + \fi +% \end{macrocode} +% |\kfam@list|と|\notkfam@list|に登録されているかどうかを +% 調べた|\ifin@|を閉じます。 +% \begin{macrocode} + \fi\fi +% \end{macrocode} +% 欧文ファミリの場合も、和文ファミリと同様の方法で確認をします。 +% \changes{v1.3e}{1997/07/10}{fdファイル名の小文字化が効いていなかったのを修正} +% \begin{macrocode} + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\ffam@list}% + \ifin@ \edef\f@family{#1}\else + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\notffam@list}% + \ifin@ \@notffamtrue \else + \@tempswzfalse + \def\fam@elt{\noexpand\fam@elt}% + \message{(I search font definition file:}% + \def\enc@elt<##1>{\message{.}% + \edef\reserved@a{\lowercase{\noexpand\IfFileExists{##1#1.fd}}}% + \reserved@a{\@tempswztrue}{}\relax}% + \fenc@list + \message{)}% + \if@tempswz + \edef\f@family{#1}% + \else + \@notffamtrue + \xdef\notffam@list{\notffam@list\fam@elt<#1>}% + \fi + \fi\fi +% \end{macrocode} +% 最後に、指定された文字列が、和文ファミリと欧文ファミリのいずれか、 +% あるいは両方として認識されたかどうかを確認します。 +% +% どちらとも認識されていない場合は、ファミリの指定ミスですので、 +% 代用フォントを使うために、故意に指定された文字列をファミリに +% 入れます。 +% \begin{macrocode} + \if@notkfam\if@notffam + \edef\k@family{#1}\edef\f@family{#1}% + \fi\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \begin{macro}{\romanseries} +% \begin{macro}{\kanjiseries} +% \begin{macro}{\fontseries} +% 書体のシリーズを指定するコマンドです。 +% |\fontseries|コマンドは和欧文の両方に影響します。 +% \begin{macrocode} +\DeclareRobustCommand\romanseries[1]{\edef\f@series{#1}} +\DeclareRobustCommand\kanjiseries[1]{\edef\k@series{#1}} +\DeclareRobustCommand\fontseries[1]{\kanjiseries{#1}\romanseries{#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \begin{macro}{\romanshape} +% \begin{macro}{\kanjishape} +% \begin{macro}{\fontshape} +% 書体のシェイプを指定するコマンドです。 +% |\fontshape|コマンドは和欧文の両方に影響します。 +% \begin{macrocode} +\DeclareRobustCommand\romanshape[1]{\edef\f@shape{#1}} +\DeclareRobustCommand\kanjishape[1]{\edef\k@shape{#1}} +\DeclareRobustCommand\fontshape[1]{\kanjishape{#1}\romanshape{#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \begin{macro}{\usekanji} +% \begin{macro}{\useroman} +% \begin{macro}{\usefont} +% 書体属性を一度に指定するコマンドです。 +% 和文書体には|\usekanji|を、欧文書体には|\useroman|を指定してください。 +% +% |\usefont|コマンドは、第一引数で指定されるエンコードによって、 +% 和文または欧文フォントを切り替えます。 +% \begin{macrocode} +\def\usekanji#1#2#3#4{% + \kanjiencoding{#1}\kanjifamily{#2}\kanjiseries{#3}\kanjishape{#4}% + \selectfont\ignorespaces} +\def\useroman#1#2#3#4{% + \romanencoding{#1}\romanfamily{#2}\romanseries{#3}\romanshape{#4}% + \selectfont\ignorespaces} +\def\usefont#1#2#3#4{% + \edef\tmp@item{{#1}}% + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\kenc@list}% + \ifin@ \usekanji{#1}{#2}{#3}{#4}% + \else\useroman{#1}{#2}{#3}{#4}% + \fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \begin{macro}{\normalfont} +% 書体をデフォルト値にするコマンドです。 +% 和文書体もデフォルト値になるように再定義しています。 +% ただし高速化のため、|\usekanji|と|\useroman|を展開し、 +% |\selectfont|を一度しか呼び出さないようにしています。 +% \begin{macrocode} +\DeclareRobustCommand\normalfont{% + \kanjiencoding{\kanjiencodingdefault}% + \kanjifamily{\kanjifamilydefault}% + \kanjiseries{\kanjiseriesdefault}% + \kanjishape{\kanjishapedefault}% + \romanencoding{\encodingdefault}% + \romanfamily{\familydefault}% + \romanseries{\seriesdefault}% + \romanshape{\shapedefault}% + \selectfont\ignorespaces} + \adjustbaseline +\let\reset@font\normalfont +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\mcfamily} +% \begin{macro}{\gtfamily} +% 和文書体を明朝体にする|\mcfamily|とゴシック体にする|\gtfamily|を定義します。 +% これらは、|\rmfamily|などに対応します。 +% |\mathmc|と|\mathgt|は数式内で用いるときのコマンド名です。 +% \begin{macrocode} +\DeclareRobustCommand\mcfamily + {\not@math@alphabet\mcfamily\mathmc + \kanjifamily\mcdefault\selectfont} +\DeclareRobustCommand\gtfamily + {\not@math@alphabet\gtfamily\mathgt + \kanjifamily\gtdefault\selectfont} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% \begin{macro}{\romanprocess@table} +% \begin{macro}{\kanjiprocess@table} +% \begin{macro}{\process@table} +% 文書の先頭で、和文デフォルトフォントの変更が反映されないのを修正します。 +% \changes{v1.3g}{1999/04/05}{plpatch.ltxの内容を反映。 +% ありがとう、山本さん。} +% \begin{macrocode} +\let\romanprocess@table\process@table +\def\kanjiprocess@table{% + \kanjiencoding{\kanjiencodingdefault}% + \kanjifamily{\kanjifamilydefault}% + \kanjiseries{\kanjiseriesdefault}% + \kanjishape{\kanjishapedefault}% +} +\def\process@table{% + \romanprocess@table + \kanjiprocess@table +} +\@onlypreamble\romanprocess@table +\@onlypreamble\kanjiprocess@table +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% +% \begin{macro}{\textunderscore} +% \changes{v1.1b}{1995/04/12}{下線マクロを追加} +% このコマンドはテキストモードで指定された|\_|の内部コマンドです。 +% 縦組での位置を調整するように再定義をします。 +% もとは\file{ltoutenc.dtx}で定義されています。 +% +% なお、|\_|を数式モードで使うと|\mathunderscore|が実行されます。 +% \begin{macrocode} +\DeclareTextCommandDefault{\textunderscore}{% + \leavevmode\kern.06em + \iftdir\raise-\tbaselineshift\fi + \vbox{\hrule\@width.3em}} +% \end{macrocode} +% \end{macro} +% +% +% +% \subsection{デフォルト設定ファイルの読み込み} +% 最後に、デフォルト設定ファイルである、\file{upldefs.ltx}を読み込みます。 +% このファイルについての詳細は、第\ref{plfonts:pldefs}節を参照してください。 +% \TeX{}の入力ファイル検索パスに設定されているディレクトリに\file{upldefs.cfg}% +% ファイルがある場合は、そのファイルを使います。 +% \begin{macrocode} +\InputIfFileExists{upldefs.cfg} + {\typeout{*************************************^^J% + * Local config file upldefs.cfg used^^J% + *************************************}}% + {\input{upldefs.ltx}} +% +% \end{macrocode} +% +% +% +% +% \section{デフォルト設定ファイル}\label{plfonts:pldefs} +% ここでは、フォーマットファイルに読み込まれるデフォルト値を設定しています。 +% この節での内容は\file{pldefs.ltx}に出力されます。 +% このファイルの内容を\file{plcore.ltx}に含めてもよいのですが、 +% デフォルトの設定を参照しやすいように、別ファイルにしてあります。 +% \file{pldefs.ltx}は\file{plcore.ltx}から読み込まれます。 +% +% プリロードサイズは、\dst{}プログラムのオプションで変更することができます。 +% これ以外の設定を変更したい場合は、\file{pldefs.ltx}を +% 直接、修正するのではなく、このファイルを\file{pldefs.cfg}という名前で +% コピーをして、そのファイルに対して修正を加えるようにしてください。 +% \begin{macrocode} +%<*pldefs> +\ProvidesFile{upldefs.ltx} + [2000/07/13 v1.2u01 upLaTeX Kernel (Default settings)] +% \end{macrocode} +% +% \subsection{イタリック補正} +% \changes{v1.3i}{2000/07/13}{\cs{text..}コマンドの左側に\cs{xkanjiskip}が +% 入らないのを修正(ありがとう、乙部@東大さん)} +% \begin{macro}{\check@nocorr@} +% 「\verb|あ\texttt{abc}い|」としたとき、書体の変更を指定された欧文の左側に +% 和欧文間スペースが入らないのを修正します。 +% \begin{macrocode} +\def \check@nocorr@ #1#2\nocorr#3\@nil {% + \let \check@icl \relax% \maybe@ic から変更 + \def \check@icr {\ifvmode \else \aftergroup \maybe@ic \fi}% + \def \reserved@a {\nocorr}% + \def \reserved@b {#1}% + \def \reserved@c {#3}% + \ifx \reserved@a \reserved@b + \ifx \reserved@c \@empty + \let \check@icl \@empty + \else + \let \check@icl \@empty + \let \check@icr \@empty + \fi + \else + \ifx \reserved@c \@empty + \else + \let \check@icr \@empty + \fi + \fi +} +% \end{macrocode} +% \end{macro} +% +% +% \subsection{テキストフォント} +% テキストフォントのための属性やエラー書体などの宣言です。 +% +% \noindent +% 縦横エンコード共通: +% \begin{macrocode} +\DeclareKanjiEncodingDefaults{}{} +\DeclareErrorKanjiFont{JY2}{mc}{m}{n}{10} +% \end{macrocode} +% 横組エンコード: +% \begin{macrocode} +\DeclareYokoKanjiEncoding{JY2}{}{} +\DeclareKanjiSubstitution{JY2}{mc}{m}{n} +% \end{macrocode} +% 縦組エンコード: +% \begin{macrocode} +\DeclareTateKanjiEncoding{JT2}{}{} +\DeclareKanjiSubstitution{JT2}{mc}{m}{n} +% \end{macrocode} +% フォント属性のデフォルト値: +% \begin{macrocode} +\newcommand\mcdefault{mc} +\newcommand\gtdefault{gt} +\newcommand\kanjiencodingdefault{JY2} +\newcommand\kanjifamilydefault{\mcdefault} +\newcommand\kanjiseriesdefault{\mddefault} +\newcommand\kanjishapedefault{\updefault} +% \end{macrocode} +% 和文エンコードの指定: +% \begin{macrocode} +\kanjiencoding{JY2} +% \end{macrocode} +% フォント定義: +% これらの具体的な内容は第\ref{plfonts:fontdef}節を参照してください。 +% \changes{v1.3}{1997/01/24}{Rename font definition filename.} +% \begin{macrocode} +\input{jy2mc.fd} +\input{jy2gt.fd} +\input{jt2mc.fd} +\input{jt2gt.fd} +% \end{macrocode} +% フォントを有効にする +% \begin{macrocode} +\fontencoding{JT2}\selectfont +\fontencoding{JY2}\selectfont +% \end{macrocode} +% +% \begin{macro}{\textmc} +% \begin{macro}{\textgt} +% \changes{v1.3b}{1997/01/28}{\cs{textmc}, \cs{textgt}の動作修正} +% テキストファミリを切り替えるためのコマンドです。 +% \file{ltfntcmd.dtx}で定義されている|\textrm|などに対応します。 +% \begin{macrocode} +\DeclareTextFontCommand{\textmc}{\mcfamily} +\DeclareTextFontCommand{\textgt}{\gtfamily} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\em} +% \begin{macro}{\emph} +% \changes{v1.3d}{1997/06/25}{\cs{em},\cs{emph}で和文を強調書体に} +% 従来は|\em|, |\emph|で和文フォントの切り替えは行っていませんでしたが、 +% 和文フォントも|\gtfamily|に切り替えるようにしました。 +% \begin{macrocode} +\DeclareRobustCommand\em + {\@nomath\em \ifdim \fontdimen\@ne\font >\z@ + \mcfamily \upshape \else \gtfamily \itshape \fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% \changes{v1.3b}{1997/01/30}{数式用フォントの宣言をクラスファイルに移動した} +% +% +% \subsection{プリロードフォント} +% あらかじめフォーマットファイルにロードされるフォントの宣言です。 +% \dst{}プログラムのオプションでロードされるフォントのサイズを +% 変更することができます。\file{uplatex.ins}では|xpt|を指定しています。 +% \begin{macrocode} +%<*xpt> +\DeclarePreloadSizes{JY2}{mc}{m}{n}{5,7,10,12} +\DeclarePreloadSizes{JY2}{gt}{m}{n}{5,7,10,12} +\DeclarePreloadSizes{JT2}{mc}{m}{n}{5,7,10,12} +\DeclarePreloadSizes{JT2}{gt}{m}{n}{5,7,10,12} +% +%<*xipt> +\DeclarePreloadSizes{JY2}{mc}{m}{n}{5,7,10.95,12} +\DeclarePreloadSizes{JY2}{gt}{m}{n}{5,7,10.95,12} +\DeclarePreloadSizes{JT2}{mc}{m}{n}{5,7,10.95,12} +\DeclarePreloadSizes{JT2}{gt}{m}{n}{5,7,10.95,12} +% +%<*xiipt> +\DeclarePreloadSizes{JY2}{mc}{m}{n}{7,9,12,14.4} +\DeclarePreloadSizes{JY2}{gt}{m}{n}{7,9,12,14.4} +\DeclarePreloadSizes{JT2}{mc}{m}{n}{7,9,12,14.4} +\DeclarePreloadSizes{JT2}{gt}{m}{n}{7,9,12,14.4} +% +%<*ori> +\DeclarePreloadSizes{JY2}{mc}{m}{n} + {5,6,7,8,9,10,10.95,12,14.4,17.28,20.74,24.88} +\DeclarePreloadSizes{JY2}{gt}{m}{n} + {5,6,7,8,9,10,10.95,12,14.4,17.28,20.74,24.88} +\DeclarePreloadSizes{JT2}{mc}{m}{n} + {5,6,7,8,9,10,10.95,12,14.4,17.28,20.74,24.88} +\DeclarePreloadSizes{JT2}{gt}{m}{n} + {5,6,7,8,9,10,10.95,12,14.4,17.28,20.74,24.88} +% +% \end{macrocode} +% +% +% \subsection{組版パラメータ} +% 禁則パラメータや文字間へ挿入するスペースの設定などです。 +% 実際の各文字への禁則パラメータおよびスペースの挿入の許可設定などは、 +% \file{kinsoku.tex}で行なっています。 +% 具体的な設定については、\file{kinsoku.dtx}を参照してください。 +% \begin{macrocode} +\InputIfFileExists{ukinsoku.tex}% + {\message{Loading kinsoku patterns for japanese.}} + {\errhelp{The configuration for kinsoku is incorrectly installed.^^J% + If you don't understand this error message you need + to seek^^Jexpert advice.}% + \errmessage{OOPS! I can't find any kinsoku patterns for japanese^^J% + \space Think of getting some or the + uplatex2e setup will never succeed}\@@end} +% \end{macrocode} +% +% 組版パラメータの設定をします。 +% |\kanjiskip|は、漢字と漢字の間に挿入されるグルーです。 +% |\noautospacing|で、挿入を中止することができます。 +% デフォルトは|\autospacing|です。 +% \begin{macrocode} +\kanjiskip=0pt plus .4pt minus .5pt +\autospacing +% \end{macrocode} +% |\xkanjiskip|は、和欧文間に自動的に挿入されるグルーです。 +% |\noautoxspacing|で、挿入を中止することができます。 +% デフォルトは|\autoxspacing|です。 +% \changes{v1.1c}{1995/09/12}{\cs{xkanjiskip}のデフォルト値} +% \begin{macrocode} +\xkanjiskip=.25zw plus1pt minus1pt +\autoxspacing +% \end{macrocode} +% |\jcharwidowpenalty|は、パラグラフに対する禁則です。 +% パラグラフの最後の行が1文字だけにならないように調整するために使われます。 +% \begin{macrocode} +\jcharwidowpenalty=500 +% \end{macrocode} +% 最後に、|\inhibitglue|の簡略形を定義します。 +% このコマンドは、和文フォントのメトリック情報から、自動的に挿入される +% グルーの挿入を禁止します。 +% \begin{macrocode} +\def\<{\inhibitglue} +% \end{macrocode} +% +% ここまでが、\file{pldefs.ltx}の内容です。 +% \begin{macrocode} +% +% \end{macrocode} +% +% +% +% \section{フォント定義ファイル}\label{plfonts:fontdef} +% \changes{v1.3}{1997/01/24}{Rename provided font definition filename.} +% ここでは、フォント定義ファイルの設定をしています。フォント定義ファイルは、 +% \LaTeX{}のフォント属性を\TeX{}フォントに置き換えるためのファイルです。 +% 記述方法についての詳細は、|fntguide.tex|を参照してください。 +% +% 欧文書体の設定については、 +% \file{cmfonts.fdd}や\file{slides.fdd}などを参照してください。 +% \file{skfonts.fdd}には、写研代用書体を使うためのパッケージと +% フォント定義が記述されています。 +% \begin{macrocode} +%\ProvidesFile{jy2mc.fd} +%\ProvidesFile{jy2gt.fd} +%\ProvidesFile{jt2mc.fd} +%\ProvidesFile{jt2gt.fd} +% [1997/01/24 v1.3 KANJI font defines] +% \end{macrocode} +% 横組用、縦組用ともに、 +% 明朝体のシリーズ|bx|がゴシック体となるように宣言しています。 +% \changes{v1.2}{1995/11/24}{it, sl, sc の宣言を外した} +% \changes{v1.3b}{1997/01/29}{フォント定義ファイルのサイズ指定の調整} +% \changes{v1.3b}{1997/03/11}{すべてのサイズをロード可能にした} +% \begin{macrocode} +%<*JY2mc> +\DeclareKanjiFamily{JY2}{mc}{} +\DeclareRelationFont{JY2}{mc}{m}{}{T1}{cmr}{m}{} +\DeclareRelationFont{JY2}{mc}{bx}{}{T1}{cmr}{bx}{} +\DeclareFontShape{JY2}{mc}{m}{n}{<->s*[0.962216]upjisr-h}{} +\DeclareFontShape{JY2}{mc}{bx}{n}{<->ssub*gt/m/n}{} +% +%<*JT2mc> +\DeclareKanjiFamily{JT2}{mc}{} +\DeclareRelationFont{JT2}{mc}{m}{}{T1}{cmr}{m}{} +\DeclareRelationFont{JT2}{mc}{bx}{}{T1}{cmr}{bx}{} +\DeclareFontShape{JT2}{mc}{m}{n}{<->s*[0.962216]upjisr-v}{} +\DeclareFontShape{JT2}{mc}{bx}{n}{<->ssub*gt/m/n}{} +% +%<*JY2gt> +\DeclareKanjiFamily{JY2}{gt}{} +\DeclareRelationFont{JY2}{gt}{m}{}{T1}{cmr}{bx}{} +\DeclareFontShape{JY2}{gt}{m}{n}{<->s*[0.962216]upjisg-h}{} +\DeclareFontShape{JY2}{gt}{bx}{n}{<->ssub*gt/m/n}{} +% +%<*JT2gt> +\DeclareKanjiFamily{JT2}{gt}{} +\DeclareRelationFont{JT2}{gt}{m}{}{T1}{cmr}{bx}{} +\DeclareFontShape{JT2}{gt}{m}{n}{<->s*[0.962216]upjisg-v}{} +\DeclareFontShape{JT2}{gt}{bx}{n}{<->ssub*gt/m/n}{} +% +% \end{macrocode} +% +% +% \Finale +% +\endinput diff --git a/Master/texmf-dist/source/uplatex/base/uplvers.dtx b/Master/texmf-dist/source/uplatex/base/uplvers.dtx new file mode 100644 index 00000000000..4f48cc14a53 --- /dev/null +++ b/Master/texmf-dist/source/uplatex/base/uplvers.dtx @@ -0,0 +1,165 @@ +% \iffalse meta-comment +%% File: uplvers +% +% pLaTeX version setting file: +% Copyright 1995-2006 ASCII Corporation. +% and modified for upLaTeX +% +% This file is part of the upLaTeX2e system. +% ----------------------------------------- +% +% \fi +% +% \CheckSum{92} +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +% +% \setcounter{StandardModuleDepth}{1} +% \StopEventually{} +% +% \iffalse +%<*driver> +% \fi +\ProvidesFile{uplvers.dtx}[2011/05/07 v1.0q_u00 upLaTeX Kernel (Version Info)] +% \iffalse +\documentclass{jltxdoc} +\GetFileInfo{uplvers.dtx} +\author{Ken Nakano \& Hideaki Togashi \& TTK} +\title{\filename} +\date{作成日:\filedate} +\begin{document} + \maketitle + \DocInput{\filename} +\end{document} +% +% \fi +% +% \section{バージョンの設定} +% まず、このディストリビューションでのp\LaTeXe{}の日付とバージョン番号 +% を定義します。また、p\LaTeXe{}が起動されたときに表示される文字列の +% 設定もします。 +% +% \changes{v1.0}{1995/05/16}{p\LaTeXe\ 用に\file{ltvers.dtx}を修正} +% \changes{v1.0a}{1995/08/30}{\LaTeX\ \texttt{!<1995/06/01!>}版用に修正} +% \changes{v1.0b}{1996/01/31}{\LaTeX\ \texttt{!<1995/12/01!>}版用に修正} +% \changes{v1.0c}{1997/01/11}{\LaTeX\ \texttt{!<1996/06/01!>}版用に修正} +% \changes{v1.0d}{1997/01/23}{\LaTeX\ \texttt{!<1996/12/01!>}版用に修正} +% \changes{v1.0e}{1997/07/02}{\LaTeX\ \texttt{!<1997/06/01!>}版用に修正} +% \changes{v1.0f}{1998/02/17}{\LaTeX\ \texttt{!<1997/12/01!>}版用に修正} +% \changes{v1.0g}{1998/09/01}{\LaTeX\ \texttt{!<1998/06/01!>}版用に修正} +% \changes{v1.0h}{1999/04/05}{\LaTeX\ \texttt{!<1998/12/01!>}版用に修正} +% \changes{v1.0i}{1999/08/09}{\LaTeX\ \texttt{!<1999/06/01!>}版用に修正} +% \changes{v1.0j}{2000/02/29}{\LaTeX\ \texttt{!<1999/12/01!>}版用に修正} +% \changes{v1.0k}{2000/11/03}{\LaTeX\ \texttt{!<2000/06/01!>}版用に修正} +% \changes{v1.0l}{2001/09/04}{\LaTeX\ \texttt{!<2001/06/01!>}版用に修正} +% \changes{v1.0m}{2004/08/10}{\LaTeX\ \texttt{!<2003/12/01!>}版対応確認} +% \changes{v1.0n}{2005/01/04}{plfonts.dtxバグ修正} +% \changes{v1.0o}{2006/01/04}{plfonts.dtxバグ修正} +% \changes{v1.0p}{2006/06/27}{plfonts.dtx LaTeX <2005/12/01>対応} +% \changes{v1.0q}{2006/11/10}{plfonts.dtxバグ修正} +% \changes{v0.0q_u00}{2011/05/07}{pLaTeX用からupLaTeX用に修正。} +% +% このバージョンのp\LaTeXe{}は、次のバージョンの\LaTeX{}\footnote{% +% LaTeX authors: Johannes Braams, David Carlisle, Alan Jeffrey, +% Leslie Lamport, Frank Mittelbach, Chris Rowley, Rainer Sch\"opf}を +% もとにしています。 +% \begin{macrocode} +%<2ekernel>\def\fmtname{LaTeX2e} +%<2ekernel>\def\fmtversion{2003/12/01} +% \end{macrocode} +% +% p\LaTeXe{}のフォーマットファイル名とバージョンです。 +% +% \begin{macrocode} +%<*plcore> +\def\pfmtname{pLaTeX2e} +\def\pfmtversion{2011/05/07u00} +% +% \end{macrocode} +% +% \subsection{パッチファイルのロード} +% +% 次の部分は、p\LaTeXe{}のパッチファイルをロードするためのコードです。 +% バグを修正するためのパッチを配布するかもしれません。 +% \begin{macrocode} +%<*plfinal> +\IfFileExists{uplpatch.ltx} + {\typeout{************************************^^J% + * Appliying patch file uplpatch.ltx *^^J% + ************************************} + \def\pfmtversion@topatch{unknown} + \input{uplpatch.ltx} + \ifx\pfmtversion\pfmtversion@topatch + \ifx\ppatch@level\@undefined + \typeout{^^J^^J^^J% + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J% + !! Patch file `uplpatch.ltx' (for version <\pfmtversion@topatch>)^^J% + !! is not suitable for version <\pfmtversion> of pLaTeX.^^J^^J% + !! Please check if iniptex found an old patch file:^^J% + !! --- if so, rename it or delete it, and redo the^^J% + !! iniptex run.^^J% + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J}% + \batchmode \@@end + \fi + \else + \typeout{^^J^^J^^J% + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J% + !! Patch file `uplpatch.ltx' (for version <\pfmtversion@topatch>)^^J% + !! is not suitable for version <\pfmtversion> of pLaTeX.^^J% + !!^^J% + !! Please check if iniptex found an old patch file:^^J% + !! --- if so, rename it or delete it, and redo the^^J% + !! iniptex run.^^J% + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J}% + \batchmode \@@end + \fi + \let\pfmtversion@topatch\relax + }{} +% \end{macrocode} +% +% 起動時に表示される文字列です。 +% \LaTeX{}にパッチがあてられている場合は、それも表示します。 +% \begin{macrocode} +\ifx\patch@level\@undefined + \ifx\ppatch@level\@undefined + \everyjob{\typeout{% + \pfmtname\space<\pfmtversion>\space + (based on \fmtname\space<\fmtversion>)}} + \else + \everyjob{\typeout{% + \pfmtname\space<\pfmtversion>+\ppatch@level\space + (based on \fmtname\space<\fmtversion>)}} + \fi +\else + \ifx\ppatch@level\@undefined + \everyjob{\typeout{% + \pfmtname\space<\pfmtversion>\space + (based on \fmtname\space<\fmtversion>\space + patch level \patch@level)}} + \else + \everyjob{\typeout{% + \pfmtname\space<\pfmtversion>+\ppatch@level\space + (based on \fmtname\space<\fmtversion>\space + patch level \patch@level)}} + \fi +\fi +% +% \end{macrocode} +% +% \Finale +% +\endinput -- cgit v1.2.3