From c8f2a113dcdfc0ceb813d1226e800df49a2baf5d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 1 Apr 2019 21:08:48 +0000 Subject: jlreq (1apr19) git-svn-id: svn://tug.org/texlive/trunk@50697 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/jlreq/README-ja.md | 35 +- Master/texmf-dist/doc/latex/jlreq/README.md | 5 + Master/texmf-dist/doc/latex/jlreq/jlreq-ja.html | 51 +- .../doc/latex/jlreq/jlreq-trimmarks-ja.html | 83 +- .../doc/latex/jlreq/jlreq-trimmarks-ja.md | 57 +- .../doc/latex/jlreq/jlreq-trimmarks.html | 79 +- .../texmf-dist/doc/latex/jlreq/jlreq-trimmarks.md | 52 +- Master/texmf-dist/doc/latex/jlreq/jlreq.html | 7 + .../texmf-dist/fonts/vf/public/jlreq/ubjlreq-q.vf | Bin 100 -> 100 bytes .../texmf-dist/fonts/vf/public/jlreq/ubjlreq-v.vf | Bin 644476 -> 1590492 bytes Master/texmf-dist/fonts/vf/public/jlreq/ubjlreq.vf | Bin 644504 -> 1590520 bytes .../texmf-dist/fonts/vf/public/jlreq/ubjlreqg-q.vf | Bin 100 -> 100 bytes .../texmf-dist/fonts/vf/public/jlreq/ubjlreqg-v.vf | Bin 644476 -> 1590492 bytes .../texmf-dist/fonts/vf/public/jlreq/ubjlreqg.vf | Bin 644508 -> 1590524 bytes .../texmf-dist/fonts/vf/public/jlreq/ubzjlreq-q.vf | Bin 100 -> 100 bytes .../texmf-dist/fonts/vf/public/jlreq/ubzjlreq-v.vf | Bin 644412 -> 1590428 bytes .../texmf-dist/fonts/vf/public/jlreq/ubzjlreq.vf | Bin 644444 -> 1590460 bytes .../fonts/vf/public/jlreq/ubzjlreqg-q.vf | Bin 100 -> 100 bytes .../fonts/vf/public/jlreq/ubzjlreqg-v.vf | Bin 644412 -> 1590428 bytes .../texmf-dist/fonts/vf/public/jlreq/ubzjlreqg.vf | Bin 644444 -> 1590460 bytes .../texmf-dist/fonts/vf/public/jlreq/ujlreq-q.vf | Bin 100 -> 100 bytes .../texmf-dist/fonts/vf/public/jlreq/ujlreq-v.vf | Bin 644476 -> 1590492 bytes Master/texmf-dist/fonts/vf/public/jlreq/ujlreq.vf | Bin 644504 -> 1590520 bytes .../texmf-dist/fonts/vf/public/jlreq/ujlreqg-q.vf | Bin 100 -> 100 bytes .../texmf-dist/fonts/vf/public/jlreq/ujlreqg-v.vf | Bin 644476 -> 1590492 bytes Master/texmf-dist/fonts/vf/public/jlreq/ujlreqg.vf | Bin 644504 -> 1590520 bytes .../texmf-dist/fonts/vf/public/jlreq/uzjlreq-q.vf | Bin 100 -> 100 bytes .../texmf-dist/fonts/vf/public/jlreq/uzjlreq-v.vf | Bin 644412 -> 1590428 bytes Master/texmf-dist/fonts/vf/public/jlreq/uzjlreq.vf | Bin 644440 -> 1590456 bytes .../texmf-dist/fonts/vf/public/jlreq/uzjlreqg-q.vf | Bin 100 -> 100 bytes .../texmf-dist/fonts/vf/public/jlreq/uzjlreqg-v.vf | Bin 644412 -> 1590428 bytes .../texmf-dist/fonts/vf/public/jlreq/uzjlreqg.vf | Bin 644444 -> 1590460 bytes .../texmf-dist/tex/latex/jlreq/jlreq-helpers.sty | 40 +- .../texmf-dist/tex/latex/jlreq/jlreq-trimmarks.sty | 329 +++++-- Master/texmf-dist/tex/latex/jlreq/jlreq.cls | 1021 +++++++++++--------- 35 files changed, 1080 insertions(+), 679 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/jlreq/README-ja.md b/Master/texmf-dist/doc/latex/jlreq/README-ja.md index d1a07ffe3d3..867704d36f0 100644 --- a/Master/texmf-dist/doc/latex/jlreq/README-ja.md +++ b/Master/texmf-dist/doc/latex/jlreq/README-ja.md @@ -82,14 +82,16 @@ ## 各種設計 -設計はクラスオプションまたは`\jlreqsetup`によりkeyval形式で行います.以下では次の用法を使います. +設計はクラスオプションまたは`\jlreqsetup`によりkeyval形式で行います.ただし,クラスオプションではLaTeXの実装により,本来可能な入力が受け付けられないがケースあります.多くの場合は空白を除くことにより解決します. + +以下では次の用法を使います. * `[A/B]`:AまたはBです.`[A/B/C]`等も同様. * `<寸法>`:TeXが認識する寸法です.簡単な式(`10pt+10pt`のような)を使うこともできます.また,クラスオプションでは,場合によっては次のような特殊な値を使うこともできます.(これらはpLaTeX / upLaTeXではもとから利用可能ですが,LuaLaTeXでも利用可能なように処理されています.)`\jlreqsetup`内のような場所では,常に`\zw`や`\zh`により全角幅が記述できます.以下,たとえば`Q`が利用可能な場合は`<寸法;Q>`のように記述します. - `Q`:0.25mmと解釈されます. - `zw`, `zh`:全角幅として解釈されます. -* <コード>:LaTeXのコードです. -* <フォント設定コード>:`\Large`や`\bfseries`のようなフォント設定の命令です.`\Large\bfseries`のように複数指定することもできます. +* `<コード>`:LaTeXのコードです. +* `<フォント設定コード>`:`\Large`や`\bfseries`のようなフォント設定の命令です.`\Large\bfseries`のように複数指定することもできます. ### 基本版面 @@ -118,6 +120,10 @@ * `open_bracket_pos=[zenkaku_tentsuki/zenkakunibu_nibu/nibu_tentsuki]`:始め括弧が行頭に来た際の配置方法を指定します.それぞれ段落開始全角折り返し行頭天付き(デフォルト),段落開始全角二分折り返し行頭二分,段落開始二分折り返し行頭天付きを意味します. * `hanging_punctuation`:ぶら下げ組をします. +### 逆ノンブル +クラスオプションです. +* `use_reverse_pagination`:逆ノンブルの機能を利用可能にします.`jlreqreversepage`という「読み取り専用のカウンタ」が定義されます.(本物のカウンタではありません.)`\arabic`などの命令や`\value`が適用可能です.また`\thejlreqreversepage`が`\arabic{jlreqreversepage}`として定義されます. + ### 注関係 `\jlreqsetup`で指定します. @@ -194,7 +200,7 @@ * `pagestyle=<ページスタイル名>`:見出し箇所のページスタイルを指定します. * `label_format=<コード>`:ラベルを出力する命令を指定します.たとえば`label_format={第\thechapter 章}`のように指定します. * `format=<コード>`:実際に出力する書式を指定します.`format={\null\vfil {\Huge\bfseries #1#2}}`のようにします.`#1`はラベルに,`#2`は見出し文字列に置き換えられます.この中では`\jlreqHeadingLabel`,`\jlreqHeadingText`という命令が利用可能です.いずれも引数を一つとる命令で,それぞれラベル,見出し文字列が空ならば空に,そうでなければ与えられた引数自身を出力します.例えば`format={[\jlreqHeadingLabel{Label=#1}]}`と指定されていれば,ラベルが空でない時には`[Label=<ラベル>]`を,そうでなければ`[]`を出力します. -* `number=[true/false]':採番を行うかを指定します.ただし,`number=false`の場合でも対応するカウンタは定義されます.また`\the<カウンタ名>`の変更もされないので,必要ならば再定義が必要になります. +* `number=[true/false]`:採番を行うかを指定します.ただし,`number=false`の場合でも対応するカウンタは定義されます.また`\the<カウンタ名>`の変更もされないので,必要ならば再定義が必要になります. ### 別行見出し `\NewBlockHeading`で作成します.`\<命令名>*[running head]{見出し文字列}[副題]`という書式の命令を作成します.設定は以下の通り. @@ -211,8 +217,8 @@ * `indent=<寸法>`:見出し全体の字下げ量を指定します. * `end_indent=<寸法>`:見出し全体の字上げ量を指定します. * `after_label_space=<寸法>`:ラベル後,見出し文字列までの空きを指定します. -* `second_heading_text_indent=[<寸法>/{<寸法>,<寸法>}]`:見出し文字列の二行目以降のインデントを指定します.一行目の頭を起点として指定しますが,`second_heading_text_indent=*1\zw`のように先頭に`*`をつけるとラベルの頭を起点としての指定になります.また,`second_heading_text_indent={<ラベルがある時>,<ラベルがない時>}`という指定をすると,ラベルの有無に応じて値を変更することができます.`<ラベルがある時>`の指定ではやはり`*`を使うことができます. -* `subtitle_indent=<寸法>`:副題のインデント量を指定します.見出し文字列の一行目を起点として指定します.ただし,`subtitle_indent=*1\zw`のように先頭に`*`をつけるとラベルの頭を起点としての指定になります.`subtitle_indent=true`の時のみ有効です. +* `second_heading_text_indent=[<寸法>/{<寸法>,<寸法>}]`:見出し文字列の二行目以降のインデントを指定します.見出し文字列一行目の頭を起点として指定しますが,`second_heading_text_indent=*1\zw`のように先頭に`*`をつけるとラベルの頭を起点としての指定になります.また,`second_heading_text_indent={<ラベルがある時>,<ラベルがない時>}`という指定をすると,ラベルの有無に応じて値を変更することができます.`<ラベルがある時>`の指定ではやはり`*`を使うことができます. +* `subtitle_indent=<寸法>`:副題のインデント量を指定します.見出し文字列の一行目を起点として指定します.ただし,`subtitle_indent=*1\zw`のように先頭に`*`をつけるとラベルの頭を起点としての指定になります.`subtitle_break=true`の時のみ有効です. #### その他 * `subtitle_break=[true/false]`:見出し文字列と副題の間を改行するか指定します. @@ -220,7 +226,7 @@ * `pagebreak=[clearpage/cleardoublepage/clearcolumn/nariyuki/begin_with_odd_page/begin_with_even_page]`:見出し直前の改ページを指定します.それぞれ,改ページ,`\cleardoublepage`実行,改段,なりゆき,奇数ページ開始,偶数ページ開始,です. * `afterindent=[true/false]`:見出し直後の段落の字下げを行うかを指定します. * `column_spanning=[true/false]`: 段抜きの見出しにします.`pagebreak=nariyuki`または`pagebreak=clearcolumn`の時には無視されます. -* `number=[true/false]':採番を行うかを指定します.`\NewTobiraHeading`と同様の注意が必要です. +* `number=[true/false]`:採番を行うかを指定します.`\NewTobiraHeading`と同様の注意が必要です. #### 行取り 行取りの指定は以下のいずれかの方法で行うことができます. @@ -311,13 +317,7 @@ `\RenewPageStyle`,`\ProvidePageStyle`,`\DeclarePageStyle`もあります.`\ModifyPageStyle`により既存のページスタイルを改変することが可能です. ## JFM -以下のような独自のJFMを使います.パッケージによっては,パッケージ独自のJFMや,また標準のJFMを使うように設定がし直される場合があります.例えばLuaTeX-jaに付属するluatexja-presetパッケージは通常LuaTeX-ja標準のJFMを使います.本クラスファイルで使っているJFMを使う場合は, - -```LaTeX -\usepackage[jfm_yoko=jlreq,jfm_tate=jlreqv,hiragino-pron]{luatexja-preset} -``` - -のようにオプションで指定する必要があります. +以下のような独自のJFMを使います.パッケージによっては,パッケージ独自のJFMや,また標準のJFMを使うように設定がし直される場合があります.本クラスファイルで使用するJFMを使う場合には,パッケージオプションなどを適切に与えて設定をする必要があります. ### pLaTeX/upLaTeXの場合 JFMの名前は次の通りです.`[]`で囲まれている文字は設定により入ったり入らなかったりします. @@ -338,7 +338,7 @@ JFMの名前は次の通りです.`[]`で囲まれている文字は設定に * 横書き用のJFMは`jlreq` * 縦書き用のJFMは`jlreqv` -となります.ゴシックも同じJFMを使います. +となります.ゴシックも同じJFMを使います.本クラスファイルは,LuaTeX-ja標準のJFMをこれらに変更します. ## その他 @@ -434,6 +434,11 @@ JFMの名前は次の通りです.`[]`で囲まれている文字は設定に - `\NewBlockHeading`の`format`に`#1`が含まれてもエラーが起こらないようにした. - `\jlreqsetup`の`caption_label_format`などを拡張. - バグ修正. +* 2019-04-01 + - 逆ノンブルを利用可能にするクラスオプション`use_reverse_pagination`を追加. + - `zref`パッケージの利用をやめた. + - 新元号を追加. + - バグ修正. -------------- diff --git a/Master/texmf-dist/doc/latex/jlreq/README.md b/Master/texmf-dist/doc/latex/jlreq/README.md index 7e706b8a6c1..77fd1f9f9d0 100644 --- a/Master/texmf-dist/doc/latex/jlreq/README.md +++ b/Master/texmf-dist/doc/latex/jlreq/README.md @@ -106,6 +106,11 @@ This package is distributed under the BSD 2-Clause License. See [LICENSE](LICENS - `format` without `#1` is allowed in `\NewBlockHeading`. - Extended `caption_label_format` etc. in `\jlreqsetup`. - Fixed bugs. +* 2019-04-01 + - Added `use_reverse_pagination` to the class option. + - Stopped to use `zref` package. + - New regnal year. + - Fixed bugs. -------------- diff --git a/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.html b/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.html index 637535f06b3..a58f5681ccc 100644 --- a/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.html +++ b/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.html @@ -102,9 +102,9 @@

と配置します.make installとすると,$TEXMF=$TEXMFHOMEとしてこのコピーを行います.

使い方

通常通り

-
\documentclass{jlreq}
+
\documentclass{jlreq}

とします.これで横書きのarticle相当の文書クラスとなります.エンジンは自動判定されますが,指定する場合はクラスオプションにplatex/uplatex/lualatexのいずれかを渡してください.縦書きにするにはtateオプションを渡します.また,reportやbook相当の文書クラスとするには,それぞれreportbookオプションを渡します.たとえば,縦書きの本を作成するには

-
\documentclass[tate,book]{jlreq}
+
\documentclass[tate,book]{jlreq}

とします.

その他,oneside / twoside / onecolumn / twocolumn / titlepage / notitlepage / draft / final / openright / openany / leqno / fleqnというよくあるオプションを受け付けます.

標準的な文書クラスと同じように中身を書くことができますが,次のような命令が追加 / 拡張されています.なお,本ドキュメントでは日本語組版処理の要件における用語を断りなく使います.

@@ -117,7 +117,7 @@

\sidenote

この命令は傍注の幅が正の時にのみ定義されます.デフォルトの基本版面ではこの幅は0に設定されています.従って\sidenoteは定義されません.後の基本版面の設定を参考にしてください.

\sidenoteは傍注(縦組みの場合は脚注)を出力します.内部では\marginparを使っています.デフォルトでは\footnoteと同様の書式となりますが,\jlreqsetupsidenote_type=symbolが指定されている場合,その書式は\sidenote{該当項目}{注}となります.たとえば

-
刊行できる\sidenote{原稿}{印刷などの方法により……}を入手する仕事である.
+
刊行できる\sidenote{原稿}{印刷などの方法により……}を入手する仕事である.

とします.後の説明も参照してください.

\endnote

後注を指定します.\footnoteと同様の書式です.デフォルトでは,注自身の出力は見出し直前に行われます.この動作は\jlreqsetupendnote_positionを渡すことで制御できます.詳しくは後の注関係の説明をご覧ください.また\theendnotesを実行するとその場に出力をします.

@@ -136,12 +136,13 @@

各種設計

-

設計はクラスオプションまたは\jlreqsetupによりkeyval形式で行います.以下では次の用法を使います.

+

設計はクラスオプションまたは\jlreqsetupによりkeyval形式で行います.ただし,クラスオプションではLaTeXの実装により,本来可能な入力が受け付けられないがケースあります.多くの場合は空白を除くことにより解決します.

+

以下では次の用法を使います.

