summaryrefslogtreecommitdiff
path: root/macros/jptex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-11-28 03:03:54 +0000
committerNorbert Preining <norbert@preining.info>2022-11-28 03:03:54 +0000
commitd215ba492183a22167b7cdf9900899ab51f7dda6 (patch)
tree32b4b1d6266f2afc855301d585edd3001b363ea8 /macros/jptex
parent6d1b034ffe312cd342bdcc717d7bd694dcad25a9 (diff)
CTAN sync 202211280303
Diffstat (limited to 'macros/jptex')
-rw-r--r--macros/jptex/latex/jlreq/README-ja.md46
-rw-r--r--macros/jptex/latex/jlreq/README.md5
-rw-r--r--macros/jptex/latex/jlreq/jfm-jlreq.lua48
-rw-r--r--macros/jptex/latex/jlreq/jlreq-complements.sty16
-rw-r--r--macros/jptex/latex/jlreq/jlreq-helpers.sty4
-rw-r--r--macros/jptex/latex/jlreq/jlreq-ja.pdfbin371560 -> 376976 bytes
-rw-r--r--macros/jptex/latex/jlreq/jlreq-trimmarks-ja.md20
-rw-r--r--macros/jptex/latex/jlreq/jlreq-trimmarks.md20
-rw-r--r--macros/jptex/latex/jlreq/jlreq-trimmarks.sty93
-rw-r--r--macros/jptex/latex/jlreq/jlreq.cls145
-rw-r--r--macros/jptex/latex/jlreq/jlreq.pdfbin119802 -> 120615 bytes
-rw-r--r--macros/jptex/latex/jlreq/luajfm2pl.lua2
12 files changed, 318 insertions, 81 deletions
diff --git a/macros/jptex/latex/jlreq/README-ja.md b/macros/jptex/latex/jlreq/README-ja.md
index 78766ca570..a34b2b1a96 100644
--- a/macros/jptex/latex/jlreq/README-ja.md
+++ b/macros/jptex/latex/jlreq/README-ja.md
@@ -164,6 +164,7 @@ pLaTeX / upLaTeX / LuaLaTeX上で動きます.以下のパッケージを内
* `sidenote_keyword_font=<フォント設定コード>`:`sidenote_symbol=symbol`の時に,注のついている単語のフォント指定.デフォルトは無し(強調しない)
* `endnote_second_indent=<寸法>`: 後柱の二行目以降の字下げ量を指定します.一行目からの相対字下げ量です.
* `endnote_position=[headings/paragraph/{_<見出し名1>,_<見出し名2>,...}]`:後注の出力場所を指定します.`headings`は各見出しの直前(デフォルト),`paragraph`は改段落の際に出力します.また,`endnote_position={_chapter,_section}`とすると,`\chapter`と`\section`の直前に出力します.`<_見出し名>`を指定するためには,対象の見出しが本クラスファイルの機能を使って作られていなければいけません.
+* `warichu_opening=<コード>`, `warichu_closing=<コード>`:それぞれ,割注の前と後ろに挿入されます.デフォルトは`(`と`)`です.
### キャプション
図表のキャプションを`\jlreqsetup`で変更できます.全ての設定で,各環境ごとの設定をすることができます.例えば`caption_font=\normalsize,table=\Large`とすると,table環境内では`\Large`が適用され,そのほかの環境内では`\normalsize`が適用されます.他の設定も同様です.
@@ -185,14 +186,6 @@ pLaTeX / upLaTeX / LuaLaTeX上で動きます.以下のパッケージを内
* `itemization_beforeafter_space=<寸法>`:箇条書きの前後の空きを指定します.`itemization_beforeafter_space={i=<寸法>}`とするとトップレベルのみに設定を行います.`itemization_beforeafter_space={0pt,i=10pt,ii=5pt}`とすれば,レベル1の箇条書きに10ptを,レベル2のそれに5ptを,それ以外には0ptを設定します.レベルは上記のように小文字ローマ数字で指定します.
* `itemization_itemsep=<寸法>`:項目同士の空きを指定します.
-### 定理環境
-`\jlreqsetup`で指定します.
-* `theorem_beforeafter_space=<寸法>`:定理環境の前後の空きを指定します.
-* `theorem_label_font=<フォント設定コード>`:定理環境のラベル部分のフォントを設定します.
-* `theorem_font=<フォント設定コード>`:定理環境本体のフォントを設定します.
-
-`amsthm`パッケージが読み込まれると,新しい定理スタイル`jlreq`が定義され,現在のスタイルが`jlreq`へと変更されます.このとき,上記設定はこの`jlreq`スタイルへの設定として機能します.
-
### 前付きなど
`\frontmatter` / `\mainmatter` / `\backmatter` / `\appendix`での処理を`\jlreqsetup`で指定できます.
* `frontmatter_pagebreak=[cleardoublepage/clearpage/]`:`\frontmatter`実行時の改ページを実行する命令名を指定します.空にすると何もしません.
@@ -380,6 +373,38 @@ JFMの名前は次の通りです.`[]`で囲まれている文字は設定に
## その他
* クラスオプション`jlreq_notes`が渡されると,日本語組版処理の記述と矛盾する設定が行われた場合に通知がされます.
+## jlreq-complements
+`jlreq-complements`パッケージはLaTeXのドキュメントクラスで標準的に提供される環境などをカスタマイズ可能なものに変更するパッケージです.以下のように使います.次のオプションを受け付けます.
+* `platex`, `uplatex`, `lulalatex`:エンジンの指定です.
+* `setupname=<名前>`:カスタマイズするための命令名を指定します.デフォルトでは`jlreqcomplementssetup`で,`jlreqcomplementssetup{<設定項目>}`とプリアンブルに書くことで設定できます.
+
+`jlreq`内では`\usepackage[<jlreq内で認識しているエンジン>,setupname=jlreqsetup]{jlreq-complements}`相当で読み込みがされていますので,今までの`\jlreqsetup`で環境のカスタマイズをすることができます.なお,このように既存の名前を指定してうまく行くためにはもともとの命令と整合的である必要があります.通常は避けた方がよいでしょう.
+
+### `thebibliography`環境
+* `thebibliography_heading=<コード>`:`thebibliography`環境の見出しを出力する命令を指定します.
+* `thebibliography_after_label_space=<寸法>`:`thebibliography`環境における各項目のラベル以降の空きを指定します.
+* `thebibliography_indent=<寸法>`:`thebibliography`環境全体の字下げ量を指定します.
+* `thebibliography_mark=<コード>`:`thebibliography`環境の見出しを柱に登録するためのコードを指定します.
+* `thebibliography_precode=<コード>`,`thebibliography_postcode=<コード>`:それぞれ,`thebibliography`環境の前後に実行されるコードを指定します.
+
+### `theindex`環境
+* `theindex_heading=<コード>`:`theindex`環境の見出しを出力する命令を指定します.
+* `theindex_mark=<コード>`:`theindex`環境の見出しを柱に登録するためのコードを指定します.
+* `theindex_twocolumn=[true/false]`:`theindex`環境を二段組みで出力するかを指定します.
+* `theindex_column_gap=<寸法>`:`theindex_twocolumn=true`の時の`theindex`環境内での段間を指定します.
+* `theindex_column_rule_width=<寸法>`:`theindex_twocolumn=true`の時の`theindex`環境内での`\columnseprule`の値を指定します.
+* `theindex_pagestyle=<ページスタイル名>`:`theindex`環境でのページスタイルを指定します.
+* `theindex_postcode=<コード>`,`theindex_precode=<コード>`:それぞれ,`theindex`環境の前後に実行されるコードを指定します.
+
+### 定理環境
+* `theorem_beforeafter_space=<寸法>`:定理環境の前後の空きを指定します.
+* `theorem_label_font=<フォント設定コード>`:定理環境のラベル部分のフォントを設定します.
+* `theorem_font=<フォント設定コード>`:定理環境本体のフォントを設定します.
+* `theorem_indent=<寸法>`:定理環境本体の字下げ量を指定します.
+* `proof_label_font=<フォント設定コード>`:`amsthm`パッケージが読み込まれたときのみ有効な設定です.
+
+`amsthm`パッケージが読み込まれると,新しい定理スタイル`jlreq`が定義され,現在のスタイルが`jlreq`へと変更されます.このとき,上記設定はこの`jlreq`スタイルへの設定として機能します.
+
## ライセンス
このパッケージは二条項BSDライセンスの元で配布されています.詳しくは[LICENSE](LICENSE)をご覧ください.
@@ -540,6 +565,11 @@ JFMの名前は次の通りです.`[]`で囲まれている文字は設定に
- バグ修正.
* 2022-07-13
- 右側の柱が正しく配置されないバグ修正.
+* 2022-11-28
+ - `\SetBlockHeadingSpaces`時に柱への登録が行われなかったバグを修正.
+ - ISO C4の用紙サイズが間違っていたのを修正.
+ - `jlreq-complements`を追加.
+ - その他バグ修正やその他のパッケージとの調整など.
--------------
Noriyuki Abe
diff --git a/macros/jptex/latex/jlreq/README.md b/macros/jptex/latex/jlreq/README.md
index 9d9506678b..27ad1eee81 100644
--- a/macros/jptex/latex/jlreq/README.md
+++ b/macros/jptex/latex/jlreq/README.md
@@ -175,6 +175,11 @@ This package is distributed under the BSD 2-Clause License. See [LICENSE](LICENS
- Fixed a bug.
* 2022-07-13
- Fixed a bug: The position of running heads were not correct.
+* 2022-11-28
+ - Fixed a bug: did not register to running head when `\SetBlockHeadingSpaces` is used.
+ - Fixed a bug: wrong papersize for ISO C4.
+ - Added a package `jlreq-complements`
+ - Fixed some other bugs and adjust with some other packages.
--------------
Noriyuki Abe
diff --git a/macros/jptex/latex/jlreq/jfm-jlreq.lua b/macros/jptex/latex/jlreq/jfm-jlreq.lua
index 6172b1b463..e2a2e0a68d 100644
--- a/macros/jptex/latex/jlreq/jfm-jlreq.lua
+++ b/macros/jptex/latex/jlreq/jfm-jlreq.lua
@@ -695,6 +695,14 @@ local jfm = {
]]
},
},
+
+ [161] = { -- 半角カナ
+ chars = {'ヲ', 'ァ', 'ィ', 'ゥ', 'ェ', 'ォ', 'ャ', 'ュ', 'ョ', 'ッ', 'ー', 'ア', 'イ', 'ウ', 'エ', 'オ', 'カ', 'キ', 'ク', 'ケ', 'コ', 'サ', 'シ', 'ス', 'セ', 'ソ', 'タ', 'チ', 'ツ', 'テ', 'ト', 'ナ', 'ニ', 'ヌ', 'ネ', 'ノ', 'ハ', 'ヒ', 'フ', 'ヘ', 'ホ', 'マ', 'ミ', 'ム', 'メ', 'モ', 'ヤ', 'ユ', 'ヨ', 'ラ', 'リ', 'ル', 'レ', 'ロ', 'ワ', 'ン'},
+ width = 0.5, height = 0.88, depth = 0.12,
+ align = 'left',
+ glue = {} -- あとで
+ },
+
--[[
[17] = { -- 等号類
@@ -750,6 +758,30 @@ local jfm = {
]]
},
},
+ [191] = { -- 1/2数字,よくわからないので漢字等と同じ扱いにする
+ left = 0,
+ chars = {"AJ1-247","AJ1-248","AJ1-249","AJ1-250","AJ1-251","AJ1-252","AJ1-253","AJ1-254","AJ1-255","AJ1-256"},
+ align = 'left',
+ width = 0.5,height = 0.88,depth = 0.12,
+ glue = { -- あとで処理
+ },
+ },
+ [192] = { -- 1/3数字,同様
+ left = 0,
+ chars = {"AJ1-9758","AJ1-9759","AJ1-9760","AJ1-9761","AJ1-9762","AJ1-9763","AJ1-9764","AJ1-9765","AJ1-9766","AJ1-9767"},
+ align = 'left',
+ width = 1/3,height = 0.88,depth = 0.12,
+ glue = { -- あとで処理
+ },
+ },
+ [193] = { -- 1/4数字,同様
+ left = 0,
+ chars = {"AJ1-9738","AJ1-9739","AJ1-9740","AJ1-9741","AJ1-9742","AJ1-9743","AJ1-9744","AJ1-9745","AJ1-9746","AJ1-9747"},
+ align = 'left',
+ width = 1/4,height = 0.88,depth = 0.12,
+ glue = { -- あとで処理
+ },
+ },
--[[
@@ -1191,5 +1223,21 @@ if jlreq ~= nil then
end
end
+local function copy_jfm(from,to)
+ if jfm[from].glue ~= nil then jfm[to].glue = table.fastcopy(jfm[from].glue) end
+ for tc,_ in pairs(jfm) do
+ if type(tc) == "number" then
+ if jfm[tc].glue[from] ~= nil then
+ jfm[tc].glue[to] = table.fastcopy(jfm[tc].glue[from])
+ end
+ end
+ end
+end
+
+copy_jfm(0,191)
+copy_jfm(0,192)
+copy_jfm(0,193)
+copy_jfm(16,161)
+
luatexja.jfont.define_jfm(jfm)
diff --git a/macros/jptex/latex/jlreq/jlreq-complements.sty b/macros/jptex/latex/jlreq/jlreq-complements.sty
index 2e20114fe6..144bc21b57 100644
--- a/macros/jptex/latex/jlreq/jlreq-complements.sty
+++ b/macros/jptex/latex/jlreq/jlreq-complements.sty
@@ -1,6 +1,6 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{jlreq-complements}[2022/07/13 jlreq-complements]
-\RequirePackage{jlreq-helpers}[2021/08/12]
+\ProvidesPackage{jlreq-complements}[2022/11/28 jlreq-complements]
+\RequirePackage{jlreq-helpers}[2022/11/28]
\RequirePackage{l3keys2e}
\ExplSyntaxOn
@@ -40,7 +40,7 @@
\int_compare_p:n { (\ltjgetparameter{direction}-(\ltjgetparameter{direction}/8)*8) == 3 }
}
}{
- \prg_new_conditional:Nnn \__jlreq_complements_iftdir: { T, F, TF} { \legacy_if_p:n { tdir } }
+ \prg_new_conditional:Nnn \__jlreq_complements_iftdir: { T, F, TF} { \iftdir \prg_return_true: \else \prg_return_false: \fi }
}
\@ifundefined{jlreq@zw}{
@@ -129,7 +129,7 @@
\bool_new:N \g__jlreq_complements_theindex_restorepagestyle_bool
\keys_define:Vn \g__jlreq_complements_setupname_str {
theindex_yoko .bool_gset:N = \g__jlreq_complements_theindex_yoko_bool,
- theindex_twocolumn .bool_gset:N = \g__jlreq_complements_theindex_twcolumn_bool,
+ theindex_twocolumn .bool_gset:N = \g__jlreq_complements_theindex_twocolumn_bool,
}
\keys_set:Vn \g__jlreq_complements_setupname_str {
@@ -146,14 +146,15 @@
{ \keys_set:Vn \g__jlreq_complements_setupname_str { theindex_yoko = false } }
{ \keys_set:Vn \g__jlreq_complements_setupname_str { theindex_yoko = true } }
-
\bool_new:N \l__jlreq_complements_resttate_bool
+\bool_new:N \l__jlreq_complements_theindex_maincolumn_bool
\renewenvironment{theindex}{%
\prop_item:Nn \g__jlreq_complements_theindex_prop { precode }
\bool_set_false:N \l__jlreq_complements_resttate_bool
\bool_if:NT \g__jlreq_complements_theindex_yoko_bool {
\__jlreq_complements_iftdir:T { \clearpage \yoko \bool_set_true:N \l__jlreq_complements_resttate_bool }
}
+ \bool_set:Nn \l__jlreq_complements_theindex_maincolumn_bool { \legacy_if_p:n { @twocolumn } }
\bool_if:NTF \g__jlreq_complements_theindex_twocolumn_bool {
\setlength{\columnseprule}{ \prop_item:Nn \g__jlreq_complements_theindex_prop { column_rule_width } }
\setlength{\columnsep} { \prop_item:Nn \g__jlreq_complements_theindex_prop { column_gap } }
@@ -168,14 +169,15 @@
}
\prop_item:Nn \g__jlreq_complements_theindex_prop { mark }
\tl_set:Nx \l__jlreq_tmpa_tl { \exp_not:N \pagestyle { \prop_item:Nn \g__jlreq_complements_theindex_prop { pagestyle } } }
+ \l__jlreq_tmpa_tl
\parindent\z@
\parskip\z@ \@plus .03\jlreq@zh\relax
\let\item\@idxitem
}{%
\bool_if:NTF \g__jlreq_complements_theindex_twocolumn_bool {
- \legacy_if:nF { @twocolumn } { \onecolumn }
+ \bool_if:NF \l__jlreq_complements_theindex_maincolumn_bool { \onecolumn }
}{
- \legacy_if:nT { @twocolumn } { \twocolumn }
+ \bool_if:NT \l__jlreq_complements_theindex_maincolumn_bool { \twocolumn }
}
\clearpage
\bool_if:NT \l__jlreq_complements_resttate_bool { \tate }
diff --git a/macros/jptex/latex/jlreq/jlreq-helpers.sty b/macros/jptex/latex/jlreq/jlreq-helpers.sty
index ea475e87dd..ab61fe0709 100644
--- a/macros/jptex/latex/jlreq/jlreq-helpers.sty
+++ b/macros/jptex/latex/jlreq/jlreq-helpers.sty
@@ -1,7 +1,7 @@
% エンジン非依存のマクロ集
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{jlreq-helpers}[2021/08/12 jlreq-helpers]
+\ProvidesPackage{jlreq-helpers}[2022/11/28 jlreq-helpers]
\ExplSyntaxOn
%. helper1
@@ -441,7 +441,7 @@
\@namedef{jlreq@helper@papersizelist@c2paper}{{458mm}{648mm}}
\@namedef{jlreq@helper@papersizelist@c3paper}{{324mm}{458mm}}
-\@namedef{jlreq@helper@papersizelist@c4paper}{{229mm}{354mm}}
+\@namedef{jlreq@helper@papersizelist@c4paper}{{229mm}{324mm}}
\@namedef{jlreq@helper@papersizelist@c5paper}{{162mm}{229mm}}
\@namedef{jlreq@helper@papersizelist@c6paper}{{114mm}{162mm}}
\@namedef{jlreq@helper@papersizelist@c7paper}{{81mm}{114mm}}
diff --git a/macros/jptex/latex/jlreq/jlreq-ja.pdf b/macros/jptex/latex/jlreq/jlreq-ja.pdf
index 2fa852d4e9..a34ef0753d 100644
--- a/macros/jptex/latex/jlreq/jlreq-ja.pdf
+++ b/macros/jptex/latex/jlreq/jlreq-ja.pdf
Binary files differ
diff --git a/macros/jptex/latex/jlreq/jlreq-trimmarks-ja.md b/macros/jptex/latex/jlreq/jlreq-trimmarks-ja.md
index aace5bbeb3..2e86b26b30 100644
--- a/macros/jptex/latex/jlreq/jlreq-trimmarks-ja.md
+++ b/macros/jptex/latex/jlreq/jlreq-trimmarks-ja.md
@@ -137,6 +137,24 @@ dviドライバの指定です.エンジンに`lualatex`を利用する場合
- `black` -> `\color{black}`
- `[cmyk]0.5,0.5,0.5,0` -> `\color[cmyk]{0.5,0.5,0.5,0}`
+### `trimmarks_pattern`
+トンボの形.直接の描画コードを指定します.次のように`centers`に指定すると,上下左右の真ん中のトンボの形が変わります.指定するのは上の真ん中のトンボの描画コードであり,そのほかの場所にはそれを回転したものが描画されます.なお,指定前に`graphicx`パッケージを読み込んでおく必要があります.また`\jlreqtrimmarkswidth`には
+```latex
+\jlreqtrimmarkssetup{
+ trimmarks_pattern = {
+ centers = {
+ \raisebox{3mm}{
+ \vrule width10mm height\jlreqtrimmarkswidth depth 0pt
+ \vrule height10mm width\jlreqtrimmarkswidth depth 3mm
+ \vrule width10mm height\jlreqtrimmarkswidth depth 0pt
+ }
+ }
+ }
+}
+```
+上下左右の形を個別に指定することもできます.例えば上の真ん中のみ変更するには`top-center=<描画コード>`を指定します.同様に`bottom-center`,`left-center`,`right-center`が指定できます.個別指定には`graphicx`パッケージは不要です.
+
+
## ライセンス
このパッケージは二条項BSDライセンスの元で配布されています.詳しくは[LICENSE](LICENSE)をご覧ください.
@@ -167,6 +185,8 @@ dviドライバの指定です.エンジンに`lualatex`を利用する場合
- `etoolbox`に依存しないようにした.
* 2022-07-13
- 読み込み時にエラーが出るバグ修正.
+* 2022-11-28
+ - `trimmarks_pattern`を`\jlreqtrimmarkssetup`に追加.
--------------
Noriyuki Abe
diff --git a/macros/jptex/latex/jlreq/jlreq-trimmarks.md b/macros/jptex/latex/jlreq/jlreq-trimmarks.md
index 3f4e72e4d3..a196aef39e 100644
--- a/macros/jptex/latex/jlreq/jlreq-trimmarks.md
+++ b/macros/jptex/latex/jlreq/jlreq-trimmarks.md
@@ -131,6 +131,24 @@ Set the color of the trim marks. You have to load a package which defines `\colo
* `black` -> `\color{black}`
* `[cmyk]0.5,0.5,0.5,0` -> `\color[cmyk]{0.5,0.5,0.5,0}`
+### `trimmarks_pattern`
+Set the shape of the trim marks by the code. You can change the shapes of trim marks at the centers of top, bottom, left and right by the following code. Here, the specified code is the code for the top-center trim marks and rotated ones are put at the other places. Here, `graphicx` code should be loaded.
+```latex
+\jlreqtrimmarkssetup{
+ trimmarks_pattern = {
+ centers = {
+ \raisebox{3mm}{
+ \vrule width10mm height\jlreqtrimmarkswidth depth 0pt
+ \vrule height10mm width\jlreqtrimmarkswidth depth 3mm
+ \vrule width10mm height\jlreqtrimmarkswidth depth 0pt
+ }
+ }
+ }
+}
+```
+You can specify shapes for top, bottom, left and right independently. For example, you can change the shape at the top-center by `top-center=<code>`. Similarly one can use `bottom-center`,`left-center`,`right-center`. `graphix` package is not needed for these keys.
+
+
## LICENSE
This package is distributed under the BSD 2-Clause License. See [LICENSE](LICENSE).
@@ -161,6 +179,8 @@ This package is distributed under the BSD 2-Clause License. See [LICENSE](LICENS
- Removed dependence on `etoolbox` package.
* 2022-07-13
- Fixed a bug: an error occurred when loading.
+* 2022-11-28
+ - Added `trimmarks_pattern` to `\jlreqtrimmarkssetup`.
--------------
Noriyuki Abe
diff --git a/macros/jptex/latex/jlreq/jlreq-trimmarks.sty b/macros/jptex/latex/jlreq/jlreq-trimmarks.sty
index b21bdcc453..f2e72aeddc 100644
--- a/macros/jptex/latex/jlreq/jlreq-trimmarks.sty
+++ b/macros/jptex/latex/jlreq/jlreq-trimmarks.sty
@@ -1,7 +1,7 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{jlreq-trimmarks}[2022/07/13 jlreq-trimmarks]
+\ProvidesPackage{jlreq-trimmarks}[2022/11/28 jlreq-trimmarks]
\RequirePackage{l3keys2e}
-\RequirePackage{jlreq-helpers}
+\RequirePackage{jlreq-helpers}[2022/11/28]
\ExplSyntaxOn
% check \tombowdatetrue
@@ -184,9 +184,7 @@
}[\PackageError{jlreq-trimmarks}{Unknown~value~`##1'~in~the~option~`show'}{\@ehc}]
}
}
- }
-}
-\keys_define:nn { jlreq-trimmarks } {
+ },
bleed_margin .code:n = {
\begingroup
\def\jlreq@do{}%
@@ -337,6 +335,33 @@
\jlreq@do
}
+\tl_new:N \g__jlreq_trimmarks_pattern_center_top_tl
+\tl_new:N \g__jlreq_trimmarks_pattern_center_bottom_tl
+\tl_new:N \g__jlreq_trimmarks_pattern_center_left_tl
+\tl_new:N \g__jlreq_trimmarks_pattern_center_right_tl
+\cs_set:Nn \__jlreq_check_rotatebox:n {
+ \@ifundefined{rotatebox}{
+ \PackageError{jlreq-trimmarks}{`\string\rotatebox'~is~needed~to~use~#1,~please~load~the~package~`graphicx'~or~its~variant}{\@ehc}
+ }{}
+}
+\keys_define:nn { jlreq-trimmarks-pattern } {
+ top-center .tl_gset:N = \g__jlreq_trimmarks_pattern_center_top_tl,
+ center-top .tl_gset:N = \g__jlreq_trimmarks_pattern_center_top_tl,
+ bottom-center .tl_gset:N = \g__jlreq_trimmarks_pattern_center_bottom_tl,
+ center-bottom .tl_gset:N = \g__jlreq_trimmarks_pattern_center_bottom_tl,
+ center-left .tl_gset:N = \g__jlreq_trimmarks_pattern_center_left_tl,
+ left-center .tl_gset:N = \g__jlreq_trimmarks_pattern_center_left_tl,
+ center-right .tl_gset:N = \g__jlreq_trimmarks_pattern_center_right_tl,
+ right-center .tl_gset:N = \g__jlreq_trimmarks_pattern_center_right_tl,
+ centers .code:n = {
+ \__jlreq_check_rotatebox:n { trimmarks_pattern/centers }
+ \tl_gset:Nn \g__jlreq_trimmarks_pattern_center_top_tl {#1}
+ \tl_gset:Nn \g__jlreq_trimmarks_pattern_center_left_tl { \rotatebox[origin=cb]{90}{#1} }
+ \tl_gset:Nn \g__jlreq_trimmarks_pattern_center_bottom_tl { \rotatebox[origin=cb]{180}{#1} }
+ \tl_gset:Nn \g__jlreq_trimmarks_pattern_center_right_tl { \rotatebox[origin=cb]{270}{#1} }
+ },
+}
+
\keys_define:nn { jlreqtrimmarkssetup } {
banner .code:n = {
\clist_map_variable:nNn { odd,even } \@tempa {
@@ -437,11 +462,15 @@
}%
}%
}%
- }%
+ },
+ trimmarks_pattern .code:n = {
+ \keys_set:nn { jlreq-trimmarks-pattern } {#1}
+ }
}
\NewDocumentCommand { \jlreqtrimmarkssetup } { +m } {
\keys_set:nn { jlreqtrimmarkssetup } {#1}
}
+\def\jlreqtrimmarkswidth{\@tombowwidth}
\@onlypreamble\jlreqtrimmarkssetup
\@bannertoken{%
\jobname\space(\number\year-\two@digits\month-\two@digits\day
@@ -450,7 +479,27 @@
\jlreqtrimmarkssetup{
banner={\the\@bannertoken},
banner_font={\@bannerfont},
- color={}
+ color={},
+ trimmarks_pattern = {
+ top-center = {
+ \vrule width10mm~height\@tombowwidth depth\z@
+ \vrule height10mm~width\@tombowwidth depth\z@
+ \vrule width10mm~height\@tombowwidth depth\z@
+ },
+ bottom-center = {
+ \vrule width10mm~depth\@tombowwidth height\z@
+ \vrule depth10mm~width\@tombowwidth height\z@
+ \vrule width10mm~depth\@tombowwidth height\z@
+ },
+ center-right = {
+ \vrule height 10mm depth10mm width\@tombowwidth
+ \vrule height.5\@tombowwidth depth.5\@tombowwidth width10mm
+ },
+ center-left = {
+ \vrule width10mm height.5\@tombowwidth depth.5\@tombowwidth
+ \vrule height10mm depth10mm width\@tombowwidth
+ }
+ }
}
\ifx\jlreq@trimmarks@engine\@undefined
@@ -559,7 +608,14 @@
\hfill
\setbox\jlreq@tempboxa=\hbox{% \@TC
\yoko
- \vrule width10mm height\@tombowwidth depth\z@
+ \setbox\jlreq@tempboxb=\hbox{
+ \g__jlreq_trimmarks_pattern_center_top_tl
+ }%
+ \jlreq@tempdima=\wd\jlreq@tempboxb\relax
+ \ht\jlreq@tempboxb=0pt \dp\jlreq@tempboxb=0pt \wd\jlreq@tempboxb=0pt
+ \kern -0.5\jlreq@tempdima\relax
+ \box\jlreq@tempboxb
+ \kern 0.5\jlreq@tempdima\relax
\jlreq@trimmarks@outputbanner{before@top@center}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\hss\jlreq@trimmarks@bannerfont##1\hskip 5mm}%
\ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt
@@ -572,13 +628,11 @@
\ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt
\kern-\jlreq@tempdimb\raise-\jlreq@tempdima\box\jlreq@tempboxa\kern\jlreq@tempdimb
}%
- \vrule height10mm width\@tombowwidth depth\z@
\jlreq@trimmarks@outputbanner{after@top@center}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\hskip 5mm\jlreq@trimmarks@bannerfont##1\hss}%
\ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt
\raise 4pt\box\jlreq@tempboxa
}%
- \vrule width10mm height\@tombowwidth depth\z@
}%
\dp\jlreq@tempboxa=0pt
\box\jlreq@tempboxa
@@ -664,7 +718,7 @@
\hbox to\@@paperwidth{%
\hbox to\z@{% \@CL
\yoko\hss
- \vrule width10mm height.5\@tombowwidth depth.5\@tombowwidth
+ \g__jlreq_trimmarks_pattern_center_left_tl
\jlreq@trimmarks@outputbanner{before@center@left}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\tate\hss\adjustbaseline\jlreq@trimmarks@bannerfont##1\hskip 5mm}%
\ifx l\jlreq@trimmarks@engine
@@ -685,7 +739,6 @@
\dp\jlreq@tempboxa=0pt \ht\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt
\kern-\jlreq@tempdima\box\jlreq@tempboxa\kern\jlreq@tempdima
}%
- \vrule height10mm depth10mm width\@tombowwidth
\jlreq@trimmarks@outputbanner{in@center@left}{%
\setbox\jlreq@tempboxa=\hbox{\tate\adjustbaseline\jlreq@trimmarks@bannerfont##1}%
\ifx l\jlreq@trimmarks@engine
@@ -714,7 +767,6 @@
\dp\jlreq@tempboxa=0pt \ht\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt
\kern-\jlreq@tempdima\raise\jlreq@tempdimb\box\jlreq@tempboxa\kern\jlreq@tempdima
}%
- \vrule height10mm depth10mm width\@tombowwidth
\jlreq@trimmarks@outputbanner{before@center@right}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\tate\hss\adjustbaseline\jlreq@trimmarks@bannerfont##1\hskip 5mm}%
\jlreq@tempdima=\dimexpr 4pt \ifx l\jlreq@trimmarks@engine + \dp\jlreq@tempboxa\fi\relax
@@ -727,7 +779,8 @@
\dp\jlreq@tempboxa=0pt \ht\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt
\kern\jlreq@tempdima\box\jlreq@tempboxa\kern-\jlreq@tempdima
}%
- \vrule height.5\@tombowwidth depth.5\@tombowwidth width10mm\hss
+ \g__jlreq_trimmarks_pattern_center_right_tl
+ \hss
}%
}%
\vfill
@@ -811,9 +864,17 @@
\ht\jlreq@tempboxa=0pt
\box\jlreq@tempboxa
\hfill
+ \jlreq@tempafalse
\setbox\jlreq@tempboxa=\hbox{% \@BC
\yoko
- \vrule width10mm depth\@tombowwidth height\z@
+ \setbox\jlreq@tempboxb=\hbox{
+ \g__jlreq_trimmarks_pattern_center_bottom_tl
+ }%
+ \jlreq@tempdimb=\wd\jlreq@tempboxb
+ \ht\jlreq@tempboxb=0pt \dp\jlreq@tempboxb=0pt \wd\jlreq@tempboxb=0pt
+ \kern-0.5\jlreq@tempdimb
+ \box\jlreq@tempboxb
+ \kern 0.5\jlreq@tempdimb
\jlreq@trimmarks@outputbanner{before@bottom@center}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\hss\jlreq@trimmarks@bannerfont##1\hskip 5mm}%
\jlreq@tempdima=\dimexpr\ht\jlreq@tempboxa + 4pt\relax
@@ -827,14 +888,12 @@
\ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt
\kern-\jlreq@tempdimb\raise\jlreq@tempdima\box\jlreq@tempboxa\kern\jlreq@tempdimb
}%
- \vrule depth10mm width\@tombowwidth height\z@
\jlreq@trimmarks@outputbanner{before@bottom@center}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\hskip 5mm\jlreq@trimmarks@bannerfont##1\hss}%
\jlreq@tempdima=\dimexpr\ht\jlreq@tempboxa + 4pt\relax
\ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt
\raise-\jlreq@tempdima\box\jlreq@tempboxa
}%
- \vrule width10mm depth\@tombowwidth height\z@
}%
\ht\jlreq@tempboxa=0pt
\box\jlreq@tempboxa
diff --git a/macros/jptex/latex/jlreq/jlreq.cls b/macros/jptex/latex/jlreq/jlreq.cls
index 8615e3bf30..d6ce3e2eb0 100644
--- a/macros/jptex/latex/jlreq/jlreq.cls
+++ b/macros/jptex/latex/jlreq/jlreq.cls
@@ -5,10 +5,10 @@
%%
% (based on JLReq 20200811 https://www.w3.org/TR/2020/NOTE-jlreq-20200811/)
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{jlreq}[2022/07/13 jlreq]
+\ProvidesClass{jlreq}[2022/11/28 jlreq]
\RequirePackage{l3keys2e}
\RequirePackage{etoolbox}
-\RequirePackage{jlreq-helpers}[2021/08/12]
+\RequirePackage{jlreq-helpers}[2022/11/28]
\ExplSyntaxOn
\int_new:N \l__jlreq_tmpa_int
@@ -1669,19 +1669,19 @@
%. 見出し関係 (4.1)
% \clear***page
-\NewDocumentCommand{\cleartooddpage}{ O{} }{
+\newcommand{\jlreq@cleartooddpage}[1][]{
\clearpage
\ifodd\c@page\else
- \jlreq@ifempty{#1}{}{\thispagestyle{#1}}%
+ \tl_if_empty:nF {#1} { \thispagestyle{#1} }%
\hbox{}%
\newpage
\if@twocolumn\hbox{}\newpage\fi
\fi
}
-\NewDocumentCommand{\cleartoevenpage}{ O{} }{
+\newcommand{\jlreq@cleartoevenpage}[1][]{
\clearpage
\ifodd\c@page
- \jlreq@ifempty{#1}{}{\thispagestyle{#1}}%
+ \tl_if_empty:nF {#1} { \thispagestyle{#1} }%
\hbox{}%
\newpage
\if@twocolumn\hbox{}\newpage\fi
@@ -1826,7 +1826,7 @@
}%
\noexpand\def\exp_not:c {jlreq@headingcs@#1}{%
% 改丁.これでよいのかな.
- \unexpanded{\if@twocolumn\onecolumn\@restonecoltrue\else\@restonecolfalse\fi\cleartooddpage[empty]}%
+ \unexpanded{\if@twocolumn\onecolumn\@restonecoltrue\else\@restonecolfalse\fi\jlreq@cleartooddpage[empty]}%
\ifx\jlreq@pagestyle\@empty\else\noexpand\thispagestyle{\exp_not:o {\jlreq@pagestyle}}\fi
\noexpand\secdef{\exp_not:c {jlreq@TobiraHeading@start@#1}}{\exp_not:c {jlreq@TobiraHeading@start@s@#1}}}%
\noexpand\def\exp_not:c {#1}{%
@@ -1886,20 +1886,27 @@
% {1 = 命令}{2 = レベル}{3 = スペース関連}{4 = 全フォーマット}{5 = *}{6 = running head}{7 = 見出し}{8 = 副題}
\long\def\jlreq@BlockHeading@start@@@@#1#2#3#4#5#6#7#8{%
+ \global\advance\jlreq@BlockHeading@spaces@current@count by 1
+ \tl_gput_right:Nn \jlreq@BlockHeading@spaces@current@sequence {_#1}%
\edef\jlreq@tempa##1##2##3##4##5##6##7{%
\unexpanded{\jlreq@BlockHeading@start@makeoutput{#1}{#2}}{{##1}{##2}{##3}}{\exp_not:o {\jlreq@BlockHeading@start@eachformat}}{\exp_not:o {\jlreq@BlockHeading@start@format}}\unexpanded{{#5}{#6}{#7}{#8}}%
\unexpanded{\def\jlreq@tempb}{{##4}{##5}{##6}}% 縦方向空き
\noexpand\jlreq@ifempty{##7}{\noexpand\jlreq@tempatrue}{\noexpand\jlreq@tempafalse}% 偶数ページのみで改ページするならば\jlreq@tempatrue
}%
\jlreq@tempa#3%
- \global\advance\jlreq@BlockHeading@spaces@current@count by 1
- \tl_gput_right:Nn \jlreq@BlockHeading@spaces@current@sequence {_#1}%
+ \expandafter\xdef\csname jlreq@BlockHeading@spaces@current@afteroutsidebox@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
+ \exp_not:o { \jlreq@resultc }
+ }%
% 連続する見出しの間の処理をするために,即時では出力せず,いったんマクロに格納する.
+ % \jlreq@BlockHeading@spaces@current@beforeoutsideiffirst@<n>
% \jlreq@BlockHeading@spaces@current@before@<n>
% \jlreq@BlockHeading@start@gyodori\jlreq@BlockHeading@spaces@current@space@<n>{jlreq@BlockHeading@spaces@current@output@<n>}
% ↑\jlreq@BlockHeading@spaces@current@format@<n>で整形される.
% \jlreq@BlockHeading@spaces@current@after@<n>
+ % \jlreq@BlockHeading@spaces@current@afteroutsidebox@<n>
+ % \jlreq@BlockHeading@spaces@current@afteroutsideiflast@<n>
% として後に呼び出される.(spaceは書き換えられる可能性がある.)
+ % outsideとついているものは全体が行取りされた場合はその外に出される.
\expandafter\xdef\csname jlreq@BlockHeading@spaces@current@output@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
\exp_not:o {\jlreq@resultb}%
}%
@@ -1907,28 +1914,31 @@
\exp_not:o {\jlreq@tempb}%
}%
\long\def\@tempa##1##2##3{##1}%
- \expandafter\xdef\csname jlreq@BlockHeading@spaces@current@before@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
+ \expandafter\xdef\csname jlreq@BlockHeading@spaces@current@beforeoutsideiffirst@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
\exp_not:o {\@tempa#4}%
- \exp_not:o {\jlreq@resulta}%
\ifjlreq@tempa\unexpanded{%
\jlreq@setcurrentpage
\edef\jlreq@BlockHeading@currentpage{\the\jlreq@currentpage}%
}\fi
}%
+ \expandafter\xdef\csname jlreq@BlockHeading@spaces@current@before@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
+ \exp_not:o {\jlreq@resulta}%
+ }%
\long\def\@tempa##1##2##3{##2}%
\expandafter\xdef\csname jlreq@BlockHeading@spaces@current@format@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
\exp_not:o {\@tempa#4}%
}%
\long\def\@tempa##1##2##3{##3}%
- \expandafter\xdef\csname jlreq@BlockHeading@spaces@current@after@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
- \exp_not:o {\jlreq@resultc}%
+ \expandafter\gdef\csname jlreq@BlockHeading@spaces@current@after@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
+ }%
+ \expandafter\xdef\csname jlreq@BlockHeading@spaces@current@afteroutsideiflast@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
\ifjlreq@tempa\unexpanded{%
\ifx\jlreq@BlockHeading@currentpage\@empty\nobreak\else
\ifodd\jlreq@BlockHeading@currentpage\nobreak\else\allowbreak\fi
\fi
}\else\noexpand\nobreak\fi
\exp_not:o {\@tempa#4}%
- }%
+ }
\ifx\jlreq@BlockHeading@spaces@headingslist\@empty
\expandafter\jlreq@BlockHeading@spaces@outputwospace
\expandafter\ignorespaces
@@ -2362,8 +2372,8 @@
pagebreak / clearpage .code:n = {\def\jlreq@pagebreak{\clearpage}\jlreq@column@spanning@possibletrue},
pagebreak / cleardoublepage .code:n = {\def\jlreq@pagebreak{\cleardoublepage}\jlreq@column@spanning@possibletrue},
pagebreak / clearcolumn .code:n = {\if@twocolumn\def\jlreq@pagebreak{\newpage}\else\def\jlreq@pagebreak{}\fi\jlreq@column@spanning@possiblefalse},
- pagebreak / begin_with_even_page .code:n = {\def\jlreq@pagebreak{\cleartoevenpage[empty]}\jlreq@column@spanning@possibletrue},
- pagebreak / begin_with_odd_page .code:n = {\def\jlreq@pagebreak{\cleartooddpage[empty]}\jlreq@column@spanning@possibletrue},
+ pagebreak / begin_with_even_page .code:n = {\def\jlreq@pagebreak{\jlreq@cleartoevenpage[empty]}\jlreq@column@spanning@possibletrue},
+ pagebreak / begin_with_odd_page .code:n = {\def\jlreq@pagebreak{\jlreq@cleartooddpage[empty]}\jlreq@column@spanning@possibletrue},
pagebreak / nariyuki .code:n = {\def\jlreq@pagebreak{}\jlreq@column@spanning@possiblefalse},
pagestyle .tl_set:N = \l__jlreq_pagestyle_tl,
% 後々数字を受け付けるようになったりするかもしれないので……
@@ -2558,7 +2568,7 @@
% それ以外:空き量
% 最初や最後に空き量指定がある場合は,全体への指定に組み込むことにする.
%
-% 現在状況保存に以下のマクロを使う
+% 現在状況保存に以下のマクロを使う,nは1から始まる.
% \jlreq@BlockHeading@spaces@current@sequence
% : 現在どのような見出しが続いているかリスト.
% \jlreq@BlockHeading@spaces@current@space@<n>
@@ -2569,8 +2579,14 @@
% : 現在処理中のn番目の見出しのフォーマット.行取りマクロを包み込むようにする.
% \jlreq@BlockHeading@spaces@current@before@<n>
% : n番目の見出しの前に出すもの
+% \jlreq@BlockHeading@spaces@current@beforeoutsideiffirst@<n>
+% : n番目の見出しの前に出すもの.現在処理中の最初の見出しの時はボックスの前に出す.
% \jlreq@BlockHeading@spaces@current@after@<n>
% : n番目の見出しの後ろに出すもの
+% \jlreq@BlockHeading@spaces@current@afteroutsideiflast@<n>
+% : n番目の見出しの前に出すもの.現在処理中の最後の見出しの時はボックスのあとに出す.
+% \jlreq@BlockHeading@spaces@current@afteroutsidebox@<n>
+% : n番目の見出しの後ろに出すが,ボックスの外に出すもの(\markなどが想定)
% \jlreq@BlockHeading@spaces@current@count
% : 現在いくつの連続する見出しを処理しているかのカウンター
\newcount\jlreq@BlockHeading@spaces@current@count
@@ -2739,7 +2755,10 @@
\def\jlreq@BlockHeading@spaces@outputwospace@{%
\ifnum\jlreq@tempcnta<\jlreq@BlockHeading@spaces@current@count
\advance\jlreq@tempcnta by 1
- \tl_put_right:Nx \jlreq@do {\exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@before@\the\jlreq@tempcnta}}%
+ \tl_put_right:Nx \jlreq@do {
+ \exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@beforeoutsideiffirst@\the\jlreq@tempcnta}
+ \exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@before@\the\jlreq@tempcnta}
+ }%
\edef\jlreq@tempa{%
\unexpanded{\long\def\jlreq@tempa##1}{\exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@format@\the\jlreq@tempcnta}}%
}%
@@ -2751,7 +2770,12 @@
{\exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@output@\the\jlreq@tempcnta}}%
}}%
}%
- \tl_put_right:Nx \jlreq@do {\jlreq@tempb\exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@after@\the\jlreq@tempcnta}}%
+ \tl_put_right:Nx \jlreq@do {
+ \jlreq@tempb
+ \exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@afteroutsidebox@\the\jlreq@tempcnta}%
+ \exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@after@\the\jlreq@tempcnta}%
+ \exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@afteroutsideiflast@\the\jlreq@tempcnta}%
+ }%
\expandafter\jlreq@BlockHeading@spaces@outputwospace@
\fi
}
@@ -2759,45 +2783,61 @@
\def\jlreq@BlockHeading@spaces@output@#1#2\jlreq@endmark{%
\def\jlreq@result{}%
\jlreq@tempcnta=0
- \jlreq@BlockHeading@spaces@output@@#2\jlreq@endmark
\jlreq@tempatrue % 周りの行取り処理が必要か
\tl_if_empty:nT {#1} {\jlreq@tempafalse}%
\tl_if_eq:nnT {#1} {{}{}{}} { \jlreq@tempafalse }
- \edef\jlreq@do{%
- \ifjlreq@tempa
- \unexpanded{\jlreq@BlockHeading@start@gyodori#1}{%
- \exp_not:o {\jlreq@result}%
- }%
- \else
- \exp_not:o {\jlreq@result}%
- \fi
- }%
+ \legacy_if:nTF { jlreq@tempa } {
+ \jlreq@BlockHeading@spaces@output@@{*}#2\jlreq@endmark
+ \tl_set:Nx \l__jlreq_do_tl {
+ \exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@beforeoutsideiffirst@1}
+ \exp_not:n { \jlreq@BlockHeading@start@gyodori#1 } {
+ \exp_not:o { \jlreq@result }
+ }
+ }
+ \int_step_inline:nnn { 1 } { \jlreq@BlockHeading@spaces@current@count } {
+ \tl_put_right:Nx \l__jlreq_do_tl {
+ \exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@afteroutsidebox@##1}
+ }
+ }
+ \tl_put_right:Nx \l__jlreq_do_tl {
+ \exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@afteroutsideiflast@\the\jlreq@BlockHeading@spaces@current@count}
+ }
+ }{
+ \jlreq@BlockHeading@spaces@output@@{}#2\jlreq@endmark
+ \tl_set:Nx \l__jlreq_do_tl { \exp_not:o { \jlreq@result } }
+ }
\jlreq@BlockHeading@spaces@clear
- \jlreq@do
+% \message{[[output~headings]]}
+% \message{\exp_not:o \l__jlreq_do_tl}
+ \l__jlreq_do_tl
}
% jlreq@resultに出力すべきものを入れていく
-\def\jlreq@BlockHeading@spaces@output@@#1{%
- \jlreq@ifendmark{#1}{}{%
- \str_if_eq:eeTF {\str_head:n {#1}} {_} {
+% #1: 全体の行取り処理をする場合は*
+\def\jlreq@BlockHeading@spaces@output@@#1#2{%
+ \jlreq@ifendmark{#2}{}{%
+ \str_if_eq:eeTF {\str_head:n {#2}} {_} {
\advance\jlreq@tempcnta by 1
- \expandafter\jlreq@BlockHeading@spaces@output@@@\expandafter{\@gobble #1}%
+ \tl_set:Nx \l__jlreq_tmpa_tl {
+ \exp_not:N \jlreq@BlockHeading@spaces@output@@@ {#1} { \exp_not:o { \@gobble #2 } }
+ }
+ \l__jlreq_tmpa_tl
}{%
- \tl_put_right:Nn \jlreq@result {\vskip\glueexpr #1\relax}%
+ \tl_put_right:Nn \jlreq@result {\vskip\glueexpr #2\relax}%
}%
- \jlreq@BlockHeading@spaces@output@@
+ \jlreq@BlockHeading@spaces@output@@{#1}
}%
}
-\def\jlreq@BlockHeading@spaces@output@@@#1{%
+\def\jlreq@BlockHeading@spaces@output@@@#1#2{%
\edef\jlreq@do{%
- \noexpand\jlreq@BlockHeading@spaces@output@@@@
- \jlreq@iffirsttoken@ignorespaces{#1}{*}{{*}\exp_not:o {\@gobble #1}}{\unexpanded{{}#1}}%
+ \noexpand\jlreq@BlockHeading@spaces@output@@@@{#1}
+ \jlreq@iffirsttoken@ignorespaces{#2}{*}{{*}\exp_not:o {\@gobble #2}}{\unexpanded{{}#2}}%
\exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@space@\the\jlreq@tempcnta}%
{\exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@output@\the\jlreq@tempcnta}}%
}%
\jlreq@do
}
-% #1: デフォルト値を使うならば*,#2#3#4が設定された値,#5#6#7がデフォルト値,#8は偶数ページの,#9が出力
-\def\jlreq@BlockHeading@spaces@output@@@@#1#2#3#4#5#6#7#8{%
+% #2: デフォルト値を使うならば*,#3#4#5が設定された値,#6#7#8がデフォルト値,#9は偶数ページの
+\def\jlreq@BlockHeading@spaces@output@@@@#1#2#3#4#5#6#7#8#9{%
\edef\jlreq@tempa{%
\unexpanded{\long\def\jlreq@tempa##1}{\exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@format@\the\jlreq@tempcnta}}%
}%
@@ -2805,17 +2845,26 @@
\edef\jlreq@tempb{%
\noexpand\exp_not:o {\noexpand\jlreq@tempa{%
\noexpand\jlreq@BlockHeading@start@gyodori
- \jlreq@ifempty{#1}{\unexpanded{{#2}{#3}{#4}}}{%
- {\jlreq@ifempty{#2}{\unexpanded{#5}}{\unexpanded{#2}}}%
+ \jlreq@ifempty{#2}{\unexpanded{{#3}{#4}{#5}}}{%
{\jlreq@ifempty{#3}{\unexpanded{#6}}{\unexpanded{#3}}}%
{\jlreq@ifempty{#4}{\unexpanded{#7}}{\unexpanded{#4}}}%
- }\unexpanded{{#8}}%
+ {\jlreq@ifempty{#5}{\unexpanded{#8}}{\unexpanded{#5}}}%
+ }\unexpanded{{#9}}%
}}%
}%
\tl_put_right:Nx \jlreq@result {%
+ \bool_if:nT { \tl_if_empty_p:n {#1} || \int_compare_p:n { \jlreq@tempcnta > 0 } } {
+ \exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@beforeoutsideiffirst@\the\jlreq@tempcnta}%
+ }
\exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@before@\the\jlreq@tempcnta}%
\jlreq@tempb
+ \tl_if_empty:nT { #1 } {
+ \exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@afteroutsidebox@\the\jlreq@tempcnta}%
+ }
\exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@after@\the\jlreq@tempcnta}%
+ \bool_if:nT { \tl_if_empty_p:n {#1} || \int_compare_p:n { \jlreq@tempcnta < \jlreq@BlockHeading@spaces@current@count } } {
+ \exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@afteroutsideiflast@\the\jlreq@tempcnta}%
+ }
}%
}
@@ -2828,7 +2877,10 @@
\expandafter\global\expandafter\let\csname jlreq@BlockHeading@spaces@current@space@\the\jlreq@tempcnta\endcsname=\@undefined
\expandafter\global\expandafter\let\csname jlreq@BlockHeading@spaces@current@output@\the\jlreq@tempcnta\endcsname=\@undefined
\expandafter\global\expandafter\let\csname jlreq@BlockHeading@spaces@current@before@\the\jlreq@tempcnta\endcsname=\@undefined
+ \expandafter\global\expandafter\let\csname jlreq@BlockHeading@spaces@current@beforeoutsideiffirst@\the\jlreq@tempcnta\endcsname=\@undefined
\expandafter\global\expandafter\let\csname jlreq@BlockHeading@spaces@current@after@\the\jlreq@tempcnta\endcsname=\@undefined
+ \expandafter\global\expandafter\let\csname jlreq@BlockHeading@spaces@current@afteroutsideiflast@\the\jlreq@tempcnta\endcsname=\@undefined
+ \expandafter\global\expandafter\let\csname jlreq@BlockHeading@spaces@current@afteroutsidebox@\the\jlreq@tempcnta\endcsname=\@undefined
}%
\gdef\jlreq@BlockHeading@spaces@current@sequence{}%
\global\jlreq@BlockHeading@spaces@current@count=0
@@ -5069,7 +5121,8 @@
\vskip\abovecaptionskip
\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@jlreqsetup@withenv@nameuse{jlreq@@makecaption@label@font@setting}{\jlreq@tempb}#1}%
+ % 最後の\relaxはhttps://github.com/abenori/jlreq/issues/112のため.
+ \setbox\jlreq@tempboxa=\hbox{\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@label@font@setting}{\jlreq@tempb}#1\relax}%
\ifdim\wd\jlreq@tempboxa=0pt
\edef\jlreq@tempa{{\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@font@setting}{\jlreq@tempb}\unexpanded{#2}}}%
\else
@@ -6537,7 +6590,7 @@
\ifx p\jlreq@engine platex\fi
\ifx u\jlreq@engine uplatex\fi
,setupname=jlreqsetup
- ]{jlreq-complements}[2022-07-13]
+ ]{jlreq-complements}[2022/11/28]
}
\l__jlreq_tmpa_tl
\jlreqsetup{
diff --git a/macros/jptex/latex/jlreq/jlreq.pdf b/macros/jptex/latex/jlreq/jlreq.pdf
index 495dd58d85..7bc6b4dc1a 100644
--- a/macros/jptex/latex/jlreq/jlreq.pdf
+++ b/macros/jptex/latex/jlreq/jlreq.pdf
Binary files differ
diff --git a/macros/jptex/latex/jlreq/luajfm2pl.lua b/macros/jptex/latex/jlreq/luajfm2pl.lua
index 5aceea506d..bccba0cb3d 100644
--- a/macros/jptex/latex/jlreq/luajfm2pl.lua
+++ b/macros/jptex/latex/jlreq/luajfm2pl.lua
@@ -1,6 +1,6 @@
kpse.set_program_name("texlua","lualatex")
-no_jis_chars = {'⦅','〘','〖','«','〝','⦆','〙','〗','»','〟','‼','⁇','⁈','⁉','〳','〴','〵','〻','ゕ','ゖ','ㇰ','ㇱ','ㇲ','ㇳ','ㇴ','ㇵ','ㇶ','ㇷ','ㇸ','ㇹ','ㇺ','ㇻ','ㇼ','ㇽ','ㇾ','ㇿ','ㇷ゚','€','№','㏋','ℓ','㌃','㌍','㌔','㌘','㌢','㌣','㌦','㌧','㌫','㌶','㌻','㍉','㍊','㍍','㍑','㍗','㎎','㎏','㎜','㎝','㎞','㎡','㏄','ゔ','か゚','き゚','く゚','け゚','こ゚','ヷ','ヸ','ヹ','ヺ','カ゚','キ゚','ク゚','ケ゚','コ゚','セ゚','ツ゚','ト゚','゠','–'}
+no_jis_chars = {'⦅','〘','〖','«','〝','⦆','〙','〗','»','〟','‼','⁇','⁈','⁉','〳','〴','〵','〻','ゕ','ゖ','ㇰ','ㇱ','ㇲ','ㇳ','ㇴ','ㇵ','ㇶ','ㇷ','ㇸ','ㇹ','ㇺ','ㇻ','ㇼ','ㇽ','ㇾ','ㇿ','ㇷ゚','€','№','㏋','ℓ','㌃','㌍','㌔','㌘','㌢','㌣','㌦','㌧','㌫','㌶','㌻','㍉','㍊','㍍','㍑','㍗','㎎','㎏','㎜','㎝','㎞','㎡','㏄','ゔ','か゚','き゚','く゚','け゚','こ゚','ヷ','ヸ','ヹ','ヺ','カ゚','キ゚','ク゚','ケ゚','コ゚','セ゚','ツ゚','ト゚','゠','–','ヲ', 'ァ', 'ィ', 'ゥ', 'ェ', 'ォ', 'ャ', 'ュ', 'ョ', 'ッ', 'ー', 'ア', 'イ', 'ウ', 'エ', 'オ', 'カ', 'キ', 'ク', 'ケ', 'コ', 'サ', 'シ', 'ス', 'セ', 'ソ', 'タ', 'チ', 'ツ', 'テ', 'ト', 'ナ', 'ニ', 'ヌ', 'ネ', 'ノ', 'ハ', 'ヒ', 'フ', 'ヘ', 'ホ', 'マ', 'ミ', 'ム', 'メ', 'モ', 'ヤ', 'ユ', 'ヨ', 'ラ', 'リ', 'ル', 'レ', 'ロ', 'ワ', 'ン'}
if arg[1] == nil then
print('Usage: texlua luajfm2pl.lua [--noutf] <JFM for LuaTeX-ja> [<PL file name>]')