texlive[47589] Master/texmf-dist: jlreq (11apr18)

commits+karl at tug.org commits+karl at tug.org
Thu May 3 18:47:06 CEST 2018


Revision: 47589
          http://tug.org/svn/texlive?view=revision&revision=47589
Author:   karl
Date:     2018-05-03 18:47:05 +0200 (Thu, 03 May 2018)
Log Message:
-----------
jlreq (11apr18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/jlreq/LICENSE
    trunk/Master/texmf-dist/doc/latex/jlreq/README-ja.md
    trunk/Master/texmf-dist/doc/latex/jlreq/README.md
    trunk/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.html
    trunk/Master/texmf-dist/doc/latex/jlreq/jlreq.html
    trunk/Master/texmf-dist/tex/latex/jlreq/jlreq.cls

Modified: trunk/Master/texmf-dist/doc/latex/jlreq/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jlreq/LICENSE	2018-05-03 16:46:33 UTC (rev 47588)
+++ trunk/Master/texmf-dist/doc/latex/jlreq/LICENSE	2018-05-03 16:47:05 UTC (rev 47589)
@@ -1,6 +1,6 @@
 (2-clause BSD license)
 jlreq
-Copyright 2017, Noriyuki Abe.
+Copyright 2017-2018, Noriyuki Abe.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Modified: trunk/Master/texmf-dist/doc/latex/jlreq/README-ja.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jlreq/README-ja.md	2018-05-03 16:46:33 UTC (rev 47588)
+++ trunk/Master/texmf-dist/doc/latex/jlreq/README-ja.md	2018-05-03 16:47:05 UTC (rev 47589)
@@ -190,9 +190,9 @@
 #### その他
 * `subtitle_break=[true/false]`:見出し文字列と副題の間を改行するか指定します.
 * `allowbreak_if_evenpage=[true/false]`:見出しが偶数ページにあった場合,その直後の改ページを許可します.
-* `pagebreak=[clearpage/cleardoublepage/clearcolumn/nariyuki]`:見出し直前の改ページを指定します.それぞれ,改ページ,改丁,改段,なりゆきです.
+* `pagebreak=[clearpage/cleardoublepage/clearcolumn/nariyuki/begin_with_odd_page/begin_with_even_page]`:見出し直前の改ページを指定します.それぞれ,改ページ,`\cleardoublepage`実行,改段,なりゆき,奇数ページ開始,偶数ページ開始,です.
 * `afterindent=[true/false]`:見出し直後の段落の字下げを行うかを指定します.
-* `column_spanning=[true/false]`: 段抜きの見出しにします.pagebreak=clearpageまたはcleardoublepageの時にしか使えません.
+* `column_spanning=[true/false]`: 段抜きの見出しにします.`pagebreak=nariyuki`または`pagebreak=clearcolumn`の時には無視されます.
 
 #### 行取り
 行取りの指定は以下のいずれかの方法で行うことができます.
@@ -274,7 +274,9 @@
     - `tate`指定時:`<寸法>`が指定できます.`running_head_position`は柱の天からの下げ量を,`nombre_position`はノンブルの地からの上げ量を指定します.
 * `nombre=<書式>`:出力するノンブルを指定します.デフォルトは`\thepage`.
 * `odd_running_head=<書式>`,`even_running_head=<書式>`:それぞれ奇数ページ,偶数ページの柱を指定します.`_section`のように`_`から始まる名前を指定すると,対応する見出しを出力します.(`_section`だと現在の`\section`を出力する.)
+* `mark_format={[odd=<書式>/even=<書式>/_<見出し命令名>=<書式>],...}`:見出しを柱に出力する際のフォーマットを指定します.`mark_format={_section={節\thesection:#1},_chapter={第\thechapter 章\quad #1}}`のように指定します.見出し命令名の代わりに`odd`や`even`も指定でき,それぞれ奇数ページ/偶数ページの柱の書式になります.`\pagestyle`実行時に`\sectionmark`等を定義することで実現しています.
 
+
 `\NewPageStyle`,`\RenewPageStyle`,`\ProvidePageStyle`もあります.`\ModifyPageStyle`により既存のページスタイルを改変することが可能です.
 
 ## JFM
@@ -369,6 +371,12 @@
     - キャプション関係のオプションを`\jlreqsetup`に追加.
     - `itemization_beforeafter_space`を拡張.
     - バグ修正.
+* 2018-04-11
+    - 縦書き二段組みの傍注を下段に出すようにした.
+    - `begin_widh_(odd|even)_page`を`\DeclareBlockHeading`に追加.
+    - `\labelenumi`らをjarticleなどにあわせた.
+    - `column_gap`クラスオプションを使うとコンパイルできなかったバグ修正.
+    - `mark_format`を`\DeclarePageStyle`に追加.
 
 
 --------------

Modified: trunk/Master/texmf-dist/doc/latex/jlreq/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jlreq/README.md	2018-05-03 16:46:33 UTC (rev 47588)
+++ trunk/Master/texmf-dist/doc/latex/jlreq/README.md	2018-05-03 16:47:05 UTC (rev 47589)
@@ -74,9 +74,14 @@
     - Added some options related to captions.
     - Extended `itemization_beforeafter_space`.
     - Fixed bugs.
+* 2018-04-11
+    - Sidenotes (`\footnote`) appears in the second column in `tate` mode.
+    - Added options `begin_widh_(odd|even)_page` to `\DeclareBlockHeading`.
+    - Changed `\labelenumi`  as in `jarticle` etc.
+    - Fix a bug on `column_gap` class option.
+    - Added `mark_format` to `\DeclarePageStyle`.
 
 
-
 --------------
 Noriyuki Abe
 https://github.com/abenori/jlreq

Modified: trunk/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.html
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.html	2018-05-03 16:46:33 UTC (rev 47588)
+++ trunk/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.html	2018-05-03 16:47:05 UTC (rev 47589)
@@ -102,9 +102,9 @@
 <p>と配置します.<code>make install</code>とすると,$TEXMF=$TEXMFHOMEとしてこのコピーを行います.</p>
 <h2 id="使い方">使い方</h2>
 <p>通常通り</p>
-<pre class="sourceCode latex" id="cb1"><code class="sourceCode latex"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">jlreq</span>}</a></code></pre>
+<div class="sourceCode" id="cb1"><pre class="sourceCode latex"><code class="sourceCode latex"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">jlreq</span>}</a></code></pre></div>
 <p>とします.これで横書きのarticle相当の文書クラスとなります.エンジンは自動判定されますが,指定する場合はクラスオプションに<code>platex/uplatex/lualatex</code>のいずれかを渡してください.縦書きにするには<code>tate</code>オプションを渡します.また,reportやbook相当の文書クラスとするには,それぞれ<code>report</code>や<code>book</code>オプションを渡します.たとえば,縦書きの本を作成するには</p>
-<pre class="sourceCode latex" id="cb2"><code class="sourceCode latex"><a class="sourceLine" id="cb2-1" data-line-number="1"><span class="bu">\documentclass</span>[tate,book]{<span class="ex">jlreq</span>}</a></code></pre>
+<div class="sourceCode" id="cb2"><pre class="sourceCode latex"><code class="sourceCode latex"><a class="sourceLine" id="cb2-1" data-line-number="1"><span class="bu">\documentclass</span>[tate,book]{<span class="ex">jlreq</span>}</a></code></pre></div>
 <p>とします.</p>
 <p>その他,<code>oneside / twoside / onecolumn / twocolumn / titlepage / notitlepage / draft / final / openright / openany / leqno / fleqn</code>というよくあるオプションを受け付けます.</p>
 <p>標準的な文書クラスと同じように中身を書くことができますが,次のような命令が追加 / 拡張されています.</p>
@@ -117,7 +117,7 @@
 <h3 id="sidenote"><code>\sidenote</code></h3>
 <p>この命令は傍注の幅が正の時にのみ定義されます.デフォルトの基本版面ではこの幅は0に設定されています.従って<code>\sidenote</code>は定義されません.後の基本版面の設定を参考にしてください.</p>
 <p><code>\sidenote</code>は傍注(縦組みの場合は脚注)を出力します.内部では<code>\marginpar</code>を使っています.デフォルトでは<code>\footnote</code>と同様の書式となりますが,<code>\jlreqsetup</code>で<code>sidenote_type=symbol</code>が指定されている場合,その書式は<code>\sidenote{該当項目}{注}</code>となります.たとえば</p>
-<pre class="sourceCode latex" id="cb3"><code class="sourceCode latex"><a class="sourceLine" id="cb3-1" data-line-number="1">刊行できる<span class="fu">\sidenote</span>{原稿}{印刷などの方法により……}を入手する仕事である.</a></code></pre>
+<div class="sourceCode" id="cb3"><pre class="sourceCode latex"><code class="sourceCode latex"><a class="sourceLine" id="cb3-1" data-line-number="1">刊行できる<span class="fu">\sidenote</span>{原稿}{印刷などの方法により……}を入手する仕事である.</a></code></pre></div>
 <p>とします.後の説明も参照してください.</p>
 <h3 id="endnote"><code>\endnote</code></h3>
 <p>後注を指定します.<code>\footnote</code>と同様の書式です.デフォルトでは,注自身の出力は見出し直前に行われます.この動作は<code>\jlreqsetup</code>に<code>endnote_position</code>を渡すことで制御できます.詳しくは後の注関係の説明をご覧ください.また<code>\theendnotes</code>を実行するとその場に出力をします.</p>
@@ -136,7 +136,7 @@
 <ul>
 <li><p>ルビや圏点は提供されません.<a href="https://github.com/zr-tex8r/PXrubrica">PXrubrica</a>またはluatexja-ruby(LuaLaTeX,LuaTeX-jaパッケージに付属)を使うと良いかと思います.</p></li>
 <li><p>日本語組版処理の要件2.3.2.dによれば,二段組の最後のページの各段の行数は揃えることが望ましいとされていますが,この処理は行われません.<code>nidanfloat</code>パッケージを使い,</p>
-<pre class="sourceCode latex" id="cb5"><code class="sourceCode latex"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="bu">\usepackage</span>[balance]{<span class="ex">nidanfloat</span>}</a></code></pre>
+<div class="sourceCode" id="cb5"><pre class="sourceCode latex"><code class="sourceCode latex"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="bu">\usepackage</span>[balance]{<span class="ex">nidanfloat</span>}</a></code></pre></div>
 <p>とするとこの処理が行われます.ただし,最終ページでの<code>\newpage</code>や<code>\clearpage</code>が正しく動作しません.詳しくは<code>nidanfloat</code>パッケージのマニュアルをご覧ください.</p></li>
 </ul>
 <h2 id="各種設計">各種設計</h2>
@@ -256,9 +256,9 @@
 <ul>
 <li><code>subtitle_break=[true/false]</code>:見出し文字列と副題の間を改行するか指定します.</li>
 <li><code>allowbreak_if_evenpage=[true/false]</code>:見出しが偶数ページにあった場合,その直後の改ページを許可します.</li>
-<li><code>pagebreak=[clearpage/cleardoublepage/clearcolumn/nariyuki]</code>:見出し直前の改ページを指定します.それぞれ,改ページ,改丁,改段,なりゆきです.</li>
+<li><code>pagebreak=[clearpage/cleardoublepage/clearcolumn/nariyuki/begin_with_odd_page/begin_with_even_page]</code>:見出し直前の改ページを指定します.それぞれ,改ページ,<code>\cleardoublepage</code>実行,改段,なりゆき,奇数ページ開始,偶数ページ開始,です.</li>
 <li><code>afterindent=[true/false]</code>:見出し直後の段落の字下げを行うかを指定します.</li>
-<li><code>column_spanning=[true/false]</code>: 段抜きの見出しにします.pagebreak=clearpageまたはcleardoublepageの時にしか使えません.</li>
+<li><code>column_spanning=[true/false]</code>: 段抜きの見出しにします.<code>pagebreak=nariyuki</code>または<code>pagebreak=clearcolumn</code>の時には無視されます.</li>
 </ul>
 <h4 id="行取り">行取り</h4>
 <p>行取りの指定は以下のいずれかの方法で行うことができます.</p>
@@ -269,10 +269,10 @@
 </ul>
 <h4 id="連続して掲げる見出しの行取り">連続して掲げる見出しの行取り</h4>
 <p><code>\SetBlockHeadingSpaces</code>により,見出しが連続して掲げられたときの行取りを設定することができます.<code>\SetBlockHeadingSpaces</code>は</p>
-<pre class="sourceCode latex" id="cb7"><code class="sourceCode latex"><a class="sourceLine" id="cb7-1" data-line-number="1"><span class="fu">\SetBlockHeadingSpaces</span>{</a>
+<div class="sourceCode" id="cb7"><pre class="sourceCode latex"><code class="sourceCode latex"><a class="sourceLine" id="cb7-1" data-line-number="1"><span class="fu">\SetBlockHeadingSpaces</span>{</a>
 <a class="sourceLine" id="cb7-2" data-line-number="2">  {_part{lines=3,before_lines=1},_section{lines=2},_subsection{lines=2}}</a>
 <a class="sourceLine" id="cb7-3" data-line-number="3">  [lines=5]{_section,23pt,_subsection,16pt}</a>
-<a class="sourceLine" id="cb7-4" data-line-number="4">}</a></code></pre>
+<a class="sourceLine" id="cb7-4" data-line-number="4">}</a></code></pre></div>
 <p>のように使います.この意味は次の通りです.</p>
 <ul>
 <li><code>\part</code>,<code>\section</code>,<code>\subsection</code>という順番で見出しが掲げられていて,その前後が見出しでない場合は,<code>\part</code>は三行取り+前に一行空き,<code>\section</code>と<code>\subsection</code>は二行取りとなります.</li>
@@ -306,14 +306,14 @@
 </ul>
 <h3 id="modifyheading"><code>\ModifyHeading</code></h3>
 <p>既に(上のどれかを使い)定義された見出し命令の設定を変更します.たとえば</p>
-<pre class="sourceCode latex" id="cb8"><code class="sourceCode latex"><a class="sourceLine" id="cb8-1" data-line-number="1"><span class="fu">\ModifyHeading</span>{section}{lines=10}</a></code></pre>
+<div class="sourceCode" id="cb8"><pre class="sourceCode latex"><code class="sourceCode latex"><a class="sourceLine" id="cb8-1" data-line-number="1"><span class="fu">\ModifyHeading</span>{section}{lines=10}</a></code></pre></div>
 <p>とすると,<code>\section</code>のフォントなどの設定はそのままに,行取りのみが10行に変更されます.見出しの種類を変更することはできません.</p>
 <h3 id="saveheading"><code>\SaveHeading</code></h3>
 <p>見出し命令の定義を待避します.</p>
-<pre class="sourceCode latex" id="cb9"><code class="sourceCode latex"><a class="sourceLine" id="cb9-1" data-line-number="1"><span class="fu">\SaveHeading</span>{section}{<span class="fu">\restoresection</span>} <span class="co">% \sectionの中身を\restoresectionに待避.</span></a>
+<div class="sourceCode" id="cb9"><pre class="sourceCode latex"><code class="sourceCode latex"><a class="sourceLine" id="cb9-1" data-line-number="1"><span class="fu">\SaveHeading</span>{section}{<span class="fu">\restoresection</span>} <span class="co">% \sectionの中身を\restoresectionに待避.</span></a>
 <a class="sourceLine" id="cb9-2" data-line-number="2"><span class="fu">\RenewBlockHeading</span>{section}{1}{font=……} <span class="co">% \sectionを新しく定義する.</span></a>
 <a class="sourceLine" id="cb9-3" data-line-number="3">……</a>
-<a class="sourceLine" id="cb9-4" data-line-number="4"><span class="fu">\restoresection</span> <span class="co">% \sectionの中身を元に戻す.</span></a></code></pre>
+<a class="sourceLine" id="cb9-4" data-line-number="4"><span class="fu">\restoresection</span> <span class="co">% \sectionの中身を元に戻す.</span></a></code></pre></div>
 <p>のように使います.</p>
 <h2 id="ページスタイル">ページスタイル</h2>
 <pre><code>\DeclarePageStyle{<ページスタイル名>}{<設定>}
@@ -330,11 +330,12 @@
 </ul></li>
 <li><code>nombre=<書式></code>:出力するノンブルを指定します.デフォルトは<code>\thepage</code>.</li>
 <li><code>odd_running_head=<書式></code>,<code>even_running_head=<書式></code>:それぞれ奇数ページ,偶数ページの柱を指定します.<code>_section</code>のように<code>_</code>から始まる名前を指定すると,対応する見出しを出力します.(<code>_section</code>だと現在の<code>\section</code>を出力する.)</li>
+<li><code>mark_format={[odd=<書式>/even=<書式>/_<見出し命令名>=<書式>],...}</code>:見出しを柱に出力する際のフォーマットを指定します.<code>mark_format={_section={節\thesection:#1},_chapter={第\thechapter 章\quad #1}}</code>のように指定します.見出し命令名の代わりに<code>odd</code>や<code>even</code>も指定でき,それぞれ奇数ページ/偶数ページの柱の書式になります.<code>\pagestyle</code>実行時に<code>\sectionmark</code>等を定義することで実現しています.</li>
 </ul>
 <p><code>\NewPageStyle</code>,<code>\RenewPageStyle</code>,<code>\ProvidePageStyle</code>もあります.<code>\ModifyPageStyle</code>により既存のページスタイルを改変することが可能です.</p>
 <h2 id="jfm">JFM</h2>
 <p>以下のような独自のJFMを使います.パッケージによっては,パッケージ独自のJFMや,また標準のJFMを使うように設定がし直される場合があります.例えばLuaTeX-jaに付属するluatexja-presetパッケージは通常LuaTeX-ja標準のJFMを使います.本クラスファイルで使っているJFMを使う場合は,</p>
-<pre class="sourceCode LaTeX" id="cb11"><code class="sourceCode latex"><a class="sourceLine" id="cb11-1" data-line-number="1"><span class="bu">\usepackage</span>[jfm_yoko=jlreq,jfm_tate=jlreqv,hiragino-pron]{<span class="ex">luatexja-preset</span>}</a></code></pre>
+<div class="sourceCode" id="cb11"><pre class="sourceCode LaTeX"><code class="sourceCode latex"><a class="sourceLine" id="cb11-1" data-line-number="1"><span class="bu">\usepackage</span>[jfm_yoko=jlreq,jfm_tate=jlreqv,hiragino-pron]{<span class="ex">luatexja-preset</span>}</a></code></pre></div>
 <p>のようにオプションで指定する必要があります.</p>
 <h3 id="platexuplatexの場合">pLaTeX/upLaTeXの場合</h3>
 <p>JFMの名前は次の通りです.<code>[]</code>で囲まれている文字は設定により入ったり入らなかったりします.</p>
@@ -443,6 +444,14 @@
 <li><code>itemization_beforeafter_space</code>を拡張.</li>
 <li>バグ修正.</li>
 </ul></li>
+<li>2018-04-11
+<ul>
+<li>縦書き二段組みの傍注を下段に出すようにした.</li>
+<li><code>begin_widh_(odd|even)_page</code>を<code>\DeclareBlockHeading</code>に追加.</li>
+<li><code>\labelenumi</code>らをjarticleなどにあわせた.</li>
+<li><code>column_gap</code>クラスオプションを使うとコンパイルできなかったバグ修正.</li>
+<li><code>mark_format</code>を<code>\DeclarePageStyle</code>に追加.</li>
+</ul></li>
 </ul>
 <hr />
 <p>Noriyuki Abe <a href="https://github.com/abenori/jlreq" class="uri">https://github.com/abenori/jlreq</a></p>

Modified: trunk/Master/texmf-dist/doc/latex/jlreq/jlreq.html
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jlreq/jlreq.html	2018-05-03 16:46:33 UTC (rev 47588)
+++ trunk/Master/texmf-dist/doc/latex/jlreq/jlreq.html	2018-05-03 16:47:05 UTC (rev 47589)
@@ -154,6 +154,14 @@
 <li>Extended <code>itemization_beforeafter_space</code>.</li>
 <li>Fixed bugs.</li>
 </ul></li>
+<li>2018-04-11
+<ul>
+<li>Sidenotes (<code>\footnote</code>) appears in the second column in <code>tate</code> mode.</li>
+<li>Added options <code>begin_widh_(odd|even)_page</code> to <code>\DeclareBlockHeading</code>.</li>
+<li>Changed <code>\labelenumi</code> as in <code>jarticle</code> etc.</li>
+<li>Fix a bug on <code>column_gap</code> class option.</li>
+<li>Added <code>mark_format</code> to <code>\DeclarePageStyle</code>.</li>
+</ul></li>
 </ul>
 <hr />
 <p>Noriyuki Abe <a href="https://github.com/abenori/jlreq" class="uri">https://github.com/abenori/jlreq</a></p>

Modified: trunk/Master/texmf-dist/tex/latex/jlreq/jlreq.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/jlreq/jlreq.cls	2018-05-03 16:46:33 UTC (rev 47588)
+++ trunk/Master/texmf-dist/tex/latex/jlreq/jlreq.cls	2018-05-03 16:47:05 UTC (rev 47589)
@@ -5,7 +5,7 @@
 %%
 % (based on JLReq 20120403 https://www.w3.org/TR/2012/NOTE-jlreq-20120403/ja/)
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{jlreq}[2018/02/01 jlreq]
+\ProvidesClass{jlreq}[2018/04/11 jlreq]
 \RequirePackage{xkeyval,everyhook,filehook,etoolbox,ifthen}
 
 %. helper1
@@ -29,9 +29,10 @@
 \newskip\jlreq at resultskip
 \newbox\jlreq at resultbox
 \newif\ifjlreq at result
+\newcount\jlreq at resultcnt
 
 \newcommand*{\jlreq at undefcs}[1]{%
-  \ifundef{#1}{\ClassError{jlreq}{Trying to delete \string#1\space even though it is not defined, may be a bug}{\@ehc}}{\undef{#1}}%
+  \ifundef{#1}{\ClassError{jlreq}{Trying to delete \string#1 even though it is not defined, may be a bug}{\@ehc}}{\undef{#1}}%
 }
 
 % クラスファイル内でしか使わないマクロをクラスファイル終了時に未定義にする
@@ -151,28 +152,26 @@
 }
 
 % @removeelementの括弧があっても動くかもしれない版
-% 次の変数を使う:\jlreq at tempa:消したいやつ,\jlreq at tempb:消していない分を放り込んでいく
 % #2から#1を消して#3に入れる
 \def\jlreq at helper@removeelement#1#2#3{%
   \begingroup
-    \def\jlreq at tempb{}%
-    \def\jlreq at tempa{#1}%
-    \jlreq at helper@removeelement@{#2}%
+    \edef\jlreq at tempa{\unexpanded{#1}}% 消したいやつ
+    \def\jlreq at tempb{}% 消していない分を放り込んでいく
+    \jlreq at tempatrue% 最初の\jlreq at tempbへの追加か.
+    \jlreq at helper@removeelement@#2,\jlreq at endmark,%
     \edef\jlreq at do{\unexpanded{\def#3}{\expandonce{\jlreq at tempb}}}%
   \expandafter\endgroup
   \jlreq at do
 }
-\def\jlreq at helper@removeelement@#1{%
-  \jlreq at helper@dividebycomma{#1}%
-  \ifx\jlreq at resulta\jlreq at tempa\else
-    \ifx\jlreq at tempb\@empty
-      \edef\jlreq at tempb{\expandonce{\jlreq at resulta}}%
-    \else
-      \eappto\jlreq at tempb{,\expandonce{\jlreq at resulta}}%
-    \fi
-  \fi
-  \ifjlreq at result\expandafter\@firstofone\else\expandafter\@gobble\fi
-    {\expandafter\jlreq at helper@removeelement@\expandafter{\jlreq at resultb}}%
+\def\jlreq at helper@removeelement@#1,{%
+  \jlreq at ifendmark{#1}{}{%
+    \edef\@tempa{\unexpanded{#1}}%
+    \ifx\jlreq at tempa\@tempa\expandafter\@gobble\else\expandafter\@firstofone\fi{%
+      \eappto\jlreq at tempb{\ifjlreq at tempa\else,\fi\unexpanded{#1}}%
+      \jlreq at tempafalse
+    }%
+    \jlreq at helper@removeelement@
+  }%
 }
 
 % 空白を無視しない\@ifnextchar
@@ -211,12 +210,6 @@
   \fi
 }
 
-% vbox #1の最初を\jlreq at resultboxに入れる
-% #1は消える
-\newcommand*{\jlreq at getfirstbox}[1]{%
-  \loop\ifdim\dimexpr\dp#1+\ht#1=0pt\relax\else\jlreq at getlastbox{#1}\repeat
-}
-
 % 簡易なkeyvalのパース.
 % \jlreq at parsekeyval*[family=jlreq at key]{ % *ありは\setkeys*を使う
 %  {key}{\def\val{#1}}
@@ -297,6 +290,7 @@
 %   {default} % ここは#1を受け付けない(パラメータトークンを受け付けたい場合のため).
 %} -> abcd
 % 文字列比較→\edefして比較する
+% 第一引数は\jlreq at tempaに入れておく.
 \long\def\jlreq at helper@switch at executeoption#1[#2]{%
   \begingroup
     \def\jlreq at do##1{#2}%
@@ -307,32 +301,30 @@
 \long\def\jlreq at switch#1#2{%
   \begingroup
     \let\jlreq at do\@undefined
-    \edef\jlreq at tempa{#1}%
-    \expandafter\jlreq at helper@switch@\expandafter{\jlreq at tempa}#2\jlreq at endmark
+    \edef\jlreq at tempa{#1}% ループ中ずっと保存する
+    \jlreq at helper@switch@#2\jlreq at endmark
     \ifx\jlreq at do\@undefined
       \def\jlreq at do{\@ifnextchar[{\jlreq at helper@switch at executeoption{#1}}{}}%
     \else
-      \edef\jlreq at do{\expandonce{\jlreq at do}\unexpanded{\@ifnextchar[{\jlreq at helper@removeoption}{}}}%
+      \appto\jlreq at do{\@ifnextchar[{\jlreq at helper@removeoption}{}}%
     \fi
   \expandafter\endgroup
   \jlreq at do
 }
-\long\def\jlreq at helper@switch@#1#2{%
-  \jlreq at ifendmark{#2}{}{\jlreq at helper@switch@@{#1}{#2}}%
+\long\def\jlreq at helper@switch@#1{%
+  \jlreq at ifendmark{#1}{}{\jlreq at helper@switch@@{#1}}%
 }
 
-\long\def\jlreq at helper@switch@@#1#2#3{%
-  \jlreq at ifendmark{#3}{%
-    \edef\jlreq at do{\unexpanded{#2}}%
+\long\def\jlreq at helper@switch@@#1#2{%
+  \jlreq at ifendmark{#2}{%
+    \edef\jlreq at do{\unexpanded{#1}}%
   }{%
-    \def\jlreq at tempa{#1}% 最初に\edefで展開済み
-    \edef\jlreq at tempb{#2}%
-    \ifx\jlreq at tempa\jlreq at tempb\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
-    {%
-      \edef\jlreq at do{\unexpanded{#3}}%
+    \edef\jlreq at tempb{#1}%
+    \ifx\jlreq at tempa\jlreq at tempb\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi{%
+      \edef\jlreq at do{\unexpanded{#2}}%
       \jlreq at deleteuntileendmark
     }{%
-      \jlreq at helper@switch@{#1}%
+      \jlreq at helper@switch@
     }%
   }%
 }
@@ -356,24 +348,14 @@
   \global\jlreq at currentpage=\zref at extractdefault{jlreq at currentpage.\the\jlreq at zref@reference at count}{jlreq at page}{\c at page}\relax
 }
 
-% 現在の段組位置を得る
-\zref at newprop*{jlreq at firstcolumn}[1]{\if at firstcolumn 1\else 0\fi}
-\zref at addprop{main}{jlreq at firstcolumn}
-\newif\ifjlreq at firstcolumn
-\newcommand*{\jlreq at setcurrentcolumn}{%
-  \global\advance\jlreq at zref@reference at count by 1
-  \zref at labelbyprops{jlreq at currentcolumn.\the\jlreq at zref@reference at count}{jlreq at firstcolumn}%
-  \ifnum\zref at extractdefault{jlreq at currentcolumn.\the\jlreq at zref@reference at count}{jlreq at firstcolumn}{1}=1 \global\jlreq at firstcolumntrue\else \global\jlreq at firstcolumnfalse\fi
-}
-
 \def\jlreq at saveoriginalcs#1{%
-  \@ifundefined{#1}{%
-    \ClassError{jlreq}{Trying to save \expandafter\string\csname #1\endcsname\space but it's not defined, may be a bug}{\@ehc}%
-  }{}%
-  \@ifundefined{jlreq at original@#1}{}{%
-    \ClassError{jlreq}{Trying to save \expandafter\string\csname #1\endcsname\space twice, may be a bug}{\@ehc}%
-  }%
-  \expandafter\expandafter\expandafter\let\expandafter\expandafter\csname jlreq at original@#1\endcsname\csname #1\endcsname
+  \ifx#1\relax
+    \ClassError{jlreq}{Trying to save \string#1 but it's not defined, may be a bug}{\@ehc}%
+  \fi
+  \expandafter\ifx\csname jlreq at original@\expandafter\@gobble\string#1\endcsname\relax\else
+    \ClassError{jlreq}{Trying to save \string#1 twice, may be a bug}{\@ehc}%
+  \fi
+  \expandafter\let\csname jlreq at original@\expandafter\@gobble\string#1\endcsname=#1
 }
 \def\jlreq at useoriginalcs#1{%
   \ifcsname jlreq at original@\expandafter\@gobble\string#1\endcsname\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
@@ -552,7 +534,7 @@
 %.. 段間
 \newcommand*{\jlreq at option@column at gap}{2zw}
 \jlreq at aftercls@addtodeletecs{\jlreq at option@column at gap}
-\DeclareOptionX{column_gap}{\renewcommand*{\jlreq at option@column at gap{#1}}}
+\DeclareOptionX{column_gap}{\renewcommand*{\jlreq at option@column at gap}{#1}}
 
 %.. 行送り,指定無しの場合は文字サイズの1.7倍とする.(1.5から2倍が好ましい:2.4.2.d 注3)
 \newcommand*{\jlreq at option@baselineskip}{17zw/10}
@@ -576,18 +558,18 @@
 \DeclareOptionX{sidenote_length}{\renewcommand*{\jlreq at option@sidenote at length}{#1}}
 
 %.. もろもろ
-\newif\if at restonecol \@restonecolfalse
-\newif\if at titlepage \@titlepagefalse
+\newif\if at restonecol\@restonecolfalse
+\newif\if at titlepage\@titlepagefalse
 \newif\ifjlreq at option@titlepage \jlreq at option@titlepagefalse % titlepageかnotitlepageかが指定された
-\newif\if at landscape \@landscapefalse
+\newif\if at landscape\@landscapefalse
 \newif\if at tate \@tatefalse
 \jlreq at DeclareOption{landscape}{\@landscapetrue}
 \jlreq at DeclareOption{tombo}{%
-  \tombowtrue \tombowdatefalse
+  \tombowtrue\tombowdatefalse
   \setlength{\@tombowwidth}{.1\p@}%
   \maketombowbox}
 \jlreq at DeclareOption{mentuke}{%
-  \tombowtrue \tombowdatefalse
+  \tombowtrue\tombowdatefalse
   \setlength{\@tombowwidth}{\z@}%
   \maketombowbox}
 \jlreq at DeclareOption{tate}{\@tatetrue}
@@ -615,11 +597,11 @@
 
 \ExecuteOptionsX{article_type=article,paper=a4,open_bracket_pos=zenkaku_tentsuki,onecolumn,final}
 % \@removeelementを一旦置き換えてから\ProcessOptionsXを実行する
-\let\jlreq at original@@removeelement=\@removeelement
+\let\jlreq at temporary@original@@removeelement=\@removeelement
 \let\@removeelement=\jlreq at helper@removeelement
 \ProcessOptionsX\relax
-\let\@removeelement=\jlreq at original@@removeelement
-\let\jlreq at original@@removeelement=\@undefined
+\let\@removeelement=\jlreq at temporary@original@@removeelement
+\let\jlreq at temporary@original@@removeelement=\@undefined
 
 \ifjlreq at option@titlepage\else
   \ifthenelse{\equal{\jlreq at article@type}{article}}{\@titlepagefalse}{\@titlepagetrue}
@@ -669,8 +651,10 @@
 % \jlreq at ifprimitive#1#2#3: #1がprimitiveならば#2を,そうでなければ#3を実行する
 % (\if(pdf)primitiveを避けるようにしている.)
 \def\jlreq at ifprimitive#1{%
-  \edef\@tempa{\string#1}%
-  \edef\@tempb{\meaning#1}%
+  \begingroup
+    \edef\@tempa{\string#1}%
+    \edef\@tempb{\meaning#1}%
+  \expandafter\endgroup
   \ifx\@tempa\@tempb\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
 }
 % エンジンの設定
@@ -693,10 +677,6 @@
   \directlua{jlreq = {}}
 \fi
 
-\if at tate
-  \RequirePackage{atbegshi}
-\fi
-
 % (u)pLaTeXの場合ここで初めて\epTeXinputencodingが発行されるので,
 % これ以前には和文は使えない.
 \ifx l\jlreq at engine\else
@@ -709,8 +689,6 @@
   \AtBeginDocument{\tate\message{《縦組モード》}\adjustbaseline}
 \fi
 
-
-
 % \jlreq at gol(Gyo Okuri Length), \jlreq at mol (Moji Okuri Length)を定義
 \let\jlreq at gol=\zh
 \let\jlreq at mol=\zw
@@ -877,10 +855,12 @@
 % \jlreq at fixjfm<次の文字>の形で使う.
 % jlreq at lastnodecharに入っている値と次のトークン(\futureletで得る)の間に入るJFMグルー等を挿入する
 \newcommand*{\jlreq at fixjfm}{%
-  \ifnum\jlreq at lastnodechar>-1
-    \def\@tempa{\futurelet\jlreq at nextchar\jlreq at insertjfm}%
-  \else\def\@tempa{}\fi
-  \@tempa
+  \begingroup
+    \ifnum\jlreq at lastnodechar>-1
+      \def\jlreq at do{\futurelet\jlreq at nextchar\jlreq at insertjfm}%
+    \else\def\jlreq at do{}\fi
+  \expandafter\endgroup
+  \jlreq at do
 }
 % \jlreq at nextcharと\jlreq at lastnodecharの間のJFMグルーを挿入
 \def\jlreq at insertjfm{%
@@ -908,7 +888,7 @@
 \else
   \newcommand*{\jlreq at divide}[2]{%
     \begingroup
-      \@tempdima=#1\relax\@tempdimb=#2\relax
+      \@tempdima=\dimexpr#1\relax\@tempdimb=\dimexpr#2\relax
       % 分母を正にする
       \ifdim\@tempdimb<0pt \@tempdima=-\@tempdima\@tempdimb=-\@tempdimb\fi
       % \jlreq at tempdima*\@tempdimb <= \@tempdima < (\jlreq at tempdima + 1)*\@tempdimb
@@ -1222,8 +1202,8 @@
   \directlua{jlreq.open_bracket_pos = [[\jlreq at open@bracket at pos]]}
   \ifjlreq at burasage\directlua{jlreq.burasage = true}\else\directlua{jlreq.burasage = false}\fi
   % \item後の行頭括弧のために仕込み.
-  \jlreq at saveoriginalcs{list}
-  \jlreq at saveoriginalcs{endlist}
+  \jlreq at saveoriginalcs{\list}
+  \jlreq at saveoriginalcs{\endlist}
   \pretocmd{\list}{\jlreq at pushhook@postpar{\ltjfakeparbegin}}{}{}
   \apptocmd{\endlist}{\jlreq at pophook@postpar}{}{}
 \else
@@ -1254,14 +1234,18 @@
 % スタックに積まれたものは\jlreq at pophook@postparで復帰できる
 \def\jlreq at pushhook@postpar#1{%
   \advance\jlreq at count@listnest by 1
-  \def\@tempa{\SavePostHook{par}}%
-  \expandafter\@tempa\csname jlreq at save@posthook at par \the\jlreq at count@listnest\endcsname
+  \begingroup
+    \edef\jlreq at do{\unexpanded{\SavePostHook{par}}{\expandonce{\csname jlreq at save@posthook at par@\the\jlreq at count@listnest\endcsname}}}%
+  \expandafter\endgroup
+  \jlreq at do
   \PushPostHook{par}{#1}%
 }
 \def\jlreq at pophook@postpar{%
-  \def\@tempa{\RestorePostHook{par}}%
-  \expandafter\@tempa\csname jlreq at save@posthook at par \the\jlreq at count@listnest\endcsname
-  \expandafter\let\csname jlreq at save@posthook at par \the\jlreq at count@listnest\endcsname=\@undefined
+  \begingroup
+    \edef\jlreq at do{\unexpanded{\RestorePostHook{par}}{\expandonce{\csname jlreq at save@posthook at par@\the\jlreq at count@listnest\endcsname}}}%
+  \expandafter\endgroup
+  \jlreq at do
+  \expandafter\let\csname jlreq at save@posthook at par@\the\jlreq at count@listnest\endcsname=\@undefined
   \advance\jlreq at count@listnest by -1
 }
 
@@ -1380,9 +1364,9 @@
   \ifcsname jlreq at jaspace@#1\endcsname\csname jlreq at jaspace@#1\endcsname
   \else\ClassError{jlreq}{unknown jaspace: #1}{\@ehc}\fi
 }
-\def\jlreq at jaspace@zenkaku{\hskip \glueexpr 1\zw\relax}
-\def\jlreq at jaspace@nibu{\hskip \glueexpr .5\zw\relax}
-\def\jlreq at jaspace@shibu{\hskip \glueexpr .25\zw\relax}
+\def\jlreq at jaspace@zenkaku{\hskip\glueexpr 1\zw\relax}
+\def\jlreq at jaspace@nibu{\hskip\glueexpr .5\zw\relax}
+\def\jlreq at jaspace@shibu{\hskip\glueexpr .25\zw\relax}
 
 % 区切り約物.\? みたいな命令を作る.直後の空きが自動で入る.
 % \?*とすると文中の?として扱われる.
@@ -1431,7 +1415,7 @@
 
 %.. 文字サイズ変更
 \def\jlreq at setfontsizehook{}
-\jlreq at saveoriginalcs{set at fontsize}
+\jlreq at saveoriginalcs{\set at fontsize}
 \apptocmd{\set at fontsize}{\expandafter\def\expandafter\size at update\expandafter{\size at update\jlreq at setfontsizehook}}{}{}
 \appto\jlreq at setfontsizehook{\ifdim\parindent>0pt \setlength{\parindent}{1\zw}\fi}
 \ifx l\jlreq at engine
@@ -1456,21 +1440,25 @@
 \fi
 
 % \jafontsize
-\def\@tempa#1{
-  \newcommand*{\jafontsize}[2]{%
-    \begingroup
-      \jlreq at iffloat{##1}{%
-        \edef\jlreq at do{\noexpand\fontsize{\strip at pt\dimexpr#1\dimexpr##1pt\relax\relax}}%
-      }{%
-        \edef\jlreq at do{\noexpand\fontsize{\the\dimexpr#1\dimexpr##1\relax\relax}}%
-      }%
-    \expandafter\endgroup
-    \jlreq at do{##2}%
+\ifdim\jlreq at fontsize=\jlreq at jafontsize
+  \let\jafontsize=\fontsize
+\else
+  \def\@tempa#1{
+    \DeclareRobustCommand*{\jafontsize}[2]{%
+      \begingroup
+        \jlreq at iffloat{##1}{%
+          \edef\jlreq at do{\noexpand\fontsize{\strip at pt\dimexpr#1\dimexpr##1pt\relax\relax}}%
+        }{%
+          \edef\jlreq at do{\noexpand\fontsize{\the\dimexpr#1\dimexpr##1\relax\relax}}%
+        }%
+      \expandafter\endgroup
+      \jlreq at do{##2}%
+    }
   }
-}
-\jlreq at divide{\jlreq at fontsize}{\jlreq at jafontsize}
-\edef\jlreq at do{\noexpand\@tempa{\strip at pt\jlreq at resultdimen}}
-\jlreq at do
+  \jlreq at divide{\jlreq at fontsize}{\jlreq at jafontsize}
+  \edef\jlreq at do{\noexpand\@tempa{\strip at pt\jlreq at resultdimen}}
+  \jlreq at do
+\fi
 
 \renewcommand{\normalsize}{%
   \@setfontsize\normalsize{\jlreq at fontsize}{\jlreq at baselineskip}%
@@ -1673,12 +1661,12 @@
   \divide\textheight\baselineskip \multiply\textheight\baselineskip
   \addtolength{\textheight}{\topskip}
 \else
-  \setlength{\textheight}{\dimexpr\jlreq at option@number at of@lines\baselineskip - \baselineskip + \topskip\relax}
+  \setlength{\textheight}{\dimexpr\numexpr\jlreq at option@number at of@lines\relax\baselineskip - \baselineskip + \topskip\relax}
 \fi
 
 \ifx\jlreq at option@headfoot at verticalpos\@empty
   \if at tate\def\jlreq at option@headfoot at verticalpos{1zw}
-  \else\def\jlreq at option@headfoot at verticalpos{2zh}\fi
+  \else\def\jlreq at option@headfoot at verticalpos{2zw}\fi
 \fi
 \setlength{\headsep}{\jlreq at speciallength{\jlreq at option@headfoot at verticalpos}}
 \ifdim\headsep<1\zw\relax\jlreq at note{基本版面との上下方向の最低の空き量を,基本版面の文字サイズの全角アキとする (26.1.a).}\fi
@@ -1777,6 +1765,24 @@
 \setlength{\maxdepth}{\dimexpr1.5\zw - \topskip\relax}
 
 %. 見出し関係 (4.1)
+% \clear***page
+\newcommand*{\cleartooddpage}{%
+  \clearpage
+  \ifodd\c at page\else
+    \hbox{}%
+    \newpage
+    \if at twocolumn\hbox{}\newpage\fi
+  \fi
+}
+\newcommand*{\cleartoevenpage}{%
+  \clearpage
+  \ifodd\c at page
+    \hbox{}%
+    \newpage
+    \if at twocolumn\hbox{}\newpage\fi
+  \fi
+}
+
 % 同行見出し以外では,jlreq at heading@maketoc@<命令名>が\tableofcontents用の出力をするために呼び出される.
 % #1=*または空(見出し命令に*がついていたかで分岐),#2=ラベル,#3=running head
 % デフォルトでは\<命令名>markと\addcontentslineが必要ならば呼ばれる.
@@ -1836,7 +1842,7 @@
     \let\jlreq at contents@label at format=\@undefined
     \let\jlreq at format=\@undefined
     \edef\jlreq at label@format{\expandonce{\csname the#1\endcsname}}%
-    \def\jlreq at heading@clearpage{\cleardoublepage}%
+    \def\jlreq at heading@clearpage{\clearpage\hbox{}\clearpage}%
     \def\jlreq at pagestyle{empty}%
     \jlreq at parsekeyval[DeclareTobiraHeading:#1]{
       {label_format}{\def\jlreq at label@format{##1}}
@@ -1845,7 +1851,7 @@
       {type}[han,naka]{%
         \jlreq at switch{##1}{
           {han}{\def\jlreq at heading@clearpage{\clearpage}}
-          {naka}{\def\jlreq at heading@clearpage{\cleardoublepage}}
+          {naka}{\def\jlreq at heading@clearpage{\clearpage\hbox{}\clearpage}}
         }%
       }
     }{#3}%
@@ -1880,7 +1886,8 @@
         \unexpanded{\if at restonecol\twocolumn\fi}%
       }%
       \noexpand\def\expandonce{\csname #1\endcsname}{%
-        \unexpanded{\if at twocolumn\onecolumn\@restonecoltrue\else\@restonecolfalse\fi\cleardoublepage}%
+        % 改丁.これでよいのかな.
+        \unexpanded{\if at twocolumn\onecolumn\@restonecoltrue\else\@restonecolfalse\fi\cleartooddpage}%
         \ifx\jlreq at pagestyle\@empty\else\noexpand\thispagestyle{\expandonce{\jlreq at pagestyle}}\fi
         \noexpand\secdef{\expandonce{\csname jlreq at TobiraHeading@start@#1\endcsname}}{\expandonce{\csname jlreq at TobiraHeading@start at s@#1\endcsname}}}%
     }%
@@ -1969,7 +1976,7 @@
 \expandafter\def\expandafter\jlreq at BlockHeading@start at afterheading@@\space{\jlreq at BlockHeading@start at afterheading}
 \def\jlreq at BlockHeading@start at afterheading@@@{%
   \def\jlreq at do{\jlreq at BlockHeading@spaces at output}%
-  \expandafter\@for\expandafter\@tempa\expandafter:\expandafter=\jlreq at BlockHeading@allheadings\do{%
+  \@for\@tempa:=\jlreq at BlockHeading@allheadings\do{%
     \expandafter\ifx\csname\@tempa\endcsname\jlreq at nextchar\def\jlreq at do{}\fi
   }%
   % \jlreq at BlockHeading@HeadingSpaces at ignoretokens内のものは特別扱いする
@@ -2181,7 +2188,7 @@
       {before_space}{\def\jlreq at before@space{##1}}
       {after_space}{\def\jlreq at after@space{##1}}
       {before_lines}{%
-        \jlreq at iffirsttoken{##1}{*}%
+        \jlreq at iffirsttoken@ignorespaces{##1}{*}%
           {\edef\jlreq at before@lines{s:\expandonce{\@gobble ##1}}}%
           {\def\jlreq at before@lines{a:##1}}%
       }
@@ -2236,6 +2243,7 @@
     \newif\ifjlreq at subtitle@break\jlreq at subtitle@breaktrue
     \def\jlreq at subtitle@indent{1\zw}%
     \def\jlreq at column@spanning{false}%
+    \newif\ifjlreq at column@spanning at possible\jlreq at column@spanning at possiblefalse
     % a,bみたいなのをaとbにわける.カンマがなければbは空.引数を{a}{b}として##2を呼び出す.
     \def\jlreq at parsecomma##1##2{%
       \def\jlreq at tempa####1####2{##2}%
@@ -2298,12 +2306,14 @@
           {false}{\def\jlreq at allowbreak@evenpage{*}}
         }%
       }
-      {pagebreak}[clearpage,cleardoublepage,clearcolumn,nariyuki]{%
+      {pagebreak}[clearpage,cleardoublepage,clearcolumn,nariyuki,begin_with_odd_page,begin_with_even_page]{%
         \jlreq at switch{##1}{
-          {clearpage}{\def\jlreq at pagebreak{\clearpage}}
-          {cleardoublepage}{\def\jlreq at pagebreak{\cleardoublepage}}
-          {clearcolumn}{\if at twocolumn\def\jlreq at pagebreak{\newpage}\else\def\jlreq at pagebreak{}\fi}
-          {nariyuki}{\def\jlreq at pagebreak{}}
+          {clearpage}{\def\jlreq at pagebreak{\clearpage}\jlreq at column@spanning at possibletrue}
+          {cleardoublepage}{\def\jlreq at pagebreak{\cleardoublepage}\jlreq at column@spanning at possibletrue}
+          {clearcolumn}{\if at twocolumn\def\jlreq at pagebreak{\newpage}\else\def\jlreq at pagebreak{}\fi\jlreq at column@spanning at possiblefalse}
+          {begin_with_even_page}{\def\jlreq at pagebreak{\cleartoevenpage}\jlreq at column@spanning at possibletrue}
+          {begin_with_odd_page}{\def\jlreq at pagebreak{\cleartooddpage}\jlreq at column@spanning at possibletrue}
+          {nariyuki}{\def\jlreq at pagebreak{}\jlreq at column@spanning at possiblefalse}
         }%
       }
       % 後々数字を受け付けるようになったりするかもしれないので……
@@ -2326,10 +2336,10 @@
     \def\jlreq at do{}% 初期化.これに最終処理を入れていく.
     % 入力チェック
     \ifthenelse{\equal{\jlreq at column@spanning}{true}}{%
-      \expandafter\ifx\jlreq at pagebreak\clearpage\relax\else\expandafter\ifx\jlreq at pagebreak\cleardoublepage\relax\else
-        \ClassWarningNoLine{jlreq}{column_spanning can be used only with pagebreak=clearpage or pagebreak=cleardoublepage (in BlockHeading #1)}%
+      \ifjlreq at column@spanning at possible\else
+        \ClassWarningNoLine{jlreq}{column_spanning can be used only with `pagebreak=nariyuki' or `pagebreak=clearcolumn' (in BlockHeading #1)}%
         \def\jlreq at column@spanning{false}%
-      \fi\fi
+      \fi
     }{}%
     \edef\jlreq at format{\expandonce{\jlreq at font}\expandonce{\jlreq at format}}%
     % 空き量などの調整を含んだラベル
@@ -2461,7 +2471,7 @@
 \newcommand{\SetBlockHeadingSpaces}[1]{%
   \begingroup
     % 現段階の情報をクリアする
-    \expandafter\@for\expandafter\jlreq at tempa\expandafter:\expandafter=\jlreq at BlockHeading@spaces at headingslist\do{%
+    \@for\jlreq at tempa:=\jlreq at BlockHeading@spaces at headingslist\do{%
       \expandafter\let\csname jlreq at BlockHeading@spaces at setlist@\jlreq at tempa\endcsname=\@undefined
     }%
     \def\jlreq at BlockHeading@spaces at headingslist{}%
@@ -2485,7 +2495,7 @@
   \jlreq at ifendmark{#2}{}{%
     \def\jlreq at headings{}% 見出し名リスト
     \jlreq at BlockHeading@gyodori at parsekeyval[BlockHeadingSpaces]{#1}{}{}{}%
-    \edef\jlreq at totalset{\expandonce{\jlreq at result}}% 上の#1に対応する設定
+    \let\jlreq at totalset=\jlreq at result% 上の#1に対応する設定
     \def\jlreq at set{}% 個々の設定
     \def\jlreq at lastdimen{}% 最後の寸法
     \def\jlreq at do##1##2##3{%
@@ -2522,6 +2532,7 @@
       \expandafter\jlreq at SetBlockHeadingSpaces@@@@\@tempa{\jlreq at endmark}%
     }{%
       \ifjlreq at tempa
+        % 最初が寸法なので,全体の設定(\jlreq at totalset)に組み込む.
         \def\jlreq at do##1##2##3{%
           \edef\jlreq at totalset{{r:\expandonce{\@tempa}}{\unexpanded{##2}}{\unexpanded{##3}}}%
         }%
@@ -2540,7 +2551,7 @@
   }{}%
   \jlreq at ifendswith{#1}{*}{{%
     \def\@tempa_##1*{\def\@tempa{##1}}%
-    \@tempa#1
+    \@tempa#1%
     \ClassWarning{jlreq}{The heading name `\@gobble #1' ends with `*'. Do you mean `\@tempa{*}'? (in SetBlockHeadingSpaces)}%
   }}{}%
   \appto\jlreq at headings{#1}%
@@ -2655,12 +2666,11 @@
       }\unexpanded{{#8}{#9}}%
     }}%
   }%
-  \edef\jlreq at do{\unexpanded{\appto\jlreq at result}{%
+  \eappto\jlreq at result{%
     \csexpandonce{jlreq at BlockHeading@spaces at current@before@\the\jlreq at tempcnta}%
     \jlreq at tempb
     \csexpandonce{jlreq at BlockHeading@spaces at current@after@\the\jlreq at tempcnta}%
-  }}%
-  \jlreq at do
+  }%
 }
 
 % 連続見出しスペース調整用のデータをすべてクリアする
@@ -2695,23 +2705,26 @@
 }
 % {1 = 命令名}{2 = レベル}{3 = *}{4 = running head}{5 = 見出し}{6 = ラベルフォーマット}{7 = ラベルありフォーマット}{8 = ラベルなしフォーマット}
 \long\def\jlreq at RuninHeading@start@@#1#2#3#4#5#6#7#8{%
-  \ifnum0\jlreq at ifempty{#3}{}{1}\ifnum #2>\c at secnumdepth 1\fi>0
-    \def\jlreq at tempa##1{#8}%
-  \else
-    \refstepcounter{#1}%
-    \def\jlreq at tempa##1{#7}%
-  \fi
-  \par
-  \edef\jlreq at do{%
-    \noexpand\everypar{%
-      \unexpanded{\everypar{}}%
-      \unexpanded{{\setbox\jlreq at tempboxa\lastbox}}%
-      \noexpand\begingroup
-        \expandonce{\jlreq at tempa{#5}}%
-        \expandonce{\csname jlreq at heading@maketoc@#1\endcsname{#3}{#6}{#4}}%
-      \noexpand\endgroup
+  \begingroup
+    \def\jlreq at do{}%
+    \ifnum0\jlreq at ifempty{#3}{}{1}\ifnum #2>\c at secnumdepth 1\fi>0
+      \def\jlreq at tempa##1{#8}%
+    \else
+      \appto\jlreq at do{\refstepcounter{#1}}%
+      \def\jlreq at tempa##1{#7}%
+    \fi
+    \par
+    \eappto\jlreq at do{%
+      \noexpand\everypar{%
+        \unexpanded{\everypar{}}%
+        \unexpanded{{\setbox\jlreq at tempboxa\lastbox}}%
+        \noexpand\begingroup
+          \expandonce{\jlreq at tempa{#5}}%
+          \expandonce{\csname jlreq at heading@maketoc@#1\endcsname{#3}{#6}{#4}}%
+        \noexpand\endgroup
+      }%
     }%
-  }%
+  \expandafter\endgroup
   \jlreq at do
   \ignorespaces
 }
@@ -2773,10 +2786,11 @@
     \jlreq at heading@make at l@{#1}{#2}{\jlreq at label@format}%
     \edef\jlreq at do{%
       \expandonce{\jlreq at result}%
+      % パラメータトークンを含むので,\edefして\unexpandedで包む
       \noexpand\edef\expandonce{\csname #1\endcsname}{%
         \noexpand\unexpanded{%
           \unexpanded{\jlreq at hook@beforeheadings{#1}}%
-          \noexpand\jlreq at RuninHeading@start{#1}{#2}{\expandonce{\jlreq at label@format}}{\expandonce{\jlreq at format@wlabel}}{\expandonce{\jlreq at format@wolabel}}%
+          \unexpanded{\jlreq at RuninHeading@start{#1}{#2}}{\expandonce{\jlreq at label@format}}{\expandonce{\jlreq at format@wlabel}}{\expandonce{\jlreq at format@wolabel}}%
         }%
       }%
     }%
@@ -3021,11 +3035,6 @@
       subtitle_font={\jlreq at keepbaselineskip{\Large}}}
     \renewcommand{\thechapter}{\arabic{chapter}}
     \renewcommand{\thesection}{\thechapter.\arabic{section}}
-    \ifthenelse{\equal{\jlreq at article@type}{book}}{
-      \ModifyHeading{chapter}{pagebreak=cleardoublepage}
-    }{
-      \ModifyHeading{chapter}{pagebreak=clearpage}
-    }
   }
   \NewBlockHeading{section}{1}{font={\jlreq at keepbaselineskip{\Large\sffamily\bfseries}},lines=3,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq at keepbaselineskip{\normalsize}}}
   \NewBlockHeading{subsection}{2}{font={\jlreq at keepbaselineskip{\large\sffamily\bfseries}},lines=2,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq at keepbaselineskip{\small}}}
@@ -3037,7 +3046,11 @@
 \ifthenelse{\equal{\jlreq at article@type}{article}}{}{% book, report
   \if at openright
     \ModifyHeading{part}{type=naka}
-    \ModifyHeading{chapter}{pagebreak=cleardoublepage}
+    \if at tate
+      \ModifyHeading{chapter}{pagebreak=begin_with_even_page}
+    \else
+      \ModifyHeading{chapter}{pagebreak=begin_with_odd_page}
+    \fi
   \else
     \ModifyHeading{part}{type=han}
     \ModifyHeading{chapter}{pagebreak=clearpage}
@@ -3178,8 +3191,8 @@
 \fi
 
 % \footnoteと\footnotemarkの前後に\jlreq at hook@prenote/\jlreq at hook@postnoteを入れる
-\jlreq at saveoriginalcs{footnote}
-\jlreq at saveoriginalcs{footnotemark}
+\jlreq at saveoriginalcs{\footnote}
+\jlreq at saveoriginalcs{\footnotemark}
 \def\footnote{%
   \jlreq at hook@prenote
   \@ifnextchar[{\jlreq at footnote@impl at woption}{\jlreq at footnote@impl at wooption}%
@@ -3189,47 +3202,84 @@
   \@ifnextchar[{\jlreq at footnotemark@impl at woption}{\jlreq at footnotemark@impl at wooption}%
 }
 \if at tate
-  % 縦組の傍注は,その見開き内に付いている合印に対応する注を,奇数ページの左端にそろえて配置する(4.2.6.a).
-  % TODO: 多段組では最下段の左端にそろえて配置する.
+  % 縦組の傍注は,その見開き内に付いている合印に対応する注を,奇数ページの左端にそろえて配置する.多段組では最下段の左端にそろえて配置する.(4.2.6.a)
+  % 必要ならば\footnoteを\footnotemarkと\footnotetextにわけ,\footnotetextをアウトプット時まで遅延することで実現する.
   \def\jlreq at footnote@delayfootnoteslist{}
-  \preto\@outputpage{%
+  \preto\@opcol{%
     \expandafter\gdef\expandafter\jlreq at footnote@delayfootnoteslist\expandafter{\expandafter}%
     \jlreq at footnote@delayfootnoteslist
   }
-  \def\jlreq at footnote@delayfootnote at delay#1#2#3{%
-    \ifnum#1<1
+  % \jlreq at footnote@delayfootnote at delay#1#2#3:#1ページ目に\footnotetext[#2]{#3}を出す
+  % \jlreq at footnote@delayfootnote at page:何ページ目に\footnotetextを入れるかを\jlreq at resultcntに入れる.その場での場合は-1.
+  \if at twocolumn
+    \def\jlreq at footnote@delayfootnote at page{%
+      \jlreq at setcurrentpage
+      \jlreq at resultcnt=\numexpr\jlreq at currentpage\ifodd\jlreq at currentpage\else + 1\fi\relax
+      % このページに表示&上の段処理済みだと\output内では間に合わない
+      \ifnum\jlreq at resultcnt=\value{page}\if at firstcolumn\else\jlreq at resultcnt=-1 \fi\fi
+    }
+    \long\def\jlreq at footnote@delayfootnote at delay#1#2#3{%
+      % 二段組みの場合は上段を組んだ直後に\footnotetextを挿入(そのページの下段に入る)
+      \ifnum 0\if at firstcolumn\else 1\fi\ifnum#1>\value{page}1\fi>0
+        \xappto\jlreq at footnote@delayfootnoteslist{\unexpanded{\jlreq at footnote@delayfootnote{#1}{#2}{#3}}}%
+      \else
+        \footnotetext[#2]{#3}%
+      \fi
+    }
+  \else
+    \def\jlreq at footnote@delayfootnote at page{%
+      \jlreq at setcurrentpage
+      \ifodd\jlreq at currentpage
+        \jlreq at resultcnt=-1
+      \else
+        \jlreq at resultcnt=\numexpr\jlreq at currentpage+1\relax
+      \fi
+    }
+    \long\def\jlreq at footnote@delayfootnote at delay#1#2#3{%
+      % 一段組の場合はその前のページを組んだ直後に\footnotetextを挿入.
+      \ifnum\numexpr#1 - 1\relax>\value{page}%
+        \xappto\jlreq at footnote@delayfootnoteslist{\unexpanded{\jlreq at footnote@delayfootnote{#1}{#2}{#3}}}%
+      \else
+        \footnotetext[#2]{#3}%
+      \fi
+    }
+  \fi
+  \def\jlreq at footnote@delayfootnote at immediate#1#2#3{%
+    \ifnum #1<\jlreq at currentpage
+      \xappto\jlreq at footnote@delayfootnoteslist{\unexpanded{\jlreq at footnote@delayfootnote{#1}{#2}{#3}}}%
+    \else
       \footnotetext[#2]{#3}%
-    \else
-      \xappto\jlreq at footnote@delayfootnoteslist{\noexpand\jlreq at footnote@delayfootnote{\the\numexpr#1 - 1\relax}{\unexpanded{#2}}{\unexpanded{#3}}}%
     \fi
   }
-  \def\jlreq at footnote@delayfootnote at immediate#1#2#3{\footnotetext[#2]{#3}}%
   \let\jlreq at footnote@delayfootnote=\jlreq at footnote@delayfootnote at delay
   \def\jlreq at footnote@flushdelayfootnoteslist{%
-    \let\jlreq at footnote@delayfootnote=\jlreq at footnote@delayfootnote at immediate
-    \jlreq at footnote@delayfootnoteslist
-    \gdef\jlreq at footnote@delayfootnoteslist{}%
-    \let\jlreq at footnote@delayfootnote=\jlreq at footnote@delayfootnote at delay
+    \ifx\jlreq at footnote@delayfootnoteslist\@empty\else
+      \let\jlreq at footnote@delayfootnote=\jlreq at footnote@delayfootnote at immediate
+      \jlreq at setcurrentpage
+      \expandafter\gdef\expandafter\jlreq at footnote@delayfootnoteslist\expandafter{\expandafter}%
+      \jlreq at footnote@delayfootnoteslist
+      \let\jlreq at footnote@delayfootnote=\jlreq at footnote@delayfootnote at delay
+    \fi
   }
   \AtEndDocument{\jlreq at footnote@flushdelayfootnoteslist}
   \preto\newpage{\jlreq at footnote@flushdelayfootnoteslist}
   \long\def\jlreq at footnote@impl at woption[#1]#2{%
-    \jlreq at setcurrentpage
-    \ifodd\jlreq at currentpage
+    \jlreq at footnote@delayfootnote at page
+    \ifnum\jlreq at resultcnt=-1
       \jlreq at useoriginalcs{\footnote}[#1]{#2}%
     \else
       \jlreq at useoriginalcs{\footnotemark}[#1]%
-      \xappto\jlreq at footnote@delayfootnoteslist{\noexpand\jlreq at footnote@delayfootnote{\the\numexpr\jlreq at currentpage - \value{page}\relax}{\unexpanded{#1}}{\unexpanded{#2}}}%
+      \xappto\jlreq at footnote@delayfootnoteslist{\noexpand\jlreq at footnote@delayfootnote{\the\jlreq at resultcnt}{\unexpanded{#1}}{\unexpanded{#2}}}%
     \fi
     \jlreq at hook@postnote
   }
   \long\def\jlreq at footnote@impl at wooption#1{%
-    \jlreq at setcurrentpage
-    \ifodd\jlreq at currentpage
+    \jlreq at footnote@delayfootnote at page
+    \ifnum\jlreq at resultcnt=-1
       \jlreq at useoriginalcs{\footnote}{#1}%
     \else
       \jlreq at useoriginalcs{\footnotemark}%
-      \xappto\jlreq at footnote@delayfootnoteslist{\noexpand\jlreq at footnote@delayfootnote{\the\numexpr\jlreq at currentpage - \value{page}\relax}{\the\value{footnote}}{\unexpanded{#1}}}%
+      \xappto\jlreq at footnote@delayfootnoteslist{\noexpand\jlreq at footnote@delayfootnote{\the\jlreq at resultcnt}{\the\value{footnote}}{\unexpanded{#1}}}%
     \fi
     \jlreq at hook@postnote
   }
@@ -3362,10 +3412,11 @@
     \par
   \fi
 }
+% 4.2.4.b
 \jlreq at endnote@indent=2\jlreq at mol
-% 二行目以降を全角分下げる
+% 二行目以降を全角分下げる(4.2.4.d:TODO: 選択できるべき)
 \newcommand{\@makeendtext}[1]{\parindent 1\jlreq at mol
-    \hskip-1\jlreq at mol\csname\jlreq at endnotemarkname\endcsname\hskip 1\jlreq at mol#1}% 見出し出力と一文字分の空き
+    \hskip-1\jlreq at mol\csname\jlreq at endnotemarkname\endcsname\hskip 1\jlreq at mol#1}% 見出し出力と一文字分の空き(4.2.4.c)
 \def\@makeendmark{\@makefnmark}
 
 % \theendnoteの出力を仕込む
@@ -3419,7 +3470,6 @@
 \jlreqsetup{endnote_position=headings}
 \AtEndDocument{\theendnotes}
 
-\def\jlreq at sidenotemarkname{@thefnmark}% 合印用番号を一時的に入れるマクロ名
 
 % (1) \footnoteとかと同じ形式 sidenote_type=number
 % (2) 文中にマークを入れて,傍注には見出しが入る sidenote_type=symbol
@@ -3431,6 +3481,7 @@
 % \marginparwidth>0ptの時のみ定義する
 \ifdim\marginparwidth>0pt \expandafter\@firstofone\else\expandafter\@gobble\fi
 {
+  \def\jlreq at sidenotemarkname{@thefnmark}% 合印用番号を一時的に入れるマクロ名
   \long\def\@sidenotetext#1{%
     \marginpar{\reset at font\footnotesize
       \color at begingroup
@@ -3799,7 +3850,7 @@
 
 % レベル#1より低いレベルの見出しの**markを\markboth{}{}にする
 \def\jlreq at pagestyle@setclearmark#1{%
-  \expandafter\@for\expandafter\@tempa\expandafter:\expandafter=\jlreq at heading@allheadings\do{%
+  \@for\@tempa:=\jlreq at heading@allheadings\do{%
     \@ifundefined{\@tempa}{}{%
       \ifnum\csname jlreq at heading@level@\@tempa\endcsname<#1\relax\expandafter\def\csname\@tempa mark\endcsname##1{\markboth{}{}}\fi
     }%
@@ -3810,7 +3861,10 @@
 % 要するに\ps@***に\sectionmarkを定義するように仕込む.
 % 常にodd=rightmark,even=leftmarkになる.
 % 場所指定は奇数ページの方.偶数ページは反対になる.
-% mark_format={_chapter={第\thechapter 章\quad #1}}のような形.odd=とかeven=とかも仕込めるようにしたけど
+% mark_format={_chapter={第\thechapter 章\quad #1}}のような形.
+% このとき\ps@***で\def\chaptermark#1{\markboth{第\thechapter 章\quad #1}{}}とか定義される.
+% \markbothか\markrightかはoddかevenかに依存.
+% odd=とかeven=とかも仕込めるようにしたけど
 % あまり意味がない気がしてきた.oddやevenが優先される.
 \newcommand*{\DeclarePageStyle}[2]{%
   \expandafter\edef\csname jlreq at pagestyle@setting@#1\endcsname{\unexpanded{#2}}%
@@ -3839,19 +3893,20 @@
       {mark_format}{\edef\jlreq at mark@format{\unexpanded{##1}}}
       {command}{\edef\jlreq at command{\unexpanded{##1}}}
       {gap}{\def\jlreq at gap{##1}}
+      % trueにすると,\ps@***実行時にまず\***markを全て\@gobbleにする.
       {clear_markcommand}[true,false]{\csname jlreq at clearmarkcommand##1\endcsname}
     }{#2}%
-    % 見出しを出す場合:evenに章などの高いレベルの見出しを出す(2.6.3.a)
     \def\jlreq at markdefinition{}%
-    \def\jlreq at even@running at head@level{}%
-    \def\jlreq at markdefinition{}%
-    % _***な指定な時に,
+    % \jlreq at makemark{odd/even}running_headの中身\jlreq at endmark\jlreq at endmark
+    % として使う.running_headの中身が_から始まる時に,次を実行する.
     % * \jlreq@[even/odd]@running at headを\leftmarkや\rightmarkに書き換える
     % * \jlreq at markdefinitionに\***markを定義するマクロを入れる.
-    % また\jlreq@[even/odd]@running at head@levelに見出しのレベルを入れる.
-    % \jlreq at makemark{odd/even}running_headの中身\jlreq at endmark\jlreq at endmark
+    % * \jlreq@[even/odd]@running at head@levelに見出しのレベルを入れる.
     \def\jlreq at makemark##1##2##3\jlreq at endmark{%
       \ifx_##2%
+        \@ifundefined{##2}{%
+          \ClassError{jlreq}{Unknown Heading `##2' (in PageStyle #1)}{\@ehc}%
+        }{}%
         \ifthenelse{\equal{##1}{even}}{%
           \def\jlreq at even@running at head{\leftmark}%
         }{%
@@ -3863,7 +3918,7 @@
         % mark_formatを調べる
         \def\jlreq at tempa####1{%
           \jlreq at tempafalse
-          \let\jlreq at result=\@undefined
+          \edef\jlreq at result{\expandonce{\csname the##3\endcsname}\noexpand\quad\unexpanded{########1}}%
           \jlreq at parsekeyval*{
             {##1}{\edef\jlreq at result{\unexpanded{########1}}\jlreq at tempatrue}
             {##2##3}{\ifjlreq at tempa\else\edef\jlreq at result{\unexpanded{########1}}\fi}
@@ -3870,9 +3925,6 @@
           }{####1}%
         }%
         \expandafter\jlreq at tempa\expandafter{\jlreq at mark@format}%
-        \ifx\jlreq at result\@undefined
-          \edef\jlreq at result{\expandonce{\csname the##3\endcsname}\noexpand\quad\unexpanded{####1}}%
-        \fi
         \ifthenelse{\equal{##1}{even}}{%
           \def\jlreq at markcommand{\markboth}%
           \def\jlreq at markcommandafter{{}}%
@@ -3887,6 +3939,7 @@
       \fi
       \jlreq at ifendmark{##2}{}{\@gobble}%
     }%
+    \def\jlreq at even@running at head@level{}%
     \def\@tempb{\jlreq at makemark{even}}%
     \expandafter\@tempb\jlreq at even@running at head\jlreq at endmark\jlreq at endmark
     \def\jlreq at odd@running at head@level{}%
@@ -3894,6 +3947,7 @@
     \expandafter\@tempb\jlreq at odd@running at head\jlreq at endmark\jlreq at endmark
     \ifx\jlreq at odd@running at head@level\@empty\else\ifx\jlreq at even@running at head@level\@empty\else
       \ifnum\jlreq at odd@running at head@level<\jlreq at even@running at head@level
+        % 見出しを出す場合:evenに章などの高いレベルの見出しを出す(2.6.3.a)
         \jlreq at note{偶数ページには奇数ページよりアウトラインレベルの高い見出しを入れる (ページスタイル #1内,2.6.3.a).}%
       \fi
     \fi\fi
@@ -3944,7 +3998,7 @@
           \fi
         }%
       }%
-      % 左に配置するヘッダ.#1は柱の中身.(一回展開で正しくでてくる.)
+      % 左に配置するヘッダ.##1は柱の中身を入れたマクロ.(一回展開で正しくでてくる.)
       \def\jlreq at make@lefthead##1{%
         \jlreq at make@tatebox{##1}%
         \edef\jlreq at lefthead{%
@@ -4564,13 +4618,13 @@
     \def\jlreq at do{}%
     \def\jlreq at keyvallist{}%
     \@for\@tempa:=#1\do{%
-      \expandafter\jlreq at ifcontains\expandafter{\@tempa}{=}%
-        {\expandafter\appto\expandafter\jlreq at keyvallist\expandafter{\@tempa,}}%
-        {%
-          \@for\@tempb:=i,ii,iii,iv,v,vi\do{%
-            \eappto\jlreq at do{\noexpand\def\expandonce{\csname jlreq at itemization@beforeafter at space@\@tempb\endcsname}{\expandonce{\@tempa}}}%
-          }%
+      \expandafter\jlreq at ifcontains\expandafter{\@tempa}{=}{%
+        \expandafter\appto\expandafter\jlreq at keyvallist\expandafter{\@tempa,}%
+      }{%
+        \@for\@tempb:=i,ii,iii,iv,v,vi\do{%
+          \eappto\jlreq at do{\noexpand\def\expandonce{\csname jlreq at itemization@beforeafter at space@\@tempb\endcsname}{\expandonce{\@tempa}}}%
         }%
+      }%
     }%
     \def\jlreq at tempa{%
       \jlreq at parsekeyval{%
@@ -4590,7 +4644,7 @@
 \jlreqsetup{itemization_beforeafter_space={0pt,i=.5\baselineskip},itemization_itemsep=0pt}
 % enumerate, itemize用初期化
 \def\jlreq at init@list{%
-  \setlength{\labelwidth}{2\jlreq at mol}%
+  \setlength{\labelwidth}{2\zw}%
   \setlength{\partopsep}{0pt}%
   \setlength{\itemsep}{\dimexpr\jlreq at itemization@itemsep\relax}%
   \setlength{\parsep}{0pt}%
@@ -4597,9 +4651,9 @@
   \setlength{\listparindent}{\parindent}%
 % itemizeは直後ベタ,enumerateは直後全角空き.
   \ifthenelse{\equal{\@currenvir}{itemize}}{%
-    \setlength{\labelsep}{0\jlreq at mol}%
+    \setlength{\labelsep}{0\zw}%
   }{%
-    \setlength{\labelsep}{1\jlreq at mol}%
+    \setlength{\labelsep}{1\zw}%
   }%
   % \labelsepだけあけるのは一つ目(ラベルの直後)のみ
   \setlength{\itemindent}{\labelsep}%
@@ -4642,11 +4696,20 @@
   \renewcommand{\theenumii}{\jlreq at rensuji{\@arabic\c at enumii}}
   \renewcommand{\theenumiii}{\jlreq at rensuji{\@arabic\c at enumiii}}
   \renewcommand{\theenumiv}{\jlreq at rensuji{\@arabic\c at enumiv}}
+  \newcommand{\labelenumi}{\theenumi}
+  \newcommand{\labelenumii}{\theenumii}
+  \newcommand{\labelenumiii}{\theenumiii}
+  \newcommand{\labelenumiv}{\theenumiv}
+\else
+  \renewcommand{\theenumi}{\@arabic\c at enumi}
+  \renewcommand{\theenumii}{\@alph\c at enumii}
+  \renewcommand{\theenumiii}{\@roman\c at enumiii}
+  \renewcommand{\theenumiv}{\@Alph\c at enumiv}
+  \newcommand{\labelenumi}{\theenumi.}
+  \newcommand{\labelenumii}{(\theenumii)}
+  \newcommand{\labelenumiii}{\theenumiii.}
+  \newcommand{\labelenumiv}{\theenumiv.}
 \fi
-\newcommand{\labelenumi}{\theenumi}
-\newcommand{\labelenumii}{\theenumii}
-\newcommand{\labelenumiii}{\theenumiii}
-\newcommand{\labelenumiv}{\theenumiv}
 \renewcommand{\p at enumii}{\theenumi}
 \renewcommand{\p at enumiii}{\theenumi(\theenumii)}
 \renewcommand{\p at enumiv}{\p at enumiii\theenumiii}
@@ -4721,8 +4784,8 @@
 
 %. 表関係 4.4
 % 表内の行間を0にする(4.4.3.f)
-\jlreq at saveoriginalcs{tabular}
-\jlreq at saveoriginalcs{endtabular}
+\jlreq at saveoriginalcs{\tabular}
+\jlreq at saveoriginalcs{\endtabular}
 \preto\tabular{\begingroup\appto\@arrayparboxrestore{\baselineskip=0pt\lineskip=0pt}}
 \appto\endtabular{\endgroup}
 % 4.4.3.e
@@ -4829,7 +4892,7 @@
 
 % listoffigures
 \newcommand{\listoffigures}{%
-  \jlreq at top@contents=0
+  \jlreq at top@contents=-100
   \section*{\listfigurename}%
   \@mkboth{\listfigurename}{\listfigurename}%
   \@starttoc{lof}%
@@ -4836,7 +4899,7 @@
 }
 \newcommand*{\l at figure}{\@dottedtocline{1}{0\jlreq at gol}{2\jlreq at gol}}
 \newcommand{\listoftables}{%
-  \jlreq at top@contents=0
+  \jlreq at top@contents=-100
   \section*{\listtablename}%
   \@mkboth{\listtablename}{\listtablename}%
   \@starttoc{lot}%
@@ -4905,11 +4968,7 @@
   \newif\if at mainmatter
   \@mainmattertrue
   \newcommand*{\frontmatter}{%
-    \if at openright
-      \cleardoublepage
-    \else
-      \clearpage
-    \fi
+    \cleardoublepage
     \@mainmatterfalse
     \let\jlreq at pagestyle@atmain\jlreq at current@pagestyle
     \SaveHeading{chapter}{\jlreq at heading@chapter at atmain}%
@@ -4946,7 +5005,6 @@
 \ifthenelse{\equal{\jlreq at article@type}{article}}{
   \appto\appendix{%
     \setcounter{subsection}{0}%
-    \gdef\thesection{\@Alph\c at section}%
     \if at tate
       \def\thesection{\jlreq at rensuji{\Alph{section}}}%
     \else
@@ -5055,8 +5113,8 @@
   \jlreqsetup{year_style=seireki}
 \fi
 %.. 定理環境
-\jlreq at saveoriginalcs{@begintheorem}
-\jlreq at saveoriginalcs{@opargbegintheorem}
+\jlreq at saveoriginalcs{\@begintheorem}
+\jlreq at saveoriginalcs{\@opargbegintheorem}
 \def\@begintheorem#1#2{\topsep=\dimexpr\jlreq at theorem@beforeafter at space\relax
   \trivlist\labelsep=1\zw
   \itemindent=\dimexpr\jlreq at theorem@indent\relax
@@ -5066,11 +5124,11 @@
   \itemindent=\dimexpr\jlreq at theorem@indent\relax
   \item[\hskip \labelsep{\sffamily\bfseries #1\ #2(#3)}]}
 \AtEndOfPackageFile*{amsthm}{%
-  \jlreq at saveoriginalcs{proof}%
-  \jlreq at saveoriginalcs{endproof}%
+  \jlreq at saveoriginalcs{\proof}%
+  \jlreq at saveoriginalcs{\endproof}%
   \edef\jlreq at do{
     \unexpanded{\def\jlreq at proof[#1]}{%
-      \labelsep=1\zw
+      \unexpanded{\labelsep=1\zw}%
       \expandonce{\proof[{\reset at font\sffamily\bfseries #1\inhibitglue}\nopunct]}%
     }
   }



More information about the tex-live-commits mailing list