-
  • <コード>:LaTeXのコードです.
  • -
  • <フォント設定コード>:\Large\bfseriesのようなフォント設定の命令です.\Large\bfseriesのように複数指定することもできます.
  • +
  • <コード>:LaTeXのコードです.
  • +
  • <フォント設定コード>\Large\bfseriesのようなフォント設定の命令です.\Large\bfseriesのように複数指定することもできます.
  • 基本版面

    クラスオプションです.

    @@ -181,6 +182,11 @@
  • open_bracket_pos=[zenkaku_tentsuki/zenkakunibu_nibu/nibu_tentsuki]:始め括弧が行頭に来た際の配置方法を指定します.それぞれ段落開始全角折り返し行頭天付き(デフォルト),段落開始全角二分折り返し行頭二分,段落開始二分折り返し行頭天付きを意味します.
  • hanging_punctuation:ぶら下げ組をします.
  • +

    逆ノンブル

    +

    クラスオプションです.

    +

    注関係

    \jlreqsetupで指定します.

    別行見出し

    \NewBlockHeadingで作成します.\<命令名>*[running head]{見出し文字列}[副題]という書式の命令を作成します.設定は以下の通り.

    @@ -278,8 +284,8 @@
  • indent=<寸法>:見出し全体の字下げ量を指定します.
  • end_indent=<寸法>:見出し全体の字上げ量を指定します.
  • after_label_space=<寸法>:ラベル後,見出し文字列までの空きを指定します.
  • -
  • second_heading_text_indent=[<寸法>/{<寸法>,<寸法>}]:見出し文字列の二行目以降のインデントを指定します.一行目の頭を起点として指定しますが,second_heading_text_indent=*1\zwのように先頭に*をつけるとラベルの頭を起点としての指定になります.また,second_heading_text_indent={<ラベルがある時>,<ラベルがない時>}という指定をすると,ラベルの有無に応じて値を変更することができます.<ラベルがある時>の指定ではやはり*を使うことができます.
  • -
  • subtitle_indent=<寸法>:副題のインデント量を指定します.見出し文字列の一行目を起点として指定します.ただし,subtitle_indent=*1\zwのように先頭に*をつけるとラベルの頭を起点としての指定になります.subtitle_indent=trueの時のみ有効です.
  • +
  • second_heading_text_indent=[<寸法>/{<寸法>,<寸法>}]:見出し文字列の二行目以降のインデントを指定します.見出し文字列一行目の頭を起点として指定しますが,second_heading_text_indent=*1\zwのように先頭に*をつけるとラベルの頭を起点としての指定になります.また,second_heading_text_indent={<ラベルがある時>,<ラベルがない時>}という指定をすると,ラベルの有無に応じて値を変更することができます.<ラベルがある時>の指定ではやはり*を使うことができます.
  • +
  • subtitle_indent=<寸法>:副題のインデント量を指定します.見出し文字列の一行目を起点として指定します.ただし,subtitle_indent=*1\zwのように先頭に*をつけるとラベルの頭を起点としての指定になります.subtitle_break=trueの時のみ有効です.
  • その他

    行取り

    行取りの指定は以下のいずれかの方法で行うことができます.

    @@ -299,10 +305,10 @@

    連続して掲げる見出しの行取り

    \SetBlockHeadingSpacesにより,見出しが連続して掲げられたときの行取りを設定することができます.\SetBlockHeadingSpaces

    -
    \SetBlockHeadingSpaces{
    +
    \SetBlockHeadingSpaces{
       {_part{lines=3,before_lines=1},_section{lines=2},_subsection{lines=2}}
       [lines=5]{_section,23pt,_subsection,16pt}
    -}
    +}

    のように使います.この意味は次の通りです.

    \ModifyHeading

    既に(上のどれかを使い)定義された見出し命令の設定を変更します.たとえば

    -
    \ModifyHeading{section}{lines=10}
    +
    \ModifyHeading{section}{lines=10}

    とすると,\sectionのフォントなどの設定はそのままに,行取りのみが10行に変更されます.見出しの種類を変更することはできません.

    \SaveHeading

    見出し命令の定義を待避します.

    -
    \SaveHeading{section}{\restoresection} % \sectionの中身を\restoresectionに待避.
    +
    \SaveHeading{section}{\restoresection} % \sectionの中身を\restoresectionに待避.
     \RenewBlockHeading{section}{1}{font=……} % \sectionを新しく定義する.
     ……
    -\restoresection % \sectionの中身を元に戻す.
    +\restoresection % \sectionの中身を元に戻す.

    のように使います.

    ページスタイル

    \NewPageStyle{<ページスタイル名>}{<設定>}
    @@ -367,9 +373,7 @@
     
     

    \RenewPageStyle\ProvidePageStyle\DeclarePageStyleもあります.\ModifyPageStyleにより既存のページスタイルを改変することが可能です.

    JFM

    -

    以下のような独自のJFMを使います.パッケージによっては,パッケージ独自のJFMや,また標準のJFMを使うように設定がし直される場合があります.例えばLuaTeX-jaに付属するluatexja-presetパッケージは通常LuaTeX-ja標準のJFMを使います.本クラスファイルで使っているJFMを使う場合は,

    - -

    のようにオプションで指定する必要があります.

    +

    以下のような独自のJFMを使います.パッケージによっては,パッケージ独自のJFMや,また標準のJFMを使うように設定がし直される場合があります.本クラスファイルで使用するJFMを使う場合には,パッケージオプションなどを適切に与えて設定をする必要があります.

    pLaTeX/upLaTeXの場合

    JFMの名前は次の通りです.[]で囲まれている文字は設定により入ったり入らなかったりします.

    [u][b][z]jlreq[g][-v]
    @@ -388,7 +392,7 @@
     
  • 横書き用のJFMはjlreq
  • 縦書き用のJFMはjlreqv
  • -

    となります.ゴシックも同じJFMを使います.

    +

    となります.ゴシックも同じJFMを使います.本クラスファイルは,LuaTeX-ja標準のJFMをこれらに変更します.

    その他

    • クラスオプションjlreq_notesが渡されると,日本語組版処理の記述と矛盾する設定が行われた場合に通知がされます.
    • @@ -525,6 +529,13 @@
    • \jlreqsetupcaption_label_formatなどを拡張.
    • バグ修正.
    +
  • 2019-04-01 +
      +
    • 逆ノンブルを利用可能にするクラスオプションuse_reverse_paginationを追加.
    • +
    • zrefパッケージの利用をやめた.
    • +
    • 新元号を追加.
    • +
    • バグ修正.
    • +

  • Noriyuki Abe https://github.com/abenori/jlreq

    diff --git a/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks-ja.html b/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks-ja.html index c725a6c421b..5c0cec43e4d 100644 --- a/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks-ja.html +++ b/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks-ja.html @@ -135,40 +135,58 @@
  • no:何も表示しません.
  • bleed_margin

    -

    仕上がりと裁ち落としの間(ドブ)の長さを指定します.

    +

    仕上がりと裁ち落としの間(ドブ)の長さを指定します.次のようにすると,上下左右を独立に変更できます.

    +
    \usepackage[bleed_margin={top=3mm,bottom=5mm,gutter=0mm,fore-edge=2mm}]{jlreq-trimmarks}

    \jlreqtrimmarkssetup

    パッケージオプションで指定できない設定を行えます.keyval形式です.

    -

    show=banner時に出力される文字列.通常は左上に出力されますが,四つ角および上下左右の中心に出力することもできます.例えば次のように指定します.

    - -

    各項目に\thepageを指定するとページ数を出力できます.キー名は省略することもできます.例えば次の通り.

    - + <場所(上下,左右中央)>={ + <細かな位置>={ + <ページ数の偶奇に応じて>={ + <表示項目> + } + } + } + } +}
    +

    のようになります.キー名は省略することもできます.例えば次のように指定します.

    +
    \jlreqtrimmarkssetup{
    +  banner={
    +    top-right={
    +      tate={
    +        odd={奇数ページの右上に縦書きで表示},
    +        even={偶数ページの右上に縦書きで表示},
    +      },
    +      yoko={右上に横書きで表示}, % ページの偶奇によらず共通
    +      corner={右上角に横書きで表示},
    +      in-yoko={右上版面内に横書きで表示},
    +      in-tate={右上版面内に縦書きで表示},
    +    },
    +    bottom-center={
    +      left={中央下の左に表示}, % odd=, even=も使用可能
    +      right={中央下の右に表示},
    +      in={中央下の版面内に表示},
    +    },
    +    center-gutter={
    +      above={ノド側中央の上側に表示},
    +      below={ノド側中央の下側に表示},
    +    },
    +  }
    +}
    +

    場所はtop/bottom/centerleft/right/center/gutter/fore-edgeの可能な組み合わせが指定可能です.各項目に\thepageを指定するとページ数を出力できます.

    +

    次のような指定も可能です.

    +
    \jlreqtrimmarkssetup{
    +  banner={
    +    tate={左上に縦書き}, % 場所が省略されるとtop-leftと見なされる.
    +    odd={左上奇数ページ}, % 省略されたのでyokoと見なされる.
    +    top-right={
    +      odd={右上奇数ページ} % ここもyokoが省略されている.
    +    }
    +  }
    +}

    trimmarks_width

    トンボ自身の太さを指定します.

    color

    @@ -208,6 +226,11 @@
    • \jlreqtrimmarkssetup内のbannerを拡張.
    +
  • 2019-04-01 +
      +
    • \jlreqtrimmarkssetup内のbannerを更に拡張.
    • +
    • bleed_marginを拡張.
    • +

  • Noriyuki Abe https://github.com/abenori/jlreq

    diff --git a/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks-ja.md b/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks-ja.md index 94fec535587..7531072932a 100644 --- a/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks-ja.md +++ b/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks-ja.md @@ -59,43 +59,66 @@ dviドライバの指定です.エンジンに`lualatex`を利用する場合 * `no`:何も表示しません. ### `bleed_margin` -仕上がりと裁ち落としの間(ドブ)の長さを指定します. +仕上がりと裁ち落としの間(ドブ)の長さを指定します.次のようにすると,上下左右を独立に変更できます. +```latex +\usepackage[bleed_margin={top=3mm,bottom=5mm,gutter=0mm,fore-edge=2mm}]{jlreq-trimmarks} +``` ## `\jlreqtrimmarkssetup` パッケージオプションで指定できない設定を行えます.keyval形式です. ### `banner` -`show=banner`時に出力される文字列.通常は左上に出力されますが,四つ角および上下左右の中心に出力することもできます.例えば次のように指定します. +`show=banner`時に出力される文字列.通常は左上に出力されますが,四つ角および上下左右の中心に出力することもできます.指定は +```latex +\jlreqtrimmarkssetup{ + banner={ + <場所(上下,左右中央)>={ + <細かな位置>={ + <ページ数の偶奇に応じて>={ + <表示項目> + } + } + } + } +} +``` +のようになります.キー名は省略することもできます.例えば次のように指定します. ```latex \jlreqtrimmarkssetup{ banner={ top-right={ tate={ - odd = {奇数ページの右上に縦書きで表示}, - even = {偶数ページの右上に縦書きで表示}, + odd={奇数ページの右上に縦書きで表示}, + even={偶数ページの右上に縦書きで表示}, }, yoko={右上に横書きで表示}, % ページの偶奇によらず共通 corner={右上角に横書きで表示}, - in-yoko = {右上版面内に横書きで表示}, - in-tate = {右上版面内に縦書きで表示}, + in-yoko={右上版面内に横書きで表示}, + in-tate={右上版面内に縦書きで表示}, }, bottom-center={ - left = {中央下の左に表示}, % 必要ならばodd=, even=が利用可能 - right = {中央下の右に表示}, - in = {中央下の版面内に表示}, - } + left={中央下の左に表示}, % odd=, even=も使用可能 + right={中央下の右に表示}, + in={中央下の版面内に表示}, + }, + center-gutter={ + above={ノド側中央の上側に表示}, + below={ノド側中央の下側に表示}, + }, } } ``` -各項目に`\thepage`を指定するとページ数を出力できます.キー名は省略することもできます.例えば次の通り. +場所は`top/bottom/center`と`left/right/center/gutter/fore-edge`の可能な組み合わせが指定可能です.各項目に`\thepage`を指定するとページ数を出力できます. + +次のような指定も可能です. ```latex \jlreqtrimmarkssetup{ banner={ - tate = {左上に縦書き}, % 場所が省略されるとtop-leftと見なされる. - odd = {左上奇数ページ}, % 省略されたのでyokoと見なされる. - top-right = { - odd = {右上奇数ページ} % ここもyokoが省略されている. + tate={左上に縦書き}, % 場所が省略されるとtop-leftと見なされる. + odd={左上奇数ページ}, % 省略されたのでyokoと見なされる. + top-right={ + odd={右上奇数ページ} % ここもyokoが省略されている. } } } @@ -131,6 +154,10 @@ dviドライバの指定です.エンジンに`lualatex`を利用する場合 - バグ修正 * 2018-12-10 - `\jlreqtrimmarkssetup`内の`banner`を拡張. +* 2019-04-01 + - `\jlreqtrimmarkssetup`内の`banner`を更に拡張. + - `bleed_margin`を拡張. + -------------- Noriyuki Abe diff --git a/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.html b/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.html index f1f0a9f8c17..b331ef9c21e 100644 --- a/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.html +++ b/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.html @@ -134,40 +134,54 @@
  • no: nothing will be showed
  • bleed_margin

    -

    Set the bleed margin.

    +

    Set the bleed margin. You can also specify as follows.

    +
    \usepackage[bleed_margin={top=3mm,bottom=5mm,gutter=0mm,fore-edge=2mm}]{jlreq-trimmarks}

    \jlreqtrimmarkssetup

    Set the additional settings with the keyval style.

    -

    The things which the package outputs when show=banner is specified in the package option. Normally it is showed in the left of the top. You can also put them in many places, for example:

    - -

    You can use \thepage to output the number of the page. The keys can be ommited. For example:

    -
    \jlreqtrimmarkssetup{
    +

    The things which the package outputs when show=banner is specified in the package option. Normally it is showed in the left of the top. You can also put them in many places with

    +
    \jlreqtrimmarkssetup{
       banner={
    -    vertical = {Vertical mode, in the top of the left},
    -    odd = {In the top of the left, only in odd pages.}, % regarded as `horizontal`
    -    top-right = {
    -      odd = {In the top of the right, only in odd pages, horizontal mode.}
    -    }
    -  }
    -}
    + <Position (top/bottom, left/right, center)>={ + <more precise position>={ + <odd/even>={ + <content> + } + } + } + } +}
    +

    Here is an example.

    +
    \jlreqtrimmarkssetup{
    +  banner={
    +    top-right={
    +      vertical={
    +        odd={In the right of the top, only in odd pages, vertical mode.},
    +        even={In the right of the top, only in even pages, vertical mode.},
    +      },
    +      horizontal={In the right of the top, horizontal mode.}, % does not depend on the parity of the page number
    +      corner={In the corner of the right of the top, horizontal mode.},
    +      in-horizontal={In the right of the top, horizontal mode, in the trim area.},
    +      in-vertical={In the right of the top, vertical mode, in the trim area.},
    +    },
    +    bottom-center={
    +      left={In the left in the center of the bottom}, % odd=, even= is also available
    +      right={In the right in the center of the bottom},
    +      in={In the trim area in the center of the bottom.},
    +    }
    +  }
    +}
    +

    A possible combination of top/bottom/center and left/right/center/gutter/fore-edge can be used for the position. You can use \thepage to output the number of the page.

    +

    The keys can be ommited. For example:

    +
    \jlreqtrimmarkssetup{
    +  banner={
    +    vertical={Vertical mode, in the top of the left},
    +    odd={In the top of the left, only in odd pages.}, % regarded as `horizontal`
    +    top-right={
    +      odd={In the top of the right, only in odd pages, horizontal mode.}
    +    }
    +  }
    +}

    trimmarks_width

    Set the width of trim marks.

    color

    @@ -205,6 +219,11 @@
    • Extended banner in \jlreqtrimmarkssetup.
    +
  • 2019-04-01 +
      +
    • Extended banner in \jlreqtrimmarkssetup.
    • +
    • Extended bleed_margin
    • +

  • Noriyuki Abe https://github.com/abenori/jlreq

    diff --git a/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.md b/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.md index d4a3098e52b..3d66dd56ef9 100644 --- a/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.md +++ b/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.md @@ -58,43 +58,63 @@ Specify the types of trim marks which the package outputs. It is specified with ### `bleed_margin` Set the bleed margin. +You can also specify as follows. +```latex +\usepackage[bleed_margin={top=3mm,bottom=5mm,gutter=0mm,fore-edge=2mm}]{jlreq-trimmarks} +``` ## `\jlreqtrimmarkssetup` Set the additional settings with the keyval style. ### `banner` The things which the package outputs when `show=banner` is specified in the package option. -Normally it is showed in the left of the top. You can also put them in many places, for example: - +Normally it is showed in the left of the top. You can also put them in many places with +```latex +\jlreqtrimmarkssetup{ + banner={ + ={ + ={ + ={ + + } + } + } + } +} +``` +Here is an example. ```latex \jlreqtrimmarkssetup{ banner={ top-right={ vertical={ - odd = {In the right of the top, only in odd pages, vertical mode.}, - even = {In the right of the top, only in even pages, vertical mode.}, + odd={In the right of the top, only in odd pages, vertical mode.}, + even={In the right of the top, only in even pages, vertical mode.}, }, horizontal={In the right of the top, horizontal mode.}, % does not depend on the parity of the page number corner={In the corner of the right of the top, horizontal mode.}, - in-horizontal = {In the right of the top, horizontal mode, in the trim area.}, - in-vertical = {In the right of the top, vertical mode, in the trim area.}, + in-horizontal={In the right of the top, horizontal mode, in the trim area.}, + in-vertical={In the right of the top, vertical mode, in the trim area.}, }, bottom-center={ - left = {In the left in the center of the bottom}, % odd=, even= is also available - right = {In the right in the center of the bottom}, - in = {In the trim area in the center of the bottom.}, + left={In the left in the center of the bottom}, % odd=, even= is also available + right={In the right in the center of the bottom}, + in={In the trim area in the center of the bottom.}, } } } ``` -You can use `\thepage` to output the number of the page. The keys can be ommited. For example: +A possible combination of `top/bottom/center` and `left/right/center/gutter/fore-edge` can be used for the position. +You can use `\thepage` to output the number of the page. + +The keys can be ommited. For example: ```latex \jlreqtrimmarkssetup{ banner={ - vertical = {Vertical mode, in the top of the left}, - odd = {In the top of the left, only in odd pages.}, % regarded as `horizontal` - top-right = { - odd = {In the top of the right, only in odd pages, horizontal mode.} + vertical={Vertical mode, in the top of the left}, + odd={In the top of the left, only in odd pages.}, % regarded as `horizontal` + top-right={ + odd={In the top of the right, only in odd pages, horizontal mode.} } } } @@ -128,6 +148,10 @@ This package is distributed under the BSD 2-Clause License. See [LICENSE](LICENS - Fixed bugs. * 2018-12-10 - Extended `banner` in `\jlreqtrimmarkssetup`. +* 2019-04-01 + - Extended `banner` in `\jlreqtrimmarkssetup`. + - Extended `bleed_margin`. + -------------- Noriyuki Abe diff --git a/Master/texmf-dist/doc/latex/jlreq/jlreq.html b/Master/texmf-dist/doc/latex/jlreq/jlreq.html index df57bebc893..72e6fe413b4 100644 --- a/Master/texmf-dist/doc/latex/jlreq/jlreq.html +++ b/Master/texmf-dist/doc/latex/jlreq/jlreq.html @@ -202,6 +202,13 @@
  • Extended caption_label_format etc. in \jlreqsetup.
  • Fixed bugs.
  • +
  • 2019-04-01 +
      +
    • Added use_reverse_pagination to the class option.
    • +
    • Stopped to use zref package.
    • +
    • New regnal year.
    • +
    • Fixed bugs.
    • +

  • Noriyuki Abe https://github.com/abenori/jlreq

    diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreq-q.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreq-q.vf index 16af8b9644a..e432a42272c 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreq-q.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreq-q.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreq-v.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreq-v.vf index 3eccfa41d2d..371de093f13 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreq-v.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreq-v.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreq.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreq.vf index 2a747d15f16..a6d522a17f8 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreq.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreq.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreqg-q.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreqg-q.vf index d8ab57e0590..406061f76f2 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreqg-q.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreqg-q.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreqg-v.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreqg-v.vf index fcf5e3f7161..014ac88b949 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreqg-v.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreqg-v.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreqg.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreqg.vf index 866a8d86227..b837f6ecbe2 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreqg.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ubjlreqg.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreq-q.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreq-q.vf index 16af8b9644a..e432a42272c 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreq-q.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreq-q.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreq-v.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreq-v.vf index 4833bb40eb8..666e258a7ea 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreq-v.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreq-v.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreq.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreq.vf index 9711e902154..7909137549f 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreq.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreq.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreqg-q.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreqg-q.vf index d8ab57e0590..406061f76f2 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreqg-q.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreqg-q.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreqg-v.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreqg-v.vf index 17a7b6fa0f1..8f872efc87e 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreqg-v.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreqg-v.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreqg.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreqg.vf index e560a12ac58..cc225251142 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreqg.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ubzjlreqg.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ujlreq-q.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ujlreq-q.vf index 16af8b9644a..e432a42272c 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ujlreq-q.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ujlreq-q.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ujlreq-v.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ujlreq-v.vf index ed7dfa7882b..46e1bab6c90 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ujlreq-v.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ujlreq-v.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ujlreq.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ujlreq.vf index 79cc5d76977..2ffd8509a4e 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ujlreq.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ujlreq.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ujlreqg-q.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ujlreqg-q.vf index d8ab57e0590..406061f76f2 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ujlreqg-q.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ujlreqg-q.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ujlreqg-v.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ujlreqg-v.vf index f67da783314..9f767d71952 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ujlreqg-v.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ujlreqg-v.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/ujlreqg.vf b/Master/texmf-dist/fonts/vf/public/jlreq/ujlreqg.vf index 07d1296e530..f69ce6f1750 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/ujlreqg.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/ujlreqg.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreq-q.vf b/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreq-q.vf index 16af8b9644a..e432a42272c 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreq-q.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreq-q.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreq-v.vf b/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreq-v.vf index e4c78fe6bc7..6c7f3b48030 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreq-v.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreq-v.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreq.vf b/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreq.vf index b6bd76bb5d7..2c80f063a87 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreq.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreq.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreqg-q.vf b/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreqg-q.vf index d8ab57e0590..406061f76f2 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreqg-q.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreqg-q.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreqg-v.vf b/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreqg-v.vf index 15f6e6181a5..41580a72c45 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreqg-v.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreqg-v.vf differ diff --git a/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreqg.vf b/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreqg.vf index 260a0d805a9..d439f4d8e64 100644 Binary files a/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreqg.vf and b/Master/texmf-dist/fonts/vf/public/jlreq/uzjlreqg.vf differ diff --git a/Master/texmf-dist/tex/latex/jlreq/jlreq-helpers.sty b/Master/texmf-dist/tex/latex/jlreq/jlreq-helpers.sty index f08dd817098..2d4039951bb 100644 --- a/Master/texmf-dist/tex/latex/jlreq/jlreq-helpers.sty +++ b/Master/texmf-dist/tex/latex/jlreq/jlreq-helpers.sty @@ -246,12 +246,17 @@ % \jlreq@parsekeyval@nokey{}{} % action内では#1=key, #2=val % \ifjlreq@parsekeyval@nokey@novalue{}{}でvalueがないか判定できる. -% は一回だけ展開される. -\newcommand{\jlreq@parsekeyval@nokey}[2]{% +% *つきはを一回だけ展開する. +\def\jlreq@parsekeyval@nokey{\@ifstar{\jlreq@parsekeyval@nokey@{*}}{\jlreq@parsekeyval@nokey@{}}} +\newcommand{\jlreq@parsekeyval@nokey@}[3]{% \begingroup \long\def\jlreq@do{}% - \long\def\jlreq@parsekeyval@nokey@execute##1##2{#1}% - \expandafter\jlreq@parsekeyval@nokey@i@wuniq\expandafter\jlreq@uniqtoken#2,\jlreq@endmark,% + \long\def\jlreq@parsekeyval@nokey@execute##1##2{#2}% + \jlreq@ifempty{#1}{% + \jlreq@parsekeyval@nokey@i@wuniq\jlreq@uniqtoken#3,\jlreq@endmark,% + }{% + \expandafter\jlreq@parsekeyval@nokey@i@wuniq\expandafter\jlreq@uniqtoken#3,\jlreq@endmark,% + }% \expandafter\endgroup \jlreq@do } @@ -285,9 +290,9 @@ \long\def\jlreq@parsekeyval@nokey@removeequal#1{\jlreq@parsekeyval@nokey@removeequal@\jlreq@uniqtoken#1\jlreq@endmark} \long\def\jlreq@parsekeyval@nokey@removeequal@#1=\jlreq@endmark{\expandafter\unexpanded\expandafter{\@gobble#1}} -% #1の先頭のスペースを削除し,#2に入れる.ただし#1={ X}の時は" X"が入る. +% #1の先頭のスペースを削除し,#2に入れる. +\long\def\jlreq@helper@trim#1#2{\edef#2{\jlreq@helper@trim@i{#1}}} \def\jlreq@do#1{% #1 = " "として後で実行 - \long\def\jlreq@helper@trim##1##2{\edef##2{\jlreq@helper@trim@i{##1}}} \long\def\jlreq@helper@trim@i##1{% \jlreq@iffirsttoken{##1}{#1}% % 先頭スペースの除去.{}を外さないために\jlreq@uniqtokenを前後にいったん挟む. @@ -370,19 +375,24 @@ }% } +% オレオレラベル…… +% \jlreq@reference@ref{ラベル名}{デフォルト値} +\def\jlreq@reference@ref#1{\expandafter\ifx\csname jlreq@reference@#1\endcsname\relax\expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi{\csname jlreq@reference@#1\endcsname}} +% \jlreq@reference@label{ラベル名}{値} +\def\jlreq@reference@label#1#2{\protected@write\@auxout{}{\string\@newl@bel{jlreq@reference}{#1}{#2}}}% +\def\jlreq@reference@immediate@write#1#2{\immediate\write\@auxout{\string\@newl@bel{jlreq@reference}{#1}{#2}}}% +\def\jlreq@reference@ifexist#1{\expandafter\ifx\csname jlreq@reference@#1\endcsname\relax\expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi} + +% 自動生成されるラベル用の番号 +\newcount\jlreq@reference@count +\jlreq@reference@count=0 -\RequirePackage[savepos]{zref} -\newcount\jlreq@zref@reference@count -\jlreq@zref@reference@count=0 % 現在のページを得る -\zref@newprop*{jlreq@page}[0]{\number\c@page} -\zref@addprop{main}{jlreq@page} \newcount\jlreq@currentpage -% \jlreq@setcurrentpageをすると,\jlreq@currentpageにこの場所のページ数が入る \newcommand*{\jlreq@setcurrentpage}{% - \global\advance\jlreq@zref@reference@count by 1 - \zref@labelbyprops{jlreq@currentpage.\the\jlreq@zref@reference@count}{jlreq@page}% - \global\jlreq@currentpage=\zref@extractdefault{jlreq@currentpage.\the\jlreq@zref@reference@count}{jlreq@page}{\c@page}\relax + \global\advance\jlreq@reference@count by 1 + \jlreq@reference@label{jlreq@currentpage.\the\jlreq@reference@count}{\noexpand\arabic{page}}% + \global\jlreq@currentpage=\jlreq@reference@ref{jlreq@currentpage.\the\jlreq@reference@count}{\the\c@page}\relax } % 先頭にあるマクロを展開しまくった結果の先頭を#2に入れる. diff --git a/Master/texmf-dist/tex/latex/jlreq/jlreq-trimmarks.sty b/Master/texmf-dist/tex/latex/jlreq/jlreq-trimmarks.sty index 19ced9a2072..6ba910a240b 100644 --- a/Master/texmf-dist/tex/latex/jlreq/jlreq-trimmarks.sty +++ b/Master/texmf-dist/tex/latex/jlreq/jlreq-trimmarks.sty @@ -1,5 +1,5 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{jlreq-trimmarks}[2018/12/10 jlreq-trimmarks] +\ProvidesPackage{jlreq-trimmarks}[2019/04/01 jlreq-trimmarks] \RequirePackage{xkeyval,etoolbox} \RequirePackage{jlreq-helpers} @@ -33,6 +33,19 @@ \@ifclassloaded{jlreq}{\let\ifjlreq@trimmarks@jlreqloaded=\@firstoftwo}{\let\ifjlreq@trimmarks@jlreqloaded=\@secondoftwo} +\def\ifjlreq@trimmarks@tate@{% + \if@tate\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi +} +% \@firstoftwo when \if@tate is defined and \if@tate=\iftrue +\def\ifjlreq@trimmarks@tate{% + \ifnum0\ifx\if@tate\@undefined 1\fi\ifx\if@tate\relax 1\fi>0 + \expandafter\@secondoftwo + \else + \expandafter\ifjlreq@trimmarks@tate@ + \fi +} + + % dvipdfmx=f,dvips=s,dviout = o, lualatex = l \jlreq@trimmarks@DeclareOption{dvipdfmx}{\let\jlreq@trimmarks@driver=f} \jlreq@trimmarks@DeclareOption{dvips}{\let\jlreq@trimmarks@driver=s} @@ -144,9 +157,32 @@ } } } -\def\jlreq@trimmarks@bleed{3mm} -\DeclareOptionX{bleed_margin}{\def\jlreq@trimmarks@bleed{#1}} - +\@for\jlreq@tempa:=top,bottom,gutter,fore-edge\do{% + \expandafter\def\csname jlreq@trimmarks@bleed@\jlreq@tempa\endcsname{3mm} +} +\DeclareOptionX{bleed_margin}{% + \begingroup + \def\jlreq@do{}% + \jlreq@parsekeyval@nokey{ + \ifjlreq@parsekeyval@nokey@novalue{% + \@for\jlreq@tempa:=top,bottom,gutter,fore-edge\do{% + \epreto\jlreq@do{% + \noexpand\def\expandonce{\csname jlreq@trimmarks@bleed@\jlreq@tempa\endcsname}{##1}% + }% + }% + }{% + \ifthenelse{\equal{##1}{top} \OR \equal{##1}{bottom} \OR \equal{##1}{gutter} \OR \equal{##1}{fore-edge}}{% + \eappto\jlreq@do{% + \noexpand\def\expandonce{\csname jlreq@trimmarks@bleed@##1\endcsname}{##2}% + }% + }{% + \PackageError{jlreq-trimmarks}{Unknown position `##1' in bleed_margin}{\@ehc} + }% + }% + }{#1}% + \expandafter\endgroup + \jlreq@do +} \newif\ifjlreq@trimmarks@landscape \jlreq@trimmarks@landscapefalse \jlreq@trimmarks@DeclareOption{landscape}{\jlreq@trimmarks@landscapetrue} @@ -202,67 +238,68 @@ \fi \fi -\long\def\jlreq@trimmarks@setbanner#1#2{% +\long\def\jlreq@trimmarks@setbanner#1#2#3{% \begingroup \def\jlreq@do{}% \jlreq@parsekeyval@nokey{% \ifjlreq@parsekeyval@nokey@novalue{}{% \jlreq@switch{##1}{ - {yoko}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{yoko@#1}{##2}}} - {horizontal}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{yoko@#1}{##2}}} - {tate}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{tate@#1}{##2}}} - {vertial}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{tate@#1}{##2}}} - {corner}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{corner@#1}{##2}}} - {in-yoko}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{inyoko@#1}{##2}}} - {in-horizontal}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{inyoko@#1}{##2}}} - {in-tate}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{intate@#1}{##2}}} - {in-vertial}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{intate@#1}{##2}}} + {yoko}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{yoko@#1}{yoko@#2}{##2}}} + {horizontal}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{yoko@#1}{yoko@#2}{##2}}} + {tate}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{tate@#1}{tate@#2}{##2}}} + {vertial}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{tate@#1}{tate@#2}{##2}}} + {corner}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{corner@#1}{corner@#2}{##2}}} + {in-yoko}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{inyoko@#1}{inyoko@#2}{##2}}} + {in-horizontal}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{inyoko@#1}{inyoko@#2}{##2}}} + {in-tate}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{intate@#1}{intate@#2}{##2}}} + {in-vertial}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{intate@#1}{intate@#2}{##2}}} }% }% - }{#2}% + }{#3}% \ifx\jlreq@do\@empty - \appto\jlreq@do{\jlreq@trimmarks@setbanner@@{yoko@#1}{#2}}% + \appto\jlreq@do{\jlreq@trimmarks@setbanner@@{yoko@#1}{yoko@#2}{#3}}% \fi \expandafter\endgroup \jlreq@do } -\long\def\jlreq@trimmarks@setbanner@#1#2{% +\long\def\jlreq@trimmarks@setbanner@#1#2#3{% \begingroup \def\jlreq@do{}% \jlreq@parsekeyval@nokey{% \ifjlreq@parsekeyval@nokey@novalue{}{% \jlreq@switch*{##1}{ - {left}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{before@#1}{##2}}} - {right}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{after@#1}{##2}}} - {above}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{before@#1}{##2}}} - {below}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{after@#1}{##2}}} - {in}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{in@#1}{##2}}} + {left}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{before@#1}{before@#2}{##2}}} + {right}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{after@#1}{after@#2}{##2}}} + {above}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{before@#1}{before@#2}{##2}}} + {below}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{after@#1}{after@#2}{##2}}} + {in}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{in@#1}{in@#2}{##2}}} }% }% - }{#2}% + }{#3}% \ifx\jlreq@do\@empty - \appto\jlreq@do{\jlreq@trimmarks@setbanner@@{before@#1}{#2}}% + \appto\jlreq@do{\jlreq@trimmarks@setbanner@@{before@#1}{before@#2}{#3}}% \fi \expandafter\endgroup \jlreq@do } -\long\def\jlreq@trimmarks@setbanner@@#1#2{% +% #1 = odd, #2 = even +\long\def\jlreq@trimmarks@setbanner@@#1#2#3{% \begingroup \def\jlreq@do{}% \jlreq@parsekeyval@nokey{% \ifjlreq@parsekeyval@nokey@novalue{}{% \jlreq@switch*{##1}{ {odd}{\appto\jlreq@do{\expandafter\edef\csname jlreq@trimmarks@banner@odd@#1\endcsname{\unexpanded{##2}}}} - {even}{\appto\jlreq@do{\expandafter\edef\csname jlreq@trimmarks@banner@even@#1\endcsname{\unexpanded{##2}}}} + {even}{\appto\jlreq@do{\expandafter\edef\csname jlreq@trimmarks@banner@even@#2\endcsname{\unexpanded{##2}}}} }% }% - }{#2}% + }{#3}% \ifx\jlreq@do\@empty \appto\jlreq@do{% - \expandafter\edef\csname jlreq@trimmarks@banner@odd@#1\endcsname{\unexpanded{#2}}% - \expandafter\edef\csname jlreq@trimmarks@banner@even@#1\endcsname{\unexpanded{#2}}% + \expandafter\edef\csname jlreq@trimmarks@banner@odd@#1\endcsname{\unexpanded{#3}}% + \expandafter\edef\csname jlreq@trimmarks@banner@even@#2\endcsname{\unexpanded{#3}}% }% \fi \expandafter\endgroup @@ -294,23 +331,41 @@ \jlreq@parsekeyval@nokey{% \ifjlreq@parsekeyval@nokey@novalue{}{% \jlreq@tempafalse + \edef\jlreq@gutterodd{\ifjlreq@trimmarks@tate{right}{left}}% + \if@twoside + \edef\jlreq@guttereven{\ifjlreq@trimmarks@tate{left}{right}}% + \else + \let\jlreq@guttereven\jlreq@gutterodd + \fi \jlreq@switch*{####1}{ - {top-left}{\jlreq@tempatrue\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@left}{####2}}} - {left-top}{\jlreq@tempatrue\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@left}{####2}}} - {top-right}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@right}{####2}}} - {right-top}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@right}{####2}}} - {bottom-left}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@left}{####2}}} - {left-bottom}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@left}{####2}}} - {bottom-right}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@right}{####2}}} - {right-bottom}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@right}{####2}}} - {top-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{top@center}{####2}}} - {center-top}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{top@center}{####2}}} - {bottom-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{bottom@center}{####2}}} - {center-bottom}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{bottom@center}{####2}}} - {center-right}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@right}{####2}}} - {right-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@right}{####2}}} - {center-left}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@left}{####2}}} - {left-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@left}{####2}}} + {top-left}{\jlreq@tempatrue\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@left}{top@left}{####2}}} + {left-top}{\jlreq@tempatrue\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@left}{top@left}{####2}}} + {top-right}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@right}{top@right}{####2}}} + {right-top}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@right}{top@right}{####2}}} + {top-gutter}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@\jlreq@gutterodd}{top@\jlreq@guttereven}{####2}}} + {gutter-top}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@\jlreq@gutterodd}{top@\jlreq@guttereven}{####2}}} + {top-fore-edge}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@\jlreq@guttereven}{top@\jlreq@gutterodd}{####2}}} + {fore-edge-top}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@\jlreq@guttereven}{top@\jlreq@gutterodd}{####2}}} + {bottom-left}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@left}{bottom@left}{####2}}} + {left-bottom}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@left}{bottom@left}{####2}}} + {bottom-right}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@right}{bottom@right}{####2}}} + {right-bottom}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@right}{bottom@right}{####2}}} + {bottom-gutter}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@\jlreq@gutterodd}{bottom@\jlreq@guttereven}{####2}}} + {gutter-bottom}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@\jlreq@gutterodd}{bottom@\jlreq@guttereven}{####2}}} + {bottom-fore-edge}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@\jlreq@guttereven}{bottom@\jlreq@gutterodd}{####2}}} + {fore-edge-bottom}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@\jlreq@guttereven}{bottom@\jlreq@gutterodd}{####2}}} + {top-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{top@center}{top@center}{####2}}} + {center-top}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{top@center}{top@center}{####2}}} + {bottom-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{bottom@center}{bottom@center}{####2}}} + {center-bottom}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{bottom@center}{bottom@center}{####2}}} + {center-right}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@right}{center@right}{####2}}} + {right-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@right}{center@right}{####2}}} + {center-left}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@left}{center@left}{####2}}} + {left-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@left}{center@left}{####2}}} + {center-gutter}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@\jlreq@gutterodd}{center@\jlreq@guttereven}{####2}}} + {gutter-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@\jlreq@gutterodd}{center@\jlreq@guttereven}{####2}}} + {center-fore-edge}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@\jlreq@guttereven}{center@\jlreq@gutterodd}{####2}}} + {fore-edge-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@\jlreq@guttereven}{center@\jlreq@gutterodd}{####2}}} }% \ifjlreq@tempa \appto\jlreq@do{\expandafter\@bannertoken\expandafter{\jlreq@trimmarks@banner@odd@yoko@top@left}}% @@ -437,18 +492,29 @@ \fi \fi } +\def\jlreq@trimmarks@bleed{3mm} +% left=gutter? +\def\ifjlreq@trimmarks@leftisgutter{% + \ifjlreq@trimmarks@tate{% + \ifnum 0\ifodd\c@page 1\fi\if@twoside\else 1\fi>0 \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi + }{% + \ifnum 0\ifodd\c@page 1\fi\if@twoside\else 1\fi>0 \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi + }% +} +\def\jlreq@trimmarks@bleed@left{\ifjlreq@trimmarks@leftisgutter{\jlreq@trimmarks@bleed@gutter}{\expandafter\csname jlreq@trimmarks@bleed@fore-edge\endcsname}} +\def\jlreq@trimmarks@bleed@right{\ifjlreq@trimmarks@leftisgutter{\expandafter\csname jlreq@trimmarks@bleed@fore-edge\endcsname}{\jlreq@trimmarks@bleed@gutter}} \def\jlreq@trimmarks@outputtombow{% \vbox to\z@{% - \kern-\dimexpr 10mm + \jlreq@trimmarks@bleed\relax + \kern-\dimexpr 10mm + \jlreq@trimmarks@bleed@top\relax \boxmaxdepth\maxdimen - \moveleft\jlreq@trimmarks@bleed\vbox to\@@paperheight{% + \moveleft\jlreq@trimmarks@bleed@left\vbox to\@@paperheight{% \color@begingroup\jlreq@trimmarks@color \hbox to\@@paperwidth{% - \hskip\jlreq@trimmarks@bleed\relax + \hskip\jlreq@trimmarks@bleed@left\relax \setbox\jlreq@tempboxa=\hbox to\z@{% \@TL \yoko\hss - \vrule width\dimexpr 10mm + \jlreq@trimmarks@bleed\relax height\@tombowwidth depth\z@ + \vrule width\dimexpr 10mm + \jlreq@trimmarks@bleed@left\relax height\@tombowwidth depth\z@ \vrule height10mm width\@tombowwidth depth\z@ \iftombowdate \setbox\jlreq@tempboxa=\hbox to\z@{\hskip5mm\@bannerfont\jlreq@trimmarks@bannerfont @@ -459,7 +525,7 @@ \fi \jlreq@trimmarks@outputbanner{inyoko@top@left}{% \setbox\jlreq@tempboxa=\hbox to 0pt{\@bannerfont\jlreq@trimmarks@bannerfont##1\hss}% - \jlreq@tempdima=\dimexpr\ht\jlreq@tempboxa + \jlreq@trimmarks@bleed\relax + \jlreq@tempdima=\dimexpr\ht\jlreq@tempboxa + \jlreq@trimmarks@bleed@top\relax \ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \raise-\jlreq@tempdima\box\jlreq@tempboxa }% @@ -477,7 +543,7 @@ }% \jlreq@trimmarks@outputbanner{in@top@center}{% \setbox\jlreq@tempboxa=\hbox{\@bannerfont\jlreq@trimmarks@bannerfont##1}% - \jlreq@tempdima=\dimexpr\ht\jlreq@tempboxa + \jlreq@trimmarks@bleed\relax + \jlreq@tempdima=\dimexpr\ht\jlreq@tempboxa + \jlreq@trimmarks@bleed@top\relax \jlreq@tempdimb=0.5\wd\jlreq@tempboxa \ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt \kern-\jlreq@tempdimb\raise-\jlreq@tempdima\box\jlreq@tempboxa\kern\jlreq@tempdimb @@ -502,21 +568,21 @@ }% \jlreq@trimmarks@outputbanner{inyoko@top@right}{% \setbox\jlreq@tempboxa=\hbox to 0pt{\yoko\hss\@bannerfont\jlreq@trimmarks@bannerfont##1}% - \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \ht\jlreq@tempboxa\relax + \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@top + \ht\jlreq@tempboxa\relax \ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \raise-\jlreq@tempdima\box\jlreq@tempboxa }% \vrule height10mm width\@tombowwidth depth\z@ \jlreq@trimmarks@outputbanner{corner@top@right}{% - \setbox\jlreq@tempboxa=\hbox to 0pt{\hskip\dimexpr\jlreq@trimmarks@bleed + 4pt\relax\@bannerfont\jlreq@trimmarks@bannerfont##1\hss}% + \setbox\jlreq@tempboxa=\hbox to 0pt{\hskip\dimexpr\jlreq@trimmarks@bleed@right + 4pt\relax\@bannerfont\jlreq@trimmarks@bannerfont##1\hss}% \ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \raise 4pt\box\jlreq@tempboxa }% - \vrule width\dimexpr 10mm + \jlreq@trimmarks@bleed\relax height\@tombowwidth depth\z@\hss + \vrule width\dimexpr 10mm + \jlreq@trimmarks@bleed@right\relax height\@tombowwidth depth\z@\hss }% \dp\jlreq@tempboxa=0pt \box\jlreq@tempboxa - \hskip\jlreq@trimmarks@bleed + \hskip\jlreq@trimmarks@bleed@right }% \kern-10mm \hbox to\@@paperwidth{% @@ -526,9 +592,9 @@ \jlreq@trimmarks@outputbanner{corner@top@left}{% \setbox\jlreq@tempboxa=\hbox to 0pt{\hss\@bannerfont\jlreq@trimmarks@bannerfont##1\hskip 4pt}% \dp\jlreq@tempboxa=0pt \ht\jlreq@tempboxa=0pt - \raise\dimexpr \jlreq@trimmarks@bleed + 4pt\relax\box\jlreq@tempboxa + \raise\dimexpr \jlreq@trimmarks@bleed@top + 4pt\relax\box\jlreq@tempboxa }% - \vrule height\dimexpr 10mm + \jlreq@trimmarks@bleed\relax width\@tombowwidth depth\z@ + \vrule height\dimexpr 10mm + \jlreq@trimmarks@bleed@top\relax width\@tombowwidth depth\z@ \jlreq@trimmarks@outputbanner{tate@top@left}{% \setbox\jlreq@tempboxa=\hbox to 0pt{\tate\adjustbaseline\@bannerfont\jlreq@trimmarks@bannerfont##1\hss}% \ifx l\jlreq@trimmarks@engine @@ -541,7 +607,7 @@ }% \jlreq@trimmarks@outputbanner{intate@top@left}{% \setbox\jlreq@tempboxa=\hbox to 0pt{\tate\adjustbaseline\@bannerfont\jlreq@trimmarks@bannerfont##1\hss}% - \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed \ifx l\jlreq@trimmarks@engine + \ht\jlreq@tempboxa\fi\relax + \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@left \ifx l\jlreq@trimmarks@engine + \ht\jlreq@tempboxa\fi\relax \wd\jlreq@tempboxa=0pt \ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \kern\jlreq@tempdima\box\jlreq@tempboxa\kern-\jlreq@tempdima }% @@ -558,14 +624,14 @@ \jlreq@trimmarks@outputbanner{intate@top@right}{% \setbox\jlreq@tempboxa=\hbox to 0pt{\tate\adjustbaseline\@bannerfont\jlreq@trimmarks@bannerfont##1\hss}% \ifx l\jlreq@trimmarks@engine - \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \ht\jlreq@tempboxa\relax + \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@top + \ht\jlreq@tempboxa\relax \else - \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \wd\jlreq@tempboxa\relax + \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@top + \wd\jlreq@tempboxa\relax \fi \ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt \kern-\jlreq@tempdima\box\jlreq@tempboxa\kern\jlreq@tempdima }% - \vrule height\dimexpr 10mm + \jlreq@trimmarks@bleed\relax width\@tombowwidth depth\z@ + \vrule height\dimexpr 10mm + \jlreq@trimmarks@bleed@top\relax width\@tombowwidth depth\z@ \vrule width10mm height\@tombowwidth depth\z@ \hss }% @@ -599,10 +665,10 @@ \jlreq@trimmarks@outputbanner{in@center@left}{% \setbox\jlreq@tempboxa=\hbox{\tate\adjustbaseline\@bannerfont\jlreq@trimmarks@bannerfont##1}% \ifx l\jlreq@trimmarks@engine - \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \ht\jlreq@tempboxa\relax + \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@left + \ht\jlreq@tempboxa\relax \jlreq@tempdimb=.5\wd\jlreq@tempboxa \else - \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed\relax + \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@left\relax \jlreq@tempdimb=.5\dimexpr\ht\jlreq@tempboxa + \dp\jlreq@tempboxa\relax \fi \dp\jlreq@tempboxa=0pt \ht\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt @@ -615,10 +681,10 @@ \jlreq@trimmarks@outputbanner{in@center@right}{% \setbox\jlreq@tempboxa=\hbox{\tate\adjustbaseline\@bannerfont\jlreq@trimmarks@bannerfont##1}% \ifx l\jlreq@trimmarks@engine - \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \ht\jlreq@tempboxa\relax + \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@right + \ht\jlreq@tempboxa\relax \jlreq@tempdimb=0.5\wd\jlreq@tempboxa \else - \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \wd\jlreq@tempboxa\relax + \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@right + \wd\jlreq@tempboxa\relax \jlreq@tempdimb=0.5\dimexpr\ht\jlreq@tempboxa + \dp\jlreq@tempboxa\relax \fi \dp\jlreq@tempboxa=0pt \ht\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt @@ -645,7 +711,7 @@ \hbox to\z@{% \@Bl \yoko\hss \vrule width10mm depth\@tombowwidth height\z@ - \vrule depth\dimexpr 10mm + \jlreq@trimmarks@bleed\relax width\@tombowwidth height\z@ + \vrule depth\dimexpr 10mm + \jlreq@trimmarks@bleed@bottom\relax width\@tombowwidth height\z@ \jlreq@trimmarks@outputbanner{tate@bottom@left}{% \setbox\jlreq@tempboxa=\hbox to 0pt{\tate\adjustbaseline\hss\@bannerfont\jlreq@trimmarks@bannerfont##1}% \ifx l\jlreq@trimmarks@engine @@ -658,7 +724,7 @@ }% \jlreq@trimmarks@outputbanner{intate@bottom@left}{% \setbox\jlreq@tempboxa=\hbox to 0pt{\tate\adjustbaseline\hss\@bannerfont\jlreq@trimmarks@bannerfont##1}% - \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed \ifx l\jlreq@trimmarks@engine + \ht\jlreq@tempboxa\fi\relax + \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@left \ifx l\jlreq@trimmarks@engine + \ht\jlreq@tempboxa\fi\relax \wd\jlreq@tempboxa=0pt \ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \kern\jlreq@tempdima\box\jlreq@tempboxa\kern-\jlreq@tempdima }% @@ -675,17 +741,17 @@ \jlreq@trimmarks@outputbanner{intate@bottom@right}{% \setbox\jlreq@tempboxa=\hbox to 0pt{\tate\adjustbaseline\hss\@bannerfont\jlreq@trimmarks@bannerfont##1}% \ifx l\jlreq@trimmarks@engine - \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \ht\jlreq@tempboxa\relax + \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@right + \ht\jlreq@tempboxa\relax \else - \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \wd\jlreq@tempboxa\relax + \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@right + \wd\jlreq@tempboxa\relax \fi \ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt \kern-\jlreq@tempdima\box\jlreq@tempboxa\kern\jlreq@tempdima }% - \vrule depth\dimexpr 10mm + \jlreq@trimmarks@bleed\relax width\@tombowwidth height\z@ + \vrule depth\dimexpr 10mm + \jlreq@trimmarks@bleed@bottom\relax width\@tombowwidth height\z@ \jlreq@trimmarks@outputbanner{corner@bottom@right}{% \setbox\jlreq@tempboxa=\hbox to 0pt{\hskip 4pt\relax\@bannerfont\jlreq@trimmarks@bannerfont##1\hss}% - \jlreq@tempdima=\dimexpr\ht\jlreq@tempboxa + \jlreq@trimmarks@bleed + 4pt\relax + \jlreq@tempdima=\dimexpr\ht\jlreq@tempboxa + \jlreq@trimmarks@bleed@bottom + 4pt\relax \ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \raise-\jlreq@tempdima\box\jlreq@tempboxa }% @@ -694,12 +760,12 @@ }% \kern-10mm \hbox to\@@paperwidth{% - \hskip\jlreq@trimmarks@bleed\relax + \hskip\jlreq@trimmarks@bleed@left\relax \setbox\jlreq@tempboxa=\hbox to\z@{% \@BL \yoko\hss - \vrule width\dimexpr 10mm + \jlreq@trimmarks@bleed\relax depth\@tombowwidth height\z@ + \vrule width\dimexpr 10mm + \jlreq@trimmarks@bleed@left\relax depth\@tombowwidth height\z@ \jlreq@trimmarks@outputbanner{corner@bottom@left}{% - \setbox\jlreq@tempboxa=\hbox to 0pt{\hss\@bannerfont\jlreq@trimmarks@bannerfont##1\hskip\dimexpr\jlreq@trimmarks@bleed + 4pt\relax}% + \setbox\jlreq@tempboxa=\hbox to 0pt{\hss\@bannerfont\jlreq@trimmarks@bannerfont##1\hskip\dimexpr\jlreq@trimmarks@bleed@left + 4pt\relax}% \jlreq@tempdima=\dimexpr\ht\jlreq@tempboxa + 4pt\relax \ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \raise-\jlreq@tempdima\box\jlreq@tempboxa @@ -713,7 +779,7 @@ }% \jlreq@trimmarks@outputbanner{inyoko@bottom@left}{% \setbox\jlreq@tempboxa=\hbox to 0pt{\yoko\@bannerfont\jlreq@trimmarks@bannerfont##1\hss}% - \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \dp\jlreq@tempboxa\relax + \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@bottom + \dp\jlreq@tempboxa\relax \ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \raise\jlreq@tempdima\box\jlreq@tempboxa }% @@ -732,7 +798,7 @@ }% \jlreq@trimmarks@outputbanner{in@bottom@center}{% \setbox\jlreq@tempboxa=\hbox{\@bannerfont\jlreq@trimmarks@bannerfont##1}% - \jlreq@tempdima=\dimexpr\dp\jlreq@tempboxa + \jlreq@trimmarks@bleed\relax + \jlreq@tempdima=\dimexpr\dp\jlreq@tempboxa + \jlreq@trimmarks@bleed@bottom\relax \jlreq@tempdimb=.5\wd\jlreq@tempboxa \ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt \kern-\jlreq@tempdimb\raise\jlreq@tempdima\box\jlreq@tempboxa\kern\jlreq@tempdimb @@ -759,24 +825,24 @@ }% \jlreq@trimmarks@outputbanner{inyoko@bottom@right}{% \setbox\jlreq@tempboxa=\hbox to 0pt{\yoko\hss\@bannerfont\jlreq@trimmarks@bannerfont##1}% - \jlreq@tempdima=\dimexpr\dp\jlreq@tempboxa + \jlreq@trimmarks@bleed\relax + \jlreq@tempdima=\dimexpr\dp\jlreq@tempboxa + \jlreq@trimmarks@bleed@bottom\relax \ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \raise\jlreq@tempdima\box\jlreq@tempboxa }% \vrule depth10mm width\@tombowwidth height\z@ - \vrule width\dimexpr 10mm + \jlreq@trimmarks@bleed\relax depth\@tombowwidth height\z@\hss + \vrule width\dimexpr 10mm + \jlreq@trimmarks@bleed@right\relax depth\@tombowwidth height\z@\hss }% \ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \box\jlreq@tempboxa - \hskip\jlreq@trimmarks@bleed + \hskip\jlreq@trimmarks@bleed@right }% \color@endgroup}\vss }% } \def\@outputtombow{% % 6mm = \@tombowbleed: from plcore - \@@paperwidth=\dimexpr\@@paperwidth - 6mm + 2\dimexpr\jlreq@trimmarks@bleed\relax\relax - \@@paperheight=\dimexpr\@@paperheight - 6mm + 2\dimexpr\jlreq@trimmarks@bleed\relax\relax + \@@paperwidth=\dimexpr\@@paperwidth - 6mm + \dimexpr\jlreq@trimmarks@bleed@left + \jlreq@trimmarks@bleed@right\relax\relax + \@@paperheight=\dimexpr\@@paperheight - 6mm + \dimexpr\jlreq@trimmarks@bleed@top + \jlreq@trimmarks@bleed@bottom\relax\relax \ifjlreq@trimmarks@show\expandafter\jlreq@trimmarks@outputtombow\fi } @@ -796,39 +862,92 @@ \jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperheight + \paperheight)/2}% ] } - \edef\jlreq@trimmarks@bleedboxsize{% + \jlreq@tempcnta=\c@page + \def\@tempa{% [% - \jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperwidth - \paperwidth)/2 - \jlreq@trimmarks@bleed} - \jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperheight - \paperheight)/2 - \jlreq@trimmarks@bleed} - \jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperwidth + \paperwidth)/2 + \jlreq@trimmarks@bleed} - \jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperheight + \paperheight)/2 + \jlreq@trimmarks@bleed}% + \jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperwidth - \paperwidth)/2 - \jlreq@trimmarks@bleed@left} + \jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperheight - \paperheight)/2 - \jlreq@trimmarks@bleed@bottom} + \jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperwidth + \paperwidth)/2 + \jlreq@trimmarks@bleed@right} + \jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperheight + \paperheight)/2 + \jlreq@trimmarks@bleed@top}% ] } - \edef\jlreq@trimmarks@pdfattribute{% + \c@page=1 + \edef\jlreq@trimmarks@bleedboxsize@odd{\@tempa} + \c@page=2 + \edef\jlreq@trimmarks@bleedboxsize@even{\@tempa}% + \c@page=\jlreq@tempcnta + \edef\jlreq@trimmarks@pdfattribute@odd{% + /TrimBox \jlreq@trimmarks@trimboxsize + \ifjlreq@trimmarks@show@artbox /ArtBox \jlreq@trimmarks@trimboxsize\fi + /BleedBox \jlreq@trimmarks@bleedboxsize@odd + } + \edef\jlreq@trimmarks@pdfattribute@even{% /TrimBox \jlreq@trimmarks@trimboxsize \ifjlreq@trimmarks@show@artbox /ArtBox \jlreq@trimmarks@trimboxsize\fi - /BleedBox \jlreq@trimmarks@bleedboxsize + /BleedBox \jlreq@trimmarks@bleedboxsize@even } \jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@pttobp} \jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@trimboxsize} - \jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@bleedboxsize} - \jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@pdfattribute} + \jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@bleedboxsize@odd} + \jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@bleedboxsize@even} + \jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@pdfattribute@odd} + \jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@pdfattribute@even} - \ifx l\jlreq@trimmarks@driver - \edef\@tempa{\noexpand\pdfvariable pageattr{\jlreq@trimmarks@pdfattribute}} - \@tempa - \fi - \ifx f\jlreq@trimmarks@driver - \edef\@outputtombow{\noexpand\special{pdf: put @thispage <<\jlreq@trimmarks@pdfattribute>>}\expandonce{\@outputtombow}} - \fi - \ifx s\jlreq@trimmarks@driver - \edef\@tempa{\noexpand\special{ps:SDict begin - [ /TrimBox \jlreq@trimmarks@trimboxsize /PAGE pdfmark - \ifjlreq@trimmarks@show@artbox [ /ArtBox \jlreq@trimmarks@trimboxsize /PAGE pdfmark \fi - [ /BleedBox \jlreq@trimmarks@bleedboxsize /PAGE pdfmark - end}}% - \@tempa - \fi + \begingroup + \c@page=1 + \jlreq@tempdima=\jlreq@trimmarks@bleed@left + \c@page=2 + \ifdim\jlreq@trimmarks@bleed@left=\jlreq@tempdima + \global\let\jlreq@tempa\@firstoftwo + \else + \global\let\jlreq@tempa\@secondoftwo + \fi + \endgroup + \jlreq@tempa{ + % no difference between odd pages and even pages + \ifx l\jlreq@trimmarks@driver + \edef\@tempa{\noexpand\pdfvariable pageattr{\jlreq@trimmarks@pdfattribute@odd}} + \@tempa + \fi + \ifx f\jlreq@trimmarks@driver + \epreto\@outputtombow{\noexpand\special{pdf: put @thispage <<\jlreq@trimmarks@pdfattribute@odd>>}} + \fi + \ifx s\jlreq@trimmarks@driver + \edef\@tempa{\noexpand\special{ps:SDict begin + [ /TrimBox \jlreq@trimmarks@trimboxsize /PAGE pdfmark + \ifjlreq@trimmarks@show@artbox [ /ArtBox \jlreq@trimmarks@trimboxsize /PAGE pdfmark \fi + [ /BleedBox \jlreq@trimmarks@bleedboxsize@odd /PAGE pdfmark + end}}% + \@tempa + \fi + }{ + \ifx l\jlreq@trimmarks@driver + % in \@outputtombow, it's too late + \epreto\@outputpage{% + \unexpanded{\ifodd\c@page\pdfvariable} pageattr{\jlreq@trimmarks@pdfattribute@odd}% + \unexpanded{\else\pdfvariable} pageattr{\jlreq@trimmarks@pdfattribute@even}\noexpand\fi + } + \fi + \ifx f\jlreq@trimmarks@driver + \epreto\@outputtombow{% + \unexpanded{\ifodd\c@page\special}{pdf: put @thispage <<\jlreq@trimmarks@pdfattribute@odd>>}% + \unexpanded{\else\special}{pdf: put @thispage <<\jlreq@trimmarks@pdfattribute@even>>}\noexpand\fi + } + \fi + \ifx s\jlreq@trimmarks@driver + \epreto\@outputtombow{% + \unexpanded{\ifodd\c@page\special}{ps:SDict begin + [ /TrimBox \jlreq@trimmarks@trimboxsize /PAGE pdfmark + \ifjlreq@trimmarks@show@artbox [ /ArtBox \jlreq@trimmarks@trimboxsize /PAGE pdfmark \fi + [ /BleedBox \jlreq@trimmarks@bleedboxsize@odd /PAGE pdfmark + end}\unexpanded{\else\special}{ps:SDict begin + [ /TrimBox \jlreq@trimmarks@trimboxsize /PAGE pdfmark + \ifjlreq@trimmarks@show@artbox [ /ArtBox \jlreq@trimmarks@trimboxsize /PAGE pdfmark \fi + [ /BleedBox \jlreq@trimmarks@bleedboxsize@even /PAGE pdfmark + end}\noexpand\fi + } + \fi + } \fi % always true diff --git a/Master/texmf-dist/tex/latex/jlreq/jlreq.cls b/Master/texmf-dist/tex/latex/jlreq/jlreq.cls index e4084da4c1b..44f29847a8d 100644 --- a/Master/texmf-dist/tex/latex/jlreq/jlreq.cls +++ b/Master/texmf-dist/tex/latex/jlreq/jlreq.cls @@ -5,7 +5,7 @@ %% % (based on JLReq 20120403 https://www.w3.org/TR/2012/NOTE-jlreq-20120403/ja/) \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{jlreq}[2019/01/15 jlreq] +\ProvidesClass{jlreq}[2019/04/01 jlreq] \RequirePackage{xkeyval,everyhook,filehook,etoolbox,ifthen} \RequirePackage{jlreq-helpers} @@ -188,7 +188,7 @@ %.. 小口 \newcommand*{\jlreq@option@fore@edge}{} \jlreq@aftercls@addtodeletecs{\jlreq@option@fore@edge} -\DeclareOptionX{fore_edge}{\renewcommand*{\jlreq@option@fore@edge}{#1}} +\DeclareOptionX{fore_edge}{\renewcommand*{\jlreq@option@fore@edge}{#1}}% 昔にこっちにしていたので残している \DeclareOptionX{fore-edge}{\renewcommand*{\jlreq@option@fore@edge}{#1}} %.. 柱とノンブル @@ -226,12 +226,19 @@ \jlreq@aftercls@addtodeletecs{\jlreq@option@sidenote@length} \DeclareOptionX{sidenote_length}{\renewcommand*{\jlreq@option@sidenote@length}{#1}} +%.. 逆ノンブル +\newif\ifjlreq@option@use@reverse@pagination +\jlreq@aftercls@addtodeleteif{\ifjlreq@option@use@reverse@pagination} +\jlreq@option@use@reverse@paginationfalse +\jlreq@DeclareOption{use_reverse_pagination}{\jlreq@option@use@reverse@paginationtrue} + %.. もろもろ \newif\if@restonecol\@restonecolfalse \newif\if@titlepage\@titlepagefalse -\newif\ifjlreq@option@titlepage \jlreq@option@titlepagefalse % titlepageかnotitlepageかが指定された \newif\if@landscape\@landscapefalse \newif\if@tate \@tatefalse +\newif\ifjlreq@option@titlepage \jlreq@option@titlepagefalse % titlepageかnotitlepageかが指定された +\jlreq@aftercls@addtodeleteif{\ifjlreq@option@titlepage} \jlreq@DeclareOption{landscape}{\@landscapetrue} \jlreq@DeclareOption{tombo}{\ClassWarningNoLine{jlreq}{The option `tombo' is not supported by jlreq class. Please use the jlreq-trimmarks package}} \jlreq@DeclareOption{tombow}{\ClassWarningNoLine{jlreq}{The option `tombow' is not supported by jlreq class. Please use the jlreq-trimmarks package}} @@ -418,7 +425,7 @@ % https://ja.osdn.net/projects/luatex-ja/ticket/36489 \newcommand*{\jlreq@calc@current@linewidth@onecolumn}{% \dimexpr - \zposx{jlreq@rest@width.pos.\the\jlreq@zref@reference@count} sp - \@totalleftmargin - + \jlreq@reference@ref{jlreq@rest@width.pos.X.\the\jlreq@reference@count}{0} sp - \@totalleftmargin - \ifodd\jlreq@currentpage \oddsidemargin \else @@ -439,7 +446,7 @@ \newcommand*{\jlreq@calc@current@linewidth@onecolumn}{% \dimexpr \jlreq@ifydir{% - \zposx{jlreq@rest@width.pos.\the\jlreq@zref@reference@count} sp - \hoffset + \jlreq@reference@ref{jlreq@rest@width.pos.X.\the\jlreq@reference@count}{0} sp - \hoffset \ifodd\jlreq@currentpage - \oddsidemargin \else @@ -452,7 +459,7 @@ \pdfpageheight \fi - \topmargin - \headheight - \headsep - \voffset - - \zposy{jlreq@rest@width.pos.\the\jlreq@zref@reference@count} sp + - \jlreq@reference@ref{jlreq@rest@width.pos.Y.\the\jlreq@reference@count}{0} sp }% \jlreq@tombow@adjust - \@totalleftmargin - 1in @@ -473,13 +480,29 @@ \newdimen\jlreq@rest@linewidth % この命令以降,次にこの命令を実行する前まで\jlreq@current@linewidth/\jlreq@rest@linewidthで % この行の行頭からの長さ/残りの長さが取得できる -\newcommand*{\jlreq@savepos@for@rest@linewidth}{% +\jlreq@ifprimitive{\pdfsavepos}{\jlreq@tempatrue}{\jlreq@tempafalse} +\edef\jlreq@savepos@for@rest@linewidth{\unexpanded{% \jlreq@setcurrentpage - \global\advance\jlreq@zref@reference@count by 1\relax - \zsavepos{jlreq@rest@width.pos.\the\jlreq@zref@reference@count}% + \global\advance\jlreq@reference@count by 1 + }% + \ifjlreq@tempa + \unexpanded{% + \pdfsavepos + \jlreq@reference@label{jlreq@rest@width.pos.X.\the\jlreq@reference@count}{\noexpand\the\noexpand\pdflastxpos}% + \jlreq@reference@label{jlreq@rest@width.pos.Y.\the\jlreq@reference@count}{\noexpand\the\noexpand\pdflastypos}% + }% + \else + \unexpanded{% + \savepos + \jlreq@reference@label{jlreq@rest@width.pos.X.\the\jlreq@reference@count}{\noexpand\the\noexpand\lastxpos}% + \jlreq@reference@label{jlreq@rest@width.pos.Y.\the\jlreq@reference@count}{\noexpand\the\noexpand\lastypos}% + }% + \fi + \unexpanded{% \global\jlreq@current@linewidth=\jlreq@calc@current@linewidth \global\jlreq@rest@linewidth=\dimexpr\linewidth - \jlreq@current@linewidth\relax - \edef\jlreq@savepos@iflabelundefined{\noexpand\zref@ifrefundefined{jlreq@rest@width.pos.\the\jlreq@zref@reference@count}}% + \edef\jlreq@savepos@iflabelundefined{\jlreq@reference@ifexist{jlreq@rest@width.pos.X.\the\jlreq@reference@count}{\noexpand\@secondoftwo}{\noexpand\@firstoftwo}}% + }% } \ifx l\jlreq@engine @@ -848,6 +871,8 @@ \def\@ptsize{0} % JFMに関連する設定 \ifx l\jlreq@engine + \def\ltj@stdyokojfm{jlreq} + \def\ltj@stdtatejfm{jlreqv} % この値は後でjfm-jlreq内で読む \directlua{jlreq.open_bracket_pos = [[\jlreq@open@bracket@pos]]} \ifjlreq@burasage\directlua{jlreq.burasage = true}\else\directlua{jlreq.burasage = false}\fi @@ -1241,7 +1266,7 @@ \else\def\jlreq@option@headfoot@verticalpos{2zw}\fi \fi \setlength{\headsep}{\jlreq@speciallength{\jlreq@option@headfoot@verticalpos}} -\ifdim\headsep<1\zw\relax\jlreq@note{基本版面との上下方向の最低の空き量を,基本版面の文字サイズの全角アキとする (26.1.a).}\fi +\if@tate\ifdim\headsep<1\zw\relax\jlreq@note{基本版面との上下方向の最低の空き量を,基本版面の文字サイズの全角アキとする (26.1.a).}\fi\fi \if@tate \if@twocolumn \addtolength{\headsep}{\dimexpr\marginparwidth + \marginparsep\relax} @@ -1468,6 +1493,14 @@ % \maxdepth + \topskip = フォントサイズ×1.5(だってさ) \setlength{\maxdepth}{\dimexpr1.5\zw - \topskip\relax} +%. システム設定 +%.. 逆ノンブル +\ifjlreq@option@use@reverse@pagination + \AtEndDocument{\clearpage\jlreq@reference@immediate@write{lastpage}{\noexpand\arabic{page}}}% + \def\c@jlreqreversepage{\numexpr\jlreq@reference@ref{lastpage}{0} - \c@page + 1\relax} + \def\thejlreqreversepage{\arabic{jlreqreversepage}} +\fi + %. 見出し関係 (4.1) % \clear***page \newcommand*{\cleartooddpage}[1][]{% @@ -1550,6 +1583,7 @@ }% }{}% } + %.. 中/半扉見出し % addcontentslineに渡すやつ:番号出すのと出さないの \newcommand{\DeclareTobiraHeading}[3]{% @@ -1596,23 +1630,23 @@ \unexpanded{\refstepcounter{#1}}% \noexpand\fi \fi - \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}{\ifjlreq@number\else -\fi}{\expandonce{\jlreq@label@format}}{####1}% \unexpanded{\jlreq@ifempty{##2}% {\long\gdef\jlreqHeadingText####1{}}% {\long\gdef\jlreqHeadingText####1{####1}}% }% \ifjlreq@number - \unexpanded{\ifnum#2>\c@secnumdepth\relax}% + \unexpanded{\ifnum#2>\c@secnumdepth\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}{% \unexpanded{\long\gdef\jlreqHeadingLabel####1{}}% \expandonce{\jlreq@format{}{##1}}% - \noexpand\else + }{% \unexpanded{\long\gdef\jlreqHeadingLabel####1{####1}}% \expandafter\expandonce\expandafter{\jlreq@formatwlabel{##2}}% - \noexpand\fi + }% \else \unexpanded{\long\gdef\jlreqHeadingLabel####1{}}% \expandonce{\jlreq@format{}{##1}}% \fi + \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}{\ifjlreq@number\else -\fi}{\expandonce{\jlreq@label@format}}{####1}% \noexpand\@afterheading \expandonce{\jlreq@heading@clearpage}% \unexpanded{\if@restonecol\twocolumn\fi}% @@ -1682,7 +1716,6 @@ % {1 = 命令}{2 = レベル}{3 = スペース関連}{4 = *}{5 = running head}{6 = 見出し}[7 = 副題] \long\def\jlreq@BlockHeading@start@@@#1#2#3#4#5#6[#7]{% - \edef\jlreq@do{\unexpanded{\jlreq@BlockHeading@start@@@@{#1}{#2}{#3}}{\expandonce{\jlreq@BlockHeading@start@totalformat}}}% \jlreq@do{#4}{#5}{#6}{#7}% } @@ -1702,13 +1735,20 @@ \expandafter\xdef\csname jlreq@BlockHeading@spaces@current@space@\the\jlreq@BlockHeading@spaces@current@count\endcsname{% \expandonce{\jlreq@tempb}% }% - \expandafter\xdef\csname jlreq@BlockHeading@spaces@current@format@\the\jlreq@BlockHeading@spaces@current@count\endcsname{% - \unexpanded{#4}% - }% + \def\@tempa##1##2##3{##1}% \expandafter\xdef\csname jlreq@BlockHeading@spaces@current@before@\the\jlreq@BlockHeading@spaces@current@count\endcsname{% + \expandonce{\@tempa#4}% \expandonce{\jlreq@resulta}% }% - \expandafter\xdef\csname jlreq@BlockHeading@spaces@current@after@\the\jlreq@BlockHeading@spaces@current@count\endcsname{}% + \def\@tempa##1##2##3{##2}% + \expandafter\xdef\csname jlreq@BlockHeading@spaces@current@format@\the\jlreq@BlockHeading@spaces@current@count\endcsname{% + \expandonce{\@tempa#4}% + }% + \def\@tempa##1##2##3{##3}% + \expandafter\xdef\csname jlreq@BlockHeading@spaces@current@after@\the\jlreq@BlockHeading@spaces@current@count\endcsname{% + \expandonce{\jlreq@resultc}% + \expandonce{\@tempa#4}% + }% \ifx\jlreq@BlockHeading@spaces@headingslist\@empty \expandafter\jlreq@BlockHeading@spaces@outputwospace \expandafter\ignorespaces @@ -1773,7 +1813,7 @@ % 特別扱いしたいマクロを並べる \def\jlreq@BlockHeading@HeadingSpaces@ignoretokens{\label} -% \jlreq@resultaにaux吐き出しとかを入れて,\jlreq@resultbに出力を入れる(縦方向調整なし) +% \jlreq@resulta -> before, \jlreq@resultb -> 本体,\jlreq@resultc -> after % {1 = 命令}{2 = レベル}{3 = スペース関連(横方向のみ)}{4 = フォーマット群}{5 = まとめたフォーマット群}{6 = *}{7 = running head}{8 = 見出し}{9 = 副題} \long\def\jlreq@BlockHeading@start@makeoutput#1#2#3#4#5#6#7#8#9{% \begingroup @@ -1805,11 +1845,13 @@ \jlreq@ifempty{#9}% {\unexpanded{\long\gdef\jlreqHeadingSubtitle####1{}}}% {\unexpanded{\long\gdef\jlreqHeadingSubtitle####1{####1}}}% - \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}{\unexpanded{#6}}{\expandonce{\jlreq@tempa}}{\unexpanded{#7}}% }% \unexpanded{\def\jlreq@resultb}{% \expandonce{\jlreq@result}% }% + \unexpanded{\def\jlreq@resultc}{% + \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}{\unexpanded{#6}}{\expandonce{\jlreq@tempa}}{\unexpanded{#7}}% + }% }% \expandafter\endgroup \jlreq@do @@ -2241,7 +2283,8 @@ \eappto\jlreq@do{\expandonce{\jlreq@result}}% \jlreq@BlockHeading@gyodori@parsekeyval*[BlockHeading:#1]{#3}{}{}{1}% \let\jlreq@spaceset=\jlreq@result - \edef\jlreq@totalformat{\unexpanded{##1}\expandonce{\jlreq@afterindent}\noexpand\@afterheading}% + \edef\jlreq@totalformat{\unexpanded{##1}}% + \edef\jlreq@totalformat@after{\expandonce{\jlreq@afterindent}\noexpand\@afterheading}% \if@twocolumn \ifthenelse{\equal{\jlreq@column@spanning}{true}}{% \def\@tempa##1##2##3{% @@ -2261,7 +2304,9 @@ }% }% \expandafter\@tempa\jlreq@spaceset - }{}% + \def\jlreq@totalformat@after{}% + }{% + }% \fi \edef\jlreq@do{% \expandonce{\jlreq@do}% @@ -2283,7 +2328,7 @@ {}{}% }% }% - {\expandonce{\jlreq@totalformat}}% + {{}{\expandonce{\jlreq@totalformat}}{\expandonce{\jlreq@totalformat@after}}}% }}% \noexpand\def\expandonce{\csname #1\endcsname}{\expandonce{\csname jlreq@headingcs@#1\endcsname}}% }% @@ -2617,7 +2662,6 @@ \def\jlreq@font{\normalfont\normalsize}% \def\jlreq@indent{0\zw}% \def\jlreq@after@label@space{1\zw}% - \def\jlreq@mark{}% \def\jlreq@label@font{}% \def\jlreq@label@format{\@seccntformat{#1}}% \def\jlreq@after@space{1\zw}% @@ -2625,11 +2669,10 @@ \jlreq@parsekeyval[RuninHeading:#1]{% {font}{\def\jlreq@font{##1}} {indent}{\def\jlreq@indent{##1}} - {mark}{\def\jlreq@mark{##1}} {label_format}{\def\jlreq@label@format{##1}} - {after_label_space}{ + {after_label_space}{% \ifdim\dimexpr##1\relax<0pt \ClassWarning{jlreq}{after_label_space in Runin Heading #1 should be not negative}\fi - \def\jlreq@after@label@space{##1} + \def\jlreq@after@label@space{##1}% } {after_space}{% \ifdim\dimexpr##1\relax<0pt \ClassWarning{jlreq}{after_space in Runin Heading #1 should be not negative}\fi @@ -2790,7 +2833,7 @@ } \newcommand{\ModifyHeading}[2]{% - \@ifundefined{jlreq@heading@setting@#1}{\ClassError{jlreq}{Unknown heading: #1}{\@ehc}}% + \@ifundefined{jlreq@heading@setting@#1}{\ClassError{jlreq}{Unknown heading: #1}{\@ehc}}{}% \edef\jlreq@do{\csexpandonce{jlreq@heading@type@#1}{#1}{\csexpandonce{jlreq@heading@level@#1}}{\csexpandonce{jlreq@heading@setting@#1},\unexpanded{#2}}}% \jlreq@do } @@ -2851,7 +2894,7 @@ }% } -%.. 各種定義 +%.. カウンターの定義(見出し本体はこのファイルの末尾で) \setcounter{secnumdepth}{3} \newcounter{part} \jlreq@switch{\jlreq@article@type}{ @@ -2864,73 +2907,6 @@ \newcounter{subparagraph}[paragraph] \renewcommand*{\@seccntformat}[1]{\csname the#1\endcsname} -\if@tate - \renewcommand{\thepart}{\jlreq@Kanji{part}} - \ifthenelse{\equal{\jlreq@article@type}{article}}{}{\renewcommand{\thechapter}{\jlreq@Kanji{chapter}}} - \renewcommand{\thesection}{\jlreq@rensuji{\@arabic\c@section}} - \renewcommand{\thesubsection}{\jlreq@rensuji{\@alph\c@subsection}} - \renewcommand{\thesubsubsection}{\jlreq@rensuji{\@arabic\c@subsubsection}} - \renewcommand{\theparagraph}{(\jlreq@rensuji{\@arabic\c@paragraph})} - \renewcommand{\thesubparagraph}{(\jlreq@rensuji{\@arabic\c@subparagraph})} - - \ifthenelse{\equal{\jlreq@article@type}{article}}{ - \NewBlockHeading{part}{0}{font={\jlreq@keepbaselineskip{\LARGE}},indent=4\zw,lines=4,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\large}}} - \if@twoside\ModifyHeading{part}{allowbreak_if_evenpage=true}\fi - } - {% book, report - \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\zw}},format={\null\vfill {\Huge\hspace*{2\zw}#1#2}\vspace*{2\jlreq@gol}}} - \NewBlockHeading{chapter}{0}{indent=2\zw,lines=6,label_format={第\thechapter 章},font={\huge},after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\Large}}} - \if@twoside\ModifyHeading{chapter}{allowbreak_if_evenpage=true}\fi - \renewcommand{\thechapter}{\jlreq@Kanji{chapter}} - } - \NewBlockHeading{section}{1}{font={\jlreq@keepbaselineskip{\Large}},indent=6\zw,lines=3,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\normalsize}}} - \if@twoside\ModifyHeading{section}{allowbreak_if_evenpage=true}\fi - \NewBlockHeading{subsection}{2}{font={\jlreq@keepbaselineskip{\large}},indent=8\zw,lines=2,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\small}}} - \if@twoside\ModifyHeading{subsection}{allowbreak_if_evenpage=true}\fi - \NewBlockHeading{subsubsection}{3}{font={\jlreq@keepbaselineskip{\normalsize}},indent=10\zw,lines=1,before_lines=1,subtitle_break=false,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},,subtitle_font={\jlreq@keepbaselineskip{\scriptsize}}} - \if@twoside\ModifyHeading{subsubsection}{allowbreak_if_evenpage=true}\fi - \NewRuninHeading{paragraph}{4}{font={\jlreq@keepbaselineskip{\normalsize}}} - \NewRuninHeading{subparagraph}{5}{font={\jlreq@keepbaselineskip{\normalsize}},indent=1\zw} -\else% yoko - \renewcommand{\thepart}{\Roman{part}} - \renewcommand{\thesubsection}{\thesection .\arabic{subsection}} - \renewcommand{\thesubsubsection}{\thesubsection .\arabic{subsubsection}} - \renewcommand{\theparagraph}{\thesubsubsection .\arabic{paragraph}} - \renewcommand{\thesubparagraph}{\theparagraph .\arabic{subparagraph}} - \ifthenelse{\equal{\jlreq@article@type}{article}}{ - \NewBlockHeading{part}{0}{font={\jlreq@keepbaselineskip{\LARGE\sffamily\bfseries}},label_format={第\thepart 部},lines=4,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\large}}} - \renewcommand{\thesection}{\arabic{section}} - } - {% book, report - \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\jlreq@gol}},format={\null\vfil {\Huge\sffamily\bfseries #1#2}\vfil}} - \NewBlockHeading{chapter}{0}{% - font={\jlreq@keepbaselineskip{\huge\sffamily\bfseries}}, - label_format={第\thechapter 章}, - lines=5,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw}, - subtitle_font={\jlreq@keepbaselineskip{\Large}}} - \renewcommand{\thechapter}{\arabic{chapter}} - \renewcommand{\thesection}{\thechapter.\arabic{section}} - } - \NewBlockHeading{section}{1}{font={\jlreq@keepbaselineskip{\Large\sffamily\bfseries}},lines=3,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\normalsize}}} - \NewBlockHeading{subsection}{2}{font={\jlreq@keepbaselineskip{\large\sffamily\bfseries}},lines=2,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\small}}} - \NewBlockHeading{subsubsection}{3}{font={\jlreq@keepbaselineskip{\normalsize\sffamily\bfseries}},lines=1,before_lines=1,subtitle_break=false,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\scriptsize}}} - \NewRuninHeading{paragraph}{4}{font={\jlreq@keepbaselineskip{\normalsize\sffamily\bfseries}},indent=1\zw} - \NewRuninHeading{subparagraph}{5}{font={\jlreq@keepbaselineskip{\normalsize\sffamily\bfseries}},indent=2\zw} -\fi - -\ifthenelse{\equal{\jlreq@article@type}{article}}{}{% book, report - \if@openright - \ModifyHeading{part}{type=naka} - \if@tate - \ModifyHeading{chapter}{pagebreak=begin_with_even_page} - \else - \ModifyHeading{chapter}{pagebreak=begin_with_odd_page} - \fi - \else - \ModifyHeading{part}{type=han} - \ModifyHeading{chapter}{pagebreak=clearpage} - \fi -} %. 注 % 文字サイズは6ポイントくらい(4.2.3.a)とりあえす\scriptsize @@ -2981,7 +2957,6 @@ \def\jlreq@hook@postnote{\jlreq@fixjfm} } } -\jlreqsetup{reference_mark=inline} % \@footnotemarkをシンプルなものにする \def\jlreq@setdefaultnotemark#1#2{% \def#1{% @@ -3016,7 +2991,7 @@ % インデントの計算:脚注の長さが文字の整数倍になるように字下げする(4.2.5.b) \jlreq@jlreqsetup@add{footnote_indent}{% \if@tate\else - \ifdim\dimexpr#1\relax=0pt\else\jlreq@note{脚注は,一般にその前に区切りのための罫線を挿入するので,字下げは行わなくてよい(4.2.5.b).}\fi + \ifdim\dimexpr#1\relax=0pt \else\jlreq@note{脚注は,一般にその前に区切りのための罫線を挿入するので,字下げは行わなくてよい(4.2.5.b).}\fi \fi \begingroup \footnotesize @@ -3028,11 +3003,6 @@ \expandafter\endgroup \jlreq@do } -\if@tate - \jlreqsetup{footnote_indent=1\zw}% 根拠なし -\else - \jlreqsetup{footnote_indent=0pt}% (4.2.5.b) -\fi \newcommand{\@makefntext}[1]{\jlreq@makefntext{#1}} \jlreq@jlreqsetup@add{footnote_second_indent}{% @@ -3058,7 +3028,6 @@ }##1% } } -\jlreqsetup{footnote_second_indent=1\zw} \jlreq@jlreqsetup@add{footnotetext_indent}{ \ClassWarningNoLine{jlreq}{footnotetext_indent was removed} @@ -3079,23 +3048,32 @@ \jlreq@hook@prenote \@ifnextchar[{\jlreq@footnotemark@impl@woption}{\jlreq@footnotemark@impl@wooption}% } -\if@tate +\ifthenelse{\boolean{@tate} \AND \(\boolean{@twoside} \OR \boolean{@twocolumn}\)}{ % 縦組の傍注は,その見開き内に付いている合印に対応する注を,奇数ページの左端にそろえて配置する.多段組では最下段の左端にそろえて配置する.(4.2.6.a) % 必要ならば\footnoteを\footnotemarkと\footnotetextにわけ,\footnotetextをアウトプット時まで遅延することで実現する. \def\jlreq@footnote@delayfootnoteslist{} - \preto\@opcol{% + \def\jlreq@hook@@opcol{% \expandafter\gdef\expandafter\jlreq@footnote@delayfootnoteslist\expandafter{\expandafter}% \jlreq@footnote@delayfootnoteslist } + \preto\@opcol{\jlreq@hook@@opcol} % \jlreq@footnote@delayfootnote@delay#1#2#3:#1ページ目に\footnotetext[#2]{#3}を出す % \jlreq@footnote@delayfootnote@page:何ページ目に\footnotetextを入れるかを\jlreq@resultcntに入れる.その場での場合は-1. \if@twocolumn - \def\jlreq@footnote@delayfootnote@page{% - \jlreq@setcurrentpage - \jlreq@resultcnt=\numexpr\jlreq@currentpage\ifodd\jlreq@currentpage\else + 1\fi\relax - % このページに表示&上の段処理済みだと\output内では間に合わない - \ifnum\jlreq@resultcnt=\value{page}\if@firstcolumn\else\jlreq@resultcnt=-1 \fi\fi - } + \if@twoside + \def\jlreq@footnote@delayfootnote@page{% + \jlreq@setcurrentpage + \jlreq@resultcnt=\numexpr\jlreq@currentpage\ifodd\jlreq@currentpage\else + 1\fi\relax + % このページに表示&上の段処理済みだと\output内では間に合わない + \ifnum\jlreq@resultcnt=\value{page}\if@firstcolumn\else\jlreq@resultcnt=-1 \fi\fi + } + \else + \def\jlreq@footnote@delayfootnote@page{% + \jlreq@setcurrentpage + \jlreq@resultcnt=\numexpr\jlreq@currentpage\relax + \ifnum\jlreq@resultcnt=\value{page}\if@firstcolumn\else\jlreq@resultcnt=-1 \fi\fi + } + \fi \long\def\jlreq@footnote@delayfootnote@delay#1#2#3{% % 二段組みの場合は上段を組んだ直後に\footnotetextを挿入(そのページの下段に入る) \ifnum 0\if@firstcolumn\else 1\fi\ifnum#1>\value{page}1\fi>0 @@ -3161,7 +3139,7 @@ \fi \jlreq@hook@postnote } -\else +}{ \long\def\jlreq@footnote@impl@woption[#1]#2{% \jlreq@useoriginalcs{\footnote}[#1]{#2}% \jlreq@hook@postnote @@ -3170,7 +3148,7 @@ \jlreq@useoriginalcs{\footnote}{#1}% \jlreq@hook@postnote } -\fi +} \long\def\jlreq@footnotemark@impl@woption[#1]{% \jlreq@useoriginalcs{\footnotemark}[#1]% \jlreq@hook@postnote @@ -3286,7 +3264,6 @@ \( \lengthtest{1.99\zw < #1} \AND \lengthtest{#1 < 2.01\zw} \) }{}{\jlreq@note{後注が2行以上となった場合,後注の2行目以下の字下げは,1行目より,後注の文字サイズの2倍又は全角とする (4.2.4.d).}} } -\jlreqsetup{endnote_second_indent=2\zw} \newcommand{\@makeendtext}[1]{% \csname\jlreq@endnotemarkname\endcsname \hskip\glueexpr1\zw\relax% 見出し出力と一文字分の空き(4.2.4.c) @@ -3343,7 +3320,6 @@ } \fi } -\jlreqsetup{endnote_position=headings} \AtEndDocument{\theendnotes} @@ -3368,7 +3344,7 @@ \jlreq@setdefaultnotemark\@sidenotemark\@makesidemark \def\jlreq@sidenotecounter{footnote}% 傍注用のカウンタ名 \jlreq@jlreqsetup@add{sidenote_type}[number,symbol]{\def\jlreq@sidenote@type{#1}} - \jlreqsetup{sidenote_type=number} + \def\jlreq@sidenote@type{number} \jlreq@jlreqsetup@addtofinally{ \ifthenelse{\equal{\jlreq@sidenote@type}{number}}{ \def\sidenote{\jlreq@hook@prenote\@ifnextchar[{\jlreq@sidenote}{\jlreq@sidenote[]}} @@ -3434,7 +3410,6 @@ } \jlreq@jlreqsetup@add{sidenote_symbol}{\def\jlreq@sidenote@defaultmark{#1}} \jlreq@jlreqsetup@add{sidenote_keyword_font}{\def\jlreq@sidenote@keywordfont{#1}} - \jlreqsetup{sidenote_symbol=*,sidenote_keyword_font={}} } %.. 割注(3.4) @@ -3462,8 +3437,8 @@ \ifvmode\leavevmode\fi \@ifstar\jlreq@inlinenote@noauto\jlreq@inlinenote@auto } -\newcommand*{\inlinenote}{\jlreq@inlinenote@{\inlinenote}} -\newcommand*{\warichu}{\jlreq@inlinenote@{\warichu}} +\DeclareRobustCommand*{\inlinenote}{\jlreq@inlinenote@{\inlinenote}} +\DeclareRobustCommand*{\warichu}{\jlreq@inlinenote@{\warichu}} \newcommand*{\jlreq@inlinenote@auto}[1]{% % 割注初め括弧の前の場所を保存 @@ -4591,43 +4566,6 @@ \jlreq@do } -%.. 各種定義 -\RenewPageStyle{empty}{nombre={},odd_running_head={},even_running_head={}} -\ifthenelse{\equal{\jlreq@article@type}{article}}{ - \if@twoside - \NewPageStyle{headings}{odd_running_head={_subsection},even_running_head={_section}} - \else - \NewPageStyle{headings}{odd_running_head={_section},even_running_head={}} - \fi -}{% book, article - \if@twoside - \NewPageStyle{headings}{odd_running_head={_section},even_running_head={_chapter}} - \else - \NewPageStyle{headings}{odd_running_head={_chapter},even_running_head={}} - \fi - \ModifyPageStyle{headings}{mark_format={_chapter={第\thechapter 章\quad #1}}} -} -\if@tate - \RenewPageStyle{plain}{nombre=\thepage,odd_running_head={},even_running_head={},clear_markcommand=false} - \NewPageStyle{myheadings}{nombre=\thepage,odd_running_head=\rightmark,even_running_head=\leftmark,clear_markcommand=false} - \if@twoside - \ModifyPageStyle{plain}{nombre_position={top-left}} - \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-left,running_head_position=top-left} - \ModifyPageStyle{myheadings}{nombre_position=bottom-left,running_head_position=top-left} - \else - \ModifyPageStyle{plain}{nombre_position={top-center}} - \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center} - \ModifyPageStyle{myheadings}{nombre_position=bottom-center,running_head_position=top-center} - \fi -\else% yoko - \RenewPageStyle{plain}{nombre=\thepage,odd_running_head={},even_running_head={},nombre_position={bottom-center},clear_markcommand=false} - \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center} - \NewPageStyle{myheadings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center,odd_running_head=\rightmark,even_running_head=\leftmark,clear_markcommand=false} -\fi -\ModifyPageStyle{plain}{font=\small} -\ModifyPageStyle{headings}{font=\small} -\ModifyPageStyle{myheadings}{font=\small} - %. フロート関連 % 4.3.3.dの例,縦組みの時だけど横にも適用…… \setlength{\floatsep}{1\jlreq@gol plus 1\jlreq@gol} @@ -4637,15 +4575,47 @@ \dbltextfloatsep=\textfloatsep % 残りはデフォルトにしておく. -% 4.3.1 注4 -\newlength\abovecaptionskip -\newlength\belowcaptionskip +%. 環境も引数にとる可能性のある\jlreqsetup用マクロ. +% #3={<設定1>,<環境名>=<設定2>}のようなものを受け付ける. +% #2に<設定1>が,#2@<環境名>に<設定2>が入る.#1には#2@<環境名>が定義されている<環境名>をカンマ区切りで入れる. +% \jlreqsetup{X,env=B}の後に\jlreqsetup{Y}を指定すると,env環境に対する設定はYになるようにする. +% ただし\jlreqsetup{env=C,Y}とした場合はenv環境に対してはC. +\long\def\jlreq@jlreqsetup@withenv#1#2#3{% + \@ifundefined{#1}{\expandafter\def\csname #1\endcsname{}}{}% + \begingroup + \def\jlreq@do{}% + \jlreq@parsekeyval@nokey{% + \ifjlreq@parsekeyval@nokey@novalue{% + \epreto\jlreq@do{% + \noexpand\edef\expandonce{\csname #2\endcsname}{\unexpanded{\unexpanded{##1}}} + \noexpand\def\expandonce{\csname #1\endcsname}{}% + }% + \expandafter\@for\expandafter\jlreq@tempa\expandafter:\expandafter=\csname #1\endcsname\do{% + \epreto\jlreq@do{\noexpand\let\expandonce{\csname #2@\jlreq@tempa\endcsname}\noexpand\@undefined}% + }% + }{% + \eappto\jlreq@do{% + \noexpand\edef\expandonce{\csname #2@##1\endcsname}{\unexpanded{\unexpanded{##2}}}% + \unexpanded{\def\jlreq@tempa{\jlreq@helper@removeelement{##1}}}% + \unexpanded{\expandafter\jlreq@tempa\expandafter}{\expandonce{\csname #1\endcsname}}{\expandonce{\csname #1\endcsname}}% + \unexpanded{\csappto{#1}{,##1}}% + }% + }% + }{#3}% + \expandafter\endgroup + \jlreq@do +} + % #1@#2が定義されていれば\#1@#2の中身に,そうでなければ\#1の中身に展開される. % 展開は\unexpandedで抑制される. -\def\jlreq@@makecaption@nameuse#1#2{% +\def\jlreq@jlreqsetup@withenv@nameuse#1#2{% \expandafter\ifx\csname #1@#2\endcsname\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi{\csexpandonce{#1}}{\csexpandonce{#1@#2}}% } +% 4.3.1 注4 +\newlength\abovecaptionskip +\newlength\belowcaptionskip +%. 図表 \newcommand{\@makecaption}[2]{{% % \jlreq@tempbに現在の環境を入れる. \@ifundefined{@currenvir}{% @@ -4655,20 +4625,20 @@ }{\let\jlreq@tempb=\@currenvir}% \reset@font\small \vskip\abovecaptionskip - \edef\jlreq@do{\unexpanded{\def\jlreq@tempa##1}{\jlreq@@makecaption@nameuse{jlreq@@makecaption@label@format}{\jlreq@tempb}}}% + \edef\jlreq@do{\unexpanded{\def\jlreq@tempa##1}{\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@label@format@setting}{\jlreq@tempb}}}% \jlreq@do - \setbox\jlreq@tempboxa=\hbox{\jlreq@@makecaption@nameuse{jlreq@@makecaption@label@font}{\jlreq@tempb}#1}% + \setbox\jlreq@tempboxa=\hbox{\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@label@font@setting}{\jlreq@tempb}#1}% \ifdim\wd\jlreq@tempboxa=0pt - \edef\jlreq@tempa{{\jlreq@@makecaption@nameuse{jlreq@@makecaption@font}{\jlreq@tempb}\unexpanded{#2}}}% + \edef\jlreq@tempa{{\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@font@setting}{\jlreq@tempb}\unexpanded{#2}}}% \else \edef\jlreq@tempa{% - {\jlreq@@makecaption@nameuse{jlreq@@makecaption@label@font}{\jlreq@tempb}\expandonce{\jlreq@tempa{#1}}}% - \unexpanded{\hskip\glueexpr}\jlreq@@makecaption@nameuse{jlreq@@makecaption@after@label@space}{\jlreq@tempb}\noexpand\relax - {\jlreq@@makecaption@nameuse{jlreq@@makecaption@font}{\jlreq@tempb}\unexpanded{#2}}% + {\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@label@font@setting}{\jlreq@tempb}\expandonce{\jlreq@tempa{#1}}}% + \unexpanded{\hskip\glueexpr}\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@after@label@space@setting}{\jlreq@tempb}\noexpand\relax + {\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@font@setting}{\jlreq@tempb}\unexpanded{#2}}% }% \fi \setbox\@tempboxa=\hbox{\jlreq@tempa}% - \edef\jlreq@tempc{\jlreq@@makecaption@nameuse{jlreq@@makecaption@align}{\jlreq@tempb}}% + \edef\jlreq@tempc{\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@align@setting}{\jlreq@tempb}}% \expandafter\let\expandafter\jlreq@align\jlreq@tempc \ifdim\wd\@tempboxa>\hsize\relax {% @@ -4686,44 +4656,55 @@ \fi \vskip\belowcaptionskip}} -% #2={figure=X}ならば\#1@figureにXを入れる.そうでなければ\#1に入れる. -\def\jlreq@caption@jlreqsetup#1#2{% - \jlreq@parsekeyval@nokey{% - \ifjlreq@parsekeyval@nokey@novalue{% - \expandafter\edef\csname #1\endcsname{\unexpanded{##1}}% - }{% - \expandafter\edef\csname #1@##1\endcsname{\unexpanded{##2}}% - }% - }{#2}% -} -\jlreq@jlreqsetup@add{caption_font}{\jlreq@caption@jlreqsetup{jlreq@@makecaption@font}{#1}} -\jlreq@jlreqsetup@add{caption_label_font}{\jlreq@caption@jlreqsetup{jlreq@@makecaption@label@font}{#1}} -\jlreq@jlreqsetup@add{caption_label_format}{\jlreq@caption@jlreqsetup{jlreq@@makecaption@label@format}{#1}} -\jlreq@jlreqsetup@add{caption_after_label_space}{\jlreq@caption@jlreqsetup{jlreq@@makecaption@after@label@space}{#1}} -\def\jlreq@caption@setalign#1#2{% - \jlreq@switch{#2}{ - {center}{\let#1=c} - {left}{\let#1=l} - {right}{\let#1=r} - {top}{\let#1=l} - {bottom}{\let#1=r} +\jlreq@jlreqsetup@add{caption_font}{\jlreq@jlreqsetup@withenv{jlreq@@makecaption@font@envlist}{jlreq@@makecaption@font@setting}{#1}} +\jlreq@jlreqsetup@add{caption_label_font}{\jlreq@jlreqsetup@withenv{jlreq@@makecaption@label@font@envlist}{jlreq@@makecaption@label@font@setting}{#1}} +\jlreq@jlreqsetup@add{caption_label_format}{\jlreq@jlreqsetup@withenv{jlreq@@makecaption@label@format@envlist}{jlreq@@makecaption@label@format@setting}{#1}} +\jlreq@jlreqsetup@add{caption_after_label_space}{\jlreq@jlreqsetup@withenv{jlreq@@makecaption@after@label@space@envlist}{jlreq@@makecaption@after@label@space@setting}{#1}} + +\def\jlreq@@makecaption@align@clearandsetalign#1{% + \@for\jlreq@tempa:=\jlreq@@makecaption@align@envlist\do{% + \ifx\jlreq@tempa\@empty\else + \eappto\jlreq@generalset{\noexpand\let\expandonce{\csname jlreq@@makecaption@align@setting@\jlreq@tempa\endcsname}=\noexpand\@undefined}% + \fi + }% + \appto\jlreq@generalset{% + \def\jlreq@@makecaption@align@envlist{}% + \let\jlreq@@makecaption@align@setting=#1% }% } \jlreq@jlreqsetup@add{caption_align}{% - \jlreq@parsekeyval@nokey{% - \jlreq@ifempty{##1}{}{% - \jlreq@switch{##1}{% - {center}{\let\jlreq@@makecaption@align=c} - {left}{\let\jlreq@@makecaption@align=l} - {right}{\let\jlreq@@makecaption@align=r} - {top}{\let\jlreq@@makecaption@align=l} - {bottom}{\let\jlreq@@makecaption@align=r} - {\expandafter\jlreq@caption@setalign\csname jlreq@@makecaption@align@##1\endcsname{##2}} + \@ifundefined{jlreq@@makecaption@align@envlist}{\def\jlreq@@makecaption@align@envlist{}}{}% + \begingroup + \def\jlreq@generalset{}\def\jlreq@envset{}% + \jlreq@parsekeyval@nokey{% + \jlreq@ifempty{##1}{}{% + \jlreq@switch{##1}{% + {center}{\jlreq@@makecaption@align@clearandsetalign{c}} + {left}{\jlreq@@makecaption@align@clearandsetalign{l}} + {right}{\jlreq@@makecaption@align@clearandsetalign{r}} + {top}{\jlreq@@makecaption@align@clearandsetalign{l}} + {bottom}{\jlreq@@makecaption@align@clearandsetalign{r}} + {% + \jlreq@switch{##2}{% + {center}{\eappto\jlreq@envset{\noexpand\let\expandonce{\csname jlreq@@makecaption@align@setting@##1\endcsname}=c}}% + {left}{\eappto\jlreq@envset{\noexpand\let\expandonce{\csname jlreq@@makecaption@align@setting@##1\endcsname}=l}}% + {right}{\eappto\jlreq@envset{\noexpand\let\expandonce{\csname jlreq@@makecaption@align@setting@##1\endcsname}=r}}% + {top}{\eappto\jlreq@envset{\noexpand\let\expandonce{\csname jlreq@@makecaption@align@setting@##1\endcsname}=l}}% + {bottom}{\eappto\jlreq@envset{\noexpand\let\expandonce{\csname jlreq@@makecaption@align@setting@##1\endcsname}=r}}% + }% + \appto\jlreq@envset{% + \def\jlreq@tempa{\jlreq@helper@removeelement{##1}}% + \expandafter\jlreq@tempa\expandafter{\jlreq@@makecaption@align@envlist}{\jlreq@@makecaption@align@envlist}% + \appto\jlreq@@makecaption@align@envlist{,##1}% + }% + }% + }% }% - }% - }{#1}% + }{#1}% + \edef\jlreq@do{\expandonce{\jlreq@generalset}\expandonce{\jlreq@envset}}% + \expandafter\endgroup + \jlreq@do } -\jlreqsetup{caption_font={\sffamily\bfseries},caption_label_font={\sffamily\bfseries},caption_after_label_space=1\zw,caption_label_format={#1},caption_align=center} % 特に根拠のない値 \setlength\abovecaptionskip{.5\jlreq@gol} \setlength\belowcaptionskip{0pt} @@ -4742,8 +4723,6 @@ \newcommand*{\fnum@figure}{\figurename\thefigure} \newenvironment{figure}{\@float{figure}}{\end@float} \newenvironment{figure*}{\@dblfloat{figure}}{\end@dblfloat} -\newcommand*{\listfigurename}{図目次} -\newcommand{\figurename}{図} %.. table環境 \newcounter{table} @@ -4759,8 +4738,6 @@ \newcommand*{\fnum@table}{\tablename\thetable} \newenvironment{table}{\@float{table}}{\end@float} \newenvironment{table*}{\@dblfloat{table}}{\end@dblfloat} -\newcommand{\listtablename}{表目次} -\newcommand{\tablename}{表} %. タイトル周り \newenvironment{titlepage}{% @@ -4969,7 +4946,7 @@ } \fi } -%. 箇条書き.cf. JISX4051 8.4 +%. 箇条書き. cf. JISX4051 8.4 % 用語定義型 \newenvironment{description}{\list{}{% \setlength{\leftmargin}{0\zw}% 下げない @@ -4984,136 +4961,98 @@ }}{\endlist} \newcommand{\descriptionlabel}[1]{\normalfont\sffamily\bfseries #1} -% enumerateとitemize -% 見出しが一つ上のレベルからどのくらいずれているかを入れる. -% (見出しは2\zwの箱に右/下詰めで入る.) -\setlength\leftmargini{2\zw} -\setlength\leftmarginii{1\zw} -\setlength\leftmarginiii{1\zw} -\setlength\leftmarginiv{1\zw} -\setlength\leftmarginv{1\zw} -\setlength\leftmarginvi{1\zw} - %.. 箇条書き -\jlreq@jlreqsetup@add{itemization_beforeafter_space}{ +% #3={<設定1>,i=<設定2>,<環境名>={<設定3>,ii=<設定4>}}のような設定を解釈する. +% <設定2>は#2@iに,<設定4>は#2@ii@<環境名>に格納される. +% <設定1>の指定はi=<設定1>,..,vi=<設定1>と等価.<設定3>も同様. +% #1には現在何か値が定義されている環境名をカンマ区切りで入れる. +\long\def\jlreq@jlreqsetup@itemization#1#2#3{ + \@ifundefined{#1}{\expandafter\def\csname #1\endcsname{}}{}% \begingroup - \def\jlreq@do{}% - \def\jlreq@keyvallist{}% - \@for\@tempa:=#1\do{% - \expandafter\jlreq@helper@trim\expandafter{\@tempa}{\@tempa}% - \expandafter\jlreq@ifcontains\expandafter{\@tempa}{=}{% - \expandafter\appto\expandafter\jlreq@keyvallist\expandafter{\@tempa,}% + \def\jlreq@generalset{}% + \def\jlreq@levelset{}% + \def\jlreq@envset{}% + \jlreq@parsekeyval@nokey{% + \ifjlreq@parsekeyval@nokey@novalue{% + % 生の値.環境に対するものをクリアし,全てのに同じ値を設定 + % 環境一覧リストもクリア. + \@for\jlreq@tempa:=i,ii,iii,iv,v,vi\do{% + \expandafter\@for\expandafter\jlreq@tempb\expandafter:\expandafter=\csname #1\endcsname\do{% + \ifx\jlreq@tempb\@empty\else + \eappto\jlreq@generalset{\noexpand\let\expandonce{\csname #2@\jlreq@tempa @\jlreq@tempb\endcsname}\noexpand\@undefined}% + \fi + }% + \eappto\jlreq@generalset{% + \noexpand\edef\expandonce{\csname #2@\jlreq@tempa\endcsname}{\unexpanded{\unexpanded{##1}}}% + }% + }% + \appto\jlreq@generalset{\expandafter\def\csname #1\endcsname{}}% }{% - \@for\@tempb:=i,ii,iii,iv,v,vi\do{% - \eappto\jlreq@do{\noexpand\def\expandonce{\csname jlreq@itemization@beforeafter@space@\@tempb\endcsname}{\expandonce{\@tempa}}}% + \ifthenelse{\equal{##1}{i} \OR \equal{##1}{ii} \OR \equal{##1}{iii} \OR \equal{##1}{iv} \OR \equal{##1}{v} \OR \equal{##1}{vi}}{% + % i=とかの時,環境に対応するものをクリアし,\#2@##1に値を入れる + \expandafter\@for\expandafter\jlreq@tempa\expandafter:\expandafter=\csname #1\endcsname\do{ + \ifx\jlreq@tempa\@empty\else + \epreto\jlreq@envset{\noexpand\let\expandonce{\csname #2@##1@\jlreq@tempa\endcsname}\noexpand\@undefined}% + \fi + }% + \eappto\jlreq@envset{\noexpand\edef\expandonce{\csname #2@##1\endcsname}{\unexpanded{\unexpanded{##2}}}}% + }{% + % そうでないとき,環境.##1 = 環境名 + \jlreq@parsekeyval@nokey{% + \ifjlreq@parsekeyval@nokey@novalue{% + % i - viまでに全てセットする. + \@for\jlreq@tempa:=i,ii,iii,iv,v,vi\do{% + \epreto\jlreq@envset{\noexpand\edef\expandonce{\csname #2@\jlreq@tempa @##1\endcsname}{\unexpanded{\unexpanded{####1}}}}% + }% + }{% + % ピンポイント代入 + \eappto\jlreq@envset{\noexpand\edef\expandonce{\csname #2@####1@##1\endcsname}{\unexpanded{\unexpanded{####2}}}}% + }% + }{##2}% + \eappto\jlreq@envset{% + \unexpanded{\def\jlreq@tempa{\jlreq@helper@removeelement{##1}}}% + \unexpanded{\expandafter\jlreq@tempa\expandafter}{\expandonce{\csname #1\endcsname}}{\expandonce{\csname #1\endcsname}}% + \noexpand\appto\expandonce{\csname #1\endcsname}{\unexpanded{,##1}}% + }% }% }% - }% - \def\jlreq@tempa{% - \jlreq@parsekeyval[jlreqsetup: itemization_beforeafter_space]{% - {i}{\appto\jlreq@do{\def\jlreq@itemization@beforeafter@space@i{####1}}} - {ii}{\appto\jlreq@do{\def\jlreq@itemization@beforeafter@space@ii{####1}}} - {iii}{\appto\jlreq@do{\def\jlreq@itemization@beforeafter@space@iii{####1}}} - {iv}{\appto\jlreq@do{\def\jlreq@itemization@beforeafter@space@iv{####1}}} - {v}{\appto\jlreq@do{\def\jlreq@itemization@beforeafter@space@v{####1}}} - {vi}{\appto\jlreq@do{\def\jlreq@itemization@beforeafter@space@vi{####1}}} - }% - }% - \expandafter\jlreq@tempa\expandafter{\jlreq@keyvallist}% + }{#3}% + \edef\jlreq@do{\expandonce{\jlreq@generalset}\expandonce{\jlreq@levelset}\expandonce{\jlreq@envset}}% \expandafter\endgroup \jlreq@do } -\jlreq@jlreqsetup@add{itemization_itemsep}{\def\jlreq@itemization@itemsep{#1}} -\jlreqsetup{itemization_beforeafter_space={0pt,i=.5\baselineskip},itemization_itemsep=0pt} -% enumerate, itemize用初期化 -\def\jlreq@init@list{% - \setlength{\labelwidth}{2\zw}% + +\def\jlreq@itemization@beforeafter@space@envlist{} +\jlreq@jlreqsetup@add{itemization_beforeafter_space}{\jlreq@jlreqsetup@itemization{jlreq@itemization@beforeafter@space@envlist}{jlreq@itemization@beforeafter@space@setting}{#1}} +\jlreq@jlreqsetup@add{itemization_itemsep}{\jlreq@jlreqsetup@withenv{jlreq@itemization@itemsep@envlist}{jlreq@itemization@itemsep@setting}{#1}} +\jlreq@jlreqsetup@add{itemization_labelsep}{\jlreq@jlreqsetup@withenv{jlreq@itemization@labelsep@envlist}{jlreq@itemization@labelsep@setting}{#1}} +\jlreq@jlreqsetup@add{itemization_label_length}{\jlreq@jlreqsetup@itemization{jlreq@itemization@label@length@envlist}{jlreq@itemization@label@length@setting}{#1}} +% enumerate, itemize用初期化,#1 = i,ii,... +\def\jlreq@init@list#1{% \setlength{\partopsep}{0pt}% - \setlength{\itemsep}{\dimexpr\jlreq@itemization@itemsep\relax}% + \setlength{\itemsep}{\dimexpr\jlreq@jlreqsetup@withenv@nameuse{jlreq@itemization@itemsep@setting}{\@currenvir}}% \setlength{\parsep}{0pt}% \setlength{\listparindent}{\parindent}% -% itemizeは直後ベタ,enumerateは直後全角空き. - \ifthenelse{\equal{\@currenvir}{itemize}}{% - \setlength{\labelsep}{0\zw}% - }{% - \setlength{\labelsep}{1\zw}% - }% - % \labelsepだけあけるのは一つ目(ラベルの直後)のみ - \setlength{\itemindent}{\labelsep}% + \setlength{\labelsep}{\dimexpr\jlreq@jlreqsetup@withenv@nameuse{jlreq@itemization@labelsep@setting}{\@currenvir}\relax}% + \setlength{\labelwidth}{\dimexpr\jlreq@jlreqsetup@withenv@nameuse{jlreq@itemization@label@length@setting@#1}{\@currenvir}\relax}% + \setlength{\topsep}{\dimexpr\jlreq@jlreqsetup@withenv@nameuse{jlreq@itemization@beforeafter@space@setting@#1}{\@currenvir}\relax}% + \setlength{\leftmargin}{\dimexpr\csname leftmargin#1\endcsname}% + \setlength{\itemindent}{\dimexpr\jlreq@jlreqsetup@withenv@nameuse{jlreq@itemization@label@length@setting@#1}{\@currenvir} + \labelsep - \leftmargin\relax}% } -\def\@listi{% - \jlreq@init@list - \setlength{\topsep}{\dimexpr\jlreq@itemization@beforeafter@space@i\relax}% - \setlength{\leftmargin}{\leftmargini}% -} +\def\@listi{\jlreq@init@list{i}}% \let\@listI\@listi -\def\@listii{% - \jlreq@init@list - \setlength{\topsep}{\dimexpr\jlreq@itemization@beforeafter@space@ii\relax}% - \setlength{\leftmargin}{\leftmarginii}% -} -\def\@listiii{% - \jlreq@init@list - \setlength{\topsep}{\dimexpr\jlreq@itemization@beforeafter@space@iii\relax}% - \setlength{\leftmargin}{\leftmarginiii}% -} -\def\@listiv{% - \jlreq@init@list - \setlength{\topsep}{\dimexpr\jlreq@itemization@beforeafter@space@iv\relax}% - \setlength{\leftmargin}{\leftmarginiv}% -} -\def\@listv{% - \jlreq@init@list - \setlength{\topsep}{\dimexpr\jlreq@itemization@beforeafter@space@v\relax}% - \setlength{\leftmargin}{\leftmarginv}% -} -\def\@listvi{% - \jlreq@init@list - \setlength{\topsep}{\dimexpr\jlreq@itemization@beforeafter@space@vi\relax}% - \setlength{\leftmargin}{\leftmarginvi}% -} - -\if@tate - \renewcommand{\theenumi}{\jlreq@Kanji{enumi}} - \renewcommand{\theenumii}{\jlreq@rensuji{\@arabic\c@enumii}} - \renewcommand{\theenumiii}{\jlreq@rensuji{\@arabic\c@enumiii}} - \renewcommand{\theenumiv}{\jlreq@rensuji{\@arabic\c@enumiv}} - \newcommand{\labelenumi}{\theenumi} - \newcommand{\labelenumii}{\theenumii} - \newcommand{\labelenumiii}{\theenumiii} - \newcommand{\labelenumiv}{\theenumiv} -\else - \renewcommand{\theenumi}{\@arabic\c@enumi} - \renewcommand{\theenumii}{\@alph\c@enumii} - \renewcommand{\theenumiii}{\@roman\c@enumiii} - \renewcommand{\theenumiv}{\@Alph\c@enumiv} - \newcommand{\labelenumi}{\theenumi.} - \newcommand{\labelenumii}{(\theenumii)} - \newcommand{\labelenumiii}{\theenumiii.} - \newcommand{\labelenumiv}{\theenumiv.} -\fi -\renewcommand{\p@enumii}{\theenumi} -\renewcommand{\p@enumiii}{\theenumi(\theenumii)} -\renewcommand{\p@enumiv}{\p@enumiii\theenumiii} - -\newcommand{\labelitemi}{\hbox to 1\zw{\hss\textbullet\hss}} -%\newcommand{\labelitemi}{•} -\if@tate - \newcommand{\labelitemii}{○} - \newcommand{\labelitemiii}{*} -\else - \newcommand{\labelitemii}{\hbox to 1\zw{\hss\textendash\hss}} - \newcommand{\labelitemiii}{\hbox to 1\zw{\hss\textasteriskcentered\hss}} -\fi -\newcommand{\labelitemiv}{\hbox to 1\zw{\hss ・\hss}} +\def\@listii{\jlreq@init@list{ii}} +\def\@listiii{\jlreq@init@list{iii}} +\def\@listiv{\jlreq@init@list{iv}} +\def\@listv{\jlreq@init@list{v}} +\def\@listvi{\jlreq@init@list{vi}} % 引用系.3.5.2の例. \jlreq@jlreqsetup@add{quote_indent}{\def\jlreq@quote@indent{#1}} \jlreq@jlreqsetup@add{quote_end_indent}{\def\jlreq@quote@end@indent{#1}} \jlreq@jlreqsetup@add{quote_fontsize}[normalsize,small,footnotesize,scriptsize,tiny,]{\jlreq@ifempty{#1}{\def\jlreq@quote@fontsize{}}{\edef\jlreq@quote@fontsize{\expandonce{\csname #1\endcsname}}}} \jlreq@jlreqsetup@add{quote_beforeafter_space}{\def\jlreq@quote@beforeafter@space{#1}} -\jlreqsetup{quote_indent=2\zw,quote_end_indent=0pt,quote_fontsize=,quote_beforeafter_space=0pt} \newenvironment{verse} {\let\\\@centercr @@ -5299,6 +5238,7 @@ \@mkboth{\refname}{\refname}% \list{\@biblabel{\@arabic\c@enumiv}}% {\settowidth\labelwidth{\@biblabel{#1}}% + \labelsep=1\zw \leftmargin\labelwidth \advance\leftmargin\labelsep \itemindent=0pt @@ -5331,11 +5271,13 @@ \columnseprule\z@ \columnsep 2\jlreq@mol \twocolumn[\section*{\indexname}]% \@mkboth{\indexname}{\indexname}% - \thispagestyle{plain}% + \jlreq@theindex@pagestyle \parindent\z@ \parskip\z@ \@plus .03\jlreq@gol\relax \let\item\@idxitem }{% + \ifx\jlreq@theindex@savedpagestyle\@undefined\else\expandafter\pagestyle\expandafter{\jlreq@theindex@savedpagestyle}\fi + \let\jlreq@theindex@savedpagestyle\@undefined \if@restonecol\onecolumn\else\clearpage\fi \ifjlreq@resttate\tate\fi \jlreq@oldfontcommand@disable @@ -5344,9 +5286,25 @@ \newcommand{\subitem}{\@idxitem \hspace*{2\jlreq@mol}} \newcommand{\subsubitem}{\@idxitem \hspace*{3\jlreq@mol}} \newcommand{\indexspace}{\par \vskip 1\jlreq@gol \@plus .5\jlreq@gol \@minus .3\jlreq@gol\relax} +\def\jlreq@theindex@pagestyle{} +\jlreq@jlreqsetup@add{theindex_pagestyle}{ + \def\jlreq@tempa{}% ページスタイル名 + \def\jlreq@theindex@pagestyle{}% + \jlreq@tempafalse % restore + \jlreq@parsekeyval@nokey{% + \ifjlreq@parsekeyval@nokey@novalue{\def\jlreq@tempa{##1}}{% + \jlreq@switch{##1}{% + {restore}{\csname jlreq@tempa##2\endcsname}% + }% + }% + }{#1}% + \eappto\jlreq@theindex@pagestyle{\unexpanded{\let\jlreq@theindex@savedpagestyle}\ifjlreq@tempa\noexpand\jlreq@current@pagestyle\else\noexpand\@undefined\fi}% + \ifx\jlreq@tempa\@empty\else + \eappto\jlreq@theindex@pagestyle{\noexpand\pagestyle{\expandonce{\jlreq@tempa}}}% + \fi +} %. 前付,後付,付録 - % \jlreq@matter@heading[restoreする見出し一覧を入れる制御綴]{#2@<見出し命令名>に今の見出しの中身を入れる}{生成する制御綴の名前}{設定} \def\jlreq@matter@heading{\@ifnextchar[{\jlreq@matter@heading@}{\jlreq@matter@heading@[]{}}} \def\jlreq@matter@heading@[#1]#2#3#4{% @@ -5395,21 +5353,19 @@ \fi }% % \jlreq@declareに\ModifyHeadingか\Renew***Headingを入れる - \ifx\jlreq@\@empty\else - \edef\jlreq@declare{\expandonce{\csname\jlreq@declaretype Heading\endcsname}{##1}}% - \ifthenelse{\NOT \equal{\jlreq@declaretype}{Modify}}{% - \ifx\jlreq@level\@empty - % \frontmatter時でのレベルを引用する. - \edef\jlreq@declare{% - \unexpanded{\edef\jlreq@tempa}{\noexpand\unexpanded{\expandonce{\jlreq@declare}}{\noexpand\expandonce{\expandonce{\csname jlreq@heading@level@##1\endcsname}}}}% - \noexpand\jlreq@tempa - }% - \else - \eappto\jlreq@declare{{\expandonce{\jlreq@level}}}% - \fi - }{}% - \eappto\jlreq@headingscmds{\expandonce{\jlreq@declare}{\expandonce{\jlreq@headingsettings}}}% - \fi + \edef\jlreq@declare{\expandonce{\csname\jlreq@declaretype Heading\endcsname}{##1}}% + \ifthenelse{\NOT \equal{\jlreq@declaretype}{Modify}}{% + \ifx\jlreq@level\@empty + % \frontmatter時でのレベルを引用する. + \edef\jlreq@declare{% + \unexpanded{\edef\jlreq@tempa}{\noexpand\unexpanded{\expandonce{\jlreq@declare}}{\noexpand\expandonce{\expandonce{\csname jlreq@heading@level@##1\endcsname}}}}% + \noexpand\jlreq@tempa + }% + \else + \eappto\jlreq@declare{{\expandonce{\jlreq@level}}}% + \fi + }{}% + \eappto\jlreq@headingscmds{\expandonce{\jlreq@declare}{\expandonce{\jlreq@headingsettings}}}% }{#4}% \edef\jlreq@do{% \unexpanded{\def#3}{% @@ -5424,7 +5380,7 @@ \def\jlreq@matter@counter@norestore#1#2{% \def#1{}% \jlreq@parsekeyval@nokey{% - \jlreq@parsekeyval{ + \jlreq@parsekeyval*{ {value}{\appto#1{\setcounter{##1}{####1}}} {the}{\eappto#1{\noexpand\def\expandonce{\csname the##1\endcsname}{\unexpanded{####1}}}} }{##2}% @@ -5432,7 +5388,6 @@ } \ifthenelse{\equal{\jlreq@article@type}{book}}{ -% \tracingmacros=1 \newif\if@mainmatter \@mainmattertrue \jlreq@jlreqsetup@add{frontmatter_pagebreak}{% @@ -5485,6 +5440,7 @@ \def\jlreq@pagination@frontmatterstyle{arabic}% \let\jlreq@pagination@mainmatterpagecommand=\pagenumbering \@for\jlreq@tempa:=#1\do{% + \expandafter\jlreq@helper@trim\expandafter{\jlreq@tempa}{\jlreq@tempa}% \jlreq@switch{\jlreq@tempa}{ {continuous}{% \def\jlreq@pagination@mainmatterpagecommand##1{\gdef\thepage{\csname @##1\endcsname\c@page}}% @@ -5557,6 +5513,7 @@ \let\jlreq@pagination@backmatterpagecommand=\pagenumbering \def\jlreq@pagination@backmatterstyle{arabic}% \@for\jlreq@tempa:=#1\do{% + \expandafter\jlreq@helper@trim\expandafter{\jlreq@tempa}{\jlreq@tempa}% \jlreq@switch{\jlreq@tempa}{ {continuous}{% \def\jlreq@pagination@backmatterpagecommand##1{\gdef\thepage{\csname @##1\endcsname\c@page}}% @@ -5576,48 +5533,6 @@ \expandafter\jlreq@pagination@backmatterpagecommand\expandafter{\jlreq@pagination@backmatterstyle}% \jlreq@backmatter@postcode } - \jlreqsetup{ - frontmatter_pagebreak = cleardoublepage, - frontmatter_pagestyle = {plain,restore = true}, - frontmatter_heading = {chapter={number=false, restore = true}}, - frontmatter_counter = { - figure = {the = \arabic{figure},restore = true}, - table = {the = \arabic{table},restore = true}, - }, - frontmatter_precode = {}, - frontmatter_postcode = {}, - } - \jlreqsetup{ - mainmatter_pagebreak = cleardoublepage, - mainmatter_counter = { - chapter = {value = 0}, - }, - mainmatter_pagestyle = {}, - mainmatter_heading = {}, - mainmatter_precode = {}, - mainmatter_postcode = {}, - } - \if@openright - \jlreqsetup{backmatter_pagebreak=cleardoublepage} - \else - \jlreqsetup{backmatter_pagebreak=clearpage} - \fi - \jlreqsetup{ - backmatter_pagestyle = plain, - backmatter_counter = { - chapter={value = 0, the = {}}, - figure = {value = 0, the = {\arabic{figure}}}, - table = {value = 0, the = {\arabic{table}}} - }, - backmatter_heading = {chapter = {number = false}}, - backmatter_precode = {}, - backmatter_postcode = {} - } - \jlreqsetup{ - frontmatter_pagination = {independent,roman}, - mainmatter_pagination = {arabic}, - backmatter_pagination = {continuous,arabic}, - } }{} \jlreq@jlreqsetup@add{appendix_counter}{\jlreq@matter@counter@norestore{\jlreq@appendix@counter}{#1}} @@ -5632,51 +5547,6 @@ \jlreq@appendix@postcode } -\ifthenelse{\equal{\jlreq@article@type}{article}}{ - \if@tate - \jlreqsetup{ - appendix_counter = { - section = {value = 0, the = {\jlreq@rensuji{\Alph{section}}}}, - subsection = {value = 0}, - } - } - \else - \jlreqsetup{ - appendix_counter = { - section = {value = 0, the = {\Alph{chapter}}}, - subsection = {value = 0}, - } - } - \fi - \jlreqsetup{appendix_heading = {},appendix_precode = {},appendix_postcode = {}} -}{%book, report - \if@tate - \jlreqsetup{ - appendix_counter = { - chapter = {value = 0, the = {\jlreq@rensuji{\Alph{chapter}}}}, - } - } - \else - \jlreqsetup{ - appendix_counter = { - chapter = {value = 0, the = {\Alph{chapter}}}, - } - } - \fi - \jlreqsetup{ - appendix_heading = { - chapter = {label_format = {付録\thechapter}} - }, - appendix_postcode = {% - \ifthenelse{\equal{\jlreq@current@pagestyle}{headings}}{% - \def\chaptermark#1{\markboth{付録\thechapter\quad #1}{}}% - \ModifyPageStyle{headings}{mark_format={_chapter={付録\thechapter\quad #1}}}% - }{}% - }, - appendix_precode = {} - } -} - %. その他諸々 %.. 縦中横 \edef\@tempa{% @@ -5731,14 +5601,14 @@ } \def\jlreq@warekiyear#1#2#3#4{% % 昭和:1989年1月7日まで - \ifnum0\ifnum#1<1988 1\fi\ifnum#1=1989 \ifnum#2=1 \ifnum#3<8 1\fi\fi\fi>0 + \ifnum0\ifnum#1<1989 1\fi\ifnum#1=1989 \ifnum#2=1 \ifnum#3<8 1\fi\fi\fi>0 昭和\jlreq@warekiyear@{#1}{1926}{#4}% % 平成:2019年4月末日まで - \else%\ifnum0\ifnum#1<2019 1\fi\ifnum#1=1989 \ifnum#2<5 1\fi\fi>0 + \else\ifnum0\ifnum#1<2019 1\fi\ifnum#1=2019 \ifnum#2<5 1\fi\fi>0 平成\jlreq@warekiyear@{#1}{1989}{#4}% -% \else -% 新元号\jlreq@warekiyear@{#1}{2019}{#4}% - \fi%\fi + \else + 令和\jlreq@warekiyear@{#1}{2019}{#4}% + \fi\fi } \def\jlreq@warekiyear@#1#2#3{\ifnum#1=#2 元年\else #3\numexpr#1-#2+1\relax 年\fi} \def\today{% @@ -5766,11 +5636,6 @@ {wareki}{\西暦false} } } -\if@tate - \jlreqsetup{year_style=wareki} -\else - \jlreqsetup{year_style=seireki} -\fi % 時刻 \hour=\time \divide\hour by 60 @@ -5813,15 +5678,301 @@ \def\jlreq@theorem@indent{#1} \@ifpackageloaded{amsthm}{\jlreq@setupamsthm}{} } + + +%. デフォルト設定 +%.. 見出し +\if@tate + \renewcommand{\thepart}{\jlreq@Kanji{part}} + \ifthenelse{\equal{\jlreq@article@type}{article}}{}{\renewcommand{\thechapter}{\jlreq@Kanji{chapter}}} + \renewcommand{\thesection}{\jlreq@rensuji{\@arabic\c@section}} + \renewcommand{\thesubsection}{\jlreq@rensuji{\@alph\c@subsection}} + \renewcommand{\thesubsubsection}{\jlreq@rensuji{\@arabic\c@subsubsection}} + \renewcommand{\theparagraph}{(\jlreq@rensuji{\@arabic\c@paragraph})} + \renewcommand{\thesubparagraph}{(\jlreq@rensuji{\@arabic\c@subparagraph})} + + \ifthenelse{\equal{\jlreq@article@type}{article}}{ + \NewBlockHeading{part}{0}{font={\jlreq@keepbaselineskip{\LARGE}},indent=4\zw,lines=4,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\large}}} + \if@twoside\ModifyHeading{part}{allowbreak_if_evenpage=true}\fi + } + {% book, report + \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\zw}},format={\null\vfill {\Huge\hspace*{2\zw}#1#2}\vspace*{2\jlreq@gol}}} + \NewBlockHeading{chapter}{0}{indent=2\zw,lines=6,label_format={第\thechapter 章},font={\huge},after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\Large}}} + \if@twoside\ModifyHeading{chapter}{allowbreak_if_evenpage=true}\fi + \renewcommand{\thechapter}{\jlreq@Kanji{chapter}} + } + \NewBlockHeading{section}{1}{font={\jlreq@keepbaselineskip{\Large}},indent=6\zw,lines=3,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\normalsize}}} + \if@twoside\ModifyHeading{section}{allowbreak_if_evenpage=true}\fi + \NewBlockHeading{subsection}{2}{font={\jlreq@keepbaselineskip{\large}},indent=8\zw,lines=2,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\small}}} + \if@twoside\ModifyHeading{subsection}{allowbreak_if_evenpage=true}\fi + \NewBlockHeading{subsubsection}{3}{font={\jlreq@keepbaselineskip{\normalsize}},indent=10\zw,lines=1,before_lines=1,subtitle_break=false,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},,subtitle_font={\jlreq@keepbaselineskip{\scriptsize}}} + \if@twoside\ModifyHeading{subsubsection}{allowbreak_if_evenpage=true}\fi + \NewRuninHeading{paragraph}{4}{font={\jlreq@keepbaselineskip{\normalsize}}} + \NewRuninHeading{subparagraph}{5}{font={\jlreq@keepbaselineskip{\normalsize}},indent=1\zw} +\else% yoko + \renewcommand{\thepart}{\Roman{part}} + \renewcommand{\thesubsection}{\thesection .\arabic{subsection}} + \renewcommand{\thesubsubsection}{\thesubsection .\arabic{subsubsection}} + \renewcommand{\theparagraph}{\thesubsubsection .\arabic{paragraph}} + \renewcommand{\thesubparagraph}{\theparagraph .\arabic{subparagraph}} + \ifthenelse{\equal{\jlreq@article@type}{article}}{ + \NewBlockHeading{part}{0}{font={\jlreq@keepbaselineskip{\LARGE\sffamily\bfseries}},label_format={第\thepart 部},lines=4,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\large}}} + \renewcommand{\thesection}{\arabic{section}} + } + {% book, report + \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\jlreq@gol}},format={\null\vfil {\Huge\sffamily\bfseries #1#2}\vfil}} + \NewBlockHeading{chapter}{0}{% + font={\jlreq@keepbaselineskip{\huge\sffamily\bfseries}}, + label_format={第\thechapter 章}, + lines=5,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw}, + subtitle_font={\jlreq@keepbaselineskip{\Large}}} + \renewcommand{\thechapter}{\arabic{chapter}} + \renewcommand{\thesection}{\thechapter.\arabic{section}} + } + \NewBlockHeading{section}{1}{font={\jlreq@keepbaselineskip{\Large\sffamily\bfseries}},lines=3,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\normalsize}}} + \NewBlockHeading{subsection}{2}{font={\jlreq@keepbaselineskip{\large\sffamily\bfseries}},lines=2,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\small}}} + \NewBlockHeading{subsubsection}{3}{font={\jlreq@keepbaselineskip{\normalsize\sffamily\bfseries}},lines=1,before_lines=1,subtitle_break=false,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\scriptsize}}} + \NewRuninHeading{paragraph}{4}{font={\jlreq@keepbaselineskip{\normalsize\sffamily\bfseries}},indent=1\zw} + \NewRuninHeading{subparagraph}{5}{font={\jlreq@keepbaselineskip{\normalsize\sffamily\bfseries}},indent=2\zw} +\fi + +\ifthenelse{\equal{\jlreq@article@type}{article}}{}{% book, report + \if@openright + \ModifyHeading{part}{type=naka} + \if@tate + \ModifyHeading{chapter}{pagebreak=begin_with_even_page} + \else + \ModifyHeading{chapter}{pagebreak=begin_with_odd_page} + \fi + \else + \ModifyHeading{part}{type=han} + \ModifyHeading{chapter}{pagebreak=clearpage} + \fi +} + +%.. ページスタイル +\RenewPageStyle{empty}{nombre={},odd_running_head={},even_running_head={}} +\ifthenelse{\equal{\jlreq@article@type}{article}}{ + \if@twoside + \NewPageStyle{headings}{odd_running_head={_subsection},even_running_head={_section}} + \else + \NewPageStyle{headings}{odd_running_head={_section},even_running_head={}} + \fi +}{% book, article + \if@twoside + \NewPageStyle{headings}{odd_running_head={_section},even_running_head={_chapter}} + \else + \NewPageStyle{headings}{odd_running_head={_chapter},even_running_head={}} + \fi + \ModifyPageStyle{headings}{mark_format={_chapter={第\thechapter 章\quad #1}}} +} +\if@tate + \RenewPageStyle{plain}{nombre=\thepage,odd_running_head={},even_running_head={},clear_markcommand=false} + \NewPageStyle{myheadings}{nombre=\thepage,odd_running_head=\rightmark,even_running_head=\leftmark,clear_markcommand=false} + \if@twoside + \ModifyPageStyle{plain}{nombre_position={top-left}} + \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-left,running_head_position=top-left} + \ModifyPageStyle{myheadings}{nombre_position=bottom-left,running_head_position=top-left} + \else + \ModifyPageStyle{plain}{nombre_position={top-center}} + \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center} + \ModifyPageStyle{myheadings}{nombre_position=bottom-center,running_head_position=top-center} + \fi +\else% yoko + \RenewPageStyle{plain}{nombre=\thepage,odd_running_head={},even_running_head={},nombre_position={bottom-center},clear_markcommand=false} + \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center} + \NewPageStyle{myheadings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center,odd_running_head=\rightmark,even_running_head=\leftmark,clear_markcommand=false} +\fi +\ModifyPageStyle{plain}{font=\small} +\ModifyPageStyle{headings}{font=\small} +\ModifyPageStyle{myheadings}{font=\small} + +%.. 注 +\jlreqsetup{reference_mark=inline} +\if@tate + \jlreqsetup{footnote_indent=1\zw}% 根拠なし +\else + \jlreqsetup{footnote_indent=0pt}% (4.2.5.b) +\fi +\jlreqsetup{footnote_second_indent=1\zw} +\jlreqsetup{endnote_second_indent=2\zw} +\jlreqsetup{endnote_position=headings} +\ifdim\marginparwidth>0pt + \jlreqsetup{sidenote_type=number} + \jlreqsetup{sidenote_symbol=*,sidenote_keyword_font={}} +\fi + +%.. キャプション +\jlreqsetup{ + caption_font={\sffamily\bfseries}, + caption_label_font={\sffamily\bfseries}, + caption_after_label_space=1\zw, + caption_label_format={#1}, + caption_align=center +} + +%.. 箇条書き +\if@tate + \renewcommand{\theenumi}{\jlreq@Kanji{enumi}} + \renewcommand{\theenumii}{\jlreq@rensuji{\@arabic\c@enumii}} + \renewcommand{\theenumiii}{\jlreq@rensuji{\@arabic\c@enumiii}} + \renewcommand{\theenumiv}{\jlreq@rensuji{\@arabic\c@enumiv}} + \newcommand{\labelenumi}{\theenumi} + \newcommand{\labelenumii}{\theenumii} + \newcommand{\labelenumiii}{\theenumiii} + \newcommand{\labelenumiv}{\theenumiv} +\else + \renewcommand{\theenumi}{\@arabic\c@enumi} + \renewcommand{\theenumii}{\@alph\c@enumii} + \renewcommand{\theenumiii}{\@roman\c@enumiii} + \renewcommand{\theenumiv}{\@Alph\c@enumiv} + \newcommand{\labelenumi}{\theenumi.\hspace{.5\zw}} + \newcommand{\labelenumii}{(\theenumii)\hspace{.5\zw}} + \newcommand{\labelenumiii}{\theenumiii.\hspace{.5\zw}} + \newcommand{\labelenumiv}{\theenumiv.\hspace{.5\zw}} +\fi +\renewcommand{\p@enumii}{\theenumi} +\renewcommand{\p@enumiii}{\theenumi(\theenumii)} +\renewcommand{\p@enumiv}{\p@enumiii\theenumiii} + +\newcommand{\labelitemi}{\hbox to 1\zw{\hss\textbullet\hss}} +%\newcommand{\labelitemi}{•} +\if@tate + \newcommand{\labelitemii}{○} + \newcommand{\labelitemiii}{*} +\else + \newcommand{\labelitemii}{\hbox to 1\zw{\hss\textendash\hss}} + \newcommand{\labelitemiii}{\hbox to 1\zw{\hss\textasteriskcentered\hss}} +\fi +\newcommand{\labelitemiv}{\hbox to 1\zw{\hss ・\hss}} + +% 見出しが一つ上のレベルからどのくらいずれているかを入れる. +\setlength\leftmargini{2\zw} +\setlength\leftmarginii{2\zw} +\setlength\leftmarginiii{1\zw} +\setlength\leftmarginiv{1\zw} +\setlength\leftmarginv{1\zw} +\setlength\leftmarginvi{1\zw} +\jlreqsetup{ + itemization_beforeafter_space={0pt,i=.5\baselineskip}, + itemization_itemsep=0pt, + itemization_labelsep={0pt}, + itemization_label_length={1\zw,i=2\zw,ii=2\zw} +} + +%.. 引用 +\jlreqsetup{ + quote_indent=2\zw, + quote_end_indent=0pt, + quote_fontsize=, + quote_beforeafter_space=0pt +} + +%.. その他 +\ifthenelse{\equal{\jlreq@article@type}{book}}{ + \jlreqsetup{ + frontmatter_pagebreak = cleardoublepage, + frontmatter_pagestyle = {plain,restore = true}, + frontmatter_heading = {chapter={number=false, restore = true}}, + frontmatter_counter = { + figure = {the = \arabic{figure},restore = true}, + table = {the = \arabic{table},restore = true}, + }, + frontmatter_precode = {}, + frontmatter_postcode = {}, + } + \jlreqsetup{ + mainmatter_pagebreak = cleardoublepage, + mainmatter_counter = { + chapter = {value = 0}, + }, + mainmatter_pagestyle = {}, + mainmatter_heading = {}, + mainmatter_precode = {}, + mainmatter_postcode = {}, + } + \if@openright + \jlreqsetup{backmatter_pagebreak=cleardoublepage} + \else + \jlreqsetup{backmatter_pagebreak=clearpage} + \fi + \jlreqsetup{ + backmatter_pagestyle = plain, + backmatter_counter = { + chapter={value = 0, the = {}}, + figure = {value = 0, the = {\arabic{figure}}}, + table = {value = 0, the = {\arabic{table}}} + }, + backmatter_heading = {chapter = {number = false}}, + backmatter_precode = {}, + backmatter_postcode = {} + } + \jlreqsetup{ + frontmatter_pagination = {independent,roman}, + mainmatter_pagination = {arabic}, + backmatter_pagination = {continuous,arabic}, + } +}{} +\ifthenelse{\equal{\jlreq@article@type}{article}}{ + \if@tate + \jlreqsetup{ + appendix_counter = { + section = {value = 0, the = {\jlreq@rensuji{\Alph{section}}}}, + subsection = {value = 0}, + } + } + \else + \jlreqsetup{ + appendix_counter = { + section = {value = 0, the = {\Alph{chapter}}}, + subsection = {value = 0}, + } + } + \fi + \jlreqsetup{appendix_heading = {},appendix_precode = {},appendix_postcode = {}} +}{%book, report + \if@tate + \jlreqsetup{ + appendix_counter = { + chapter = {value = 0, the = {\jlreq@rensuji{\Alph{chapter}}}}, + } + } + \else + \jlreqsetup{ + appendix_counter = { + chapter = {value = 0, the = {\Alph{chapter}}}, + } + } + \fi + \jlreqsetup{ + appendix_heading = { + chapter = {label_format = {付録\thechapter}} + }, + appendix_postcode = {% + \ifthenelse{\equal{\jlreq@current@pagestyle}{headings}}{% + \def\chaptermark#1{\markboth{付録\thechapter\quad #1}{}}% + \ModifyPageStyle{headings}{mark_format={_chapter={付録\thechapter\quad #1}}}% + }{}% + }, + appendix_precode = {} + } +} +\jlreqsetup{theindex_pagestyle=plain} +\jlreqsetup{year_style=seireki} \jlreqsetup{theorem_beforeafter_space=1\baselineskip,theorem_indent=0pt} -% デフォルト設定 \newcommand{\contentsname}{目次} \newcommand{\refname}{参考文献} \newcommand{\indexname}{索引} +\newcommand{\listfigurename}{図目次} +\newcommand{\figurename}{図} +\newcommand{\listtablename}{表目次} +\newcommand{\tablename}{表} \pagestyle{plain} \pagenumbering{arabic} + +%. 最終処理 \if@twocolumn \twocolumn \sloppy -- cgit v1.2.3