summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-08-12 20:31:59 +0000
committerKarl Berry <karl@freefriends.org>2021-08-12 20:31:59 +0000
commit59fa4ec52a1e8198a1f37981f185210f687651c7 (patch)
tree2d50423d6fbd919743600801969359f14b28c06f /Master
parentd29c6a0416a9e70513f591f0a74b75130a76beec (diff)
jlreq (12aug21)
git-svn-id: svn://tug.org/texlive/trunk@60225 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/jlreq/README-ja.md5
-rw-r--r--Master/texmf-dist/doc/latex/jlreq/README.md3
-rw-r--r--Master/texmf-dist/doc/latex/jlreq/jlreq-ja.html7
-rw-r--r--Master/texmf-dist/doc/latex/jlreq/jlreq-ja.pdfbin368170 -> 368625 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks-ja.html4
-rw-r--r--Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks-ja.md2
-rw-r--r--Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.html8
-rw-r--r--Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.md4
-rw-r--r--Master/texmf-dist/doc/latex/jlreq/jlreq.html3
-rw-r--r--Master/texmf-dist/doc/latex/jlreq/jlreq.pdfbin118627 -> 118695 bytes
-rw-r--r--Master/texmf-dist/tex/latex/jlreq/jlreq-helpers.sty131
-rw-r--r--Master/texmf-dist/tex/latex/jlreq/jlreq-trimmarks.sty180
-rw-r--r--Master/texmf-dist/tex/latex/jlreq/jlreq.cls1119
13 files changed, 722 insertions, 744 deletions
diff --git a/Master/texmf-dist/doc/latex/jlreq/README-ja.md b/Master/texmf-dist/doc/latex/jlreq/README-ja.md
index 8f61b2462f7..2cbb6e075a4 100644
--- a/Master/texmf-dist/doc/latex/jlreq/README-ja.md
+++ b/Master/texmf-dist/doc/latex/jlreq/README-ja.md
@@ -19,7 +19,7 @@
## 動作環境
pLaTeX / upLaTeX / LuaLaTeX上で動きます.以下のパッケージを内部で読み込みます.
-* (常時):l3keys2e,etoolbox,lmodern
+* (常時):l3keys2e,lmodern
* (LuaLaTeX非利用時):everyhook
* (LuaLaTeX利用時):luatexja,luatexja-adjust
@@ -518,6 +518,9 @@ JFMの名前は次の通りです.`[]`で囲まれている文字は設定に
- バグ修正
* 2021-07-30
- バグ修正
+* 2021-08-12
+ - `etoolbox`への直接の依存をなくした.
+ - バグ修正
--------------
diff --git a/Master/texmf-dist/doc/latex/jlreq/README.md b/Master/texmf-dist/doc/latex/jlreq/README.md
index 8e7f1493661..4f968b938aa 100644
--- a/Master/texmf-dist/doc/latex/jlreq/README.md
+++ b/Master/texmf-dist/doc/latex/jlreq/README.md
@@ -152,7 +152,8 @@ This package is distributed under the BSD 2-Clause License. See [LICENSE](LICENS
* 2021-07-25
- Load `ifthen` again. (Only for Re:VIEW, will be removed in future.)
- Fixed bugs.
-* 2021-07-30
+* 2021-08-12
+ - Removed the direct dependence on `etoolbox` package.
- Fixed a bug.
diff --git a/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.html b/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.html
index 0f0131f2043..863e618f8d2 100644
--- a/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.html
+++ b/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.html
@@ -103,7 +103,7 @@
<h2 id="動作環境">動作環境</h2>
<p>pLaTeX / upLaTeX / LuaLaTeX上で動きます.以下のパッケージを内部で読み込みます.</p>
<ul>
-<li>(常時):l3keys2e,etoolbox,lmodern</li>
+<li>(常時):l3keys2e,lmodern</li>
<li>(LuaLaTeX非利用時):everyhook</li>
<li>(LuaLaTeX利用時):luatexja,luatexja-adjust</li>
</ul>
@@ -624,6 +624,11 @@
<ul>
<li>バグ修正</li>
</ul></li>
+<li>2021-08-12
+<ul>
+<li><code>etoolbox</code>への直接の依存をなくした.</li>
+<li>バグ修正</li>
+</ul></li>
</ul>
<hr />
<p>Noriyuki Abe <a href="https://github.com/abenori/jlreq">https://github.com/abenori/jlreq</a></p>
diff --git a/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.pdf b/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.pdf
index b7ac6f3445e..ed11b073a84 100644
--- a/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.pdf
+++ b/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.pdf
Binary files differ
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 9615aa89561..70ff17e8b9e 100644
--- a/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks-ja.html
+++ b/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks-ja.html
@@ -240,6 +240,10 @@
<ul>
<li>expl3コードとの親和性を高めた.</li>
</ul></li>
+<li>2021-08-12
+<ul>
+<li><code>etoolbox</code>に依存しないようにした.</li>
+</ul></li>
</ul>
<hr />
<p>Noriyuki Abe <a href="https://github.com/abenori/jlreq">https://github.com/abenori/jlreq</a></p>
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 d318c274204..6c93a850aac 100644
--- a/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks-ja.md
+++ b/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks-ja.md
@@ -163,6 +163,8 @@ dviドライバの指定です.エンジンに`lualatex`を利用する場合
- `\jlreqtrimmarkssetup`の`banner_font`が指定された場合,`\@bannerfont`を無視するようにした.
* 2021-07-22
- expl3コードとの親和性を高めた.
+* 2021-08-12
+ - `etoolbox`に依存しないようにした.
--------------
diff --git a/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.html b/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.html
index bd78395b341..9d13ec91a64 100644
--- a/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.html
+++ b/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.html
@@ -223,20 +223,20 @@
<li>Extended <code>banner</code> in <code>\jlreqtrimmarkssetup</code>.</li>
<li>Extended <code>bleed_margin</code>.</li>
</ul></li>
-</ul>
-<ul>
<li>2020-05-01
<ul>
<li><code>jlreq-trimmarks</code> outputs the contents in <code>\@bannertoken</code> when <code>banner</code> in <code>\jlreqtrimmarkssetup</code> is not used.</li>
<li><code>\@bannertoken</code> is ignored when <code>banner</code> in <code>\jlreqtrimmarkssetup</code> is used.</li>
<li><code>\@bannerfont</code> is ignored when <code>banner_font</code> in <code>\jlreqtrimmarkssetup</code> is used.</li>
</ul></li>
-</ul>
-<ul>
<li>2021-07-22
<ul>
<li>It has more compatibility with expl3.</li>
</ul></li>
+<li>2021-08-12
+<ul>
+<li>Removed dependence on <code>etoolbox</code> package.</li>
+</ul></li>
</ul>
<hr />
<p>Noriyuki Abe <a href="https://github.com/abenori/jlreq">https://github.com/abenori/jlreq</a></p>
diff --git a/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.md b/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.md
index c13c5c051f9..8f69b39b571 100644
--- a/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.md
+++ b/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.md
@@ -151,12 +151,14 @@ This package is distributed under the BSD 2-Clause License. See [LICENSE](LICENS
* 2019-04-01
- Extended `banner` in `\jlreqtrimmarkssetup`.
- Extended `bleed_margin`.
-- 2020-05-01
+* 2020-05-01
- `jlreq-trimmarks` outputs the contents in `\@bannertoken` when `banner` in `\jlreqtrimmarkssetup` is not used.
- `\@bannertoken` is ignored when `banner` in `\jlreqtrimmarkssetup` is used.
- `\@bannerfont` is ignored when `banner_font` in `\jlreqtrimmarkssetup` is used.
* 2021-07-22
- It has more compatibility with expl3.
+* 2021-08-12
+ - Removed dependence on `etoolbox` package.
--------------
diff --git a/Master/texmf-dist/doc/latex/jlreq/jlreq.html b/Master/texmf-dist/doc/latex/jlreq/jlreq.html
index 13468750556..889711e1f85 100644
--- a/Master/texmf-dist/doc/latex/jlreq/jlreq.html
+++ b/Master/texmf-dist/doc/latex/jlreq/jlreq.html
@@ -270,8 +270,9 @@
<li>Load <code>ifthen</code> again. (Only for Re:VIEW, will be removed in future.)</li>
<li>Fixed bugs.</li>
</ul></li>
-<li>2021-07-30
+<li>2021-08-12
<ul>
+<li>Removed the direct dependence on <code>etoolbox</code> package.</li>
<li>Fixed a bug.</li>
</ul></li>
</ul>
diff --git a/Master/texmf-dist/doc/latex/jlreq/jlreq.pdf b/Master/texmf-dist/doc/latex/jlreq/jlreq.pdf
index 75605aa0167..6e237a35680 100644
--- a/Master/texmf-dist/doc/latex/jlreq/jlreq.pdf
+++ b/Master/texmf-dist/doc/latex/jlreq/jlreq.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/jlreq/jlreq-helpers.sty b/Master/texmf-dist/tex/latex/jlreq/jlreq-helpers.sty
index 5d6ae8791cf..ee11f2e4ff0 100644
--- a/Master/texmf-dist/tex/latex/jlreq/jlreq-helpers.sty
+++ b/Master/texmf-dist/tex/latex/jlreq/jlreq-helpers.sty
@@ -1,9 +1,9 @@
% エンジン非依存のマクロ集
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{jlreq-helpers}[2021/07/22 jlreq-helpers]
-\RequirePackage{etoolbox}
+\ProvidesPackage{jlreq-helpers}[2021/08/12 jlreq-helpers]
+\ExplSyntaxOn
%. helper1
\newcount\jlreq@tempcnta
\newcount\jlreq@tempcntb
@@ -32,9 +32,9 @@
\long\def\jlreq@deleteuntileendmark#1\jlreq@endmark{}
\def\jlreq@expandafter@ii{\expandafter\expandafter\expandafter}
-\edef\jlreq@expandafter@iii{\expandonce{\jlreq@expandafter@ii}\noexpand\expandafter\expandonce{\jlreq@expandafter@ii}}
-\edef\jlreq@expandtwice#1{\expandonce{\jlreq@expandafter@ii}\noexpand\unexpanded\expandonce{\jlreq@expandafter@ii}{#1}}
-\edef\jlreq@expand@three#1{\expandonce{\jlreq@expandafter@iii}\noexpand\unexpanded\expandonce{\jlreq@expandafter@iii}{#1}}
+\edef\jlreq@expandafter@iii{\exp_not:o {\jlreq@expandafter@ii}\noexpand\expandafter\exp_not:o {\jlreq@expandafter@ii}}
+\edef\jlreq@expandtwice#1{\exp_not:o {\jlreq@expandafter@ii}\noexpand\unexpanded\exp_not:o {\jlreq@expandafter@ii}{#1}}
+\edef\jlreq@expand@three#1{\exp_not:o {\jlreq@expandafter@iii}\noexpand\unexpanded\exp_not:o {\jlreq@expandafter@iii}{#1}}
% \jlreq@getfirsttoken#1\jlreq@uniqtoken{}\jlreq@endmark@の形で使う
% 二回展開すると,#1の先頭(ただし空白は無視される)を取り出す.#1が空の場合は\jlreq@uniqtoken,先頭が{の場合は\bgroupとなる
@@ -46,8 +46,8 @@
% #1の先頭トークンが#2か(ただし#1が空ならば#2=\jlreq@uniqtoken,#1={ならば#2=\bgroupでTRUEとなる)
\long\edef\jlreq@iffirsttoken#1#2{%
% スペースチェック
- \unexpanded{\expandafter\expandafter\expandafter\jlreq@deleteuntileendmark\expandafter\ifx\expandafter}\expandonce{\space}\noexpand\detokenize{#1}\unexpanded{\@undefined\jlreq@endmark\expandafter\@firstoftwo\else\jlreq@endmark\expandafter\@secondoftwo\fi}{%
- \noexpand\ifx\expandonce{\space}#2\unexpanded{\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}%
+ \unexpanded{\expandafter\expandafter\expandafter\jlreq@deleteuntileendmark\expandafter\ifx\expandafter}\exp_not:o {\space}\noexpand\detokenize{#1}\unexpanded{\@undefined\jlreq@endmark\expandafter\@firstoftwo\else\jlreq@endmark\expandafter\@secondoftwo\fi}{%
+ \noexpand\ifx\exp_not:o {\space}#2\unexpanded{\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}%
}{%
\noexpand\jlreq@iffirsttoken@ignorespaces{#1}{#2}%
}%
@@ -69,7 +69,7 @@
% #1の先頭が引数なしのマクロか
\long\def\jlreq@ifmacro@noargument#1{%
\jlreq@ifempty{#1}{\@secondoftwo}{%
- \jlreq@iffirsttoken{#1}{ }{\@secondoftwo}{%
+ \jlreq@iffirsttoken{#1}{~}{\@secondoftwo}{%
\expandafter\expandafter\expandafter\jlreq@ifmacro@noargument@\jlreq@getfirsttoken#1\jlreq@uniqtoken{}\jlreq@endmark@
}}}
\long\def\jlreq@ifmacro@noargument@#1{\expandafter\jlreq@ifmacro@noargument@@\expandafter{\meaning #1}}
@@ -146,7 +146,7 @@
\def\jlreq@tempb{}% 消していない分を放り込んでいく
\jlreq@tempatrue% 最初の\jlreq@tempbへの追加か.
\jlreq@helper@removeelement@#2,\jlreq@endmark,%
- \edef\jlreq@do{\unexpanded{\def#3}{\expandonce{\jlreq@tempb}}}%
+ \edef\jlreq@do{\unexpanded{\def#3}{\exp_not:o {\jlreq@tempb}}}%
\expandafter\endgroup
\jlreq@do
}
@@ -154,7 +154,7 @@
\jlreq@ifendmark{#1}{}{%
\edef\@tempa{\unexpanded{#1}}%
\ifx\jlreq@tempa\@tempa\expandafter\@gobble\else\expandafter\@firstofone\fi{%
- \eappto\jlreq@tempb{\ifjlreq@tempa\else,\fi\unexpanded{#1}}%
+ \tl_put_right:Nx \jlreq@tempb{\ifjlreq@tempa\else,\fi\unexpanded{#1}}%
\jlreq@tempafalse
}%
\jlreq@helper@removeelement@
@@ -174,6 +174,7 @@
}
% 空白を無視しない\@ifsart
\newcommand*{\jlreq@ifstar}[2]{\jlreq@ifnextchar *{\edef\reserved@a*{\unexpanded{#1}}\reserved@a}{#2}}
+
% カンマで区切って,その前と後ろを\jlreq@resulta,\jlreq@resultbに入れる
% もしカンマがない場合は\ifjlreq@resultがfalseになる.
\newcommand*{\jlreq@helper@dividebycomma}[1]{\jlreq@helper@dividebycomma@#1,\jlreq@endmark}
@@ -203,61 +204,6 @@
\fi
}
-% 簡易なkeyvalのパース.
-% \jlreq@parsekeyval*[family=jlreq@key]{ % *ありは\setkeys*を使う
-% {key}{\def\val{#1}}
-% {key1,key2}{\def\val{#1}} % key1=valとkey2=valを受け付けるようになる
-% *{key}{\def\val{#1}} % デフォルト値を空文字列にする
-% {key}[choice1,choice2]{\def\valchoice{#1}}
-%}{parse対象}
-%\newcommand*{\jlreq@parsekeyval}{%
-% \@ifstar{\jlreq@helper@parsekeyval@{*}}{\jlreq@helper@parsekeyval@{}}%
-%}
-%\def\jlreq@helper@parsekeyval@#1{%
-% \@ifnextchar[{\jlreq@helper@parsekeyval@@{#1}}{\jlreq@helper@parsekeyval@@{#1}[jlreq@key]}%
-%}
-%\long\def\jlreq@helper@parsekeyval@@#1[#2]#3#4{%
-% \begingroup
-% \def\jlreq@do{}% \setkeysの結果処理がここに入れられる(よってループ内で利用不可)
-% \jlreq@helper@parsekeyval@@@{#2}#3{\jlreq@endmark}%
-% \setkeys#1{#2}{#4}%
-% \expandafter\endgroup
-% \jlreq@do
-%}
-%\def\jlreq@helper@parsekeyval@@@#1#2#{%
-% \jlreq@iffirsttoken@ignorespaces{#2}{*}{%
-% \jlreq@helper@parsekeyval@@@definekeywithdefault{#1}%
-% }{%
-% \jlreq@helper@parsekeyval@@@@{#1}%
-% }%
-%}
-%\long\def\jlreq@helper@parsekeyval@@@@#1#2{%
-% \jlreq@ifendmark{#2}{}{%
-% \@ifnextchar[{\jlreq@helper@parsekeyval@@@choicekey{#1}{#2}}{\jlreq@helper@parsekeyval@@@definekey{#1}{#2}}%
-% }%
-%}
-%\long\def\jlreq@helper@parsekeyval@@@choicekey#1#2[#3]#4{%
-% \@for\@tempa:=#2\do{%
-% \edef\jlreq@next{\unexpanded{\define@choicekey{#1}}{\expandonce{\@tempa}}}%
-% \jlreq@next{#3}{\eappto\jlreq@do{\unexpanded{#4}}}%
-% }%
-% \jlreq@helper@parsekeyval@@@{#1}%
-%}
-%\long\def\jlreq@helper@parsekeyval@@@definekeywithdefault#1#2#3{%
-% \@for\@tempa:=#2\do{%
-% \edef\jlreq@next{\unexpanded{\define@key{#1}}{\expandonce{\@tempa}}}%
-% \jlreq@next[]{\eappto\jlreq@do{\unexpanded{#3}}}%
-% }%
-% \jlreq@helper@parsekeyval@@@{#1}%
-%}
-%\long\def\jlreq@helper@parsekeyval@@@definekey#1#2#3{%
-% \@for\@tempa:=#2\do{%
-% \edef\jlreq@next{\unexpanded{\define@key{#1}}{\expandonce{\@tempa}}}%
-% \jlreq@next{\eappto\jlreq@do{\unexpanded{#3}}}%
-% }%
-% \jlreq@helper@parsekeyval@@@{#1}%
-%}
-
% キー指定しないkeyval(独自実装)
% \jlreq@parsekeyval@nokey{<action>}{<parse対象>}
% action内では#1=key, #2=val
@@ -292,48 +238,27 @@
\jlreq@remove@spaceandbracket{#2}{\jlreq@tempa}%
\jlreq@remove@spaceandbracket{#3}{\jlreq@tempb}%
\ifx\jlreq@tempb\@empty\else
- \edef\@tempa{\noexpand\jlreq@parsekeyval@nokey@iv{#1}{\expandonce{\jlreq@tempb}}{\expandonce{\jlreq@tempa}}}%
+ \edef\@tempa{\noexpand\jlreq@parsekeyval@nokey@iv{#1}{\exp_not:o {\jlreq@tempb}}{\exp_not:o {\jlreq@tempa}}}%
\@tempa
\fi
\jlreq@parsekeyval@nokey@i@wuniq\jlreq@uniqtoken
}
\long\def\jlreq@parsekeyval@nokey@iv#1#2#3{%
- \eappto\jlreq@do{%
+ \tl_put_right:Nx \jlreq@do{%
\unexpanded{\let\ifjlreq@parsekeyval@nokey@novalue}\jlreq@ifempty{#1}{\noexpand\@secondoftwo}{\noexpand\@firstoftwo}%
- \expandonce{\jlreq@parsekeyval@nokey@execute{#2}{#3}}%
+ \exp_not:o {\jlreq@parsekeyval@nokey@execute{#2}{#3}}%
}%
}
\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に入れる.
-\long\def\jlreq@helper@trim#1#2{\edef#2{\jlreq@helper@trim@i{#1}}}
-\def\jlreq@do#1{% #1 = " "として後で実行
- \long\def\jlreq@helper@trim@i##1{%
- \jlreq@iffirsttoken{##1}{#1}%
- % 先頭スペースの除去.{}を外さないために\jlreq@uniqtokenを前後にいったん挟む.
- {\jlreq@helper@trim@ii##1\jlreq@uniqtoken\jlreq@endmark}%
- % 後方スペースの除去.先頭に\jlreq@uniqtokenを加えて{}が外れるのを防ぐ.
- {\jlreq@helper@trim@iii\jlreq@uniqtoken##1\jlreq@uniqtoken#1\jlreq@uniqtoken\jlreq@endmark}%
- }
- \long\def\jlreq@helper@trim@ii#1##1\jlreq@endmark{%
- \expandafter\expandafter\expandafter\jlreq@helper@trim@i\jlreq@helper@trim@vi\jlreq@uniqtoken##1\jlreq@endmark
- }
- \long\def\jlreq@helper@trim@iii##1#1\jlreq@uniqtoken##2\jlreq@endmark{%
- \jlreq@ifempty{##2}%
- {\expandafter\jlreq@helper@trim@iv\jlreq@helper@trim@v##1\jlreq@endmark}%
- {\jlreq@helper@trim@iii##1\jlreq@uniqtoken#1\jlreq@uniqtoken\jlreq@endmark}%
- }%
- \long\def\jlreq@helper@trim@iv##1{\expandafter\unexpanded\expandafter{\@gobble ##1}}
- \long\def\jlreq@helper@trim@v##1\jlreq@uniqtoken\jlreq@endmark{{##1}}
- \long\def\jlreq@helper@trim@vi##1\jlreq@uniqtoken\jlreq@endmark{\expandafter{\@gobble ##1}}
-}
-\jlreq@do{ }
+\long\def\jlreq@helper@trim#1#2{\edef#2{\tl_trim_spaces:n{#1}}}
\long\def\jlreq@remove@spaceandbracket#1#2{%
\begingroup
\jlreq@helper@trim{#1}{\jlreq@tempa}%
- \edef\jlreq@do{\unexpanded{\jlreq@remove@spaceandbracket@{#2}}\expandonce{\jlreq@tempa}\noexpand\jlreq@endmark}%
+ \edef\jlreq@do{\unexpanded{\jlreq@remove@spaceandbracket@{#2}}\exp_not:o {\jlreq@tempa}\noexpand\jlreq@endmark}%
\expandafter\endgroup
\jlreq@do
}
@@ -368,7 +293,7 @@
\ifx\jlreq@do\@undefined
\edef\jlreq@do{\unexpanded{\jlreq@ifnextchar[{\jlreq@helper@switch@executeoption{#2}}{}}}%
\else
- \appto\jlreq@do{\@ifnextchar[{\jlreq@helper@removeoption}{}}%
+ \tl_put_right:Nn \jlreq@do{\@ifnextchar[{\jlreq@helper@removeoption}{}}%
\fi
\expandafter\endgroup
\jlreq@do
@@ -413,7 +338,7 @@
% 先頭にあるマクロを展開しまくった結果の先頭を#2に入れる.
\newcommand{\jlreq@getfirsttoken@expandmacros}[2]{%
- \jlreq@iffirsttoken{#1}{ }{\def#2{ }}{%
+ \jlreq@iffirsttoken{#1}{~}{\def#2{~}}{%
\jlreq@ifempty{#1}{\def#2{}}{%
\jlreq@ifmacro@noargument{#1}{%
\expandafter\jlreq@getfirsttoken@expandmacros\expandafter{#1}{#2}%
@@ -428,7 +353,7 @@
\long\def\jlreq@helper@checktokenlist#1#2{%
\jlreq@ifendmark{#2}{\@firstoftwo}%
{%
- \jlreq@if{\ifnum0#1{#2}>0 \fi}%
+ \jlreq@if{\ifnum0#1{#2}>0~\fi}%
{\jlreq@helper@checktokenlist{#1}}%
{\expandafter\@secondoftwo\jlreq@deleteuntileendmark}%
}%
@@ -449,7 +374,6 @@
\ifx\@tempa\@tempb\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
}
-\ExplSyntaxOn
\newcommand*{\jlreq@helper@guessengine}{%
\token_if_primitive:NTF \directlua {
\let\jlreq@result=l
@@ -462,20 +386,19 @@
}
}
}
-\ExplSyntaxOff
% #1を\@undefinedに,既に\@undefinedならば#2{#1}を呼ぶ
\newcommand*{\jlreq@helper@undefcs}[2]{%
- \ifundef{#1}{#2{#1}}{\undef{#1}}%
+ \@ifundefined{\expandafter\@gobble\string #1}{#2{#1}}{\cs_undefine:N #1}%
}
% \if版
\newcommand*{\jlreq@helper@undefif}[2]{%
- \ifundef{#1}{#2{#1}}{%
+ \@ifundefined{\expandafter\@gobble\string #1}{%
\edef\@tempa{\expandafter\@gobble\string#1}%
\edef\@tempa{\expandafter\@gobbletwo\@tempa}%
- \undef{#1}%
- \expandafter\undef\expandafter{\csname\@tempa true\endcsname}%
- \expandafter\undef\expandafter{\csname\@tempa false\endcsname}%
+ \cs_undefine:N #1%
+ \cs_undefine:c {\@tempa true}
+ \cs_undefine:c {\@tempa false}
}%
}
@@ -538,18 +461,17 @@
\jlreq@tempdimb=\dimexpr\jlreq@tempdima + 1pt\relax
% \jlreq@tempdimaと\jlreq@tempdimbで挟んでいく二分法
\jlreq@tempcnta=0 % 無限ループを避けるためのカウンタ
- \loop\ifnum\numexpr\ifdim\dimexpr\jlreq@tempdimb - \jlreq@tempdima\relax>1sp 1\else0\fi*\ifnum\jlreq@tempcnta<100 1\else 0\fi\relax=1
+ \loop\ifnum\numexpr\ifdim\dimexpr\jlreq@tempdimb - \jlreq@tempdima\relax>1sp 1\else0\fi*\ifnum\jlreq@tempcnta<100~1\else 0\fi\relax=1
\jlreq@tempdimc=\dimexpr(\jlreq@tempdima+\jlreq@tempdimb)/2\relax
\ifdim\strip@pt\jlreq@tempdimc\@tempdimb>\@tempdima\jlreq@tempdimb=\jlreq@tempdimc
\else\jlreq@tempdima=\jlreq@tempdimc\fi
- \advance\jlreq@tempcnta by 1
+ \advance\jlreq@tempcnta by 1\relax
\repeat
\edef\jlreq@do{\noexpand\jlreq@resultdimen=\the\jlreq@tempdima\noexpand\relax}%
\expandafter\endgroup
\jlreq@do
}
-\def\jlreq@for@noexpand#1:={\@for#1:=\@empty}
\def\jlreq@helper@swap#1#2{%
\let\jlreq@helper@swaptoken=#1%
@@ -563,6 +485,7 @@
#2=\jlreq@helper@swaptoken\relax
\let\jlreq@helper@swaptoken=\@undefined
}
+\ExplSyntaxOff
\endinput
diff --git a/Master/texmf-dist/tex/latex/jlreq/jlreq-trimmarks.sty b/Master/texmf-dist/tex/latex/jlreq/jlreq-trimmarks.sty
index d7eb46fa49c..cc1f43adc92 100644
--- a/Master/texmf-dist/tex/latex/jlreq/jlreq-trimmarks.sty
+++ b/Master/texmf-dist/tex/latex/jlreq/jlreq-trimmarks.sty
@@ -1,28 +1,36 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{jlreq-trimmarks}[2021/07/22 jlreq-trimmarks]
-\RequirePackage{l3keys2e,etoolbox}
+\ProvidesPackage{jlreq-trimmarks}[2021/08/12 jlreq-trimmarks]
+\RequirePackage{l3keys2e}
\RequirePackage{jlreq-helpers}
\ExplSyntaxOn
-
% check \tombowdatetrue
\ifx\tombowdatetrue\@undefined
\PackageError{jlreq-trimmarks}{This~package~only~works~with~pLaTeX,~upLaTeX~or~LuaTeX-ja}{\@ehc}
\fi
-\newcommand*{\jlreq@trimmarks@undeferr}[1]{\PackageError{jlreq-trimmarks}{Trying~to~delete~\string#1~even~though~it~is~not~defined,~may~be~a~bug}{\@ehc}}
-\newcommand*{\jlreq@trimmarks@afterpkg@addtodeletecs}[1]{%
- \appto\jlreq@trimmarks@afterpkg@deletecslist{\jlreq@helper@undefcs{#1}{\jlreq@trimmarks@undeferr}}%
+\cs_set:Nn \__jlreq_trimmarks_undeferr:n {\ClassError{jlreq-trimmarks}{Trying~to~delete~\string#1~even~though~it~is~not~defined,~may~be~a~bug}{\@ehc}}
+% クラスファイル内でしか使わないマクロをクラスファイル終了時に未定義にする
+\seq_new:N \g__jlreq_trimmarks_afterpkg_deletecs_seq
+\seq_new:N \g__jlreq_trimmarks_afterpkg_deleteif_seq
+\cs_set:Nn \__jlreq_trimmarks_afterpkg_addtodeletecs:N {
+ \seq_gput_right:Nn \g__jlreq_trimmarks_afterpkg_deletecs_seq {#1}
}
-\newcommand*{\jlreq@trimmarks@afterpkg@addtodeleteif}[1]{%
- \appto\jlreq@trimmarks@afterpkg@deletecslist{\jlreq@helper@undefif{#1}{\jlreq@trimmarks@undeferr}}%
+\__jlreq_trimmarks_afterpkg_addtodeletecs:N \__jlreq_trimmarks_afterpkg_addtodeletecs:N
+\cs_set:Nn \__jlreq_trimmarks_afterpkg_addtodeleteif:N {
+ \seq_gput_right:Nn \g__jlreq_trimmarks_afterpkg_deleteif_seq {#1}
}
-\jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@afterpkg@addtodeletecs}
-\jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@afterpkg@addtodeleteif}
+\__jlreq_trimmarks_afterpkg_addtodeletecs:N \__jlreq_trimmarks_afterpkg_addtodeleteif:N
\AtEndOfPackage{%
- \jlreq@trimmarks@afterpkg@deletecslist
- \jlreq@helper@undefcs{\jlreq@trimmarks@afterpkg@deletecslist}{\jlreq@trimmarks@undeferr}%
- \undef{\jlreq@trimmarks@undeferr}%
+ \seq_map_inline:Nn \g__jlreq_trimmarks_afterpkg_deletecs_seq {
+ \jlreq@helper@undefcs{#1}{\__jlreq_trimmarks_undeferr:n}
+ }
+ \seq_map_inline:Nn \g__jlreq_trimmarks_afterpkg_deleteif_seq {
+ \jlreq@helper@undefif{#1}{\__jlreq_trimmarks_undeferr:n}
+ }
+ \cs_undefine:N \g__jlreq_trimmarks_afterpkg_deletecs_seq
+ \cs_undefine:N \g__jlreq_trimmarks_afterpkg_deleteif_seq
+ \cs_undefine:N \__jlreq_trimmarks_undeferr:n
}
\@ifclassloaded{jlreq}{\let\ifjlreq@trimmarks@jlreqloaded=\@firstoftwo}{\let\ifjlreq@trimmarks@jlreqloaded=\@secondoftwo}
@@ -47,18 +55,18 @@
\@ifnextchar[{\jlreq@trimmarks@addpapersize@{#1}}{\jlreq@trimmarks@addpapersize@@{#1}}
}
\def\jlreq@trimmarks@addpapersize@#1[#2]{%
- \edef\@tempa{\unexpanded{\jlreq@trimmarks@addpapersize@@{#1}}\csexpandonce{jlreq@helper@papersizelist@#2}}%
+ \edef\@tempa{\unexpanded{\jlreq@trimmarks@addpapersize@@{#1}}\exp_not:v {jlreq@helper@papersizelist@#2}}%
\@tempa
}
\newcommand*{\jlreq@trimmarks@addpapersize@@}[3]{%
\clist_map_variable:nNn {#1} \@tempa {
- \eappto\jlreq@trimmarks@switchpapersize{{\expandonce{\@tempa}}{\unexpanded{\def\jlreq@resulta{#2}\def\jlreq@resultb{#3}}}}%
+ \tl_put_right:Nx \jlreq@trimmarks@switchpapersize {{\exp_not:o {\@tempa}}{\unexpanded{\def\jlreq@resulta{#2}\def\jlreq@resultb{#3}}}}%
}%
}
-\jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@switchpapersize}
-\jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@addpapersize}
-\jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@addpapersize@}
-\jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@addpapersize@@}
+\__jlreq_trimmarks_afterpkg_addtodeletecs:N \jlreq@trimmarks@switchpapersize
+\__jlreq_trimmarks_afterpkg_addtodeletecs:N \jlreq@trimmarks@addpapersize
+\__jlreq_trimmarks_afterpkg_addtodeletecs:N \jlreq@trimmarks@addpapersize@
+\__jlreq_trimmarks_afterpkg_addtodeletecs:N \jlreq@trimmarks@addpapersize@@
\jlreq@trimmarks@addpapersize{a0,A0}[a0]
\jlreq@trimmarks@addpapersize{a1,A1}[a1]
@@ -103,7 +111,7 @@
% width -> \jlreq@resulta, height -> \jlreq@resultb
\edef\jlreq@trimmarks@analyzepapersize#1{
\noexpand\jlreq@switch{#1}{
- \expandonce{\jlreq@trimmarks@switchpapersize}%
+ \exp_not:o {\jlreq@trimmarks@switchpapersize}%
{%
\noexpand\jlreq@helper@dividebycomma{#1}%
\unexpanded{\ifjlreq@result\else}%
@@ -113,10 +121,10 @@
}%
}\noexpand\relax
}
-\jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@analyzepapersize}
+\__jlreq_trimmarks_afterpkg_addtodeletecs:N \jlreq@trimmarks@analyzepapersize
\keys_define:nn { jlreq-trimmarks } { trimmarks_paper .tl_set:N = \jlreq@trimmarks@option@papersize }
-\jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@option@papersize}
+\__jlreq_trimmarks_afterpkg_addtodeletecs:N \jlreq@trimmarks@option@papersize
\newif\ifjlreq@trimmarks@digital \jlreq@trimmarks@digitaltrue
\newif\ifjlreq@trimmarks@show \jlreq@trimmarks@showtrue
@@ -153,7 +161,7 @@
\ifjlreq@parsekeyval@nokey@novalue{%
\clist_map_variable:nNn { top,bottom,gutter,fore-edge } \jlreq@tempa {
\epreto\jlreq@do{%
- \noexpand\def\expandonce{\csname jlreq@trimmarks@bleed@\jlreq@tempa\endcsname}{##1}%
+ \noexpand\def\exp_not:o {\csname jlreq@trimmarks@bleed@\jlreq@tempa\endcsname}{##1}%
}%
}%
}{%
@@ -161,8 +169,8 @@
\str_if_eq_p:nn {##1} {top} || \str_if_eq_p:nn {##1} {bottom} ||
\str_if_eq_p:nn {##1} {gutter} || \str_if_eq_p:nn {##1} {fore-edge}
}{
- \eappto\jlreq@do{%
- \noexpand\def\expandonce{\csname jlreq@trimmarks@bleed@##1\endcsname}{##2}%
+ \tl_put_right:Nx \jlreq@do{%
+ \noexpand\def\exp_not:o {\csname jlreq@trimmarks@bleed@##1\endcsname}{##2}%
}%
}{%
\PackageError{jlreq-trimmarks}{Unknown~position~`##1'~in~bleed_margin}{\@ehc}
@@ -176,7 +184,7 @@
\newif\ifjlreq@trimmarks@landscape \jlreq@trimmarks@landscapefalse
\keys_define:nn { jlreq-trimmarks } { landscape .code:n = {\jlreq@trimmarks@landscapetrue}, .value_forbidden:n = true }
-\jlreq@trimmarks@afterpkg@addtodeleteif{\ifjlreq@trimmarks@landscape}
+\__jlreq_trimmarks_afterpkg_addtodeleteif:N \ifjlreq@trimmarks@landscape
\keys_set:nn { jlreq-trimmarks } {
trimmarks_paper = {+2in},
@@ -219,7 +227,7 @@
\edef\jlreq@trimmarks@paperheight{\jlreq@resultb}
}
}
-\jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@setpapersize}
+\__jlreq_trimmarks_afterpkg_addtodeletecs:N \jlreq@trimmarks@setpapersize
\expandafter\jlreq@trimmarks@setpapersize\expandafter{\jlreq@trimmarks@option@papersize}
\ifx o\jlreq@trimmarks@driver
@@ -234,20 +242,20 @@
\jlreq@parsekeyval@nokey{%
\ifjlreq@parsekeyval@nokey@novalue{}{%
\jlreq@switch{##1}{
- {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}}}
+ {yoko}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@@{yoko@#1}{yoko@#2}{##2}}}
+ {horizontal}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@@{yoko@#1}{yoko@#2}{##2}}}
+ {tate}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@@{tate@#1}{tate@#2}{##2}}}
+ {vertial}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@@{tate@#1}{tate@#2}{##2}}}
+ {corner}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@@{corner@#1}{corner@#2}{##2}}}
+ {in-yoko}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@@{inyoko@#1}{inyoko@#2}{##2}}}
+ {in-horizontal}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@@{inyoko@#1}{inyoko@#2}{##2}}}
+ {in-tate}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@@{intate@#1}{intate@#2}{##2}}}
+ {in-vertial}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@@{intate@#1}{intate@#2}{##2}}}
}%
}%
}{#3}%
\jlreq@if{\ifx\jlreq@do\@empty\fi}{%
- \appto\jlreq@do{\jlreq@trimmarks@setbanner@@{yoko@#1}{yoko@#2}{#3}}%
+ \tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@@{yoko@#1}{yoko@#2}{#3}}%
}{}%
\expandafter\endgroup
\jlreq@do
@@ -259,16 +267,16 @@
\jlreq@parsekeyval@nokey{%
\ifjlreq@parsekeyval@nokey@novalue{}{%
\jlreq@switch*{##1}{
- {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}}}
+ {left}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@@{before@#1}{before@#2}{##2}}}
+ {right}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@@{after@#1}{after@#2}{##2}}}
+ {above}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@@{before@#1}{before@#2}{##2}}}
+ {below}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@@{after@#1}{after@#2}{##2}}}
+ {in}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@@{in@#1}{in@#2}{##2}}}
}%
}%
}{#3}%
\jlreq@if{\ifx\jlreq@do\@empty\fi}{
- \appto\jlreq@do{\jlreq@trimmarks@setbanner@@{before@#1}{before@#2}{#3}}%
+ \tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@@{before@#1}{before@#2}{#3}}%
}{}%
\expandafter\endgroup
\jlreq@do
@@ -281,13 +289,13 @@
\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@#2\endcsname{\unexpanded{##2}}}}
+ {odd}{\tl_put_right:Nn \jlreq@do{\expandafter\edef\csname jlreq@trimmarks@banner@odd@#1\endcsname{\unexpanded{##2}}}}
+ {even}{\tl_put_right:Nn \jlreq@do{\expandafter\edef\csname jlreq@trimmarks@banner@even@#2\endcsname{\unexpanded{##2}}}}
}%
}%
}{#3}%
\jlreq@if{\ifx\jlreq@do\@empty\fi}{
- \appto\jlreq@do{%
+ \tl_put_right:Nn \jlreq@do{%
\expandafter\edef\csname jlreq@trimmarks@banner@odd@#1\endcsname{\unexpanded{#3}}%
\expandafter\edef\csname jlreq@trimmarks@banner@even@#2\endcsname{\unexpanded{#3}}%
}%
@@ -325,39 +333,39 @@
\let\jlreq@guttereven\jlreq@gutterodd
\fi
\jlreq@switch*{##1}{
- {top-left}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@left}{top@left}{##2}}}
- {left-top}{\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}}}
+ {top-left}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner{top@left}{top@left}{##2}}}
+ {left-top}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner{top@left}{top@left}{##2}}}
+ {top-right}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner{top@right}{top@right}{##2}}}
+ {right-top}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner{top@right}{top@right}{##2}}}
+ {top-gutter}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner{top@\jlreq@gutterodd}{top@\jlreq@guttereven}{##2}}}
+ {gutter-top}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner{top@\jlreq@gutterodd}{top@\jlreq@guttereven}{##2}}}
+ {top-fore-edge}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner{top@\jlreq@guttereven}{top@\jlreq@gutterodd}{##2}}}
+ {fore-edge-top}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner{top@\jlreq@guttereven}{top@\jlreq@gutterodd}{##2}}}
+ {bottom-left}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner{bottom@left}{bottom@left}{##2}}}
+ {left-bottom}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner{bottom@left}{bottom@left}{##2}}}
+ {bottom-right}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner{bottom@right}{bottom@right}{##2}}}
+ {right-bottom}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner{bottom@right}{bottom@right}{##2}}}
+ {bottom-gutter}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner{bottom@\jlreq@gutterodd}{bottom@\jlreq@guttereven}{##2}}}
+ {gutter-bottom}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner{bottom@\jlreq@gutterodd}{bottom@\jlreq@guttereven}{##2}}}
+ {bottom-fore-edge}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner{bottom@\jlreq@guttereven}{bottom@\jlreq@gutterodd}{##2}}}
+ {fore-edge-bottom}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner{bottom@\jlreq@guttereven}{bottom@\jlreq@gutterodd}{##2}}}
+ {top-center}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@{top@center}{top@center}{##2}}}
+ {center-top}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@{top@center}{top@center}{##2}}}
+ {bottom-center}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@{bottom@center}{bottom@center}{##2}}}
+ {center-bottom}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@{bottom@center}{bottom@center}{##2}}}
+ {center-right}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@{center@right}{center@right}{##2}}}
+ {right-center}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@{center@right}{center@right}{##2}}}
+ {center-left}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@{center@left}{center@left}{##2}}}
+ {left-center}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@{center@left}{center@left}{##2}}}
+ {center-gutter}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@{center@\jlreq@gutterodd}{center@\jlreq@guttereven}{##2}}}
+ {gutter-center}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@{center@\jlreq@gutterodd}{center@\jlreq@guttereven}{##2}}}
+ {center-fore-edge}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@{center@\jlreq@guttereven}{center@\jlreq@gutterodd}{##2}}}
+ {fore-edge-center}{\tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner@{center@\jlreq@guttereven}{center@\jlreq@gutterodd}{##2}}}
}%
}%
}{#1}%
\jlreq@if{\ifx\jlreq@do\@empty\fi}{
- \appto\jlreq@do{\jlreq@trimmarks@setbanner{top@left}{top@left}{#1}}%
+ \tl_put_right:Nn \jlreq@do{\jlreq@trimmarks@setbanner{top@left}{top@left}{#1}}%
}{}%
\jlreq@do
},
@@ -398,7 +406,7 @@
}%
}%
}
-\newcommand{\jlreqtrimmarkssetup}[1]{%
+\NewDocumentCommand { \jlreqtrimmarkssetup } { +m } {
\keys_set:nn { jlreqtrimmarkssetup } {#1}
}
\@onlypreamble\jlreqtrimmarkssetup
@@ -868,12 +876,12 @@
\ifjlreq@trimmarks@show@artbox /ArtBox~\jlreq@trimmarks@trimboxsize\fi
/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@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}
+ \__jlreq_trimmarks_afterpkg_addtodeletecs:N \jlreq@trimmarks@pttobp
+ \__jlreq_trimmarks_afterpkg_addtodeletecs:N \jlreq@trimmarks@trimboxsize
+ \__jlreq_trimmarks_afterpkg_addtodeletecs:N \jlreq@trimmarks@bleedboxsize@odd
+ \__jlreq_trimmarks_afterpkg_addtodeletecs:N \jlreq@trimmarks@bleedboxsize@even
+ \__jlreq_trimmarks_afterpkg_addtodeletecs:N \jlreq@trimmarks@pdfattribute@odd
+ \__jlreq_trimmarks_afterpkg_addtodeletecs:N \jlreq@trimmarks@pdfattribute@even
\begingroup
\c@page=1\relax
@@ -892,7 +900,7 @@
\@tempa
\fi
\ifx f\jlreq@trimmarks@driver
- \epreto\@outputtombow{\noexpand\special{pdf:~put~@thispage~<<\jlreq@trimmarks@pdfattribute@odd>>}}
+ \tl_put_left:Nx \@outputtombow {\noexpand\special{pdf:~put~@thispage~<<\jlreq@trimmarks@pdfattribute@odd>>}}
\fi
\ifx s\jlreq@trimmarks@driver
\edef\@tempa{\noexpand\special{ps:SDict~begin~
@@ -905,19 +913,19 @@
}{
\ifx l\jlreq@trimmarks@driver
% in \@outputtombow, it's too late
- \epreto\@outputpage{%
+ \tl_put_left:Nx \@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{%
+ \tl_put_left:Nx \@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{%
+ \tl_put_left:Nx \@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
diff --git a/Master/texmf-dist/tex/latex/jlreq/jlreq.cls b/Master/texmf-dist/tex/latex/jlreq/jlreq.cls
index f1883d08b28..4cffe138254 100644
--- a/Master/texmf-dist/tex/latex/jlreq/jlreq.cls
+++ b/Master/texmf-dist/tex/latex/jlreq/jlreq.cls
@@ -5,8 +5,8 @@
%%
% (based on JLReq 20200811 https://www.w3.org/TR/2020/NOTE-jlreq-20200811/)
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{jlreq}[2021/07/30 jlreq]
-\RequirePackage{l3keys2e,etoolbox}
+\ProvidesClass{jlreq}[2021/08/12 jlreq]
+\RequirePackage{l3keys2e}
\RequirePackage{ifthen}
\RequirePackage{jlreq-helpers}
@@ -18,26 +18,35 @@
\str_new:N \l_jlreq_tmpc_str
\bool_new:N \l_jlreq_tmpa_bool
\clist_new:N \l_jlreq_tmpa_clist
+\seq_new:N \l_jlreq_tmpa_seq
\dim_new:N \l_jlreq_tmpa_dim
\skip_new:N \l_jlreq_tmpa_skip
\box_new:N \l_jlreq_tmpa_box
\box_new:N \l_jlreq_tmpb_box
\box_new:N \l_jlreq_tmpc_box
-\def\jlreq@undeferr#1{\ClassError{jlreq}{Trying~to~delete~\string#1~even~though~it~is~not~defined,~may~be~a~bug}{\@ehc}}
+\cs_set:Nn \__jlreq_undeferr:n {\ClassError{jlreq}{Trying~to~delete~\string#1~even~though~it~is~not~defined,~may~be~a~bug}{\@ehc}}
% クラスファイル内でしか使わないマクロをクラスファイル終了時に未定義にする
-\def\jlreq@aftercls@addtodeletecs#1{%
- \appto\jlreq@aftercls@deletecslist{\jlreq@helper@undefcs{#1}{\jlreq@undeferr}}%
+\seq_new:N \g__jlreq_aftercls_deletecs_seq
+\seq_new:N \g__jlreq_aftercls_deleteif_seq
+\cs_set:Nn \__jlreq_aftercls_addtodeletecs:N {
+ \seq_gput_right:Nn \g__jlreq_aftercls_deletecs_seq {#1}
}
-\def\jlreq@aftercls@addtodeleteif#1{%
- \appto\jlreq@aftercls@deletecslist{\jlreq@helper@undefif{#1}{\jlreq@undeferr}}%
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_aftercls_addtodeletecs:N
+\cs_set:Nn \__jlreq_aftercls_addtodeleteif:N {
+ \seq_gput_right:Nn \g__jlreq_aftercls_deleteif_seq {#1}
}
-\jlreq@aftercls@addtodeletecs{\jlreq@aftercls@addtodeletecs}
-\jlreq@aftercls@addtodeletecs{\jlreq@aftercls@addtodeleteif}
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_aftercls_addtodeleteif:N
\AtEndOfClass{%
- \jlreq@aftercls@deletecslist
- \jlreq@helper@undefcs{\jlreq@aftercls@deletecslist}{\jlreq@undeferr}%
- \undef{\jlreq@undeferr}%
+ \seq_map_inline:Nn \g__jlreq_aftercls_deletecs_seq {
+ \jlreq@helper@undefcs{#1}{\__jlreq_undeferr:n}
+ }
+ \seq_map_inline:Nn \g__jlreq_aftercls_deleteif_seq {
+ \jlreq@helper@undefif{#1}{\__jlreq_undeferr:n}
+ }
+ \cs_undefine:N \g__jlreq_aftercls_deletecs_seq
+ \cs_undefine:N \g__jlreq_aftercls_deleteif_seq
+ \cs_undefine:N \__jlreq_undeferr:n
}
% preambleにいるかのスイッチ
@@ -53,7 +62,7 @@
\ClassError{jlreq}{Trying~to~save~#1~twice,~may~be~a~bug}{\@ehc}%
}
\begingroup
- \edef\jlreq@do{\noexpand\let\expandonce{\csname jlreq@original@#1\endcsname}=\expandonce{\csname #1\endcsname}}
+ \edef\jlreq@do{\noexpand\let\exp_not:c {jlreq@original@#1}=\exp_not:c {#1}}
\expandafter\endgroup
\jlreq@do
}
@@ -83,121 +92,114 @@
\keys_define:nn { jlreq } { book .code:n = { \def\jlreq@article@type{book} }, book .value_forbidden:n = true }
%.. 基本版面.まずは紙サイズ.
-\def\jlreq@switchpapersize{}
-\jlreq@aftercls@addtodeletecs{\jlreq@switchpapersize}
-% \jlreq@addpapersize{paper=に指定するもの}{単独オプション名}{横}{縦}
-
-\def\jlreq@addpapersize#1#2{%
- \@ifnextchar[{\jlreq@addpapersize@{#1}{#2}}{\jlreq@addpapersize@@{#1}{#2}}%
+\tl_new:N \g__jlreq_papersizelist_tl
+\cs_set:Nn \__jlreq_addpapersize:nnn {
+ \exp_args:Nnnv \__jlreq_addpapersize_aux:nnn {#1}{#2}{jlreq@helper@papersizelist@#3}
}
-\def\jlreq@addpapersize@#1#2[#3]{%
- \edef\@tempa{\unexpanded{\jlreq@addpapersize@@{#1}{#2}}\csexpandonce{jlreq@helper@papersizelist@#3}}%
- \@tempa
+\cs_set:Nn \__jlreq_addpapersize_aux:nnn {
+ \__jlreq_addpapersize_auxi:nnnn {#1}{#2}#3
}
-\def\jlreq@addpapersize@@#1#2#3#4{%
- \clist_map_variable:nNn {#1} \@tempa {
- \eappto\jlreq@switchpapersize{{\expandonce{\@tempa}}{\unexpanded{\setlength{\paperwidth}{#3}\setlength{\paperheight}{#4}}}}%
- }%
- \clist_map_inline:nn {#2} {
- \keys_define:nn { jlreq } {
- ##1 .code:n = { \setlength{\paperwidth}{#3}\setlength{\paperheight}{#4} },
- ##1 .value_forbidden:n = true
- }
+\cs_set:Nn \__jlreq_addpapersize_auxi:nnnn {
+ \clist_map_inline:nn {#1} {
+ \tl_gput_right:Nn \g__jlreq_papersizelist_tl { { ##1 } { \setlength{\paperwidth}{#3} \setlength{\paperheight}{#4} } }
+ }
+ \clist_map_inline:nn {#2} {
+ \keys_define:nn { jlreq } { ##1 .code:n = { \setlength{\paperwidth}{#3} \setlength{\paperheight}{#4} } }
}
}
-\jlreq@aftercls@addtodeletecs{\jlreq@addpapersize}
-\jlreq@aftercls@addtodeletecs{\jlreq@addpapersize@}
-\jlreq@aftercls@addtodeletecs{\jlreq@addpapersize@@}
\keys_define:nn { jlreq } {
paper .code:n = {
- \edef\jlreq@do{%
- \unexpanded{\jlreq@switch{#1}}{\expandonce{\jlreq@switchpapersize}}%
- [\unexpanded{%
- \jlreq@helper@dividebycomma{#1}%
- \ifjlreq@result
- \setlength{\paperwidth}{\dimexpr\jlreq@resulta\relax}%
- \setlength{\paperheight}{\dimexpr\jlreq@resultb\relax}%
- \else
- \ClassError{jlreq}{The~paper~#1~is~unknown}{\@ehc}%
- \fi
- }]%
- }%
- \jlreq@do
+ \str_case:nVF {#1} \g__jlreq_papersizelist_tl
+ {
+ \jlreq@helper@dividebycomma{#1}%
+ \legacy_if:nTF { jlreq@result } {
+ \setlength{\paperwidth}{\dimexpr\jlreq@resulta\relax}
+ \setlength{\paperheight}{\dimexpr\jlreq@resultb\relax}
+ } {
+ \ClassError { jlreq } { The~paper~#1~is~unknown } {\@ehc}
+ }
+ }
}
}
+
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_addpapersize:nnn
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_addpapersize_aux:nnn
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_addpapersize_auxi:nnnn
+\__jlreq_aftercls_addtodeletecs:N \g__jlreq_papersizelist_tl
+
% 紙サイズ一覧.b*はJIS B.
-\jlreq@addpapersize{a0,A0}{}[a0]
-\jlreq@addpapersize{a1,A1}{}[a1]
-\jlreq@addpapersize{a2,A2}{}[a2]
-\jlreq@addpapersize{a3,A3}{a3paper}[a3]
-\jlreq@addpapersize{a4,A4}{a4paper}[a4]
-\jlreq@addpapersize{a5,A5}{a5paper}[a5]
-\jlreq@addpapersize{a6,A6}{a6paper}[a6]
-\jlreq@addpapersize{a7,A7}{}[a7]
-\jlreq@addpapersize{a8,A8}{}[a8]
-\jlreq@addpapersize{a9,A9}{}[a9]
-\jlreq@addpapersize{a10,A10}{}[a10]
-
-\jlreq@addpapersize{b0,B0}{}[b0]
-\jlreq@addpapersize{b1,B1}{}[b1]
-\jlreq@addpapersize{b2,B2}{}[b2]
-\jlreq@addpapersize{b3,B3}{}[b3]
-\jlreq@addpapersize{b4,B4}{b4paper}[b4]
-\jlreq@addpapersize{b5,B5}{b5paper}[b5]
-\jlreq@addpapersize{b6,B6}{b6paper}[b6]
-\jlreq@addpapersize{b7,B7}{}[b7]
-\jlreq@addpapersize{b8,B8}{}[b8]
-\jlreq@addpapersize{b9,B9}{}[b9]
-\jlreq@addpapersize{b10,B10}{}[b10]
-
-\jlreq@addpapersize{c2,C2}{}[c2]
-\jlreq@addpapersize{c3,C3}{}[c3]
-\jlreq@addpapersize{c4,C4}{}[c4]
-\jlreq@addpapersize{c5,C5}{}[c5]
-\jlreq@addpapersize{c6,C6}{}[c6]
-\jlreq@addpapersize{c7,C7}{}[c7]
-\jlreq@addpapersize{c8,C8}{}[c8]
-
-\jlreq@addpapersize{a4var}{}[a4var]
-\jlreq@addpapersize{b5var}{}[b5var]
-
-\jlreq@addpapersize{letter}{letterpaper}[letter]
-\jlreq@addpapersize{legal}{legalpaper}[legal]
-\jlreq@addpapersize{executive}{executivepaper}[executive]
-\jlreq@addpapersize{hagaki}{}[hagaki]
+\__jlreq_addpapersize:nnn{a0,A0}{}{a0}
+\__jlreq_addpapersize:nnn{a1,A1}{}{a1}
+\__jlreq_addpapersize:nnn{a2,A2}{}{a2}
+\__jlreq_addpapersize:nnn{a3,A3}{a3paper}{a3}
+\__jlreq_addpapersize:nnn{a4,A4}{a4paper}{a4}
+\__jlreq_addpapersize:nnn{a5,A5}{a5paper}{a5}
+\__jlreq_addpapersize:nnn{a6,A6}{a6paper}{a6}
+\__jlreq_addpapersize:nnn{a7,A7}{}{a7}
+\__jlreq_addpapersize:nnn{a8,A8}{}{a8}
+\__jlreq_addpapersize:nnn{a9,A9}{}{a9}
+\__jlreq_addpapersize:nnn{a10,A10}{}{a10}
+
+\__jlreq_addpapersize:nnn{b0,B0}{}{b0}
+\__jlreq_addpapersize:nnn{b1,B1}{}{b1}
+\__jlreq_addpapersize:nnn{b2,B2}{}{b2}
+\__jlreq_addpapersize:nnn{b3,B3}{}{b3}
+\__jlreq_addpapersize:nnn{b4,B4}{b4paper}{b4}
+\__jlreq_addpapersize:nnn{b5,B5}{b5paper}{b5}
+\__jlreq_addpapersize:nnn{b6,B6}{b6paper}{b6}
+\__jlreq_addpapersize:nnn{b7,B7}{}{b7}
+\__jlreq_addpapersize:nnn{b8,B8}{}{b8}
+\__jlreq_addpapersize:nnn{b9,B9}{}{b9}
+\__jlreq_addpapersize:nnn{b10,B10}{}{b10}
+
+\__jlreq_addpapersize:nnn{c2,C2}{}{c2}
+\__jlreq_addpapersize:nnn{c3,C3}{}{c3}
+\__jlreq_addpapersize:nnn{c4,C4}{}{c4}
+\__jlreq_addpapersize:nnn{c5,C5}{}{c5}
+\__jlreq_addpapersize:nnn{c6,C6}{}{c6}
+\__jlreq_addpapersize:nnn{c7,C7}{}{c7}
+\__jlreq_addpapersize:nnn{c8,C8}{}{c8}
+
+\__jlreq_addpapersize:nnn{a4var}{}{a4var}
+\__jlreq_addpapersize:nnn{b5var}{}{b5var}
+
+\__jlreq_addpapersize:nnn{letter}{letterpaper}{letter}
+\__jlreq_addpapersize:nnn{legal}{legalpaper}{legal}
+\__jlreq_addpapersize:nnn{executive}{executivepaper}{executive}
+\__jlreq_addpapersize:nnn{hagaki}{}{hagaki}
%.. フォントサイズ,行長,1ページあたりの行数で基本版面のサイズを決める(2.4.1.a)
-\jlreq@aftercls@addtodeletecs{\jlreq@option@fontsize}
+\__jlreq_aftercls_addtodeletecs:N \jlreq@option@fontsize
\keys_define:nn { jlreq } { fontsize .tl_set:N = \jlreq@option@fontsize }
\keys_define:nn { jlreq } {
10pt .code:n = {\def\jlreq@option@fontsize{10pt}}, 10pt .value_forbidden:n = true,
11pt .code:n = {\def\jlreq@option@fontsize{11pt}}, 11pt .value_forbidden:n = true,
12pt .code:n = {\def\jlreq@option@fontsize{12pt}}, 12pt .value_forbidden:n = true,
}
-\keys_define:nn { jlreq } { jafontsize .tl_set:N = \jlreq@option@jafontsize}
-\keys_define:nn { jlreq } { jafontscale .tl_set:N = \jlreq@option@jafontscale}
-\jlreq@aftercls@addtodeletecs{\jlreq@option@jafontsize}
-\jlreq@aftercls@addtodeletecs{\jlreq@option@jafontscale}
+\keys_define:nn { jlreq } { jafontsize .tl_set:N = \jlreq@option@jafontsize }
+\keys_define:nn { jlreq } { jafontscale .tl_set:N = \jlreq@option@jafontscale }
+\__jlreq_aftercls_addtodeletecs:N \jlreq@option@jafontsize
+\__jlreq_aftercls_addtodeletecs:N \jlreq@option@jafontscale
%.. 行の長さ
-\keys_define:nn { jlreq } { line_length .tl_set:N = \jlreq@option@line@length}
-\jlreq@aftercls@addtodeletecs{\jlreq@option@line@length}
+\keys_define:nn { jlreq } { line_length .tl_set:N = \jlreq@option@line@length }
+\__jlreq_aftercls_addtodeletecs:N \jlreq@option@line@length
%.. 1ページあたりの行数
-\keys_define:nn { jlreq } { number_of_lines .tl_set:N = \jlreq@option@number@of@lines}
-\jlreq@aftercls@addtodeletecs{\jlreq@option@number@of@lines}
+\keys_define:nn { jlreq } { number_of_lines .tl_set:N = \jlreq@option@number@of@lines }
+\__jlreq_aftercls_addtodeletecs:N \jlreq@option@number@of@lines
% 地の空き量,のどの空き量で配置位置を決める(2.4.1.b)省略されたら中央配置.
%.. 天
-\keys_define:nn { jlreq } { head_space .tl_set:N = \jlreq@option@head@space}
-\jlreq@aftercls@addtodeletecs{\jlreq@option@head@space}
+\keys_define:nn { jlreq } { head_space .tl_set:N = \jlreq@option@head@space }
+\__jlreq_aftercls_addtodeletecs:N \jlreq@option@head@space
%.. 地
-\keys_define:nn { jlreq } { foot_space .tl_set:N = \jlreq@option@foot@space}
-\jlreq@aftercls@addtodeletecs{\jlreq@option@foot@space}
+\keys_define:nn { jlreq } { foot_space .tl_set:N = \jlreq@option@foot@space }
+\__jlreq_aftercls_addtodeletecs:N \jlreq@option@foot@space
%.. のど
-\keys_define:nn { jlreq } { gutter .tl_set:N = \jlreq@option@gutter}
-\jlreq@aftercls@addtodeletecs{\jlreq@option@gutter}
+\keys_define:nn { jlreq } { gutter .tl_set:N = \jlreq@option@gutter }
+\__jlreq_aftercls_addtodeletecs:N \jlreq@option@gutter
%.. 小口
-\jlreq@aftercls@addtodeletecs{\jlreq@option@fore@edge}
+\__jlreq_aftercls_addtodeletecs:N \jlreq@option@fore@edge
\keys_define:nn { jlreq } {
fore_edge .tl_set:N = \jlreq@option@fore@edge,
fore-edge .tl_set:N = \jlreq@option@fore@edge
@@ -206,20 +208,20 @@
%.. 柱とノンブル
% 本文とヘッダ/フッタの間の空き
\keys_define:nn { jlreq } { headfoot_verticalposition .tl_set:N = \jlreq@option@headfoot@verticalpos}
-\jlreq@aftercls@addtodeletecs{\jlreq@option@headfoot@verticalpos}
+\__jlreq_aftercls_addtodeletecs:N \jlreq@option@headfoot@verticalpos
% 柱やノンブルの左右の空き
\keys_define:nn { jlreq } { headfoot_sidemargin .tl_set:N = \jlreq@headfoot@sidemargin}
%.. 段間
\keys_define:nn { jlreq } { column_gap .tl_set:N = \jlreq@option@column@gap}
-\jlreq@aftercls@addtodeletecs{\jlreq@option@column@gap}
+\__jlreq_aftercls_addtodeletecs:N \jlreq@option@column@gap
%.. 行送り,指定無しの場合は文字サイズの1.7倍とする.(1.5から2倍が好ましい:2.4.2.d 注3)
\keys_define:nn { jlreq } {
baselineskip .tl_set:N = \jlreq@option@baselineskip,
linegap .code:n = { \def\jlreq@option@baselineskip{1zw + #1} }
}
-\jlreq@aftercls@addtodeletecs{\jlreq@option@baselineskip}
+\__jlreq_aftercls_addtodeletecs:N \jlreq@option@baselineskip
%.. 組み方系
% 行頭に括弧が来たときの配置:3.1.5
@@ -231,16 +233,16 @@
% jsarticleと同じkanjiskipを使う
\newif\ifjlreq@narrow@kanjiskip\jlreq@narrow@kanjiskipfalse
\keys_define:nn { jlreq } { narrow_kanjiskip .code:n = {\jlreq@narrow@kanjiskiptrue}, narrow_kanjiskip .value_forbidden:n = true}
-\jlreq@aftercls@addtodeleteif{\ifjlreq@narrow@kanjiskip}
+\__jlreq_aftercls_addtodeleteif:N \ifjlreq@narrow@kanjiskip
%.. 注
% 傍注のタイプ
\keys_define:nn { jlreq } { sidenote_length .tl_set:N = \jlreq@option@sidenote@length }
-\jlreq@aftercls@addtodeletecs{\jlreq@option@sidenote@length}
+\__jlreq_aftercls_addtodeletecs:N \jlreq@option@sidenote@length
%.. 逆ノンブル
\newif\ifjlreq@option@use@reverse@pagination
-\jlreq@aftercls@addtodeleteif{\ifjlreq@option@use@reverse@pagination}
+\__jlreq_aftercls_addtodeleteif:N \ifjlreq@option@use@reverse@pagination
\jlreq@option@use@reverse@paginationfalse
\keys_define:nn { jlreq } { use_reverse_pagination .code:n = {\jlreq@option@use@reverse@paginationtrue}, use_reverse_pagination .value_forbidden:n = true }
@@ -250,7 +252,7 @@
\newif\if@landscape\@landscapefalse
\newif\if@tate \@tatefalse
\newif\ifjlreq@option@titlepage \jlreq@option@titlepagefalse % titlepageかnotitlepageかが指定された
-\jlreq@aftercls@addtodeleteif{\ifjlreq@option@titlepage}
+\__jlreq_aftercls_addtodeleteif:N \ifjlreq@option@titlepage
\keys_define:nn { jlreq } { landscape .code:n = {\@landscapetrue}, landscape .value_forbidden:n = true }
\keys_define:nn { jlreq } { tombo .code:n = {\ClassWarningNoLine{jlreq}{The~option~`tombo'~is~not~supported~by~jlreq~class.~Please~use~the~jlreq-trimmarks~package}} }
\keys_define:nn { jlreq } { tombow .code:n = {\ClassWarningNoLine{jlreq}{The~option~`tombow'~is~not~supported~by~jlreq~class.~Please~use~the~jlreq-trimmarks~package}} }
@@ -258,7 +260,7 @@
\keys_define:nn { jlreq } { tate .code:n = { \@tatetrue }, tate .value_forbidden:n = true}
\newif\ifjlreq@option@twoside\jlreq@option@twosidefalse % onesideかtwosideが指定された
-\jlreq@aftercls@addtodeleteif{\ifjlreq@option@twoside}
+\__jlreq_aftercls_addtodeleteif:N \ifjlreq@option@twoside
\keys_define:nn { jlreq } { oneside .code:n = { \@twosidefalse\@mparswitchfalse\jlreq@option@twosidetrue }, oneside .value_forbidden:n = true }
\keys_define:nn { jlreq } { twoside .code:n = { \@twosidetrue\@mparswitchtrue\jlreq@option@twosidetrue }, twoside .value_forbidden:n = true }
\keys_define:nn { jlreq } { onecolumn .code:n = { \@twocolumnfalse }, onecolumn .value_forbidden:n = true }
@@ -269,19 +271,18 @@
\keys_define:nn { jlreq } { final .code:n = { \setlength\overfullrule{0pt} }, final .value_forbidden:n = true }
\newif\if@openright
\newif\ifjlreq@option@open \jlreq@option@openfalse % openrightかopenanyが指定された
-\jlreq@aftercls@addtodeleteif{\ifjlreq@option@open}
+\__jlreq_aftercls_addtodeleteif:N \ifjlreq@option@open
\keys_define:nn { jlreq } { openright .code:n = { \@openrighttrue\jlreq@option@opentrue }, openright .value_forbidden:n = true}
\keys_define:nn { jlreq } { openany .code:n = { \@openrightfalse\jlreq@option@opentrue }, openany .value_forbidden:n = true}
\keys_define:nn { jlreq } { leqno .code:n = { \input{leqno.clo } }, leqno .value_forbidden:n = true}
\keys_define:nn { jlreq } { fleqn .code:n = { \input{fleqn.clo } }, fleqn .value_forbidden:n = true}
\newif\ifjlreq@option@enablejfam \jlreq@option@enablejfamtrue
-\jlreq@aftercls@addtodeleteif{\ifjlreq@option@enablejfam}
+\__jlreq_aftercls_addtodeleteif:N \ifjlreq@option@enablejfam
\keys_define:nn { jlreq } { disablejfam .code:n = { \jlreq@option@enablejfamfalse }, disablejfam .value_forbidden:n = true}
\def\jlreq@note#1{}
\keys_define:nn { jlreq } { jlreq_notes .code:n = { \def\jlreq@note##1{\message{^^JJLReq note: ##1^^J}}}, jlreq_notes .value_forbidden:n = true}
-%\ExecuteOptionsX{article_type=article,paper=a4,open_bracket_pos=zenkaku_tentsuki,onecolumn,final}
\keys_set:nn { jlreq } {
article_type=article,paper=a4,
number_of_lines={},line_length = {},
@@ -317,7 +318,7 @@
}
% \jlreqsetupの最後に必ず実行される処理を入れる.
\cs_set:Nn \__jlreq_jlreqsetup_addtofinally:n { \tl_gput_right:Nx \g__jlreq_jlreqsetup_finally_tl { \exp_not:n {#1} } }
-\jlreq@aftercls@addtodeletecs{\__jlreq_jlreqsetup_addtofinally:n}
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_jlreqsetup_addtofinally:n
\@onlypreamble\jlreqsetup
% エンジンの設定
@@ -352,7 +353,7 @@
\else
\RequirePackage{everyhook}
\def\jlreq@jfmname@prefix{}
- \jlreq@aftercls@addtodeletecs{\jlreq@jfmname@prefix}
+ \__jlreq_aftercls_addtodeletecs:N \jlreq@jfmname@prefix
\ifjlreq@burasage\edef\jlreq@jfmname@prefix{b\jlreq@jfmname@prefix}\fi
\str_if_eq:VnT \jlreq@open@bracket@pos { zenkakunibu_nibu } {
\edef\jlreq@jfmname@prefix { \jlreq@jfmname@prefix z }
@@ -360,8 +361,8 @@
\ifx u\jlreq@engine\edef\jlreq@jfmname@prefix{u\jlreq@jfmname@prefix}\fi
\edef\jlreq@jfmname{\jlreq@jfmname@prefix jlreq} % JFMの名前
\edef\jlreq@jfmnameg{\jlreq@jfmname@prefix jlreqg} % ゴシックなJFMの名前
- \jlreq@aftercls@addtodeletecs{\jlreq@jfmname}
- \jlreq@aftercls@addtodeletecs{\jlreq@jfmnameg}
+ \__jlreq_aftercls_addtodeletecs:N \jlreq@jfmname
+ \__jlreq_aftercls_addtodeletecs:N \jlreq@jfmnameg
\fi
% (u)pLaTeXの場合ここで初めて\epTeXinputencodingが発行されるので,
@@ -599,7 +600,7 @@
\jlreq@getfirsttoken@expandmacros{\jlreq@nextchar}{\jlreq@tempa}%
\expandafter\jlreq@ifletter\expandafter{\jlreq@tempa}{%
\jlreq@calc@jfmglue{\char\jlreq@lastnodechar}{\jlreq@tempa}%
-% \message{fixjfm Insert: \the\jlreq@resultskip}%
+% \message{fixjfm,~before~lastnodechar~=~\the\jlreq@lastnodechar,~after~=~\meaning\jlreq@nextchar,~Insert:~\the\jlreq@resultskip}
\edef\jlreq@do{%
\noexpand\hskip\the\jlreq@resultskip\space
\noexpand\inhibitglue
@@ -655,7 +656,7 @@
\else
\def\jlreq@expand@optionfontsize#1{\dimexpr#1\relax}
\fi
-\jlreq@aftercls@addtodeletecs{\jlreq@expand@optionfontsize}
+\__jlreq_aftercls_addtodeletecs:N \jlreq@expand@optionfontsize
\ifx\jlreq@option@fontsize\@empty
\ifx\jlreq@option@jafontsize\@empty
\jlreq@fontsize=10pt
@@ -696,7 +697,7 @@
\fi
\jlreq@divide{\jlreq@jafontsize}{\jlreq@fontsize}
\edef\jlreq@jafontscale{\strip@pt\jlreq@resultdimen}
-\jlreq@aftercls@addtodeletecs{\jlreq@jafontscale}
+\__jlreq_aftercls_addtodeletecs:N \jlreq@jafontscale
\ifx l\jlreq@engine
\jlreq@saveoriginalcs{DeclareFontShape}
\def\DeclareFontShape#1#2#3#4#5#6{
@@ -737,9 +738,8 @@
\DeclareFontShape{\jlreq@tatekanjiencoding}{mc}{m}{n-jidori}{<->s*[\jlreq@jafontscale]\jlreq@tempa jlreq-v-jidori}{}
\DeclareFontShape{\jlreq@tatekanjiencoding}{gt}{m}{n-jidori}{<->s*[\jlreq@jafontscale]\jlreq@tempa jlreqg-v-jidori}{}
\fi
-\clist_set:NV \l_jlreq_tmpa_clist \jlreq@yokokanjiencoding
-\clist_push:NV \l_jlreq_tmpa_clist \jlreq@tatekanjiencoding
-\clist_map_inline:Nn \l_jlreq_tmpa_clist {% #1 = encoding
+
+\exp_args:Nx \clist_map_inline:nn {\jlreq@yokokanjiencoding,\jlreq@tatekanjiencoding} {% #1 = encoding
\clist_map_inline:nn { n,it,sl,sc } {% ##1 = shape
\clist_map_inline:nn { m,b,bx,sb,c } {% ####1 = series
\bool_if:nF { \str_if_eq_p:nn {##1} {n} && \str_if_eq_p:nn {####1} {m} } {
@@ -792,7 +792,7 @@
\ifx l\jlreq@engine
% \itemの直後は折り返し行頭と同じにする.
\cs_set:Nn \__jlreq_hook_everypar: {}
- \def\item{%
+ \renewcommand*{\item}{%
\cs_set:Nn \__jlreq_hook_everypar: { \cs_set:Nn \__jlreq_hook_everypar: {} \inhibitglue }
\expandafter\everypar\expandafter{\the\everypar\__jlreq_hook_everypar:}
\jlreq@useoriginalcs{item}%
@@ -804,20 +804,20 @@
% 行頭括弧に対して\inhibitglueを入れたりする命令を作る
% \jlreq@charlist@openingbracketsの各括弧に対して,\ifx\jlreq@nextchar 「1\fiみたいなのが並んだのを作る
\def\jlreq@tempa{}
- \def\jlreq@do#1{\jlreq@ifendmark{#1}{}{\appto\jlreq@tempa{\ifx\jlreq@nextchar#11\fi}\jlreq@do}}
+ \def\jlreq@do#1{\jlreq@ifendmark{#1}{}{\tl_put_right:Nn \jlreq@tempa{\ifx\jlreq@nextchar#11\fi}\jlreq@do}}
\expandafter\jlreq@do\jlreq@charlist@openingbrackets\jlreq@endmark
% JFM glueの伸び縮みで行頭括弧が揃わないのを防ぐために常に\inhibitglueを入れる.
\str_if_eq:VnTF \jlreq@open@bracket@pos { nibu_tentsuki } {
- \edef\jlreq@openbracket@hook@ii{\noexpand\ifnum0\expandonce{\jlreq@tempa}>0~\unexpanded{\hskip -.5\jlreq@zw\inhibitglue}\noexpand\fi}
+ \edef\jlreq@openbracket@hook@ii{\noexpand\ifnum0\exp_not:o {\jlreq@tempa}>0~\unexpanded{\hskip -.5\jlreq@zw\inhibitglue}\noexpand\fi}
}{% zenkakunibu_nibu,zenkaku_tentsuki
- \edef\jlreq@openbracket@hook@ii{\noexpand\ifnum0\expandonce{\jlreq@tempa}>0~\unexpanded{\inhibitglue}\noexpand\fi}
+ \edef\jlreq@openbracket@hook@ii{\noexpand\ifnum0\exp_not:o {\jlreq@tempa}>0~\unexpanded{\inhibitglue}\noexpand\fi}
}
% source special対策
\def\jlreq@openbracket@hook@i{\ifx\jlreq@nextchar\special\expandafter\jlreq@openbracket@hook@iii\else\expandafter\jlreq@openbracket@hook@ii\fi}
\def\jlreq@openbracket@hook@iii#1#2{#1{#2}\futurelet\jlreq@nextchar\jlreq@openbracket@hook@i}
\def\jlreq@openbracket@hook{\futurelet\jlreq@nextchar\jlreq@openbracket@hook@i}
\let\jlreq@hook@everypar=\jlreq@openbracket@hook
- \def\item{%
+ \renewcommand*{\item}{%
\def\jlreq@hook@everypar{%
\let\jlreq@hook@everypar=\jlreq@openbracket@hook
\inhibitglue
@@ -828,19 +828,19 @@
%.. 禁則処理
\ifx l\jlreq@engine
- \def\jlreq@setpostbreakpenalty@#1#2{\ltjsetparameter{postbreakpenalty={`#1,#2}}}
- \def\jlreq@setprebreakpenalty@#1#2{\ltjsetparameter{prebreakpenalty={`#1,#2}}}
- \def\jlreq@addjaxspmode@#1#2{%
+ \cs_set:Nn \__jlreq_setpostbreakpenalty_aux:nn {\ltjsetparameter{postbreakpenalty={`#1,#2}}}
+ \cs_set:Nn \__jlreq_setprebreakpenalty_aux:nn {\ltjsetparameter{prebreakpenalty={`#1,#2}}}
+ \cs_set:Nn \__jlreq_addjaxspmode_aux:nn {%
\jlreq@tempcnta=\ltjgetparameter{jaxspmode}{`#1}%
- \jlreq@switch{#2}{
- {pre}{%
+ \str_case:nn {#2} {
+ { pre } {%
\ifnum\jlreq@tempcnta=2
\ltjsetparameter{jaxspmode={`#1,allow}}%
\else\ifnum\jlreq@tempcnta=0
\ltjsetparameter{jaxspmode={`#1,preonly}}%
\fi\fi
}
- {post}{%
+ { post } {%
\ifnum\jlreq@tempcnta=1
\ltjsetparameter{jaxspmode={`#1,allow}}%
\else\ifnum\jlreq@tempcnta=0
@@ -849,17 +849,17 @@
}
}%
}
- \def\jlreq@deljaxspmode@#1#2{%
+ \cs_set:Nn \__jlreq_deljaxspmode_aux:nn {
\jlreq@tempcnta=\ltjgetparameter{jaxspmode}{`#1}%
- \jlreq@switch{#2}{
- {pre}{%
+ \str_case:nn {#2} {
+ { pre } {%
\ifnum\jlreq@tempcnta=2
\ltjsetparameter{jaxspmode={`#1,postonly}}%
\else\ifnum\jlreq@tempcnta=1
\ltjsetparameter{jaxspmode={`#1,inhibit}}%
\fi\fi
}
- {post}{%
+ { post } {%
\ifnum\jlreq@tempcnta=3
\ltjsetparameter{jaxspmode={`#1,preonly}}%
\else\ifnum\jlreq@tempcnta=2
@@ -869,19 +869,19 @@
}%
}
\else
- \def\jlreq@setpostbreakpenalty@#1#2{\postbreakpenalty`#1=#2}
- \def\jlreq@setprebreakpenalty@#1#2{\prebreakpenalty`#1=#2}
- \def\jlreq@addjaxspmode@#1#2{%
+ \cs_set:Nn \__jlreq_setpostbreakpenalty_aux:nn {\postbreakpenalty`#1=#2}
+ \cs_set:Nn \__jlreq_setprebreakpenalty_aux:nn {\prebreakpenalty`#1=#2}
+ \cs_set:Nn \__jlreq_addjaxspmode_aux:nn {
\jlreq@tempcnta=\inhibitxspcode`#1
- \jlreq@switch{#2}{
- {pre}{%
+ \str_case:nn {#2} {
+ { pre }{%
\ifnum\jlreq@tempcnta=1
\inhibitxspcode`#1=3
\else\ifnum\jlreq@tempcnta=0
\inhibitxspcode`#1=2
\fi\fi
}
- {post}{%
+ { post }{%
\ifnum\jlreq@tempcnta=2
\inhibitxspcode`#1=3
\else\ifnum\jlreq@tempcnta=0
@@ -890,17 +890,17 @@
}
}%
}
- \def\jlreq@deljaxspmode@#1#2{%
+ \cs_set:Nn \__jlreq_deljaxspmode_aux:nn {
\jlreq@tempcnta=\inhibitxspcode`#1
- \jlreq@switch{#2}{
- {pre}{%
+ \str_case;nn {#2} {
+ { pre } {%
\ifnum\jlreq@tempcnta=3
\inhibitxspcode`#1=1
\else\ifnum\jlreq@tempcnta=2
\inhibitxspcode`#1=0
\fi\fi
}
- {post}{%
+ { post } {%
\ifnum\jlreq@tempcnta=3
\inhibitxspcode`#1=2
\else\ifnum\jlreq@tempcnta=1
@@ -911,33 +911,33 @@
}
\fi
% #1{...}{#3}を...が#2のリストに対して適用.
-\cs_set:Nn \__jlreq_iterateapply:nnn {
+\cs_set:Nn \__jlreq_iterateapply:Nnn {
\tl_map_inline:nn {#2} {
#1{##1}{#3}
}
}
-\cs_set:Nn \__jlreq_setpostbreakpenalty:nn { \__jlreq_iterateapply:nnn {\jlreq@setpostbreakpenalty@} {#1} {#2}}
+\cs_set:Nn \__jlreq_setpostbreakpenalty:nn { \__jlreq_iterateapply:Nnn \__jlreq_setpostbreakpenalty_aux:nn {#1} {#2}}
\cs_generate_variant:Nn \__jlreq_setpostbreakpenalty:nn { Vn }
-\cs_set:Nn \__jlreq_setprebreakpenalty:nn { \__jlreq_iterateapply:nnn {\jlreq@setprebreakpenalty@} {#1} {#2} }
+\cs_set:Nn \__jlreq_setprebreakpenalty:nn { \__jlreq_iterateapply:Nnn \__jlreq_setprebreakpenalty_aux:nn {#1} {#2} }
\cs_generate_variant:Nn \__jlreq_setprebreakpenalty:nn { Vn }
-\cs_set:Nn \__jlreq_addjaxspmode:nn {\__jlreq_iterateapply:nnn {\jlreq@addjaxspmode@} {#1} {#2} }
+\cs_set:Nn \__jlreq_addjaxspmode:nn {\__jlreq_iterateapply:Nnn \__jlreq_addjaxspmode_aux:nn {#1} {#2} }
\cs_generate_variant:Nn \__jlreq_addjaxspmode:nn { Vn }
-\cs_set:Nn \__jlreq_deljaxspmode:nn { \__jlreq_iterateapply:nnn{\jlreq@deljaxspmode@} {#1} {#2} }
+\cs_set:Nn \__jlreq_deljaxspmode:nn { \__jlreq_iterateapply:Nnn \__jlreq_deljaxspmode_aux:nn {#1} {#2} }
\cs_generate_variant:Nn \__jlreq_deljaxspmode:nn { Vn }
-\jlreq@aftercls@addtodeletecs{\__jlreq_iterateapply:nnn}
-\jlreq@aftercls@addtodeletecs{\__jlreq_setpostbreakpenalty:nn}
-\jlreq@aftercls@addtodeletecs{\__jlreq_setpostbreakpenalty:Vn}
-\jlreq@aftercls@addtodeletecs{\jlreq@setpostbreakpenalty@}
-\jlreq@aftercls@addtodeletecs{\__jlreq_setprebreakpenalty:nn}
-\jlreq@aftercls@addtodeletecs{\__jlreq_setprebreakpenalty:Vn}
-\jlreq@aftercls@addtodeletecs{\jlreq@setprebreakpenalty@}
-\jlreq@aftercls@addtodeletecs{\__jlreq_addjaxspmode:nn}
-\jlreq@aftercls@addtodeletecs{\__jlreq_addjaxspmode:Vn}
-\jlreq@aftercls@addtodeletecs{\jlreq@addjaxspmode@}
-\jlreq@aftercls@addtodeletecs{\__jlreq_deljaxspmode:nn}
-\jlreq@aftercls@addtodeletecs{\__jlreq_deljaxspmode:Vn}
-\jlreq@aftercls@addtodeletecs{\jlreq@deljaxspmode@}
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_iterateapply:Nnn
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_setpostbreakpenalty:nn
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_setpostbreakpenalty:Vn
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_setpostbreakpenalty_aux:nn
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_setprebreakpenalty:nn
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_setprebreakpenalty:Vn
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_setprebreakpenalty_aux:nn
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_addjaxspmode:nn
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_addjaxspmode:Vn
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_addjaxspmode_aux:nn
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_deljaxspmode:nn
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_deljaxspmode:Vn
+\__jlreq_aftercls_addtodeletecs:N \__jlreq_deljaxspmode_aux:nn
% 行末禁則
\__jlreq_setpostbreakpenalty:Vn \jlreq@charlist@openingbrackets {10000}
@@ -977,7 +977,7 @@
\cs_set:Nn \__jlreq_setkcatcode:nn {
\clist_map_inline:nn {#1} { \kcatcode"##1=#2\relax }
}
- \jlreq@aftercls@addtodeletecs{\__jlreq_setkcatcode:nn}
+ \__jlreq_aftercls_addtodeletecs:N \__jlreq_setkcatcode:nn
% LuaTeX-jaのデフォルトのままに近い設定をする
% 範囲1&8
\__jlreq_setkcatcode:nn {80} {15} % Latin-1 Supplement,どうしよう……
@@ -1063,13 +1063,13 @@
\DeclareRobustCommand*\ {\futurelet\jlreq@nextchar\jlreq@zenkakuspace@ignorespaces}
% 後続の空白を無視する処理
\edef\jlreq@zenkakuspace@ignorespaces{%
- \noexpand\ifx\expandonce{\space}\unexpanded{\jlreq@nextchar\expandafter\jlreq@zenkakuspace@ignorespaces@\else\expandafter\jlreq@zenkakuspace@main\fi}%
+ \noexpand\ifx\exp_not:o {\space}\unexpanded{\jlreq@nextchar\expandafter\jlreq@zenkakuspace@ignorespaces@\else\expandafter\jlreq@zenkakuspace@main\fi}%
}
\expandafter\def\expandafter\jlreq@zenkakuspace@ignorespaces@\space{\ }
\def\jlreq@tempa{}
-\def\jlreq@do#1{\jlreq@ifendmark{#1}{}{\appto\jlreq@tempa{\ifnum\lastnodechar=`#1~1\fi}\jlreq@do}}
+\def\jlreq@do#1{\jlreq@ifendmark{#1}{}{\tl_put_right:Nn \jlreq@tempa{\ifnum\lastnodechar=`#1~1\fi}\jlreq@do}}
\expandafter\jlreq@do\jlreq@charlist@dividingpunctuationmarks\jlreq@endmark
-\edef\@tempa{\noexpand\ifnum0\expandonce{\jlreq@tempa}>0~}
+\edef\@tempa{\noexpand\ifnum0\exp_not:o {\jlreq@tempa}>0~}
\expandafter\DeclareRobustCommand\expandafter*\expandafter\jlreq@zenkakuspace@main\expandafter{\@tempa
\hskip 1\jlreq@zw\hbox{}%
\jlreq@lastnodechar=` 
@@ -1096,10 +1096,10 @@
% 区切り約物.\? みたいな命令を作る.直後の空きが自動で入る.
% \?*とすると文中の?として扱われる.
\def\jlreq@tempa{}
-\def\jlreq@do#1{\jlreq@ifendmark{#1}{}{\appto\jlreq@tempa{\ifx\jlreq@nextchar #11\fi}\jlreq@do}}
+\def\jlreq@do#1{\jlreq@ifendmark{#1}{}{\tl_put_right:Nn \jlreq@tempa{\ifx\jlreq@nextchar #11\fi}\jlreq@do}}
\expandafter\jlreq@do\jlreq@charlist@closingbrackets\jlreq@endmark
\edef\jlreq@dividingpunctuationmarkscommand{%
- \noexpand\ifnum 0\expandonce{\jlreq@tempa}>0~\unexpanded{\expandafter\ignorespaces\else\expandafter\ \fi}%
+ \noexpand\ifnum 0\exp_not:o {\jlreq@tempa}>0~\unexpanded{\expandafter\ignorespaces\else\expandafter\ \fi}%
}
\def\jlreq@do#1{%
\jlreq@ifendmark{#1}{}{
@@ -1140,14 +1140,15 @@
\emergencystretch 3\jlreq@gol
\setlength{\parindent}{1\zw}
-\def\jlreq@setfontsizehook{}
-\jlreq@saveoriginalcs{set@fontsize}
-\apptocmd{\set@fontsize}{\expandafter\def\expandafter\size@update\expandafter{\size@update\jlreq@setfontsizehook}}{}{}
-\appto\jlreq@setfontsizehook{ \dim_compare:nT { \parindent>0pt } { \setlength{\parindent}{1\jlreq@zw} } }
+\hook_gput_code:nnn { cmd/set@fontsize/after } {.} {
+ \expandafter\def\expandafter\size@update\expandafter{\size@update\g__jlreq_setfontsizehook}
+}
+\tl_new:N \g__jlreq_setfontsizehook
+\tl_set:Nn \g__jlreq_setfontsizehook { \dim_compare:nT { \parindent>0pt } { \setlength{\parindent}{1\jlreq@zw} } }
\ifx l\jlreq@engine
\@tempskipa=\ltjgetparameter{kanjiskip}
\ifdim\@tempskipa=\maxdimen\else
- \appto\jlreq@setfontsizehook{%
+ \tl_put_right:Nn \g__jlreq_setfontsizehook {%
\ltj@setpar@global
\ltjsetkanjiskip\jlreqkanjiskip
\@tempskipa=\ltjgetparameter{xkanjiskip}%
@@ -1157,7 +1158,7 @@
}
\fi
\else
- \appto\jlreq@setfontsizehook{%
+ \tl_put_right:Nn \g__jlreq_setfontsizehook {%
\kanjiskip=\jlreqkanjiskip
\ifdim\xkanjiskip>0pt
\xkanjiskip=\jlreqxkanjiskip
@@ -1357,8 +1358,8 @@
\jlreq@determine@kihonhanmen@warning@firstfalse
\fi
}
-\jlreq@aftercls@addtodeletecs{\jlreq@determine@kihonhanmen@warning}
-\jlreq@aftercls@addtodeleteif{\ifjlreq@determine@kihonhanmen@warning@first}
+\__jlreq_aftercls_addtodeletecs:N \jlreq@determine@kihonhanmen@warning
+\__jlreq_aftercls_addtodeleteif:N \ifjlreq@determine@kihonhanmen@warning@first
\@tempdima=1\zw
\ifx\jlreq@option@line@length\@empty
\if@tate
@@ -1412,7 +1413,7 @@
\divide\textheight\baselineskip \multiply\textheight\baselineskip
\addtolength{\textheight}{\topskip}
}
-\jlreq@aftercls@addtodeletecs{\jlreq@adjusttextheight}
+\__jlreq_aftercls_addtodeletecs:N \jlreq@adjusttextheight
\ifx\jlreq@option@number@of@lines\@empty
\if@tate
\ifnum 0\ifx\jlreq@option@gutter\@empty 1\fi\ifx\jlreq@option@fore@edge\@empty 1\fi>0
@@ -1457,8 +1458,8 @@
\jlreq@note{基本版面の配置はのどの空き量を指定する (2.4.1.b).}
\fi
}
-\jlreq@aftercls@addtodeletecs{\jlreq@setsidemargin@by@gutter}
-\jlreq@aftercls@addtodeletecs{\jlreq@setsidemargin@by@fore@edge}
+\__jlreq_aftercls_addtodeletecs:N \jlreq@setsidemargin@by@gutter
+\__jlreq_aftercls_addtodeletecs:N \jlreq@setsidemargin@by@fore@edge
\ifx\jlreq@option@gutter\@empty
\ifx\jlreq@option@fore@edge\@empty
@@ -1511,7 +1512,7 @@
\setlength{\topmargin}{\dimexpr #1 - \headsep - \headheight - \topskip + \Cht\relax}
\fi
}
-\jlreq@aftercls@addtodeletecs{\jlreq@settopmarginbyhead}
+\__jlreq_aftercls_addtodeletecs:N \jlreq@settopmarginbyhead
% 地の値から
\def\jlreq@settopmarginbyfoot#1{
\if@tate
@@ -1521,7 +1522,7 @@
\setlength{\topmargin}{\dimexpr\paperheight - \textheight + \topskip - 1\zh - \headsep - \headheight - #1\relax}
\fi
}
-\jlreq@aftercls@addtodeletecs{\jlreq@settopmarginbyfoot}
+\__jlreq_aftercls_addtodeletecs:N \jlreq@settopmarginbyfoot
\ifx\jlreq@option@head@space\@empty
\ifx\jlreq@option@foot@space\@empty
\if@tate
@@ -1624,7 +1625,7 @@
\jlreq@tempdimb=\dimexpr\the\numexpr\jlreq@tempdima/\dimexpr 1\jlreq@zw\relax + 2\relax\jlreq@zw\relax
\edef\jlreq@do{%
\unexpanded{\def\jlreq@result}{%
- \noexpand\def\expandonce{\csname l@#1\endcsname}{%
+ \noexpand\def\exp_not:c {l@#1}{%
\unexpanded{\@dottedtocline{#2}{0pt}}{\the\jlreq@tempdimb}%
}%
}%
@@ -1669,7 +1670,7 @@
\begingroup
\let\jlreq@contents@label@format=\@undefined
\let\jlreq@format=\@undefined
- \edef\jlreq@label@format{\expandonce{\csname the#1\endcsname}}%
+ \edef\jlreq@label@format{\exp_not:c {the#1}}%
\newif\ifjlreq@number
\keys_define:nn { DeclareTobiraHeading:#1 } {
label_format .tl_set:N = \jlreq@label@format,
@@ -1686,12 +1687,12 @@
\ifx\jlreq@format\@undefined
\def\jlreq@format##1##2{##1##2}%
\fi
- \edef\jlreq@formatwlabel{\noexpand\jlreq@format{\expandonce{\jlreq@label@format}}}%
+ \edef\jlreq@formatwlabel{\noexpand\jlreq@format{\exp_not:o {\jlreq@label@format}}}%
\jlreq@heading@make@l@{#1}{#2}{\jlreq@label@format}%
- \eappto\jlreq@do{\expandonce{\jlreq@result}}%
+ \tl_put_right:Nx \jlreq@do {\exp_not:o {\jlreq@result}}%
\edef\jlreq@do{%
- \expandonce{\jlreq@do}%
- \noexpand\def\expandonce{\csname jlreq@TobiraHeading@start@#1\endcsname}[####1]####2{%
+ \exp_not:o {\jlreq@do}%
+ \noexpand\def\exp_not:c {jlreq@TobiraHeading@start@#1}[####1]####2{%
\ifjlreq@number
\unexpanded{\ifnum#2>\c@secnumdepth\else}%
\unexpanded{\refstepcounter{#1}}%
@@ -1704,41 +1705,41 @@
\ifjlreq@number
\unexpanded{\jlreq@if{\ifnum#2>\c@secnumdepth\relax\fi}}{%
\unexpanded{\long\gdef\jlreqHeadingLabel####1{}}%
- \expandonce{\jlreq@format{}{##1}}%
+ \exp_not:o {\jlreq@format{}{##1}}%
}{%
\unexpanded{\long\gdef\jlreqHeadingLabel####1{####1}}%
- \expandafter\expandonce\expandafter{\jlreq@formatwlabel{##2}}%
+ \expandafter\exp_not:o \expandafter{\jlreq@formatwlabel{##2}}%
}%
\else
\unexpanded{\long\gdef\jlreqHeadingLabel####1{}}%
- \expandonce{\jlreq@format{}{##1}}%
+ \exp_not:o {\jlreq@format{}{##1}}%
\fi
- \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}{\ifjlreq@number\else -\fi}{\expandonce{\jlreq@label@format}}{####1}%
+ \exp_not:c {jlreq@heading@maketoc@#1}{\ifjlreq@number\else -\fi}{\exp_not:o {\jlreq@label@format}}{####1}%
\noexpand\@afterheading
- \expandonce{\jlreq@heading@clearpage}%
+ \exp_not:o {\jlreq@heading@clearpage}%
\unexpanded{\if@restonecol\twocolumn\fi}%
}%
- \noexpand\def\expandonce{\csname jlreq@TobiraHeading@start@s@#1\endcsname}####1{%
+ \noexpand\def\exp_not:c {jlreq@TobiraHeading@start@s@#1}####1{%
\unexpanded{\long\gdef\jlreqHeadingLabel####1{}}%
\unexpanded{\jlreq@ifempty{##1}%
{\long\gdef\jlreqHeadingText####1{}}%
{\long\gdef\jlreqHeadingText####1{####1}}%
}%
- \expandonce{\jlreq@format{}{##1}}
- \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}{*}{\expandonce{\jlreq@label@format}}{####1}%
+ \exp_not:o {\jlreq@format{}{##1}}
+ \exp_not:c {jlreq@heading@maketoc@#1}{*}{\exp_not:o {\jlreq@label@format}}{####1}%
\noexpand\@afterheading
- \expandonce{\jlreq@heading@clearpage}%
+ \exp_not:o {\jlreq@heading@clearpage}%
\unexpanded{\if@restonecol\twocolumn\fi}%
}%
- \noexpand\def\expandonce{\csname jlreq@headingcs@#1\endcsname}{%
+ \noexpand\def\exp_not:c {jlreq@headingcs@#1}{%
% 改丁.これでよいのかな.
\unexpanded{\if@twocolumn\onecolumn\@restonecoltrue\else\@restonecolfalse\fi\cleartooddpage[empty]}%
- \ifx\jlreq@pagestyle\@empty\else\noexpand\thispagestyle{\expandonce{\jlreq@pagestyle}}\fi
- \noexpand\secdef{\expandonce{\csname jlreq@TobiraHeading@start@#1\endcsname}}{\expandonce{\csname jlreq@TobiraHeading@start@s@#1\endcsname}}}%
- \noexpand\def\expandonce{\csname #1\endcsname}{%
+ \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}{%
\noexpand\UseHook{jlreq/heading/before}%
\noexpand\UseHook{jlreq/heading/before/#1}%
- \expandonce{\csname jlreq@headingcs@#1\endcsname}%
+ \exp_not:c {jlreq@headingcs@#1}%
}%
}%
\expandafter\endgroup
@@ -1771,8 +1772,8 @@
\long\def\jlreq@BlockHeading@start#1#2#3#4#5#6{%
\if@noskipsec\leavevmode\fi
% #5と#6は\parを含むかもしれないので引数渡しはしない(後の\@ifstarで詰まる)
- \edef\jlreq@BlockHeading@start@eachformat{\expandonce{\@firstoftwo#5}}%
- \edef\jlreq@BlockHeading@start@format{\expandonce{\@secondoftwo#5}}%
+ \edef\jlreq@BlockHeading@start@eachformat{\exp_not:o {\@firstoftwo#5}}%
+ \edef\jlreq@BlockHeading@start@format{\exp_not:o {\@secondoftwo#5}}%
\edef\jlreq@BlockHeading@start@totalformat{\unexpanded{#6}}%
\jlreq@BlockHeading@start@{#1}{#2}{#3}{#4}%
}
@@ -1787,20 +1788,20 @@
% {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}}}%
+ \edef\jlreq@do{\unexpanded{\jlreq@BlockHeading@start@@@@{#1}{#2}{#3}}{\exp_not:o {\jlreq@BlockHeading@start@totalformat}}}%
\jlreq@do{#4}{#5}{#6}{#7}%
}
% {1 = 命令}{2 = レベル}{3 = スペース関連}{4 = 全フォーマット}{5 = *}{6 = running head}{7 = 見出し}{8 = 副題}
\long\def\jlreq@BlockHeading@start@@@@#1#2#3#4#5#6#7#8{%
\edef\jlreq@tempa##1##2##3##4##5##6##7{%
- \unexpanded{\jlreq@BlockHeading@start@makeoutput{#1}{#2}}{{##1}{##2}{##3}}{\expandonce{\jlreq@BlockHeading@start@eachformat}}{\expandonce{\jlreq@BlockHeading@start@format}}\unexpanded{{#5}{#6}{#7}{#8}}%
+ \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
- \gappto\jlreq@BlockHeading@spaces@current@sequence{_#1}%
+ \tl_gput_right:Nn \jlreq@BlockHeading@spaces@current@sequence {_#1}%
% 連続する見出しの間の処理をするために,即時では出力せず,いったんマクロに格納する.
% \jlreq@BlockHeading@spaces@current@before@<n>
% \jlreq@BlockHeading@start@gyodori\jlreq@BlockHeading@spaces@current@space@<n>{jlreq@BlockHeading@spaces@current@output@<n>}
@@ -1808,16 +1809,16 @@
% \jlreq@BlockHeading@spaces@current@after@<n>
% として後に呼び出される.(spaceは書き換えられる可能性がある.)
\expandafter\xdef\csname jlreq@BlockHeading@spaces@current@output@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
- \expandonce{\jlreq@resultb}%
+ \exp_not:o {\jlreq@resultb}%
}%
\expandafter\xdef\csname jlreq@BlockHeading@spaces@current@space@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
- \expandonce{\jlreq@tempb}%
+ \exp_not:o {\jlreq@tempb}%
}%
\def\@tempa##1##2##3{##1}%
\expandafter\xdef\csname jlreq@BlockHeading@spaces@current@before@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
\noexpand\allowbreak
- \expandonce{\@tempa#4}%
- \expandonce{\jlreq@resulta}%
+ \exp_not:o {\@tempa#4}%
+ \exp_not:o {\jlreq@resulta}%
\ifjlreq@tempa\unexpanded{%
\jlreq@setcurrentpage
\edef\jlreq@BlockHeading@currentpage{\the\jlreq@currentpage}%
@@ -1825,17 +1826,17 @@
}%
\def\@tempa##1##2##3{##2}%
\expandafter\xdef\csname jlreq@BlockHeading@spaces@current@format@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
- \expandonce{\@tempa#4}%
+ \exp_not:o {\@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}%
+ \exp_not:o {\jlreq@resultc}%
\ifjlreq@tempa\unexpanded{%
\ifx\jlreq@BlockHeading@currentpage\@empty\nobreak\else
\ifodd\jlreq@BlockHeading@currentpage\nobreak\else\allowbreak\fi
\fi
}\else\noexpand\nobreak\fi
- \expandonce{\@tempa#4}%
+ \exp_not:o {\@tempa#4}%
}%
\ifx\jlreq@BlockHeading@spaces@headingslist\@empty
\expandafter\jlreq@BlockHeading@spaces@outputwospace
@@ -1847,7 +1848,7 @@
\def\jlreq@BlockHeading@start@afterheading{\futurelet\jlreq@nextchar\jlreq@BlockHeading@start@afterheading@i}
\edef\jlreq@BlockHeading@start@afterheading@i{%
- \noexpand\ifx\expandonce{\space}\unexpanded{\jlreq@nextchar\expandafter\jlreq@BlockHeading@start@afterheading@skipspaces}%
+ \noexpand\ifx\exp_not:o {\space}\unexpanded{\jlreq@nextchar\expandafter\jlreq@BlockHeading@start@afterheading@skipspaces}%
\unexpanded{\else\expandafter\jlreq@BlockHeading@start@afterheading@ii\fi}%
}
% スペースを読み飛ばす
@@ -1873,11 +1874,11 @@
% コントロールシークエンスを保存
\long\def\jlreq@BlockHeading@start@afterheading@saveafter@cs@noargument#1{%
- \csgappto{jlreq@BlockHeading@spaces@current@after@\the\jlreq@BlockHeading@spaces@current@count}{#1}%
+ \tl_put_right:cn {jlreq@BlockHeading@spaces@current@after@\the\jlreq@BlockHeading@spaces@current@count} {#1}
\jlreq@BlockHeading@start@afterheading
}
\long\def\jlreq@BlockHeading@start@afterheading@saveafter@cs#1{%
- \csgappto{jlreq@BlockHeading@spaces@current@after@\the\jlreq@BlockHeading@spaces@current@count}{#1}%
+ \tl_put_right:cn {jlreq@BlockHeading@spaces@current@after@\the\jlreq@BlockHeading@spaces@current@count} {#1}
\jlreq@BlockHeading@start@afterheading@saveafter@option
}
% オプションがあれば保存
@@ -1885,7 +1886,7 @@
\@ifnextchar[{\jlreq@BlockHeading@start@afterheading@saveafter@option@}{\jlreq@BlockHeading@start@afterheading@saveafter@arguments}%
}
\long\def\jlreq@BlockHeading@start@afterheading@saveafter@option@[#1]{%
- \csxappto{jlreq@BlockHeading@spaces@current@after@\the\jlreq@BlockHeading@spaces@current@count}{\unexpanded{[#1]}}%
+ \tl_put_right:cx {jlreq@BlockHeading@spaces@current@after@\the\jlreq@BlockHeading@spaces@current@count} {\exp_not:n {[#1]}}
\jlreq@BlockHeading@start@afterheading@saveafter@arguments
}
% 引数を保存し続けるループ
@@ -1896,14 +1897,14 @@
\noexpand\ifx\space\unexpanded{\jlreq@nextchar\expandafter\jlreq@BlockHeading@start@afterheading@saveafter@arguments@@\else\expandafter\jlreq@BlockHeading@start@afterheading@saveafter@arguments@@@\fi}%
}
\expandafter\def\expandafter\jlreq@BlockHeading@start@afterheading@saveafter@arguments@@\space{%
- \csgappto{jlreq@BlockHeading@spaces@current@after@\the\jlreq@BlockHeading@spaces@current@count}{ }%
+ \tl_put_right:cn {jlreq@BlockHeading@spaces@current@after@\the\jlreq@BlockHeading@spaces@current@count} { }
\jlreq@BlockHeading@start@afterheading@saveafter@arguments
}
\def\jlreq@BlockHeading@start@afterheading@saveafter@arguments@@@{%
\jlreq@ifnextchar\bgroup{\jlreq@BlockHeading@start@afterheading@saveafter@arguments@@@@}{\jlreq@BlockHeading@start@afterheading}%
}
\long\def\jlreq@BlockHeading@start@afterheading@saveafter@arguments@@@@#1{%
- \csxappto{jlreq@BlockHeading@spaces@current@after@\the\jlreq@BlockHeading@spaces@current@count}{\unexpanded{{#1}}}%
+ \tl_put_right:cx {jlreq@BlockHeading@spaces@current@after@\the\jlreq@BlockHeading@spaces@current@count} {\exp_not:n {{#1}}}
\jlreq@BlockHeading@start@afterheading@saveafter@arguments
}
@@ -1923,9 +1924,9 @@
\fi
\edef\jlreq@tempa{\expandafter\jlreq@BlockHeading@start@geteachformat\expandafter{\jlreq@tempc}#4}% {ラベルフォーマット}{本文フォーマット}{副題フォーマット}
\edef\jlreq@tempb{\expandafter\jlreq@BlockHeading@start@getformat\expandafter{\jlreq@tempc}#5}% {まとめるフォーマット}
- \edef\jlreq@do{\noexpand\jlreq@BlockHeading@start@makeoutput@@\expandonce{\jlreq@tempa}\expandonce{\jlreq@tempb}\unexpanded{{#8}{#9}}}%
+ \edef\jlreq@do{\noexpand\jlreq@BlockHeading@start@makeoutput@@\exp_not:o {\jlreq@tempa}\exp_not:o {\jlreq@tempb}\unexpanded{{#8}{#9}}}%
\jlreq@do
- \edef\jlreq@do{\noexpand\jlreq@BlockHeading@start@makeoutput@\unexpanded{#3}{\expandonce{\jlreq@result}}}%
+ \edef\jlreq@do{\noexpand\jlreq@BlockHeading@start@makeoutput@\unexpanded{#3}{\exp_not:o {\jlreq@result}}}%
\jlreq@do
% \jlreq@tempa -> 素のラベルフォーマット
\edef\jlreq@tempa{\jlreq@BlockHeading@start@getonlylabelformat#4}%
@@ -1945,10 +1946,10 @@
{\unexpanded{\long\gdef\jlreqHeadingSubtitle####1{####1}}}%
}%
\unexpanded{\def\jlreq@resultb}{%
- \expandonce{\jlreq@result}%
+ \exp_not:o {\jlreq@result}%
}%
\unexpanded{\def\jlreq@resultc}{%
- \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}{\unexpanded{#6}}{\expandonce{\jlreq@tempa}}{\unexpanded{#7}}%
+ \exp_not:c {jlreq@heading@maketoc@#1}{\unexpanded{#6}}{\exp_not:o {\jlreq@tempa}}{\unexpanded{#7}}%
}%
}%
\expandafter\endgroup
@@ -1998,9 +1999,9 @@
}%
\long\def\jlreq@tempc##1##2##3{#4}% 全体のフォーマット
% 二度展開すると欲しいものが得られる
- \edef\jlreq@tempa{\noexpand\jlreq@tempc{\unexpanded{#1}}{\expandonce{\jlreq@tempa}}{\expandonce{\jlreq@tempb}}}%
+ \edef\jlreq@tempa{\noexpand\jlreq@tempc{\unexpanded{#1}}{\exp_not:o {\jlreq@tempa}}{\exp_not:o {\jlreq@tempb}}}%
\edef\jlreq@do{%
- \unexpanded{\def\jlreq@result}{\expandafter\expandonce\expandafter{\jlreq@tempa}}%
+ \unexpanded{\def\jlreq@result}{\expandafter\exp_not:o \expandafter{\jlreq@tempa}}%
}%
\expandafter\endgroup
\jlreq@do
@@ -2019,7 +2020,7 @@
\def\jlreq@resultb{}%
}{%
\let\jlreq@resulta=#1
- \edef\jlreq@resultb{\expandonce{\jlreq@BlockHeading@start@removecolumn#2}}%
+ \edef\jlreq@resultb{\exp_not:o {\jlreq@BlockHeading@start@removecolumn#2}}%
}%
}
@@ -2196,7 +2197,7 @@
\def\jlreq@parsecomma##1##2{%
\jlreq@helper@dividebycomma{##1}%
\jlreq@if{\ifjlreq@result\fi}{%
- \edef\jlreq@do{\noexpand\jlreq@tempa{\expandonce{\jlreq@resulta}}{\expandonce{\jlreq@resultb}}}%
+ \edef\jlreq@do{\noexpand\jlreq@tempa{\exp_not:o {\jlreq@resulta}}{\exp_not:o {\jlreq@resultb}}}%
}{%
\edef\jlreq@do{\noexpand\jlreq@tempa{##1}{}}%
}%
@@ -2227,7 +2228,7 @@
\jlreq@parsecomma{##1}{%
\jlreq@iffirsttoken{####1}{*}{%
\jlreq@second@text@indent@withlabelfalse
- \edef\jlreq@second@heading@text@indent@wlabel{\expandonce{\@gobble ####1}}%
+ \edef\jlreq@second@heading@text@indent@wlabel{\exp_not:o {\@gobble ####1}}%
}{%
\jlreq@second@text@indent@withlabeltrue
\def\jlreq@second@heading@text@indent@wlabel{####1}%
@@ -2244,14 +2245,14 @@
subtitle_indent .code:n = {%
\jlreq@iffirsttoken{##1}{*}{%
\jlreq@subtitleindent@withlabelfalse
- \edef\jlreq@subtitle@indent{\expandonce{\@gobble ##1}}%
+ \edef\jlreq@subtitle@indent{\exp_not:o {\@gobble ##1}}%
}{%
\jlreq@subtitleindent@withlabeltrue
\def\jlreq@subtitle@indent{##1}%
}%
},
subtitle_break .choices:nn = {true,false}{\csname jlreq@subtitle@break##1\endcsname},
- afterindent .choices:nn = {true,false}{\edef\jlreq@afterindent{\expandonce{\csname @afterindent##1\endcsname}}},
+ afterindent .choices:nn = {true,false}{\edef\jlreq@afterindent{\exp_not:c {@afterindent##1}}},
allowbreak_if_evenpage .choices:nn = {true,false}{%
\str_if_eq:nnTF {##1} {true}
{\def\jlreq@allowbreak@evenpage{}}
@@ -2273,7 +2274,7 @@
\jlreq@tempafalse
\def\jlreq@column@spanning{true}%
}{%
- \jlreq@switch{##1}{%
+ \str_case_e:nn {##1} {
{true}{\jlreq@tempafalse\def\jlreq@column@spanning{true}}
{false}{\jlreq@tempafalse\def\jlreq@column@spanning{false}}
}%
@@ -2303,20 +2304,20 @@
% ラベルありフォーマット:前
\edef\jlreq@pre@format@wlabel{%
\noexpand\noindent
- \expandonce{\jlreq@font}%
+ \exp_not:o {\jlreq@font}%
\ifnum 0\ifjlreq@second@text@indent@withlabel 1\fi\ifjlreq@subtitleindent@withlabel 1\fi>0
- \unexpanded{\setbox\jlreq@BlockHeading@start@label@box=\hbox}{\expandonce{\jlreq@label@format}}%
+ \unexpanded{\setbox\jlreq@BlockHeading@start@label@box=\hbox}{\exp_not:o {\jlreq@label@format}}%
\unexpanded{\xdef\jlreq@BlockHeading@start@labellength{\the\wd\jlreq@BlockHeading@start@label@box}}%
\unexpanded{\def\jlreq@BlockHeading@start@outputlabel{\box\jlreq@BlockHeading@start@label@box}}%
\else
\unexpanded{\xdef\jlreq@BlockHeading@start@labellength{0pt}}%
- \unexpanded{\def\jlreq@BlockHeading@start@outputlabel}{\expandonce{\jlreq@label@format}}%
+ \unexpanded{\def\jlreq@BlockHeading@start@outputlabel}{\exp_not:o {\jlreq@label@format}}%
\fi
}%
% ラベルなしフォーマット:前
\edef\jlreq@pre@format@wolabel{%
\noexpand\noindent
- \expandonce{\jlreq@font}%
+ \exp_not:o {\jlreq@font}%
\unexpanded{\xdef\jlreq@BlockHeading@start@labellength{0pt}}%
\unexpanded{\def\jlreq@BlockHeading@start@outputlabel}{}%
}%
@@ -2325,22 +2326,22 @@
\noexpand\jlreq@BlockHeading@start@outputlabel
\unexpanded{\inhibitglue\hbox{}}%
\ifdim\dimexpr\jlreq@after@label@space\relax=\dimexpr 0pt\relax\else
- \noexpand\hspace*{\noexpand\dimexpr\expandonce{\jlreq@after@label@space}\noexpand\relax}%
+ \noexpand\hspace*{\noexpand\dimexpr\exp_not:o {\jlreq@after@label@space}\noexpand\relax}%
\fi
}%
\edef\jlreq@heading@text@format@wlabel{%
\ifnum 0\ifdim\jlreq@second@heading@text@indent@wlabel=\dimexpr 0pt\relax\else 1\fi\ifjlreq@second@text@indent@withlabel 1\fi>0
- \unexpanded{\hangindent=\glueexpr}(\expandonce{\jlreq@second@heading@text@indent@wlabel})%
- \ifjlreq@second@text@indent@withlabel + (\expandonce{\jlreq@after@label@space}) + \unexpanded{\jlreq@BlockHeading@start@labellength}\fi
+ \unexpanded{\hangindent=\glueexpr}(\exp_not:o {\jlreq@second@heading@text@indent@wlabel})%
+ \ifjlreq@second@text@indent@withlabel + (\exp_not:o {\jlreq@after@label@space}) + \unexpanded{\jlreq@BlockHeading@start@labellength}\fi
\noexpand\relax
\fi
- \expandonce{\jlreq@heading@text@format}%
+ \exp_not:o {\jlreq@heading@text@format}%
}%
\edef\jlreq@heading@text@format@wolabel{%
\ifdim\dimexpr\jlreq@second@heading@text@indent@wolabel\relax=\dimexpr 0pt\relax\else
- \unexpanded{\hangindent=\dimexpr}\expandonce{\jlreq@second@heading@text@indent@wolabel}\noexpand\relax
+ \unexpanded{\hangindent=\dimexpr}\exp_not:o {\jlreq@second@heading@text@indent@wolabel}\noexpand\relax
\fi
- \expandonce{\jlreq@heading@text@format}%
+ \exp_not:o {\jlreq@heading@text@format}%
}%
% 副題:ラベルありかなしかはhangindentの扱いだけなので,他はまとめる
\def\jlreq@make@subtitle@format##1##2{%
@@ -2351,35 +2352,35 @@
\unexpanded{\nobreak\noindent}%
\else
\ifdim\jlreq@subtitle@indent=\dimexpr 0pt\relax\else
- \noexpand\hspace*{\expandonce{\jlreq@subtitle@indent}}%
+ \noexpand\hspace*{\exp_not:o {\jlreq@subtitle@indent}}%
\fi
\fi
- {\expandonce{\jlreq@subtitle@font}\expandonce{\jlreq@subtitle@format}}%
+ {\exp_not:o {\jlreq@subtitle@font}\exp_not:o {\jlreq@subtitle@format}}%
}%
}%
\jlreq@make@subtitle@format\jlreq@subtitle@format@wlabel{%
\ifjlreq@subtitleindent@withlabel
\noexpand\hangafter=0
- \unexpanded{\hangindent=\dimexpr}\noexpand\jlreq@BlockHeading@start@labellength + (\expandonce{\jlreq@after@label@space}) + (\expandonce{\jlreq@subtitle@indent})\noexpand\relax
+ \unexpanded{\hangindent=\dimexpr}\noexpand\jlreq@BlockHeading@start@labellength + (\exp_not:o {\jlreq@after@label@space}) + (\exp_not:o {\jlreq@subtitle@indent})\noexpand\relax
\else
\ifdim\jlreq@subtitle@indent=\dimexpr 0pt\relax\else
\noexpand\hangafter=0
- \unexpanded{\hangindent=\dimexpr}\expandonce{\jlreq@subtitle@indent}\noexpand\relax
+ \unexpanded{\hangindent=\dimexpr}\exp_not:o {\jlreq@subtitle@indent}\noexpand\relax
\fi
\fi
}%
\jlreq@make@subtitle@format\jlreq@subtitle@format@wolabel{%
\ifdim\jlreq@subtitle@indent=\dimexpr 0pt\relax\else
\noexpand\hangafter=0
- \unexpanded{\hangindent=\dimexpr}\expandonce{\jlreq@subtitle@indent}\noexpand\relax
+ \unexpanded{\hangindent=\dimexpr}\exp_not:o {\jlreq@subtitle@indent}\noexpand\relax
\fi
}%
\jlreq@heading@make@l@{#1}{#2}{\jlreq@label@format}%
- \eappto\jlreq@do{\expandonce{\jlreq@result}}%
+ \tl_put_right:Nx \jlreq@do {\exp_not:o {\jlreq@result}}%
\jlreq@BlockHeading@gyodori@parsekeyval*[BlockHeading:#1]{#3}{}{}{1}%
\let\jlreq@spaceset=\jlreq@result
\edef\jlreq@totalformat{\unexpanded{##1}}%
- \edef\jlreq@totalformat@after{\expandonce{\jlreq@afterindent}\noexpand\@afterheading}%
+ \edef\jlreq@totalformat@after{\exp_not:o {\jlreq@afterindent}\noexpand\@afterheading}%
\if@twocolumn
\str_if_eq:VnT \jlreq@column@spanning { true }{%
\def\@tempa##1##2##3{%
@@ -2394,7 +2395,7 @@
\jlreq@iffirsttoken{##2}{r}{}{\unexpanded{\vskip\glueexpr\baselineskip - \topskip\relax}}%
}]%
}{%
- \expandonce{\jlreq@totalformat}
+ \exp_not:o {\jlreq@totalformat}
}%
}%
}%
@@ -2403,30 +2404,30 @@
}%
\fi
\edef\jlreq@do{%
- \expandonce{\jlreq@do}%
- \noexpand\edef\expandonce{\csname jlreq@headingcs@#1\endcsname}{\noexpand\unexpanded{%
+ \exp_not:o {\jlreq@do}%
+ \noexpand\edef\exp_not:c {jlreq@headingcs@#1}{\noexpand\unexpanded{%
\noexpand\UseHook{jlreq/heading/before}%
\noexpand\UseHook{jlreq/heading/before/#1}%
- \expandonce{\jlreq@pagebreak}%
+ \exp_not:o {\jlreq@pagebreak}%
\tl_if_empty:NF \l__jlreq_pagestyle_tl { \exp_not:N \thispagestyle {\exp_not:o { \l__jlreq_pagestyle_tl } } }
\unexpanded{\jlreq@BlockHeading@start{#1}{#2}}%
- {{\expandonce{\jlreq@align}}{\expandonce{\jlreq@indent}}{\expandonce{\jlreq@end@indent}}\expandonce{\jlreq@spaceset}{\expandonce{\jlreq@allowbreak@evenpage}}}%
+ {{\exp_not:o {\jlreq@align}}{\exp_not:o {\jlreq@indent}}{\exp_not:o {\jlreq@end@indent}}\exp_not:o {\jlreq@spaceset}{\exp_not:o {\jlreq@allowbreak@evenpage}}}%
{\ifjlreq@number\else -\fi}%
{%
{%
- {\expandonce{\jlreq@label@format}}{\expandonce{\jlreq@label@format@modified}}%
- {\expandonce{\jlreq@heading@text@format@wlabel}}{\expandonce{\jlreq@heading@text@format@wolabel}}%
- {\expandonce{\jlreq@subtitle@format@wlabel}}{\expandonce{\jlreq@subtitle@format@wolabel}}%
+ {\exp_not:o {\jlreq@label@format}}{\exp_not:o {\jlreq@label@format@modified}}%
+ {\exp_not:o {\jlreq@heading@text@format@wlabel}}{\exp_not:o {\jlreq@heading@text@format@wolabel}}%
+ {\exp_not:o {\jlreq@subtitle@format@wlabel}}{\exp_not:o {\jlreq@subtitle@format@wolabel}}%
}%
{%
- {\expandonce{\jlreq@pre@format@wlabel}}{\expandonce{\jlreq@pre@format@wolabel}}%
- {\expandonce{\jlreq@format}}%
+ {\exp_not:o {\jlreq@pre@format@wlabel}}{\exp_not:o {\jlreq@pre@format@wolabel}}%
+ {\exp_not:o {\jlreq@format}}%
{}{}%
}%
}%
- {{}{\expandonce{\jlreq@totalformat}}{\expandonce{\jlreq@totalformat@after}}}%
+ {{}{\exp_not:o {\jlreq@totalformat}}{\exp_not:o {\jlreq@totalformat@after}}}%
}}%
- \noexpand\def\expandonce{\csname #1\endcsname}{\expandonce{\csname jlreq@headingcs@#1\endcsname}}%
+ \noexpand\def\exp_not:c {#1}{\exp_not:c {jlreq@headingcs@#1}}%
}%
\expandafter\endgroup
\jlreq@do
@@ -2486,8 +2487,8 @@
\expandafter\let\csname jlreq@BlockHeading@spaces@setlist@####1\endcsname=\@undefined
}%
}%
- \unexpanded{\def\jlreq@BlockHeading@spaces@headingslist}{\expandonce{\jlreq@tempa}}%
- \expandonce{\jlreq@tempb}%
+ \unexpanded{\def\jlreq@BlockHeading@spaces@headingslist}{\exp_not:o {\jlreq@tempa}}%
+ \exp_not:o {\jlreq@tempb}%
}%
\expandafter\endgroup
\jlreq@do
@@ -2511,22 +2512,22 @@
}%
\expandafter\jlreq@do\jlreq@totalset
\jlreq@SetBlockHeadingSpaces@iii{#2}%
- \eappto\jlreq@tempa{,\expandonce{\jlreq@headings}}% \jlreq@tempaに\jlreq@headingsを追加
+ \tl_put_right:Nx \jlreq@tempa {,\exp_not:o{\jlreq@headings}}% \jlreq@tempaに\jlreq@headingsを追加
\ifjlreq@tempb
\ifx\jlreq@lastdimen\@empty\else % 最後が寸法だったので\jlreq@SetBlockHeadingSpaces@totalsetを改変
\def\jlreq@do##1##2##3{%
- \edef\jlreq@totalset{{\unexpanded{##1}}{r:\expandonce{\jlreq@lastdimen}}{\unexpanded{##3}}}%
+ \edef\jlreq@totalset{{\unexpanded{##1}}{r:\exp_not:o {\jlreq@lastdimen}}{\unexpanded{##3}}}%
}%
\expandafter\jlreq@do\jlreq@totalset
\fi
\else
- \eappto\jlreq@set{{\expandonce{\jlreq@lastdimen}}}%
+ \tl_put_right:Nx \jlreq@set{{\exp_not:o {\jlreq@lastdimen}}}
\fi
- \eappto\jlreq@tempb{%
+ \tl_put_right:Nx \jlreq@tempb {%
\noexpand\@ifundefined{jlreq@BlockHeading@spaces@setlist@\jlreq@headings}{}{%
\noexpand\ClassError{jlreq}{The~spaces~for~\jlreq@headings\space is~defined~more~than~once~(in~SetBlockHeadingSpaces)}{\noexpand\@ehc}%
}%
- \noexpand\def\expandonce{\csname jlreq@BlockHeading@spaces@setlist@\jlreq@headings\endcsname}{{\expandonce{\jlreq@totalset}}\expandonce{\jlreq@set}}%
+ \noexpand\def\exp_not:c {jlreq@BlockHeading@spaces@setlist@\jlreq@headings}{{\exp_not:o {\jlreq@totalset}}\exp_not:o {\jlreq@set}}%
}%
\jlreq@SetBlockHeadingSpaces
}%
@@ -2553,7 +2554,7 @@
\clist_map_variable:nNn {#1} \@tempa {
\expandafter\jlreq@helper@trim\expandafter{\@tempa}{\@tempa}%
\str_if_eq:eeTF {\str_head:N \@tempa} {_} {
- \ifx\jlreq@lastdimen\@empty\else\eappto\jlreq@set{{\expandonce{\jlreq@lastdimen}}}\fi%
+ \ifx\jlreq@lastdimen\@empty\else\tl_put_right:Nx \jlreq@set {{\exp_not:o {\jlreq@lastdimen}}}\fi%
\def\jlreq@lastdimen{}%
\expandafter\jlreq@SetBlockHeadingSpaces@iv\@tempa{\jlreq@endmark}\jlreq@endmark
}{%
@@ -2561,11 +2562,11 @@
\ifjlreq@tempa
% 最初が寸法なので,全体の設定(\jlreq@totalset)に組み込む.
\def\jlreq@do##1##2##3{%
- \edef\jlreq@totalset{{r:\expandonce{\@tempa}}{\unexpanded{##2}}{\unexpanded{##3}}}%
+ \edef\jlreq@totalset{{r:\exp_not:o {\@tempa}}{\unexpanded{##2}}{\unexpanded{##3}}}%
}%
\expandafter\jlreq@do\jlreq@totalset
\else
- \ifx\jlreq@lastdimen\@empty\else\eappto\jlreq@set{{\expandonce{\jlreq@lastdimen}}}\fi
+ \ifx\jlreq@lastdimen\@empty\else\tl_put_right:Nx \jlreq@set {{\exp_not:o {\jlreq@lastdimen}}}\fi
\let\jlreq@lastdimen=\@tempa
\fi
}%
@@ -2583,21 +2584,21 @@
\@tempa#1%
\ClassWarning{jlreq}{The~heading~name~`\@gobble #1'~ends~with~`*'.~Do~you^mean~`_\@tempa{*}'?~(in~SetBlockHeadingSpaces)}%
}}{}%
- \appto\jlreq@headings{#1}%
+ \tl_put_right:Nn \jlreq@headings {#1}%
\jlreq@SetBlockHeadingSpaces@v
}
\def\jlreq@SetBlockHeadingSpaces@v#1{%
% 空っぽの場合は{_{r:0pt}{r:0pt}{}}
\jlreq@ifendmark{#1}{%
- \appto\jlreq@set{{_{r:0pt}{r:0pt}{}}}
+ \tl_put_right:Nn \jlreq@set {{_{r:0pt}{r:0pt}{}}}
\@gobble
}{%
\jlreq@iffirsttoken{#1}{*}{% *始まりの場合は{_*{}{}{}}
\expandafter\jlreq@BlockHeading@gyodori@parsekeyval\expandafter{\@gobble #1}{}{}{}%
- \eappto\jlreq@set{{_*\expandonce{\jlreq@result}}}%
+ \tl_put_right:Nx \jlreq@set{{_*\exp_not:o {\jlreq@result}}}%
}{% それ以外の場合は{_{}{}{}}
\jlreq@BlockHeading@gyodori@parsekeyval{#1}{}{}{}%
- \eappto\jlreq@set{{_\expandonce{\jlreq@result}}}%
+ \tl_put_right:Nx \jlreq@set{{_\exp_not:o {\jlreq@result}}}%
}%
\jlreq@SetBlockHeadingSpaces@vi
}%
@@ -2635,19 +2636,19 @@
\def\jlreq@BlockHeading@spaces@outputwospace@{%
\ifnum\jlreq@tempcnta<\jlreq@BlockHeading@spaces@current@count
\advance\jlreq@tempcnta by 1
- \eappto\jlreq@do{\csexpandonce{jlreq@BlockHeading@spaces@current@before@\the\jlreq@tempcnta}}%
+ \tl_put_right:Nx \jlreq@do {\exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@before@\the\jlreq@tempcnta}}%
\edef\jlreq@tempa{%
- \unexpanded{\long\def\jlreq@tempa##1}{\csexpandonce{jlreq@BlockHeading@spaces@current@format@\the\jlreq@tempcnta}}%
+ \unexpanded{\long\def\jlreq@tempa##1}{\exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@format@\the\jlreq@tempcnta}}%
}%
\jlreq@tempa
\edef\jlreq@tempb{%
- \noexpand\expandonce{\noexpand\jlreq@tempa{%
+ \noexpand\exp_not:o {\noexpand\jlreq@tempa{%
\noexpand\jlreq@BlockHeading@start@gyodori
- \csexpandonce{jlreq@BlockHeading@spaces@current@space@\the\jlreq@tempcnta}%
- {\csexpandonce{jlreq@BlockHeading@spaces@current@output@\the\jlreq@tempcnta}}%
+ \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}}%
}}%
}%
- \eappto\jlreq@do{\jlreq@tempb\csexpandonce{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@after@\the\jlreq@tempcnta}}%
\expandafter\jlreq@BlockHeading@spaces@outputwospace@
\fi
}
@@ -2662,10 +2663,10 @@
\edef\jlreq@do{%
\ifjlreq@tempa
\unexpanded{\jlreq@BlockHeading@start@gyodori#1}{%
- \expandonce{\jlreq@result}%
+ \exp_not:o {\jlreq@result}%
}%
\else
- \expandonce{\jlreq@result}%
+ \exp_not:o {\jlreq@result}%
\fi
}%
\jlreq@BlockHeading@spaces@clear
@@ -2678,7 +2679,7 @@
\advance\jlreq@tempcnta by 1
\expandafter\jlreq@BlockHeading@spaces@output@@@\expandafter{\@gobble #1}%
}{%
- \appto\jlreq@result{\vskip\glueexpr #1\relax}%
+ \tl_put_right:Nn \jlreq@result {\vskip\glueexpr #1\relax}%
}%
\jlreq@BlockHeading@spaces@output@@
}%
@@ -2686,20 +2687,20 @@
\def\jlreq@BlockHeading@spaces@output@@@#1{%
\edef\jlreq@do{%
\noexpand\jlreq@BlockHeading@spaces@output@@@@
- \jlreq@iffirsttoken@ignorespaces{#1}{*}{{*}\expandonce{\@gobble #1}}{\unexpanded{{}#1}}%
- \csexpandonce{jlreq@BlockHeading@spaces@current@space@\the\jlreq@tempcnta}%
- {\csexpandonce{jlreq@BlockHeading@spaces@current@output@\the\jlreq@tempcnta}}%
+ \jlreq@iffirsttoken@ignorespaces{#1}{*}{{*}\exp_not:o {\@gobble #1}}{\unexpanded{{}#1}}%
+ \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{%
\edef\jlreq@tempa{%
- \unexpanded{\long\def\jlreq@tempa##1}{\csexpandonce{jlreq@BlockHeading@spaces@current@format@\the\jlreq@tempcnta}}%
+ \unexpanded{\long\def\jlreq@tempa##1}{\exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@format@\the\jlreq@tempcnta}}%
}%
\jlreq@tempa
\edef\jlreq@tempb{%
- \noexpand\expandonce{\noexpand\jlreq@tempa{%
+ \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}}}%
@@ -2708,10 +2709,10 @@
}\unexpanded{{#8}}%
}}%
}%
- \eappto\jlreq@result{%
- \csexpandonce{jlreq@BlockHeading@spaces@current@before@\the\jlreq@tempcnta}%
+ \tl_put_right:Nx \jlreq@result {%
+ \exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@before@\the\jlreq@tempcnta}%
\jlreq@tempb
- \csexpandonce{jlreq@BlockHeading@spaces@current@after@\the\jlreq@tempcnta}%
+ \exp_args:Nc \exp_not:o {jlreq@BlockHeading@spaces@current@after@\the\jlreq@tempcnta}%
}%
}
@@ -2742,7 +2743,7 @@
}
% {1 = 命令名}{2 = レベル}{3 = */-}{4 = running head}{5 = 見出し}
\long\def\jlreq@RuninHeading@start@#1#2#3[#4]#5{%
- \edef\jlreq@do{\unexpanded{\jlreq@RuninHeading@start@@{#1}{#2}{#3}{#4}{#5}}{\expandonce{\jlreq@RuninHeading@start@format@label}}{\expandonce{\jlreq@RuninHeading@start@format@wlabel}}{\expandonce{\jlreq@RuninHeading@start@format@wolabel}}}%
+ \edef\jlreq@do{\unexpanded{\jlreq@RuninHeading@start@@{#1}{#2}{#3}{#4}{#5}}{\exp_not:o {\jlreq@RuninHeading@start@format@label}}{\exp_not:o {\jlreq@RuninHeading@start@format@wlabel}}{\exp_not:o {\jlreq@RuninHeading@start@format@wolabel}}}%
\jlreq@do
}
% {1 = 命令名}{2 = レベル}{3 = *}{4 = running head}{5 = 見出し}{6 = ラベルフォーマット}{7 = ラベルありフォーマット}{8 = ラベルなしフォーマット}
@@ -2755,19 +2756,19 @@
\ifnum0\jlreq@ifempty{#3}{}{1}\ifnum #2>\c@secnumdepth 1\fi>0
\def\jlreq@tempa##1{#8}%
\else
- \appto\jlreq@do{\refstepcounter{#1}}%
+ \tl_put_right:Nn \jlreq@do {\refstepcounter{#1}}%
\def\jlreq@tempa##1{#7}%
\fi
\par}%
- \unexpanded{\eappto\jlreq@do}{%
+ \unexpanded{\tl_put_right:Nx \jlreq@do}{%
\unexpanded{\noexpand\everypar}{%
\unexpanded{%
\noexpand\if@noskipsec
\unexpanded{\global\@noskipsecfalse}%
\unexpanded{{\setbox\jlreq@tempboxa\lastbox}}%
\noexpand\begingroup
- \expandonce{\jlreq@tempa{#5}}%
- \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}\unexpanded{{#3}{#6}{#4}}%
+ \exp_not:o {\jlreq@tempa{#5}}%
+ \exp_not:c {jlreq@heading@maketoc@#1}\unexpanded{{#3}{#6}{#4}}%
\noexpand\endgroup
\noexpand\inhibitglue
\noexpand\else
@@ -2848,7 +2849,7 @@
\cs_set:Nx \l__jlreq_do: {
\exp_not:o { \jlreq@result }
% パラメータトークンを含むので,\edefして\unexpandedで包む
- \noexpand\edef\expandonce{\csname #1\endcsname}{%
+ \noexpand\edef\exp_not:c {#1}{%
\noexpand\unexpanded{%
\exp_not:N \UseHook{jlreq/heading/before}%
\exp_not:N \UseHook{jlreq/heading/before/#1}
@@ -3010,10 +3011,10 @@
}
}
\cs_set:Nx \l_jlreq_do: {
- \exp_not:v { jlreq@heading@type@#1 }
+ \exp_args:Nc \exp_not:o { jlreq@heading@type@#1 }
{ \exp_not:n { #1 } }
- { \exp_not:v { jlreq@heading@level@#1 } }
- { \exp_not:v { jlreq@heading@setting@#1 },\exp_not:V \l_jlreq_tmpa_tl }
+ { \exp_args:Nc \exp_not:o { jlreq@heading@level@#1 } }
+ { \exp_args:Nc \exp_not:o { jlreq@heading@setting@#1 },\exp_not:V \l_jlreq_tmpa_tl }
}
\exp_after:wN \group_end:
\l_jlreq_do:
@@ -3022,7 +3023,7 @@
\NewDocumentCommand{\SaveHeading}{ m m }{%
\@ifundefined{jlreq@heading@setting@#1}{\ClassError{jlreq}{Unknown~heading:~#1}{\@ehc}}{}%
\edef#2{%
- \csexpandonce{jlreq@heading@type@#1}{\unexpanded{#1}}{\csexpandonce{jlreq@heading@level@#1}}{\csexpandonce{jlreq@heading@setting@#1}}%
+ \exp_args:Nc \exp_not:o {jlreq@heading@type@#1}{\unexpanded{#1}}{\exp_args:Nc \exp_not:o {jlreq@heading@level@#1}}{\exp_args:Nc \exp_not:o {jlreq@heading@setting@#1}}%
}%
}
@@ -3062,10 +3063,9 @@
%.. カウンターの定義(見出し本体はこのファイルの末尾で)
\setcounter{secnumdepth}{3}
\newcounter{part}
-\jlreq@switch{\jlreq@article@type}{
- {article}{\newcounter{section}}
- {\newcounter{chapter}\newcounter{section}[chapter]}% book, report
-}
+\str_if_eq:VnTF \jlreq@article@type { article }
+ { \newcounter{section} }
+ { \newcounter{chapter}\newcounter{section}[chapter] }
\newcounter{subsection}[section]
\newcounter{subsubsection}[subsection]
\newcounter{paragraph}[subsubsection]
@@ -3095,14 +3095,14 @@
% 後ろ側に始め括弧類(cl-01)が配置される場合を除いて,ベタ組(4.2.3,二つ目のc,三つ目のb).
\def\jlreq@hook@postnote{\futurelet\jlreq@nextchar\jlreq@postnote@checkopenbracket}%
\def\@tempa{}
- \def\jlreq@do##1{\jlreq@ifendmark{##1}{}{\appto\@tempa{\ifx\jlreq@tempb##11\fi}\jlreq@do}}
+ \def\jlreq@do##1{\jlreq@ifendmark{##1}{}{\tl_put_right:Nn \@tempa {\ifx\jlreq@tempb##11\fi}\jlreq@do}}
\expandafter\jlreq@do\jlreq@charlist@openingbrackets\jlreq@endmark
\edef\jlreq@postnote@checkopenbracket{%
\unexpanded{%
\jlreq@getfirsttoken@expandmacros{\jlreq@nextchar}{\jlreq@tempa}%
\expandafter\let\expandafter\jlreq@tempb\jlreq@tempa
}%
- \noexpand\jlreq@if{\noexpand\ifnum 0\expandonce{\@tempa}>0~\noexpand\fi}{}{\noexpand\inhibitglue}%
+ \noexpand\jlreq@if{\noexpand\ifnum 0\exp_not:o {\@tempa}>0~\noexpand\fi}{}{\noexpand\inhibitglue}%
}
},
reference_mark / interlinear .code:n = {
@@ -3199,7 +3199,7 @@
}{
\def\jlreq@makefntext{\addtolength{\leftskip}{\glueexpr #1\relax}}
}
- \long\edef\jlreq@makefntext##1{\expandonce{\jlreq@makefntext}%
+ \long\edef\jlreq@makefntext##1{\exp_not:o {\jlreq@makefntext}%
\unexpanded{%
\addtolength{\leftskip}{\jlreq@footnoteindent}%
\parindent=1\jlreq@zw
@@ -3265,7 +3265,7 @@
\expandafter\gdef\expandafter\jlreq@footnote@delayfootnoteslist\expandafter{\expandafter}%
\jlreq@footnote@delayfootnoteslist
}
- \preto\@opcol{\jlreq@hook@@opcol}
+ \tl_put_left:Nn \@opcol{\jlreq@hook@@opcol}
% \jlreq@footnote@delayfootnote@delay#1#2:#1ページ目に#2を出す
% \jlreq@footnote@delayfootnote@page:何ページ目に\footnotetextを入れるかを\jlreq@resultcntに入れる.その場での場合は-1.
\if@twocolumn
@@ -3286,7 +3286,7 @@
\long\def\jlreq@footnote@delayfootnote@delay#1#2{%
% 二段組みの場合は上段を組んだ直後に\footnotetextを挿入(そのページの下段に入る)
\jlreq@if{\ifnum 0\if@firstcolumn\else 1\fi\ifnum#1>\value{page}1\fi>0~\fi}{%
- \xappto\jlreq@footnote@delayfootnoteslist{\unexpanded{\jlreq@footnote@delayfootnote{#1}{#2}}}%
+ \tl_gput_right:Nx \jlreq@footnote@delayfootnoteslist {\exp_not:n { \jlreq@footnote@delayfootnote{#1}{#2} } }
}{#2}%
}
\else
@@ -3301,13 +3301,13 @@
\long\def\jlreq@footnote@delayfootnote@delay#1#2{%
% 一段組の場合はその前のページを組んだ直後に\footnotetextを挿入.
\jlreq@if{\ifnum\numexpr#1 - 1\relax>\value{page}~\fi}{%
- \xappto\jlreq@footnote@delayfootnoteslist{\unexpanded{\jlreq@footnote@delayfootnote{#1}{#2}}}%
+ \tl_gput_right:Nx \jlreq@footnote@delayfootnoteslist { \exp_not:n {\jlreq@footnote@delayfootnote{#1}{#2} } }
}{#2}%
}
\fi
\long\def\jlreq@footnote@delayfootnote@immediate#1#2{%
\jlreq@if{\ifnum #1<\jlreq@currentpage\relax\fi}{%
- \xappto\jlreq@footnote@delayfootnoteslist{\unexpanded{\jlreq@footnote@delayfootnote{#1}{#2}}}%
+ \tl_gput_right:Nx \jlreq@footnote@delayfootnoteslist{ \exp_not:n { \jlreq@footnote@delayfootnote{#1}{#2} } }
}{#2}%
}
\let\jlreq@footnote@delayfootnote=\jlreq@footnote@delayfootnote@delay
@@ -3321,7 +3321,7 @@
}%
}
\AtEndDocument{\jlreq@footnote@flushdelayfootnoteslist}
- \preto\newpage{\jlreq@footnote@flushdelayfootnoteslist}
+ \tl_put_left:Nn \newpage {\jlreq@footnote@flushdelayfootnoteslist}
\long\def\jlreq@footnote@impl@woption#1#2#3[#4]#5{%
\jlreq@footnote@delayfootnote@page
\begingroup
@@ -3331,10 +3331,10 @@
\def\jlreq@result{}#3[#4]{#5}%
\jlreq@restore@jlreq@footnotes}%
\int_compare:nTF { \jlreq@resultcnt=-1 }{\noexpand\jlreq@result}{\unexpanded{%
- \xappto\jlreq@footnote@delayfootnoteslist{%
+ \tl_gput_right:Nx \jlreq@footnote@delayfootnoteslist {%
\noexpand\jlreq@footnote@delayfootnote{\the\jlreq@resultcnt}{%
\noexpand\jlreq@restore@original@footnotes
- \expandonce{\jlreq@result}%
+ \exp_not:o {\jlreq@result}%
\noexpand\jlreq@restore@jlreq@footnotes
}%
}%
@@ -3351,10 +3351,10 @@
\unexpanded{\def\jlreq@result{}#2}[\the\value{footnote}]\noexpand\jlreq@result
\unexpanded{\def\jlreq@result{}#3}[\the\value{footnote}]\unexpanded{{#4}}%
\jlreq@if{\ifnum\jlreq@resultcnt=-1~\fi}{\noexpand\jlreq@result}{\unexpanded{%
- \xappto\jlreq@footnote@delayfootnoteslist{%
+ \tl_gput_right:Nx \jlreq@footnote@delayfootnoteslist {%
\noexpand\jlreq@footnote@delayfootnote{\the\jlreq@resultcnt}{%
\noexpand\jlreq@restore@original@footnotes
- \expandonce{\jlreq@result}%
+ \exp_not:o {\jlreq@result}%
\noexpand\jlreq@restore@jlreq@footnotes
}%
}%
@@ -3401,13 +3401,28 @@
\newdimen\jlreq@endnote@indent
% 現在の後注一覧を,\jlreq@endnote@textsに{{合印1}{後注1}}{{合印2}{後注2}}...の形で保持する
\def\jlreq@endnote@texts{}
-\long\def\jlreq@endnote@addtext#1#2{\xappto\jlreq@endnote@texts{\unexpanded{{{#1}{#2}}}}}
+\long\def\jlreq@endnote@addtext#1#2{\tl_gput_right:Nx \jlreq@endnote@texts { \exp_not:n {{{#1}{#2}}} } }
% \endnote自身は後で定義する
-\def\jlreq@endnote@impl{\jlreq@hook@prenote\@ifnextchar[{\jlreq@endnote}{\jlreq@endnote[]}}
-\def\endnotemark{\jlreq@hook@prenote\@ifnextchar[{\jlreq@endnotemark}{\jlreq@endnotemark[]}}
-\def\endnotetext{\@ifnextchar[{\jlreq@endnotetext}{\jlreq@endnotetext[]}}
-\long\def\jlreq@endnote[#1]#2{\jlreq@endnotemark[#1]\@endnotetext{#2}\jlreq@hook@postnote}
-\def\jlreq@endnotemark[#1]{%
+\NewHook{cmd/endnote/before}
+\NewHook{cmd/endnote/after}
+\NewHook{cmd/endnotemark/before}
+\NewHook{cmd/endnotemark/after}
+\NewDocumentCommand { \endnotemark }{ O{} } {
+ \jlreq@hook@prenote
+ \UseHook{cmd/endnote/before}
+ \jlreq@endnotemark{#1}
+ \UseHook{cmd/endnote/after}
+ \jlreq@hook@postnote
+}
+\NewDocumentCommand { \endnotetext } { O{} +m } { \jlreq@endnotetext{#1}{#2} }
+\long\def\jlreq@endnote#1#2{
+ \jlreq@hook@prenote
+ \UseHook{ cmd/endnote/before }
+ \jlreq@endnotemark{#1}\@endnotetext{#2}
+ \UseHook{ cmd/endnote/after }
+ \jlreq@hook@postnote
+}
+\def\jlreq@endnotemark#1{%
\jlreq@ifempty{#1}{%
\stepcounter{\jlreq@endnotecounter}%
\expandafter\protected@xdef\csname\jlreq@endnotemarkname\endcsname{\csname the\jlreq@endnotecounter\endcsname}%
@@ -3418,10 +3433,9 @@
\endgroup
}%
\@endnotemark
- \jlreq@hook@postnote
}
\jlreq@setdefaultnotemark\@endnotemark\@makeendmark
-\long\def\jlreq@endnotetext[#1]#2{%
+\long\def\jlreq@endnotetext#1#2{%
\jlreq@ifempty{#1}{%
\expandafter\protected@xdef\csname\jlreq@endnotemarkname\endcsname{\csname the\jlreq@endnotecounter\endcsname}%
}{%
@@ -3502,35 +3516,39 @@
\jlreq@tempafalse % headingsが指定された
\jlreq@tempbfalse % paragraphが指定された
% \jlreq@tempcにセクション名たちを入れていく
- \def\jlreq@tempc{}
+ \seq_clear:N \l_jlreq_tmpa_seq
\clist_map_variable:nNn {#1} \jlreq@tempa {
- \expandafter\jlreq@helper@trim\expandafter{\jlreq@tempa}{\jlreq@tempa}%
- \jlreq@switch{\jlreq@tempa}{
+ \tl_set:Nx \@tempa { \tl_trim_spaces:o \@tempa }
+ \str_case_e:nnF {\jlreq@tempa} {
{headings}{\jlreq@tempatrue}
{paragraph}{
\jlreq@tempatrue% _paragraphの時は_headingsも有効にする
\jlreq@tempbtrue
}
- {
- \str_if_eq:eeTF { \str_head:N \jlreq@tempa } {_} {
- \edef\jlreq@tempc{\jlreq@tempc,\expandafter\@gobble\jlreq@tempa}
- }{
- \ClassError{jlreq}{Invalid~value~\jlreq@tempa\space in~endnote_position}{\@ehc}
- }
+ }{
+ \str_if_eq:eeTF { \str_head:N \jlreq@tempa } {_} {
+ \seq_put_left:Nx \l_jlreq_tmpa_seq { \tl_tail:N \jlreq@tempa }
+ }{
+ \ClassError{jlreq}{Invalid~value~\jlreq@tempa\space in~endnote_position}{\@ehc}
}
}
}
\ifjlreq@tempb
- \edef\endnote{\unexpanded{\def\par{\@restorepar\theendnotes\par}}\expandonce{\jlreq@endnote@impl}}
+ \DeclareDocumentCommand { \endnote } { O{} +m } {
+ \AddToHookNext { para/after } { \theendnotes }
+ \jlreq@endnote{##1}{##2}
+ }
\else
- \let\endnote=\jlreq@endnote@impl
+ \DeclareDocumentCommand { \endnote } { O{} +m } {
+ \jlreq@endnote{##1}{##2}
+ }
\fi
\ifjlreq@tempa
\AddToHook{jlreq/heading/before}[jlreq/endnote]{\theendnotes}
\else
- \clist_map_variable:NNn \jlreq@tempc \@tempa {
+ \seq_map_variable:NNn \l_jlreq_tmpa_seq \@tempa {
\tl_if_empty:VF \@tempa {
\AddToHook{jlreq/heading/before/\@tempa}[jlreq/endnote]{}
\RemoveFromHook{jlreq/heading/before/\@tempa}[jlreq/endnote]
@@ -3551,8 +3569,11 @@
% (1) では\sidenote[]{}を定義
% (2) では\sidenote{見出し}{注中身}を定義
% sidenote_length>0ptの時のみ定義する
-\jlreq@if{\ifdim\jlreq@sidenote@length>0pt\relax\fi}
-{
+\dim_compare:nT { \jlreq@sidenote@length > 0pt } {
+ \ProvideHook{ cmd/sidenote/before }
+ \ProvideHook{ cmd/sidenote/after }
+ \ProvideHook{ cmd/sidenotemark/before }
+ \ProvideHook{ cmd/sidenotemark/after }
\def\jlreq@sidenotemarkname{@thefnmark}% 合印用番号を一時的に入れるマクロ名
\long\def\@sidenotetext#1{%
\marginpar{\reset@font\footnotesize
@@ -3569,12 +3590,20 @@
\def\jlreq@sidenote@type{number}
\__jlreq_jlreqsetup_addtofinally:n {
\str_if_eq:VnT \jlreq@sidenote@type { number } {
- \def\sidenote{\jlreq@hook@prenote\@ifnextchar[{\jlreq@sidenote}{\jlreq@sidenote[]}}
- \def\sidenotemark{\jlreq@hook@prenote\@ifnextchar[{\jlreq@sidenotemark}{\jlreq@sidenotemark[]}}
- \def\sidenotetext{\@ifnextchar[{\jlreq@sidenotetext}{\jlreq@sidenotetext[]}}
- \long\def\jlreq@sidenote[#1]#2{\jlreq@sidenotemark[#1]\@sidenotetext{#2}\jlreq@hook@postnote}
- \def\jlreq@sidenotemark[#1]{%
- \jlreq@ifempty{#1}{%
+ \DeclareDocumentCommand { \sidenote } { O{} +m } {
+ \jlreq@hook@prenote\UseHook{cmd/sidenote/before}
+ \jlreq@sidenote{#1}{#2}
+ \UseHook{cmd/sidenote/after}\jlreq@hook@postnote
+ }
+ \DeclareDocumentCommand { \sidenotemark } { O{} } {
+ \jlreq@hook@prenote\UseHook{cmd/sidenotemark/before}
+ \jlreq@sidenotemark{#1}
+ \UseHook{cmd/sidenotemark/after}\jlreq@hook@postnote
+ }
+ \DeclareDocumentCommand { \sidenotetext } { O{} +m } { \jlreq@sidenotetext{#1}{#2} }
+ \long\def\jlreq@sidenote#1#2{\jlreq@sidenotemark{#1}\@sidenotetext{#2}}
+ \def\jlreq@sidenotemark#1{%
+ \tl_if_empty:nTF{#1}{%
\stepcounter{\jlreq@sidenotecounter}%
\expandafter\protected@xdef\csname\jlreq@sidenotemarkname\endcsname{\csname the\jlreq@sidenotecounter\endcsname}%
}{%
@@ -3584,10 +3613,9 @@
\endgroup
}%
\@sidenotemark
- \jlreq@hook@postnote
}
- \long\def\jlreq@sidenotetext[#1]#2{%
- \jlreq@ifempty{#1}{%
+ \long\def\jlreq@sidenotetext#1#2{%
+ \tl_if_empty:nTF{#1}{%
\expandafter\protected@xdef\csname\jlreq@sidenotemarkname\endcsname{\csname the\jlreq@sidenotecounter\endcsname}%
}{%
\begingroup
@@ -3607,15 +3635,15 @@
\let\@makesidemark=\@makefnmark
}
\str_if_eq:VnT \jlreq@sidenote@type { symbol } {% sidenote_type = symbol
- \long\def\sidenote#1#2{\jlreq@sidenote{#1}{#2}}
- \def\sidenotemark#1{\jlreq@sidenotemark{#1}}
- \long\def\sidenotetext#1#2{\jlreq@sidenotetext{#1}{#2}}
+ \DeclareDocumentCommand { \sidenote } { m +m } { \UseHook{cmd/sidenote/before}\jlreq@sidenote{#1}{#2}\UseHook{cmd/sidenote/after} }
+ \DeclareDocumentCommand { \sidenotemark } { m } { \UseHook{cmd/sidenotemark/before}\jlreq@sidenotemark{#1}\UseHook{cmd/sidenote/after} }
+ \DeclareDocumentCommand { \sidenotetext } { m +m } { \jlreq@sidenotetext{#1}{#2} }
\long\def\jlreq@sidenote#1#2{\jlreq@sidenotemark{#1}\jlreq@sidenotetext{#1}{#2}}
\edef\jlreq@sidenotemark#1{%
{\unexpanded{\reset@font\jlreq@sidenote@keywordfont}#1}%
\noexpand\jlreq@hook@prenote
\ifx\jlreq@sidenote@defaultmark\@empty\else
- \expandafter\edef\expandonce{\csname\jlreq@sidenotemarkname\endcsname}{\expandonce{\jlreq@sidenote@defaultmark}}%
+ \expandafter\edef\exp_not:c {\jlreq@sidenotemarkname}{\exp_not:o {\jlreq@sidenote@defaultmark}}%
\noexpand\@sidenotemark
\fi
}
@@ -3626,14 +3654,11 @@
}
\long\def\@makesidetext#1{{\sffamily\gtfamily\bfseries\csname\jlreq@sidenotemarkname\endcsname}\hspace*{1\jlreq@mol}#1}
\let\@makesidemark=\@makefnmark
-
- \apptocmd{\sidenote}{\jlreq@hook@postnote}{}{}
- \apptocmd{\sidenotemark}{\jlreq@hook@postnote}{}{}
}
}
\keys_define:nn { jlreqsetup } { sidenote_symbol .tl_set:N = \jlreq@sidenote@defaultmark }
\keys_define:nn { jlreqsetup } { sidenote_keyword_font .tl_set:N = \jlreq@sidenote@keywordfont }
-}{}
+}
%.. 割注(3.4)
\def\inlinenotesize{.6\jlreq@jafontsize} % 割注の文字サイズ
@@ -3956,9 +3981,9 @@
% #1のleftとrightを入れ替えて#1に代入
\def\jlreq@reverse@leftright#1{%
- \jlreq@switch{#1}{
- {left}{\def#1{right}}
- {right}{\def#1{left}}
+ \str_case_e:nn {#1} {
+ { left }{ \def#1{right} }
+ { right }{ \def#1{left} }
}%
}
@@ -4015,13 +4040,14 @@
}%
}%
\edef\jlreq@headingname{\expandafter\@gobble#1}% 見出し命令名
- \edef\jlreq@tempa{\noexpand\@removeelement{\expandonce{\jlreq@headingname}}}%
+ \edef\jlreq@tempa{\noexpand\@removeelement{\exp_not:o {\jlreq@headingname}}}%
\expandafter\jlreq@tempa\expandafter{#5}{#5}%
\@ifundefined{#4@\jlreq@headingname}{\expandafter\def\csname #4@\jlreq@headingname\endcsname{}}{}%
- \eappto\jlreq@do{%
- \noexpand\let\expandonce{\csname\expandafter\@gobble\string #1@heading@level\endcsname}=\expandonce{\csname jlreq@heading@level@\jlreq@headingname\endcsname}%
- \unexpanded{\def#5}{\expandonce{#5},\expandonce{\jlreq@headingname}}%
- \noexpand\appto\expandonce{\csname #4@\jlreq@headingname\endcsname}{{{\int_compare:nT {#2=0} {#3}}{#2}{\ifx r\jlreq@leftright r\else l\fi}}}%
+ \tl_put_right:Nx \jlreq@do {%
+ \exp_not:N \@ifundefined {#4@\jlreq@headingname} { \exp_not:N \@namedef {#4@\jlreq@headingname} {} } {}
+ \noexpand\let\exp_not:c {\expandafter\@gobble\string #1@heading@level}=\exp_not:c {jlreq@heading@level@\jlreq@headingname}%
+ \exp_not:n {\def#5}{\exp_not:o {#5},\exp_not:o {\jlreq@headingname}}%
+ \exp_not:N \tl_put_right:Nn \exp_not:c {#4@\jlreq@headingname} {{{\int_compare:nT {#2=0} {#3}}{#2}{\ifx r\jlreq@leftright r\else l\fi}}}%
}%
}{\def\jlreq@do{}}%
\expandafter\endgroup
@@ -4043,28 +4069,32 @@
% leftを設定する時は対応するrightを空にする.
\expandafter\ifx\csname jlreq@leftmark@0\endcsname\@empty
\expandafter\ifx\csname jlreq@rightmark@0\endcsname\@empty\else
- \eappto\jlreq@do{\jlreq@ifempty{#1}{\noexpand\markright}{\noexpand\jlreq@markright}{\csexpandonce{jlreq@rightmark@0}}}%
+ \tl_put_right:Nx \jlreq@do {
+ \jlreq@ifempty{#1}{\noexpand\markright}{\noexpand\jlreq@markright}{\exp_args:Nc \exp_not:o {jlreq@rightmark@0}}
+ }%
\fi
\else
- \eappto\jlreq@do{\jlreq@ifempty{#1}{\noexpand\markboth}{\noexpand\jlreq@markboth}{\csexpandonce{jlreq@leftmark@0}}{\csexpandonce{jlreq@rightmark@0}}}%
+ \tl_put_right:Nx \jlreq@do {
+ \jlreq@ifempty{#1}{\noexpand\markboth}{\noexpand\jlreq@markboth}{\exp_args:Nc \exp_not:o {jlreq@leftmark@0}}{\exp_args:Nc \exp_not:o {jlreq@rightmark@0}}
+ }%
\fi
\clist_map_variable:nNn {1,2} \jlreq@i {
\expandafter\ifx\csname jlreq@leftmark@\jlreq@i\endcsname\@empty
\expandafter\ifx\csname jlreq@rightmark@\jlreq@i\endcsname\@empty\else
- \eappto\jlreq@do{\noexpand\jlreq@setextrarightmark{\jlreq@i}{\csexpandonce{jlreq@rightmark@\jlreq@i}}}%
+ \tl_put_right:Nx \jlreq@do {\noexpand\jlreq@setextrarightmark{\jlreq@i}{\exp_args:Nc \exp_not:o {jlreq@rightmark@\jlreq@i}}}%
\fi
\else
- \eappto\jlreq@do{%
- \noexpand\jlreq@setextraleftmark{\jlreq@i}{\csexpandonce{jlreq@leftmark@\jlreq@i}}%
- \noexpand\jlreq@setextrarightmark{\jlreq@i}{\csexpandonce{jlreq@rightmark@\jlreq@i}}%
+ \tl_put_right:Nx \jlreq@do{%
+ \noexpand\jlreq@setextraleftmark{\jlreq@i}{\exp_args:Nc \exp_not:o {jlreq@leftmark@\jlreq@i}}%
+ \noexpand\jlreq@setextrarightmark{\jlreq@i}{\exp_args:Nc \exp_not:o {jlreq@rightmark@\jlreq@i}}%
}%
\fi
}%
\ifx\jlreq@do\@empty\else
\edef\jlreq@do{%
\unexpanded{\edef\jlreq@result}{\noexpand\unexpanded{%
- \noexpand\def\expandonce{\csname #2mark\endcsname}\unexpanded{##1}{%
- \expandonce{\jlreq@do}%
+ \noexpand\def\exp_not:c {#2mark}\unexpanded{##1}{%
+ \exp_not:o {\jlreq@do}%
}}%
}%
}%
@@ -4079,8 +4109,8 @@
\def\jlreq@pagestyle@make@headingmark@@#1#2#3#4#5{%
% \jlreq@tempbに\***markの定義を入れる
\edef\jlreq@tempb{%
- \expandonce{\csname the#1\endcsname}%
- \noexpand\ifx\expandonce{\csname the#1\endcsname}\unexpanded{\@empty\else\protect\quad\fi}%
+ \exp_not:c {the#1}%
+ \noexpand\ifx\exp_not:c {the#1}\unexpanded{\@empty\else\protect\quad\fi}%
\unexpanded{##1}%
}%
\jlreq@parsekeyval@nokey{%
@@ -4088,9 +4118,9 @@
\str_if_eq:nnT {##1} {_#1} {\edef\jlreq@tempb{\unexpanded{##2}}}%
}{#2}%
\ifx l#5%
- \expandafter\edef\csname jlreq@leftmark@#4\endcsname{\expandonce{\jlreq@tempb}}%
+ \expandafter\edef\csname jlreq@leftmark@#4\endcsname{\exp_not:o {\jlreq@tempb}}%
\else
- \expandafter\edef\csname jlreq@rightmark@#4\endcsname{\expandonce{\jlreq@tempb}}%
+ \expandafter\edef\csname jlreq@rightmark@#4\endcsname{\exp_not:o {\jlreq@tempb}}%
\fi
\jlreq@pagestyle@make@headingmark@{#1}{#2}%
}
@@ -4098,7 +4128,7 @@
% #2 #3 #4と並んだヘッダを作り#1に入れる.#1,#2,#3はコンロトールシークエンスの名前とする.
\def\jlreq@pagestyle@setheadfoot#1#2#3#4{%
\begingroup
- \edef\jlreq@do{\noexpand\jlreq@pagestyle@setheadfoot@{\unexpanded{#1}}{\csexpandonce{#2}}{\csexpandonce{#3}}{\csexpandonce{#4}}}%
+ \edef\jlreq@do{\noexpand\jlreq@pagestyle@setheadfoot@{\unexpanded{#1}}{\exp_args:Nc \exp_not:o {#2}}{\exp_args:Nc \exp_not:o {#3}}{\exp_args:Nc \exp_not:o {#4}}}%
\expandafter\endgroup
\jlreq@do
}
@@ -4114,13 +4144,13 @@
% +\topskip - \Chtは\jlreq@headfoot@sidemargin = 0ptの時に本文の右に一致させるための補正.
\jlreq@ifempty{#4}{\def\jlreq@right{}}{\edef\jlreq@right{\unexpanded{#4}\jlreq@pagestyle@hskip{\jlreq@expand@speciallength{\jlreq@headfoot@sidemargin}\if@tate + \topskip - \Cht\fi}}}%
\jlreq@ifempty{#3}{%
- \edef\jlreq@do{\unexpanded{\def#1}{\expandonce{\jlreq@left}\hfil\expandonce{\jlreq@right}}}%
+ \edef\jlreq@do{\unexpanded{\def#1}{\exp_not:o {\jlreq@left}\hfil\exp_not:o {\jlreq@right}}}%
\jlreq@ifempty{#2}{\jlreq@ifempty{#4}{\def\jlreq@do{\def#1{}}}{}}{}%
}{% #3を完全に真ん中に配置するために左右の幅を0にしておく
- \ifx\jlreq@left\@empty\else\edef\jlreq@left{\noexpand\hbox to 0pt{\expandonce{\jlreq@left}\noexpand\hss}}\fi
- \ifx\jlreq@right\@empty\else\edef\jlreq@right{\noexpand\hbox to 0pt{\noexpand\hss\expandonce{\jlreq@right}}}\fi
+ \ifx\jlreq@left\@empty\else\edef\jlreq@left{\noexpand\hbox to 0pt{\exp_not:o {\jlreq@left}\noexpand\hss}}\fi
+ \ifx\jlreq@right\@empty\else\edef\jlreq@right{\noexpand\hbox to 0pt{\noexpand\hss\exp_not:o {\jlreq@right}}}\fi
\edef\jlreq@do{%
- \unexpanded{\def#1}{\expandonce{\jlreq@left}\hfil\unexpanded{#3}\hfil\expandonce{\jlreq@right}}%
+ \unexpanded{\def#1}{\exp_not:o {\jlreq@left}\hfil\unexpanded{#3}\hfil\exp_not:o {\jlreq@right}}%
}%
}%
\expandafter\endgroup
@@ -4142,7 +4172,7 @@
\ifx#1\@empty\else
\edef#1{%
\jlreq@ifempty{#2}{}{\unexpanded{\hskip-\dimexpr #2\relax}}%
- \expandonce{#1}%
+ \exp_not:o {#1}%
\jlreq@ifempty{#3}{}{\unexpanded{\hskip-\dimexpr #3\relax}}%
}%
\fi
@@ -4150,7 +4180,7 @@
% #1が空かつ#4が空でないならば#2に#3と#4の中身を追加し,#4を空にする.引数は全てコントロールシークエンス
\def\jlreq@pagestyle@addifempty#1#2#3#4{%
- \ifx#1\@empty\ifx#4\@empty\else\eappto#2{\expandonce{#3}\expandonce{#4}}\def#4{}\fi\fi
+ \ifx#1\@empty\ifx#4\@empty\else\tl_put_right:Nx #2{ \exp_not:o {#3}\exp_not:o {#4} }\def#4{}\fi\fi
}
\newif\ifjlreq@PageStyle@first
@@ -4161,23 +4191,23 @@
\jlreq@if{\expandafter\ifx\csname #1\endcsname\@empty\fi}{}{%
\edef\jlreq@do{%
\noexpand\jlreq@tempatrue % 最初の処理かフラグ
- \unexpanded{\jlreq@pagestyle@make@runninghead@{#1}{#2}{#3}}\csexpandonce{#1}\noexpand\jlreq@endmark
+ \unexpanded{\jlreq@pagestyle@make@runninghead@{#1}{#2}{#3}}\exp_args:Nc \exp_not:o {#1}\noexpand\jlreq@endmark
}%
\expandafter\def\csname #1\endcsname{}%
\jlreq@do
% 項目が二つ以上あった.
- \ifjlreq@tempa\else\cspreto{#1}{\jlreq@PageStyle@firsttrue}\fi
+ \ifjlreq@tempa\else\tl_put_left:cn {#1} {\jlreq@PageStyle@firsttrue} \fi
}%
}
\def\jlreq@pagestyle@make@runninghead@#1#2#3#4#5{%
\jlreq@if{\ifnum\numexpr\jlreq@ifendmark{#5}{1}{0}*\ifjlreq@tempa 1\else 0\fi\relax=1~\fi}{%
% 項目が一つしか無い
- \jlreq@ifempty{#2}{\csappto}{\cspreto}{#1}{#4}%
+ \jlreq@ifempty{#2}{\tl_put_right:cn}{\tl_put_left:cn}{#1}{#4}%
}{%
% 最初の空でない柱に出会うまでは柱の間の空白を入れない.
% 空でない柱に出会ってないならば\ifjlreq@PageStyle@firstはtrue.
% 一番最初の\jlreq@PageStyle@firsttrueは後で入れる.
- \jlreq@ifempty{#2}{\csappto}{\cspreto}{#1}{%
+ \jlreq@ifempty{#2}{\tl_put_right:cn}{\tl_put_left:cn}{#1}{%
\protected@edef\jlreq@tempa{#4}%
\ifx\jlreq@tempa\@empty\else
\ifjlreq@PageStyle@first\else\hskip\glueexpr#3\relax\fi
@@ -4194,8 +4224,8 @@
\def\jlreq@pagestyle@applyformat#1#2#3{%
% デフォルト時に限り,\hbox to ***{空トークン}を避ける
\ifnum 0\ifx#1\@empty\else 1\fi\ifx#2\relax\else 1\fi>0
- \edef\jlreq@do{\unexpanded{\def\jlreq@tempa##1}{\ifx#2\relax\expandonce{#3}\else\expandonce{#2}\fi}}\jlreq@do
- \edef#1{\expandafter\expandonce\expandafter{\expandafter\jlreq@tempa\expandafter{#1}}}%
+ \edef\jlreq@do{\unexpanded{\def\jlreq@tempa##1}{\ifx#2\relax\exp_not:o {#3}\else\exp_not:o {#2}\fi}}\jlreq@do
+ \edef#1{\expandafter\exp_not:o \expandafter{\expandafter\jlreq@tempa\expandafter{#1}}}%
\fi
}
@@ -4203,20 +4233,20 @@
\def\jlreq@pagestyle@addfont@tocs#1#2{%
\expandafter\ifx\csname #1\endcsname\@empty\else
\expandafter\ifx\csname #2\endcsname\@empty\else
- \expandafter\edef\csname #1\endcsname{{\csexpandonce{#2}\csexpandonce{#1}}}%
+ \expandafter\edef\csname #1\endcsname{{\exp_args:Nc \exp_not:o {#2}\exp_args:Nc \exp_not:o {#1}}}%
\fi
\fi
}
% こちらは#1にトークン列を与える.\edefで展開される.制御綴名#3に代入.
\def\jlreq@pagestyle@addfont@totokens#1#2#3{%
\begingroup
- \edef\jlreq@do{\noexpand\edef\expandonce{\csname#3\endcsname}{\unexpanded{#1}}}%
+ \edef\jlreq@do{\noexpand\edef\exp_not:c {#3}{\unexpanded{#1}}}%
\expandafter\ifx\csname #2\endcsname\@empty\else
\edef\jlreq@tempa{#1}%
\ifx\jlreq@tempa\@empty\else
\edef\jlreq@do{%
- \noexpand\edef\expandonce{\csname #3\endcsname}{\noexpand\unexpanded{%
- {\csexpandonce{#2}\expandonce{\jlreq@tempa}}%
+ \noexpand\edef\exp_not:c {#3}{\noexpand\unexpanded{%
+ {\exp_args:Nc \exp_not:o {#2}\exp_not:o {\jlreq@tempa}}%
}}%
}%
\fi
@@ -4317,7 +4347,7 @@
\clist_map_variable:nNn { odd, even } \jlreq@parity {
\clist_map_variable:nNn { 0, 1, 2 } \jlreq@i {
% \jlreq@pagestyle@setmarkが上の処理を行う.
- \edef\jlreq@next{\noexpand\jlreq@pagestyle@setmark{\expandonce{\csname jlreq@\jlreq@parity @running@head@\@roman\numexpr\jlreq@i + 1\relax\endcsname}}{\expandonce{\jlreq@i}}{\expandonce{\jlreq@parity}}{jlreq@markdata}{\noexpand\jlreq@headingmarklist}}%
+ \edef\jlreq@next{\noexpand\jlreq@pagestyle@setmark{\exp_not:c {jlreq@\jlreq@parity @running@head@\@roman\numexpr\jlreq@i + 1\relax}}{\exp_not:o {\jlreq@i}}{\exp_not:o {\jlreq@parity}}{jlreq@markdata}{\noexpand\jlreq@headingmarklist}}%
\jlreq@next
}%
}%
@@ -4332,13 +4362,13 @@
\else\ifnum\jlreq@minimumlevel>\jlreq@level\space\let\jlreq@minimumlevel=\jlreq@level\fi\fi
\fi
% \jlreq@markdata@<見出し命令>にある情報とmark_formatをもとに,\<見出し命令>markを定義するマクロを作成,\jlreq@markdefinecommandに入れる.
- \edef\jlreq@do{\noexpand\jlreq@pagestyle@make@headingmark{\ifjlreq@headii@exist *\fi}{\expandonce{\jlreq@heading}}{\expandonce{\jlreq@mark@format}}{\csexpandonce{jlreq@markdata@\jlreq@heading}}}%
+ \edef\jlreq@do{\noexpand\jlreq@pagestyle@make@headingmark{\ifjlreq@headii@exist *\fi}{\exp_not:o {\jlreq@heading}}{\exp_not:o {\jlreq@mark@format}}{\exp_args:Nc \exp_not:o {jlreq@markdata@\jlreq@heading}}}%
\jlreq@do
- \eappto\jlreq@markdefinecommand{\expandonce{\jlreq@result}}%
+ \tl_put_right:Nx \jlreq@markdefinecommand { \exp_not:o {\jlreq@result} }%
\fi
}%
\ifx\jlreq@minimumlevel\@undefined\else
- \eappto\jlreq@markdefinecommand{\noexpand\jlreq@pagestyle@setclearmark{\expandonce{\jlreq@minimumlevel}}}%
+ \tl_put_right:Nx \jlreq@markdefinecommand { \exp_not:N \jlreq@pagestyle@setclearmark { \exp_not:o {\jlreq@minimumlevel} } }
\fi
% 見出しを出す場合:evenに章などの高いレベルの見出しを出す(2.6.3.a)
\@ifundefined{jlreq@odd@running@head@i@heading@level}{}{\@ifundefined{jlreq@even@running@head@i@heading@level}{}{%
@@ -4359,10 +4389,10 @@
\def\jlreq@oddfoot{}\def\jlreq@evenfoot{}%
\ifx\jlreq@nombre@i@position\@empty\def\jlreq@nombre@i@position{5\jlreq@zw}\fi
\ifx\jlreq@running@head@i@position\@empty\def\jlreq@running@head@i@position{4\jlreq@zw}\fi
- \edef\jlreq@gapcs{\noexpand\hskip\noexpand\glueexpr\expandonce{\jlreq@nombre@gap}\noexpand\relax}%
+ \edef\jlreq@gapcs{\noexpand\hskip\noexpand\glueexpr\exp_not:o {\jlreq@nombre@gap}\noexpand\relax}%
\jlreq@pagestyle@addifempty{\jlreq@nombre@iii@position}{\jlreq@nombre@ii}{\jlreq@gapcs}{\jlreq@nombre@iii}%
\jlreq@pagestyle@addifempty{\jlreq@nombre@ii@position}{\jlreq@nombre@i}{\jlreq@gapcs}{\jlreq@nombre@ii}%
- \edef\jlreq@gapcs{\noexpand\hskip\noexpand\glueexpr\expandonce{\jlreq@running@head@gap}\noexpand\relax}%
+ \edef\jlreq@gapcs{\noexpand\hskip\noexpand\glueexpr\exp_not:o {\jlreq@running@head@gap}\noexpand\relax}%
\jlreq@pagestyle@addifempty{\jlreq@running@head@iii@position}{\jlreq@odd@running@head@ii}{\jlreq@gapcs}{\jlreq@odd@running@head@iii}%
\jlreq@pagestyle@addifempty{\jlreq@running@head@ii@position}{\jlreq@odd@running@head@i}{\jlreq@gapcs}{\jlreq@odd@running@head@ii}%
\jlreq@pagestyle@addifempty{\jlreq@running@head@iii@position}{\jlreq@even@running@head@ii}{\jlreq@gapcs}{\jlreq@even@running@head@iii}%
@@ -4374,10 +4404,10 @@
\jlreq@ifgluezero{\glueexpr\jlreq@position\relax}{\def\jlreq@position{}}{}%
\expandafter\let\expandafter\jlreq@tempa\expandafter=\csname jlreq@nombre@\jlreq@i\endcsname
\jlreq@pagestyle@addfont@tocs{jlreq@tempa}{jlreq@nombre@font}%
- \eappto\jlreq@nombre@contents{%
- \noexpand\hbox to 0pt{\noexpand\hss
- \expandonce{\jlreq@tempa}%
- \ifx\jlreq@position\@empty\else\unexpanded{\hskip \glueexpr}\expandonce{\jlreq@position}\noexpand\relax\fi
+ \tl_put_right:Nx \jlreq@nombre@contents {%
+ \exp_not:N \hbox to 0pt{\exp_not:N \hss
+ \exp_not:o {\jlreq@tempa}%
+ \ifx\jlreq@position\@empty\else\exp_not:n {\hskip \glueexpr}\exp_not:o {\jlreq@position}\exp_not:N \relax\fi
}%
}%
\fi
@@ -4391,12 +4421,12 @@
\jlreq@ifgluezero{\glueexpr\jlreq@position\relax}{\def\jlreq@position{}}{}%
\expandafter\let\expandafter\jlreq@tempa\expandafter=\csname jlreq@\jlreq@parity @running@head@\jlreq@i\endcsname
\jlreq@pagestyle@addfont@tocs{jlreq@tempa}{jlreq@running@head@font}%
- \expandafter\eappto\csname jlreq@\jlreq@parity @contents\endcsname{%
- \noexpand\hbox to 0pt{\unexpanded{\hskip\glueexpr\headsep + \headheight}%
- \if@tate\else\unexpanded{+ \topskip - \Cht}\fi
- \ifx\jlreq@position\@empty\else + \expandonce{\jlreq@position}\fi\noexpand\relax
- \expandonce{\jlreq@tempa}%
- \noexpand\hss
+ \tl_put_right:cx {jlreq@\jlreq@parity @contents} {%
+ \exp_not:N \hbox to 0pt{\exp_not:n {\hskip\glueexpr\headsep + \headheight}%
+ \if@tate\else\exp_not:n {+ \topskip - \Cht}\fi
+ \ifx\jlreq@position\@empty\else + \exp_not:o {\jlreq@position}\fi\exp_not:N \relax
+ \exp_not:o {\jlreq@tempa}%
+ \exp_not:N \hss
}%
}%
\fi
@@ -4406,17 +4436,17 @@
\@ifundefined{jlreq@\jlreq@parity headformat}
{\def\jlreq@format{####1}}%
{\expandafter\let\expandafter\jlreq@format\csname jlreq@\jlreq@parity headformat\endcsname}%
- \edef\jlreq@do{\unexpanded{\def\jlreq@tempa##1}{\expandonce{\jlreq@format}}}\jlreq@do
+ \edef\jlreq@do{\unexpanded{\def\jlreq@tempa##1}{\exp_not:o {\jlreq@format}}}\jlreq@do
\edef\jlreq@tempb{%
- \csexpandonce{jlreq@\jlreq@parity @contents}%
+ \exp_args:Nc \exp_not:o {jlreq@\jlreq@parity @contents}%
\noexpand\hfil
- \expandonce{\jlreq@nombre@contents}%
+ \exp_not:o {\jlreq@nombre@contents}%
}%
\expandafter\edef\csname jlreq@\jlreq@parity head\endcsname{%
\unexpanded{\setbox\jlreq@tempboxa=\hbox to \dimexpr\headsep + \headheight + \textheight}\if@tate\else\unexpanded{- \topskip + 1\jlreq@zh}\fi\noexpand\relax
{%
\unexpanded{\tate\adjustbaseline}%
- \expandafter\expandonce\expandafter{\expandafter\jlreq@tempa\expandafter{\jlreq@tempb}}%
+ \expandafter\exp_not:o \expandafter{\expandafter\jlreq@tempa\expandafter{\jlreq@tempb}}%
}%
% Underful対策
\ifx l\jlreq@engine
@@ -4436,11 +4466,11 @@
\unexpanded{\box\jlreq@tempboxa\hss}%
}%
\if@tate
- \eappto\jlreq@oddhead{\expandonce{\jlreq@lefthead@adjustbox}}%
- \eappto\jlreq@evenhead{\expandonce{\jlreq@righthead@adjustbox}}%
+ \tl_put_right:Nx \jlreq@oddhead{\exp_not:o {\jlreq@lefthead@adjustbox}}%
+ \tl_put_right:Nx \jlreq@evenhead{\exp_not:o {\jlreq@righthead@adjustbox}}%
\else
- \eappto\jlreq@oddhead{\expandonce{\jlreq@righthead@adjustbox}}%
- \eappto\jlreq@evenhead{\expandonce{\jlreq@lefthead@adjustbox}}%
+ \tl_put_right:Nx \jlreq@oddhead{\exp_not:o {\jlreq@righthead@adjustbox}}%
+ \tl_put_right:Nx \jlreq@evenhead{\exp_not:o {\jlreq@lefthead@adjustbox}}%
\fi
}{% yoko
% 場所を正規化する.
@@ -4458,7 +4488,7 @@
\clist_map_variable:nNn {
jlreq@nombre@i@position, jlreq@nombre@ii@position, jlreq@nombre@iii@position, jlreq@running@head@i@position, jlreq@running@head@ii@position, jlreq@running@head@iii@position
} \jlreq@tempa {
- \edef\jlreq@next{\noexpand\jlreq@pagestyle@parse@position{\csexpandonce{\jlreq@tempa}}{\expandonce{\csname\jlreq@tempa\endcsname}}{\csexpandonce{\jlreq@tempa @default}}}%
+ \edef\jlreq@next{\noexpand\jlreq@pagestyle@parse@position{\exp_args:Nc \exp_not:o {\jlreq@tempa}}{\exp_not:c {\jlreq@tempa}}{\exp_args:Nc \exp_not:o {\jlreq@tempa @default}}}%
\jlreq@next
}%
\bool_if:nT { (
@@ -4506,10 +4536,10 @@
\edef\jlreq@vert{\expandafter\@firstoftwo\jlreq@position}%
\edef\jlreq@hor{\expandafter\@secondoftwo\jlreq@position}%
\str_if_eq:VnT \jlreq@parity { even } {\jlreq@reverse@leftright{\jlreq@hor}}
- \jlreq@ifleftpage{\jlreq@parity}{\let\jlreq@addtocs=\cseappto}{\let\jlreq@addtocs\csepreto}%
+ \jlreq@ifleftpage{\jlreq@parity}{\let\jlreq@addtocs=\tl_put_right:cx}{\let\jlreq@addtocs\tl_put_left:cx}%
\edef\jlreq@csname{jlreq@nombre@\jlreq@parity @\jlreq@vert @\jlreq@hor}%
- \expandafter\ifx\csname\jlreq@csname\endcsname\@empty\else\jlreq@addtocs{\jlreq@csname}{\unexpanded{\hskip\glueexpr}\expandonce{\jlreq@nombre@gap}\noexpand\relax}\fi
- \jlreq@addtocs{\jlreq@csname}{\csexpandonce{jlreq@nombre@\jlreq@i}}%
+ \expandafter\ifx\csname\jlreq@csname\endcsname\@empty\else\jlreq@addtocs{\jlreq@csname}{\unexpanded{\hskip\glueexpr}\exp_not:o {\jlreq@nombre@gap}\noexpand\relax}\fi
+ \jlreq@addtocs{\jlreq@csname}{\exp_args:Nc \exp_not:o {jlreq@nombre@\jlreq@i}}%
\fi
% running@head
% 一度「紙面の外から」の順番で{A}{B}{C}と入れる
@@ -4518,16 +4548,16 @@
\edef\jlreq@vert{\expandafter\@firstoftwo\jlreq@position}%
\edef\jlreq@hor{\expandafter\@secondoftwo\jlreq@position}%
\str_if_eq:VnT \jlreq@parity { even } {\jlreq@reverse@leftright{\jlreq@hor}}
- \str_if_eq:VVTF \jlreq@hor \jlreq@pagehor {\let\jlreq@addtocs=\cseappto}{\let\jlreq@addtocs=\csepreto}%
+ \str_if_eq:VVTF \jlreq@hor \jlreq@pagehor {\let\jlreq@addtocs=\tl_put_right:cx}{\let\jlreq@addtocs=\tl_put_left:cx}%
\edef\jlreq@csname{jlreq@running@head@\jlreq@parity @\jlreq@vert @\jlreq@hor}%
- \jlreq@addtocs{\jlreq@csname}{{\csexpandonce{jlreq@\jlreq@parity @running@head@\jlreq@i}}}%
+ \jlreq@addtocs{\jlreq@csname}{{\exp_args:Nc \exp_not:o {jlreq@\jlreq@parity @running@head@\jlreq@i}}}%
\fi
}%
% {A}{B}{C}の順だった柱を結合する.本体は\jlreq@pagestyle@make@runninghead.
\clist_map_variable:nNn { top, bottom } \jlreq@vert {
\clist_map_variable:nNn { left, center, right } \jlreq@hor {
\str_if_eq:VnTF \jlreq@hor { right } { \def\jlreq@tempa{*} } { \def\jlreq@tempa{} }
- \edef\jlreq@do{\noexpand\jlreq@pagestyle@make@runninghead{jlreq@running@head@\jlreq@parity @\jlreq@vert @\jlreq@hor}{\expandonce{\jlreq@tempa}}{\expandonce{\jlreq@running@head@gap}}}%
+ \edef\jlreq@do{\noexpand\jlreq@pagestyle@make@runninghead{jlreq@running@head@\jlreq@parity @\jlreq@vert @\jlreq@hor}{\exp_not:o {\jlreq@tempa}}{\exp_not:o {\jlreq@running@head@gap}}}%
\jlreq@do
}%
}%
@@ -4540,7 +4570,7 @@
% nombreにフォント設定を追加.
\expandafter\ifx\csname\jlreq@nombrecsname\endcsname\@empty\else
\ifx\jlreq@nombre@font\@empty\else
- \expandafter\edef\csname\jlreq@nombrecsname\endcsname{{\expandonce{\jlreq@nombre@font}\csexpandonce{\jlreq@nombrecsname}}}%
+ \expandafter\edef\csname\jlreq@nombrecsname\endcsname{{\exp_not:o {\jlreq@nombre@font}\exp_args:Nc \exp_not:o {\jlreq@nombrecsname}}}%
\fi
\fi
\jlreq@if{\expandafter\ifx\csname\jlreq@runheadcsname\endcsname\@empty\fi}{%
@@ -4557,32 +4587,32 @@
\str_if_eq:VnTF \jlreq@hor { right } {
% <ノンブル><空き><柱>,右寄せ
% 柱が空出ないときに限り<空き>を入れる.
- \jlreq@pagestyle@addfont@totokens{\exp_not:N \dim_compare:nF { \exp_not:n { \wd\jlreq@PageStyle@box=0pt } } { \exp_not:N \hskip\expandonce{\jlreq@gap}\exp_no:N \relax } }{jlreq@running@head@font}{jlreq@tempa}%
+ \jlreq@pagestyle@addfont@totokens{\exp_not:N \dim_compare:nF { \exp_not:n { \wd\jlreq@PageStyle@box=0pt } } { \exp_not:N \hskip\exp_not:o {\jlreq@gap}\exp_not:N \relax } }{jlreq@running@head@font}{jlreq@tempa}%
\expandafter\edef\csname\jlreq@csname\endcsname{%
- \unexpanded{\setbox\jlreq@PageStyle@box=\hbox}{\expandonce{\jlreq@running@head@font}\csexpandonce{\jlreq@runheadcsname}}%
- \csexpandonce{\jlreq@nombrecsname}\expandonce{\jlreq@tempa}\unexpanded{\box\jlreq@PageStyle@box}%
+ \unexpanded{\setbox\jlreq@PageStyle@box=\hbox}{\exp_not:o {\jlreq@running@head@font}\exp_args:Nc \exp_not:o {\jlreq@runheadcsname}}%
+ \exp_args:Nc \exp_not:o {\jlreq@nombrecsname}\exp_not:o {\jlreq@tempa}\unexpanded{\box\jlreq@PageStyle@box}%
}%
}{%
% <ノンブル><空き><柱>,左寄せ
% ノンブルは常に空ではないと仮定する.
- \jlreq@pagestyle@addfont@totokens{\unexpanded{\hskip\glueexpr}\expandonce{\jlreq@gap}\noexpand\relax\csexpandonce{\jlreq@runheadcsname}}{jlreq@running@head@font}{jlreq@tempa}%
- \expandafter\edef\csname\jlreq@csname\endcsname{\csexpandonce{\jlreq@nombrecsname}\expandonce{\jlreq@tempa}}%
+ \jlreq@pagestyle@addfont@totokens{\unexpanded{\hskip\glueexpr}\exp_not:o {\jlreq@gap}\noexpand\relax\exp_args:Nc \exp_not:o {\jlreq@runheadcsname}}{jlreq@running@head@font}{jlreq@tempa}%
+ \expandafter\edef\csname\jlreq@csname\endcsname{\exp_args:Nc \exp_not:o {\jlreq@nombrecsname}\exp_not:o {\jlreq@tempa}}%
}%
}{%
\str_if_eq:VnTF \jlreq@hor { left } {
% <柱><空き><ノンブル>,左寄せ
\jlreq@pagestyle@addfont@totokens{%
- \unexpanded{\setbox\jlreq@PageStyle@box=\hbox}{\csexpandonce{\jlreq@runheadcsname}}%
+ \unexpanded{\setbox\jlreq@PageStyle@box=\hbox}{\exp_args:Nc \exp_not:o {\jlreq@runheadcsname}}%
\unexpanded{\copy\jlreq@PageStyle@box}
\exp_not:N \dim_compare:nF { \exp_not:n { \wd\jlreq@PageStyle@box=0pt } } {
\exp_not:n { \hskip\glueexpr } \exp_not:o {\jlreq@gap} \exp_not:N \relax
}
}{jlreq@running@head@font}{jlreq@tempa}%
- \expandafter\edef\csname\jlreq@csname\endcsname{\expandonce{\jlreq@tempa}\csexpandonce{\jlreq@nombrecsname}}%
+ \expandafter\edef\csname\jlreq@csname\endcsname{\exp_not:o {\jlreq@tempa}\exp_args:Nc \exp_not:o {\jlreq@nombrecsname}}%
}{%
% <柱><空き><ノンブル>,右寄せ
- \jlreq@pagestyle@addfont@totokens{\csexpandonce{\jlreq@runheadcsname}\unexpanded{\hskip\glueexpr}\expandonce{\jlreq@gap}\noexpand\relax}{jlreq@running@head@font}{jlreq@tempa}%
- \expandafter\edef\csname\jlreq@csname\endcsname{\expandonce{\jlreq@tempa}\csexpandonce{\jlreq@nombrecsname}}%
+ \jlreq@pagestyle@addfont@totokens{\exp_args:Nc \exp_not:o {\jlreq@runheadcsname}\unexpanded{\hskip\glueexpr}\exp_not:o {\jlreq@gap}\noexpand\relax}{jlreq@running@head@font}{jlreq@tempa}%
+ \expandafter\edef\csname\jlreq@csname\endcsname{\exp_not:o {\jlreq@tempa}\exp_args:Nc \exp_not:o {\jlreq@nombrecsname}}%
}%
}%
}%
@@ -4622,7 +4652,7 @@
\fi
}%
\edef\jlreq@do{%
- \noexpand\edef\expandonce{\csname ps@#1\endcsname}{%
+ \noexpand\edef\exp_not:c {ps@#1}{%
\noexpand\unexpanded{%
\unexpanded{\def\jlreq@current@pagestyle{#1}}%
\ifjlreq@clearmarkcommand\unexpanded{\jlreq@heading@execmacro@toallheadings\jlreq@clearheadingmarks}\fi
@@ -4631,12 +4661,12 @@
\else
\unexpanded{\let\@mkboth=\markboth}%
\fi
- \unexpanded{\def\@oddhead}{\expandonce{\jlreq@oddhead}}%
- \unexpanded{\def\@oddfoot}{\expandonce{\jlreq@oddfoot}}%
- \unexpanded{\def\@evenhead}{\expandonce{\jlreq@evenhead}}%
- \unexpanded{\def\@evenfoot}{\expandonce{\jlreq@evenfoot}}%
- \expandonce{\jlreq@markdefinecommand}%
- \expandonce{\jlreq@command}%
+ \unexpanded{\def\@oddhead}{\exp_not:o {\jlreq@oddhead}}%
+ \unexpanded{\def\@oddfoot}{\exp_not:o {\jlreq@oddfoot}}%
+ \unexpanded{\def\@evenhead}{\exp_not:o {\jlreq@evenhead}}%
+ \unexpanded{\def\@evenfoot}{\exp_not:o {\jlreq@evenfoot}}%
+ \exp_not:o {\jlreq@markdefinecommand}%
+ \exp_not:o {\jlreq@command}%
}%
}%
}%
@@ -4672,7 +4702,7 @@
\begingroup
\@ifundefined{jlreq@pagestyle@setting@#1}{\ClassError{jlreq}{Unknown~pagestyle:~#1}{\@ehc}}{}%
\expandafter\let\expandafter\setting\expandafter=\csname jlreq@pagestyle@setting@#1\endcsname
- \edef\jlreq@do{\noexpand\RenewPageStyle{#1}{\expandonce{\setting},\unexpanded{#2}}}%
+ \edef\jlreq@do{\noexpand\RenewPageStyle{#1}{\exp_not:o {\setting},\unexpanded{#2}}}%
\expandafter\endgroup
\jlreq@do
}
@@ -4697,19 +4727,19 @@
\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}{}%
+ \tl_put_left:Nx \jlreq@do {%
+ \noexpand\edef\exp_not:c {#2}{\unexpanded{\unexpanded{##1}}}
+ \noexpand\def\exp_not:c {#1}{}%
}%
\clist_map_variable:cNn {#1} \jlreq@tempa {
- \epreto\jlreq@do{\noexpand\let\expandonce{\csname #2@\jlreq@tempa\endcsname}\noexpand\@undefined}%
+ \tl_put_left:Nx \jlreq@do {\noexpand\let\exp_not:c {#2@\jlreq@tempa}\noexpand\@undefined}%
}%
}{%
- \eappto\jlreq@do{%
- \noexpand\edef\expandonce{\csname #2@##1\endcsname}{\unexpanded{\unexpanded{##2}}}%
+ \tl_put_right:Nx \jlreq@do {%
+ \noexpand\edef\exp_not:c {#2@##1}{\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}}%
+ \unexpanded{\expandafter\jlreq@tempa\expandafter}{\exp_not:c {#1}}{\exp_not:c {#1}}%
+ \unexpanded{\tl_put_right:cn {#1}{,##1}}%
}%
}%
}{#3}%
@@ -4720,7 +4750,7 @@
% #1@#2が定義されていれば\#1@#2の中身に,そうでなければ\#1の中身に展開される.
% 展開は\unexpandedで抑制される.
\def\jlreq@jlreqsetup@withenv@nameuse#1#2{%
- \jlreq@if{\expandafter\ifx\csname #1@#2\endcsname\relax\fi}{\csexpandonce{#1}}{\csexpandonce{#1@#2}}%
+ \jlreq@if{\expandafter\ifx\csname #1@#2\endcsname\relax\fi}{\exp_args:Nc \exp_not:o {#1}}{\exp_args:Nc \exp_not:o {#1@#2}}%
}
% 4.3.1 注4
\newlength\abovecaptionskip
@@ -4743,7 +4773,7 @@
\edef\jlreq@tempa{{\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@font@setting}{\jlreq@tempb}\unexpanded{#2}}}%
\else
\edef\jlreq@tempa{%
- {\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@label@font@setting}{\jlreq@tempb}\expandonce{\jlreq@tempa{#1}}}%
+ {\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@label@font@setting}{\jlreq@tempb}\exp_not:o {\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}}%
}%
@@ -4796,11 +4826,11 @@
\tl_if_empty:nTF {#1} {
\clist_map_inline:Nn \g__jlreq_@makecaption_align_envlist_clist {
\tl_put_right:Nx \l_jlreq_tmpb_tl {
- \exp_not:N \let \exp_not:o {\csname jlreq@@makecaption@align@setting@large##1\endcsname}=\exp_not:N \@undefined
+ \exp_not:N \let \exp_not:c {jlreq@@makecaption@align@setting@large##1}=\exp_not:N \@undefined
}
\tl_if_empty:nT {#2} {
\tl_put_right:Nx \l_jlreq_tmpb_tl {
- \exp_not:N \let \exp_not:o {\csname jlreq@@makecaption@align@setting@small##1\endcsname}=\exp_not:N \@undefined
+ \exp_not:N \let \exp_not:c {jlreq@@makecaption@align@setting@small##1}=\exp_not:N \@undefined
}
}
}
@@ -4932,7 +4962,7 @@
% 縦書き時には表組み内でも縦書きにするようにする
\if@tate
\let\jlreq@temporary@original@ialign=\ialign
- \pretocmd{\ialign}{\unexpanded{\tate\let\ialign=\jlreq@temporary@original@ialign}}{}{}%
+ \tl_put_left:Nn \ialign {\unexpanded{\tate\let\ialign=\jlreq@temporary@original@ialign}}{}{}%
\fi
\begin{tabular}[t]{c}%
\@author
@@ -5005,7 +5035,7 @@
% 縦書き時には表組み内でも縦書きにするようにする
\if@tate
\let\jlreq@temporary@original@ialign=\ialign
- \pretocmd{\ialign}{\unexpanded{\tate\let\ialign=\jlreq@temporary@original@ialign}}{}{}%
+ \tl_put_left:Nn \ialign {\unexpanded{\tate\let\ialign=\jlreq@temporary@original@ialign}}{}{}%
\fi
\begin{tabular}[t]{c}%
\@author
@@ -5140,45 +5170,49 @@
\clist_map_variable:nNn {i,ii,iii,iv,v,vi} \jlreq@tempa{
\clist_map_variable:cNn {#1} \jlreq@tempb {
\ifx\jlreq@tempb\@empty\else
- \eappto\jlreq@generalset{\noexpand\let\expandonce{\csname #2@\jlreq@tempa @\jlreq@tempb\endcsname}\noexpand\@undefined}%
+ \tl_put_right:Nx \jlreq@generalset {
+ \noexpand\let\exp_not:c{#2@\jlreq@tempa @\jlreq@tempb}\noexpand\@undefined
+ }
\fi
}%
- \eappto\jlreq@generalset{%
- \noexpand\edef\expandonce{\csname #2@\jlreq@tempa\endcsname}{\unexpanded{\unexpanded{##1}}}%
+ \tl_put_right:Nx \jlreq@generalset {%
+ \exp_not:N \edef\exp_not:c {#2@\jlreq@tempa}{\exp_not:n {\exp_not:n {##1}}}%
}%
}%
- \appto\jlreq@generalset{\expandafter\def\csname #1\endcsname{}}%
+ \tl_put_right:Nn \jlreq@generalset { \expandafter\def\csname #1\endcsname{} }%
}{%
\bool_if:nTF{ \str_if_eq_p:nn {##1} {i} || \str_if_eq_p:nn {##1} {ii} || \str_if_eq_p:nn {##1} {iii} || \str_if_eq_p:nn {##1} {iv} || \str_if_eq_p:nn {##1} {v} || \str_if_eq_p:nn {##1} {vi} }{
% i=とかの時,環境に対応するものをクリアし,\#2@##1に値を入れる
\clist_map_variable:cNn {#1} \jlreq@tempa {
\ifx\jlreq@tempa\@empty\else
- \epreto\jlreq@envset{\noexpand\let\expandonce{\csname #2@##1@\jlreq@tempa\endcsname}\noexpand\@undefined}%
+ \tl_put_left:Nx \jlreq@envset{\noexpand\let\exp_not:c {#2@##1@\jlreq@tempa}\noexpand\@undefined}%
\fi
}%
- \eappto\jlreq@envset{\noexpand\edef\expandonce{\csname #2@##1\endcsname}{\unexpanded{\unexpanded{##2}}}}%
+ \tl_put_right:Nx \jlreq@envset{\exp_not:N \edef\exp_not:c{#2@##1}{\exp_not:n {\exp_not:n{##2}}}}%
}{%
% そうでないとき,環境.##1 = 環境名
\jlreq@parsekeyval@nokey{%
\ifjlreq@parsekeyval@nokey@novalue{%
% i - viまでに全てセットする.
\clist_map_variable:nNn {i,ii,iii,iv,v,vi} \jlreq@tempa{
- \epreto\jlreq@envset{\noexpand\edef\expandonce{\csname #2@\jlreq@tempa @##1\endcsname}{\unexpanded{\unexpanded{####1}}}}%
+ \tl_put_left:Nx \jlreq@envset{\noexpand\edef\exp_not:c {#2@\jlreq@tempa @##1}{\unexpanded{\unexpanded{####1}}}}%
}%
}{%
% ピンポイント代入
- \eappto\jlreq@envset{\noexpand\edef\expandonce{\csname #2@####1@##1\endcsname}{\unexpanded{\unexpanded{####2}}}}%
+ \tl_put_right:Nx \jlreq@envset {
+ \exp_not:N \edef\exp_not:c {#2@####1@##1}{\exp_not:n {\exp_not:n {####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}}%
+ \tl_put_right:Nx \jlreq@envset{%
+ \exp_not:n {\def\jlreq@tempa{\jlreq@helper@removeelement{##1}}}%
+ \exp_not:n {\expandafter\jlreq@tempa\expandafter}{\exp_not:c{#1}}{\exp_not:c {#1}}%
+ \exp_not:N \tl_put_right:Nn \exp_not:c {#1}{\exp_not:n {,##1}}%
}%
}%
}%
}{#3}%
- \edef\jlreq@do{\expandonce{\jlreq@generalset}\expandonce{\jlreq@levelset}\expandonce{\jlreq@envset}}%
+ \edef\jlreq@do{\exp_not:o {\jlreq@generalset}\exp_not:o {\jlreq@levelset}\exp_not:o {\jlreq@envset}}%
\expandafter\endgroup
\jlreq@do
}
@@ -5215,7 +5249,7 @@
\keys_define:nn { jlreqsetup } { quote_end_indent .tl_set:N = \jlreq@quote@end@indent }
\keys_define:nn { jlreqsetup }{
quote_fontsize .choices:nn = {normalsize,small,footnotesize,scriptsize,tiny,{}}{
- \jlreq@ifempty{#1}{\def\jlreq@quote@fontsize{}}{\edef\jlreq@quote@fontsize{\expandonce{\csname #1\endcsname}}}
+ \jlreq@ifempty{#1}{\def\jlreq@quote@fontsize{}}{\edef\jlreq@quote@fontsize{\exp_not:c {#1}}}
}
}
\keys_define:nn { jlreqsetup } { quote_beforeafter_space .tl_set:N = \jlreq@quote@beforeafter@space }
@@ -5283,8 +5317,8 @@
% 表内の行間を0にする(4.4.3.f)
\jlreq@saveoriginalcs{tabular}
\jlreq@saveoriginalcs{endtabular}
-\preto\tabular{\begingroup\appto\@arrayparboxrestore{\baselineskip=0pt\lineskip=0pt}}
-\appto\endtabular{\endgroup}
+\tl_put_left:Nn \tabular {\begingroup\tl_put_right:Nn \@arrayparboxrestore{\baselineskip=0pt\lineskip=0pt}}
+\tl_put_right:Nn \endtabular{\endgroup}
% 4.4.3.e
\setlength\tabcolsep{.5\zh}
\setlength\arraycolsep{.5\zw}
@@ -5313,15 +5347,12 @@
% tarticleから
\newdimen\@lnumwidth
\def\numberline#1{\hbox to\@lnumwidth{#1\hfil}}
-\def\addcontentsline#1#2#3{%
- \protected@write\@auxout{%
- \let\label\@gobble\let\index\@gobble\let\glossary\@gobble
- \if@tate
- \@temptokena{\tatechuyoko{\thepage}}%
- \else
- \@temptokena{\thepage}%
- \fi
- }{\string\@writefile{#1}{\protect\contentsline{#2}{#3}{\the\@temptokena}}}%
+
+% from latex.ltx
+\legacy_if:nT { @tate } {
+ \def\addcontentsline#1#2#3{%
+ \addtocontents{#1}{\protect\contentsline{#2}{#3}{\tatechuyoko*{\thepage}}{}%
+ \protected@file@percent}}
}
\newcount\jlreq@top@contents % トップ見出しを入れる.レベルと同じ値.
@@ -5465,14 +5496,16 @@
\jlreq@tempafalse % restore
\jlreq@parsekeyval@nokey{%
\ifjlreq@parsekeyval@nokey@novalue{\def\jlreq@tempa{##1}}{%
- \jlreq@switch{##1}{%
+ \str_if_eq:nnT {##1} { restore } {
{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}%
+ \tl_put_right:Nx \jlreq@theindex@pagestyle {
+ \exp_not:n {\let\jlreq@theindex@savedpagestyle}\ifjlreq@tempa\exp_not:N \jlreq@current@pagestyle\else\exp_not:N \@undefined\fi
+ }%
\ifx\jlreq@tempa\@empty\else
- \eappto\jlreq@theindex@pagestyle{\noexpand\pagestyle{\expandonce{\jlreq@tempa}}}%
+ \tl_put_right:Nx \jlreq@theindex@pagestyle{\exp_not:N \pagestyle{\exp_not:o \jlreq@tempa}}%
\fi
}
}
@@ -5493,19 +5526,18 @@
\jlreq@parsekeyval@nokey{%
% 各見出し命令に対する設定を解析
\ifjlreq@parsekeyval@nokey@novalue{%
- \eappto\jlreq@headingsettings{\unexpanded{####1}}%
+ \tl_put_right:Nx \jlreq@headingsettings {\exp_not:n {####1}}%
}{%
\str_case_e:nnF {####1} {%
{heading_type}{%
\lowercase{\def\jlreq@tempa{####2}}%
- \jlreq@switch{\jlreq@tempa}{
+ \str_case_e:nnF { \jlreq@tempa } {
{tobira}{\def\jlreq@declaretype{RenewTobira}}
{block}{\def\jlreq@declaretype{RenewBlock}}
{runin}{\def\jlreq@declaretype{RenewRunin}}
{cutin}{\def\jlreq@declaretype{RenewCutin}}
{modify}{\def\jlreq@declaretype{Modify}}
- {\ClassError{jlreq}{Unknown~heading~type~`####2'}{\@ehc}}
- }%
+ }{\ClassError{jlreq}{Unknown~heading~type~`####2'}{\@ehc}}
}
{heading_level}{\def\jlreq@level{####2}}
}{%
@@ -5514,35 +5546,35 @@
\csname jlreq@tempa####2\endcsname\@gobble
}{\@firstofone}%
}%
- {\eappto\jlreq@headingsettings{\ifx\jlreq@headingsettings\@empty\else ,\fi\unexpanded{####1={####2}}}}%
+ {\tl_put_right:Nx \jlreq@headingsettings{\ifx\jlreq@headingsettings\@empty\else ,\fi\unexpanded{####1={####2}}}}%
}%
}%
}{##2}%
\jlreq@ifempty{#1}{}{%
\ifjlreq@tempa
- \eappto\jlreq@headingscmds{\noexpand\SaveHeading{\unexpanded{##1}}{\expandonce{\csname #2@##1\endcsname}}}%
- \eappto\jlreq@restoreheadings{\ifx\jlreq@restoreheadings\@empty\else ,\fi\unexpanded{##1}}%
+ \tl_put_right:Nx \jlreq@headingscmds {\exp_not:N \SaveHeading{\exp_not:n {##1}}{\exp_not:c {#2@##1}}}%
+ \tl_put_right:Nx \jlreq@restoreheadings {\ifx\jlreq@restoreheadings\@empty\else ,\fi\exp_not:n {##1}}%
\fi
}%
% \jlreq@declareに\ModifyHeadingか\Renew***Headingを入れる
- \edef\jlreq@declare{\expandonce{\csname\jlreq@declaretype Heading\endcsname}{##1}}%
+ \edef\jlreq@declare{\exp_not:c {\jlreq@declaretype Heading}{##1}}%
\str_if_eq:VnF \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}}}}%
+ \unexpanded{\edef\jlreq@tempa}{\noexpand\unexpanded{\exp_not:o {\jlreq@declare}}{\noexpand\exp_not:o {\exp_not:c {jlreq@heading@level@##1}}}}%
\noexpand\jlreq@tempa
}%
\else
- \eappto\jlreq@declare{{\expandonce{\jlreq@level}}}%
+ \tl_put_right:Nx \jlreq@declare {{\exp_not:o {\jlreq@level}}}%
\fi
}{}%
- \eappto\jlreq@headingscmds{\expandonce{\jlreq@declare}{\expandonce{\jlreq@headingsettings}}}%
+ \tl_put_right:Nx \jlreq@headingscmds {\exp_not:o {\jlreq@declare}{\exp_not:o {\jlreq@headingsettings}}}%
}{#4}%
\edef\jlreq@do{%
\unexpanded{\def#3}{%
- \expandonce{\jlreq@headingscmds}%
- \jlreq@ifempty{#1}{}{\unexpanded{\def#1}{\expandonce{\jlreq@restoreheadings}}}%
+ \exp_not:o {\jlreq@headingscmds}%
+ \jlreq@ifempty{#1}{}{\unexpanded{\def#1}{\exp_not:o {\jlreq@restoreheadings}}}%
}%
}%
\expandafter\endgroup
@@ -5552,11 +5584,11 @@
\def\jlreq@matter@counter@norestore#1#2{%
\def#1{}%
\jlreq@parsekeyval@nokey{%
- \keys_define:nn { __jlreq_keyval } {
- value .code:n = \appto#1{\setcounter{##1}{####1}},
- the .code:n = {\eappto#1{\noexpand\def\expandonce{\csname the##1\endcsname}{\unexpanded{####1}}}}
+ \keys_define:nn { __jlreq_keyval_matter_counter_norestore } {
+ value .code:n = { \tl_put_right:Nn #1 { \setcounter{##1}{####1} } },
+ the .code:n = { \tl_put_right:Nx #1 { \exp_not:N \def\exp_not:c {the##1}{\exp_not:n {####1}} } }
}
- \keys_set:nn { __jlreq_keyval } {##2}
+ \keys_set:nn { __jlreq_keyval_matter_counter_norestore } {##2}
}{#2}%
}
@@ -5564,30 +5596,29 @@
\newif\if@mainmatter
\@mainmattertrue
\keys_define:nn { jlreqsetup } {frontmatter_pagebreak .code:n = {%
- \edef\jlreq@frontmatter@pagebreak{\jlreq@ifempty{#1}{}{\expandonce{\csname #1\endcsname}}}%
+ \edef\jlreq@frontmatter@pagebreak{\jlreq@ifempty{#1}{}{\exp_not:c {#1}}}%
}}
\keys_define:nn { jlreqsetup } {frontmatter_counter .code:n = {%
\def\jlreq@frontmatter@counter{}%
- \def\jlreq@tempa{}% 復帰させるカウンタ名リスト
+ \tl_set:Nn \jlreq@frontmatter@counter { \seq_gclear:N \g__jlreq_frontmatter_resetcounter_seq }
\jlreq@parsekeyval@nokey{%
\def\jlreq@tempb{}% 中身
\jlreq@tempatrue % restore
\keys_define:nn { frontmatter_counter } {
- value .code:n = {\appto\jlreq@tempb{\setcounter{##1}{####1}}},
- restore .code:n = {\csname jlreq@tempa####1\endcsname},
- the .code:n = {\eappto\jlreq@tempb{\noexpand\def\expandonce{\csname the##1\endcsname}{\unexpanded{####1}}}}
+ value .code:n = { \tl_put_right:Nn \jlreq@tempb{\setcounter{##1}{####1}} },
+ restore .code:n = { \csname jlreq@tempa####1\endcsname },
+ the .code:n = { \tl_put_right:Nx \jlreq@tempb { \exp_not:N \def\exp_not:c {the##1}{\exp_not:n {####1}} } }
}
\keys_set:nn { frontmatter_counter } {##2}
\ifjlreq@tempa
- \epreto\jlreq@tempb{%
- \noexpand\let\expandonce{\csname jlreq@frontmatter@savedcounter@the@##1\endcsname}\expandonce{\csname the##1\endcsname}%
- \noexpand\edef\expandonce{\csname jlreq@frontmatter@savedcounter@value@##1\endcsname}{\unexpanded{\the\value{##1}}}%
+ \tl_put_left:Nx \jlreq@tempb {%
+ \noexpand\let\exp_not:c {jlreq@frontmatter@savedcounter@the@##1}\exp_not:c {the##1}%
+ \noexpand\edef\exp_not:c {jlreq@frontmatter@savedcounter@value@##1}{\unexpanded{\the\value{##1}}}%
}%
- \eappto\jlreq@tempa{\ifx\jlreq@tempa\@empty\else ,\fi\unexpanded{##1}}%
+ \tl_put_right:Nn \jlreq@frontmatter@counter { \seq_gput_right:Nn \g__jlreq_frontmatter_resetcounter_seq { ##1 } }
\fi
- \eappto\jlreq@frontmatter@counter{\expandonce{\jlreq@tempb}}%
+ \tl_put_right:NV \jlreq@frontmatter@counter \jlreq@tempb
}{#1}%
- \eappto\jlreq@frontmatter@counter{\unexpanded{\def\jlreq@frontmatter@restorecounters}{\expandonce{\jlreq@tempa}}}%
}
}
\keys_define:nn { jlreqsetup } {frontmatter_heading .code:n = {\jlreq@matter@heading[\jlreq@frontmatter@restoreheadings]{jlreq@frontmatter@savedheading}{\jlreq@frontmatter@heading}{#1}}}
@@ -5597,16 +5628,14 @@
\jlreq@tempatrue % restore
\jlreq@parsekeyval@nokey{%
\ifjlreq@parsekeyval@nokey@novalue{\def\jlreq@tempa{##1}}{%
- \jlreq@switch{##1}{%
- {restore}{\csname jlreq@tempa##2\endcsname}%
- }%
+ \str_if_eq:nnT { ##1 } { restore } { \csname jlreq@tempa##2\endcsname }
}%
}{#1}%
\ifjlreq@tempa
- \appto\jlreq@frontmatter@pagestyle{\let\jlreq@frontmatter@savedpagestyle\jlreq@current@pagestyle}%
+ \tl_put_right:Nn \jlreq@frontmatter@pagestyle{\let\jlreq@frontmatter@savedpagestyle\jlreq@current@pagestyle}%
\fi
\ifx\jlreq@tempa\@empty\else
- \eappto\jlreq@frontmatter@pagestyle{\noexpand\pagestyle{\expandonce{\jlreq@tempa}}}%
+ \tl_put_right:Nx \jlreq@frontmatter@pagestyle { \exp_not:N \pagestyle{\exp_not:o {\jlreq@tempa}} }%
\fi
}
}
@@ -5616,14 +5645,13 @@
\def\jlreq@pagination@frontmatterstyle{arabic}%
\let\jlreq@pagination@mainmatterpagecommand=\pagenumbering
\clist_map_variable:nNn {#1} \jlreq@tempa {
- \expandafter\jlreq@helper@trim\expandafter{\jlreq@tempa}{\jlreq@tempa}%
- \jlreq@switch{\jlreq@tempa}{
+ \tl_set:Nx \jlreq@tempa { \tl_trim_spaces:o \jlreq@tempa }
+ \str_case_e:nnF {\jlreq@tempa}{
{continuous}{%
\def\jlreq@pagination@mainmatterpagecommand##1{\gdef\thepage{\csname @##1\endcsname\c@page}}%
}
{independent}{\let\jlreq@pagination@mainmatterpagecommand=\pagenumbering}
- {\edef\jlreq@pagination@frontmatterstyle{\jlreq@tempa}}
- }%
+ }{\edef\jlreq@pagination@frontmatterstyle{\jlreq@tempa}}
}%
}
}
@@ -5638,11 +5666,11 @@
\expandafter\gdef\expandafter\thepage\expandafter{\csname @\jlreq@pagination@frontmatterstyle\endcsname\c@page}%
\jlreq@frontmatter@postcode
}
- \def\jlreq@frontmatter@restorecounters{}
+ \seq_new:N \g__jlreq_frontmatter_resetcounter_seq
\def\jlreq@frontmatter@restoreheadings{}
\def\jlreq@frontmatter@restorecommands{}
\keys_define:nn { jlreqsetup } {mainmatter_pagebreak .code:n = {%
- \edef\jlreq@mainmatter@pagebreak{\jlreq@ifempty{#1}{}{\expandonce{\csname #1\endcsname}}}%
+ \edef\jlreq@mainmatter@pagebreak{\jlreq@ifempty{#1}{}{\exp_not:c {#1}}}%
}}
\keys_define:nn { jlreqsetup } {mainmatter_pagestyle .code:n = {%
\edef\jlreq@mainmatter@pagestyle{\jlreq@ifempty{#1}{}{\unexpanded{\pagestyle{#1}}}}%
@@ -5661,7 +5689,7 @@
}{%
\expandafter\pagestyle\expandafter{\jlreq@frontmatter@savedpagestyle}%
}%
- \clist_map_variable:NNn \jlreq@frontmatter@restorecounters \jlreq@tempa {
+ \seq_map_variable:NNn \g__jlreq_frontmatter_resetcounter_seq \jlreq@tempa {
\setcounter{\jlreq@tempa}{\csname jlreq@frontmatter@savedcounter@value@\jlreq@tempa\endcsname}%
\expandafter\let\csname the\jlreq@tempa\expandafter\endcsname\csname jlreq@frontmatter@savedcounter@the@\jlreq@tempa\endcsname
}%
@@ -5675,7 +5703,7 @@
\jlreq@mainmatter@postcode
}
\keys_define:nn { jlreqsetup } {backmatter_pagebreak .code:n = {%
- \edef\jlreq@backmatter@pagebreak{\jlreq@ifempty{#1}{}{\expandonce{\csname #1\endcsname}}}%
+ \edef\jlreq@backmatter@pagebreak{\jlreq@ifempty{#1}{}{\exp_not:c {#1}}}%
}}
\keys_define:nn { jlreqsetup } {backmatter_pagestyle .code:n = {%
\edef\jlreq@backmatter@pagestyle{\jlreq@ifempty{#1}{}{\unexpanded{\pagestyle{#1}}}}%
@@ -5688,14 +5716,13 @@
\let\jlreq@pagination@backmatterpagecommand=\pagenumbering
\def\jlreq@pagination@backmatterstyle{arabic}%
\clist_map_variable:nNn {#1} \jlreq@tempa {
- \expandafter\jlreq@helper@trim\expandafter{\jlreq@tempa}{\jlreq@tempa}%
- \jlreq@switch{\jlreq@tempa}{
+ \tl_set:Nx \jlreq@tempa { \tl_trim_spaces:o \jlreq@tempa }
+ \str_case_e:nnF {\jlreq@tempa} {
{continuous}{%
\def\jlreq@pagination@backmatterpagecommand##1{\gdef\thepage{\csname @##1\endcsname\c@page}}%
}
{independent}{\let\jlreq@pagination@backmatterpagecommand=\pagenumbering}
- {\edef\jlreq@pagination@backmatterstyle{\jlreq@tempa}}
- }%
+ } {\edef\jlreq@pagination@backmatterstyle{\jlreq@tempa}}
}%
}
}
@@ -5725,14 +5752,14 @@
%. その他諸々
%.. 縦中横
-\protected\def\tatechuyoko{\@ifstar
- {\jlreq@tatechuyoko@i}%
- {%
+\NewDocumentCommand { \tatechuyoko } { s m } {
+ \IfBooleanTF{#1}{
+ \jlreq@iftdir{\jlreq@tatechuyoko@i{#2}}{#2}
+ }{
\jlreq@iftdir{}{\ClassError{jlreq}{\string\tatechuyoko\space is~not~allowed~in~yoko~mode}{\@ehc}}%
- \jlreq@tatechuyoko@ii
- }%
+ \jlreq@tatechuyoko@i{#2}
+ }
}
-\def\jlreq@tatechuyoko@i#1{\jlreq@iftdir{\jlreq@tatechuyoko@ii{#1}}{#1}}
\edef\@tempa{%
\unexpanded{\ifvmode\leavevmode\fi}%
@@ -5745,7 +5772,7 @@
}\fi
}
-\expandafter\def\expandafter\jlreq@tatechuyoko@ii\expandafter#\expandafter1\expandafter{%
+\expandafter\def\expandafter\jlreq@tatechuyoko@i\expandafter#\expandafter1\expandafter{%
\@tempa
% 前のJFM glue
\ifnum\jlreq@lastnodechar>-1
@@ -5758,9 +5785,9 @@
\vrule width~0pt~height~\ht\jlreq@tempboxa depth~\dp\jlreq@tempboxa
\endgroup
#1}%
- \futurelet\jlreq@nextchar\jlreq@tatechuyoko@iii
+ \futurelet\jlreq@nextchar\jlreq@tatechuyoko@ii
}
-\def\jlreq@tatechuyoko@iii{%
+\def\jlreq@tatechuyoko@ii{%
\begingroup
\def\jlreq@do{}%
\jlreq@getfirsttoken@expandmacros{\jlreq@nextchar}{\jlreq@tempa}%
@@ -5884,7 +5911,7 @@
}
}
\cs_set:Nn \__jlreq_warekiyear_aux:nnn {
- \int_compare:nTF { #1 = #2 } {元年} { \int_eval:n { #1 - #2 + 1 } 年 }
+ \int_compare:nTF { #1 = #2 } {元年} { #3\int_eval:n { #1 - #2 + 1 } 年 }
}
\def\today{%
\if西暦
@@ -5935,7 +5962,7 @@
\edef\jlreq@do{
\unexpanded{\def\jlreq@proof[#1]}{%
\unexpanded{\labelsep=1\jlreq@zw}%
- \expandonce{\proof[{\reset@font\jlreq@proof@label@font #1\inhibitglue}\nopunct]}%
+ \exp_not:o {\proof[{\reset@font\jlreq@proof@label@font #1\inhibitglue}\nopunct]}%
}
}
\jlreq@do
@@ -6007,6 +6034,7 @@
\renewcommand{\theparagraph}{\thesubsubsection .\arabic{paragraph}}
\renewcommand{\thesubparagraph}{\theparagraph .\arabic{subparagraph}}
\str_if_eq:VnTF \jlreq@article@type { article } {
+\def\X{}
\NewBlockHeading{part}{0}{font={\jlreq@keepbaselineskip{\LARGE\sffamily\gtfamily\bfseries}},label_format={第\thepart 部},lines=4,after_label_space=1\jlreq@zw,second_heading_text_indent={-1\jlreq@zw,1\jlreq@zw},subtitle_font={\jlreq@keepbaselineskip{\large}}}
\renewcommand{\thesection}{\arabic{section}}
}{% book, report
@@ -6125,12 +6153,13 @@
\renewcommand{\p@enumiii}{\theenumi(\theenumii)}
\renewcommand{\p@enumiv}{\p@enumiii\theenumiii}
-\newcommand{\labelitemi}{\hbox to 1\jlreq@zw{\hss\textbullet\hss}}
%\newcommand{\labelitemi}{•}
\legacy_if:nTF { @tate } {
+ \newcommand{\labelitemi}{\hbox to 1\jlreq@zw{\hss\tatechuyoko{\textbullet}\hss}}
\newcommand{\labelitemii}{○}
\newcommand{\labelitemiii}{*}
}{
+ \newcommand{\labelitemi}{\hbox to 1\jlreq@zw{\hss\textbullet\hss}}
\newcommand{\labelitemii}{\hbox to 1\jlreq@zw{\hss\textendash\hss}}
\newcommand{\labelitemiii}{\hbox to 1\jlreq@zw{\hss\textasteriskcentered\hss}}
}