texlive[43259] Master/texmf-dist: jlreq (17feb17)

commits+karl at tug.org commits+karl at tug.org
Fri Feb 17 23:27:03 CET 2017


Revision: 43259
          http://tug.org/svn/texlive?view=revision&revision=43259
Author:   karl
Date:     2017-02-17 23:27:03 +0100 (Fri, 17 Feb 2017)
Log Message:
-----------
jlreq (17feb17)

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/tex/latex/jlreq/jlreq.cls
    trunk/Master/texmf-dist/tex/luatex/jlreq/jfm-jlreq.lua

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/jlreq/README-ja.html
    trunk/Master/texmf-dist/doc/latex/jlreq/README.html

Modified: trunk/Master/texmf-dist/doc/latex/jlreq/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jlreq/LICENSE	2017-02-17 10:54:19 UTC (rev 43258)
+++ trunk/Master/texmf-dist/doc/latex/jlreq/LICENSE	2017-02-17 22:27:03 UTC (rev 43259)
@@ -1,12 +1,12 @@
-(2-clause BSD license)
-jlreq
-Copyright 2017, 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:
-
-    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+(2-clause BSD license)
+jlreq
+Copyright 2017, 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:
+
+    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+

Added: trunk/Master/texmf-dist/doc/latex/jlreq/README-ja.html
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jlreq/README-ja.html	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/jlreq/README-ja.html	2017-02-17 22:27:03 UTC (rev 43259)
@@ -0,0 +1,182 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <meta http-equiv="Content-Style-Type" content="text/css" />
+  <meta name="generator" content="pandoc" />
+  <title></title>
+  <style type="text/css">code{white-space: pre;}</style>
+  <link href="data:text/css;charset=utf-8,body%20%7B%0Afont%2Dfamily%3A%20Helvetica%2C%20arial%2C%20sans%2Dserif%3B%0Afont%2Dsize%3A%2014px%3B%0Aline%2Dheight%3A%201%2E6%3B%0Apadding%2Dtop%3A%2010px%3B%0Apadding%2Dbottom%3A%2010px%3B%0Abackground%2Dcolor%3A%20white%3B%0Apadding%3A%2030px%3B%20%7D%0Abody%20%3E%20%2A%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%20%21important%3B%20%7D%0Abody%20%3E%20%2A%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%20%21important%3B%20%7D%0Aa%20%7B%0Acolor%3A%20%234183C4%3B%20%7D%0Aa%2Eabsent%20%7B%0Acolor%3A%20%23cc0000%3B%20%7D%0Aa%2Eanchor%20%7B%0Adisplay%3A%20block%3B%0Apadding%2Dleft%3A%2030px%3B%0Amargin%2Dleft%3A%20%2D30px%3B%0Acursor%3A%20pointer%3B%0Aposition%3A%20absolute%3B%0Atop%3A%200%3B%0Aleft%3A%200%3B%0Abottom%3A%200%3B%20%7D%0Ah1%2C%20h2%2C%20h3%2C%20h4%2C%20h5%2C%20h6%20%7B%0Amargin%3A%2020px%200%2010px%3B%0Apadding%3A%200%3B%0Afont%2Dweight%3A%20bold%3B%0A%2Dwebkit%2Dfont%2Dsmoothing%3A%20antialiased%3B%0Acursor%3A%20text%3B%0Aposition%3A%20relative%3B%20%7D%0Ah1%3Ahover%20a%2Eanchor%2C%20h2%3Ahover%20a%2Eanchor%2C%20h3%3Ahover%20a%2Eanchor%2C%20h4%3Ahover%20a%2Eanchor%2C%20h5%3Ahover%20a%2Eanchor%2C%20h6%3Ahover%20a%2Eanchor%20%7B%0A%0Atext%2Ddecoration%3A%20none%3B%20%7D%0Ah1%20tt%2C%20h1%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah2%20tt%2C%20h2%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah3%20tt%2C%20h3%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah4%20tt%2C%20h4%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah5%20tt%2C%20h5%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah6%20tt%2C%20h6%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah1%20%7B%0Afont%2Dsize%3A%2028px%3B%0Acolor%3A%20black%3B%20%7D%0Ah2%20%7B%0Afont%2Dsize%3A%2024px%3B%0Aborder%2Dbottom%3A%201px%20solid%20%23cccccc%3B%0Acolor%3A%20black%3B%20%7D%0Ah3%20%7B%0Afont%2Dsize%3A%2018px%3B%20%7D%0Ah4%20%7B%0Afont%2Dsize%3A%2016px%3B%20%7D%0Ah5%20%7B%0Afont%2Dsize%3A%2014px%3B%20%7D%0Ah6%20%7B%0Acolor%3A%20%23777777%3B%0Afont%2Dsize%3A%2014px%3B%20%7D%0Ap%2C%20b!
 lockquote%2C%20ul%2C%20ol%2C%20dl%2C%20li%2C%20table%2C%20pre%20%7B%0Amargin%3A%2015px%200%3B%20%7D%0Ahr%20%7B%0A%0Aborder%3A%200%20none%3B%0Acolor%3A%20%23cccccc%3B%0Aheight%3A%204px%3B%0Apadding%3A%200%3B%20%7D%0Abody%20%3E%20h2%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Abody%20%3E%20h1%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Abody%20%3E%20h1%3Afirst%2Dchild%20%2B%20h2%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Abody%20%3E%20h3%3Afirst%2Dchild%2C%20body%20%3E%20h4%3Afirst%2Dchild%2C%20body%20%3E%20h5%3Afirst%2Dchild%2C%20body%20%3E%20h6%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Aa%3Afirst%2Dchild%20h1%2C%20a%3Afirst%2Dchild%20h2%2C%20a%3Afirst%2Dchild%20h3%2C%20a%3Afirst%2Dchild%20h4%2C%20a%3Afirst%2Dchild%20h5%2C%20a%3Afirst%2Dchild%20h6%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Ah1%20p%2C%20h2%20p%2C%20h3%20p%2C%20h4%20p%2C%20h5%20p%2C%20h6%20p%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Ali%20p%2Efirst%20%7B%0Adisplay%3A%20inline%2Dblock%3B%20%7D%0Aul%2C%20ol%20%7B%0Apadding%2Dleft%3A%2030px%3B%20%7D%0Aul%20%3Afirst%2Dchild%2C%20ol%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Aul%20%3Alast%2Dchild%2C%20ol%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Adl%20%7B%0Apadding%3A%200%3B%20%7D%0Adl%20dt%20%7B%0Afont%2Dsize%3A%2014px%3B%0Afont%2Dweight%3A%20bold%3B%0Afont%2Dstyle%3A%20italic%3B%0Apadding%3A%200%3B%0Amargin%3A%2015px%200%205px%3B%20%7D%0Adl%20dt%3Afirst%2Dchild%20%7B%0Apadding%3A%200%3B%20%7D%0Adl%20dt%20%3E%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Adl%20dt%20%3E%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Adl%20dd%20%7B%0Amargin%3A%200%200%2015px%3B%0Apadding%3A%200%2015px%3B%20%7D%0Adl%20dd%20%3E%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Adl%20dd%20%3E%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Ablockquote%20%7B%0Aborder%2Dleft%3A%204px%20solid%20%23dddddd%3B%0Ap!
 adding%3A%200%2015px%3B%0Acolor%3A%20%23777777%3B%20%7D%0Ablockquote%20%3E%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Ablockquote%20%3E%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Atable%20%7B%0Apadding%3A%200%3B%20%7D%0Atable%20tr%20%7B%0Aborder%2Dtop%3A%201px%20solid%20%23cccccc%3B%0Abackground%2Dcolor%3A%20white%3B%0Amargin%3A%200%3B%0Apadding%3A%200%3B%20%7D%0Atable%20tr%3Anth%2Dchild%282n%29%20%7B%0Abackground%2Dcolor%3A%20%23f8f8f8%3B%20%7D%0Atable%20tr%20th%20%7B%0Afont%2Dweight%3A%20bold%3B%0Aborder%3A%201px%20solid%20%23cccccc%3B%0Atext%2Dalign%3A%20left%3B%0Amargin%3A%200%3B%0Apadding%3A%206px%2013px%3B%20%7D%0Atable%20tr%20td%20%7B%0Aborder%3A%201px%20solid%20%23cccccc%3B%0Atext%2Dalign%3A%20left%3B%0Amargin%3A%200%3B%0Apadding%3A%206px%2013px%3B%20%7D%0Atable%20tr%20th%20%3Afirst%2Dchild%2C%20table%20tr%20td%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Atable%20tr%20th%20%3Alast%2Dchild%2C%20table%20tr%20td%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Aimg%20%7B%0Amax%2Dwidth%3A%20100%25%3B%20%7D%0Aspan%2Eframe%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%20%7D%0Aspan%2Eframe%20%3E%20span%20%7B%0Aborder%3A%201px%20solid%20%23dddddd%3B%0Adisplay%3A%20block%3B%0Afloat%3A%20left%3B%0Aoverflow%3A%20hidden%3B%0Amargin%3A%2013px%200%200%3B%0Apadding%3A%207px%3B%0Awidth%3A%20auto%3B%20%7D%0Aspan%2Eframe%20span%20img%20%7B%0Adisplay%3A%20block%3B%0Afloat%3A%20left%3B%20%7D%0Aspan%2Eframe%20span%20span%20%7B%0Aclear%3A%20both%3B%0Acolor%3A%20%23333333%3B%0Adisplay%3A%20block%3B%0Apadding%3A%205px%200%200%3B%20%7D%0Aspan%2Ealign%2Dcenter%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Aclear%3A%20both%3B%20%7D%0Aspan%2Ealign%2Dcenter%20%3E%20span%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Amargin%3A%2013px%20auto%200%3B%0Atext%2Dalign%3A%20center%3B%20%7D%0Aspan%2Ealign%2Dcenter%20span%20img%20%7B%0Amargin%3A%200%20auto%3B%0Atext%2Dalign%3A%20center%3B%20%7D%0Aspan%2Ealign%2Dright%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3!
 A%20hidden%3B%0Aclear%3A%20both%3B%20%7D%0Aspan%2Ealign%2Dright%20%3E%20span%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Amargin%3A%2013px%200%200%3B%0Atext%2Dalign%3A%20right%3B%20%7D%0Aspan%2Ealign%2Dright%20span%20img%20%7B%0Amargin%3A%200%3B%0Atext%2Dalign%3A%20right%3B%20%7D%0Aspan%2Efloat%2Dleft%20%7B%0Adisplay%3A%20block%3B%0Amargin%2Dright%3A%2013px%3B%0Aoverflow%3A%20hidden%3B%0Afloat%3A%20left%3B%20%7D%0Aspan%2Efloat%2Dleft%20span%20%7B%0Amargin%3A%2013px%200%200%3B%20%7D%0Aspan%2Efloat%2Dright%20%7B%0Adisplay%3A%20block%3B%0Amargin%2Dleft%3A%2013px%3B%0Aoverflow%3A%20hidden%3B%0Afloat%3A%20right%3B%20%7D%0Aspan%2Efloat%2Dright%20%3E%20span%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Amargin%3A%2013px%20auto%200%3B%0Atext%2Dalign%3A%20right%3B%20%7D%0Acode%2C%20tt%20%7B%0Amargin%3A%200%202px%3B%0Apadding%3A%200%205px%3B%0Awhite%2Dspace%3A%20nowrap%3B%0Aborder%3A%201px%20solid%20%23eaeaea%3B%0Abackground%2Dcolor%3A%20%23f8f8f8%3B%0Aborder%2Dradius%3A%203px%3B%20%7D%0Apre%20code%20%7B%0Amargin%3A%200%3B%0Apadding%3A%200%3B%0Awhite%2Dspace%3A%20pre%3B%0Aborder%3A%20none%3B%0Abackground%3A%20transparent%3B%20%7D%0A%2Ehighlight%20pre%20%7B%0Abackground%2Dcolor%3A%20%23f8f8f8%3B%0Aborder%3A%201px%20solid%20%23cccccc%3B%0Afont%2Dsize%3A%2013px%3B%0Aline%2Dheight%3A%2019px%3B%0Aoverflow%3A%20auto%3B%0Apadding%3A%206px%2010px%3B%0Aborder%2Dradius%3A%203px%3B%20%7D%0Apre%20%7B%0Abackground%2Dcolor%3A%20%23f8f8f8%3B%0Aborder%3A%201px%20solid%20%23cccccc%3B%0Afont%2Dsize%3A%2013px%3B%0Aline%2Dheight%3A%2019px%3B%0Aoverflow%3A%20auto%3B%0Apadding%3A%206px%2010px%3B%0Aborder%2Dradius%3A%203px%3B%20%7D%0Apre%20code%2C%20pre%20tt%20%7B%0Abackground%2Dcolor%3A%20transparent%3B%0Aborder%3A%20none%3B%20%7D%0A" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<h1 id="jlreq">jlreq</h1>
+<h2>これは何?</h2>
+<p><a href="https://www.w3.org/TR/jlreq/ja/">日本語組版処理の要件</a>の実装を試みる<a href="https://osdn.jp/projects/luatex-ja/wiki/FrontPage">LuaTeX-ja</a> / pLaTeX / upLaTeX用のクラスファイルと,それに必要なJFMの組み合わせです.</p>
+<h2>提供されるもの</h2>
+<p>クラスファイルjlreq.clsと,横書きLuaTeX-ja用のJFMであるjfm-jlreq.luaが用意されています.また,縦書きのJFMやpLaTeX / upLaTeX 用のJFMを生成するいくつかのスクリプトがあります.</p>
+<h2>インストール</h2>
+<p><code>make</code>で必要なJFMを生成してください.その後,</p>
+<ul>
+<li>*.tfm -> $TEXMF/fonts/tfm/public/jlreq</li>
+<li>*.vf -> $TEXMF/fonts/vf/public/jlreq</li>
+<li>jfm-jlreq.lua jfm-jlreqv.lua -> $TEXMF/tex/luatex/jlreq</li>
+<li>jlreq.cls -> $TEXMF/tex/latex/jlreq</li>
+</ul>
+<p>と配置します.<code>make install</code>とすると,$TEXMF=$TEXMFHOMEとしてこのコピーを行います.</p>
+<h2>使い方</h2>
+<p>通常通り</p>
+<pre><code>\documentclass{jlreq}</code></pre>
+<p>とします.これで横書きのarticle相当の文書クラスとなります.エンジンは自動判定されますが,指定する場合はクラスオプションに<code>platex/uplatex/lualatex</code>のいずれかを渡してください.縦書きにするには<code>tate</code>オプションを渡します.また,reportやbook相当の文書クラスとするには,それぞれ<code>report</code>や<code>book</code>オプションを渡します.たとえば,縦書きの本を作成するには</p>
+<pre><code>\documentclass[tate,book]{jlreq}</code></pre>
+<p>とします.</p>
+<p>その他,<code>oneside / twoside / onecolumn / twocolumn / titlepage / notitlepage / draft / final / openright / openany / leqno / fleqn</code>というよくあるオプションを受け付けます.</p>
+<p>標準的な文書クラスと同じように中身を書くことができますが,次のような命令が追加 / 拡張されています.</p>
+<h3 id="section"><code>\section</code></h3>
+<p><code>\section*[running head]{見出し文字列}[副題]</code>というように,通常の書式に加えて副題を受け付けられるように拡張されています.その他,<code>\part</code>(articleのみ),<code>\chapter</code>(book/reportのみ),<code>\subsection</code>も副題を受け付けます.(<code>\subsubsection</code>も受け付けますが,汚い見た目になります.)</p>
+<h3 id="sidenote"><code>\sidenote</code></h3>
+<p>傍注(縦組みの場合は脚注)を出力します.デフォルトでは<code>\footnote</code>と同様の書式となりますが,クラスオプションに<code>sidenote_type=mark</code>が指定されている場合,その書式は<code>\sidenote{該当項目}{注}</code>となります.たとえば</p>
+<pre><code>刊行できる\sidenote{原稿}{印刷などの方法により……}を入手する仕事である.</code></pre>
+<p>とします.後の説明も参照してください.</p>
+<p>デフォルトの基本版面では余白が少なく,実用にはならないかと思います.後の基本版面の設定を参考にしてください.</p>
+<h3 id="endnote"><code>\endnote</code></h3>
+<p>後注を指定します.<code>\footnote</code>と同様の書式です.デフォルトでは,注自身の出力は見出し直前に行われます.この動作はクラスオプションにより制御できます.また<code>\theendnotes</code>を実行するとその場に出力をします.</p>
+<h3 id="warichu"><code>\warichu</code></h3>
+<p>割注を出力します.行分割位置などは自動で計算されます.(複数回のコンパイルが必要.)<code>\warichu*</code>ではこれらの位置を手動で指定できます.書式は</p>
+<p><code>\warichu*{(一行目前) & (一行目後)\\ (二行目前) & (二行目後)...}</code></p>
+<p>です.<code>&</code>が省略されている場合は自動で調整されます.</p>
+<h3 id="jlreqsetup"><code>\jlreqsetup</code></h3>
+<p>設定用命令です.プリアンブルでしか使えません.文書に対する殆どの設定はクラスオプションにより行いますが,一部の設定はこの命令を通じて行います.</p>
+<h3>その他</h3>
+<ul>
+<li>ルビは提供されません.<a href="https://github.com/zr-tex8r/PXrubrica">PXrubrica</a>またはluatexja-ruby(LuaTeX利用時のみ,LuaTeX-jaパッケージに付属)を使うと良いかと思います.</li>
+<li><p>日本語組版処理の要件2.3.2.dによれば,二段組の最後のページの各段の行数は揃えることが望ましいとされていますが,この処理は行われません.<code>nidanfloat</code>パッケージを使い,</p>
+<pre><code>\usepackage[balance]{nidanfloat}</code></pre>
+<p>とするとこの処理が行われます.ただし,最終ページでの<code>\newpage</code>や<code>\clearpage</code>が正しく動作しません.詳しくは<code>nidanfloat</code>パッケージのマニュアルをご覧ください.</p></li>
+</ul>
+<h2>各種設計</h2>
+<p>設計はクラスオプションまたは<code>\jlreqsetup</code>によりkeyval形式で行います.以下では次の用法を使います.</p>
+<ul>
+<li><code>[A/B]</code>: AまたはBです.<code>[A/B/C]</code>等も同様.</li>
+<li><code><寸法></code>: TeXが認識する寸法です.簡単な式(10pt+10ptのような)を使うこともできます.また,場合によっては次のような特殊な値を使うこともできます.
+<ul>
+<li><code>Q</code>: 0.25mmと解釈されます.</li>
+<li><code>zh</code>, <code>zw</code>: 全角幅として解釈されます.</li>
+</ul></li>
+</ul>
+<p>たとえば<code>Q</code>が利用可能な場合は<code><寸法;Q></code>のように記述します.</p>
+<h3>基本版面</h3>
+<p>すべてクラスファイルへのオプションです.</p>
+<ul>
+<li><code>paper=[<紙サイズ名>/{<寸法>,<寸法>}]</code>:紙サイズです.紙サイズ名はa0からa10,b0からb10,c2からc8を指定できます.B列はJIS B列です.また,<code>{<縦>,<横>}</code>と直接寸法を指定することもできます.</li>
+<li><code>fontsize=<寸法;Q></code> : フォントサイズ.デフォルトは10pt.</li>
+<li><code>line_length=<寸法;zw,zh></code> : 一行の長さ.デフォルトは紙の縦幅の0.75倍.実際の値は一文字の長さの整数倍になるように補正されます.</li>
+<li><code>number_of_lines=<整数値></code> : 一ページの行数.デフォルトは紙の横幅の0.75倍になるような値.</li>
+<li><code>gutter=<寸法;zh,zw></code> : のどの余白の大きさ.
+<ul>
+<li><code>tate</code>無指定時は奇数ページ左,偶数ページ右の余白</li>
+<li><code>tate</code>指定時は奇数ページ右,偶数ページ左の余白</li>
+<li><code>twoside</code>が指定されていない時は,常に奇数ページ扱いで余白が設定される</li>
+</ul></li>
+<li><code>head_space=<寸法;zh,zw></code> : 天の空き量.デフォルトは中央寄せになるような値.</li>
+<li><code>foot_space=<寸法;zh,zw></code> : 地の空き量.デフォルトは中央寄せになるような値.</li>
+<li><code>baselineskip=<寸法;Q,zh,zw></code> : 行送り.デフォルトはfontsizeの1.7倍.</li>
+<li><code>linegap=<寸法;Q,zh,zw></code> : 行間.</li>
+<li><code>headfoot_sidemargin=<寸法;zw,zh></code>:柱やノンブルの左右の空き.</li>
+<li><code>column_gap=<寸法;zw,zh></code>: 段間(twocolumn指定時のみ).</li>
+</ul>
+<h3>組み方</h3>
+<ul>
+<li><code>open_bracket_pos=[zenkaku_tentsuki/zenkakunibu_nibu/nibu_tentsuki]</code>: 始め括弧が行頭に来た際の配置方法を指定します.それぞれ段落開始全角折り返し行頭天付き(デフォルト),段落開始全角二分折り返し行頭二分,段落開始二分折り返し行頭天付きを意味します.</li>
+<li><code>hanging_punctuation</code>: ぶら下げ組をします.</li>
+</ul>
+<h3>注関係</h3>
+<ul>
+<li><code>reference_mark=[inline/interlinear]</code>: 合印の配置方法を指定します.<code>inline</code>にすると該当項目の後ろの行中に配置します.<code>interlinear</code>を指定すると該当項目の上(横組)または右(縦組)に配置します.</li>
+<li><p><code>sidenote_type=[number/symbol]</code>: 傍注と本文との対応の方法を指定します.<code>number</code>が規定で,注の位置に通し番号が入り,それにより対応が示されます.<code>symbol</code>とすると,注の位置に特定の記号が入り,また注がついている単語が強調されます.ここに入る記号と単語の強調は<code>\jlreqsetup</code>に次を渡すことで指定します.</p>
+<ul>
+<li><code>sidenote_symbol</code>: 注の位置に入る記号.デフォルト*</li>
+<li><code>sidenote_keyword_font</code>: 注のついている単語のフォント命令.デフォルトは無し(強調しない)</li>
+</ul></li>
+<li><code>sidenote_width=<寸法;zh,zw></code>: 傍注の幅を指定します.基本版面の設定に合わせて設定してください.</li>
+<li><p><code>endnote_position=[headings/paragraph/{_<見出し名1>,_<見出し名2>,...}]</code>:後注の出力場所を指定します.<code>headings</code>は各見出しの直前(デフォルト),<code>paragraph</code>は改段落の際に出力します.また,<code>endnote_position={_chapter,_section}</code>とすると,<code>\chapter</code>と<code>\section</code>の直前に出力します.</p></li>
+</ul>
+<h3>キャプション</h3>
+<p>図表のキャプションを<code>\jlreqsetup</code>で変更できます.</p>
+<ul>
+<li><code>caption_font=<命令></code>: キャプション自身のフォントを指定します.</li>
+<li><code>caption_label_font=<命令></code>: キャプションのラベルのフォントを指定します.</li>
+</ul>
+<h2>見出し</h2>
+<p>見出しの設定は,<code>\Declare***Heading</code>という命令で行います(***には見出しの種類に応じた文字列が入る).書式はすべて</p>
+<pre><code>\Declare****Heading{<命令名>}{<レベル>}{<設定>}</code></pre>
+<p>となっています.また,<code>\New***Heading</code>,<code>\Renew***Heading</code>,<code>\Provide***Heading</code>も同時に用意されます.それぞれ<code>\newcommand</code>,<code>\renewcommand</code>,<code>\providecommand</code>に対応した動きをします.</p>
+<h3>扉見出し</h3>
+<p><code>\DeclareTobiraHeading</code>で作成します.通常のクラスファイルにおける<code>\section</code>等と同じ書式の命令ができます.設定は以下の通り.</p>
+<ul>
+<li><code>type=[han/naka]</code>: <code>han</code>だと半扉見出しを,<code>naka</code>だと中扉見出しを作ります.</li>
+<li><code>pagestyle=<ページスタイル></code>: 見出し箇所のページスタイルを指定します.</li>
+<li><code>label_format=<書式></code>: ラベルを出力する命令を指定します.たとえば<code>label_format={第\thechapter 章}</code>のように指定します.</li>
+<li><code>format=<書式></code>: 実際に出力する書式を指定します.<code>format={\null\vfill {\Huge\bfseries #1#2}}</code>のようにします.<code>#1</code>はラベルに,<code>#2</code>は見出し文字列に置き換えられます.</li>
+</ul>
+<h3>別行見出し</h3>
+<p><code>\DeclareBlockHeading</code>で作成します.<code>\<命令名>*[running head]{見出し文字列}[副題]</code>という書式の命令を作成します.設定は以下の通り.</p>
+<ul>
+<li><code>font=<命令></code>: 見出しのフォントを指定します.</li>
+<li><code>indent=<整数値></code> 見出し全体の字下げ量を全角文字数で指定します.</li>
+<li><code>subtitle_font=<命令></code>: 副題のフォントを指定します.</li>
+<li><code>pagebreak=[clearpage/cleardoublepage/clearcolumn/nariyuki]</code>: 見出し直前の改ページを指定します.それぞれ,改ページ,改丁,改段,なりゆきです.</li>
+</ul>
+<p>また,行取りの指定を行うことができます.次のいずれかの方法で行います.</p>
+<ul>
+<li>行数を指定し,その中央に配置する.<code>lines=<整数値></code>により行数を指定します.<code>before_lines=<整数値></code>や<code>after_lines=<整数値></code>により,さらに前後に追加する行数を指定します.たとえば<code>lines=3,after_lines=1</code>とすれば,四行の中に配置され,前の空きよりも後ろの空きの方が一行分大きくなります.</li>
+<li>行数と,前後いずれかの空きを指定します.<code>lines=<整数値></code>により行数を,<code>before_space=<寸法></code>または<code>after_space=<寸法></code>のいずれかの指定によりそれぞれ前またら後ろの空きを指定します.</li>
+<li>前後の空きを指定します.<code>before_space=<寸法></code>および<code>after_space=<寸法></code>を指定します.</li>
+</ul>
+<h3>同行見出し</h3>
+<p><code>\DeclareRuninHeading</code>で作成します.<code>\section</code>と同様の書式の命令が作成されます.設定は以下の通り.</p>
+<ul>
+<li><code>font=<命令></code>: 見出しのフォントを指定します.</li>
+<li><code>indent=<整数値></code> 見出し文字列全体の字下げ量を全角文字数で指定します.</li>
+</ul>
+<h3>窓見出し</h3>
+<p><code>\DeclareCutinHeading</code>で作成します.<code>\<命令名>{見出し文字列}</code>という書式の命令を作成します.設定は以下の通り.</p>
+<ul>
+<li><code>font=<命令></code>: 見出しのフォントを指定します.</li>
+<li><code>indent=<整数値></code>: 見出し全体の字下げ量を全角文字数で指定します.</li>
+<li><code>onelinemax=<寸法></code>, <code>twolinemax=<寸法></code>: 見出し文字列の長さが<code>onelinemax</code>以下ならば一行で,<code>twolinemax</code>以下ならば二行で窓見出しを出力します.それ以上の場合は三行です.デフォルトはそれぞれ6文字,20文字の長さ.</li>
+</ul>
+<h3 id="modifyheading"><code>\ModifyHeading</code></h3>
+<p>既に(上のどれかを使い)定義された見出し命令の設定を変更します.たとえば</p>
+<pre><code>\ModifyHeading{section}{lines=10}</code></pre>
+<p>とすると,<code>\section</code>のフォントなどの設定はそのままに,行取りのみが10行に変更されます.見出しの種類を変更することはできません.</p>
+<h2>ページスタイル</h2>
+<pre><code>\DeclarePageStyle{<ページスタイル名>}{<設定>}</code></pre>
+<p>によりページスタイルを定義することができます.設定は以下の通り.</p>
+<ul>
+<li><code>nombre_position</code>,<code>running_head_position</code>: ノンブルと柱の位置を指定します.<code>top-left</code>のように指定できます.<code>center/left/right/top/bottom</code>が使えます.</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>
+</ul>
+<p><code>\ModifyPageStyle</code>により既存のページスタイルを改変することが可能です.</p>
+<h2 id="-1">その他</h2>
+<ul>
+<li>クラスオプション<code>jlreq_warnings</code>を渡されると,日本語組版処理の要件に反する設定が行われた場合に警告がされます.</li>
+</ul>
+<h2>ライセンス</h2>
+<p>このパッケージは二条項BSDライセンスの元で配布されています.詳しくは<a href="LICENSE" class="uri">LICENSE</a>をご覧ください.</p>
+<h2>履歴</h2>
+<ul>
+<li>2017-02-08
+<ul>
+<li>最初のバージョン.</li>
+</ul></li>
+<li>2017-02-17
+<ul>
+<li>いくつかバグを修正.</li>
+<li>クラスオプション/<code>\jlreqsetup</code>にいくつかのキーを追加/変更.</li>
+<li><code>abstract</code>環境を実装.</li>
+<li>パッケージを読み込んでいるだけのはやめた.</li>
+</ul></li>
+</ul>
+</body>
+</html>

Modified: trunk/Master/texmf-dist/doc/latex/jlreq/README-ja.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jlreq/README-ja.md	2017-02-17 10:54:19 UTC (rev 43258)
+++ trunk/Master/texmf-dist/doc/latex/jlreq/README-ja.md	2017-02-17 22:27:03 UTC (rev 43259)
@@ -1,185 +1,193 @@
-# jlreq
-
-## これは何?
-[日本語組版処理の要件](https://www.w3.org/TR/jlreq/ja/)の実装を試みる[LuaTeX-ja](https://osdn.jp/projects/luatex-ja/wiki/FrontPage) / pLaTeX / upLaTeX用のクラスファイルと,それに必要なJFMの組み合わせです.
-
-## 提供されるもの
-クラスファイルjlreq.clsと,横書きLuaTeX-ja用のJFMであるjfm-jlreq.luaが用意されています.また,縦書きのJFMやpLaTeX / upLaTeX 用のJFMを生成するいくつかのスクリプトがあります.
-
-## インストール
-`make`で必要なJFMを生成してください.その後,
-
-* *.tfm -> $TEXMF/fonts/tfm/public/jlreq
-* *.vf -> $TEXMF/fonts/vf/public/jlreq
-* jfm-jlreq.lua jfm-jlreqv.lua -> $TEXMF/tex/luatex/jlreq
-* jlreq.cls -> $TEXMF/tex/latex/jlreq
-
-と配置します.`make install`とすると,$TEXMF=$TEXMFHOMEとしてこのコピーを行います.
-
-## 使い方
-通常通り
-````
-\documentclass{jlreq}
-````
-とします.これで横書きのarticle相当の文書クラスとなります.エンジンは自動判定されますが,指定する場合はクラスオプションに`platex/uplatex/lualatex`のいずれかを渡してください.縦書きにするには`tate`オプションを渡します.また,reportやbook相当の文書クラスとするには,それぞれ`report`や`book`オプションを渡します.たとえば,縦書きの本を作成するには
-````
-\documentclass[tate,book]{jlreq}
-````
-とします.
-
-その他,`oneside / twoside / onecolumn / twocolumn / titlepage / notitlepage / draft / final / openright / openany / leqno / fleqn`というよくあるオプションを受け付けます.
-
-標準的な文書クラスと同じように中身を書くことができますが,次のような命令が追加 / 拡張されています.
-
-### `\section`
-`\section*[running head]{見出し文字列}[副題]`というように,通常の書式に加えて副題を受け付けられるように拡張されています.その他,`\part`(articleのみ),`\chapter`(book/reportのみ),`\subsection`も副題を受け付けます.(`\subsubsection`も受け付けますが,汚い見た目になります.)
-
-### `\sidenote`
-傍注(縦組みの場合は脚注)を出力します.デフォルトでは`\footnote`と同様の書式となりますが,クラスオプションに`sidenote_type=mark`が指定されている場合,その書式は`\sidenote{該当項目}{注}`となります.たとえば
-````
-刊行できる\sidenote{該当項目}{原稿とは,印刷などの方法により……}を入手する仕事である.
-````
-とします.後の説明も参照してください.
-
-デフォルトの基本反面では余白が少なく,実用にはならないかと思います.後の基本反面の設定を参考にしてください.
-
-### `\endnote`
-後注を指定します.`\footnote`と同様の書式です.デフォルトでは,注自身の出力は見出し直前に行われます.この動作はクラスオプションにより制御できます.また`\theendnotes`を実行するとその場に出力をします.
-
-### `\warichu`
-割注を出力します.行分割位置などは自動で計算されます.(複数回のコンパイルが必要.)`\warichu*`ではこれらの位置を手動で指定できます.書式は
-
-``\warichu*{(一行目前) & (一行目後)\\ (二行目前) & (二行目後)...}``
-
-です.`&`が省略されている場合は自動で調整されます.
-
-### `\jlreqsetup`
-設定用命令です.プリアンブルでしか使えません.文書に対する殆どの設定はクラスオプションにより行いますが,一部の設定はこの命令を通じて行います.
-
-
-## 各種設計
-設計はクラスオプションまたは`\jlreqsetup`によりkeyval形式で行います.以下では次の用法を使います.
-
-* `[A/B]`: AまたはBです.`[A/B/C]`等も同様.
-* `<寸法>`: TeXが認識する寸法です.簡単な式(10pt+10ptのような)を使うこともできます.また,場合によっては次のような特殊な値を使うこともできます.
-	* `Q`: 0.25mmと解釈されます.
-	* `zh`, `zw`: 全角幅として解釈されます.
-
-たとえば`Q`が利用可能な場合は`<寸法;Q>`のように記述します.
-
-
-### 基本版面
-すべてクラスファイルへのオプションです.
-
-* `paper=[<紙サイズ名>/{<寸法>,<寸法>}]`:紙サイズです.紙サイズ名はa0からa10,b0からb10,c2からc8を指定できます.B列はJIS B列です.また,`{<縦>,<横>}`と直接寸法を指定することもできます.
-* `fontsize=<寸法;Q>` : フォントサイズ.デフォルトは10pt.
-* `line_length=<寸法;zw,zh>` : 一行の長さ.デフォルトは紙の縦幅の0.75倍.実際の値は一文字の長さの整数倍になるように補正されます.
-* `number_of_lines=<整数値>` : 一ページの行数.デフォルトは紙の横幅の0.75倍になるような値.
-* `gutter=<寸法;zh,zw>` : のどの余白の大きさ.(`tate`や`twoside`が指定されているかに応じて少し効果が変わる.)
-* `head_space=<寸法;zh,zw>` : 天の空き量.デフォルトは中央寄せになるような値.
-* `foot_space=<寸法;zh,zw>` : 地の空き量.デフォルトは中央寄せになるような値.
-* `baselineskip=<寸法;Q,zh,zw>` : 行送り.デフォルトはfontsizeの1.7倍.
-* `linegap=<寸法;Q,zh,zw>` : 行間.
-* `headfoot_sidemargin=<寸法;zw,zh>`:柱やノンブルの左右の空き.
-* `column_gap=<寸法;zw,zh>`: 段間(twocolumn指定時のみ).
-
-### 組み方
-* `open_bracket_pos=[zenkaku_tentsuki/zenkakunibu_nibu/nibu_tentsuki]`: 始め括弧が行頭に来た際の配置方法を指定します.それぞれ段落開始全角折り返し行頭天付き(デフォルト),段落開始全角二分折り返し行頭二分,段落開始二分折り返し行頭天付きを意味します.
-* `hanging_punctuation`: ぶら下げ組をします.
-
-### 注関係
-* `reference_mark=[inline/interlinear]`: 合印の配置方法を指定します.`inline`にすると該当項目の後ろの行中に配置します.`interlinear`を指定すると該当項目の上(横組)または右(縦組)に配置します.
-* `sidenote_type=[number/mark]`: 傍注と本文との対応の方法を指定します.`mark`は注のついている該当項目により指定します.`mark`が指定されている場合は,さらに該当項目の装飾方法を指定できます.これは`\jlreqsetup`に
-````
-sidenote_mark={
-  mark=<文字列>,
-  headingfont=<命令>
-}
-````
-を渡すことで行います.`mark`により指定された文字列が該当項目につき,また`headingfont`で指定された命令で装飾されます.デフォルトは
-````
-sidenote_mark={
-  mark={*},
-  headingfont={\gtfamily\bfseries}
-}
-````
-です.
-* `sidenote_width=<寸法;zh,zw>`: 傍注の幅を指定します.基本版面の設定に合わせて設定してください.
-* `endnote_position=[_headings/_paragraph/{<見出し名1>,<見出し名2>,...}]`:後注の出力場所を指定します.`_headings`は各見出しの直前(デフォルト),`_paragraph`は改段落の際に出力します.また,`endnote_position={chapter,section}`とすると,`\chapter`と`\section`の直前に出力します.
-
-## 見出し
-見出しの設定は,`\Declare***Heading`という命令で行います(***には見出しの種類に応じた文字列が入る).書式はすべて
-
-```
-\Declare****Heading{<命令名>}{<レベル>}{<設定>}
-```
-
-となっています.また,`\New***Heading`,`\Renew***Heading`,`\Provide***Heading`も同時に用意されます.それぞれ`\newcommand`,`\renewcommand`,`\providecommand`に対応した動きをします.
-
-### 扉見出し
-`\DeclareTobiraHeading`で作成します.通常のクラスファイルにおける`\section`等と同じ書式の命令ができます.設定は以下の通り.
-
-* `type=[han/naka]`: `han`だと半扉見出しを,`naka`だと中扉見出しを作ります.
-* `pagestyle=<ページスタイル>`: 見出し箇所のページスタイルを指定します.
-* `label_format=<書式>`: ラベルを出力する命令を指定します.たとえば`label_format={第\thechapter 章}`のように指定します.
-* `format=<書式>`: 実際に出力する書式を指定します.`format={\null\vfill {\Huge\bfseries #1#2}}`のようにします.`#1`はラベルに,`#2`は見出し文字列に置き換えられます.
-
-### 別行見出し
-`\DeclareBlockHeading`で作成します.`\<命令名>*[running head]{見出し文字列}[副題]`という書式の命令を作成します.設定は以下の通り.
-
-* `font=<命令>`: 見出しのフォントを指定します.
-* `indent=<整数値>` 見出し全体の字下げ量を全角文字数で指定します.
-* `subtitle_font=<命令>`: 副題のフォントを指定します.
-* `pagebreak=[clearpage/cleardoublepage/clearcolumn/nariyuki]`: 見出し直前の改ページを指定します.それぞれ,改ページ,改丁,改段,なりゆきです.
-
-また,行取りの指定を行うことができます.次のいずれかの方法で行います.
-
-* 行数を指定し,その中央に配置する.`lines=<整数値>`により行数を指定します.`before_lines=<整数値>`や`after_lines=<整数値>`により,さらに前後に追加する行数を指定します.たとえば`lines=3,after_lines=1`とすれば,四行の中に配置され,前の空きよりも後ろの空きの方が一行分大きくなります.
-* 行数と,前後いずれかの空きを指定します.`lines=<整数値>`により行数を,`before_space=<寸法>`または`after_space=<寸法>`のいずれかの指定によりそれぞれ前またら後ろの空きを指定します.
-* 前後の空きを指定します.`before_space=<寸法>`および`after_space=<寸法>`を指定します.
-
-### 同行見出し
-`\DeclareRuninHeading`で作成します.`\section`と同様の書式の命令が作成されます.設定は以下の通り.
-
-* `font=<命令>`: 見出しのフォントを指定します.
-* `indent=<整数値>` 見出し文字列全体の字下げ量を全角文字数で指定します.
-
-### 窓見出し
-`\DeclareCutinHeading`で作成します.`\<命令名>{見出し文字列}`という書式の命令を作成します.設定は以下の通り.
-
-* `font=<命令>`: 見出しのフォントを指定します.
-* `indent=<整数値>`: 見出し全体の字下げ量を全角文字数で指定します.
-* `onelinemax=<寸法>`, `twolinemax=<寸法>`: 見出し文字列の長さが`onelinemax`以下ならば一行で,`twolinemax`以下ならば二行で窓見出しを出力します.それ以上の場合は三行です.デフォルトはそれぞれ6文字,20文字の長さ.
-
-### `\ModifyHeading`
-既に(上のどれかを使い)定義された見出し命令の設定を変更します.たとえば
-
-```
-\ModifyHeading{section}{lines=10}
-````
-
-とすると,`\section`のフォントなどの設定はそのままに,行取りのみが10行に変更されます.見出しの種類を変更することはできません.
-
-## ページスタイル
-
-``\DeclarePageStyle{<ページスタイル名>}{<設定>}``
-
-によりページスタイルを定義することができます.設定は以下の通り.
-
-* `nombre-position`,`running_head_position`: ノンブルと柱の位置を指定します.`top-left`のように指定できます.`center/left/right/top/bottom`が使えます.
-* `nombre=<書式>`: 出力するノンブルを指定します.デフォルトは`\thepage`.
-* `odd_running_head=<書式>`,`even_running_head=<書式>`:それぞれ奇数ページ,偶数ページの柱を指定します.`_section`のように`_`から始まる名前を指定すると,対応する見出しを出力します.(`_section`だと現在の`\section`を出力する.)
-
-`\ModifyPageStyle`により既存のページスタイルを改変することが可能です.
-
-## その他
-* クラスオプション`jlreq_warnings`を渡されると,日本語組版処理の要件に反する設定が行われた場合に警告がされます.
-
-## ライセンス
-このパッケージは二条項BSDライセンスの元で配布されています.詳しくは[LICENSE](LICENSE)をご覧ください.
-
-## 履歴
-## CHANGELOG
-* 2017-02-08
-    - 最初のバージョン.
-
+# jlreq
+
+## これは何?
+[日本語組版処理の要件](https://www.w3.org/TR/jlreq/ja/)の実装を試みる[LuaTeX-ja](https://osdn.jp/projects/luatex-ja/wiki/FrontPage) / pLaTeX / upLaTeX用のクラスファイルと,それに必要なJFMの組み合わせです.
+
+## 提供されるもの
+クラスファイルjlreq.clsと,横書きLuaTeX-ja用のJFMであるjfm-jlreq.luaが用意されています.また,縦書きのJFMやpLaTeX / upLaTeX 用のJFMを生成するいくつかのスクリプトがあります.
+
+## インストール
+`make`で必要なJFMを生成してください.その後,
+
+* *.tfm -> $TEXMF/fonts/tfm/public/jlreq
+* *.vf -> $TEXMF/fonts/vf/public/jlreq
+* jfm-jlreq.lua jfm-jlreqv.lua -> $TEXMF/tex/luatex/jlreq
+* jlreq.cls -> $TEXMF/tex/latex/jlreq
+
+と配置します.`make install`とすると,$TEXMF=$TEXMFHOMEとしてこのコピーを行います.
+
+## 使い方
+通常通り
+````
+\documentclass{jlreq}
+````
+とします.これで横書きのarticle相当の文書クラスとなります.エンジンは自動判定されますが,指定する場合はクラスオプションに`platex/uplatex/lualatex`のいずれかを渡してください.縦書きにするには`tate`オプションを渡します.また,reportやbook相当の文書クラスとするには,それぞれ`report`や`book`オプションを渡します.たとえば,縦書きの本を作成するには
+````
+\documentclass[tate,book]{jlreq}
+````
+とします.
+
+その他,`oneside / twoside / onecolumn / twocolumn / titlepage / notitlepage / draft / final / openright / openany / leqno / fleqn`というよくあるオプションを受け付けます.
+
+標準的な文書クラスと同じように中身を書くことができますが,次のような命令が追加 / 拡張されています.
+
+### `\section`
+`\section*[running head]{見出し文字列}[副題]`というように,通常の書式に加えて副題を受け付けられるように拡張されています.その他,`\part`(articleのみ),`\chapter`(book/reportのみ),`\subsection`も副題を受け付けます.(`\subsubsection`も受け付けますが,汚い見た目になります.)
+
+### `\sidenote`
+傍注(縦組みの場合は脚注)を出力します.デフォルトでは`\footnote`と同様の書式となりますが,クラスオプションに`sidenote_type=mark`が指定されている場合,その書式は`\sidenote{該当項目}{注}`となります.たとえば
+````
+刊行できる\sidenote{原稿}{印刷などの方法により……}を入手する仕事である.
+````
+とします.後の説明も参照してください.
+
+デフォルトの基本版面では余白が少なく,実用にはならないかと思います.後の基本版面の設定を参考にしてください.
+
+### `\endnote`
+後注を指定します.`\footnote`と同様の書式です.デフォルトでは,注自身の出力は見出し直前に行われます.この動作はクラスオプションにより制御できます.また`\theendnotes`を実行するとその場に出力をします.
+
+### `\warichu`
+割注を出力します.行分割位置などは自動で計算されます.(複数回のコンパイルが必要.)`\warichu*`ではこれらの位置を手動で指定できます.書式は
+
+``\warichu*{(一行目前) & (一行目後)\\ (二行目前) & (二行目後)...}``
+
+です.`&`が省略されている場合は自動で調整されます.
+
+### `\jlreqsetup`
+設定用命令です.プリアンブルでしか使えません.文書に対する殆どの設定はクラスオプションにより行いますが,一部の設定はこの命令を通じて行います.
+
+### その他
+* ルビは提供されません.[PXrubrica](https://github.com/zr-tex8r/PXrubrica)またはluatexja-ruby(LuaTeX利用時のみ,LuaTeX-jaパッケージに付属)を使うと良いかと思います.
+* 日本語組版処理の要件2.3.2.dによれば,二段組の最後のページの各段の行数は揃えることが望ましいとされていますが,この処理は行われません.`nidanfloat`パッケージを使い,
+````
+\usepackage[balance]{nidanfloat}
+````
+とするとこの処理が行われます.ただし,最終ページでの`\newpage`や`\clearpage`が正しく動作しません.詳しくは`nidanfloat`パッケージのマニュアルをご覧ください.
+
+## 各種設計
+設計はクラスオプションまたは`\jlreqsetup`によりkeyval形式で行います.以下では次の用法を使います.
+
+* `[A/B]`: AまたはBです.`[A/B/C]`等も同様.
+* `<寸法>`: TeXが認識する寸法です.簡単な式(10pt+10ptのような)を使うこともできます.また,場合によっては次のような特殊な値を使うこともできます.
+	* `Q`: 0.25mmと解釈されます.
+	* `zh`, `zw`: 全角幅として解釈されます.
+
+たとえば`Q`が利用可能な場合は`<寸法;Q>`のように記述します.
+
+
+### 基本版面
+すべてクラスファイルへのオプションです.
+
+* `paper=[<紙サイズ名>/{<寸法>,<寸法>}]`:紙サイズです.紙サイズ名はa0からa10,b0からb10,c2からc8を指定できます.B列はJIS B列です.また,`{<縦>,<横>}`と直接寸法を指定することもできます.
+* `fontsize=<寸法;Q>` : フォントサイズ.デフォルトは10pt.
+* `line_length=<寸法;zw,zh>` : 一行の長さ.デフォルトは紙の縦幅の0.75倍.実際の値は一文字の長さの整数倍になるように補正されます.
+* `number_of_lines=<整数値>` : 一ページの行数.デフォルトは紙の横幅の0.75倍になるような値.
+* `gutter=<寸法;zh,zw>` : のどの余白の大きさ.
+    - `tate`無指定時は奇数ページ左,偶数ページ右の余白
+    - `tate`指定時は奇数ページ右,偶数ページ左の余白
+    - `twoside`が指定されていない時は,常に奇数ページ扱いで余白が設定される
+* `head_space=<寸法;zh,zw>` : 天の空き量.デフォルトは中央寄せになるような値.
+* `foot_space=<寸法;zh,zw>` : 地の空き量.デフォルトは中央寄せになるような値.
+* `baselineskip=<寸法;Q,zh,zw>` : 行送り.デフォルトはfontsizeの1.7倍.
+* `linegap=<寸法;Q,zh,zw>` : 行間.
+* `headfoot_sidemargin=<寸法;zw,zh>`:柱やノンブルの左右の空き.
+* `column_gap=<寸法;zw,zh>`: 段間(twocolumn指定時のみ).
+
+### 組み方
+* `open_bracket_pos=[zenkaku_tentsuki/zenkakunibu_nibu/nibu_tentsuki]`: 始め括弧が行頭に来た際の配置方法を指定します.それぞれ段落開始全角折り返し行頭天付き(デフォルト),段落開始全角二分折り返し行頭二分,段落開始二分折り返し行頭天付きを意味します.
+* `hanging_punctuation`: ぶら下げ組をします.
+
+### 注関係
+* `reference_mark=[inline/interlinear]`: 合印の配置方法を指定します.`inline`にすると該当項目の後ろの行中に配置します.`interlinear`を指定すると該当項目の上(横組)または右(縦組)に配置します.
+* `sidenote_type=[number/symbol]`: 傍注と本文との対応の方法を指定します.`number`が規定で,注の位置に通し番号が入り,それにより対応が示されます.`symbol`とすると,注の位置に特定の記号が入り,また注がついている単語が強調されます.ここに入る記号と単語の強調は`\jlreqsetup`に次を渡すことで指定します.
+
+    - `sidenote_symbol`: 注の位置に入る記号.デフォルト*
+    - `sidenote_keyword_font`: 注のついている単語のフォント命令.デフォルトは無し(強調しない)
+
+* `sidenote_width=<寸法;zh,zw>`: 傍注の幅を指定します.基本版面の設定に合わせて設定してください.
+* `endnote_position=[headings/paragraph/{_<見出し名1>,_<見出し名2>,...}]`:後注の出力場所を指定します.`headings`は各見出しの直前(デフォルト),`paragraph`は改段落の際に出力します.また,`endnote_position={_chapter,_section}`とすると,`\chapter`と`\section`の直前に出力します.
+
+### キャプション
+図表のキャプションを`\jlreqsetup`で変更できます.
+* `caption_font=<命令>`: キャプション自身のフォントを指定します.
+* `caption_label_font=<命令>`: キャプションのラベルのフォントを指定します.
+
+
+## 見出し
+見出しの設定は,`\Declare***Heading`という命令で行います(***には見出しの種類に応じた文字列が入る).書式はすべて
+
+```
+\Declare****Heading{<命令名>}{<レベル>}{<設定>}
+```
+
+となっています.また,`\New***Heading`,`\Renew***Heading`,`\Provide***Heading`も同時に用意されます.それぞれ`\newcommand`,`\renewcommand`,`\providecommand`に対応した動きをします.
+
+### 扉見出し
+`\DeclareTobiraHeading`で作成します.通常のクラスファイルにおける`\section`等と同じ書式の命令ができます.設定は以下の通り.
+
+* `type=[han/naka]`: `han`だと半扉見出しを,`naka`だと中扉見出しを作ります.
+* `pagestyle=<ページスタイル>`: 見出し箇所のページスタイルを指定します.
+* `label_format=<書式>`: ラベルを出力する命令を指定します.たとえば`label_format={第\thechapter 章}`のように指定します.
+* `format=<書式>`: 実際に出力する書式を指定します.`format={\null\vfill {\Huge\bfseries #1#2}}`のようにします.`#1`はラベルに,`#2`は見出し文字列に置き換えられます.
+
+### 別行見出し
+`\DeclareBlockHeading`で作成します.`\<命令名>*[running head]{見出し文字列}[副題]`という書式の命令を作成します.設定は以下の通り.
+
+* `font=<命令>`: 見出しのフォントを指定します.
+* `indent=<整数値>` 見出し全体の字下げ量を全角文字数で指定します.
+* `subtitle_font=<命令>`: 副題のフォントを指定します.
+* `pagebreak=[clearpage/cleardoublepage/clearcolumn/nariyuki]`: 見出し直前の改ページを指定します.それぞれ,改ページ,改丁,改段,なりゆきです.
+
+また,行取りの指定を行うことができます.次のいずれかの方法で行います.
+
+* 行数を指定し,その中央に配置する.`lines=<整数値>`により行数を指定します.`before_lines=<整数値>`や`after_lines=<整数値>`により,さらに前後に追加する行数を指定します.たとえば`lines=3,after_lines=1`とすれば,四行の中に配置され,前の空きよりも後ろの空きの方が一行分大きくなります.
+* 行数と,前後いずれかの空きを指定します.`lines=<整数値>`により行数を,`before_space=<寸法>`または`after_space=<寸法>`のいずれかの指定によりそれぞれ前またら後ろの空きを指定します.
+* 前後の空きを指定します.`before_space=<寸法>`および`after_space=<寸法>`を指定します.
+
+### 同行見出し
+`\DeclareRuninHeading`で作成します.`\section`と同様の書式の命令が作成されます.設定は以下の通り.
+
+* `font=<命令>`: 見出しのフォントを指定します.
+* `indent=<整数値>` 見出し文字列全体の字下げ量を全角文字数で指定します.
+
+### 窓見出し
+`\DeclareCutinHeading`で作成します.`\<命令名>{見出し文字列}`という書式の命令を作成します.設定は以下の通り.
+
+* `font=<命令>`: 見出しのフォントを指定します.
+* `indent=<整数値>`: 見出し全体の字下げ量を全角文字数で指定します.
+* `onelinemax=<寸法>`, `twolinemax=<寸法>`: 見出し文字列の長さが`onelinemax`以下ならば一行で,`twolinemax`以下ならば二行で窓見出しを出力します.それ以上の場合は三行です.デフォルトはそれぞれ6文字,20文字の長さ.
+
+### `\ModifyHeading`
+既に(上のどれかを使い)定義された見出し命令の設定を変更します.たとえば
+```
+\ModifyHeading{section}{lines=10}
+````
+とすると,`\section`のフォントなどの設定はそのままに,行取りのみが10行に変更されます.見出しの種類を変更することはできません.
+
+## ページスタイル
+
+````
+\DeclarePageStyle{<ページスタイル名>}{<設定>}
+````
+によりページスタイルを定義することができます.設定は以下の通り.
+
+* `nombre_position`,`running_head_position`: ノンブルと柱の位置を指定します.`top-left`のように指定できます.`center/left/right/top/bottom`が使えます.
+* `nombre=<書式>`: 出力するノンブルを指定します.デフォルトは`\thepage`.
+* `odd_running_head=<書式>`,`even_running_head=<書式>`:それぞれ奇数ページ,偶数ページの柱を指定します.`_section`のように`_`から始まる名前を指定すると,対応する見出しを出力します.(`_section`だと現在の`\section`を出力する.)
+
+`\ModifyPageStyle`により既存のページスタイルを改変することが可能です.
+
+## その他
+* クラスオプション`jlreq_warnings`を渡されると,日本語組版処理の要件に反する設定が行われた場合に警告がされます.
+
+## ライセンス
+このパッケージは二条項BSDライセンスの元で配布されています.詳しくは[LICENSE](LICENSE)をご覧ください.
+
+## 履歴
+* 2017-02-08
+    - 最初のバージョン.
+* 2017-02-17
+    - いくつかバグを修正.
+    - クラスオプション/`\jlreqsetup`にいくつかのキーを追加/変更.
+    - `abstract`環境を実装.
+    - パッケージを読み込んでいるだけのはやめた.

Added: trunk/Master/texmf-dist/doc/latex/jlreq/README.html
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jlreq/README.html	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/jlreq/README.html	2017-02-17 22:27:03 UTC (rev 43259)
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <meta http-equiv="Content-Style-Type" content="text/css" />
+  <meta name="generator" content="pandoc" />
+  <title></title>
+  <style type="text/css">code{white-space: pre;}</style>
+  <link href="data:text/css;charset=utf-8,body%20%7B%0Afont%2Dfamily%3A%20Helvetica%2C%20arial%2C%20sans%2Dserif%3B%0Afont%2Dsize%3A%2014px%3B%0Aline%2Dheight%3A%201%2E6%3B%0Apadding%2Dtop%3A%2010px%3B%0Apadding%2Dbottom%3A%2010px%3B%0Abackground%2Dcolor%3A%20white%3B%0Apadding%3A%2030px%3B%20%7D%0Abody%20%3E%20%2A%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%20%21important%3B%20%7D%0Abody%20%3E%20%2A%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%20%21important%3B%20%7D%0Aa%20%7B%0Acolor%3A%20%234183C4%3B%20%7D%0Aa%2Eabsent%20%7B%0Acolor%3A%20%23cc0000%3B%20%7D%0Aa%2Eanchor%20%7B%0Adisplay%3A%20block%3B%0Apadding%2Dleft%3A%2030px%3B%0Amargin%2Dleft%3A%20%2D30px%3B%0Acursor%3A%20pointer%3B%0Aposition%3A%20absolute%3B%0Atop%3A%200%3B%0Aleft%3A%200%3B%0Abottom%3A%200%3B%20%7D%0Ah1%2C%20h2%2C%20h3%2C%20h4%2C%20h5%2C%20h6%20%7B%0Amargin%3A%2020px%200%2010px%3B%0Apadding%3A%200%3B%0Afont%2Dweight%3A%20bold%3B%0A%2Dwebkit%2Dfont%2Dsmoothing%3A%20antialiased%3B%0Acursor%3A%20text%3B%0Aposition%3A%20relative%3B%20%7D%0Ah1%3Ahover%20a%2Eanchor%2C%20h2%3Ahover%20a%2Eanchor%2C%20h3%3Ahover%20a%2Eanchor%2C%20h4%3Ahover%20a%2Eanchor%2C%20h5%3Ahover%20a%2Eanchor%2C%20h6%3Ahover%20a%2Eanchor%20%7B%0A%0Atext%2Ddecoration%3A%20none%3B%20%7D%0Ah1%20tt%2C%20h1%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah2%20tt%2C%20h2%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah3%20tt%2C%20h3%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah4%20tt%2C%20h4%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah5%20tt%2C%20h5%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah6%20tt%2C%20h6%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah1%20%7B%0Afont%2Dsize%3A%2028px%3B%0Acolor%3A%20black%3B%20%7D%0Ah2%20%7B%0Afont%2Dsize%3A%2024px%3B%0Aborder%2Dbottom%3A%201px%20solid%20%23cccccc%3B%0Acolor%3A%20black%3B%20%7D%0Ah3%20%7B%0Afont%2Dsize%3A%2018px%3B%20%7D%0Ah4%20%7B%0Afont%2Dsize%3A%2016px%3B%20%7D%0Ah5%20%7B%0Afont%2Dsize%3A%2014px%3B%20%7D%0Ah6%20%7B%0Acolor%3A%20%23777777%3B%0Afont%2Dsize%3A%2014px%3B%20%7D%0Ap%2C%20b!
 lockquote%2C%20ul%2C%20ol%2C%20dl%2C%20li%2C%20table%2C%20pre%20%7B%0Amargin%3A%2015px%200%3B%20%7D%0Ahr%20%7B%0A%0Aborder%3A%200%20none%3B%0Acolor%3A%20%23cccccc%3B%0Aheight%3A%204px%3B%0Apadding%3A%200%3B%20%7D%0Abody%20%3E%20h2%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Abody%20%3E%20h1%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Abody%20%3E%20h1%3Afirst%2Dchild%20%2B%20h2%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Abody%20%3E%20h3%3Afirst%2Dchild%2C%20body%20%3E%20h4%3Afirst%2Dchild%2C%20body%20%3E%20h5%3Afirst%2Dchild%2C%20body%20%3E%20h6%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Aa%3Afirst%2Dchild%20h1%2C%20a%3Afirst%2Dchild%20h2%2C%20a%3Afirst%2Dchild%20h3%2C%20a%3Afirst%2Dchild%20h4%2C%20a%3Afirst%2Dchild%20h5%2C%20a%3Afirst%2Dchild%20h6%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Ah1%20p%2C%20h2%20p%2C%20h3%20p%2C%20h4%20p%2C%20h5%20p%2C%20h6%20p%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Ali%20p%2Efirst%20%7B%0Adisplay%3A%20inline%2Dblock%3B%20%7D%0Aul%2C%20ol%20%7B%0Apadding%2Dleft%3A%2030px%3B%20%7D%0Aul%20%3Afirst%2Dchild%2C%20ol%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Aul%20%3Alast%2Dchild%2C%20ol%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Adl%20%7B%0Apadding%3A%200%3B%20%7D%0Adl%20dt%20%7B%0Afont%2Dsize%3A%2014px%3B%0Afont%2Dweight%3A%20bold%3B%0Afont%2Dstyle%3A%20italic%3B%0Apadding%3A%200%3B%0Amargin%3A%2015px%200%205px%3B%20%7D%0Adl%20dt%3Afirst%2Dchild%20%7B%0Apadding%3A%200%3B%20%7D%0Adl%20dt%20%3E%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Adl%20dt%20%3E%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Adl%20dd%20%7B%0Amargin%3A%200%200%2015px%3B%0Apadding%3A%200%2015px%3B%20%7D%0Adl%20dd%20%3E%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Adl%20dd%20%3E%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Ablockquote%20%7B%0Aborder%2Dleft%3A%204px%20solid%20%23dddddd%3B%0Ap!
 adding%3A%200%2015px%3B%0Acolor%3A%20%23777777%3B%20%7D%0Ablockquote%20%3E%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Ablockquote%20%3E%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Atable%20%7B%0Apadding%3A%200%3B%20%7D%0Atable%20tr%20%7B%0Aborder%2Dtop%3A%201px%20solid%20%23cccccc%3B%0Abackground%2Dcolor%3A%20white%3B%0Amargin%3A%200%3B%0Apadding%3A%200%3B%20%7D%0Atable%20tr%3Anth%2Dchild%282n%29%20%7B%0Abackground%2Dcolor%3A%20%23f8f8f8%3B%20%7D%0Atable%20tr%20th%20%7B%0Afont%2Dweight%3A%20bold%3B%0Aborder%3A%201px%20solid%20%23cccccc%3B%0Atext%2Dalign%3A%20left%3B%0Amargin%3A%200%3B%0Apadding%3A%206px%2013px%3B%20%7D%0Atable%20tr%20td%20%7B%0Aborder%3A%201px%20solid%20%23cccccc%3B%0Atext%2Dalign%3A%20left%3B%0Amargin%3A%200%3B%0Apadding%3A%206px%2013px%3B%20%7D%0Atable%20tr%20th%20%3Afirst%2Dchild%2C%20table%20tr%20td%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Atable%20tr%20th%20%3Alast%2Dchild%2C%20table%20tr%20td%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Aimg%20%7B%0Amax%2Dwidth%3A%20100%25%3B%20%7D%0Aspan%2Eframe%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%20%7D%0Aspan%2Eframe%20%3E%20span%20%7B%0Aborder%3A%201px%20solid%20%23dddddd%3B%0Adisplay%3A%20block%3B%0Afloat%3A%20left%3B%0Aoverflow%3A%20hidden%3B%0Amargin%3A%2013px%200%200%3B%0Apadding%3A%207px%3B%0Awidth%3A%20auto%3B%20%7D%0Aspan%2Eframe%20span%20img%20%7B%0Adisplay%3A%20block%3B%0Afloat%3A%20left%3B%20%7D%0Aspan%2Eframe%20span%20span%20%7B%0Aclear%3A%20both%3B%0Acolor%3A%20%23333333%3B%0Adisplay%3A%20block%3B%0Apadding%3A%205px%200%200%3B%20%7D%0Aspan%2Ealign%2Dcenter%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Aclear%3A%20both%3B%20%7D%0Aspan%2Ealign%2Dcenter%20%3E%20span%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Amargin%3A%2013px%20auto%200%3B%0Atext%2Dalign%3A%20center%3B%20%7D%0Aspan%2Ealign%2Dcenter%20span%20img%20%7B%0Amargin%3A%200%20auto%3B%0Atext%2Dalign%3A%20center%3B%20%7D%0Aspan%2Ealign%2Dright%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3!
 A%20hidden%3B%0Aclear%3A%20both%3B%20%7D%0Aspan%2Ealign%2Dright%20%3E%20span%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Amargin%3A%2013px%200%200%3B%0Atext%2Dalign%3A%20right%3B%20%7D%0Aspan%2Ealign%2Dright%20span%20img%20%7B%0Amargin%3A%200%3B%0Atext%2Dalign%3A%20right%3B%20%7D%0Aspan%2Efloat%2Dleft%20%7B%0Adisplay%3A%20block%3B%0Amargin%2Dright%3A%2013px%3B%0Aoverflow%3A%20hidden%3B%0Afloat%3A%20left%3B%20%7D%0Aspan%2Efloat%2Dleft%20span%20%7B%0Amargin%3A%2013px%200%200%3B%20%7D%0Aspan%2Efloat%2Dright%20%7B%0Adisplay%3A%20block%3B%0Amargin%2Dleft%3A%2013px%3B%0Aoverflow%3A%20hidden%3B%0Afloat%3A%20right%3B%20%7D%0Aspan%2Efloat%2Dright%20%3E%20span%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Amargin%3A%2013px%20auto%200%3B%0Atext%2Dalign%3A%20right%3B%20%7D%0Acode%2C%20tt%20%7B%0Amargin%3A%200%202px%3B%0Apadding%3A%200%205px%3B%0Awhite%2Dspace%3A%20nowrap%3B%0Aborder%3A%201px%20solid%20%23eaeaea%3B%0Abackground%2Dcolor%3A%20%23f8f8f8%3B%0Aborder%2Dradius%3A%203px%3B%20%7D%0Apre%20code%20%7B%0Amargin%3A%200%3B%0Apadding%3A%200%3B%0Awhite%2Dspace%3A%20pre%3B%0Aborder%3A%20none%3B%0Abackground%3A%20transparent%3B%20%7D%0A%2Ehighlight%20pre%20%7B%0Abackground%2Dcolor%3A%20%23f8f8f8%3B%0Aborder%3A%201px%20solid%20%23cccccc%3B%0Afont%2Dsize%3A%2013px%3B%0Aline%2Dheight%3A%2019px%3B%0Aoverflow%3A%20auto%3B%0Apadding%3A%206px%2010px%3B%0Aborder%2Dradius%3A%203px%3B%20%7D%0Apre%20%7B%0Abackground%2Dcolor%3A%20%23f8f8f8%3B%0Aborder%3A%201px%20solid%20%23cccccc%3B%0Afont%2Dsize%3A%2013px%3B%0Aline%2Dheight%3A%2019px%3B%0Aoverflow%3A%20auto%3B%0Apadding%3A%206px%2010px%3B%0Aborder%2Dradius%3A%203px%3B%20%7D%0Apre%20code%2C%20pre%20tt%20%7B%0Abackground%2Dcolor%3A%20transparent%3B%0Aborder%3A%20none%3B%20%7D%0A" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<h1 id="jlreq">jlreq</h1>
+<h2 id="what-is-this">What is this?</h2>
+<p>This package provides the class file and JFM (Japanese font metric) files for LuaTeX-ja / pLaTeX / upLaTeX. This aims to implement <a href="https://www.w3.org/TR/jlreq/">Requirements for Japanese Text Layout</a>.</p>
+<h2 id="installation">Installation</h2>
+<p>Run <code>make</code>, then JFM files are created. Move the files as follows:</p>
+<ul>
+<li>*.tfm -> $TEXMF/fonts/tfm/public/jlreq</li>
+<li>*.vf -> $TEXMF/fonts/vf/public/jlreq</li>
+<li>jfm-jlreq.lua jfm-jlreqv.lua -> $TEXMF/tex/luatex/jlreq</li>
+<li>jlreq.cls -> $TEXMF/tex/latex/jlreq</li>
+</ul>
+<p><code>make install</code> will do this where $TEXMF=$TEXMFHOME</p>
+<h2 id="usage">Usage</h2>
+<p>See <a href="README-ja.md" class="uri">README-ja.md</a> (in Japanese).</p>
+<h2 id="license">LICENSE</h2>
+<p>This package is distributed under the BSD 2-Clause License. See <a href="LICENSE" class="uri">LICENSE</a>.</p>
+<h2 id="changelog">CHANGELOG</h2>
+<ul>
+<li>2017-02-08
+<ul>
+<li>First release.</li>
+</ul></li>
+<li>2017-02-17
+<ul>
+<li>Fix bugs.</li>
+<li>Implement <code>abstract</code> environment.</li>
+<li>Change/Add some keys to class option/<code>\jlreqsetup</code></li>
+<li>Stop to load <code>pxrubirica</code>, <code>luatexja-ruby</code> and <code>nidanfloat</code>.</li>
+</ul></li>
+</ul>
+</body>
+</html>

Modified: trunk/Master/texmf-dist/doc/latex/jlreq/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jlreq/README.md	2017-02-17 10:54:19 UTC (rev 43258)
+++ trunk/Master/texmf-dist/doc/latex/jlreq/README.md	2017-02-17 22:27:03 UTC (rev 43259)
@@ -1,25 +1,29 @@
-# jlreq
-
-## What is this?
-This package provides the class file and JFM (Japanese font metric) files for LuaTeX-ja / pLaTeX / upLaTeX. This aims to implement [Requirements for Japanese Text Layout](https://www.w3.org/TR/jlreq/).
-
-## Installation
-Run `make`, then JFM files are created. Move the files as follows:
-
-* *.tfm -> $TEXMF/fonts/tfm/public/jlreq
-* *.vf -> $TEXMF/fonts/vf/public/jlreq
-* jfm-jlreq.lua jfm-jlreqv.lua -> $TEXMF/tex/luatex/jlreq
-* jlreq.cls -> $TEXMF/tex/latex/jlreq
-
-`make install` will do this where $TEXMF=$TEXMFHOME
-
-## Usage
-See [README-ja.md](README-ja.md) (in Japanese).
-
-## LICENSE
-This package is distributed under the BSD 2-Clause License. See [LICENSE](LICENSE).
-
-## CHANGELOG
-* 2017-02-08
-    - First release
-
+# jlreq
+
+## What is this?
+This package provides the class file and JFM (Japanese font metric) files for LuaTeX-ja / pLaTeX / upLaTeX. This aims to implement [Requirements for Japanese Text Layout](https://www.w3.org/TR/jlreq/).
+
+## Installation
+Run `make`, then JFM files are created. Move the files as follows:
+
+* *.tfm -> $TEXMF/fonts/tfm/public/jlreq
+* *.vf -> $TEXMF/fonts/vf/public/jlreq
+* jfm-jlreq.lua jfm-jlreqv.lua -> $TEXMF/tex/luatex/jlreq
+* jlreq.cls -> $TEXMF/tex/latex/jlreq
+
+`make install` will do this where $TEXMF=$TEXMFHOME
+
+## Usage
+See [README-ja.md](README-ja.md) (in Japanese).
+
+## LICENSE
+This package is distributed under the BSD 2-Clause License. See [LICENSE](LICENSE).
+
+## CHANGELOG
+* 2017-02-08
+    - First release.
+* 2017-02-17
+    - Fix bugs.
+    - Implement `abstract` environment.
+    - Change/Add some keys to class option/`\jlreqsetup`
+    - Stop to load `pxrubirica`, `luatexja-ruby` and `nidanfloat`.

Modified: trunk/Master/texmf-dist/tex/latex/jlreq/jlreq.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/jlreq/jlreq.cls	2017-02-17 10:54:19 UTC (rev 43258)
+++ trunk/Master/texmf-dist/tex/latex/jlreq/jlreq.cls	2017-02-17 22:27:03 UTC (rev 43259)
@@ -1,3525 +1,3567 @@
-%% Japanese document class based on requirements for Japanese text layout
-%% 
-%% The package is distributed under the BSD 2-Clause License
-%%
-%%
-% (based on JLREQ 20120403 https://www.w3.org/TR/2012/NOTE-jlreq-20120403/ja/)
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{jlreq}[2017/02/08 jlreq]
-\RequirePackage{xkeyval,everyhook,filehook,etoolbox,ifthen}
-
-%. helper1
-\newdimen\jlreq at tempdima
-\newdimen\jlreq at tempdimb
-\newdimen\jlreq at tempdimc
-\newskip\jlreq at tempskipa
-\newskip\jlreq at tempskipb
-\newskip\jlreq at tempskipc
-\newif\ifjlreq at tempa
-\newif\ifjlreq at tempb
-\newif\ifjlreq at tempc
-\newbox\jlreq at tempboxa
-\newbox\jlreq at tempboxb
-\newbox\jlreq at tempboxc
-% 計算結果を返すための変数
-\newdimen\jlreq at resultdimen
-\newbox\jlreq at resultbox
-
-\def\jlreq at uniqtoken{\jlreq at uniqtoken}
-\def\jlreq at endmark{\jlreq at endmark}
-
-% 与えられたトークン列が空か(展開はしないでチェック)
-\long\def\jlreq at helper@ifempty at getfirsttoken#1#2\jlreq at uniqtoken{#1}
-\long\def\jlreq at ifempty#1{\expandafter\ifx\jlreq at helper@ifempty at getfirsttoken#1\jlreq at uniqtoken\jlreq at uniqtoken\jlreq at uniqtoken\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-% #1が\jlreq at endmarkか
-\long\def\jlreq at helper@ifendmark at getfirsttoken#1#2\jlreq at endmark{#1}
-\long\def\jlreq at ifendmark#1{\expandafter\ifx\jlreq at helper@ifendmark at getfirsttoken#1\jlreq at endmark\jlreq at endmark\@empty\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-
-% @removeelementの括弧があっても動くかもしれない版
-% 次の変数を使う:\jlreq at tempa:消したいやつ,\jlreq at tempb:今処理している部分.
-\def\jlreq at helper@removeelement#1#2#3{%
-  \begingroup
-    \def\jlreq at tempb{}%
-    \def\jlreq at tempa{#1}%
-    \def#3{}%
-    \jlreq at helper@removeelement@#3#2{\jlreq at endmark}%
-    \edef\jlreq at do{\unexpanded{\def#3}{\expandonce{#3}}}%
-  \expandafter\endgroup
-  \jlreq at do
-}
-% 最初のグルーピングの前までを取得し,@@に回す.グルーピング以降は@@@で処理する
-\def\jlreq at helper@removeelement@#1#2#{%
-  \jlreq at helper@removeelement@@{#1}{#2}%
-  \jlreq at helper@removeelement@@@{#1}%
-}
-% #1をカンマで区切り,既に得ていた\jlreq at tempbと併せて一つの部分を作る.
-\def\jlreq at helper@removeelement@@#1#2{%
-  \jlreq at helper@dividebycomma{#2}%
-  \edef\jlreq at tempb{\expandonce{\jlreq at tempb}\expandonce{\jlreq at tempc}}%
-  \ifjlreq at tempa
-    \ifx\jlreq at tempa\jlreq at tempb\else
-      \ifx#1\@empty\edef#1{\expandonce{\jlreq at tempb}}%
-      \else\edef#1{\expandonce{#1},\expandonce{\jlreq at tempb}}\fi
-    \fi
-    \def\jlreq at tempb{}%
-    \expandafter\jlreq at helper@removeelement@@\expandafter#1\expandafter{\jlreq at tempd}%
-  \fi
-}
-% グルーピング部分を\jlreq at tempbに加え,@に戻る
-\def\jlreq at helper@removeelement@@@#1#2{%
-  \jlreq at ifendmark{#2}{%
-    % 全体の解釈が終わった
-    \ifx\jlreq at tempa\jlreq at tempb\else
-      \ifx#1\@empty\edef#1{\expandonce{\jlreq at tempb}}%
-      \else\edef#1{\expandonce{#1},\expandonce{\jlreq at tempb}}\fi
-    \fi
-  }{%
-    \edef\jlreq at tempb{\expandonce{\jlreq at tempb}{#2}}%
-    \def\jlreq at next{\jlreq at helper@removeelement@{#1}}%
-    \expandafter\jlreq at next
-  }%
-}
-% カンマで区切って,その前と後ろを\jlreq at tempc,\jlreq at tempdに入れる
-% もしカンマがない場合は\ifjlreq at tempaがfalseになる.
-\def\jlreq at helper@dividebycomma#1{\jlreq at helper@dividebycomma@#1,\jlreq at endmark}
-\def\jlreq at helper@dividebycomma@#1,#2\jlreq at endmark{%
-  \def\jlreq at tempc{#1}%
-  \def\jlreq at tempd{#2}%
-  \ifx\jlreq at tempd\@empty\jlreq at tempafalse\else\jlreq at tempatrue\expandafter\def\expandafter\jlreq at tempd\expandafter{\jlreq at helper@removelastcomma#2\jlreq at endmark}\fi
-}
-\def\jlreq at helper@removelastcomma#1,\jlreq at endmark{#1}
-
-\long\def\jlreq at deleteuntileendmark#1\jlreq at endmark{}
-
-% #1が#2のトークン内と\ifxで一致すれば#3を,そうでなければ#4を実行する.
-% #2は\edefで展開する.
-\def\jlreq at ifintokenlist#1#2{%
-  \begingroup
-    \jlreq at tempafalse
-    \edef\@tempa{#2}%
-    \expandafter\jlreq at helper@ifintokenlist@\expandafter{\@tempa}{#1}%
-    \ifjlreq at tempa\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
-      {\def\jlreq at do{\@firstoftwo}}{\def\jlreq at do{\@secondoftwo}}%
-  \expandafter\endgroup
-  \jlreq at do
-}
-\def\jlreq at helper@ifintokenlist@#1#2{%
-  \jlreq at helper@ifintokenlist@@{#2}#1\jlreq at endmark
-}
-\def\jlreq at helper@ifintokenlist@@#1#2{%
-  \jlreq at ifendmark{#2}{%
-    \def\jlreq at next{}%
-  }{%
-    \ifx#1#2\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
-      {\jlreq at tempatrue\def\jlreq at next{\jlreq at deleteuntileendmark}}%
-      {\def\jlreq at next{\jlreq at helper@ifintokenlist@@{#1}}}%
-  }%
-  \jlreq at next
-}
-
-% vbox #1の最後を\jlreq at resultboxに入れる
-% #1の最後の行は消える
-\newcommand*{\jlreq at getlastbox}[1]{%
-  \setbox#1=\vbox{\unvbox#1\relax
-    \unskip\unskip\unpenalty\global\setbox\jlreq at resultbox=\lastbox}%
-  \ifhbox\jlreq at resultbox
-    \global\setbox\jlreq at resultbox=\hbox{%
-      \unhbox\jlreq at resultbox\unskip\unskip\unpenalty}%
-  \else
-    \global\setbox\jlreq at resultbox=\copy\voidb at x
-  \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}}
-%  *{key}{\def\val{#1}} % デフォルト値を空文字列にする
-%  {key}[choice1,choice2]{\def\valchoice{#1}}
-%}{parse対象}
-\def\jlreq at parsekeyval{%
-  \@ifstar{\jlreq at helper@parsekeyval@{*}}{\jlreq at helper@parsekeyval@{}}%
-}
-\def\jlreq at helper@parsekeyval@#1{%
-  \@ifnextchar[{\jlreq at helper@parsekeyval@@{#1}}{\jlreq at helper@parsekeyval@@{#1}[jlreq at key]}%
-}
-\long\def\jlreq at helper@parsekeyval@@#1[#2]#3#4{%
-  \begingroup
-    \def\jlreq at do{}%
-    \jlreq at helper@parsekeyval@@@{#2}#3{\jlreq at endmark}%
-    \setkeys#1{#2}{#4}%
-  \expandafter\endgroup
-  \jlreq at do
-}
-\def\jlreq at helper@parsekeyval@@@#1#2#{\jlreq at helper@parsekeyval@@@@{#1}#2\jlreq at endmark}%
-\def\jlreq at helper@parsekeyval@@@@#1#2{%
-  \jlreq at ifendmark{#2}{%
-    \def\@tempa{\jlreq at helper@parsekeyval@@@@@{#1}}%
-  }{%
-    \def\@tempa{\expandafter\@tempb\jlreq at deleteuntileendmark}%
-    \ifx *#2%
-      \def\@tempb{\jlreq at helper@parsekeyval@@@definekeywithdefault{#1}}%
-    \else
-      \def\@tempb{\jlreq at helper@parsekeyval@@@@@{#1}}%
-    \fi
-  }%
-  \@tempa
-}
-
-\long\def\jlreq at helper@parsekeyval@@@@@#1#2{%
-  \jlreq at ifendmark{#2}{%
-    \def\@tempa{}%
-  }{%
-    \def\@tempa{%
-      \@ifnextchar[{\jlreq at helper@parsekeyval@@@choicekey{#1}{#2}}{\jlreq at helper@parsekeyval@@@definekey{#1}{#2}}%
-    }%
-  }%
-  \@tempa
-}
-\long\def\jlreq at helper@parsekeyval@@@choicekey#1#2[#3]#4{%
-  \define at choicekey{#1}{#2}{#3}{\appto\jlreq at do{#4}}%
-  \jlreq at helper@parsekeyval@@@{#1}%
-}
-\long\def\jlreq at helper@parsekeyval@@@definekeywithdefault#1#2#3{%
-  \define at key{#1}{#2}[]{\appto\jlreq at do{#3}}%
-  \jlreq at helper@parsekeyval@@@{#1}%
-}
-\long\def\jlreq at helper@parsekeyval@@@definekey#1#2#3{%
-  \define at key{#1}{#2}{\appto\jlreq at do{#3}}%
-  \jlreq at helper@parsekeyval@@@{#1}%
-}
-
-% #1のboxを今の真ん中に配置する.
-\def\jlreq at box@putcenter#1{%
-  \begingroup
-    \jlreq at tempdima=\dimexpr(\ht#1 - \dp#1)/2\relax
-    \setbox\jlreq at tempboxa=\hbox{あ}%
-    \edef\jlreq at do{%
-      \noexpand\lower\the\dimexpr(\jlreq at tempdima - (\ht\jlreq at tempboxa - \dp\jlreq at tempboxa)/2)\relax\unexpanded{\box#1}%
-    }%
-  \expandafter\endgroup
-  \jlreq at do
-}
-
-% \jlreq at switch{str}{
-%   {str}{abcd}
-%   {str1}{xyz}
-%}[default: input = #1] -> abcd
-%または
-%
-% \jlreq at switch{str}{
-%   {str}{abcd}
-%   {str1}{xyz}
-%   {default} % ここは#1を受け付けない(パラメータトークンを受け付けたい場合のため).
-%} -> abcd
-% 文字列比較→\edefして比較する
-\long\def\jlreq at helper@switch at executeoption#1[#2]{%
-  \begingroup
-    \def\jlreq at do##1{#2}%
-  \expandafter\endgroup
-  \jlreq at do{#1}%
-}
-\long\def\jlreq at helper@removeoption[#1]{}
-\long\def\jlreq at switch#1#2{%
-  \begingroup
-    \let\jlreq at do\@undefined
-    \jlreq at helper@switch@{#1}#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}{}}}%
-    \fi
-  \expandafter\endgroup
-  \jlreq at do
-}
-\long\def\jlreq at helper@switch@#1#2{%
-  \jlreq at ifendmark{#2}{%
-    \def\jlreq at next{}%
-  }{%
-    \edef\jlreq at next{\unexpanded{\jlreq at helper@switch@@{#1}{#2}}}%
-  }%
-  \jlreq at next
-}
-\long\def\jlreq at helper@switch@@#1#2#3{%
-  \jlreq at ifendmark{#3}{%
-    \edef\jlreq at do{\unexpanded{#2}}%
-    \def\jlreq at next{}%
-  }{%
-    \edef\jlreq at tempa{#1}%
-    \edef\jlreq at tempb{#2}%
-    \ifx\jlreq at tempa\jlreq at tempb\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
-    {%
-      \edef\jlreq at do{\unexpanded{#3}}%
-      \def\jlreq at next{\jlreq at deleteuntileendmark}%
-    }{%
-      \def\jlreq at next{\jlreq at helper@switch@{#1}}%
-    }%
-  }%
-  \jlreq at next
-}
-
-%. オプションの定義
-% オプション処理の際にしか使わない変数(後でそれを元に別の変数を調整する)
-% ものは\jlreq at option@<key>に格納する.
-% _とかは@に変換する.
-\newcommand*{\jlreq at checkempty}[2]{
-  \jlreq at ifempty{#2}{}{\ClassError{jlreq}{The option #1 should have no value}{\@ehc}}%
-}
-% 引数無しの\DeclareOptionX
-\newcommand*{\jlreq at DeclareOption}[2]{%
-  \DeclareOptionX{#1}{\jlreq at checkempty{#1}{##1}#2}
-}
-% エンジン類
-\jlreq at DeclareOption{uplatex}{\let\jlreq at engine=u}
-\jlreq at DeclareOption{platex}{\let\jlreq at engine=p}
-\jlreq at DeclareOption{lualatex}{\let\jlreq at engine=l}
-
-% 文書のタイプ
-\newcommand*\jlreq at article@type{article}
-\define at choicekey{jlreq.cls}{article_type}{article,report,book}{\renewcommand*{\jlreq at article@type}{#1}}
-\jlreq at DeclareOption{article}{\renewcommand*{\jlreq at article@type}{article}}
-\jlreq at DeclareOption{report}{\renewcommand*{\jlreq at article@type}{report}}
-\jlreq at DeclareOption{book}{\renewcommand*{\jlreq at article@type}{book}}
-
-%.. 基本版面.まずは紙サイズ.
-\def\jlreq at switchpapersize{}
-\newcommand*\jlreq at addpapersize[4][]{%
-  \jlreq at ifempty{#2}{}{
-    \jlreq at DeclareOption{#2}{\setlength\paperheight{#3}\setlength\paperwidth{#4}}
-    \appto\jlreq at switchpapersize{{#2}{\setlength\paperheight{#3}\setlength\paperwidth{#4}}}
-  }
-  \jlreq at ifempty{#1}{}{
-    \appto\jlreq at switchpapersize{{#1}{\setlength\paperheight{#3}\setlength\paperwidth{#4}}}
-  }
-}
-\DeclareOptionX{paper}{
-  \edef\jlreq at do{%
-    \unexpanded{\jlreq at switch{#1}}{\expandonce{\jlreq at switchpapersize}}%
-    [\unexpanded{%
-      \jlreq at helper@dividebycomma{#1}%
-      \ifjlreq at tempa
-        \setlength{\paperheight}{\dimexpr\jlreq at tempc\relax}%
-        \setlength{\paperwidth}{\dimexpr\jlreq at tempd\relax}%
-      \else
-        \ClassError{jlreq}{The paper #1 is unknown}{\@ehc}%
-      \fi
-    }]%
-  }%
-  \jlreq at do
-}
-% 紙サイズ一覧.b*はJIS B.
-% [paper=で指定できるようにするもの]{オプション名}{縦}{横}
-\jlreq at addpapersize[a3]{a3paper}{420mm}{297mm}
-\jlreq at addpapersize[a4]{a4paper}{297mm}{210mm}
-\jlreq at addpapersize[a5]{a5paper}{210mm}{148mm}
-\jlreq at addpapersize[a6]{a6paper}{148mm}{105mm}
-\jlreq at addpapersize[b4]{b4paper}{364mm}{257mm}
-\jlreq at addpapersize[b5]{b5paper}{257mm}{182mm}
-\jlreq at addpapersize[b6]{b6paper}{182mm}{128mm}
-\jlreq at addpapersize{a4j}{297mm}{210mm}
-\jlreq at addpapersize{a5j}{210mm}{148mm}
-\jlreq at addpapersize{b4j}{364mm}{257mm}
-\jlreq at addpapersize{b5j}{257mm}{182mm}
-\jlreq at addpapersize{a4var}{283mm}{210mm}
-\jlreq at addpapersize{b5var}{230mm}{182mm}
-\jlreq at addpapersize[letter]{letterpaper}{11in}{8.5in}
-\jlreq at addpapersize[legal]{legalpaper}{14in}{8.5in}
-\jlreq at addpapersize[executive]{executivepaper}{10.5in}{7.25in}
-% 追加
-\jlreq at addpapersize[a0]{}{1189mm}{841mm}
-\jlreq at addpapersize[a1]{}{841mm}{594mm}
-\jlreq at addpapersize[a2]{}{420mm}{594mm}
-\jlreq at addpapersize[a7]{}{74mm}{105mm}
-\jlreq at addpapersize[a8]{}{52mm}{74mm}
-\jlreq at addpapersize[a9]{}{37mm}{52mm}
-\jlreq at addpapersize[a10]{}{26mm}{37mm}
-
-\jlreq at addpapersize[b0]{}{1030mm}{1456mm}
-\jlreq at addpapersize[b1]{}{728mm}{1030mm}
-\jlreq at addpapersize[b2]{}{515mm}{728mm}
-\jlreq at addpapersize[b3]{}{364mm}{515mm}
-\jlreq at addpapersize[b7]{}{91mm}{128mm}
-\jlreq at addpapersize[b8]{}{64mm}{91mm}
-\jlreq at addpapersize[b9]{}{45mm}{64mm}
-\jlreq at addpapersize[b10]{}{32mm}{45mm}
-
-\jlreq at addpapersize[c2]{}{458mm}{648mm}
-\jlreq at addpapersize[c3]{}{324mm}{458mm}
-\jlreq at addpapersize[c4]{}{229mm}{354mm}
-\jlreq at addpapersize[c5]{}{162mm}{229mm}
-\jlreq at addpapersize[c6]{}{114mm}{162mm}
-\jlreq at addpapersize[c7]{}{81mm}{114mm}
-\jlreq at addpapersize[c8]{}{57mm}{81mm}
-
-%.. フォントサイズ,行長,1ページあたりの行数で基本版面のサイズを決める(2.4.1.a)
-\newcommand*{\jlreq at option@fontsize}{}
-\DeclareOptionX{fontsize}{\renewcommand*{\jlreq at option@fontsize}{#1}}
-\jlreq at DeclareOption{10pt}{\renewcommand*{\jlreq at option@fontsize}{10pt}}
-\jlreq at DeclareOption{11pt}{\renewcommand*{\jlreq at option@fontsize}{11pt}}
-\jlreq at DeclareOption{12pt}{\renewcommand*{\jlreq at option@fontsize}{12pt}}
-
-%.. 行の長さ
-\newcommand*{\jlreq at option@line at length}{}
-\DeclareOptionX{line_length}{\renewcommand*{\jlreq at option@line at length}{#1}}
-%.. 1ページあたりの行数
-\newcommand*{\jlreq at option@number at of@lines}{}
-\DeclareOptionX{number_of_lines}{\renewcommand*{\jlreq at option@number at of@lines}{#1}}
-
-% 地の空き量,のどの空き量で配置位置を決める(2.4.1.b)省略されたら中央配置.
-%.. 天
-\newcommand*{\jlreq at option@head at space}{}
-\DeclareOptionX{head_space}{\renewcommand*{\jlreq at option@head at space}{#1}}
-
-%.. 地
-\newcommand*{\jlreq at option@foot at space}{}
-\DeclareOptionX{foot_space}{\renewcommand*{\jlreq at option@foot at space}{#1}}
-%.. のど
-\newcommand*{\jlreq at option@gutter}{}
-\DeclareOptionX{gutter}{\renewcommand*{\jlreq at option@gutter}{#1}}
-
-%.. 柱とノンブル
-\newcommand*{\jlreq at option@headfoot at verticalpos}{}
-\DeclareOptionX{headfoot_verticalposition}{\renewcommand*{\jlreq at option@headfoot at verticalpos}{#1}}
-\newcommand*{\jlreq at headfoot@sidemargin}{0pt}
-\DeclareOptionX{headfoot_sidemargin}{\renewcommand*{\jlreq at headfoot@sidemargin}{#1}}
-
-%.. 段間
-\newcommand*{\jlreq at option@column at gap}{2zw}
-\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}{}
-\DeclareOptionX{baselineskip}{\def\jlreq at option@baselineskip{#1}}
-\DeclareOptionX{linegap}{\def\jlreq at option@baselineskip{1zw + #1}}
-
-%.. 組み方系
-% 行頭に括弧が来たときの配置:3.1.5
-% 段落頭指定_折り返し行頭指定 で与える.
-\newcommand*{\jlreq at open@bracket at pos}{zenkaku_tentsuki}
-\define at choicekey{jlreq.cls}{open_bracket_pos}{zenkaku_tentsuki,zenkakunibu_nibu,nibu_tentsuki}{\renewcommand*{\jlreq at open@bracket at pos}{#1}}
-% ぶら下げ組みをするか:3.8.2 注1
-\newif\ifjlreq at burasage\jlreq at burasagefalse
-\jlreq at DeclareOption{hanging_punctuation}{\jlreq at burasagetrue}
-
-%.. 注
-% 合印の場所(4.2.3)行間に入れるか否か
-\newcommand*{\jlreq at referencemark}{inline}
-\define at choicekey{jlreq.cls}{reference_mark}{inline,interlinear}{\renewcommand*{\jlreq at referencemark}{#1}}
-% 脚注の字下げ,一行目を下げるならばone,二行目以降ならばtwo.ちょっと酷いので後で考える.
-\newcommand*{\jlreq at footnotetext@indent}{one}
-\define at choicekey{jlreq.cls}{footnotetext_indent}{one,two}{\renewcommand*{\jlreq at footnotetext@indent}{#1}}
-% 後注をどこに配置するか._headings(全ての見出し),_paragraph(段落後),_で始まらないやつ(その名前の見出し).カンマ区切り
-\newcommand*{\jlreq at endnote@position}{_headings}
-\DeclareOptionX{endnote_position}{\renewcommand*{\jlreq at endnote@position}{#1}}
-% 傍注のタイプ
-\newcommand*{\jlreq at sidenote@type}{number}
-\define at choicekey{jlreq.cls}{sidenote_type}{number,mark}{\renewcommand*{\jlreq at sidenote@type}{#1}}
-\newcommand*{\jlreq at option@sidenote at width}{}
-\DeclareOptionX{sidenote_width}{\renewcommand*{\jlreq at option@sidenote at width}{#1}}
-
-\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 tate \@tatefalse
-\jlreq at DeclareOption{landscape}{\@landscapetrue}
-\jlreq at DeclareOption{tombo}{%
-  \tombowtrue \tombowdatefalse
-  \setlength{\@tombowwidth}{.1\p@}%
-  \maketombowbox}
-\jlreq at DeclareOption{mentuke}{%
-  \tombowtrue \tombowdatefalse
-  \setlength{\@tombowwidth}{\z@}%
-  \maketombowbox}
-\jlreq at DeclareOption{tate}{\@tatetrue
-  \AtBeginDocument{\tate\message{\jlreq at tategumi@message}\adjustbaseline}%
-}
-\newif\ifjlreq at option@twoside\jlreq at option@twosidefalse % onesideかtwosideが指定された
-\jlreq at DeclareOption{oneside}{\@twosidefalse\@mparswitchfalse\jlreq at option@twosidetrue}
-\jlreq at DeclareOption{twoside}{\@twosidetrue\@mparswitchtrue\jlreq at option@twosidetrue}
-\jlreq at DeclareOption{onecolumn}{\@twocolumnfalse}
-\jlreq at DeclareOption{twocolumn}{\@twocolumntrue}
-\jlreq at DeclareOption{titlepage}{\jlreq at option@titlepagetrue\@titlepagetrue}
-\jlreq at DeclareOption{notitlepage}{\jlreq at option@titlepagetrue\@titlepagefalse}
-\jlreq at DeclareOption{draft}{\setlength\overfullrule{5pt}}
-\jlreq at DeclareOption{final}{\setlength\overfullrule{0pt}}
-\newif\if at openright
-\newif\ifjlreq at option@open \jlreq at option@openfalse % openrightかopenanyが指定された
-\jlreq at DeclareOption{openright}{\@openrighttrue\jlreq at option@opentrue}
-\jlreq at DeclareOption{openany}{\@openrightfalse\jlreq at option@opentrue}
-\jlreq at DeclareOption{leqno}{\input{leqno.clo}}
-\jlreq at DeclareOption{fleqn}{\input{fleqn.clo}}
-
-\newcommand*{\jlreq at warning}[1]{}
-\jlreq at DeclareOption{jlreq_warnings}{\renewcommand*{\jlreq at warning}[1]{\ClassWarningNoLine{jlreq}{(JLREQ warning) ##1}}}
-
-\ExecuteOptionsX{article_type=article,paper=a4,fontsize=10pt,open_bracket_pos=zenkaku_tentsuki,reference_mark=inline,footnotetext_indent=one,endnote_position=_headings,onecolumn,final}
-% \@removeelementを一旦置き換えてから\ProcessOptionsXを実行する
-\let\jlreq at original@@removeelement=\@removeelement
-\let\@removeelement=\jlreq at helper@removeelement
-\ProcessOptionsX*\relax
-\let\@removeelement=\jlreq at original@@removeelement
-
-\ifjlreq at option@titlepage\else
-  \ifthenelse{\equal{\jlreq at article@type}{article}}{\@titlepagefalse}{\@titlepagetrue}
-\fi
-\ifjlreq at option@open\else
-  \ifthenelse{\equal{\jlreq at article@type}{book}}{\@openrighttrue}{\@openrightfalse}
-\fi
-% articleではopenrightは効かない.
-\ifthenelse{\equal{\jlreq at article@type}{article}}{\@openrightfalse}{}
-\ifjlreq at option@twoside\else
-  \ifthenelse{\equal{\jlreq at article@type}{book}}{\@twosidetrue}{\@twosidefalse}
-\fi
-
-\newcommand{\jlreqsetup}[1]{%
-  \jlreq at parsekeyval[jlreqsetup]{
-    {sidenote_mark}{
-      \jlreq at parsekeyval[sidenote_mark]{
-        {mark}{\def\jlreq at sidenote@defaultmark{####1}}
-        {headingfont}{\def\jlreq at sidenote@keywordfont{####1}}
-      }{##1}
-    }
-  }{#1}
-}
-\@onlypreamble\jlreqsetup
-
-% エンジンの設定
-\ifx\jlreq at engine\@undefined
-  \ifx\luatexversion\@undefined
-    \ifx\ucs\@undefined
-      \let\jlreq at engine=p
-    \else
-      \let\jlreq at engine=u
-    \fi
-  \else
-    \let\jlreq at engine=l
-  \fi
-\fi
-
-\ifx l\jlreq at engine
-  \RequirePackage{luatexja}
-  \directlua{jlreq = {}}
-\fi
-
-% (u)pLaTeXの場合ここで初めて\epTeXinputencodingが発行されるので,
-% これ以前には和文は使えない.
-\ifx l\jlreq at engine\else
-  \epTeXinputencoding utf8
-  \def\zw{zw}\def\zh{zh}
-  % http://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=1508&parent=8435
-  \if at tate\AtEndPreamble{\par}\fi
-\fi
-\def\jlreq at tategumi@message{《縦組モード》}
-
-% \jlreq at gol(Gyo Okuri Length), \jlreq at mol (Moji Okuri Length)を定義
-\if at tate
-  \ifx l\jlreq at engine
-    \def\jlreq at gol{\zw}\def\jlreq at mol{\zh}
-  \else
-    \def\jlreq at gol{zw}\def\jlreq at mol{zh}  
-  \fi
-\else
-  \ifx l\jlreq at engine
-    \def\jlreq at gol{\zh}\def\jlreq at mol{\zw}
-  \else
-    \def\jlreq at gol{zh}\def\jlreq at mol{zw}
-  \fi
-\fi
-
-%. helper2(エンジン依存系)
-% 組方向を判定
-% \jlreq at if(y|t)(dir|box)を定義する.
-\def\jlreq at do{%
-  \def\jlreq at ifydir{\ifydir\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-  \def\jlreq at iftdir{\iftdir\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-  \def\jlreq at ifybox##1{\ifybox##1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-  \def\jlreq at iftbox##1{\iftbox##1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-}
-\ifx l\jlreq at engine
-  \def\jlreq at ifydir{\ifnum\ltjgetparameter{direction}=4\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-  \def\jlreq at iftdir{\ifnum\numexpr\ltjgetparameter{direction}-(\ltjgetparameter{direction}/8)*8=3\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-  \def\jlreq at ifybox#1{\ifnum\ltjgetparameter{boxdir}{#1}=4\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-  \def\jlreq at iftbox#1{\ifnum\numexpr\ltjgetparameter{boxdir}{#1}-(\ltjgetparameter{boxdir}{#1}/8)*8=3\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-\else
-  \jlreq at do
-\fi
-
-% 現在行の残りを得る.
-\RequirePackage[savepos]{zref}
-\newcount\jlreq at rest@linewidth at count
-\jlreq at rest@linewidth at count=0
-
-\ifx l\jlreq at engine
-  % 以下のコードはおかしい.
-  \newcommand*{\jlreq at calc@current at linewidth}{%
-    \dimexpr\zposx{jlreq at rest@width.pos.\the\jlreq at rest@linewidth at count} sp - \@totalleftmargin -
-    \ifodd\zref at extractdefault{jlreq at rest@width.page.\the\jlreq at rest@linewidth at count}{page}{\c at page}%
-      \oddsidemargin
-    \else
-      \evensidemargin
-    \fi
-    - 1in - \hoffset\relax
-  }
-\else
-  \newcommand*{\jlreq at calc@current at linewidth}{%
-    \dimexpr
-      \jlreq at ifydir{%
-        \zposx{jlreq at rest@width.pos.\the\jlreq at rest@linewidth at count} sp - \hoffset
-        \ifodd\zref at extractdefault{jlreq at rest@width.page.\the\jlreq at rest@linewidth at count}{page}{\c at page}%
-          - \oddsidemargin
-        \else
-          - \evensidemargin
-        \fi
-      }{%
-        \ifdim\pdfpagewidth=0pt
-          \paperheight
-        \else
-          \pdfpageheight
-        \fi
-        - \topmargin - \headheight - \headsep - \voffset
-        - \zposy{jlreq at rest@width.pos.\the\jlreq at rest@linewidth at count} sp
-      }%
-      - \@totalleftmargin - 1in
-    \relax
-  }
-\fi
-
-\newdimen\jlreq at current@linewidth
-\newdimen\jlreq at rest@linewidth
-% この命令以降,次にこの命令を実行する前まで\jlreq at rest@linewidth/\jlreq at rest@linewidthで
-% この場所における残り長さが取得できる.
-\newcommand*{\jlreq at savepos@for at rest@linewidth}{%
-  \global\advance\jlreq at rest@linewidth at count by 1\relax
-  \zsavepos{jlreq at rest@width.pos.\the\jlreq at rest@linewidth at count}%
-  \zref at labelbyprops{jlreq at rest@width.page.\the\jlreq at rest@linewidth at count}{page}%
-  \jlreq at current@linewidth=\jlreq at calc@current at linewidth
-  \jlreq at rest@linewidth=\dimexpr\linewidth - \jlreq at current@linewidth\relax
-}
-\def\jlreq at savepos@iflabelundefined{\@ifundefined{\ZREF at RefPrefix @jlreq at rest@width.pos.\the\jlreq at rest@linewidth at count}}
-
-%. 基本設定
-% 和文文字,欧文文字の設定(とりあえずLuaTeX-jaのデフォルトのまま)
-\ifx l\jlreq at engine
-  \ltjsetparameter{jacharrange={-1, +2, +3, -4, -5, +6, +7, -8}}
-  % kanjiskip, xkanjiskipはjfmのものを使う
-  \ltjsetparameter{kanjiskip=\maxdimen}
-  \ltjsetparameter{xkanjiskip=\maxdimen}
-\else
-  \kanjiskip=0pt plus 0.25zw minus 0pt
-  \xkanjiskip=0.25zw plus 0.25zw minus 0.125zw
-\fi
-
-% 禁則処理,表1,2に従う
-% 行末
-% 初め括弧類
-\ifx l\jlreq at engine
-  \newcommand*{\jlreq at setpostbreakpenalty}[2]{\ltjsetparameter{postbreakpenalty={`#1,#2}}}
-  \newcommand*{\jlreq at setprebreakpenalty}[2]{\ltjsetparameter{prebreakpenalty={`#1,#2}}}
-  \newcommand*{\jlreq at setjaxspmode}[2]{\ltjsetparameter{jaxspmode={`#1,#2}}}
-\else
-  \newcommand*{\jlreq at setpostbreakpenalty}[2]{\postbreakpenalty`#1=#2}
-  \newcommand*{\jlreq at setprebreakpenalty}[2]{\prebreakpenalty`#1=#2}
-  \newcommand*{\jlreq at setjaxspmode}[2]{%
-    \jlreq at switch{#2}{
-      {inhibit}{\inhibitxspcode`#1=0}
-      {preonly}{\inhibitxspcode`#1=1}
-      {postonly}{\inhibitxspcode`#1=2}
-      {allow}{\inhibitxspcode`#1=3}
-      {\inhibitxspcode`#1=#2}
-    }
-  }
-\fi
-
-\jlreq at setpostbreakpenalty{(}{10000}
-\jlreq at setpostbreakpenalty{〔}{10000}
-\jlreq at setpostbreakpenalty{[}{10000}
-\jlreq at setpostbreakpenalty{{}{10000}
-\jlreq at setpostbreakpenalty{〈}{10000}
-\jlreq at setpostbreakpenalty{《}{10000}
-\jlreq at setpostbreakpenalty{「}{10000}
-\jlreq at setpostbreakpenalty{『}{10000}
-\jlreq at setpostbreakpenalty{【}{10000}
-\ifx p\jlreq at engine\else
-\jlreq at setpostbreakpenalty{⦅}{10000}
-\jlreq at setpostbreakpenalty{〘}{10000}
-\jlreq at setpostbreakpenalty{〖}{10000}
-\jlreq at setpostbreakpenalty{«}{10000}
-\jlreq at setpostbreakpenalty{〝}{10000}
-\fi
-\jlreq at setpostbreakpenalty{‘}{10000}
-\jlreq at setpostbreakpenalty{“}{10000}
-% 前置省略記号
-\jlreq at setpostbreakpenalty{¥}{10000}
-\jlreq at setpostbreakpenalty{$}{10000}
-\jlreq at setpostbreakpenalty{£}{10000}
-\jlreq at setpostbreakpenalty{#}{10000}
-\ifx p\jlreq at engine\else
-\jlreq at setpostbreakpenalty{€}{10000}
-\jlreq at setpostbreakpenalty{№}{10000}
-\fi
-% 行頭
-% 終わり括弧類
-\jlreq at setprebreakpenalty{)}{10000}
-\jlreq at setprebreakpenalty{〕}{10000}
-\jlreq at setprebreakpenalty{]}{10000}
-\jlreq at setprebreakpenalty{}}{10000}
-\jlreq at setprebreakpenalty{〉}{10000}
-\jlreq at setprebreakpenalty{》}{10000}
-\jlreq at setprebreakpenalty{」}{10000}
-\jlreq at setprebreakpenalty{』}{10000}
-\jlreq at setprebreakpenalty{】}{10000}
-\ifx p\jlreq at engine\else
-\jlreq at setprebreakpenalty{⦆}{10000}
-\jlreq at setprebreakpenalty{〙}{10000}
-\jlreq at setprebreakpenalty{〗}{10000}
-\jlreq at setprebreakpenalty{»}{10000}
-\jlreq at setprebreakpenalty{〟}{10000}
-\fi
-\jlreq at setprebreakpenalty{’}{10000}
-\jlreq at setprebreakpenalty{”}{10000}
-% ハイフン類
-\jlreq at setprebreakpenalty{‐}{10000}
-\ifx p\jlreq at engine\else
-\jlreq at setprebreakpenalty{゠}{10000}
-\jlreq at setprebreakpenalty{–}{10000}
-\jlreq at setprebreakpenalty{〜}{10000}
-\fi
-% 区切り約物
-\jlreq at setprebreakpenalty{!}{10000}
-\jlreq at setprebreakpenalty{?}{10000}
-\ifx p\jlreq at engine\else
-\jlreq at setprebreakpenalty{‼}{10000}
-\jlreq at setprebreakpenalty{⁇}{10000}
-\jlreq at setprebreakpenalty{⁈}{10000}
-\jlreq at setprebreakpenalty{⁉}{10000}
-\fi
-% 中点類
-\jlreq at setprebreakpenalty{・}{10000}
-\jlreq at setprebreakpenalty{:}{10000}
-\jlreq at setprebreakpenalty{;}{10000}
-% 句点類
-\jlreq at setprebreakpenalty{。}{10000}
-\jlreq at setprebreakpenalty{.}{10000}
-% 読点類
-\jlreq at setprebreakpenalty{、}{10000}
-\jlreq at setprebreakpenalty{,}{10000}
-% 繰返し記号
-\jlreq at setprebreakpenalty{ヽ}{10000}
-\jlreq at setprebreakpenalty{ヾ}{10000}
-\jlreq at setprebreakpenalty{ゝ}{10000}
-\jlreq at setprebreakpenalty{ゞ}{10000}
-\jlreq at setprebreakpenalty{々}{10000}
-\ifx p\jlreq at engine\else
-\jlreq at setprebreakpenalty{〻}{10000}
-\fi
-% 長音記号
-\jlreq at setprebreakpenalty{ー}{10000}
-% 小書きの仮名
-\jlreq at setprebreakpenalty{ぁ}{10000}
-\jlreq at setprebreakpenalty{ぃ}{10000}
-\jlreq at setprebreakpenalty{ぅ}{10000}
-\jlreq at setprebreakpenalty{ぇ}{10000}
-\jlreq at setprebreakpenalty{ぉ}{10000}
-\jlreq at setprebreakpenalty{ァ}{10000}
-\jlreq at setprebreakpenalty{ィ}{10000}
-\jlreq at setprebreakpenalty{ゥ}{10000}
-\jlreq at setprebreakpenalty{ェ}{10000}
-\jlreq at setprebreakpenalty{ォ}{10000}
-\jlreq at setprebreakpenalty{っ}{10000}
-\jlreq at setprebreakpenalty{ゃ}{10000}
-\jlreq at setprebreakpenalty{ゅ}{10000}
-\jlreq at setprebreakpenalty{ょ}{10000}
-\jlreq at setprebreakpenalty{ゎ}{10000}
-\ifx p\jlreq at engine\else
-\jlreq at setprebreakpenalty{ゕ}{10000}
-\jlreq at setprebreakpenalty{ゖ}{10000}
-\fi
-\jlreq at setprebreakpenalty{ッ}{10000}
-\jlreq at setprebreakpenalty{ャ}{10000}
-\jlreq at setprebreakpenalty{ュ}{10000}
-\jlreq at setprebreakpenalty{ョ}{10000}
-\jlreq at setprebreakpenalty{ヮ}{10000}
-\jlreq at setprebreakpenalty{ヵ}{10000}
-\jlreq at setprebreakpenalty{ヶ}{10000}
-\ifx p\jlreq at engine\else
-\jlreq at setprebreakpenalty{ㇰ}{10000}
-\jlreq at setprebreakpenalty{ㇱ}{10000}
-\jlreq at setprebreakpenalty{ㇲ}{10000}
-\jlreq at setprebreakpenalty{ㇳ}{10000}
-\jlreq at setprebreakpenalty{ㇴ}{10000}
-\jlreq at setprebreakpenalty{ㇵ}{10000}
-\jlreq at setprebreakpenalty{ㇶ}{10000}
-\jlreq at setprebreakpenalty{ㇷ}{10000}
-\jlreq at setprebreakpenalty{ㇸ}{10000}
-\jlreq at setprebreakpenalty{ㇹ}{10000}
-\jlreq at setprebreakpenalty{ㇺ}{10000}
-\jlreq at setprebreakpenalty{ㇻ}{10000}
-\jlreq at setprebreakpenalty{ㇼ}{10000}
-\jlreq at setprebreakpenalty{ㇽ}{10000}
-\jlreq at setprebreakpenalty{ㇾ}{10000}
-\jlreq at setprebreakpenalty{ㇿ}{10000}
-\fi
-
-% xkanjiskip
-% 初め括弧類(二分)
-\jlreq at setjaxspmode{(}{preonly}
-\jlreq at setjaxspmode{〔}{preonly}
-\jlreq at setjaxspmode{[}{preonly}
-\jlreq at setjaxspmode{{}{preonly}
-\jlreq at setjaxspmode{〈}{preonly}
-\jlreq at setjaxspmode{《}{preonly}
-\jlreq at setjaxspmode{「}{preonly}
-\jlreq at setjaxspmode{『}{preonly}
-\jlreq at setjaxspmode{【}{preonly}
-\ifx p\jlreq at engine\else
-\jlreq at setjaxspmode{⦅}{preonly}
-\jlreq at setjaxspmode{〘}{preonly}
-\jlreq at setjaxspmode{〖}{preonly}
-\jlreq at setjaxspmode{«}{preonly}
-\jlreq at setjaxspmode{〝}{preonly}
-\fi
-\jlreq at setjaxspmode{‘}{preonly}
-\jlreq at setjaxspmode{“}{preonly}
-% 終わり括弧類(二分)
-\jlreq at setjaxspmode{)}{postonly}
-\jlreq at setjaxspmode{〕}{postonly}
-\jlreq at setjaxspmode{]}{postonly}
-\jlreq at setjaxspmode{}}{postonly}
-\jlreq at setjaxspmode{〉}{postonly}
-\jlreq at setjaxspmode{》}{postonly}
-\jlreq at setjaxspmode{」}{postonly}
-\jlreq at setjaxspmode{』}{postonly}
-\jlreq at setjaxspmode{】}{postonly}
-\ifx p\jlreq at engine\else
-\jlreq at setjaxspmode{⦆}{postonly}
-\jlreq at setjaxspmode{〙}{postonly}
-\jlreq at setjaxspmode{〗}{postonly}
-\jlreq at setjaxspmode{»}{postonly}
-\jlreq at setjaxspmode{〟}{postonly}
-\fi
-\jlreq at setjaxspmode{’}{postonly}
-\jlreq at setjaxspmode{”}{postonly}
-% ハイフン類(二分)
-\jlreq at setjaxspmode{‐}{inhibit}
-\ifx p\jlreq at engine\else
-\jlreq at setjaxspmode{゠}{inhibit}
-\jlreq at setjaxspmode{–}{inhibit}
-\jlreq at setjaxspmode{〜}{inhibit}
-\fi
-% 区切り約物
-\jlreq at setjaxspmode{!}{postonly}
-\jlreq at setjaxspmode{?}{postonly}
-\ifx p\jlreq at engine\else
-\jlreq at setjaxspmode{‼}{postonly}
-\jlreq at setjaxspmode{⁇}{postonly}
-\jlreq at setjaxspmode{⁈}{postonly}
-\jlreq at setjaxspmode{⁉}{postonly}
-\fi
-% 中点類
-\jlreq at setjaxspmode{・}{postonly}
-\jlreq at setjaxspmode{:}{postonly}
-\jlreq at setjaxspmode{;}{postonly}
-% 句点類(二分)
-\jlreq at setjaxspmode{。}{postonly}
-\jlreq at setjaxspmode{.}{postonly}
-% 読点類(二分)
-\jlreq at setjaxspmode{、}{postonly}
-\jlreq at setjaxspmode{,}{postonly}
-% 分離禁止文字
-\jlreq at setjaxspmode{—}{inhibit}
-\jlreq at setjaxspmode{…}{inhibit}
-\jlreq at setjaxspmode{‥}{inhibit}
-\ifx p\jlreq at engine\else
-\jlreq at setjaxspmode{〳}{inhibit}
-\jlreq at setjaxspmode{〴}{inhibit}
-\jlreq at setjaxspmode{〵}{inhibit}
-\fi
-% 前置省略記号
-\jlreq at setjaxspmode{¥}{inhibit}
-\jlreq at setjaxspmode{$}{inhibit}
-\jlreq at setjaxspmode{£}{inhibit}
-\jlreq at setjaxspmode{#}{inhibit}
-\ifx p\jlreq at engine\else
-\jlreq at setjaxspmode{€}{inhibit}
-\jlreq at setjaxspmode{№}{inhibit}
-\fi
-% 後置省略記号
-\jlreq at setjaxspmode{°}{inhibit}
-\jlreq at setjaxspmode{′}{inhibit}
-\jlreq at setjaxspmode{″}{inhibit}
-\jlreq at setjaxspmode{℃}{inhibit}
-\jlreq at setjaxspmode{¢}{inhibit}
-\jlreq at setjaxspmode{%}{inhibit}
-\jlreq at setjaxspmode{‰}{inhibit}
-\ifx p\jlreq at engine\else
-\jlreq at setjaxspmode{㏋}{inhibit}
-\jlreq at setjaxspmode{ℓ}{inhibit}
-\jlreq at setjaxspmode{㌃}{inhibit}
-\jlreq at setjaxspmode{㌍}{inhibit}
-\jlreq at setjaxspmode{㌔}{inhibit}
-\jlreq at setjaxspmode{㌘}{inhibit}
-\jlreq at setjaxspmode{㌢}{inhibit}
-\jlreq at setjaxspmode{㌣}{inhibit}
-\jlreq at setjaxspmode{㌦}{inhibit}
-\jlreq at setjaxspmode{㌧}{inhibit}
-\jlreq at setjaxspmode{㌫}{inhibit}
-\jlreq at setjaxspmode{㌶}{inhibit}
-\jlreq at setjaxspmode{㌻}{inhibit}
-\jlreq at setjaxspmode{㍉}{inhibit}
-\jlreq at setjaxspmode{㍊}{inhibit}
-\jlreq at setjaxspmode{㍍}{inhibit}
-\jlreq at setjaxspmode{㍑}{inhibit}
-\jlreq at setjaxspmode{㍗}{inhibit}
-\jlreq at setjaxspmode{㎎}{inhibit}
-\jlreq at setjaxspmode{㎏}{inhibit}
-\jlreq at setjaxspmode{㎜}{inhibit}
-\jlreq at setjaxspmode{㎝}{inhibit}
-\jlreq at setjaxspmode{㎞}{inhibit}
-\jlreq at setjaxspmode{㎡}{inhibit}
-\jlreq at setjaxspmode{㏄}{inhibit}
-\fi
-% 分割禁止(分離禁止文字は特定の並びで分割禁止だが,とりあえず一括で禁止しておく.)
-\jlreq at setprebreakpenalty{—}{10000}
-\jlreq at setprebreakpenalty{…}{10000}
-\jlreq at setprebreakpenalty{‥}{10000}
-% ¥100とか70%とか……
-
-
-%. オプション処理
-%.. フォント関連
-\newdimen\jlreq at fontsize
-\ifx l\jlreq at engine
-  \jlreq at tempdima=0.25mm
-  \setlength{\jlreq at fontsize}{%
-    \dimexpr\directlua{
-      local act = string.char(92)
-      local s = [[\jlreq at option@fontsize]]
-      s = s:gsub("Q",act .. "jlreq at tempdima")
-      tex.print(s)
-    }\relax
-  }%
-\else
-  \setlength{\jlreq at fontsize}{\dimexpr\jlreq at option@fontsize\relax}
-\fi
-
-% JFMに関連する設定
-\ifx l\jlreq at engine
-  % この値は後でjfm-jlreq内で読む
-  \directlua{jlreq.open_bracket_pos = [[\jlreq at open@bracket at pos]]}
-  \ifjlreq at burasage\directlua{jlreq.burasage = true}
-  \else\directlua{jlreq.burasage = false}\fi
-\else
-  % 非LuaTeXの場合はJFMの入れ替えと\everyparでの処理で対処.
-  \def\jlreq at jfmname@prefix{}
-  \def\jlreq at openbreackets@list{(〔[{〈《「『【}
-  \ifx u\jlreq at engine\edef\jlreq at openbreackets@list{\jlreq at openbreackets@list {⦅〘〖«〝‘“}}\fi
-  % \jlreq at jfmnameにJFMの名前を入れる
-  \ifjlreq at burasage\edef\jlreq at jfmname@prefix{b\jlreq at jfmname@prefix}\fi
-  \ifthenelse{\equal{\jlreq at open@bracket at pos}{zenkakunibu_nibu}}{\edef\jlreq at jfmname@prefix{\jlreq at jfmname@prefix z}}{}
-  \ifx u\jlreq at engine\edef\jlreq at jfmname@prefix{u\jlreq at jfmname@prefix}\fi
-  \edef\jlreq at jfmname{\jlreq at jfmname@prefix jlreq}
-  \edef\jlreq at jfmnameg{\jlreq at jfmname@prefix jlreqg}
-  \ifthenelse{\equal{\jlreq at open@bracket at pos}{zenkaku_tentsuki}}{
-    \def\jlreq at openbracket@hook{\jlreq at ifintokenlist{\jlreq at nextchar}{\jlreq at openbreackets@list}{\inhibitglue}{}}
-    \AtBeginDocument{\PushPostHook{par}{\futurelet\jlreq at nextchar\jlreq at openbracket@hook}}
-  }{}
-  \ifthenelse{\equal{\jlreq at open@bracket at pos}{nibu_tentsuki}}{
-    \def\jlreq at openbracket@hook{\jlreq at ifintokenlist{\jlreq at nextchar}{\jlreq at openbreackets@list}{\hskip -1\jlreq at mol}{}}
-    \AtBeginDocument{\PushPostHook{par}{\futurelet\jlreq at nextchar\jlreq at openbracket@hook}}
-  }{}
-\fi
-% 開き括弧の幅が全角の場合は,ベタ組にするために補正が必要
-\ifthenelse{\equal{\jlreq at open@bracket at pos}{zenkakunibu_nibu}}{
-  \def\jlreq at open@bracket at before@space{\hskip -.5\jlreq at mol}
-}{
-  \def\jlreq at open@bracket at before@space{}
-}
-
-%. フォント
-\RequirePackage{lmodern}
-
-% 古いフォントコマンド
-\DeclareOldFontCommand{\jlreq at oldfontcommand@mc}{\normalfont\mcfamily}{\mathmc}
-\DeclareOldFontCommand{\jlreq at oldfontcommand@gt}{\normalfont\gtfamily}{\mathgt}
-\DeclareOldFontCommand{\jlreq at oldfontcommand@rm}{\normalfont\rmfamily}{\mathrm}
-\DeclareOldFontCommand{\jlreq at oldfontcommand@sf}{\normalfont\sffamily}{\mathsf}
-\DeclareOldFontCommand{\jlreq at oldfontcommand@tt}{\normalfont\ttfamily}{\mathtt}
-\DeclareOldFontCommand{\jlreq at oldfontcommand@bf}{\normalfont\bfseries}{\mathbf}
-\DeclareOldFontCommand{\jlreq at oldfontcommand@it}{\normalfont\itshape}{\mathit}
-\DeclareOldFontCommand{\jlreq at oldfontcommand@sl}{\normalfont\slshape}{\@nomath\sl}
-\DeclareOldFontCommand{\jlreq at oldfontcommand@sc}{\normalfont\scshape}{\@nomath\sc}
-\newcommand*{\jlreq at oldfontcommand@enable}{%
-  \let\mc=\jlreq at oldfontcommand@mc
-  \let\gt=\jlreq at oldfontcommand@gt
-  \let\rm=\jlreq at oldfontcommand@rm
-  \let\sf=\jlreq at oldfontcommand@sf
-  \let\tt=\jlreq at oldfontcommand@tt
-  \let\bf=\jlreq at oldfontcommand@bf
-  \let\it=\jlreq at oldfontcommand@it
-  \let\sl=\jlreq at oldfontcommand@sl
-  \let\sc=\jlreq at oldfontcommand@sc
-}
-\newcommand*{\jlreq at oldfontcommand@disable}{%
-  \let\mc=\@undefined
-  \let\gt=\@undefined
-  \let\rm=\@undefined
-  \let\sf=\@undefined
-  \let\tt=\@undefined
-  \let\bf=\@undefined
-  \let\it=\@undefined
-  \let\sl=\@undefined
-  \let\sc=\@undefined
-}
-
-\DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal}
-\DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal}
-
-%.. 和文
-\ifx l\jlreq at engine
-  \RequirePackage{luatexja-adjust}
-  \ltjenableadjust[lineend=extended,priority=true]
-  \ltjsetparameter{stretch_priority={kanjiskip=10,xkanjiskip=-30}}
-  \ltjsetparameter{shrink_priority={kanjiskip=0,xkanjiskip=0}}
-\fi
-
-\ifx u\jlreq at engine
-  \def\jlreq at yokokanjiencoding{JY2}
-  \def\jlreq at tatekanjiencoding{JT2}
-\fi
-\ifx p\jlreq at engine
-  \def\jlreq at yokokanjiencoding{JY1}
-  \def\jlreq at tatekanjiencoding{JT1}
-\fi
-\ifx l\jlreq at engine
-  \def\jlreq at yokokanjiencoding{JY3}
-  \def\jlreq at tatekanjiencoding{JT3}
-  \expandafter\let\csname JY3/mc/m/n/10\endcsname\relax
-  \expandafter\let\csname JT3/mc/m/n/10\endcsname\relax
-  \DeclareFontShape{JY3}{mc}{m}{n}{<->\ltj at stdmcfont:jfm=jlreq;script=latn;-kern}{}
-  \DeclareFontShape{JY3}{gt}{m}{n}{<->\ltj at stdgtfont:jfm=jlreq;script=latn;-kern}{}
-  \DeclareFontShape{JT3}{mc}{m}{n}{<->\ltj at stdmcfont:jfm=jlreqv;script=latn;-kern}{}
-  \DeclareFontShape{JT3}{gt}{m}{n}{<->\ltj at stdgtfont:jfm=jlreqv;script=latn;-kern}{}
-\else
-  \expandafter\let\csname \jlreq at yokokanjiencoding/mc/m/n/10\endcsname\relax
-  \expandafter\let\csname \jlreq at tatekanjiencoding/mc/m/n/10\endcsname\relax
-  \DeclareFontShape{\jlreq at yokokanjiencoding}{mc}{m}{n}{<-> \jlreq at jfmname}{}
-  \DeclareFontShape{\jlreq at yokokanjiencoding}{gt}{m}{n}{<-> \jlreq at jfmnameg}{}
-  \DeclareFontShape{\jlreq at tatekanjiencoding}{mc}{m}{n}{<-> \jlreq at jfmname-v}{}
-  \DeclareFontShape{\jlreq at tatekanjiencoding}{gt}{m}{n}{<-> \jlreq at jfmnameg-v}{}
-\fi
-\DeclareFontShape{\jlreq at yokokanjiencoding}{mc}{bx}{n}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq at yokokanjiencoding}{gt}{bx}{n}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq at yokokanjiencoding}{mc}{m}{it}{<->ssub*mc/m/n}{}
-\DeclareFontShape{\jlreq at yokokanjiencoding}{mc}{m}{sl}{<->ssub*mc/m/n}{}
-\DeclareFontShape{\jlreq at yokokanjiencoding}{mc}{m}{sc}{<->ssub*mc/m/n}{}
-\DeclareFontShape{\jlreq at yokokanjiencoding}{gt}{m}{it}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq at yokokanjiencoding}{gt}{m}{sl}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq at yokokanjiencoding}{mc}{bx}{it}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq at yokokanjiencoding}{mc}{bx}{sl}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq at tatekanjiencoding}{mc}{bx}{n}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq at tatekanjiencoding}{gt}{bx}{n}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq at tatekanjiencoding}{mc}{m}{it}{<->ssub*mc/m/n}{}
-\DeclareFontShape{\jlreq at tatekanjiencoding}{mc}{m}{sl}{<->ssub*mc/m/n}{}
-\DeclareFontShape{\jlreq at tatekanjiencoding}{mc}{m}{sc}{<->ssub*mc/m/n}{}
-\DeclareFontShape{\jlreq at tatekanjiencoding}{gt}{m}{it}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq at tatekanjiencoding}{gt}{m}{sl}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq at tatekanjiencoding}{mc}{bx}{it}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq at tatekanjiencoding}{mc}{bx}{sl}{<->ssub*gt/m/n}{}
-
-% 数式フォント設定
-\ifx l\jlreq at engine\else
-  \DeclareSymbolFont{mincho}{\jlreq at yokokanjiencoding}{mc}{m}{n}
-  \DeclareSymbolFontAlphabet{\mathmc}{mincho}
-  \SetSymbolFont{mincho}{bold}{\jlreq at yokokanjiencoding}{gt}{m}{n}
-  \jfam\symmincho
-  \DeclareMathAlphabet{\mathgt}{\jlreq at yokokanjiencoding}{gt}{m}{n}
-\fi
-\AtBeginDocument{%
-  \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc}%
-  \reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt}%
-}
-
-% \baselineskipの計算
-% いったん文字サイズを変更((u)platexの際にzh/zwをきちんとするため)
-\@setfontsize\normalsize{\jlreq at fontsize}{\jlreq at fontsize}%
-\newdimen\jlreq at baselineskip
-\ifx\jlreq at option@baselineskip\@empty
-  \setlength{\jlreq at baselineskip}{\dimexpr 17\jlreq at fontsize/10\relax}%
-\else
-  \ifx l\jlreq at engine
-    \jlreq at tempdima=0.25mm
-    \setlength{\jlreq at baselineskip}{%
-      \dimexpr\directlua{
-        local act = string.char(92)
-        local s = [[\jlreq at option@baselineskip]]
-        s = s:gsub("Q",act .. "jlreq at tempdima"):gsub("zh",act .. "zh"):gsub("zw",act .. "zw")
-        tex.print(s)
-      }\relax
-    }%
-  \else
-    \setlength{\jlreq at baselineskip}{\jlreq at option@baselineskip}
-  \fi
-\fi
-\ifdim\jlreq at fontsize>\jlreq at baselineskip
-  \ClassError{jlreq}{The baselineskip is less than fontsize}{\@ehc}%
-\fi
-\ifthenelse{\lengthtest{\jlreq at baselineskip<1.5\jlreq at fontsize} \OR \lengthtest{\jlreq at baselineskip>2\jlreq at fontsize}}{
-  \jlreq at warning{行間は二分以上全角以下が望ましい (2.4.2.d 注3)}
-}{}
-
-\emergencystretch 3\jlreq at mol
-
-\renewcommand{\normalsize}{%
-  \@setfontsize\normalsize{\jlreq at fontsize}{\jlreq at baselineskip}%
-  \abovedisplayskip 1.1\jlreq at fontsize \@plus .3\jlreq at fontsize \@minus .4\jlreq at fontsize
-  \abovedisplayshortskip \z@ \@plus .3\jlreq at fontsize
-  \belowdisplayskip .9\jlreq at fontsize \@plus.3\jlreq at fontsize \@minus.4\jlreq at fontsize
-  \belowdisplayshortskip \belowdisplayskip
-  \let\@listi\@listI}
-
-\if at tate\tate\fi % ここで発行しておく
-\mcfamily\selectfont\normalsize
-\setbox0\hbox{ } % 全角スペース
-\setlength\Cht{\ht0}
-\setlength\Cdp{\dp0}
-\setlength\Cwd{\wd0}
-\setlength\Cvs{\baselineskip}
-\setlength\Chs{\wd0}
-
-% 4.1.3.a
-% 文字サイズを基準としているような寸法に対しては,
-% \@setfontsizeが実行されるたびに追随して値を変える
-% その処理は\jlreq at setfontsizehookに入れる
-\let\jlreq at original@@setfontsize=\@setfontsize
-\renewcommand*{\@setfontsize}[3]{%
-  \jlreq at original@@setfontsize{#1}{#2}{#3}%
-  \jlreq at setfontsizehook
-}
-\def\jlreq at setfontsizehook{}
-\appto\jlreq at setfontsizehook{\ifdim\parindent>0pt\setlength{\parindent}{1\jlreq at mol}\fi}
-
-% 2.5.2 \baselineskipは一定の方がよい?
-\newcommand{\footnotesize}{%
-  \@setfontsize\footnotesize{.8\jlreq at fontsize}{\dimexpr 115\jlreq at baselineskip/170\relax}% 脚注文字サイズの二分より少し小さい値を行間に: 4.2.5.e
-  \abovedisplayskip .6\jlreq at gol \@plus.2\jlreq at gol \@minus.4\jlreq at gol
-  \abovedisplayshortskip \z@ \@plus.1\jlreq at gol
-  \belowdisplayshortskip .3\jlreq at gol \@plus.1\jlreq at gol \@minus.2\jlreq at gol
-  \def\@listi{\leftmargin\leftmargini
-    \topsep .3\jlreq at gol \@plus.1\jlreq at gol \@minus.1\jlreq at gol
-    \parsep .2\jlreq at gol \@plus.1\jlreq at gol \@minus.1\jlreq at gol
-    \itemsep \parsep}%
-  \belowdisplayskip \abovedisplayskip}
-% tsize10.cloの引数を,そのまま\jlreq at fontsize/\jlreq at baselineskipでスケーリングしているだけ.
-\newcommand{\small}{%
-  \@setfontsize\small{.9\jlreq at fontsize}{\dimexpr 11\jlreq at baselineskip/17\relax}%
-  \abovedisplayskip .85\jlreq at gol \@plus.3\jlreq at gol \@minus.4\jlreq at gol
-  \abovedisplayshortskip \z@ \@plus.2\jlreq at gol
-  \belowdisplayshortskip .4\jlreq at gol \@plus.2\jlreq at gol \@minus.2\jlreq at gol
-  \def\@listi{\leftmargin\leftmargini
-    \topsep .4\jlreq at gol \@plus.2\jlreq at gol \@minus.2\jlreq at gol
-    \parsep .2\jlreq at gol \@plus.1\jlreq at gol \@minus.1\jlreq at gol
-    \itemsep \parsep}%
-  \belowdisplayskip \abovedisplayskip}
-\newcommand{\scriptsize}{\@setfontsize\scriptsize{\dimexpr 7\jlreq at fontsize/10\relax}{\dimexpr 8\jlreq at baselineskip/17\relax}}
-\newcommand{\tiny}{\@setfontsize\tiny{\dimexpr 5\jlreq at fontsize/10\relax}{\dimexpr 6\jlreq at baselineskip/17\relax}}
-\newcommand{\large}{\@setfontsize\large{\dimexpr12\jlreq at fontsize/10\relax}{\jlreq at baselineskip}}
-\newcommand{\Large}{\@setfontsize\Large{\dimexpr14\jlreq at fontsize/10\relax}{\dimexpr 21\jlreq at baselineskip/17\relax}}
-\newcommand{\LARGE}{\@setfontsize\LARGE{\dimexpr17\jlreq at fontsize/10\relax}{\dimexpr 25\jlreq at baselineskip/17\relax}}
-\newcommand{\huge}{\@setfontsize\huge{2\jlreq at fontsize}{\dimexpr 28\jlreq at baselineskip/17\relax}}
-\newcommand{\Huge}{\@setfontsize\Huge{\dimexpr 25\jlreq at fontsize/10\relax}{\dimexpr 33\jlreq at baselineskip/17\relax}}
-
-\if at tate
-  \ifx l\jlreq at engine
-    \RequirePackage{lltjext}
-  \else
-    \RequirePackage{plext}
-  \fi
-  \renewcommand*{\@Kanji}[1]{\expandafter\kansuji\number #1\relax} % \relax追加
-  \rensujiskip=0\zh plus 0.25\zh minus 0\zh
-\fi
-
-% このあたりはtarticleと同じ
-\setlength\lineskip{.1\jlreq at gol}
-\setlength\normallineskip{.1\jlreq at gol}
-\renewcommand{\baselinestretch}{}
-\setlength\parskip{0\p@ \@plus \p@}
-\setlength\parindent{1\jlreq at mol}
-\@lowpenalty   51
-\@medpenalty  151
-\@highpenalty 301
-
-% 変数定義(他にも散らばっているけど)
-% 罫線の太さ(4.4.3.c 注1)
-\newdimen\jlreq at omotekeiwidth
-\jlreq at omotekeiwidth=0.12mm
-\newdimen\jlreq at chuubusokeiwidth
-\jlreq at chuubusokeiwidth=0.25mm
-\newdimen\jlreq at urakeiwidth
-\jlreq at urakeiwidth=0.4mm
-% 脚注のインデント
-\newdimen\jlreq at footnoteindent
-
-%\RequirePackage{jlreq-debug}
-
-%. ページレイアウト
-% landscapeの場合縦横をひっくり返す
-\if at landscape
-  \setlength\@tempdima  {\paperheight}
-  \setlength\paperheight{\paperwidth}
-  \setlength\paperwidth {\@tempdima}
-\fi
-
-% \pdfpagewidthとか設定
-\ifx l\jlreq at engine
-  \let\jlreq at pagewidth=\pagewidth
-  \let\jlreq at pageheight=\pageheight
-\else
-  \let\jlreq at pagewidth=\pdfpagewidth
-  \let\jlreq at pageheight=\pdfpageheight
-\fi
-\setlength{\jlreq at pagewidth}{\paperwidth}
-\setlength{\jlreq at pageheight}{\paperheight}
-\iftombow
-  \addtolength{\jlreq at pagewidth}{2in}
-  \addtolength{\jlreq at pageheight}{2in}
-\fi
-
-
-\ifx l\jlreq at engine
-  \def\jlreq at expand@speciallength#1{%
-    % zhやzwを\zhや\zwにする.
-    \directlua{
-      local act = string.char(92)
-      local s = [[#1]]
-      s = s:gsub("zw",act .. "zw"):gsub("zh",act .. "zh")
-      tex.print(s)
-    }%
-  }
-\else
-  \def\jlreq at expand@speciallength#1{#1}
-\fi
-\def\jlreq at speciallength#1{\dimexpr\jlreq at expand@speciallength{#1}\relax}
-
-% 二段組み用パラメータ
-\setlength{\columnsep}{\jlreq at speciallength{\jlreq at option@column at gap}}
-\setlength{\columnseprule}{0pt}
-
-% デフォルト値は縦横ともにが0.5倍.
-%.. \textwidth:縦書きは縦,横書きは横
-% 一度\textwidthに一行の長さの文字数を入れる(段組の場合でも)
-\@tempdima=1\jlreq at fontsize
-\ifx\jlreq at option@line at length\@empty
-  \if at tate
-    \setlength{\textwidth}{0.75\paperheight}
-  \else
-    \setlength{\textwidth}{0.75\paperwidth}
-  \fi
-  \if at twocolumn
-    \setlength{\textwidth}{\dimexpr(\textwidth - \columnsep)/2\relax}
-  \fi
-  \divide\textwidth\@tempdima
-\else
-  \setlength{\textwidth}{\jlreq at speciallength{\jlreq at option@line at length}}
-  \divide\textwidth\@tempdima
-  \if at tate
-    \ifnum\number\textwidth>52
-      \jlreq at warning{一行の長さは52文字以下が望ましい (2.4.2.c 注2)}
-    \fi
-  \else
-    \ifnum\number\textwidth>40
-      \jlreq at warning{一行の長さは40文字以下が望ましい (2.4.2.c 注2)}
-    \fi
-  \fi
-\fi
-\multiply\textwidth\@tempdima
-\if at twocolumn
-  \setlength{\textwidth}{\dimexpr2\textwidth + \columnsep\relax}
-\fi
-
-%.. \textheight:縦書きは横,横書きは縦
-\ifx\jlreq at option@number at of@lines\@empty
-  \if at tate
-    \setlength{\textheight}{0.75\paperwidth}
-  \else
-    \setlength{\textheight}{0.75\paperheight}
-  \fi
-  \addtolength{\textheight}{-\topskip}
-  \divide\textheight\baselineskip \multiply\textheight\baselineskip
-  \addtolength{\textheight}{\topskip}
-\else
-  \setlength{\textheight}{\dimexpr\jlreq at speciallength{\jlreq at option@number at of@lines\baselineskip} - \baselineskip + \topskip\relax}
-\fi
-
-\setlength{\topskip}{1\zw} % フォントサイズと一致させる
-\ifx\jlreq at option@headfoot at verticalpos\@empty
-  \if at tate\def\jlreq at option@headfoot at verticalpos{1zh}
-  \else\def\jlreq at option@headfoot at verticalpos{2zh}\fi
-\fi
-\setlength{\headsep}{\jlreq at speciallength{\jlreq at option@headfoot at verticalpos}}
-\ifdim\headsep<1\zw\jlreq at warning{基本版面との上下方向の最低の空き量を,基本版面の文字サイズの全角アキとする (26.1.a)}\fi
-\setlength{\headheight}{1\zh}
-%.. 横
-\ifx\jlreq at option@gutter\@empty
-  % 中央配置
-  \setlength{\oddsidemargin}{\paperwidth}
-  \if at tate
-    \addtolength{\oddsidemargin}{-\textheight}
-  \else
-    \addtolength{\oddsidemargin}{-\textwidth}
-  \fi
-  \setlength{\oddsidemargin}{.5\oddsidemargin}
-  \addtolength{\oddsidemargin}{-1in}
-  \setlength{\evensidemargin}{\oddsidemargin}
-\else
-  \setlength{\oddsidemargin}{\jlreq at speciallength{\jlreq at option@gutter}}
-  \setlength{\evensidemargin}{\dimexpr\paperwidth - \textheight - \oddsidemargin\relax}
-  \if at tate
-    \setlength{\jlreq at tempdima}{\oddsidemargin}
-    \setlength{\oddsidemargin}{\evensidemargin}
-    \setlength{\evensidemargin}{\jlreq at tempdima}
-  \fi
-  \addtolength{\oddsidemargin}{-1in}
-  \addtolength{\evensidemargin}{-1in}
-\fi
-%.. 縦
-\ifx\jlreq at option@head at space\@empty
-  \setlength{\topmargin}{\paperheight}
-  \if at tate
-    \addtolength{\topmargin}{-\textwidth}
-  \else
-    \addtolength{\topmargin}{-\textheight}
-  \fi
-  \ifx\jlreq at option@foot at space\@empty
-    % 中央配置
-    \setlength{\topmargin}{0.5\topmargin}
-  \else
-    \addtolength{\topmargin}{-\jlreq at speciallength{\jlreq at option@foot at space}}
-  \fi
-\else
-  \ifx\jlreq at option@foot at space\@empty
-    \setlength{\topmargin}{\jlreq at speciallength{\jlreq at option@head at space}}
-  \else
-    % 両方指定されていたら,縦書きは地を,横書きは天を使う
-    \if at tate
-      \setlength{\topmargin}{\paperheight}
-      \addtolength{\topmargin}{-\textwidth}
-      \addtolength{\topmargin}{-\jlreq at speciallength{\jlreq at option@foot at space}}
-    \else
-      \setlength{\topmargin}{\jlreq at speciallength{\jlreq at option@head at space}}
-    \fi
-  \fi
-\fi
-
-
-\addtolength{\topmargin}{-\headsep}
-\addtolength{\topmargin}{-\headheight}
-\addtolength{\topmargin}{-1in}
-%.. 下
-% 本文から一文字分離すつもり
-\setlength{\footskip}{2\zh}
-% \maxdepth + \topskip = フォントサイズ×1.5
-\setlength{\maxdepth}{1.5\jlreq at fontsize}
-\addtolength{\maxdepth}{-\topskip}
-
-%. 見出し関係 (4.1)
-% 見出しの直前に実行される
-\newcommand*{\jlreq at hook@beforeheadings}[1]{}
-\def\jlreq at heading@allheadings{}
-%.. 中/半扉見出し
-% addcontentslineに渡すやつ:番号出すのと出さないの
-\newcommand{\DeclareTobiraHeading}[3]{%
-  \appto{\jlreq at heading@allheadings}{,#1}%
-  \expandafter\def\csname jlreq at heading@level@#1\endcsname{#2}%
-  \expandafter\edef\csname jlreq at heading@setting@#1\endcsname{\unexpanded{#3}}%
-  \expandafter\def\csname jlreq at heading@type@#1\endcsname{\RenewTobiraHeading}%
-  \@ifundefined{c@#1}{\newcounter{#1}}{}%
-  \@ifundefined{#1mark}{\expandafter\let\csname #1mark\endcsname\@gobble}{}%
-  \@ifundefined{jlreq at heading@maketoc@#1}{%
-    % {1 = *}{2 = ラベル}{3 = running head}
-    \expandafter\def\csname jlreq at heading@maketoc@#1\endcsname##1##2##3{%
-      \ifnum0\jlreq at ifempty{##1}{}{1}\ifnum #2>\c at secnumdepth 1\fi>0\else
-        \csname #1mark\endcsname{##3}%
-        \addcontentsline{toc}{#1}{\protect\numberline{##2}##3}%
-      \fi
-    }%
-  }{}%
-  \begingroup
-    \def\jlreq at contents@format##1{##1}%
-    \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 pagestyle{empty}%
-    \jlreq at parsekeyval[DeclareTobiraHeading]{
-      {contentsline_format}{\def\jlreq at contents@format####1{##1}}
-      {contentsline_label_format}{\def\jlreq at contents@label at format{##1}}
-      {label_format}{\def\jlreq at label@format{##1}}
-      {format}{\def\jlreq at format####1####2{##1}}
-      {pagestyle}{\def\jlreq at pagestyle{##1}}
-      {type}[han,naka]{
-        \jlreq at switch{##1}{
-          {han}{\def\jlreq at heading@clearpage{\clearpage}}
-          {naka}{\def\jlreq at heading@clearpage{\cleardoublepage}}
-        }
-      }
-    }{#3}%
-    \ifx\jlreq at contents@label at format\@undefined
-      \let\jlreq at contents@label at format=\jlreq at label@format
-    \fi
-    \ifx\jlreq at format\@undefined
-      \def\jlreq at format##1##2{##1##2}%
-    \fi
-    \edef\jlreq at formatwlabel{\noexpand\jlreq at format{\expandonce{\jlreq at label@format}}}%
-    \def\jlreq at addtodo{}%
-    \@ifundefined{l@#1}{%
-      \edef\jlreq at do{\unexpanded{\setbox\jlreq at tempboxa=\hbox}{\expandonce{\jlreq at label@format}}}%
-      \jlreq at do
-      \jlreq at tempdima=\wd\jlreq at tempboxa
-      \jlreq at tempdimb=1\jlreq at mol
-      \divide\jlreq at tempdima by \jlreq at tempdimb
-      \eappto\jlreq at addtodo{%
-        \noexpand\def\expandonce{\csname l@#1\endcsname}{\unexpanded{\@dottedtocline{#2}{0\jlreq at mol}}{\the\numexpr\jlreq at tempdima + 1\relax\noexpand\jlreq at mol}}%
-      }%
-    }{}%
-    \edef\jlreq at do{%
-     \expandonce{\jlreq at addtodo}%
-      \noexpand\def\expandonce{\csname jlreq at TobiraHeading@start@#1\endcsname}[####1]####2{%
-        \unexpanded{\ifnum#2>\c at secnumdepth\else}%
-          \unexpanded{\refstepcounter{#1}}%
-        \noexpand\fi
-        \expandonce{\csname jlreq at heading@maketoc@#1\endcsname}{}{\expandonce{\jlreq at label@format}}{####1}%
-        \unexpanded{\ifnum#2>\c at secnumdepth\relax}%
-          \expandonce{\jlreq at format{}{##1}}%
-        \noexpand\else
-          \expandafter\expandonce\expandafter{\jlreq at formatwlabel{##2}}%
-        \noexpand\fi
-        \noexpand\@afterheading
-        \expandonce{\jlreq at heading@clearpage}%
-        \unexpanded{\if at restonecol\twocolumn\fi}%
-      }%
-      \noexpand\def\expandonce{\csname jlreq at TobiraHeading@start at s@#1\endcsname}####1{%
-        \expandonce{\jlreq at format{}{##1}}%
-        \expandonce{\csname jlreq at heading@maketoc@#1\endcsname}{}{\expandonce{\jlreq at label@format}}{####1}%
-        \noexpand\@afterheading
-        \expandonce{\jlreq at heading@clearpage}%
-        \unexpanded{\if at restonecol\twocolumn\fi}%
-      }%
-      \noexpand\def\expandonce{\csname #1\endcsname}{%
-        \unexpanded{\if at twocolumn\onecolumn\@restonecoltrue\else\@restonecolfalse\fi\cleardoublepage}%
-        \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}}}%
-    }%
-  \expandafter\endgroup
-  \jlreq at do
-}
-
-\newcommand{\NewTobiraHeading}[3]{%
-  \expandafter\@ifdefinable\csname #1\endcsname{\DeclareTobiraHeading{#1}{#2}{#3}}%
-}
-\newcommand{\RenewTobiraHeading}[3]{%
-  \@ifundefined{#1}{\@latex at error{\expandafter\string\csname#1\endcsname\space undefined}\@ehc}{\DeclareTobiraHeading{#1}{#2}{#3}}%
-}
-\newcommand{\ProvideTobiraHeading}[3]{%
-  \@ifundefined{#1}{\DeclareTobiraHeading{#1}{#2}{#3}}{}%
-}
-
-%.. 別行見出し
-% \jlreq at startBlockHeading{1 = 命令名}{2 = レベル}{3 = 字下げ}{4 = 前空き}{5 = 後ろ空き}{6 = トータル行数}{7 =  フォーマット関連}*{見出し}[副題]
-% 字下げはa:**だと追加する値(ページ行頭には入らない),s:**も追加だがページ行頭でも入る,
-% r:**だとその値に強制する.
-\newcommand{\jlreq at startBlockHeading}[7]{%
-  \edef\jlreq at startBlockHeading@format{\unexpanded{#7}}%
-  \jlreq at startBlockHeading@{#1}{#2}{{#3}{#4}{#5}{#6}}%
-}
-% {1 = 命令}{2 = レベル}{3 = スペース関連}
-\newcommand{\jlreq at startBlockHeading@}[3]{%
-  \@ifstar{\@dblarg{\jlreq at startBlockHeading@@{#1}{#2}{#3}{*}}}{\@dblarg{\jlreq at startBlockHeading@@{#1}{#2}{#3}{}}}%
-}
-% {1 = 命令}{2 = レベル}{3 = スペース関連}{4 = *}[5 = running head]{6 = 見出し}
-\long\def\jlreq at startBlockHeading@@#1#2#3#4[#5]#6{%
-  \@ifnextchar[{\jlreq at startBlockHeading@@@{#1}{#2}{#3}{#4}{#5}{#6}}{\jlreq at startBlockHeading@@@{#1}{#2}{#3}{#4}{#5}{#6}[]}%
-}
-
-% {1 = レベル}{2 = ラベルフォーマット}{3 = 本体フォーマット}{4 = 副題フォーマット}{5 = *}{6 = 見出し}{7 = 副題}
-\long\def\jlreq at startBlockHeading@setformat#1#2#3#4#5#6#7{%
-  % \jlreq at tempaに{ラベル}{見出し}{副題}という形のものを入れる
-  \ifnum0\jlreq at ifempty{#5}{}{1}\ifnum #1>\c at secnumdepth 1\fi>0
-    \def\jlreq at tempa{{}{#6}}%
-  \else
-    \def\jlreq at tempa{{#2}{#6}}%
-  \fi
-  \jlreq at ifempty{#7}{%
-    \appto\jlreq at tempa{{}}%
-  }{%
-    \long\def\jlreq at tempb##1{#4}%
-    \expandafter\appto\expandafter\jlreq at tempa\expandafter{\expandafter{\jlreq at tempb{#7}}}%
-  }%
-  \long\def\jlreq at tempb##1##2##3{#3}%
-  \edef\jlreq at tempa{\unexpanded{\expandafter\def\expandafter\jlreq at result\expandafter}{\noexpand\jlreq at tempb\expandonce{\jlreq at tempa}}}%
-  \jlreq at tempa
-}
-% {1 = 命令}{2 = レベル}{3 = スペース関連}{4 = *}{5 = running head}{6 = 見出し}[7 = 副題]
-\def\jlreq at startBlockHeading@@@#1#2#3#4#5#6[#7]{%
-  \ifnum0\jlreq at ifempty{#4}{}{1}\ifnum #2>\c at secnumdepth 1\fi>0\else
-    \refstepcounter{#1}%
-  \fi
-  % 後で呼び出す\jlreq at startBlockHeading@addtocontentslineを定義する
-  \long\def\jlreq at tempa##1##2##3{\def\jlreq at tempa{##1}}%
-  \expandafter\jlreq at tempa\jlreq at startBlockHeading@format
-  \edef\jlreq at startBlockHeading@addtocontentsline{%
-    \expandonce{\csname jlreq at heading@maketoc@#1\endcsname}{\unexpanded{#4}}{\expandonce{\jlreq at tempa}}{\unexpanded{#5}}%
-  }%
-  \def\jlreq at do{\jlreq at startBlockHeading@setformat{#2}}%
-  \expandafter\jlreq at do\jlreq at startBlockHeading@format{#4}{#6}{#7}%
-  \def\jlreq at do{\jlreq at startBlockHeading@@@@#3}%
-  \expandafter\jlreq at do\expandafter{\jlreq at result}%
-}
-\def\jlreq at startBlockHeading@removecolumn#1:{#1}
-
-\def\jlreq at startBlockHeading@analyzespace#1:#2\jlreq at endmark{%
-  \jlreq at ifempty{#1}{%
-    \def\jlreq at startBlockHeading@spacetype{}%
-    \def\jlreq at startBlockHeading@space{}%
-  }{%
-    \let\jlreq at startBlockHeading@spacetype=#1%
-    \expandafter\def\expandafter\jlreq at startBlockHeading@space\expandafter{\jlreq at startBlockHeading@removecolumn#2}%
-  }%
-}
-
-% {1 = 字下げ}{2 = 前空き}{3 = 後ろ空き}{4 = トータル行数}{5 = 出力}
-\long\def\jlreq at startBlockHeading@@@@#1#2#3#4#5{%
-  \if at noskipsec\leavevmode\fi
-  \setbox\jlreq at tempboxa=\vbox{%
-    \jlreq at ifempty{#1}{}{\hsize=\dimexpr\hsize - #1\relax}%
-    \noindent #5}%
-  \par
-  \@afterindenttrue
-  % \jlreq at tempskip(a/b)に前/後ろに入れるべき値を入れる
-  % #2がa:ならばその値は\jlreq at tempskipaには入れず\jlreq at tempskipcに入れておく
-  \jlreq at tempskipc=0pt
-  \jlreq at startBlockHeading@analyzespace#2:\jlreq at endmark
-  \setbox\jlreq at tempboxb=\vbox{ }%
-  \jlreq at ifempty{#4}{%
-    \ifx\jlreq at startBlockHeading@space\@empty\else
-      \jlreq at tempskipa=\glueexpr\jlreq at startBlockHeading@space\relax
-    \fi
-    \jlreq at tempskipb=0pt\relax
-  }{%
-    \jlreq at tempskipb=\glueexpr(\baselineskip*(#4 + 1) - \ht\jlreq at tempboxb - \dp\jlreq at tempboxb - \ht\jlreq at tempboxa - \dp\jlreq at tempboxa)/2\relax
-    \ifx\jlreq at startBlockHeading@space\@empty
-      \jlreq at tempskipa=\jlreq at tempskipb
-    \else
-      \ifx a\jlreq at startBlockHeading@spacetype
-        \jlreq at tempskipa=\jlreq at tempskipb
-        \jlreq at tempskipc=\glueexpr\jlreq at startBlockHeading@space\relax
-      \fi
-      \ifx s\jlreq at startBlockHeading@spacetype
-        \jlreq at tempskipa=\glueexpr\jlreq at tempskipb + \jlreq at startBlockHeading@space\relax
-      \fi
-      \ifx r\jlreq at startBlockHeading@spacetype
-        \jlreq at tempskipa=\glueexpr\jlreq at startBlockHeading@space\relax%
-        \jlreq at tempskipb=\glueexpr(\baselineskip*(#4 + 1) - \ht\jlreq at tempboxb - \dp\jlreq at tempboxb - \ht\jlreq at tempboxa - \dp\jlreq at tempboxa) - \jlreq at startBlockHeading@space\relax
-      \fi
-    \fi
-  }%
-  \ifdim\jlreq at tempskipc=0pt\else\vspace{\jlreq at tempskipc}\fi
-  % \baselineskipから来るglueを引いておく
-  \jlreq at tempskipa=\glueexpr\jlreq at tempskipa - \baselineskip + \dp\jlreq at tempboxb\relax
-  \jlreq at startBlockHeading@addtocontentsline
-  \setbox\jlreq at tempboxa=\vbox{%
-    \ifdim\jlreq at tempskipa=0pt\else\vskip\jlreq at tempskipa\fi
-    \noindent
-    \jlreq at ifempty{#1}{}{\hskip #1}%
-    \box\jlreq at tempboxa\nopagebreak}%
-  \dp\jlreq at tempboxa=\dimexpr\dp\jlreq at tempboxa + \ht\jlreq at tempboxa\relax
-  \ht\jlreq at tempboxa=0pt
-  \box\jlreq at tempboxa
-  \par\nobreak
-  \prevdepth=0pt
-  \jlreq at startBlockHeading@analyzespace#3:\jlreq at endmark
-  \jlreq at tempskipb=\glueexpr\jlreq at tempskipb + \ht\jlreq at tempboxb - \baselineskip\relax
-  \ifx\jlreq at startBlockHeading@space\@empty\else
-    \ifx a\jlreq at startBlockHeading@spacetype
-      \jlreq at tempskipb = \glueexpr\jlreq at tempskipb + \jlreq at startBlockHeading@space\relax
-    \else
-      \jlreq at tempskipb=\glueexpr\jlreq at startBlockHeading@space + \ht\jlreq at tempboxb - \baselineskip\relax
-    \fi
-  \fi
-  \ifdim\jlreq at tempskipb=0pt\else\vspace{\jlreq at tempskipb}\fi
-  \@afterheading
-}
-
-% \DeclareBlockHeading{命令名}{レベル}{設定}
-% 行取り(4.1.6)
-% a: lines=<何行取りか>
-% b,d: before_lines, after_lines
-% c: before_space, after_space
-% f: beforeやafterを省略する
-% font=<見出しフォント>, labelfont=<ラベルフォント>, subtitle_font=<副題フォント>
-% indent=<全体のインデント>
-% pagebreak=clearpage/cleardoublepage/newcolumn/nariyuki
-% なお,これ以外に見出しの前後に記号を付ける,あるいは罫線を見出しの前後に配置する,罫線で見出しを囲むなどといったことも行われている.
-% 縦組の偶数ページの場合は,ページ末に見出しを配置する.
-\newcommand{\DeclareBlockHeading}[3]{%
-  \appto{\jlreq at heading@allheadings}{,#1}%
-  \expandafter\def\csname jlreq at heading@level@#1\endcsname{#2}%
-  \expandafter\edef\csname jlreq at heading@setting@#1\endcsname{\unexpanded{#3}}%
-  \expandafter\def\csname jlreq at heading@type@#1\endcsname{\RenewBlockHeading}%
-  \@ifundefined{c@#1}{\newcounter{#1}}{}%
-  \@ifundefined{#1mark}{\expandafter\let\csname #1mark\endcsname\@gobble}{}%
-  % 目次への出力をするマクロ.外部に切り出しておく.
-  \@ifundefined{jlreq at heading@maketoc@#1}{%
-    % {1 = *}{2 = ラベル}{3 = running head}
-    \expandafter\def\csname jlreq at heading@maketoc@#1\endcsname##1##2##3{%
-      \ifnum0\jlreq at ifempty{##1}{}{1}\ifnum #2>\c at secnumdepth 1\fi>0\else
-        \csname #1mark\endcsname{##3}%
-        \addcontentsline{toc}{#1}{\protect\numberline{##2}##3}%
-      \fi
-    }%
-  }{}%
-  \begingroup
-    \def\jlreq at lines{1}%
-    \def\jlreq at before@space{}%
-    \def\jlreq at after@space{}%
-    \def\jlreq at before@lines{}%
-    \def\jlreq at after@lines{}%
-    \def\jlreq at font{\normalsize}%
-    \def\jlreq at subtitle@font{\normalsize}%
-    \def\jlreq at indent{0}%
-    \let\jlreq at format=\@undefined
-    \def\jlreq at pagebreak{}%
-    \let\jlreq at label@format=\@undefined
-    \let\jlreq at subtitle@format=\@undefined
-    \def\jlreq at pagetop@space{a}%
-    \jlreq at parsekeyval[BlockHeading]{
-      {lines}{\def\jlreq at lines{##1}}
-      {before_space}{\def\jlreq at before@space{##1}}
-      {after_space}{\def\jlreq at after@space{##1}}
-      {before_lines}{\def\jlreq at before@lines{##1}}
-      {after_lines}{\def\jlreq at after@lines{##1}}
-      {font}{\def\jlreq at font{##1}}
-      {subtitle_font}{\def\jlreq at subtitle@font{##1}}
-      {indent}{\def\jlreq at indent{##1}}
-      {format}{\edef\jlreq at format{\unexpanded{##1}}}
-      {label_format}{\edef\jlreq at label@format{\unexpanded{##1}}}
-      {subtitle_format}{\def\jlreq at subtitle@format{##1}}
-      *{pagetop_space}{\def\jlreq at pagetop@space{s}}% ページ頭でもスペースを入れる
-      {pagebreak}[clearpage,cleardoublepage,clearcolumn,nariyuki]{
-        \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{}}
-        }
-      }
-    }{#3}%
-    \ifx\jlreq at format\@undefined
-      \edef\jlreq at format{%
-        \expandonce{\jlreq at font}\unexpanded{##1}\unexpanded{##2}%
-        \unexpanded{##3}%
-      }%
-    \fi
-    \ifx\jlreq at label@format\@undefined
-      \def\jlreq at label@format{\@seccntformat{#1}}%
-    \fi
-    \ifx\jlreq at subtitle@format\@undefined
-      \edef\jlreq at subtitle@format{{\unexpanded{\nobreak\par\hspace*{4\jlreq at mol}}\expandonce{\jlreq at subtitle@font}---\unexpanded{##1}---}}%
-    \fi
-    \def\jlreq at addtodo{}%
-    \@ifundefined{l@#1}{
-      % 長さは適当に計測する
-      \begingroup
-        % ちょっと大きめで計測しておく
-        \csname c@#1\endcsname=9
-        \setbox\jlreq at tempboxa=\hbox{\jlreq at label@format}%
-        \edef\jlreq at do{\noexpand\jlreq at tempdima=\the\dimexpr\wd\jlreq at tempboxa\relax}%
-      \expandafter\endgroup
-      \jlreq at do
-      \jlreq at tempdimb=1\jlreq at mol
-      \divide\jlreq at tempdima by \jlreq at tempdimb
-      \eappto\jlreq at addtodo{%
-        \noexpand\def\expandonce{\csname l@#1\endcsname}{\unexpanded{\@dottedtocline{#2}{0\jlreq at mol}}{\the\numexpr\jlreq at tempdima + 1\relax\noexpand\jlreq at mol}}%
-      }%
-    }{}%
-    % before/after_lines優先
-    \ifx\jlreq at before@space\@empty\else\edef\jlreq at before@space{r:\expandonce{\jlreq at before@space}}\fi
-    \ifx\jlreq at before@lines\@empty\else\edef\jlreq at before@space{\expandonce{\jlreq at pagetop@space}:\expandonce{\jlreq at before@lines}\baselineskip}\fi
-    \ifx\jlreq at after@space\@empty\else\edef\jlreq at after@space{r:\expandonce{\jlreq at after@space}}\fi
-    \ifx\jlreq at after@lines\@empty\else\edef\jlreq at after@space{a:\expandonce{\jlreq at after@lines}\baselineskip}\fi
-    \ifx\jlreq at indent\@empty\else\edef\jlreq at indent{\expandonce{\jlreq at indent}\jlreq at mol}\fi
-    \edef\jlreq at do{%
-      \expandonce{\jlreq at addtodo}%
-      \noexpand\edef\expandonce{\csname #1\endcsname}{\noexpand\unexpanded{%
-        \noexpand\jlreq at hook@beforeheadings{#1}%
-        \expandonce{\jlreq at pagebreak}%
-        \unexpanded{\jlreq at startBlockHeading{#1}{#2}}{\expandonce{\jlreq at indent}}{\expandonce{\jlreq at before@space}}{\expandonce{\jlreq at after@space}}{\expandonce{\jlreq at lines}}{{\expandonce{\jlreq at label@format}}{\expandonce{\jlreq at format}}{\expandonce{\jlreq at subtitle@format}}%
-      }}}%
-    }%
-  \expandafter\endgroup
-  \jlreq at do
-}
-
-\newcommand{\NewBlockHeading}[3]{%
-  \expandafter\@ifdefinable\csname #1\endcsname{\DeclareBlockHeading{#1}{#2}{#3}}%
-}
-\newcommand{\RenewBlockHeading}[3]{%
-  \@ifundefined{#1}{\@latex at error{\expandafter\string\csname#1\endcsname\space undefined}\@ehc}{\DeclareBlockHeading{#1}{#2}{#3}}%
-}
-\newcommand{\ProvideBlockHeading}[3]{%
-  \@ifundefined{#1}{\DeclareBlockHeading{#1}{#2}{#3}}{}%s
-}
-
-%.. 同行見出し
-% \DeclareRuninHeading{命令名}{レベル}{設定}
-\newcommand*{\DeclareRuninHeading}[3]{%
-  \appto{\jlreq at heading@allheadings}{,#1}%
-  \expandafter\def\csname jlreq at heading@level@#1\endcsname{#2}%
-  \expandafter\edef\csname jlreq at heading@setting@#1\endcsname{\unexpanded{#3}}%
-  \expandafter\def\csname jlreq at heading@type@#1\endcsname{\RenewRuninHeading}%
-  \@ifundefined{c@#1}{\newcounter{#1}}{}%
-  \@ifundefined{#1mark}{\expandafter\let\csname #1mark\endcsname\@gobble}{}%
-  \@ifundefined{l@#1}{\expandafter\def\csname l@#1\endcsname{\@dottedtocline{#2}{0\jlreq at mol}{2\jlreq at gol}}}{}%
-  \begingroup
-    \def\jlreq at font{\normalfont\normalsize}%
-    \def\jlreq at indent{0}%
-    \def\jlreq at mark{}%
-    \jlreq at parsekeyval[RuninHeading]{%
-      {font}{\def\jlreq at font{##1}}
-      {indent}{\def\jlreq at indent{##1}}
-      {mark}{\def\jlreq at mark{##1}}
-    }{#3}%
-    % \@startsection{#1}{#2}{<indent>*fontsize}{0pt}{-fontsize}{font}
-    \edef\jlreq at do{%
-      \noexpand\def\expandonce{\csname #1\endcsname}{%
-        \unexpanded{\jlreq at hook@beforeheadings{#1}}%
-        \noexpand\@startsection{\unexpanded{#1}}{\unexpanded{#2}}{\expandonce{\jlreq at indent}\jlreq at mol}{0pt}{-1\jlreq at fontsize}{\expandonce{\jlreq at font}\expandonce{\jlreq at mark}}%
-      }%
-    }%
-  \expandafter\endgroup
-  \jlreq at do
-}
-\newcommand*{\NewRuninHeading}[3]{%
-  \expandafter\@ifdefinable\csname #1\endcsname{\DeclareRuninHeading{#1}{#2}{#3}}%
-}
-\newcommand*{\RenewRuninHeading}[3]{%
-  \@ifundefined{#1}{\@latex at error{\expandafter\string\csname#1\endcsname\space undefined}\@ehc}{\DeclareRuninHeading{#1}{#2}{#3}}%
-}
-\newcommand*{\ProvideRuninHeading}[3]{%
-  \@ifundefined{#1}{\DeclareRuninHeading{#1}{#2}{#3}}{}%
-}
-
-%.. 窓見出し
-\newcount\jlreq at wraplinecount
-\newdimen\jlreq at hangindent
-\def\jlreq at CutinHeading@start#1#2#3#4#5#6#7{%
-  \ifnum0\ifnum\jlreq at wraplinecount<-1 1\fi\ifnum\jlreq at wraplinecount>1 1\fi>0
-    \ClassError{jlreq}{Can not use \expandafter\string\csname#1\endcsname\space here}{\@ehc}%
-  \else
-    \jlreq at CutinHeading@@start{#2}{#3}{#4}{#5}{#6}{#7}%
-  \fi
-}
-% 1 = 書式指定,2 = インデント, 3 = 見出しと本文の間, 4 = これを越えたら二行以上,5 = これを越えたら三行以上,6 = テキスト
-\def\jlreq at CutinHeading@@start#1#2#3#4#5#6{%
-  \par\leavevmode
-  % 一行で処理したときの見出し長さを計測
-  \setbox\@tempboxa=\hbox{#1#6}%
-  \@tempdima=\wd\@tempboxa
-  % 何行必要かを\jlreq at CutinHeading@linecountに入れる
-  \ifdim\@tempdima>#5\def\jlreq at CutinHeading@linecount{3}%
-  \else\ifdim\@tempdima>#4\def\jlreq at CutinHeading@linecount{2}%
-  \else\def\jlreq at CutinHeading@linecount{1}\fi\fi
-  % \@tempdimaが実際の一行の長さに近い
-  \divide\@tempdima by \jlreq at CutinHeading@linecount
-  % \jlreq at resultboxに見出し部分を,\jlreq at CutinHeading@linecountに何行使うかを入れる
-  \ifnum\jlreq at CutinHeading@linecount=1\relax
-    \setbox\jlreq at resultbox=\vbox{\parindent=0pt\rightskip=0pt\leftskip=0pt\hbox{#1#6}}%
-    \def\jlreq at CutinHeading@linecount{2}%
-  \else
-    \jlreq at inlinenote@determinelength{#6}{#1}{}{\jlreq at CutinHeading@linecount}{\jlreq at CutinHeading@linecount}{\@tempdima}{\linewidth}%
-    \def\jlreq at CutinHeading@linecount{3}%
-  \fi
-  % 普通の一行の高さ/深さに合わせて見出しのボックスを出力
-  \setbox\@tempboxa=\vtop to \dimexpr\numexpr\jlreq at CutinHeading@linecount - 1\relax\baselineskip + 1\jlreq at gol\relax{\vskip 0pt plus 1fill minus 1fill \box\jlreq at resultbox\vskip 0pt plus 1fill minus 1fill}%
-  \setbox\jlreq at tempboxa=\hbox{あ}%
-  \ht\@tempboxa=\ht\jlreq at tempboxa
-  \dp\@tempboxa=\dp\jlreq at tempboxa
-  \@tempdima=\wd\@tempboxa
-  % \hang****を設定
-  \hangindent=\dimexpr#2\jlreq at mol + \@tempdima + #3\relax\hangafter=-\jlreq at CutinHeading@linecount
-  \jlreq at hangindent=\hangindent\jlreq at wraplinecount=\hangafter
-  \hspace*{#2\jlreq at mol}%
-  \kern-\dimexpr\@tempdima + #3 + \parindent\relax
-  \box\@tempboxa
-  \hspace*{#3}%
-  % 改段落が起こっても\hang****をキープするように\parを書き換えておく(終わったら元に戻す).
-  % \jlreq at hangindent/\jlreq at wraplinecountにそれぞれ\hangindent/\hangafterに対応する値を入れて
-  % \parのたびにそこから代入する.
-  \def\par{%
-    \@@par
-    \ifnum\jlreq at wraplinecount<-1\relax
-      \ifnum\jlreq at wraplinecount<-\prevgraf
-        \advance\jlreq at wraplinecount by \prevgraf\hangindent=\jlreq at hangindent\hangafter=\jlreq at wraplinecount
-      \else
-        \jlreq at wraplinecount=1\jlreq at hangindent=0pt\relax
-        \@restorepar
-      \fi
-    \else
-      \jlreq at wraplinecount=1\jlreq at hangindent=0pt\relax
-      \@restorepar
-    \fi
-  }%
-  \ignorespaces
-}
-
-\newcommand*{\DeclareCutinHeading}[3]{%
-  \expandafter\def\csname jlreq at heading@level@#1\endcsname{#2}%
-  \expandafter\def\csname jlreq at heading@setting@#1\endcsname{#3}%
-  \expandafter\def\csname jlreq at heading@type@#1\endcsname{\RenewCutinHeading}%
-  \begingroup
-    \def\jlreq at fontcommand{\headfont}%
-    \def\jlreq at onelinemax{6\jlreq at fontsize}%
-    \def\jlreq at twolinemax{20\jlreq at fontsize}%
-    \def\jlreq at indent{0}%
-    \def\jlreq at afterindent{1\jlreq at mol}%
-    \jlreq at parsekeyval[CutinHeading]{
-      {font}{\def\jlreq at fontcommand{##1}}
-      {onelinemax}{\def\jlreq at onelinemax{##1}}
-      {twolinemax}{\def\jlreq at twolinemax{##1}}
-      {indent}{\def\jlreq at indent{##1}}
-      {afterindent}{\def\jlreq at afterindent{##1}}
-    }{#3}%
-    \edef\jlreq at do{%
-      \noexpand\def\expandonce{\csname #1\endcsname}{%
-        \noexpand\jlreq at CutinHeading@start{#1}{\expandonce{\jlreq at fontcommand}}{\expandonce{\jlreq at indent}}{\expandonce{\jlreq at afterindent}}{\expandonce{\jlreq at onelinemax}}{\expandonce{\jlreq at twolinemax}}%
-      }%
-    }%
-  \expandafter\endgroup
-  \jlreq at do
-}
-\newcommand*{\NewCutinHeading}[3]{%
-  \expandafter\@ifdefinable\csname #1\endcsname{\DeclareCutinHeading{#1}{#2}{#3}}%
-}
-\newcommand*{\RenewCutinHeading}[3]{%
-  \@ifundefined{#1}{\@latex at error{\expandafter\string\csname#1\endcsname\space undefined}\@ehc}{\DeclareCutinHeading{#1}{#2}{#3}}%
-}
-\newcommand*{\ProvideCutinHeading}[3]{%
-  \@ifundefined{#1}{\DeclareCutinHeading{#1}{#2}{#3}}{}%
-}
-
-\newcommand{\ModifyHeading}[2]{%
-  \begingroup
-    \@ifundefined{jlreq at heading@setting@#1}{\ClassError{jlreq}{Unknown heading: #1}{\@ehc}}%
-    \expandafter\let\expandafter\level\expandafter=\csname jlreq at heading@level@#1\endcsname
-    \expandafter\let\expandafter\setting\expandafter=\csname jlreq at heading@setting@#1\endcsname
-    \expandafter\let\expandafter\macroname\expandafter=\csname jlreq at heading@type@#1\endcsname
-    \edef\jlreq at do{\expandonce{\macroname}{#1}{\expandonce{\level}}{\expandonce{\setting},\unexpanded{#2}}}%
-  \expandafter\endgroup
-  \jlreq at do
-}
-% 見出し#1をマクロ#2に保存する
-\newcommand{\SaveHeading}[2]{%
-  \@ifundefined{jlreq at heading@setting@#1}{\ClassError{jlreq}{Unknown heading: #1}{\@ehc}}%
-  \begingroup
-    \edef\jlreq at do{%
-      \unexpanded{\edef#2}{%
-        \noexpand\expandonce{\expandonce{\csname jlreq at heading@type@#1\endcsname}}%
-        \noexpand\unexpanded{\unexpanded{{#1}}}%
-        {\noexpand\expandonce{\expandonce{\csname jlreq at heading@level@#1\endcsname}}}%
-        {\noexpand\expandonce{\expandonce{\csname jlreq at heading@setting@#1\endcsname}}}%
-      }%
-    }%
-  \expandafter\endgroup
-  \jlreq at do
-}
-
-\newcommand*{\jlreq at keepbaselineskip}[1]{%
-  \begingroup
-    \jlreq at tempdima=\baselineskip
-    \edef\jlreq at do{\unexpanded{#1}\noexpand\baselineskip=\the\jlreq at tempdima}%
-  \expandafter\endgroup
-  \jlreq at do
-}
-
-\setcounter{secnumdepth}{3}
-\newcounter{part}
-\jlreq at switch{\jlreq at article@type}{
-  {article}{\newcounter{section}}
-  {\newcounter{chapter}\newcounter{section}[chapter]}% book, report
-}
-\newcounter{subsection}[section]
-\newcounter{subsubsection}[subsection]
-\newcounter{paragraph}[subsubsection]
-\newcounter{subparagraph}[paragraph]
-\renewcommand*{\@seccntformat}[1]{\csname the#1\endcsname\hspace{1\jlreq at mol}}
-\newcommand*{\headfont}{\gtfamily\sffamily}
-
-
-\newcommand*\jlreq at HeadingType[1]{%
-  \expandafter\ifx\csname jlreq at heading@type@#1\endcsname\relax UndefinedHeading
-  \else
-    \jlerq at HeadingType@{#1}{\RenewTobiraHeading}{TobiraHeading}{%
-    \jlerq at HeadingType@{#1}{\RenewBlockHeading}{BlockHeading}{%
-    \jlerq at HeadingType@{#1}{\RenewRuninHeading}{RuninHeading}{%
-    \jlerq at HeadingType@{#1}{\RenewCutinHeading}{CutinHeading}{%
-    UnknownHeading}}}}%
-  \fi
-}
-\newcommand*\jlerq at HeadingType@[2]{%
-  \expandafter\expandafter\expandafter\ifx\csname jlreq at heading@type@#1\endcsname#2\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
-}
-
-%.. 各種定義
-\if at tate
-  \renewcommand{\thepart}{\Kanji{part}}
-  \ifthenelse{\equal{\jlreq at article@type}{article}}{}{\renewcommand{\thechapter}{\Kanji{chapter}}}
-  \renewcommand{\thesection}{\rensuji{\@arabic\c at section}}
-  \renewcommand{\thesubsection}{\rensuji{\@alph\c at subsection}}
-  \renewcommand{\thesubsubsection}{%
-    \rensuji{\@arabic\c at subsubsection}}
-  \renewcommand{\theparagraph}{%
-    (\rensuji{\@arabic\c at paragraph})}
-  \renewcommand{\thesubparagraph}{%
-    (\rensuji{\@arabic\c at subparagraph})}
-
-  \ifthenelse{\equal{\jlreq at article@type}{article}}{
-    \NewBlockHeading{part}{0}{font={\jlreq at keepbaselineskip{\LARGE\headfont}},indent=4,lines=4}
-  }
-  {% book, report
-    \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\jlreq at mol}},format={\null\vfill {\Huge\headfont \hspace*{2\jlreq at mol}#1#2}\vspace*{2\jlreq at gol}}}
-    \NewBlockHeading{chapter}{0}{indent=2,lines=6,label_format={第\thechapter 章\hspace*{1\jlreq at gol}},font={\huge\headfont}}
-    \renewcommand{\thechapter}{\Kanji{chapter}}
-  }
-  \NewBlockHeading{section}{1}{font={\jlreq at keepbaselineskip{\Large\headfont}},indent=6,lines=3}
-  \NewBlockHeading{subsection}{2}{font={\jlreq at keepbaselineskip{\large\headfont}},indent=8,lines=2}
-  \NewBlockHeading{subsubsection}{3}{font={\jlreq at keepbaselineskip{\normalsize\headfont}},indent=10,lines=1,before_lines=1}
-  \NewRuninHeading{paragraph}{4}{font={\jlreq at keepbaselineskip{\normalsize\headfont}}}
-  \NewRuninHeading{subparagraph}{5}{font={\jlreq at keepbaselineskip{\normalsize\headfont}},indent=1}
-\else
-  \renewcommand{\thepart}{\Roman{part}}
-  \renewcommand{\thesubsection}{\thesection .\arabic{subsection}}
-  \renewcommand{\thesubsubsection}{\thesubsection .\arabic{subsubsection}}
-  \renewcommand{\theparagraph}{\thesubsubsection .\arabic{paragraph}}
-  \renewcommand{\thesubparagraph}{\theparagraph .\arabic{subparagraph}}
-  \ifthenelse{\equal{\jlreq at article@type}{article}}{
-    \NewBlockHeading{part}{0}{font={\jlreq at keepbaselineskip{\LARGE\headfont}},label_format={第\thepart 部\hspace{1\jlreq at mol}},lines=4}
-    \renewcommand{\thesection}{\arabic{section}}
-  }
-  {% book, report
-    \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\jlreq at gol}},format={\null\vfil {\Huge\headfont #1#2}\vfil}}
-    \NewBlockHeading{chapter}{0}{%
-      format={{\jlreq at keepbaselineskip{\huge\headfont} #1#2}#3},
-      label_format={第\thechapter 章\quad},
-      lines=5}
-    \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\headfont}},lines=3}
-  \NewBlockHeading{subsection}{2}{font={\jlreq at keepbaselineskip{\large\headfont}},lines=2}
-  \NewBlockHeading{subsubsection}{3}{font={\jlreq at keepbaselineskip{\normalsize\headfont}},lines=1,before_lines=1}
-  \NewRuninHeading{paragraph}{4}{font={\jlreq at keepbaselineskip{\normalsize\headfont}},indent=1}
-  \NewRuninHeading{subparagraph}{5}{font={\jlreq at keepbaselineskip{\normalsize\headfont}},indent=2}
-\fi
-
-\ifthenelse{\equal{\jlreq at article@type}{article}}{}{% book, report
-  \if at openright
-    \ModifyHeading{part}{type=naka}
-    \ModifyHeading{chapter}{pagebreak=cleardoublepage}
-  \else
-    \ModifyHeading{part}{type=han}
-    \ModifyHeading{chapter}{pagebreak=clearpage}
-  \fi
-}
-\jlreq at switch{\jlreq at article@type}{
-  {book}{%
-    \renewcommand{\jlreq at heading@maketoc at chapter}[3]{%
-      \chaptermark{#3}%
-      \jlreq at ifempty{#1}{%
-        \ifnum0\if at mainmatter\else1\fi\ifnum\jlreq at heading@level at chapter>\c at secnumdepth 1\fi>0
-          \addcontentsline{toc}{chapter}{#3}%
-        \else
-          \addcontentsline{toc}{chapter}{\protect\numberline{#2}#3}%
-        \fi
-      }{}%
-    }
-  }
-  {report}{
-    \renewcommand{\jlreq at heading@maketoc at chapter}[3]{%
-      \chaptermark{#3}%
-      \jlreq at ifempty{#1}{%
-        \ifnum0\ifnum\jlreq at heading@level at chapter>\c at secnumdepth 1\fi>0
-          \addcontentsline{toc}{chapter}{#3}%
-        \else
-          \addcontentsline{toc}{chapter}{\protect\numberline{#2}#3}%
-        \fi
-      }{}%
-    }
-  }
-}
-
-
-%. 注
-% 合印:4.2.3
-% 文字サイズは6ポイントくらい(4.2.3.a)とりあえす\scriptsize
-\newcommand*\jlreq at referencemark@format[1]{#1}
-\ifthenelse{\equal{\jlreq at referencemark}{inline}}{
-  \newcommand*{\jlreq at notemark}[1]{%
-    \jlreq at ifydir{%
-      \hbox{}\hbox{\@textsuperscript{\normalfont\jlreq at referencemark@format{#1}}}\hbox{}%
-    }{%
-      \setbox\@tempboxa=\hbox{\scriptsize\jlreq at referencemark@format{#1}}%
-      \raise\dimexpr.5\jlreq at gol - (\ht\@tempboxa + \dp\@tempboxa)/2\relax\box\@tempboxa
-    }%
-  }
-}{
-  \newcommand*{\jlreq at notemark}[1]{{%
-    \setbox\@tempboxa=\hbox{\scriptsize\jlreq at referencemark@format{#1}}%
-    % 行頭に来たときに頭を天にそろえる処理.
-    \jlreq at savepos@for at rest@linewidth
-    \ifdim\jlreq at current@linewidth<\wd\@tempboxa
-      \@tempdima=\jlreq at current@linewidth
-    \else
-      \@tempdima=\wd\@tempboxa
-    \fi
-    \setbox\jlreq at tempboxa=\hbox to\z@{\hskip-\@tempdima\raise\dimexpr.5\zw + (\ht\@tempboxa + \dp\@tempboxa)/2\relax\box\@tempboxa\hss}%
-    \dp\jlreq at tempboxa=0pt\ht\jlreq at tempboxa=0pt\box\jlreq at tempboxa}}%
-}
-% \@footnotemarkをシンプルなものにする
-\def\jlreq at setdefaultnotemark#1#2{%
-  \def#1{%
-    \leavevmode
-    \ifhmode\edef\@x at sf{\the\spacefactor}\nobreak\fi
-    #2%
-    \ifhmode\spacefactor\@x at sf\fi
-    \relax}
-}
-\let\jlreq at original@@footnotemark=\@footnotemark
-\jlreq at setdefaultnotemark\@footnotemark\@makefnmark
-%.. 脚注  (縦書きの時は傍注,4.2.5)
-{%
-  \footnotesize\global\setlength{\footnotesep}{.7\baselineskip} % 何でかわからん……
-  % \jlreq at tempdimaに罫線と脚注との間の長さを入れる
-  % 脚注の行間よりやや広くする(4.2.5.f)
-  \global\jlreq at tempdima=1.5\dimexpr\baselineskip - 1\jlreq at gol\relax
-}
-% 罫線の前は行間分,最大+文字サイズ分伸びる(4.2.5.g)
-\setlength{\skip\footins}{\dimexpr\baselineskip - 1\jlreq at gol \relax plus 1\jlreq at gol}
-%\setlength{\skip\footins}{0pt}
-% 脚注の前の罫線は表罫で,長さは行長の1/3位(4.2.5.f)
-\edef\jlreq at do{
-  \unexpanded{\renewcommand{\footnoterule}}{%
-    \unexpanded{\hrule width .333\textwidth height \jlreq at omotekeiwidth}%
-    \noexpand\kern\the\jlreq at tempdima
-  }
-}
-\jlreq at do
-
-% インデントの計算:脚注の長さが文字の整数倍になるように字下げする(4.2.5.b)
-{
-  \footnotesize
-  \jlreq at footnoteindent=1\jlreq at mol
-  \@tempdima=\dimexpr\textwidth - \jlreq at footnoteindent\relax
-  \@tempdimb=1\zw
-  \divide\@tempdima\@tempdimb \multiply\@tempdima\@tempdimb
-  \global\jlreq at footnoteindent=\dimexpr\textwidth - \@tempdima\relax
-}
-% 4.2.5.d
-\ifthenelse{\equal{\jlreq at footnotetext@indent}{one}}{
-  \newcommand\@makefntext[1]{\parindent 1\jlreq at mol
-    \addtolength{\leftskip}{\dimexpr\jlreq at footnoteindent + 1\jlreq at mol\relax}% 全体をインデント+1文字分下げる
-    \noindent\hskip -1\jlreq at mol\jlreq at referencemark@format{\@thefnmark}\hskip 1\jlreq at mol#1}% 見出し出力と一文字分の空き
-}{
-  \newcommand\@makefntext[1]{\parindent 1\jlreq at mol
-    \addtolength{\leftskip}{\jlreq at footnoteindent}% 全体をインデント
-    \noindent\hskip 1\jlreq at mol\jlreq at referencemark@format{\@thefnmark}\hskip 1\jlreq at mol#1}% 見出し出力と一文字分の空き
-}
-% 合印
-\renewcommand*{\@makefnmark}{%
-  \jlreq at ifydir{\jlreq at notemark{\@thefnmark}}{\hbox{\jlreq at notemark{\@thefnmark}}}%
-}
-% 4.2.2注3
-\if at tate
-  \renewcommand*{\thefootnote}{\jlreq at open@bracket at before@space\inhibitglue(\rensuji{\@arabic\c at footnote})\inhibitglue}
-\else
-  \renewcommand*{\thefootnote}{\arabic{footnote})\inhibitglue}
-\fi
-
-%.. 後注(4.2.4)
-\def\jlreq at endnotemarkname{@thefnmark}% 合印用番号を一時的に入れるマクロ名
-\def\jlreq at endnotecounter{footnote}% 後注用のカウンタ名
-% 文字サイズは\footnotesizeを使う
-\newdimen\jlreq at endnote@prepostspace
-% 前の分との間は行間分空ける(4.2.4.f)
-\jlreq at endnote@prepostspace=\dimexpr\baselineskip - 1\jlreq at gol\relax
-\newdimen\jlreq at endnote@indent
-% 現在の後注一覧を,\jlreq at endnote@textsに{{合印1}{後注1}}{{合印2}{後注2}}...の形で保持する
-\def\jlreq at endnote@texts{}
-\def\jlreq at endnote@addtext#1#2{%
-  \expandafter\gdef\expandafter\jlreq at endnote@texts\expandafter{\jlreq at endnote@texts{{#1}{#2}}}}
-\def\endnote{\@ifnextchar[{\jlreq at endnote}{\jlreq at endnote[]}}
-\def\endnotemark{\@ifnextchar[{\jlreq at endnotemark}{\jlreq at endnotemark[]}}
-\def\endnotetext{\@ifnextchar[{\jlreq at endnotetext}{\jlreq at endnotetext[]}}
-\long\def\jlreq at endnote[#1]#2{\jlreq at endnotemark[#1]\@endnotetext{#2}}
-\def\jlreq at endnotemark[#1]{%
-  \jlreq at ifempty{#1}{%
-    \stepcounter{\jlreq at endnotecounter}%
-    \expandafter\protected at xdef\csname\jlreq at endnotemarkname\endcsname{\csname the\jlreq at endnotecounter\endcsname}%
-  }{%
-    \begingroup
-      \csname c@\jlreq at endnotecounter\endcsname #1\relax
-      \expandafter\unrestored at protected@xdef\csname\jlreq at endnotemarkname\endcsname{\csname \jlreq at endnotecounter\endcsname}%
-    \endgroup
-  }%
-  \@endnotemark
-}
-\jlreq at setdefaultnotemark\@endnotemark\@makeendmark
-\long\def\jlreq at endnotetext[#1]#2{%
-  \jlreq at ifempty{#1}{%
-    \expandafter\protected at xdef\csname\jlreq at endnotemarkname\endcsname{\csname the\jlreq at endnotecounter\endcsname}%
-  }{%
-    \begingroup
-      \csname c@\jlreq at endnotecounter\endcsname #1\relax
-      \expandafter\unrestored at protected@xdef\csname\jlreq at endnotemarkname\endcsname{\csname \jlreq at endnotecounter\endcsname}%
-    \endgroup
-  }%
-  \@endnotetext{#2}%
-}
-\def\@endnotetext#1{%
-  \expandafter\let\expandafter\jlreq at tempa\expandafter=\csname\jlreq at endnotemarkname\endcsname
-  \expandafter\jlreq at endnote@addtext\expandafter{\jlreq at tempa}{#1}%
-}
-\def\jlreq at theendnotes#1{%
-  \jlreq at ifendmark{#1}{}{%
-    \jlreq at output@endnotes#1
-    \jlreq at theendnotes
-  }%
-}
-\def\jlreq at output@endnotes#1#2{%
-  \expandafter\def\csname\jlreq at endnotemarkname\endcsname{#1}%
-  \item\@makeendtext{#2}%
-}
-
-\newcommand*{\theendnotes}{%
-  \ifx\jlreq at endnote@texts\@empty\else
-    \let\jlreq at tempa=\jlreq at endnote@texts
-    \gdef\jlreq at endnote@texts{}%
-    \edef\jlreq at endnote@beforeafterspace{\the\dimexpr\baselineskip - 1\jlreq at gol\relax plus \the\dimexpr 1\jlreq at gol\relax}%
-    \begingroup
-      \par
-      \footnotesize
-      % 後注の長さを文字サイズの整数倍にする(4.2.4.b)
-      \jlreq at tempdima=\dimexpr\linewidth - \jlreq at endnote@indent - \leftskip\relax
-      \@tempdimb=1\jlreq at mol
-      \divide\jlreq at tempdima\@tempdimb\multiply\jlreq at tempdima\@tempdimb
-      \begin{list}{}{%
-        \itemsep=0pt\relax
-        \parsep=0pt\relax
-        \partopsep=0pt\relax
-        \topsep=0pt\relax
-        \leftmargin=\dimexpr\linewidth - \jlreq at tempdima\relax
-        \itemindent=0pt\relax
-        \topsep=\jlreq at endnote@beforeafterspace
-      }%
-      \expandafter\jlreq at theendnotes\jlreq at tempa\jlreq at endmark
-      \end{list}
-    \endgroup
-    \par
-  \fi
-}
-
-\jlreq at endnote@indent=2\jlreq at mol
-% 二行目以降を全角分下げる
-\newcommand{\@makeendtext}[1]{\parindent 1\jlreq at mol
-    \hskip-1\jlreq at mol\csname\jlreq at endnotemarkname\endcsname\hskip 1\jlreq at mol#1}% 見出し出力と一文字分の空き
-\def\@makeendmark{\@makefnmark}
-
-% \theendnoteの出力を仕込む
-\jlreq at tempafalse
-% \jlreq at tempcにセクション名たちを入れていく
-\def\jlreq at tempc{}
-\@for\jlreq at tempa:=\jlreq at endnote@position\do{
-  \jlreq at switch{\jlreq at tempa}{
-    {_headings}{\jlreq at tempatrue}
-    {_paragraph}{
-      \jlreq at tempatrue% _paragraphの時は_headingsも有効にする
-      \PushPostHook{par}{%
-        \ifx\jlreq at endnote@texts\@empty\else
-          \vskip\dimexpr-\baselineskip\relax
-          \vskip\dimexpr0pt\relax
-          \theendnotes
-        \fi
-      }
-    }
-    {\edef\jlreq at tempc{\jlreq at tempc,\jlreq at tempa}}
-  }
-}
-
-\ifjlreq at tempa
-  \edef\jlreq at do{%
-    \unexpanded{\def\jlreq at hook@beforeheadings#1}{\expandonce{\jlreq at hook@beforeheadings{#1}}%
-      \noexpand\theendnotes
-    }
-  }
-  \jlreq at do
-\else
-  \@for\@tempa:=\jlreq at tempc\do{
-    \ifx\@tempa\@empty\else
-      \edef\jlreq at do{%
-        \unexpanded{\def\jlreq at hook@beforeheadings#1}{\expandonce{\jlreq at hook@beforeheadings{#1}}%
-          \unexpanded{\def\@tempa}{\@tempa}\unexpanded{\def\@tempb{#1}}%
-          \unexpanded{\ifx\@tempa\@tempb\theendnotes\fi}%
-        }
-      }
-      \jlreq at do
-    \fi
-  }
-\fi
-\AtEndDocument{\theendnotes}
-
-%.. 傍注(4.2.7)
-\setlength{\marginparsep}{2\jlreq at mol} % フォントサイズ×2(4.2.7:特に問題に~e)
-{%
-  \footnotesize
-  \setlength{\jlreq at tempdima}{\dimexpr \paperwidth - \textwidth - 1in - \oddsidemargin - \marginparsep\relax}
-  \ifx\jlreq at option@sidenote at width\@empty
-    \setlength{\marginparwidth}{\dimexpr\jlreq at tempdima-2\jlreq at fontsize\relax}
-  \else
-    \setlength{\marginparwidth}{\jlreq at speciallength{\jlreq at option@sidenote at width}}
-    \ifnum\marginparwidth>\jlreq at tempdima
-      \ClassWarningNoLine{jlreq}{sidenote_width is greater than the width of the margin}
-    \fi
-  \fi
-  \ifdim\marginparwidth>18\jlreq at mol
-    \global\marginparwidth=18\jlreq at mol
-  \else
-    \@tempdima=1\zw% 1\jlreq at mol
-    \global\divide\marginparwidth\@tempdima
-    \global\multiply\marginparwidth\@tempdima
-  \fi
-  \global\setlength{\marginparpush}{.5\@tempdima} % 同上:g
-}
-
-\def\jlreq at sidenotemarkname{@thefnmark}% 合印用番号を一時的に入れるマクロ名
-
-% (1) \footnoteとかと同じ形式 sidenote_type=number
-% (2) 文中にマークを入れて,傍注には見出しが入る sidenote_type=mark
-% (3) 文中は強調文字列,傍注には見出しが入る sidenote_type=font
-% (4) 文中は何も無し,傍注には見出しが入る sidenote_type=none
-
-% (1) では\sidenote[]{}を定義
-% (2) では\sidenote{見出し}{注中身}を定義
-\def\@sidenotetext#1{%
-  \marginpar{\reset at font\footnotesize
-    \color at begingroup
-    \@makesidetext{#1}%
-    \color at endgroup
-  }%
-}
-\jlreq at setdefaultnotemark\@sidenotemark\@makesidemark
-\ifthenelse{\equal{\jlreq at sidenote@type}{number}}{
-  \def\jlreq at sidenotecounter{footnote}% 傍注用のカウンタ名
-  \def\sidenote{\@ifnextchar[{\jlreq at sidenote}{\jlreq at sidenote[]}}
-  \def\sidenotemark{\@ifnextchar[{\jlreq at sidenotemark}{\jlreq at sidenotemark[]}}
-  \def\sidenotetext{\@ifnextchar[{\jlrqe at sidenotetext}{\jlreq at sidenotetext[]}}
-  \long\def\jlreq at sidenote[#1]#2{\jlreq at sidenotemark[#1]\@sidenotetext{#2}}
-  \def\jlreq at sidenotemark[#1]{%
-    \jlreq at ifempty{#1}{%
-      \stepcounter{\jlreq at sidenotecounter}%
-      \expandafter\protected at xdef\csname\jlreq at sidenotemarkname\endcsname{\csname the\jlreq at sidenotecounter\endcsname}%
-    }{%
-      \begingroup
-        \csname c@\jlreq at sidenotecounter\endcsname #1\relax
-        \expandafter\unrestored at protected@xdef\csname\jlreq at sidenotemarkname\endcsname{\csname the\jlreq at sidenotecounter\endcsname}%
-     \endgroup
-    }%
-    \@sidenotemark
-  }
-  \long\def\jlreq at sidenotetext[#1]#2{%
-    \jlreq at ifempty{#1}{%
-      \expandafter\protected at xdef\csname\jlreq at sidenotemarkname\endcsname{\csname the\jlreq at sidenotecounter\endcsname}%
-    }{%
-     \begingroup
-       \csname c@\jlreq at sidenotecounter\endcsname#1\relax
-       \expandafter\unrestored at protected@xdef\csname\jlreq at sidenotemarkname\endcsname{\csname the\jlreq at sidenotecounter\endcsname}%
-     \endgroup
-    }%
-    \@sidenotetext{#2}%
-  }
-  \def\@sidenotemark{\@makesidemark}
-  \ifx l\jlreq at engine
-    \def\@makesidetext#1{\csname\jlreq at sidenotemarkname\endcsname\hspace{0.5\jlreq at mol}#1}
-  \else
-    % thefootnote = \inhibitglue (...だと\inhibitglueが効かない
-    \def\@makesidetext#1{ \kern-1\zw\csname\jlreq at sidenotemarkname\endcsname\hspace{0.5\jlreq at mol}#1}
-  \fi
-  \def\@makesidemark{\@makefnmark}
-}{
-  \def\jlreq at sidenote@keywordfont{\headfont}
-  \def\jlreq at sidenote@defaultmark{*}
-  \def\sidenote{\jlreq at sidenote}
-  \def\sidenotemark{\jlreq at sidenotemark}
-  \def\sidenotetext{\jlreq at sidenotetext}
-  \def\jlreq at sidenote#1#2{\jlreq at sidenotemark{#1}\jlreq at sidenotetext{#1}{#2}}
-  \def\jlreq at sidenotemark#1{%
-    {\reset at font\jlreq at sidenote@keywordfont #1}%
-    \ifx\jlreq at sidenote@defaultmark\@empty\else
-      \expandafter\edef\csname\jlreq at sidenotemarkname\endcsname{\jlreq at sidenote@defaultmark}%
-      \@sidenotemark
-    \fi
-  }
-  \def\@sidenotemark{\@makesidemark}
-  \def\jlreq at sidenotetext#1#2{%
-    \expandafter\def\csname\jlreq at sidenotemarkname\endcsname{\jlreq at sidenote@defaultmark\inhibitglue\null{\reset at font\jlreq at sidenote@keywordfont\inhibitglue #1}}%
-    \@sidenotetext{#2}%
-  }
-  \def\@makesidetext#1{{\headfont\csname\jlreq at sidenotemarkname\endcsname}\hspace*{1\jlreq at mol}#1}
-  \def\@makesidemark{\@makefnmark}
-}
-
-%.. 割注(3.4)
-\def\inlinenotesize{.6\jlreq at fontsize} % 割注の文字サイズ
-\let\jlreq at inlinenote@autolinebreak=\\% 計測時は\linebreakより\\の方が安定する.悩ましい…….
-
-\newcommand{\jlreq at inlinenote@kakkofontsize}{%
-  \fontsize{\dimexpr\inlinenotesize * 2\relax}{\dimexpr \inlinenotesize * 2\relax}%
-  \selectfont
-}
-
-\newcommand{\jlreq at inlinenote@fontsize}{%
-  \fontsize{\inlinenotesize}{\inlinenotesize}%
-  \selectfont
-}
-
-% 割注を入れるための命令.\inlinenote{割注}で使う.
-% 改行位置は自動で計算されるが,常に正しいとは限らない.
-% \inlinenote*は自動で改行されない.\\で改行位置を指定する.
-\newif\ifjlreq at in@inlinenote
-\jlreq at in@inlinenotefalse
-\newcommand*{\inlinenote}{%
-  \ifjlreq at in@inlinenote\ClassError{jlreq}{\string\inlinenote\space can't be nested}{\@ehc}\fi
-  \jlreq at in@inlinenotetrue
-  \ifvmode\leavevmode\fi
-  \@ifstar\jlreq at inlinenote@noauto\jlreq at inlinenote@auto}
-\let\warichu=\inlinenote
-
-\newcommand*{\jlreq at inlinenote@auto}[1]{%
-  % 割注初め括弧の前の場所を保存
-  \jlreq at savepos@for at rest@linewidth
-  % \jlreq at tempdimbに,現在行の残り長さを入れる
-  \jlreq at tempdimb=\jlreq at rest@linewidth
-  % 括弧の分を引いたものが,割注の使える長さ
-  \setbox\@tempboxa=\hbox{\jlreq at inlinenote@kakkofontsize\inhibitglue\jlreq at open@bracket at before@space(\inhibitglue}%
-  \addtolength{\jlreq at tempdimb}{-\wd\@tempboxa}%
-  \ifdim\jlreq at tempdimb<0pt\jlreq at tempdimb=\linewidth\fi
-  {%
-    \setbox\jlreq at tempboxa=\hbox{\jlreq at inlinenote@kakkofontsize\inhibitglue \jlreq at open@bracket at before@space(}%
-    \jlreq at box@putcenter\jlreq at tempboxa
-  }%
-  % 「初回」時はここに強制改行を入れる.これにより現在位置の取得がより正しくなる……といいなぁ
-  \jlreq at savepos@iflabelundefined{\\}{}%
-  % 割注内の\baselineskipを保存(後で使う).
-  {\jlreq at inlinenote@fontsize\xdef\jlreq at inlinenote@baselineskip{\the\baselineskip}}%
-  % 普通に並べた長さを計測し,その半分から始める
-  \setbox\@tempboxa=\hbox{\jlreq at inlinenote@fontsize #1}%
-  \jlreq at tempdimc=\wd\@tempboxa
-  \divide\jlreq at tempdimc by 2\relax
-  % \@tempcntbに,この長さで計測した場合の行数を入れる
-  \ifdim\jlreq at tempdimc<\jlreq at tempdimb\@tempcntb=2\relax
-  \else
-    \jlreq at tempdima=\dimexpr\jlreq at tempdimc - \jlreq at tempdimb\relax
-    \divide\jlreq at tempdima\linewidth
-    \@tempcntb=\number\jlreq at tempdima
-    \multiply\@tempcntb by 2\relax
-    \advance\@tempcntb by 4\relax
-  \fi
-  % \jlreq at parshapeargに\parshapeに指定する書式の最後以外を入れる.
-  \ifnum\@tempcntb>2\relax
-    \edef\jlreq at parshapearg{0pt \the\jlreq at tempdimb\space 0pt \the\jlreq at tempdimb}%
-    \@tempcnta=4\relax
-    \@whilenum\@tempcnta<\@tempcntb\do{%
-      \edef\jlreq at parshapearg{\jlreq at parshapearg\space 0pt \the\linewidth\space 0pt \the\linewidth}%
-      \advance\@tempcnta by 2\relax
-    }%
-    \setlength{\jlreq at tempdimc}{\dimexpr\jlreq at tempdimc - \jlreq at tempdimb - \linewidth * \numexpr(\@tempcntb - 4)/2\relax\relax}%
-  \else
-    \def\jlreq at parshapearg{}%
-  \fi
-  % 行数を伸ばしつつ良いところを探していく
-  \@whilenum\@tempcntb<1001\do{%
-    \ifnum\@tempcntb>2\jlreq at tempdimb=\linewidth\fi
-    \edef\@tempb{\the\@tempcntb}%
-    \jlreq at inlinenote@determinelength{#1}{\jlreq at inlinenote@fontsize}{\jlreq at parshapearg}{2}{\@tempb}{\jlreq at tempdimc}{\jlreq at tempdimb}%
-    \@tempcntb=\@tempb
-    \ifnum\@tempcntb>999\relax% ループが長すぎる
-      \global\setbox\jlreq at resultbox=\voidb at x%
-      \@tempcntb=1001\relax
-    \fi
-    \ifvoid\jlreq at resultbox\else% 成功
-      \edef\jlreq at inlinenote@lines{\the\@tempcntb}% 行数を保存
-      \@tempcntb=1001\relax
-    \fi
-    \advance\@tempcntb by 2\relax
-    \edef\jlreq at parshapearg{\jlreq at parshapearg 0pt \the\jlreq at tempdimb 0pt \the\jlreq at tempdimb}%
-  }%
-  \ifvoid\jlreq at resultbox
-    \ClassWarning{jlreq}{\string\inlinenote\space failed, maybe a bug}%
-  \else
-    \@tempcnta=0
-    \splittopskip=0pt\relax
-    \splitmaxdepth=\maxdimen
-    % 現在行の残り長さを思い出す
-    \jlreq at tempdimb=\jlreq at rest@linewidth
-    \setbox\@tempboxa=\hbox{\jlreq at inlinenote@kakkofontsize\inhibitglue\jlreq at open@bracket at before@space(\inhibitglue}%
-    \addtolength{\jlreq at tempdimb}{-\wd\@tempboxa}%
-    \setbox\@tempboxa=\box\jlreq at resultbox
-    \@whilenum\@tempcnta<\jlreq at inlinenote@lines\do{%
-      \ifnum\@tempcnta>0 \jlreq at inlinenote@autolinebreak\fi
-      % \jlreq at tempdimaに今の行の長さを入れる
-      \ifnum\@tempcnta<\numexpr\jlreq at inlinenote@lines - 2\relax
-        \ifnum\@tempcnta=0\jlreq at tempdima=\jlreq at tempdimb
-        \else\jlreq at tempdima=\linewidth\fi
-      \else
-        \jlreq at tempdima=-1pt\relax
-      \fi
-      {%
-        \edef\@tempa{\the\vbadness}%
-        \vbadness=10000
-        \setbox\jlreq at tempboxa=\vsplit\@tempboxa to \dimexpr\jlreq at inlinenote@baselineskip*2\relax
-        \vbadness=\@tempa\relax
-        % \jlreq at inlinenote@autolinebreak=\\の場合には,割注の長さを計測した物に長さに強制する
-        \jlreq at getlastbox{\jlreq at tempboxa}%
-        \setbox\jlreq at tempboxb=\box\jlreq at resultbox
-        \jlreq at getlastbox{\jlreq at tempboxa}%
-        \setbox\jlreq at tempboxa=\box\jlreq at resultbox
-        \ifx\jlreq at inlinenote@autolinebreak\\\relax
-          \ifdim\jlreq at tempdima>0pt\relax
-            \setbox\jlreq at tempboxa=\vbox{\jlreq at inlinenote@fontsize%
-              \hbox to \jlreq at tempdima{\unhbox\jlreq at tempboxa}%
-              \hbox to \jlreq at tempdima{\unhbox\jlreq at tempboxb}}%
-          \else
-            \setbox\jlreq at tempboxa=\vbox{\jlreq at inlinenote@fontsize%
-              \hbox{\unhbox\jlreq at tempboxa}%
-              \hbox{\unhbox\jlreq at tempboxb}}%
-          \fi
-        \else
-          \setbox\jlreq at tempboxa=\vbox{\jlreq at inlinenote@fontsize%
-            \hbox to \jlreq at tempdima{\unhbox\jlreq at tempboxa}%
-            \hbox to \jlreq at tempdima{\unhbox\jlreq at tempboxb}}%
-        \fi
-        \jlreq at box@putcenter\jlreq at tempboxa
-      }%
-      \advance\@tempcnta by 2\relax
-    }%
-  \fi
-  \jlreq at inlinenote@endnote
-}
-
-\newcommand*{\jlreq at inlinenote@noauto}[1]{%
-  \setbox\jlreq at tempboxa=\hbox{\jlreq at inlinenote@kakkofontsize\jlreq at open@bracket at before@space(}%
-  \inhibitglue\jlreq at box@putcenter\jlreq at tempboxa
-  \jlreq at inlinenote@noauto@#1\\\jlreq at endmark\jlreq at endmark
-  \jlreq at inlinenote@endnote
-}
-
-\def\jlreq at inlinenote@noauto@#1\\#2#3\jlreq at endmark{%
-  \jlreq at inlinenote@noauto@@#1&\jlreq at endmark\jlreq at endmark
-  \ifx#2\jlreq at endmark\def\jlreq at next{}\else\linebreak\def\jlreq at next{\jlreq at inlinenote@noauto@#2#3\jlreq at endmark}\fi
-  \jlreq at next
-}
-
-\def\jlreq at inlinenote@noauto@@#1&#2#3\jlreq at endmark{%
-  \ifx#2\jlreq at endmark
-    \setbox\@tempboxa=\hbox{\jlreq at inlinenote@fontsize #1}%
-    \jlreq at tempdimc=\wd\@tempboxa
-    \divide\jlreq at tempdimc by 2\relax
-    \jlreq at inlinenote@determinelength{#1}{\jlreq at inlinenote@fontsize}{}{2}{2}{\jlreq at tempdimc}{\maxdimen}%
-    \ifvoid\jlreq at resultbox\else
-      {%
-        \setbox\jlreq at tempboxa=\hbox{\jlreq at inlinenote@fontsize\box\jlreq at resultbox}%
-        \jlreq at box@putcenter\jlreq at tempboxa
-      }%
-    \fi
-    \def\jlreq at next{}%
-  \else
-    \def\jlreq at next{\jlreq at inlinenote@noauto@@@{#1}#2#3}%
-  \fi
-  \jlreq at next
-}
-
-\def\jlreq at inlinenote@noauto@@@#1#2&\jlreq at endmark{%
-  {%
-    \setbox\@tempboxa=\hbox{\jlreq at inlinenote@fontsize\vbox{\hbox{#1}\hbox{#2}}}%
-    \jlreq at box@putcenter\@tempboxa
-  }%
-}
-
-\newcommand{\jlreq at inlinenote@endnote}{%
-  \jlreq at in@inlinenotefalse
-  {%
-%    \jlreq at inlinenote@kakkofontsize
-%    \hbox{)}\inhibitglue
-    \setbox\jlreq at tempboxa=\hbox{\jlreq at inlinenote@kakkofontsize)}%
-    \jlreq at box@putcenter\jlreq at tempboxa
-    \inhibitglue
-  }%
-}
-
-% \jlreq at inlinenote@determinelength{テキスト(1)}{書式指定(2)}{\parshape指定(3)}{調整に使う行数(4)}{成功行数(5)}{最小長さ(6)}{最大長さ(7)}
-% \jlreq at resultboxに整形結果を返す.見つからなかったらvoid
-\newcommand{\jlreq at inlinenote@determinelength}[7]{%
-%  \message{#1 の試行開始,行数 = #5, \the#6 から \the#7まで}%
-  \@tempcnta=1\relax
-  \def\@tempa{}%
-  \@whilenum\@tempcnta<#4\do{%
-    \expandafter\def\expandafter\@tempa\expandafter{\@tempa 0pt \the\jlreq at tempdima}%
-    \advance\@tempcnta by 1\relax
-  }%
-  \@tempcnta=0
-  \jlreq at tempdima=#6\relax
-  % 最後の行を少しずつ伸ばしていく
-  \@whilenum\@tempcnta<1000\do{%
-    \ifnum\@tempcnta>999\relax% ループが長すぎる
-      \global\setbox\jlreq at resultbox=\voidb at x%
-      \@tempcnta=1001\relax
-    \else
-      \setbox\@tempboxa=\vbox{#2%
-        \vbadness=10000\hbadness=10000\vfuzz=\maxdimen\hfuzz=\maxdimen
-        \parindent=0pt\leftskip=0pt\rightskip=0pt
-        \parshape #5 #3 \@tempa 0pt \the\maxdimen
-        #1\par\global\@tempcntb=\prevgraf}%
-%      \message{\string\jlreq at tempdima = \the\jlreq at tempdima で試行,行数は\the\@tempcntb , 書式 #5 #3 \@tempa 0pt \the\maxdimen}%
-    \fi
-    \jlreq at getlastbox{\@tempboxa}%
-    \setbox\jlreq at tempboxa=\box\jlreq at resultbox
-    \ifnum\@tempcntb<#5\relax% 行数が達していないならOK
-%      \message{行数 = \the\@tempcntb により確定}
-      \global\setbox\jlreq at resultbox=\vbox{#2%
-        \unvbox\@tempboxa\hbox{\unhbox\jlreq at tempboxa\unskip\unskip\unpenalty}%
-        \@whilenum\@tempcntb<#5\do{\hbox{}\advance\@tempcntb by 1}}%
-      \@tempcnta=1001\relax
-    \else
-      % そうでない場合は最後の二行の長さを比較する
-      \jlreq at getlastbox{\@tempboxa}%
-      \setbox\jlreq at tempboxb=\box\jlreq at resultbox
-%      \message{最終行の長さ \the\wd\jlreq at tempboxa, その前の長さ \the\wd\jlreq at tempboxb}%
-      \ifdim\wd\jlreq at tempboxa>\wd\jlreq at tempboxb
-        \advance\jlreq at tempdima by 0.3pt\relax
-      \else
-        % 後ろが短いのでOK
-        \global\setbox\jlreq at resultbox=\vbox{#2\unvbox\@tempboxa\box\jlreq at tempboxb\box\jlreq at tempboxa}%
-        \jlreq at resultdimen=\jlreq at tempdima
-        \@tempcnta=1001\relax
-      \fi
-    \fi
-    \ifdim\jlreq at tempdima>#7\relax
-      \global\setbox\jlreq at resultbox=\box\voidb at x
-      \@tempcnta=1001\relax
-    \fi
-    \advance\@tempcnta by 1\relax
-  }%
-}
-
-
-%. ページスタイル.
-% とりあえず脇に縦書きで配置するのは無視する.
-% メモ:
-% 2.6.1.cの後半が前半と整合的でないように見える……
-% 柱:両柱と片柱(2.6.3)
-\@tempdima=\jlreq at speciallength{\jlreq at headfoot@sidemargin}
-\ifthenelse{\lengthtest{\@tempdima=0pt} \OR \(\lengthtest{0.99\zw < \@tempdima} \AND \lengthtest{\@tempdima < 1.01\zw}\)}{}{
-  \jlreq at warning{ノンブルまたは柱は,基本版面の左右にそろえるか,全角アキだけ寄せた位置に配置する (2.6.1.b)}
-}
-
-% bottom-leftみたいなのを解釈する.入力の順番はどっちでも良いが,出力は<top/bottom><left/right>の順番
-% #1にセットする.
-\def\jlreq at pagestyle@parse at position@#1-#2\jlreq at endmark{%
-  \def\jlreq at tempa{#1}\def\jlreq at tempb{#2}%
-  \jlreq at ifempty{#2}{%
-    \ifx\jlreq at tempb\@empty\ClassError{jlreq}{Invalid position: #1}{\@ehc}\fi
-  }{%
-    \def\@tempa##1-{\def\jlreq at tempb{##1}}%
-    \@tempa#2\relax
-  }%
-}
-\newcommand*\jlreq at pagestyle@parse at position@@[1]{%
-  \ifthenelse{\equal{#1}{top} \OR \equal{#1}{bottom}}{\def\jlreq at tempc{#1}}{%
-    \ifthenelse{\equal{#1}{left} \OR \equal{#1}{right} \OR \equal{#1}{center}}{\def\jlreq at tempd{#1}}{%
-      \ClassError{jlreq}{Invalid position: #1}{\@ehc}%
-    }%
-  }%
-}
-\newcommand*{\jlreq at pagestyle@parse at position}[2]{%
-  \begingroup
-    \jlreq at pagestyle@parse at position@#2-\jlreq at endmark
-    % \jlreq at tempcに縦方向を,\jlreq at tempdに横方向を入れる
-    \def\jlreq at tempc{}\def\jlreq at tempd{}%
-    \expandafter\jlreq at pagestyle@parse at position@@\expandafter{\jlreq at tempa}%
-    \expandafter\jlreq at pagestyle@parse at position@@\expandafter{\jlreq at tempb}%
-    \ifx\jlreq at tempc\@empty\edef\jlreq at tempc{\expandafter\@firstoftwo#1}\fi
-    \ifx\jlreq at tempd\@empty\edef\jlreq at tempd{\expandafter\@secondoftwo#1}\fi
-    \edef\jlreq at do{\unexpanded{\def#1}{{\jlreq at tempc}{\jlreq at tempd}}}%
-  \expandafter\endgroup
-  \jlreq at do
-}
-
-% odd_running_head=_sectionのように下線から始まる場合,その値の見出し命令を柱に出すようにする.
-% 要するに\ps@***に\sectionmarkを定義するように仕込む.
-% 常にodd=rightmark,even=leftmarkになる.
-% 場所指定は奇数ページの方.偶数ページは反対になる.
-% mark_format={_chapter={第\thechapter 章\quad #1}}のような形.odd=とかeven=とかも仕込めるようにしたけど
-% あまり意味がない気がしてきた.oddやevenが優先される.
-\newcommand*{\DeclarePageStyle}[2]{%
-  \expandafter\edef\csname jlreq at pagestyle@setting@#1\endcsname{\unexpanded{#2}}%
-  \begingroup
-    \def\jlreq at nombre@position{{bottom}{center}}%
-    \def\jlreq at running@head at position{{top}{center}}%
-    \def\jlreq at nombre{\thepage}%
-    \def\jlreq at odd@running at head{}%
-    \def\jlreq at even@running at head{}%
-    \def\jlreq at command{}%
-    \def\jlreq at mark@format{}%
-    % 柱とノンブルの間
-    \def\jlreq at gap{1.5\zw}%
-    \newif\ifjlreq at clearmark\jlreq at clearmarktrue
-    \jlreq at parsekeyval[PageStyle]{
-      {nombre_position}{\jlreq at pagestyle@parse at position{\jlreq at nombre@position}{##1}}
-      {running_head_position}{\jlreq at pagestyle@parse at position{\jlreq at running@head at position}{##1}}
-      {nombre}{\def\jlreq at nombre{##1}}
-      {odd_running_head}{\def\jlreq at odd@running at head{##1}}
-      {even_running_head}{\def\jlreq at even@running at head{##1}}
-      {mark_format}{\edef\jlreq at mark@format{\unexpanded{##1}}}
-      {command}{\edef\jlreq at command{\unexpanded{##1}}}
-      {gap}{\def\jlreq at gap{##1}}
-      *{no_clear_mark}{\jlreq at clearmarkfalse}
-    }{#2}%
-    \ifthenelse{\(
-      \boolean{@tate} \AND \(
-        \equal{\expandafter\@secondoftwo\jlreq at nombre@position}{right} \OR
-        \equal{\expandafter\@secondoftwo\jlreq at running@head at position}{right}
-    \)\) \OR \(
-      \(\NOT \boolean{@tate}\) \AND \(
-        \equal{\expandafter\@secondoftwo\jlreq at nombre@position}{left} \OR
-        \equal{\expandafter\@secondoftwo\jlreq at running@head at position}{left}
-      \)
-    \)}{%
-      \if at twoside
-        \jlreq at warning{柱やノンブルは,左ページでは,基本版面の左端の延長線にノンブル又は柱の先頭をそろえて配置するか,基本版面の左端の延長線から基本版面の文字サイズの全角アキだけ右に寄せた位置に配置する(ページスタイル #1 内,2.6.1.b)}%
-      \fi
-    }{}%
-    \ifthenelse{\lengthtest{\jlreq at gap < 1.49\zw} \OR \( \lengthtest{\jlreq at gap > 1.51\zw} \AND \lengthtest{\jlreq at gap < 1.99\zw} \) \OR \lengthtest{\jlreq at gap > 2.01\zw}}{\jlreq at warning{ノンブルと柱との空き量は文字サイズの2倍又は1.5倍とする(ページスタイル #1 内,2.6.1.c)}}{}%
-    % 見出しを出す場合:evenに章などの高いレベルの見出しを出す(2.6.3.a)
-    \def\jlreq at markdefinition{}%
-    \def\jlreq at even@running at head@level{}%
-    % **markを作る
-    % \jlreq at makemark{odd/even}running_headの中身\jlreq at endmark
-    \def\jlreq at markdefinition{}%
-    \def\jlreq at makemark##1##2##3\jlreq at endmark{%
-      \ifx_##2%
-        \ifthenelse{\equal{##1}{even}}{%
-          \def\jlreq at even@running at head{\leftmark}%
-        }{%
-          \def\jlreq at odd@running at head{\rightmark}%
-        }%
-        \@ifundefined{jlreq at heading@setting@##3}{}{%
-          \expandafter\edef\csname jlreq@##1 at running@head at level\endcsname{\csname jlreq at heading@level@##3\endcsname}%
-        }%
-        \def\jlreq at tempa####1{%
-          \jlreq at tempafalse
-          \let\jlreq at result=\@undefined
-          \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}
-          }{####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{{}}%
-        }{%
-          \def\jlreq at markcommand{\markright}%
-          \def\jlreq at markcommandafter{}%
-        }%
-        \edef\jlreq at markdefinition{%
-          \expandonce{\jlreq at markdefinition}%
-          \noexpand\def\expandonce{\csname ##3mark\endcsname}\unexpanded{####1}{\expandonce{\jlreq at markcommand}
-            {\expandonce{\jlreq at result}}\expandonce{\jlreq at markcommandafter}}%
-        }%
-      \fi
-      \jlreq at ifendmark{##2}{}{\@gobble}%
-    }%
-    \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{}%
-    \def\@tempb{\jlreq at makemark{odd}}%
-    \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
-        \jlreq at warning{偶数ページには奇数ページよりアウトラインレベルの高い見出しを入れる(ページスタイル #1内,2.6.3.a)}%
-      \fi
-    \fi\fi
-    % ##1 ##2 ##3と並んだヘッダを作る,戻り値は\jlreq at result
-    \def\jlreq at setheadfoot@##1##2##3{%
-      % -.5\zwは端にそろえるための補正
-      \jlreq at ifempty{##1}{\def\jlreq at left{}}{\edef\jlreq at left{\noexpand\hspace*{\dimexpr\jlreq at expand@speciallength{\jlreq at headfoot@sidemargin}\if at tate - 0.5\zw\fi\relax}\unexpanded{##1}}}%
-      % +\topskip - .5\zwは\jlreq at headfoot@sidemargin = 0ptの時に本文の右に一致させるための補正.
-      \jlreq at ifempty{##3}{\def\jlreq at right{}}{\edef\jlreq at right{\unexpanded{##3}\noexpand\hspace*{\dimexpr\jlreq at expand@speciallength{\jlreq at headfoot@sidemargin}\if at tate + \topskip - .5\zw\fi\relax}}}%
-      \jlreq at ifempty{##2}{%
-        \edef\jlreq at result{\expandonce{\jlreq at left}\hfil\expandonce{\jlreq at right}}%
-        \jlreq at ifempty{##1}{\jlreq at ifempty{##3}{\def\jlreq at result{}}{}}{}%
-      }{%
-        \ifx\jlreq at left\@empty\else\edef\jlreq at left{\noexpand\hbox to 0pt{\expandonce{\jlreq at left}\hss}}\fi
-        \ifx\jlreq at right\@empty\else\edef\jlreq at right{\noexpand\hbox to 0pt{\hss\expandonce{\jlreq at right}}}\fi
-        \edef\jlreq at result{\expandonce{\jlreq at left}\hfil\unexpanded{##2}\hfil\expandonce{\jlreq at right}}%
-      }%
-    }%
-    % ##2を##1 = left/center/rightの場所,##4を##3の場所に置く.被った場合は##2を外側にする.
-    % 戻り値は\jlreq at result
-    \def\jlreq at setheadfoot##1##2##3##4{%
-      \def\jlreq at left{}\def\jlreq at center{}\def\jlreq at right{}%
-      % \ifjlreq at tempa = if(##1 == ##3 && ##2 != "" && ##4 != "")
-      \jlreq at tempatrue
-      \jlreq at ifempty{##2}{\jlreq at tempafalse}{}%
-      \jlreq at ifempty{##4}{\jlreq at tempafalse}{}%
-      \ifthenelse{\equal{##1}{##3}}{}{\jlreq at tempafalse}%
-      \ifjlreq at tempa
-        \ifthenelse{\equal{##1}{right}}{%
-          \edef\jlreq at right{\unexpanded{##4}\noexpand\hspace{\gap}\unexpanded{##2}}%
-        }{%
-          \expandafter\edef\csname jlreq@##1\endcsname{\unexpanded{##2}\noexpand\hspace{\gap}\unexpanded{##4}}%
-        }%
-      \else
-        \jlreq at ifempty{##2}{}{\expandafter\def\csname jlreq@##1\endcsname{##2}}%
-        \jlreq at ifempty{##4}{}{\expandafter\def\csname jlreq@##3\endcsname{##4}}%
-      \fi
-      \edef\jlreq at do{\noexpand\jlreq at setheadfoot@{\expandonce{\jlreq at left}}{\expandonce{\jlreq at center}}{\expandonce{\jlreq at right}}}%
-      \jlreq at do
-    }%
-    % \nombre@<top/bottom>を定義
-    \def\jlreq at nombre@top{}\def\jlreq at nombre@bottom{}%
-    \expandafter\edef\csname jlreq at nombre@\expandafter\@firstoftwo\jlreq at nombre@position\endcsname{\expandonce{\jlreq at nombre}}%
-    % \odd at running@head@<top/bottom>を定義
-    \def\jlreq at odd@running at head@top{}\def\jlreq at odd@running at head@bottom{}%
-    \expandafter\edef\csname jlreq at odd@running at head@\expandafter\@firstoftwo\jlreq at running@head at position\endcsname{\expandonce{\jlreq at odd@running at head}}%
-    % \@oddheadを定義
-    \edef\jlreq at do{\unexpanded{\jlreq at setheadfoot{\expandafter\@secondoftwo\jlreq at nombre@position}}{\expandonce{\jlreq at nombre@top}}\unexpanded{{\expandafter\@secondoftwo\jlreq at running@head at position}}{\expandonce{\jlreq at odd@running at head@top}}}%
-    \jlreq at do\let\jlreq at oddhead=\jlreq at result
-    % \@oddfootを定義
-    \edef\jlreq at do{\unexpanded{\jlreq at setheadfoot{\expandafter\@secondoftwo\jlreq at nombre@position}}{\expandonce{\jlreq at nombre@bottom}}\unexpanded{{\expandafter\@secondoftwo\jlreq at running@head at position}}{\expandonce{\jlreq at odd@running at head@bottom}}}%
-    \jlreq at do\let\jlreq at oddfoot=\jlreq at result
-    % ##1 = {}{}の後ろを逆にする
-    \def\getoppositeposition##1{%
-      \jlreq at switch{\expandafter\@secondoftwo##1}{
-        {center}{\def\jlreq at tempe{center}}
-        {right}{\def\jlreq at tempe{left}}
-        {left}{\def\jlreq at tempe{right}}
-      }%
-      \edef##1{{\expandafter\@firstoftwo##1}{\jlreq at tempe}}%
-    }
-    \getoppositeposition\jlreq at nombre@position
-    \getoppositeposition\jlreq at running@head at position
-    % 上と同じことをする
-    % \nombre@<top/bottom>を定義
-    \def\jlreq at nombre@top{}\def\jlreq at nombre@bottom{}%
-    \expandafter\edef\csname jlreq at nombre@\expandafter\@firstoftwo\jlreq at nombre@position\endcsname{\expandonce{\jlreq at nombre}}%
-    % \even at running@head@<top/bottom>を定義
-    \def\jlreq at even@running at head@top{}\def\jlreq at even@running at head@bottom{}%
-    \expandafter\edef\csname jlreq at even@running at head@\expandafter\@firstoftwo\jlreq at running@head at position\endcsname{\expandonce{\jlreq at even@running at head}}%
-    % \@evenheadを定義
-    \edef\jlreq at do{\unexpanded{\jlreq at setheadfoot{\expandafter\@secondoftwo\jlreq at nombre@position}}{\expandonce{\jlreq at nombre@top}}\unexpanded{{\expandafter\@secondoftwo\jlreq at running@head at position}}{\expandonce{\jlreq at even@running at head@top}}}%
-    \jlreq at do\let\jlreq at evenhead=\jlreq at result
-    % \@evenfootを定義
-    \edef\jlreq at do{\unexpanded{\jlreq at setheadfoot{\expandafter\@secondoftwo\jlreq at nombre@position}}{\expandonce{\jlreq at nombre@bottom}}\unexpanded{{\expandafter\@secondoftwo\jlreq at running@head at position}}{\expandonce{\jlreq at even@running at head@bottom}}}%
-    \jlreq at do\let\jlreq at evenfoot=\jlreq at result
-    \edef\jlreq at do{%
-      \noexpand\def\expandonce{\csname ps@#1\endcsname}{%
-        \unexpanded{\def\jlreq at current@pagestyle{#1}}%
-        \ifjlreq at clearmark\noexpand\jlreq at heading@execmacro at toallheadings\noexpand\jlreq at clearheadingmarks\fi
-        \unexpanded{\let\@mkboth=\markboth}%
-        \unexpanded{\def\@oddhead}{\expandonce{\jlreq at oddhead}}%
-        \unexpanded{\def\@oddfoot}{\expandonce{\jlreq at oddfoot}}%
-        \unexpanded{\def\@evenhead}{\expandonce{\jlreq at evenhead}}%
-        \unexpanded{\def\@evenfoot}{\expandonce{\jlreq at evenfoot}}%
-      }%
-      \noexpand\edef\expandonce{\csname ps@#1\endcsname}{%
-        \noexpand\expandonce{\expandonce{\csname ps@#1\endcsname}}%
-        \noexpand\unexpanded{\expandonce{\jlreq at markdefinition}}%
-        \noexpand\unexpanded{\expandonce{\jlreq at command}}%
-      }%
-    }%
-  \expandafter\endgroup
-  \jlreq at do
-}
-
-% 全ての見出しにマクロ#1を適用する.
-\def\jlreq at heading@execmacro at toallheadings#1{%
-  \begingroup
-    \def\jlreq at do{}%
-    \ifx\jlreq at heading@allheadings\@undefined
-      \jlreq at heading@execmacro at toallheadings@{#1}{chapter,part,section,subsection,subsubsection,paragraph,subparagraph}%
-    \else
-      \def\@tempa{\jlreq at heading@execmacro at toallheadings@{#1}}%
-      \expandafter\@tempa\expandafter{\jlreq at heading@allheadings}%
-    \fi
-  \expandafter\endgroup
-  \jlreq at do
-}
-
-\def\jlreq at heading@execmacro at toallheadings@#1#2{
-  \@for\jlreq at tempa:=#2\do{%
-    \@ifundefined{\jlreq at tempa}{}{%
-  	   \eappto\jlreq at do{\noexpand#1{\expandonce{\jlreq at tempa}}}%
-  	}%
-  }%
-}
-\def\jlreq at clearheadingmarks#1{%
-	\@ifundefined{#1mark}{}{%
-    \expandafter\let\csname#1mark\endcsname=\@gobble
-	}%
-}
-  
-\newcommand*{\NewPageStyle}[2]{%
-  \expandafter\@ifdefinable\csname ps@#1\endcsname{\DeclarePageStyle{#1}{#2}}%
-}
-\newcommand*{\RenewPageStyle}[2]{%
-  \@ifundefined{ps@#1}{\@latex at error{\expandafter\string\csname#1\endcsname\space undefined}\@ehc}{\DeclarePageStyle{#1}{#2}}%
-}
-\newcommand*{\ProvidePageStyle}[2]{%
-  \@ifundefined{ps@#1}{\DeclarePageStyle{#1}{#2}}{}%
-}
-\newcommand*{\ModifyPageStyle}[2]{%
-  \begingroup
-    \@ifundefined{jlreq at pagestyle@setting@#1}{\ClassError{jlreq}{Unknown pagestyle: #1}{\@ehc}}{}%
-    \expandafter\let\expandafter\setting\expandafter=\csname jlreq at pagestyle@setting@#1\endcsname
-    \edef\jlreq at do{\noexpand\RenewPageStyle{#1}{\expandonce{\setting},\unexpanded{#2}}}%
-  \expandafter\endgroup
-  \jlreq at do
-}
-
-%.. 各種定義
-\RenewPageStyle{empty}{nombre={},odd_running_head={},even_running_head={}}
-\ifthenelse{\equal{\jlreq at article@type}{article}}{
-  \if at twoside
-    \NewPageStyle{headings}{odd_running_head={_subsection},even_running_head={_section}}
-  \else
-    \NewPageStyle{headings}{odd_running_head={_section},even_running_head={}}
-  \fi
-}{% book, article
-  \if at twoside
-    \NewPageStyle{headings}{odd_running_head={_section},even_running_head={_chapter}}
-  \else
-    \NewPageStyle{headings}{odd_running_head={_chapter},even_running_head={}}
-  \fi
-  \ModifyPageStyle{headings}{mark_format={_chapter={第\thechapter 章\quad #1}}}
-}
-\if at tate
-  \RenewPageStyle{plain}{nombre=\thepage,odd_running_head={},even_running_head={},no_clear_mark}
-  \NewPageStyle{myheadings}{nombre=\thepage,odd_running_head=\rightmark,even_running_head=\leftmark,no_clear_mark}
-  \if at twoside
-    \ModifyPageStyle{plain}{nombre_position={top-left}}
-    \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-left,running_head_position=top-left}
-    \ModifyPageStyle{myheadings}{nombre_position=bottom-left,running_head_position=top-left}
-  \else
-    \ModifyPageStyle{plain}{nombre_position={top-center}}
-    \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center}
-    \ModifyPageStyle{myheadings}{nombre_position=bottom-center,running_head_position=top-center}
-  \fi
-\else% yoko
-  \RenewPageStyle{plain}{nombre=\thepage,odd_running_head={},even_running_head={},nombre_position={bottom-center},no_clear_mark}
-  \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center}
-  \NewPageStyle{myheadings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center,odd_running_head=\rightmark,even_running_head=\leftmark,no_clear_mark}
-\fi
-
-%. フロート関連
-% 4.3.3.dの例,縦組みの時だけど横にも適用……
-\setlength{\floatsep}{1\jlreq at gol plus 1\jlreq at gol}
-\setlength{\textfloatsep}{1\jlreq at gol plus \baselineskip}
-\intextsep=\textfloatsep
-\dblfloatsep=\floatsep
-\dbltextfloatsep=\textfloatsep
-% 残りはデフォルトにしておく.
-
-% 4.3.1 注4
-\newlength\abovecaptionskip
-\newlength\belowcaptionskip
-\newcommand{\@makecaption}[2]{{%
-  \reset at font\small\headfont
-  \vskip\abovecaptionskip
-  \sbox\@tempboxa{#1\hskip 1\jlreq at mol#2}%
-  \ifdim \wd\@tempboxa >\hsize
-    #1\hskip1\jlreq at mol#2\relax\par
-  \else
-    \global\@minipagefalse
-    \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
-  \fi
-  \vskip\belowcaptionskip}}
-% 特に根拠のない値
-\setlength\abovecaptionskip{.5\jlreq at gol}
-\setlength\belowcaptionskip{0pt}
-
-
-% \begin{figure}***\caption{???}\end{figure}を
-% \begin{figure}\layoutfloat{***}\pcaption{???}\end{figure}にする.
-% 
-%\def\jlreq at saveoriginalcs#1{
-%  \expandafter\expandafter\expandafter\let\expandafter\expandafter\csname jlreq at original@#1\endcsname\csname #1\endcsname
-%}
-%\long\def\jlreq at replace@layoutfloat#1\caption{\layoutfloat{#1}\jlreq at caption}
-%\long\def\jlreq at caption#1{\ifx#1\jlreq at endmark\else\pcaption{#1}\expandafter\jlreq at replace@layoutfloat\fi}
-%\def\jlreq at modify@float#1{%
-%  \def\lgdef{\long\gdef}
-%  \jlreq at saveoriginalcs{#1}
-%  \@namedef{#1}{\@ifnextchar[{\@nameuse{jlreq at float@#1}}{\@nameuse{jlreq at float@@#1}}}
-%  \expandafter\lgdef\csname jlreq at float@#1\endcsname[##1]{%
-%    \expandafter\csname jlreq at original@#1\endcsname[##1]
-%    \csname jlreq at process@insertlayoutfloat@#1\endcsname{}
-%  }
-%  \expandafter\lgdef\csname jlreq at float@@#1\endcsname{%
-%    \expandafter\csname jlreq at original@#1\endcsname
-%    \csname \jlreq at process@insertlayoutfloat@#1\endcsname{}
-%  }
-%  \expandafter\lgdef\csname jlreq at process@insertlayoutfloat@#1\endcsname ##1##2\end{%
-%    \csname jlreq at checkenvname@#1\endcsname{##1##2}\end
-%  }
-%  \expandafter\lgdef\csname jlreq at checkenvname@#1\endcsname ##1\end##2{%
-%    \def\@tempa{##2}%
-%    \def\@tempb{#1}%
-%    \ifx\@tempa\@tempb
-%      \def\jlreq at next{\jlreq at replace@layoutfloat##1\caption{\jlreq at endmark}\end{##2}}%
-%    \else
-%      \def\jlreq at next{\csname jlreq at process@insertlayoutfloat@#1\endcsname{##1\end{##2}}}%
-%    \fi
-%    \jlreq at next
-%  }
-%}
-
-%.. figure環境
-\newcounter{figure}
-\renewcommand*{\thefigure}{\arabic{figure}}
-\newcommand*{\fps at figure}{h}
-\newcommand*{\ftype at figure}{1}
-\newcommand*{\ext at figure}{lof}
-\newcommand*{\fnum at figure}{\figurename\thefigure}
-\newenvironment{figure}{\@float{figure}}{\end at float}
-\newenvironment{figure*}{\@dblfloat{figure}}{\end at dblfloat}
-\newcommand*{\listfigurename}{図目次}
-\newcommand{\figurename}{図}
-\if at tate
-  \DeclareLayoutCaption{figure}<y>(\floatwidth)[cr]
-\fi
-%\jlreq at modify@float{figure}
-%\jlreq at modify@float{figure*}
-
-%.. table環境
-\newcounter{table}
-\renewcommand*{\thetable}{\arabic{table}}
-\newcommand*{\fps at table}{h}
-\newcommand*{\ftype at table}{2}
-\newcommand*{\ext at table}{lot}
-\newcommand*{\fnum at table}{\tablename\thetable}
-\newenvironment{table}{\@float{table}}{\end at float}
-\newenvironment{table*}{\@dblfloat{table}}{\end at dblfloat}
-\newcommand{\listtablename}{表目次}
-\newcommand{\tablename}{表}
-\if at tate
-  \DeclareLayoutCaption{table}<y>(\floatwidth)[cr]
-\fi
-%\jlreq at modify@float{table}
-%\jlreq at modify@float{table*}
-
-%. タイトル周り
-\newenvironment{titlepage}{%
-  \if at twocolumn
-    \@restonecoltrue\onecolumn
-  \else
-    \@restonecolfalse\newpage
-  \fi
-  \thispagestyle{empty}%
-  \setcounter{page}{1}%
-}{%
-  \if at restonecol\twocolumn\else\newpage\fi
-  \if at twoside\else
-    \setcounter{page}{1}%
-  \fi
-}
-
-\if at titlepage
-  \newcommand{\maketitle}{%
-    % jarticleとかからあまり変更していない
-    \begin{titlepage}%
-    \let\footnotesize\small
-    \let\footnoterule\relax
-    \let\footnote\thanks
-    \null\vfil
-    \vskip 4\baselineskip
-    \begin{center}%
-      {\LARGE \@title \par}%
-      \vskip\baselineskip%
-      {\Large
-      \lineskip .75em%
-      \begin{tabular}[t]{c}%
-        \@author
-      \end{tabular}\par}%
-      \vskip\baselineskip
-      {\large\@date\par}%
-    \end{center}\par
-    \vfil{\centering\@thanks}\vfil\null
-    \end{titlepage}%
-  \jlreq at endofmaketitle
-  }
-\else
-  \newcommand{\maketitle}{%
-    \par
-    \begingroup
-      \renewcommand{\thefootnote}{\fnsymbol{footnote}}%
-      \renewcommand{\@makefnmark}{\hbox{%
-        \jlreq at iftdir{\yoko}{}%
-        \rlap{\@textsuperscript{\normalfont\@thefnmark}}%
-      }}%
-      \if at twocolumn
-        \ifnum\col at number=\@ne
-          \@maketitle
-        \else
-          \twocolumn[\@maketitle]%
-        \fi
-      \else
-        \newpage
-        \global\@topnum\z@
-        \@maketitle
-      \fi
-      % \pagestyle{empty}の時はそのまま.
-      \ifnum0\ifx\@oddhead\@empty\else1\fi\ifx\@evenhead\@empty\else1\fi>0
-        \thispagestyle{plain}%
-      \fi
-      \@thanks
-    \endgroup
-    \ifvoid\jlreq at abstractbox\else
-      \centerline{\box\jlreq at abstractbox}
-    \fi
-    \jlreq at endofmaketitle
-  }
-\fi
-% いろいろクリアする.
-\def\jlreq at endofmaketitle{%
-  \setcounter{footnote}{0}%
-  \global\let\thanks\relax
-  \global\let\maketitle\relax
-  \global\let\p at thanks\relax
-  \global\let\@thanks\@empty
-  \global\let\@author\@empty
-  \global\let\@date\@empty
-  \global\let\@title\@empty
-  \global\let\title\relax
-  \global\let\author\relax
-  \global\let\date\relax
-  \global\let\and\relax
-}%
-% \vskipを\baselineskipにしてみた.
-\def\@maketitle{%
-  \newpage\null
-  \vskip 2\baselineskip%
-  \begin{center}%
-  {\jlreq at keepbaselineskip{\LARGE}\@title\par}%
-  \vskip\baselineskip
-  {\jlreq at keepbaselineskip{\large}%
-    \lineskip .5\jlreq at gol
-    \begin{tabular}[t]{c}%
-      \@author
-    \end{tabular}%
-    \par
-  }%
-  \vskip\baselineskip
-  {\jlreq at keepbaselineskip{\large}\@date}%
-  \end{center}%
-  \par\vskip\baselineskip}
-
-%.. abstract
-\ifthenelse{\equal{jlreq at article@type}{book}}{}{% article,report
-  \newbox\jlreq at abstractbox
-  \newcommand*{\abstractname}{概要}
-  \if at titlepage
-    % articleとかjarticleとかと同じ
-    \newenvironment{abstract}{%
-      \titlepage
-      \null\vfil
-      \@beginparpenalty\@lowpenalty
-      \begin{center}%
-        {\bfseries\gtfamily\abstractname}%
-        \@endparpenalty\@M
-      \end{center}%
-    }{%
-      \par\vfil\null\endtitlepage
-    }
-  \else
-    \newenvironment{abstract}{%
-      \if at twocolumn
-        \ifx\maketitle\relax
-          \section*{\abstractname}%
-        \else
-        \fi
-      \else
-        \global\setbox\jlreq at abstractbox=\vtop\bgroup\bgroup
-          \small
-          \begin{center}%
-            {\bfseries\abstractname}%
-          \end{center}%
-          \quotation
-      \fi
-      }{\if at twocolumn\else\endquotation\egroup\vspace{2\baselineskip}\egroup\fi}
-  \fi
-}
-%. 箇条書き.cf. JISX4051 8.4
-% 用語定義型
-\newenvironment{description}{\list{}{%
-  \setlength{\leftmargin}{0\jlreq at mol}% 下げない
-  \setlength{\labelwidth}{0\jlreq at mol}%
-  \addtolength{\leftmargin}{\leftskip}%
-  \addtolength{\leftmargin}{\labelsep}%
-  \let\makelabel=\descriptionlabel
-% 同行じゃない場合はこんな感じ?
-%  \let\jlreq at original@@item=\@item
-%  \def\@item[##1]{\jlreq at original@@item[##1]\mbox{}\par
-  }}{\endlist}
-\newcommand{\descriptionlabel}[1]{\normalfont\headfont #1}
-
-% enumerateとitemize
-% 見出しが一つ上のレベルからどのくらいずれているかを入れる.
-% (見出しは2\zhの箱に右/下詰めで入る.)
-\setlength\leftmargini{2\jlreq at mol}
-\setlength\leftmarginii{1\jlreq at mol}
-\setlength\leftmarginiii{1\jlreq at mol}
-\setlength\leftmarginiv{1\jlreq at mol}
-\setlength\leftmarginv{1\jlreq at mol}
-\setlength\leftmarginvi{1\jlreq at mol}
-
-% enumerate, itemize用初期化
-\def\jlreq at init@list{%
-  \setlength{\labelwidth}{2\jlreq at mol}%
-  \setlength{\topsep}{0pt}%
-  \setlength{\partopsep}{0pt}%
-  \setlength{\itemsep}{0pt}%
-  \setlength{\parsep}{0pt}%
-  \setlength{\listparindent}{\parindent}%
-% itemizeは直後ベタ,enumerateは直後全角空き.
-  \ifthenelse{\equal{\@currenvir}{itemize}}{
-    \setlength{\labelsep}{0\jlreq at mol}%
-  }{%
-    \setlength{\labelsep}{1\jlreq at mol}%
-  }%
-  % \labelsepだけあけるのは一つ目(ラベルの直後)のみ
-  \setlength{\itemindent}{\labelsep}%
-}
-
-\def\@listi{%
-  \jlreq at init@list
-  \setlength{\leftmargin}{\leftmargini}%
-}
-\let\@listI\@listi
-\def\@listii{%
-  \jlreq at init@list
-  \setlength{\leftmargin}{\leftmarginii}%
-}
-\def\@listiii{%
-  \jlreq at init@list
-  \setlength{\leftmargin}{\leftmarginiii}%
-}
-\def\@listiv{%
-  \jlreq at init@list
-  \setlength{\leftmargin}{\leftmarginiv}%
-}
-\def\@listv{%
-  \jlreq at init@list
-  \setlength{\leftmargin}{\leftmarginv}%
-}
-
-\if at tate
-  \renewcommand{\theenumi}{\Kanji{enumi}}
-  \renewcommand{\theenumii}{\rensuji{\@arabic\c at enumii}}
-  \renewcommand{\theenumiii}{\rensuji{\@arabic\c at enumiii}}
-  \renewcommand{\theenumiv}{\rensuji{\@arabc\c at enumiv}}
-\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}
-
-\newcommand{\labelitemi}{\hbox to 1\jlreq at mol{\hss\textbullet\hss}}
-%\newcommand{\labelitemi}{•}
-\if at tate
-  \newcommand{\labelitemii}{○}
-  \newcommand{\labelitemiii}{*}
-\else
-  \newcommand{\labelitemii}{\hbox to 1\jlreq at mol{\hss\textendash\hss}}
-  \newcommand{\labelitemiii}{\hbox to 1\jlreq at mol{\hss\textasteriskcentered\hss}}
-\fi
-\newcommand{\labelitemiv}{\hbox to 1\jlreq at mol{\hss ・\hss}}
-
-% 引用系.1.5em→1\zh,字下げを二文字にした.3.5.2の例.
-\newenvironment{verse}
-  {\let\\\@centercr
-  \list{}{\itemsep\z@ \itemindent -2\jlreq at mol%
-    \listparindent\itemindent
-    \labelwidth\z@
-    \labelsep\z@
-    \leftmargin=2\jlreq at mol
-    \rightmargin\leftmargin \advance\leftmargin 2\jlreq at mol}%
-    \item\relax}{\endlist}
-\newenvironment{quotation}
-  {\list{}{\listparindent\parindent
-    \itemindent\listparindent
-    \labelwidth\z@
-    \labelsep\z@
-    \leftmargin=2\jlreq at mol
-    \rightmargin\leftmargin
-    \parsep\z@ \@plus.1\jlreq at gol}%
-    \item\relax}{\endlist}
-\newenvironment{quote}
-  {\list{}{%
-    \rightmargin\leftmargin
-    \labelwidth\z@
-    \leftmargin=2\jlreq at mol
-    \listparindent\z@}%
-    \item\relax}{\endlist}
-
-%. 表関係 4.4
-% 表内の行間を0にする(4.4.3.f)
-\let\jlreq at original@tabular=\tabular
-\let\jlreq at original@endtabular=\endtabular
-\preto\tabular{\begingroup\appto\@arrayparboxrestore{\baselineskip=0pt\lineskip=0pt}}
-\appto\endtabular{\endgroup}
-% 4.4.3.e
-\setlength\tabcolsep{.5\jlreq at gol}
-\setlength\arraycolsep{.5\jlreq at mol}
-% 4.4.3.j
-%\RequirePackage{tabls} % plextと整合的でない
-%\setlength\extrarulesep{.25\jlreq at gol}
-%\setlength\tablinesep{.25\jlreq at gol}
-%\renewcommand{\arraystretch}{0}
-\setlength\arrayrulewidth{\jlreq at omotekeiwidth} % 4.4.3.c
-\setlength\doublerulesep{2pt}
-\setlength\tabbingsep{\labelsep}
-\skip\@mpfootins=\skip\footins
-\setlength\fboxsep{.3\jlreq at mol}
-\setlength\fboxrule{\jlreq at omotekeiwidth} % 根拠はない
-% 後で
-\renewcommand{\theequation}{\@arabic\c at equation}
-
-%. 目次
-\setcounter{tocdepth}{3}
-\newcommand{\@pnumwidth}{2\jlreq at mol}
-\newcommand{\@tocrmarg}{2.55em}
-\newcommand{\@dotsep}{2} % 狭くしてみた
-\newskip\toclineskip
-\setlength\toclineskip{0\jlreq at gol plus .02\jlreq at gol}
-% tarticleから
-\newdimen\@lnumwidth
-\def\numberline#1{\hbox to\@lnumwidth{#1\hfil}}
-\def\addcontentsline#1#2#3{%
-  \protected at write\@auxout
-    {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
-      \if at tate
-        \@temptokena{\rensuji{\thepage}}%
-      \else
-        \@temptokena{\thepage}%
-      \fi
-    }%
-    {\string\@writefile{#1}%
-      {\protect\contentsline{#2}{#3}{\the\@temptokena}}}%
-}
-
-\newcount\jlreq at top@contents % トップ見出しを入れる.レベルと同じ値.
-\jlreq at top@contents=-1
-\newcommand*{\jlreq at set@top at contents}[1]{%
-  \ifnum\jlreq at top@contents=-1
-    \jlreq at top@contents=#1\relax
-  \fi
-}
-\ifthenelse{\equal{\jlreq at article@type}{article}}{
-  \newcommand{\tableofcontents}{%
-    \jlreq at top@contents=-1\relax
-    \if at twocolumn
-      \@restonecoltrue\onecolumn
-    \else
-      \@restonecolfalse
-    \fi
-    \section*{\contentsname}%
-    \@mkboth{\contentsname}{\contentsname}%
-    \@starttoc{toc}%
-    \if at restonecol\twocolumn\fi
-  }
-}{% book, article
-  \newcommand{\tableofcontents}{%
-    \jlreq at top@contents=-1\relax
-    \if at twocolumn
-      \@restonecoltrue\onecolumn
-    \else
-      \@restonecolfalse
-    \fi
-    \chapter*{\contentsname}%
-    \@mkboth{\contentsname}{\contentsname}%
-    \@starttoc{toc}%
-    \if at restonecol\twocolumn\fi
-  }
-}
-% JIS X 4051自身の目次に近づけようかと……なりきれてないけど.
-% 文字の大きさは全て同じ(\normalsize)にする.
-% 見出しのレベルがあがると1文字分ずつ字下げしていく.
-% 第三引数は,上からの幅に加え更にトップの見出しからの差による補正(プラス)が入る.
-% 補正には\jlreq at top@contentsを使う.
-% 「トップ」というか,一番最初に現れた見出しを入れる.
-% リーダーは.から・に変更しました.更に直後から出るように.
-\def\@dottedtocline#1#2#3#4#5{%
-  \jlreq at set@top at contents{#1}%
-  \ifnum #1>\c at tocdepth \else
-    \vskip\toclineskip
-    {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
-    \parindent #2\relax\@afterindenttrue
-    \interlinepenalty\@M
-    \leavevmode
-    \@lnumwidth #3\relax
-      \@tempcnta=#1\relax
-      \advance\@tempcnta by -\jlreq at top@contents
-      \@tempdima=1\jlreq at mol
-      \multiply \@tempdima by \@tempcnta
-    \advance\leftskip \@lnumwidth \hbox{}\hskip -\leftskip
-      \advance\leftskip\@tempdima
-    {#4}\nobreak
-    \leaders\hbox{$\hbox{・}\mkern \@dotsep mu \m at th \mkern \@dotsep mu$}%
-    \hfill\nobreak
-    \hb at xt@\@pnumwidth{\hss\normalfont\normalcolor #5}%
-    \par}%
-  \fi}
-
-% listoffigures
-\newcommand{\listoffigures}{%
-  \jlreq at top@contents=0
-  \section*{\listfigurename}%
-  \@mkboth{\listfigurename}{\listfigurename}%
-  \@starttoc{lof}%
-}
-\newcommand*{\l at figure}{\@dottedtocline{1}{0\jlreq at gol}{2\jlreq at gol}}
-\newcommand{\listoftables}{%
-  \jlreq at top@contents=0
-  \section*{\listtablename}%
-  \@mkboth{\listtablename}{\listtablename}%
-  \@starttoc{lot}%
-}
-\let\l at table\l at figure
-
-%. 文献,そのまま
-\newdimen\bibindent
-\setlength\bibindent{2\jlreq at mol}
-\newcommand{\newblock}{\hskip .11em\@plus.33em\@minus.07em}
-\newenvironment{thebibliography}[1]{%
-  \jlreq at oldfontcommand@enable
-  \section*{\refname}%
-  \@mkboth{\refname}{\refname}%
-  \list{\@biblabel{\@arabic\c at enumiv}}%
-      {\settowidth\labelwidth{\@biblabel{#1}}%
-      \leftmargin\labelwidth
-      \advance\leftmargin\labelsep
-      \itemindent=0pt
-      \@openbib at code
-      \usecounter{enumiv}%
-      \let\p at enumiv\@empty
-      \renewcommand\theenumiv{\@arabic\c at enumiv}}%
-  \sloppy
-  \clubpenalty4000
-  \@clubpenalty\clubpenalty
-  \widowpenalty4000%
-  \sfcode`\.\@m
-}{%
-  \def\@noitemerr
-    {\@latex at warning{Empty `thebibliography' environment}}%
-  \endlist
-  \jlreq at oldfontcommand@disable
-}
-\let\@openbib at code\@empty
-
-%. 索引
-\newif\ifjlreq at resttate
-\newenvironment{theindex}{%
-  \jlreq at oldfontcommand@enable
-  \jlreq at iftdir{\clearpage\yoko\jlreq at resttatetrue}{\jlreq at resttatefalse}% 常に横書きにする
-  \if at twocolumn\@restonecolfalse\else\@restonecoltrue\fi
-  \columnseprule\z@ \columnsep 2\jlreq at mol
-  \twocolumn[\section*{\indexname}]%
-  \@mkboth{\indexname}{\indexname}%
-  \thispagestyle{plain}%
-  \parindent\z@
-  \parskip\z@ \@plus .03\jlreq at gol\relax
-  \let\item\@idxitem
-}{%
-  \if at restonecol\onecolumn\else\clearpage\fi
-  \ifjlreq at resttate\tate\fi
-}
-\newcommand{\@idxitem}{\par\hangindent 4\jlreq at mol}
-\newcommand{\subitem}{\@idxitem \hspace*{2\jlreq at mol}}
-\newcommand{\subsubitem}{\@idxitem \hspace*{3\jlreq at mol}}
-\newcommand{\indexspace}{\par \vskip 1\jlreq at gol \@plus .5\jlreq at gol \@minus .3\jlreq at gol\relax}
-
-
-%. 前付,後付,付録
-\ifthenelse{\equal{\jlreq at article@type}{book}}{
-  \newif\if at mainmatter
-  \@mainmattertrue
-  \newcommand*\frontmatter{%
-    \if at openright
-      \cleardoublepage
-    \else
-      \clearpage
-    \fi
-    \@mainmatterfalse
-    \let\jlreq at pagestyle@atmain\jlreq at current@pagestyle
-    \ifthenelse{\equal{jlreq at article@type}{article}}{}{%book, report
-      \SaveHeading{chapter}{\jlreq at heading@chapter at atmain}%
-      \ModifyHeading{chapter}{label_format={}}%
-    }%
-    \pagestyle{plain}%
-    \pagenumbering{roman}}
-  \newcommand*\mainmatter{%
-    \cleardoublepage
-    \@mainmattertrue
-    \@ifundefined{jlreq at pagestyle@atmain}{}{%
-      \expandafter\pagestyle\expandafter{\jlreq at pagestyle@atmain}%
-    }%
-    \@ifundefined{jlreq at heading@chapter at atmain}{}{\jlreq at heading@chapter at atmain}%
-    \setcounter{chapter}{0}%
-    \pagenumbering{arabic}}
-  \newcommand*\backmatter{%
-    \if at openright
-      \cleardoublepage
-    \else
-      \clearpage
-    \fi
-    \ifthenelse{\equal{jlreq at article@type}{article}}{}{%book, report
-      \SaveHeading{chapter}{\jlreq at heading@chapter at atmain}%
-      \ModifyHeading{chapter}{label_format={}}%
-    }%
-    \pagestyle{plain}%
-    \@mainmatterfalse
-    \setcounter{chapter}{0}}
-}{}
-\newcommand*\appendix{\par
-  \setcounter{section}{0}%
-}
-
-\ifthenelse{\equal{\jlreq at article@type}{article}}{
-  \appto\appendix{%
-    \setcounter{subsection}{0}%
-    \gdef\thesection{\@Alph\c at section}%
-    \if at tate
-      \def\thesection{\rensuji{\Alph{section}}}%
-    \else
-      \def\thesection{\Alph{section}}%
-    \fi
-  }
-}{%book, report
-  \appto\appendix{%
-    \setcounter{chapter}{0}%
-    \if at tate
-      \def\thechapter{\rensuji{\Alph{chapter}}}%
-    \else
-      \def\thechapter{\Alph{chapter}}%
-    \fi
-    \ModifyHeading{chapter}{label_format={付録\thechapter\quad}}%
-    \ifx\jlreq at current@pagestyle\@undefined\else
-      \ifthenelse{\equal{\jlreq at current@pagestyle}{headings}}{%
-        \def\chaptermark#1{\markboth{付録\thechapter\quad #1}{}}%
-        \ModifyPageStyle{headings}{mark_format={_chapter={付録\thechapter\quad #1}}}%
-      }{}%
-    \fi
-  }
-}
-
-
-% 日にち
-\newif\if西暦 \西暦true
-\def\西暦{\西暦true}
-\def\和暦{\西暦false}
-\newcount\heisei \heisei\year \advance\heisei-1988\relax
-
-\def\today{{%
-  \jlreq at iftdir{%
-    \if西暦
-      \kansuji\year 年
-      \kansuji\month 月
-      \kansuji\day 日
-    \else
-      平成\ifnum\heisei=1 元年\else\kansuji\heisei 年\fi
-      \kansuji\month 月
-      \kansuji\day 日
-    \fi
-  }{%
-    \if西暦
-      \number\year~年
-      \number\month~月
-      \number\day~日
-    \else
-      平成\ifnum\heisei=1 元年\else\number\heisei~年\fi
-      \number\month~月
-      \number\day~日
-    \fi
-  }}}
-
-%. ルビ
-\ifx l\jlreq at engine
-  \RequirePackage{luatexja-ruby}
-\else
-  \RequirePackage{pxrubrica}
-  \let\ruby=\jruby
-\fi
-
-%. 定理環境
-\def\jlreq at theorem@abovebelowspace{1\baselineskip}%とりあえず前後に一行分のアキ
-\def\@begintheorem#1#2{\topsep=\jlreq at theorem@abovebelowspace
-  \trivlist\labelsep=1\jlreq at mol
-   \item[\hskip \labelsep{\headfont #1\ #2}]}
-\def\@opargbegintheorem#1#2#3{\topsep=\jlreq at theorem@abovebelowspace
-  \trivlist\labelsep=1\jlreq at mol
-  \item[\hskip \labelsep{\headfont #1\ #2(#3)}]}
-
-\AtEndOfPackageFile*{amsthm}{
-  \newtheoremstyle{jlreq}{\jlreq at theorem@abovebelowspace}{\jlreq at theorem@abovebelowspace}{\normalfont}{}{\headfont}{}{1\jlreq at mol}{\thmname{#1}\thmnumber{\ #2}\thmnote{ (#3)}}
-  \theoremstyle{jlreq}
-  \let\jlreq at original@proof=\proof
-  \let\jlreq at original@endproof=\endproof
-  \def\proof{\@ifnextchar[{\jlreq at proof}{\jlreq at proof[\proofname]}}
-  \def\jlreq at proof[#1]{\labelsep=1\jlreq at mol\jlreq at original@proof[{\normalfont\headfont #1\inhibitglue}\nopunct]}
-  \renewcommand{\proofname}{証明}
-}
-
-
-% デフォルト設定
-\newcommand{\contentsname}{目 次}
-\newcommand{\refname}{参考文献}
-\newcommand{\indexname}{索 引}
-\pagestyle{plain}
-\pagenumbering{arabic}
-\if at twocolumn
-  \twocolumn
-  \sloppy
-  \flushbottom
-  \if at tate\else\RequirePackage[balance]{nidanfloat}\fi
-\else
-  \onecolumn
-  \raggedbottom
-\fi
-\endinput
-
-
+%% Japanese document class based on requirements for Japanese text layout
+%% 
+%% The package is distributed under the BSD 2-Clause License
+%%
+%%
+% (based on JLREQ 20120403 https://www.w3.org/TR/2012/NOTE-jlreq-20120403/ja/)
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{jlreq}[2017/02/17 jlreq]
+\RequirePackage{xkeyval,everyhook,filehook,etoolbox,ifthen}
+
+%. helper1
+\newdimen\jlreq at tempdima
+\newdimen\jlreq at tempdimb
+\newdimen\jlreq at tempdimc
+\newskip\jlreq at tempskipa
+\newskip\jlreq at tempskipb
+\newskip\jlreq at tempskipc
+\newif\ifjlreq at tempa
+\newif\ifjlreq at tempb
+\newif\ifjlreq at tempc
+\newbox\jlreq at tempboxa
+\newbox\jlreq at tempboxb
+\newbox\jlreq at tempboxc
+% 計算結果を返すための変数
+\newdimen\jlreq at resultdimen
+\newbox\jlreq at resultbox
+
+\def\jlreq at uniqtoken{\jlreq at uniqtoken}
+\def\jlreq at endmark{\jlreq at endmark}
+\long\def\jlreq at deleteuntileendmark#1\jlreq at endmark{}
+
+% \jlreq at getfirsttoken#1\jlreq at uniqtoken{}\jlreq at endmarkの形で使う
+% 二回展開すると,#1の先頭を取り出す.ただし空の場合は\jlreq at uniqtoken,先頭が{の場合は\bgroupとなる
+\long\def\jlreq at getfirsttoken#1#{\jlreq at getfirsttoken@#1\bgroup\jlreq at endmark}
+\long\def\jlreq at getfirsttoken@#1#2\jlreq at endmark#3\jlreq at endmark{#1}
+% 与えられたトークン列が空か(展開はしないでチェック)
+\long\def\jlreq at ifempty#1{\expandafter\ifx\expandafter\relax\detokenize{#1}\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+% #1が\jlreq at endmarkか
+\long\def\jlreq at ifendmark#1{\expandafter\expandafter\expandafter\ifx\jlreq at getfirsttoken#1{}\jlreq at uniqtoken\jlreq at endmark\jlreq at endmark\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+
+% @removeelementの括弧があっても動くかもしれない版
+% 次の変数を使う:\jlreq at tempa:消したいやつ,\jlreq at tempb:今処理している部分.
+\def\jlreq at helper@removeelement#1#2#3{%
+  \begingroup
+    \def\jlreq at tempb{}%
+    \def\jlreq at tempa{#1}%
+    \def#3{}%
+    \jlreq at helper@removeelement@#3#2{\jlreq at endmark}%
+    \edef\jlreq at do{\unexpanded{\def#3}{\expandonce{#3}}}%
+  \expandafter\endgroup
+  \jlreq at do
+}
+% 最初のグルーピングの前までを取得し,@@に回す.グルーピング以降は@@@で処理する
+\def\jlreq at helper@removeelement@#1#2#{%
+  \jlreq at helper@removeelement@@{#1}{#2}%
+  \jlreq at helper@removeelement@@@{#1}%
+}
+% #1をカンマで区切り,既に得ていた\jlreq at tempbと併せて一つの部分を作る.
+\def\jlreq at helper@removeelement@@#1#2{%
+  \jlreq at helper@dividebycomma{#2}%
+  \edef\jlreq at tempb{\expandonce{\jlreq at tempb}\expandonce{\jlreq at tempc}}%
+  \ifjlreq at tempa
+    \ifx\jlreq at tempa\jlreq at tempb\else
+      \ifx#1\@empty\edef#1{\expandonce{\jlreq at tempb}}%
+      \else\edef#1{\expandonce{#1},\expandonce{\jlreq at tempb}}\fi
+    \fi
+    \def\jlreq at tempb{}%
+    \expandafter\jlreq at helper@removeelement@@\expandafter#1\expandafter{\jlreq at tempd}%
+  \fi
+}
+% グルーピング部分を\jlreq at tempbに加え,@に戻る
+\def\jlreq at helper@removeelement@@@#1#2{%
+  \jlreq at ifendmark{#2}{%
+    % 全体の解釈が終わった
+    \ifx\jlreq at tempa\jlreq at tempb\else
+      \ifx#1\@empty\edef#1{\expandonce{\jlreq at tempb}}%
+      \else\edef#1{\expandonce{#1},\expandonce{\jlreq at tempb}}\fi
+    \fi
+  }{%
+    \edef\jlreq at tempb{\expandonce{\jlreq at tempb}{#2}}%
+    \def\jlreq at next{\jlreq at helper@removeelement@{#1}}%
+    \expandafter\jlreq at next
+  }%
+}
+% カンマで区切って,その前と後ろを\jlreq at tempc,\jlreq at tempdに入れる
+% もしカンマがない場合は\ifjlreq at tempaがfalseになる.
+\def\jlreq at helper@dividebycomma#1{\jlreq at helper@dividebycomma@#1,\jlreq at endmark}
+\def\jlreq at helper@dividebycomma@#1,#2\jlreq at endmark{%
+  \def\jlreq at tempc{#1}%
+  \def\jlreq at tempd{#2}%
+  \ifx\jlreq at tempd\@empty\jlreq at tempafalse\else\jlreq at tempatrue\expandafter\def\expandafter\jlreq at tempd\expandafter{\jlreq at helper@removelastcomma#2\jlreq at endmark}\fi
+}
+\def\jlreq at helper@removelastcomma#1,\jlreq at endmark{#1}
+
+% #1が#2のトークン内と\ifxで一致すれば#3を,そうでなければ#4を実行する.
+% #2は\edefで展開する.{}があるとバグるかも.
+\def\jlreq at ifintokenlist#1#2{%
+  \begingroup
+    \jlreq at tempafalse
+    \edef\@tempa{#2}%
+    \expandafter\jlreq at helper@ifintokenlist@\expandafter{\@tempa}{#1}%
+    \ifjlreq at tempa
+      \def\jlreq at do{\@firstoftwo}%
+    \else
+      \def\jlreq at do{\@secondoftwo}%
+    \fi
+  \expandafter\endgroup
+  \jlreq at do
+}
+\def\jlreq at helper@ifintokenlist@#1#2{%
+  \jlreq at helper@ifintokenlist@@{#2}#1\jlreq at endmark
+}
+\def\jlreq at helper@ifintokenlist@@#1#2{%
+  \jlreq at ifendmark{#2}{%
+    \def\jlreq at next{}%
+  }{%
+    \ifx#1#2\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
+      {\jlreq at tempatrue\def\jlreq at next{\jlreq at deleteuntileendmark}}%
+      {\def\jlreq at next{\jlreq at helper@ifintokenlist@@{#1}}}%
+  }%
+  \jlreq at next
+}
+
+% vbox #1の最後を\jlreq at resultboxに入れる
+% #1の最後の行は消える
+\newcommand*{\jlreq at getlastbox}[1]{%
+  \setbox#1=\vbox{\unvbox#1\relax
+    \unskip\unskip\unpenalty\global\setbox\jlreq at resultbox=\lastbox}%
+  \ifhbox\jlreq at resultbox
+    \global\setbox\jlreq at resultbox=\hbox{%
+      \unhbox\jlreq at resultbox\unskip\unskip\unpenalty}%
+  \else
+    \global\setbox\jlreq at resultbox=\copy\voidb at x
+  \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}}
+%  *{key}{\def\val{#1}} % デフォルト値を空文字列にする
+%  {key}[choice1,choice2]{\def\valchoice{#1}}
+%}{parse対象}
+\def\jlreq at parsekeyval{%
+  \@ifstar{\jlreq at helper@parsekeyval@{*}}{\jlreq at helper@parsekeyval@{}}%
+}
+\def\jlreq at helper@parsekeyval@#1{%
+  \@ifnextchar[{\jlreq at helper@parsekeyval@@{#1}}{\jlreq at helper@parsekeyval@@{#1}[jlreq at key]}%
+}
+\long\def\jlreq at helper@parsekeyval@@#1[#2]#3#4{%
+  \begingroup
+    \def\jlreq at do{}%
+    \jlreq at helper@parsekeyval@@@{#2}#3{\jlreq at endmark}%
+    \setkeys#1{#2}{#4}%
+  \expandafter\endgroup
+  \jlreq at do
+}
+\def\jlreq at helper@parsekeyval@@@#1#2#{\jlreq at helper@parsekeyval@@@@{#1}#2\jlreq at endmark}%
+\def\jlreq at helper@parsekeyval@@@@#1#2{%
+  \jlreq at ifendmark{#2}{%
+    \def\@tempa{\jlreq at helper@parsekeyval@@@@@{#1}}%
+  }{%
+    \def\@tempa{\expandafter\@tempb\jlreq at deleteuntileendmark}%
+    \ifx *#2%
+      \def\@tempb{\jlreq at helper@parsekeyval@@@definekeywithdefault{#1}}%
+    \else
+      \def\@tempb{\jlreq at helper@parsekeyval@@@@@{#1}}%
+    \fi
+  }%
+  \@tempa
+}
+
+\long\def\jlreq at helper@parsekeyval@@@@@#1#2{%
+  \jlreq at ifendmark{#2}{%
+    \def\@tempa{}%
+  }{%
+    \def\@tempa{%
+      \@ifnextchar[{\jlreq at helper@parsekeyval@@@choicekey{#1}{#2}}{\jlreq at helper@parsekeyval@@@definekey{#1}{#2}}%
+    }%
+  }%
+  \@tempa
+}
+\long\def\jlreq at helper@parsekeyval@@@choicekey#1#2[#3]#4{%
+  \define at choicekey{#1}{#2}{#3}{\appto\jlreq at do{#4}}%
+  \jlreq at helper@parsekeyval@@@{#1}%
+}
+\long\def\jlreq at helper@parsekeyval@@@definekeywithdefault#1#2#3{%
+  \define at key{#1}{#2}[]{\appto\jlreq at do{#3}}%
+  \jlreq at helper@parsekeyval@@@{#1}%
+}
+\long\def\jlreq at helper@parsekeyval@@@definekey#1#2#3{%
+  \define at key{#1}{#2}{\appto\jlreq at do{#3}}%
+  \jlreq at helper@parsekeyval@@@{#1}%
+}
+
+% #1のboxを今の真ん中に配置する.
+\def\jlreq at box@putcenter#1{%
+  \begingroup
+    \jlreq at tempdima=\dimexpr(\ht#1 - \dp#1)/2\relax
+    \setbox\jlreq at tempboxa=\hbox{あ}%
+    \edef\jlreq at do{%
+      \noexpand\lower\the\dimexpr(\jlreq at tempdima - (\ht\jlreq at tempboxa - \dp\jlreq at tempboxa)/2)\relax\unexpanded{\box#1}%
+    }%
+  \expandafter\endgroup
+  \jlreq at do
+}
+
+% \jlreq at switch{str}{
+%   {str}{abcd}
+%   {str1}{xyz}
+%}[default: input = #1] -> abcd
+%または
+%
+% \jlreq at switch{str}{
+%   {str}{abcd}
+%   {str1}{xyz}
+%   {default} % ここは#1を受け付けない(パラメータトークンを受け付けたい場合のため).
+%} -> abcd
+% 文字列比較→\edefして比較する
+\long\def\jlreq at helper@switch at executeoption#1[#2]{%
+  \begingroup
+    \def\jlreq at do##1{#2}%
+  \expandafter\endgroup
+  \jlreq at do{#1}%
+}
+\long\def\jlreq at helper@removeoption[#1]{}
+\long\def\jlreq at switch#1#2{%
+  \begingroup
+    \let\jlreq at do\@undefined
+    \jlreq at helper@switch@{#1}#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}{}}}%
+    \fi
+  \expandafter\endgroup
+  \jlreq at do
+}
+\long\def\jlreq at helper@switch@#1#2{%
+  \jlreq at ifendmark{#2}{%
+    \def\jlreq at next{}%
+  }{%
+    \edef\jlreq at next{\unexpanded{\jlreq at helper@switch@@{#1}{#2}}}%
+  }%
+  \jlreq at next
+}
+\long\def\jlreq at helper@switch@@#1#2#3{%
+  \jlreq at ifendmark{#3}{%
+    \edef\jlreq at do{\unexpanded{#2}}%
+    \def\jlreq at next{}%
+  }{%
+    \edef\jlreq at tempa{#1}%
+    \edef\jlreq at tempb{#2}%
+    \ifx\jlreq at tempa\jlreq at tempb\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
+    {%
+      \edef\jlreq at do{\unexpanded{#3}}%
+      \def\jlreq at next{\jlreq at deleteuntileendmark}%
+    }{%
+      \def\jlreq at next{\jlreq at helper@switch@{#1}}%
+    }%
+  }%
+  \jlreq at next
+}
+
+% preambleにいるかのスイッチ
+\newif\ifjlreq at preamble
+\jlreq at preambletrue
+\AtBeginDocument{\jlreq at preamblefalse}
+
+%. オプションの定義
+% オプション処理の際にしか使わない変数(後でそれを元に別の変数を調整する)
+% ものは\jlreq at option@<key>に格納する.
+% _とかは@に変換する.
+\newcommand*{\jlreq at checkempty}[2]{
+  \jlreq at ifempty{#2}{}{\ClassError{jlreq}{The option #1 should have no value}{\@ehc}}%
+}
+% 引数無しの\DeclareOptionX
+\newcommand*{\jlreq at DeclareOption}[2]{%
+  \DeclareOptionX{#1}{\jlreq at checkempty{#1}{##1}#2}
+}
+% エンジン類
+\jlreq at DeclareOption{uplatex}{\let\jlreq at engine=u}
+\jlreq at DeclareOption{platex}{\let\jlreq at engine=p}
+\jlreq at DeclareOption{lualatex}{\let\jlreq at engine=l}
+
+% 文書のタイプ
+\newcommand*\jlreq at article@type{article}
+\define at choicekey{jlreq.cls}{article_type}{article,report,book}{\renewcommand*{\jlreq at article@type}{#1}}
+\jlreq at DeclareOption{article}{\renewcommand*{\jlreq at article@type}{article}}
+\jlreq at DeclareOption{report}{\renewcommand*{\jlreq at article@type}{report}}
+\jlreq at DeclareOption{book}{\renewcommand*{\jlreq at article@type}{book}}
+
+%.. 基本版面.まずは紙サイズ.
+\def\jlreq at switchpapersize{}
+\newcommand*\jlreq at addpapersize[4][]{%
+  \jlreq at ifempty{#2}{}{
+    \jlreq at DeclareOption{#2}{\setlength\paperheight{#3}\setlength\paperwidth{#4}}
+    \appto\jlreq at switchpapersize{{#2}{\setlength\paperheight{#3}\setlength\paperwidth{#4}}}
+  }
+  \jlreq at ifempty{#1}{}{
+    \appto\jlreq at switchpapersize{{#1}{\setlength\paperheight{#3}\setlength\paperwidth{#4}}}
+  }
+}
+\DeclareOptionX{paper}{
+  \edef\jlreq at do{%
+    \unexpanded{\jlreq at switch{#1}}{\expandonce{\jlreq at switchpapersize}}%
+    [\unexpanded{%
+      \jlreq at helper@dividebycomma{#1}%
+      \ifjlreq at tempa
+        \setlength{\paperheight}{\dimexpr\jlreq at tempc\relax}%
+        \setlength{\paperwidth}{\dimexpr\jlreq at tempd\relax}%
+      \else
+        \ClassError{jlreq}{The paper #1 is unknown}{\@ehc}%
+      \fi
+    }]%
+  }%
+  \jlreq at do
+}
+% 紙サイズ一覧.b*はJIS B.
+% [paper=で指定できるようにするもの]{オプション名}{縦}{横}
+\jlreq at addpapersize[a3]{a3paper}{420mm}{297mm}
+\jlreq at addpapersize[a4]{a4paper}{297mm}{210mm}
+\jlreq at addpapersize[a5]{a5paper}{210mm}{148mm}
+\jlreq at addpapersize[a6]{a6paper}{148mm}{105mm}
+\jlreq at addpapersize[b4]{b4paper}{364mm}{257mm}
+\jlreq at addpapersize[b5]{b5paper}{257mm}{182mm}
+\jlreq at addpapersize[b6]{b6paper}{182mm}{128mm}
+\jlreq at addpapersize{a4j}{297mm}{210mm}
+\jlreq at addpapersize{a5j}{210mm}{148mm}
+\jlreq at addpapersize{b4j}{364mm}{257mm}
+\jlreq at addpapersize{b5j}{257mm}{182mm}
+\jlreq at addpapersize{a4var}{283mm}{210mm}
+\jlreq at addpapersize{b5var}{230mm}{182mm}
+\jlreq at addpapersize[letter]{letterpaper}{11in}{8.5in}
+\jlreq at addpapersize[legal]{legalpaper}{14in}{8.5in}
+\jlreq at addpapersize[executive]{executivepaper}{10.5in}{7.25in}
+% 追加
+\jlreq at addpapersize[a0]{}{1189mm}{841mm}
+\jlreq at addpapersize[a1]{}{841mm}{594mm}
+\jlreq at addpapersize[a2]{}{420mm}{594mm}
+\jlreq at addpapersize[a7]{}{74mm}{105mm}
+\jlreq at addpapersize[a8]{}{52mm}{74mm}
+\jlreq at addpapersize[a9]{}{37mm}{52mm}
+\jlreq at addpapersize[a10]{}{26mm}{37mm}
+
+\jlreq at addpapersize[b0]{}{1030mm}{1456mm}
+\jlreq at addpapersize[b1]{}{728mm}{1030mm}
+\jlreq at addpapersize[b2]{}{515mm}{728mm}
+\jlreq at addpapersize[b3]{}{364mm}{515mm}
+\jlreq at addpapersize[b7]{}{91mm}{128mm}
+\jlreq at addpapersize[b8]{}{64mm}{91mm}
+\jlreq at addpapersize[b9]{}{45mm}{64mm}
+\jlreq at addpapersize[b10]{}{32mm}{45mm}
+
+\jlreq at addpapersize[c2]{}{458mm}{648mm}
+\jlreq at addpapersize[c3]{}{324mm}{458mm}
+\jlreq at addpapersize[c4]{}{229mm}{354mm}
+\jlreq at addpapersize[c5]{}{162mm}{229mm}
+\jlreq at addpapersize[c6]{}{114mm}{162mm}
+\jlreq at addpapersize[c7]{}{81mm}{114mm}
+\jlreq at addpapersize[c8]{}{57mm}{81mm}
+
+%.. フォントサイズ,行長,1ページあたりの行数で基本版面のサイズを決める(2.4.1.a)
+\newcommand*{\jlreq at option@fontsize}{}
+\DeclareOptionX{fontsize}{\renewcommand*{\jlreq at option@fontsize}{#1}}
+\jlreq at DeclareOption{10pt}{\renewcommand*{\jlreq at option@fontsize}{10pt}}
+\jlreq at DeclareOption{11pt}{\renewcommand*{\jlreq at option@fontsize}{11pt}}
+\jlreq at DeclareOption{12pt}{\renewcommand*{\jlreq at option@fontsize}{12pt}}
+
+%.. 行の長さ
+\newcommand*{\jlreq at option@line at length}{}
+\DeclareOptionX{line_length}{\renewcommand*{\jlreq at option@line at length}{#1}}
+%.. 1ページあたりの行数
+\newcommand*{\jlreq at option@number at of@lines}{}
+\DeclareOptionX{number_of_lines}{\renewcommand*{\jlreq at option@number at of@lines}{#1}}
+
+% 地の空き量,のどの空き量で配置位置を決める(2.4.1.b)省略されたら中央配置.
+%.. 天
+\newcommand*{\jlreq at option@head at space}{}
+\DeclareOptionX{head_space}{\renewcommand*{\jlreq at option@head at space}{#1}}
+
+%.. 地
+\newcommand*{\jlreq at option@foot at space}{}
+\DeclareOptionX{foot_space}{\renewcommand*{\jlreq at option@foot at space}{#1}}
+%.. のど
+\newcommand*{\jlreq at option@gutter}{}
+\DeclareOptionX{gutter}{\renewcommand*{\jlreq at option@gutter}{#1}}
+
+%.. 柱とノンブル
+\newcommand*{\jlreq at option@headfoot at verticalpos}{}
+\DeclareOptionX{headfoot_verticalposition}{\renewcommand*{\jlreq at option@headfoot at verticalpos}{#1}}
+\newcommand*{\jlreq at headfoot@sidemargin}{0pt}
+\DeclareOptionX{headfoot_sidemargin}{\renewcommand*{\jlreq at headfoot@sidemargin}{#1}}
+
+%.. 段間
+\newcommand*{\jlreq at option@column at gap}{2zw}
+\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}{}
+\DeclareOptionX{baselineskip}{\def\jlreq at option@baselineskip{#1}}
+\DeclareOptionX{linegap}{\def\jlreq at option@baselineskip{1zw + #1}}
+
+%.. 組み方系
+% 行頭に括弧が来たときの配置:3.1.5
+% 段落頭指定_折り返し行頭指定 で与える.
+\newcommand*{\jlreq at open@bracket at pos}{zenkaku_tentsuki}
+\define at choicekey{jlreq.cls}{open_bracket_pos}{zenkaku_tentsuki,zenkakunibu_nibu,nibu_tentsuki}{\renewcommand*{\jlreq at open@bracket at pos}{#1}}
+% ぶら下げ組みをするか:3.8.2 注1
+\newif\ifjlreq at burasage\jlreq at burasagefalse
+\jlreq at DeclareOption{hanging_punctuation}{\jlreq at burasagetrue}
+
+%.. 注
+% 合印の場所(4.2.3)行間に入れるか否か
+\newcommand*{\jlreq at referencemark}{inline}
+\define at choicekey{jlreq.cls}{reference_mark}{inline,interlinear}{\renewcommand*{\jlreq at referencemark}{#1}}
+% 脚注の字下げ,一行目を下げるならばone,二行目以降ならばtwo.ちょっと酷いので後で考える.
+\newcommand*{\jlreq at footnotetext@indent}{one}
+\define at choicekey{jlreq.cls}{footnotetext_indent}{one,two}{\renewcommand*{\jlreq at footnotetext@indent}{#1}}
+% 後注をどこに配置するか._headings(全ての見出し),_paragraph(段落後),_で始まらないやつ(その名前の見出し).カンマ区切り
+\newcommand*{\jlreq at endnote@position}{_headings}
+\DeclareOptionX{endnote_position}{\renewcommand*{\jlreq at endnote@position}{#1}}
+% 傍注のタイプ
+\newcommand*{\jlreq at sidenote@type}{number}
+\define at choicekey{jlreq.cls}{sidenote_type}{number,symbol}{\renewcommand*{\jlreq at sidenote@type}{#1}}
+\newcommand*{\jlreq at option@sidenote at width}{}
+\DeclareOptionX{sidenote_width}{\renewcommand*{\jlreq at option@sidenote at width}{#1}}
+
+\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 tate \@tatefalse
+\jlreq at DeclareOption{landscape}{\@landscapetrue}
+\jlreq at DeclareOption{tombo}{%
+  \tombowtrue \tombowdatefalse
+  \setlength{\@tombowwidth}{.1\p@}%
+  \maketombowbox}
+\jlreq at DeclareOption{mentuke}{%
+  \tombowtrue \tombowdatefalse
+  \setlength{\@tombowwidth}{\z@}%
+  \maketombowbox}
+\jlreq at DeclareOption{tate}{\@tatetrue
+  \AtBeginDocument{\tate\message{\jlreq at tategumi@message}\adjustbaseline}%
+}
+\newif\ifjlreq at option@twoside\jlreq at option@twosidefalse % onesideかtwosideが指定された
+\jlreq at DeclareOption{oneside}{\@twosidefalse\@mparswitchfalse\jlreq at option@twosidetrue}
+\jlreq at DeclareOption{twoside}{\@twosidetrue\@mparswitchtrue\jlreq at option@twosidetrue}
+\jlreq at DeclareOption{onecolumn}{\@twocolumnfalse}
+\jlreq at DeclareOption{twocolumn}{\@twocolumntrue}
+\jlreq at DeclareOption{titlepage}{\jlreq at option@titlepagetrue\@titlepagetrue}
+\jlreq at DeclareOption{notitlepage}{\jlreq at option@titlepagetrue\@titlepagefalse}
+\jlreq at DeclareOption{draft}{\setlength\overfullrule{5pt}}
+\jlreq at DeclareOption{final}{\setlength\overfullrule{0pt}}
+\newif\if at openright
+\newif\ifjlreq at option@open \jlreq at option@openfalse % openrightかopenanyが指定された
+\jlreq at DeclareOption{openright}{\@openrighttrue\jlreq at option@opentrue}
+\jlreq at DeclareOption{openany}{\@openrightfalse\jlreq at option@opentrue}
+\jlreq at DeclareOption{leqno}{\input{leqno.clo}}
+\jlreq at DeclareOption{fleqn}{\input{fleqn.clo}}
+
+\newcommand*{\jlreq at warning}[1]{}
+\jlreq at DeclareOption{jlreq_warnings}{\renewcommand*{\jlreq at warning}[1]{\ClassWarningNoLine{jlreq}{(JLREQ warning) ##1}}}
+
+\ExecuteOptionsX{article_type=article,paper=a4,fontsize=10pt,open_bracket_pos=zenkaku_tentsuki,reference_mark=inline,footnotetext_indent=one,endnote_position=headings,onecolumn,final}
+% \@removeelementを一旦置き換えてから\ProcessOptionsXを実行する
+\let\jlreq at original@@removeelement=\@removeelement
+\let\@removeelement=\jlreq at helper@removeelement
+\ProcessOptionsX*\relax
+\let\@removeelement=\jlreq at original@@removeelement
+
+\ifjlreq at option@titlepage\else
+  \ifthenelse{\equal{\jlreq at article@type}{article}}{\@titlepagefalse}{\@titlepagetrue}
+\fi
+\ifjlreq at option@open\else
+  \ifthenelse{\equal{\jlreq at article@type}{book}}{\@openrighttrue}{\@openrightfalse}
+\fi
+% articleではopenrightは効かない.
+\ifthenelse{\equal{\jlreq at article@type}{article}}{\@openrightfalse}{}
+\ifjlreq at option@twoside\else
+  \ifthenelse{\equal{\jlreq at article@type}{book}}{\@twosidetrue}{\@twosidefalse}
+\fi
+
+\def\jlreq at jlreqsetup@keyvallist{}
+\newcommand{\jlreqsetup}[1]{%
+  \begingroup
+    \edef\jlreq at do{\unexpanded{\jlreq at parsekeyval[jlreqsetup]}{\expandonce{\jlreq at jlreqsetup@keyvallist}}}%
+  \expandafter\endgroup
+  \jlreq at do{#1}%
+}
+\newcommand{\jlreq at jlreqsetup@add}[2]{%
+  \eappto\jlreq at jlreqsetup@keyvallist{\unexpanded{{#1}{#2}}}%
+}
+\@onlypreamble\jlreqsetup
+
+% エンジンの設定
+\ifx\jlreq at engine\@undefined
+  \ifx\luatexversion\@undefined
+    \ifx\ucs\@undefined
+      \let\jlreq at engine=p
+    \else
+      \let\jlreq at engine=u
+    \fi
+  \else
+    \let\jlreq at engine=l
+  \fi
+\fi
+
+\ifx l\jlreq at engine
+  \RequirePackage{luatexja}
+  \directlua{jlreq = {}}
+\fi
+
+% (u)pLaTeXの場合ここで初めて\epTeXinputencodingが発行されるので,
+% これ以前には和文は使えない.
+\ifx l\jlreq at engine\else
+  \epTeXinputencoding utf8
+  \def\zw{zw}\def\zh{zh}
+  % http://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=1508&parent=8435
+  \if at tate\AtEndPreamble{\par}\fi
+\fi
+\def\jlreq at tategumi@message{《縦組モード》}
+
+% \jlreq at gol(Gyo Okuri Length), \jlreq at mol (Moji Okuri Length)を定義
+\if at tate
+  \ifx l\jlreq at engine
+    \def\jlreq at gol{\zw}\def\jlreq at mol{\zh}
+  \else
+    \def\jlreq at gol{zw}\def\jlreq at mol{zh}  
+  \fi
+\else
+  \ifx l\jlreq at engine
+    \def\jlreq at gol{\zh}\def\jlreq at mol{\zw}
+  \else
+    \def\jlreq at gol{zh}\def\jlreq at mol{zw}
+  \fi
+\fi
+
+%. helper2(エンジン依存系)
+% 組方向を判定
+% \jlreq at if(y|t)(dir|box)を定義する.
+\def\jlreq at do{%
+  \def\jlreq at ifydir{\ifydir\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+  \def\jlreq at iftdir{\iftdir\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+  \def\jlreq at ifybox##1{\ifybox##1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+  \def\jlreq at iftbox##1{\iftbox##1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+}
+\ifx l\jlreq at engine
+  \def\jlreq at ifydir{\ifnum\ltjgetparameter{direction}=4\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+  \def\jlreq at iftdir{\ifnum\numexpr\ltjgetparameter{direction}-(\ltjgetparameter{direction}/8)*8=3\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+  \def\jlreq at ifybox#1{\ifnum\ltjgetparameter{boxdir}{#1}=4\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+  \def\jlreq at iftbox#1{\ifnum\numexpr\ltjgetparameter{boxdir}{#1}-(\ltjgetparameter{boxdir}{#1}/8)*8=3\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+\else
+  \jlreq at do
+\fi
+
+% 現在行の残りを得る.
+\RequirePackage[savepos]{zref}
+\newcount\jlreq at rest@linewidth at count
+\jlreq at rest@linewidth at count=0
+
+\ifx l\jlreq at engine
+  % 以下のコードはおかしい.
+  \newcommand*{\jlreq at calc@current at linewidth}{%
+    \dimexpr\zposx{jlreq at rest@width.pos.\the\jlreq at rest@linewidth at count} sp - \@totalleftmargin -
+    \ifodd\zref at extractdefault{jlreq at rest@width.page.\the\jlreq at rest@linewidth at count}{page}{\c at page}%
+      \oddsidemargin
+    \else
+      \evensidemargin
+    \fi
+    - 1in - \hoffset\relax
+  }
+\else
+  \newcommand*{\jlreq at calc@current at linewidth}{%
+    \dimexpr
+      \jlreq at ifydir{%
+        \zposx{jlreq at rest@width.pos.\the\jlreq at rest@linewidth at count} sp - \hoffset
+        \ifodd\zref at extractdefault{jlreq at rest@width.page.\the\jlreq at rest@linewidth at count}{page}{\c at page}%
+          - \oddsidemargin
+        \else
+          - \evensidemargin
+        \fi
+      }{%
+        \ifdim\pdfpagewidth=0pt
+          \paperheight
+        \else
+          \pdfpageheight
+        \fi
+        - \topmargin - \headheight - \headsep - \voffset
+        - \zposy{jlreq at rest@width.pos.\the\jlreq at rest@linewidth at count} sp
+      }%
+      - \@totalleftmargin - 1in
+    \relax
+  }
+\fi
+
+\newdimen\jlreq at current@linewidth
+\newdimen\jlreq at rest@linewidth
+% この命令以降,次にこの命令を実行する前まで\jlreq at rest@linewidth/\jlreq at rest@linewidthで
+% この場所における残り長さが取得できる.
+\newcommand*{\jlreq at savepos@for at rest@linewidth}{%
+  \global\advance\jlreq at rest@linewidth at count by 1\relax
+  \zsavepos{jlreq at rest@width.pos.\the\jlreq at rest@linewidth at count}%
+  \zref at labelbyprops{jlreq at rest@width.page.\the\jlreq at rest@linewidth at count}{page}%
+  \jlreq at current@linewidth=\jlreq at calc@current at linewidth
+  \jlreq at rest@linewidth=\dimexpr\linewidth - \jlreq at current@linewidth\relax
+}
+\def\jlreq at savepos@iflabelundefined{\@ifundefined{\ZREF at RefPrefix @jlreq at rest@width.pos.\the\jlreq at rest@linewidth at count}}
+
+%. 基本設定
+% 和文文字,欧文文字の設定(とりあえずLuaTeX-jaのデフォルトのまま)
+\ifx l\jlreq at engine
+  \ltjsetparameter{jacharrange={-1, +2, +3, -4, -5, +6, +7, -8}}
+  % kanjiskip, xkanjiskipはjfmのものを使う
+  \ltjsetparameter{kanjiskip=\maxdimen}
+  \ltjsetparameter{xkanjiskip=\maxdimen}
+\else
+  \kanjiskip=0pt plus 0.25zw minus 0pt
+  \xkanjiskip=0.25zw plus 0.25zw minus 0.125zw
+\fi
+
+% 禁則処理,表1,2に従う
+% 行末
+% 初め括弧類
+\ifx l\jlreq at engine
+  \newcommand*{\jlreq at setpostbreakpenalty}[2]{\ltjsetparameter{postbreakpenalty={`#1,#2}}}
+  \newcommand*{\jlreq at setprebreakpenalty}[2]{\ltjsetparameter{prebreakpenalty={`#1,#2}}}
+  \newcommand*{\jlreq at setjaxspmode}[2]{\ltjsetparameter{jaxspmode={`#1,#2}}}
+\else
+  \newcommand*{\jlreq at setpostbreakpenalty}[2]{\postbreakpenalty`#1=#2}
+  \newcommand*{\jlreq at setprebreakpenalty}[2]{\prebreakpenalty`#1=#2}
+  \newcommand*{\jlreq at setjaxspmode}[2]{%
+    \jlreq at switch{#2}{
+      {inhibit}{\inhibitxspcode`#1=0}
+      {preonly}{\inhibitxspcode`#1=1}
+      {postonly}{\inhibitxspcode`#1=2}
+      {allow}{\inhibitxspcode`#1=3}
+      {\inhibitxspcode`#1=#2}
+    }
+  }
+\fi
+
+\jlreq at setpostbreakpenalty{(}{10000}
+\jlreq at setpostbreakpenalty{〔}{10000}
+\jlreq at setpostbreakpenalty{[}{10000}
+\jlreq at setpostbreakpenalty{{}{10000}
+\jlreq at setpostbreakpenalty{〈}{10000}
+\jlreq at setpostbreakpenalty{《}{10000}
+\jlreq at setpostbreakpenalty{「}{10000}
+\jlreq at setpostbreakpenalty{『}{10000}
+\jlreq at setpostbreakpenalty{【}{10000}
+\ifx p\jlreq at engine\else
+\jlreq at setpostbreakpenalty{⦅}{10000}
+\jlreq at setpostbreakpenalty{〘}{10000}
+\jlreq at setpostbreakpenalty{〖}{10000}
+\jlreq at setpostbreakpenalty{«}{10000}
+\jlreq at setpostbreakpenalty{〝}{10000}
+\fi
+\jlreq at setpostbreakpenalty{‘}{10000}
+\jlreq at setpostbreakpenalty{“}{10000}
+% 前置省略記号
+\jlreq at setpostbreakpenalty{¥}{10000}
+\jlreq at setpostbreakpenalty{$}{10000}
+\jlreq at setpostbreakpenalty{£}{10000}
+\jlreq at setpostbreakpenalty{#}{10000}
+\ifx p\jlreq at engine\else
+\jlreq at setpostbreakpenalty{€}{10000}
+\jlreq at setpostbreakpenalty{№}{10000}
+\fi
+% 行頭
+% 終わり括弧類
+\jlreq at setprebreakpenalty{)}{10000}
+\jlreq at setprebreakpenalty{〕}{10000}
+\jlreq at setprebreakpenalty{]}{10000}
+\jlreq at setprebreakpenalty{}}{10000}
+\jlreq at setprebreakpenalty{〉}{10000}
+\jlreq at setprebreakpenalty{》}{10000}
+\jlreq at setprebreakpenalty{」}{10000}
+\jlreq at setprebreakpenalty{』}{10000}
+\jlreq at setprebreakpenalty{】}{10000}
+\ifx p\jlreq at engine\else
+\jlreq at setprebreakpenalty{⦆}{10000}
+\jlreq at setprebreakpenalty{〙}{10000}
+\jlreq at setprebreakpenalty{〗}{10000}
+\jlreq at setprebreakpenalty{»}{10000}
+\jlreq at setprebreakpenalty{〟}{10000}
+\fi
+\jlreq at setprebreakpenalty{’}{10000}
+\jlreq at setprebreakpenalty{”}{10000}
+% ハイフン類
+\jlreq at setprebreakpenalty{‐}{10000}
+\ifx p\jlreq at engine\else
+\jlreq at setprebreakpenalty{゠}{10000}
+\jlreq at setprebreakpenalty{–}{10000}
+\jlreq at setprebreakpenalty{〜}{10000}
+\fi
+% 区切り約物
+\jlreq at setprebreakpenalty{!}{10000}
+\jlreq at setprebreakpenalty{?}{10000}
+\ifx p\jlreq at engine\else
+\jlreq at setprebreakpenalty{‼}{10000}
+\jlreq at setprebreakpenalty{⁇}{10000}
+\jlreq at setprebreakpenalty{⁈}{10000}
+\jlreq at setprebreakpenalty{⁉}{10000}
+\fi
+% 中点類
+\jlreq at setprebreakpenalty{・}{10000}
+\jlreq at setprebreakpenalty{:}{10000}
+\jlreq at setprebreakpenalty{;}{10000}
+% 句点類
+\jlreq at setprebreakpenalty{。}{10000}
+\jlreq at setprebreakpenalty{.}{10000}
+% 読点類
+\jlreq at setprebreakpenalty{、}{10000}
+\jlreq at setprebreakpenalty{,}{10000}
+% 繰返し記号
+\jlreq at setprebreakpenalty{ヽ}{10000}
+\jlreq at setprebreakpenalty{ヾ}{10000}
+\jlreq at setprebreakpenalty{ゝ}{10000}
+\jlreq at setprebreakpenalty{ゞ}{10000}
+\jlreq at setprebreakpenalty{々}{10000}
+\ifx p\jlreq at engine\else
+\jlreq at setprebreakpenalty{〻}{10000}
+\fi
+% 長音記号
+\jlreq at setprebreakpenalty{ー}{10000}
+% 小書きの仮名
+\jlreq at setprebreakpenalty{ぁ}{10000}
+\jlreq at setprebreakpenalty{ぃ}{10000}
+\jlreq at setprebreakpenalty{ぅ}{10000}
+\jlreq at setprebreakpenalty{ぇ}{10000}
+\jlreq at setprebreakpenalty{ぉ}{10000}
+\jlreq at setprebreakpenalty{ァ}{10000}
+\jlreq at setprebreakpenalty{ィ}{10000}
+\jlreq at setprebreakpenalty{ゥ}{10000}
+\jlreq at setprebreakpenalty{ェ}{10000}
+\jlreq at setprebreakpenalty{ォ}{10000}
+\jlreq at setprebreakpenalty{っ}{10000}
+\jlreq at setprebreakpenalty{ゃ}{10000}
+\jlreq at setprebreakpenalty{ゅ}{10000}
+\jlreq at setprebreakpenalty{ょ}{10000}
+\jlreq at setprebreakpenalty{ゎ}{10000}
+\ifx p\jlreq at engine\else
+\jlreq at setprebreakpenalty{ゕ}{10000}
+\jlreq at setprebreakpenalty{ゖ}{10000}
+\fi
+\jlreq at setprebreakpenalty{ッ}{10000}
+\jlreq at setprebreakpenalty{ャ}{10000}
+\jlreq at setprebreakpenalty{ュ}{10000}
+\jlreq at setprebreakpenalty{ョ}{10000}
+\jlreq at setprebreakpenalty{ヮ}{10000}
+\jlreq at setprebreakpenalty{ヵ}{10000}
+\jlreq at setprebreakpenalty{ヶ}{10000}
+\ifx p\jlreq at engine\else
+\jlreq at setprebreakpenalty{ㇰ}{10000}
+\jlreq at setprebreakpenalty{ㇱ}{10000}
+\jlreq at setprebreakpenalty{ㇲ}{10000}
+\jlreq at setprebreakpenalty{ㇳ}{10000}
+\jlreq at setprebreakpenalty{ㇴ}{10000}
+\jlreq at setprebreakpenalty{ㇵ}{10000}
+\jlreq at setprebreakpenalty{ㇶ}{10000}
+\jlreq at setprebreakpenalty{ㇷ}{10000}
+\jlreq at setprebreakpenalty{ㇸ}{10000}
+\jlreq at setprebreakpenalty{ㇹ}{10000}
+\jlreq at setprebreakpenalty{ㇺ}{10000}
+\jlreq at setprebreakpenalty{ㇻ}{10000}
+\jlreq at setprebreakpenalty{ㇼ}{10000}
+\jlreq at setprebreakpenalty{ㇽ}{10000}
+\jlreq at setprebreakpenalty{ㇾ}{10000}
+\jlreq at setprebreakpenalty{ㇿ}{10000}
+\fi
+
+% xkanjiskip
+% 初め括弧類(二分)
+\jlreq at setjaxspmode{(}{preonly}
+\jlreq at setjaxspmode{〔}{preonly}
+\jlreq at setjaxspmode{[}{preonly}
+\jlreq at setjaxspmode{{}{preonly}
+\jlreq at setjaxspmode{〈}{preonly}
+\jlreq at setjaxspmode{《}{preonly}
+\jlreq at setjaxspmode{「}{preonly}
+\jlreq at setjaxspmode{『}{preonly}
+\jlreq at setjaxspmode{【}{preonly}
+\ifx p\jlreq at engine\else
+\jlreq at setjaxspmode{⦅}{preonly}
+\jlreq at setjaxspmode{〘}{preonly}
+\jlreq at setjaxspmode{〖}{preonly}
+\jlreq at setjaxspmode{«}{preonly}
+\jlreq at setjaxspmode{〝}{preonly}
+\fi
+\jlreq at setjaxspmode{‘}{preonly}
+\jlreq at setjaxspmode{“}{preonly}
+% 終わり括弧類(二分)
+\jlreq at setjaxspmode{)}{postonly}
+\jlreq at setjaxspmode{〕}{postonly}
+\jlreq at setjaxspmode{]}{postonly}
+\jlreq at setjaxspmode{}}{postonly}
+\jlreq at setjaxspmode{〉}{postonly}
+\jlreq at setjaxspmode{》}{postonly}
+\jlreq at setjaxspmode{」}{postonly}
+\jlreq at setjaxspmode{』}{postonly}
+\jlreq at setjaxspmode{】}{postonly}
+\ifx p\jlreq at engine\else
+\jlreq at setjaxspmode{⦆}{postonly}
+\jlreq at setjaxspmode{〙}{postonly}
+\jlreq at setjaxspmode{〗}{postonly}
+\jlreq at setjaxspmode{»}{postonly}
+\jlreq at setjaxspmode{〟}{postonly}
+\fi
+\jlreq at setjaxspmode{’}{postonly}
+\jlreq at setjaxspmode{”}{postonly}
+% ハイフン類(二分)
+\jlreq at setjaxspmode{‐}{inhibit}
+\ifx p\jlreq at engine\else
+\jlreq at setjaxspmode{゠}{inhibit}
+\jlreq at setjaxspmode{–}{inhibit}
+\jlreq at setjaxspmode{〜}{inhibit}
+\fi
+% 区切り約物
+\jlreq at setjaxspmode{!}{postonly}
+\jlreq at setjaxspmode{?}{postonly}
+\ifx p\jlreq at engine\else
+\jlreq at setjaxspmode{‼}{postonly}
+\jlreq at setjaxspmode{⁇}{postonly}
+\jlreq at setjaxspmode{⁈}{postonly}
+\jlreq at setjaxspmode{⁉}{postonly}
+\fi
+% 中点類
+\jlreq at setjaxspmode{・}{postonly}
+\jlreq at setjaxspmode{:}{postonly}
+\jlreq at setjaxspmode{;}{postonly}
+% 句点類(二分)
+\jlreq at setjaxspmode{。}{postonly}
+\jlreq at setjaxspmode{.}{postonly}
+% 読点類(二分)
+\jlreq at setjaxspmode{、}{postonly}
+\jlreq at setjaxspmode{,}{postonly}
+% 分離禁止文字
+\jlreq at setjaxspmode{—}{inhibit}
+\jlreq at setjaxspmode{…}{inhibit}
+\jlreq at setjaxspmode{‥}{inhibit}
+\ifx p\jlreq at engine\else
+\jlreq at setjaxspmode{〳}{inhibit}
+\jlreq at setjaxspmode{〴}{inhibit}
+\jlreq at setjaxspmode{〵}{inhibit}
+\fi
+% 前置省略記号
+\jlreq at setjaxspmode{¥}{inhibit}
+\jlreq at setjaxspmode{$}{inhibit}
+\jlreq at setjaxspmode{£}{inhibit}
+\jlreq at setjaxspmode{#}{inhibit}
+\ifx p\jlreq at engine\else
+\jlreq at setjaxspmode{€}{inhibit}
+\jlreq at setjaxspmode{№}{inhibit}
+\fi
+% 後置省略記号
+\jlreq at setjaxspmode{°}{inhibit}
+\jlreq at setjaxspmode{′}{inhibit}
+\jlreq at setjaxspmode{″}{inhibit}
+\jlreq at setjaxspmode{℃}{inhibit}
+\jlreq at setjaxspmode{¢}{inhibit}
+\jlreq at setjaxspmode{%}{inhibit}
+\jlreq at setjaxspmode{‰}{inhibit}
+\ifx p\jlreq at engine\else
+\jlreq at setjaxspmode{㏋}{inhibit}
+\jlreq at setjaxspmode{ℓ}{inhibit}
+\jlreq at setjaxspmode{㌃}{inhibit}
+\jlreq at setjaxspmode{㌍}{inhibit}
+\jlreq at setjaxspmode{㌔}{inhibit}
+\jlreq at setjaxspmode{㌘}{inhibit}
+\jlreq at setjaxspmode{㌢}{inhibit}
+\jlreq at setjaxspmode{㌣}{inhibit}
+\jlreq at setjaxspmode{㌦}{inhibit}
+\jlreq at setjaxspmode{㌧}{inhibit}
+\jlreq at setjaxspmode{㌫}{inhibit}
+\jlreq at setjaxspmode{㌶}{inhibit}
+\jlreq at setjaxspmode{㌻}{inhibit}
+\jlreq at setjaxspmode{㍉}{inhibit}
+\jlreq at setjaxspmode{㍊}{inhibit}
+\jlreq at setjaxspmode{㍍}{inhibit}
+\jlreq at setjaxspmode{㍑}{inhibit}
+\jlreq at setjaxspmode{㍗}{inhibit}
+\jlreq at setjaxspmode{㎎}{inhibit}
+\jlreq at setjaxspmode{㎏}{inhibit}
+\jlreq at setjaxspmode{㎜}{inhibit}
+\jlreq at setjaxspmode{㎝}{inhibit}
+\jlreq at setjaxspmode{㎞}{inhibit}
+\jlreq at setjaxspmode{㎡}{inhibit}
+\jlreq at setjaxspmode{㏄}{inhibit}
+\fi
+% 分割禁止(分離禁止文字は特定の並びで分割禁止だが,とりあえず一括で禁止しておく.)
+\jlreq at setprebreakpenalty{—}{10000}
+\jlreq at setprebreakpenalty{…}{10000}
+\jlreq at setprebreakpenalty{‥}{10000}
+% ¥100とか70%とか……
+
+
+%. オプション処理
+%.. フォント関連
+\newdimen\jlreq at fontsize
+\ifx l\jlreq at engine
+  \jlreq at tempdima=0.25mm
+  \setlength{\jlreq at fontsize}{%
+    \dimexpr\directlua{
+      local act = string.char(92)
+      local s = [[\jlreq at option@fontsize]]
+      s = s:gsub("Q",act .. "jlreq at tempdima")
+      tex.print(s)
+    }\relax
+  }%
+\else
+  \setlength{\jlreq at fontsize}{\dimexpr\jlreq at option@fontsize\relax}
+\fi
+
+% JFMに関連する設定
+\ifx l\jlreq at engine
+  % この値は後でjfm-jlreq内で読む
+  \directlua{jlreq.open_bracket_pos = [[\jlreq at open@bracket at pos]]}
+  \ifjlreq at burasage\directlua{jlreq.burasage = true}
+  \else\directlua{jlreq.burasage = false}\fi
+\else
+  % 非LuaTeXの場合はJFMの入れ替えと\everyparでの処理で対処.
+  \def\jlreq at jfmname@prefix{}
+  \def\jlreq at openbreackets@list{(〔[{〈《「『【}
+  \ifx u\jlreq at engine\edef\jlreq at openbreackets@list{\jlreq at openbreackets@list {⦅〘〖«〝‘“}}\fi
+  % \jlreq at jfmnameにJFMの名前を入れる
+  \ifjlreq at burasage\edef\jlreq at jfmname@prefix{b\jlreq at jfmname@prefix}\fi
+  \ifthenelse{\equal{\jlreq at open@bracket at pos}{zenkakunibu_nibu}}{\edef\jlreq at jfmname@prefix{\jlreq at jfmname@prefix z}}{}
+  \ifx u\jlreq at engine\edef\jlreq at jfmname@prefix{u\jlreq at jfmname@prefix}\fi
+  \edef\jlreq at jfmname{\jlreq at jfmname@prefix jlreq}
+  \edef\jlreq at jfmnameg{\jlreq at jfmname@prefix jlreqg}
+  % JFM glueの伸び縮みで行頭括弧が揃わないのを防ぐために常に\inhibitglueを入れる.
+  \ifthenelse{\equal{\jlreq at open@bracket at pos}{nibu_tentsuki}}{
+    \def\jlreq at openbracket@hook{\jlreq at ifintokenlist{\jlreq at nextchar}{\jlreq at openbreackets@list}{\hskip -.5\jlreq at mol\inhibitglue}{}}
+  }{% zenkakunibu_nibu,zenkaku_tentsuki
+    \def\jlreq at openbracket@hook{\jlreq at ifintokenlist{\jlreq at nextchar}{\jlreq at openbreackets@list}{\inhibitglue}{}}
+  }
+  \AtBeginDocument{\PushPostHook{par}{\futurelet\jlreq at nextchar\jlreq at openbracket@hook}}
+\fi
+% 開き括弧の幅が全角の場合は,ベタ組にするために補正が必要
+\ifthenelse{\equal{\jlreq at open@bracket at pos}{zenkakunibu_nibu}}{
+  \def\jlreq at open@bracket at before@space{\hskip -.5\jlreq at mol}
+}{
+  \def\jlreq at open@bracket at before@space{}
+}
+
+%. フォント
+\RequirePackage{lmodern}
+
+% 古いフォントコマンド
+\DeclareOldFontCommand{\jlreq at oldfontcommand@mc}{\normalfont\mcfamily}{\mathmc}
+\DeclareOldFontCommand{\jlreq at oldfontcommand@gt}{\normalfont\gtfamily}{\mathgt}
+\DeclareOldFontCommand{\jlreq at oldfontcommand@rm}{\normalfont\rmfamily}{\mathrm}
+\DeclareOldFontCommand{\jlreq at oldfontcommand@sf}{\normalfont\sffamily}{\mathsf}
+\DeclareOldFontCommand{\jlreq at oldfontcommand@tt}{\normalfont\ttfamily}{\mathtt}
+\DeclareOldFontCommand{\jlreq at oldfontcommand@bf}{\normalfont\bfseries}{\mathbf}
+\DeclareOldFontCommand{\jlreq at oldfontcommand@it}{\normalfont\itshape}{\mathit}
+\DeclareOldFontCommand{\jlreq at oldfontcommand@sl}{\normalfont\slshape}{\@nomath\sl}
+\DeclareOldFontCommand{\jlreq at oldfontcommand@sc}{\normalfont\scshape}{\@nomath\sc}
+\newcommand*{\jlreq at oldfontcommand@enable}{%
+  \let\mc=\jlreq at oldfontcommand@mc
+  \let\gt=\jlreq at oldfontcommand@gt
+  \let\rm=\jlreq at oldfontcommand@rm
+  \let\sf=\jlreq at oldfontcommand@sf
+  \let\tt=\jlreq at oldfontcommand@tt
+  \let\bf=\jlreq at oldfontcommand@bf
+  \let\it=\jlreq at oldfontcommand@it
+  \let\sl=\jlreq at oldfontcommand@sl
+  \let\sc=\jlreq at oldfontcommand@sc
+}
+\newcommand*{\jlreq at oldfontcommand@disable}{%
+  \let\mc=\@undefined
+  \let\gt=\@undefined
+  \let\rm=\@undefined
+  \let\sf=\@undefined
+  \let\tt=\@undefined
+  \let\bf=\@undefined
+  \let\it=\@undefined
+  \let\sl=\@undefined
+  \let\sc=\@undefined
+}
+
+\DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal}
+\DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal}
+
+%.. 和文
+\ifx l\jlreq at engine
+  \RequirePackage{luatexja-adjust}
+  \ltjenableadjust[lineend=extended,priority=true]
+  \ltjsetparameter{stretch_priority={kanjiskip=10,xkanjiskip=-30}}
+  \ltjsetparameter{shrink_priority={kanjiskip=0,xkanjiskip=0}}
+\fi
+
+\ifx u\jlreq at engine
+  \def\jlreq at yokokanjiencoding{JY2}
+  \def\jlreq at tatekanjiencoding{JT2}
+\fi
+\ifx p\jlreq at engine
+  \def\jlreq at yokokanjiencoding{JY1}
+  \def\jlreq at tatekanjiencoding{JT1}
+\fi
+\ifx l\jlreq at engine
+  \def\jlreq at yokokanjiencoding{JY3}
+  \def\jlreq at tatekanjiencoding{JT3}
+  \expandafter\let\csname JY3/mc/m/n/10\endcsname\relax
+  \expandafter\let\csname JT3/mc/m/n/10\endcsname\relax
+  \DeclareFontShape{JY3}{mc}{m}{n}{<->\ltj at stdmcfont:jfm=jlreq;script=latn;-kern}{}
+  \DeclareFontShape{JY3}{gt}{m}{n}{<->\ltj at stdgtfont:jfm=jlreq;script=latn;-kern}{}
+  \DeclareFontShape{JT3}{mc}{m}{n}{<->\ltj at stdmcfont:jfm=jlreqv;script=latn;-kern}{}
+  \DeclareFontShape{JT3}{gt}{m}{n}{<->\ltj at stdgtfont:jfm=jlreqv;script=latn;-kern}{}
+\else
+  \expandafter\let\csname \jlreq at yokokanjiencoding/mc/m/n/10\endcsname\relax
+  \expandafter\let\csname \jlreq at tatekanjiencoding/mc/m/n/10\endcsname\relax
+  \DeclareFontShape{\jlreq at yokokanjiencoding}{mc}{m}{n}{<-> \jlreq at jfmname}{}
+  \DeclareFontShape{\jlreq at yokokanjiencoding}{gt}{m}{n}{<-> \jlreq at jfmnameg}{}
+  \DeclareFontShape{\jlreq at tatekanjiencoding}{mc}{m}{n}{<-> \jlreq at jfmname-v}{}
+  \DeclareFontShape{\jlreq at tatekanjiencoding}{gt}{m}{n}{<-> \jlreq at jfmnameg-v}{}
+\fi
+\DeclareFontShape{\jlreq at yokokanjiencoding}{mc}{bx}{n}{<->ssub*gt/m/n}{}
+\DeclareFontShape{\jlreq at yokokanjiencoding}{gt}{bx}{n}{<->ssub*gt/m/n}{}
+\DeclareFontShape{\jlreq at yokokanjiencoding}{mc}{m}{it}{<->ssub*mc/m/n}{}
+\DeclareFontShape{\jlreq at yokokanjiencoding}{mc}{m}{sl}{<->ssub*mc/m/n}{}
+\DeclareFontShape{\jlreq at yokokanjiencoding}{mc}{m}{sc}{<->ssub*mc/m/n}{}
+\DeclareFontShape{\jlreq at yokokanjiencoding}{gt}{m}{it}{<->ssub*gt/m/n}{}
+\DeclareFontShape{\jlreq at yokokanjiencoding}{gt}{m}{sl}{<->ssub*gt/m/n}{}
+\DeclareFontShape{\jlreq at yokokanjiencoding}{mc}{bx}{it}{<->ssub*gt/m/n}{}
+\DeclareFontShape{\jlreq at yokokanjiencoding}{mc}{bx}{sl}{<->ssub*gt/m/n}{}
+\DeclareFontShape{\jlreq at tatekanjiencoding}{mc}{bx}{n}{<->ssub*gt/m/n}{}
+\DeclareFontShape{\jlreq at tatekanjiencoding}{gt}{bx}{n}{<->ssub*gt/m/n}{}
+\DeclareFontShape{\jlreq at tatekanjiencoding}{mc}{m}{it}{<->ssub*mc/m/n}{}
+\DeclareFontShape{\jlreq at tatekanjiencoding}{mc}{m}{sl}{<->ssub*mc/m/n}{}
+\DeclareFontShape{\jlreq at tatekanjiencoding}{mc}{m}{sc}{<->ssub*mc/m/n}{}
+\DeclareFontShape{\jlreq at tatekanjiencoding}{gt}{m}{it}{<->ssub*gt/m/n}{}
+\DeclareFontShape{\jlreq at tatekanjiencoding}{gt}{m}{sl}{<->ssub*gt/m/n}{}
+\DeclareFontShape{\jlreq at tatekanjiencoding}{mc}{bx}{it}{<->ssub*gt/m/n}{}
+\DeclareFontShape{\jlreq at tatekanjiencoding}{mc}{bx}{sl}{<->ssub*gt/m/n}{}
+
+% 数式フォント設定
+\ifx l\jlreq at engine\else
+  \DeclareSymbolFont{mincho}{\jlreq at yokokanjiencoding}{mc}{m}{n}
+  \DeclareSymbolFontAlphabet{\mathmc}{mincho}
+  \SetSymbolFont{mincho}{bold}{\jlreq at yokokanjiencoding}{gt}{m}{n}
+  \jfam\symmincho
+  \DeclareMathAlphabet{\mathgt}{\jlreq at yokokanjiencoding}{gt}{m}{n}
+\fi
+\AtBeginDocument{%
+  \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc}%
+  \reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt}%
+}
+
+% \baselineskipの計算
+% いったん文字サイズを変更((u)platexの際にzh/zwをきちんとするため)
+\@setfontsize\normalsize{\jlreq at fontsize}{\jlreq at fontsize}%
+\newdimen\jlreq at baselineskip
+\ifx\jlreq at option@baselineskip\@empty
+  \setlength{\jlreq at baselineskip}{\dimexpr 17\jlreq at fontsize/10\relax}%
+\else
+  \ifx l\jlreq at engine
+    \jlreq at tempdima=0.25mm
+    \setlength{\jlreq at baselineskip}{%
+      \dimexpr\directlua{
+        local act = string.char(92)
+        local s = [[\jlreq at option@baselineskip]]
+        s = s:gsub("Q",act .. "jlreq at tempdima"):gsub("zh",act .. "zh"):gsub("zw",act .. "zw")
+        tex.print(s)
+      }\relax
+    }%
+  \else
+    \setlength{\jlreq at baselineskip}{\jlreq at option@baselineskip}
+  \fi
+\fi
+\ifdim\jlreq at fontsize>\jlreq at baselineskip
+  \ClassError{jlreq}{The baselineskip is less than fontsize}{\@ehc}%
+\fi
+\ifthenelse{\lengthtest{\jlreq at baselineskip<1.5\jlreq at fontsize} \OR \lengthtest{\jlreq at baselineskip>2\jlreq at fontsize}}{
+  \jlreq at warning{行間は二分以上全角以下が望ましい (2.4.2.d 注3)}
+}{}
+
+\emergencystretch 3\jlreq at mol
+
+\renewcommand{\normalsize}{%
+  \@setfontsize\normalsize{\jlreq at fontsize}{\jlreq at baselineskip}%
+  \abovedisplayskip 1.1\jlreq at fontsize \@plus .3\jlreq at fontsize \@minus .4\jlreq at fontsize
+  \abovedisplayshortskip \z@ \@plus .3\jlreq at fontsize
+  \belowdisplayskip .9\jlreq at fontsize \@plus.3\jlreq at fontsize \@minus.4\jlreq at fontsize
+  \belowdisplayshortskip \belowdisplayskip
+  \let\@listi\@listI}
+
+\if at tate\tate\fi % ここで発行しておく
+\mcfamily\selectfont\normalsize
+\setbox0\hbox{ } % 全角スペース
+\setlength\Cht{\ht0}
+\setlength\Cdp{\dp0}
+\setlength\Cwd{\wd0}
+\setlength\Cvs{\baselineskip}
+\setlength\Chs{\wd0}
+
+% 4.1.3.a
+% 文字サイズを基準としているような寸法に対しては,
+% \@setfontsizeが実行されるたびに追随して値を変える
+% その処理は\jlreq at setfontsizehookに入れる
+\let\jlreq at original@@setfontsize=\@setfontsize
+\renewcommand*{\@setfontsize}[3]{%
+  \jlreq at original@@setfontsize{#1}{#2}{#3}%
+  \jlreq at setfontsizehook
+}
+\def\jlreq at setfontsizehook{}
+\appto\jlreq at setfontsizehook{\ifdim\parindent>0pt\setlength{\parindent}{1\jlreq at mol}\fi}
+
+% 2.5.2 \baselineskipは一定の方がよい?
+\newcommand{\footnotesize}{%
+  \@setfontsize\footnotesize{.8\jlreq at fontsize}{\dimexpr 115\jlreq at baselineskip/170\relax}% 脚注文字サイズの二分より少し小さい値を行間に: 4.2.5.e
+  \abovedisplayskip .6\jlreq at gol \@plus.2\jlreq at gol \@minus.4\jlreq at gol
+  \abovedisplayshortskip \z@ \@plus.1\jlreq at gol
+  \belowdisplayshortskip .3\jlreq at gol \@plus.1\jlreq at gol \@minus.2\jlreq at gol
+  \def\@listi{\leftmargin\leftmargini
+    \topsep .3\jlreq at gol \@plus.1\jlreq at gol \@minus.1\jlreq at gol
+    \parsep .2\jlreq at gol \@plus.1\jlreq at gol \@minus.1\jlreq at gol
+    \itemsep \parsep}%
+  \belowdisplayskip \abovedisplayskip}
+% tsize10.cloの引数を,そのまま\jlreq at fontsize/\jlreq at baselineskipでスケーリングしているだけ.
+\newcommand{\small}{%
+  \@setfontsize\small{.9\jlreq at fontsize}{\dimexpr 11\jlreq at baselineskip/17\relax}%
+  \abovedisplayskip .85\jlreq at gol \@plus.3\jlreq at gol \@minus.4\jlreq at gol
+  \abovedisplayshortskip \z@ \@plus.2\jlreq at gol
+  \belowdisplayshortskip .4\jlreq at gol \@plus.2\jlreq at gol \@minus.2\jlreq at gol
+  \def\@listi{\leftmargin\leftmargini
+    \topsep .4\jlreq at gol \@plus.2\jlreq at gol \@minus.2\jlreq at gol
+    \parsep .2\jlreq at gol \@plus.1\jlreq at gol \@minus.1\jlreq at gol
+    \itemsep \parsep}%
+  \belowdisplayskip \abovedisplayskip}
+\newcommand{\scriptsize}{\@setfontsize\scriptsize{\dimexpr 7\jlreq at fontsize/10\relax}{\dimexpr 8\jlreq at baselineskip/17\relax}}
+\newcommand{\tiny}{\@setfontsize\tiny{\dimexpr 5\jlreq at fontsize/10\relax}{\dimexpr 6\jlreq at baselineskip/17\relax}}
+\newcommand{\large}{\@setfontsize\large{\dimexpr12\jlreq at fontsize/10\relax}{\jlreq at baselineskip}}
+\newcommand{\Large}{\@setfontsize\Large{\dimexpr14\jlreq at fontsize/10\relax}{\dimexpr 21\jlreq at baselineskip/17\relax}}
+\newcommand{\LARGE}{\@setfontsize\LARGE{\dimexpr17\jlreq at fontsize/10\relax}{\dimexpr 25\jlreq at baselineskip/17\relax}}
+\newcommand{\huge}{\@setfontsize\huge{2\jlreq at fontsize}{\dimexpr 28\jlreq at baselineskip/17\relax}}
+\newcommand{\Huge}{\@setfontsize\Huge{\dimexpr 25\jlreq at fontsize/10\relax}{\dimexpr 33\jlreq at baselineskip/17\relax}}
+
+\if at tate
+  \ifx l\jlreq at engine
+    \RequirePackage{lltjext}
+  \else
+    \RequirePackage{plext}
+  \fi
+  \renewcommand*{\@Kanji}[1]{\expandafter\kansuji\number #1\relax} % \relax追加
+  \rensujiskip=0\zh plus 0.25\zh minus 0\zh
+\fi
+
+% このあたりはtarticleと同じ
+\setlength\lineskip{.1\jlreq at gol}
+\setlength\normallineskip{.1\jlreq at gol}
+\renewcommand{\baselinestretch}{}
+\setlength\parskip{0\p@ \@plus \p@}
+\setlength\parindent{1\jlreq at mol}
+\@lowpenalty   51
+\@medpenalty  151
+\@highpenalty 301
+
+% 変数定義(他にも散らばっているけど)
+% 罫線の太さ(4.4.3.c 注1)
+\newdimen\jlreq at omotekeiwidth
+\jlreq at omotekeiwidth=0.12mm
+\newdimen\jlreq at chuubusokeiwidth
+\jlreq at chuubusokeiwidth=0.25mm
+\newdimen\jlreq at urakeiwidth
+\jlreq at urakeiwidth=0.4mm
+% 脚注のインデント
+\newdimen\jlreq at footnoteindent
+
+%\RequirePackage{jlreq-debug}
+
+%. ページレイアウト
+% landscapeの場合縦横をひっくり返す
+\if at landscape
+  \setlength\@tempdima  {\paperheight}
+  \setlength\paperheight{\paperwidth}
+  \setlength\paperwidth {\@tempdima}
+\fi
+
+% \pdfpagewidthとか設定
+\ifx l\jlreq at engine
+  \let\jlreq at pagewidth=\pagewidth
+  \let\jlreq at pageheight=\pageheight
+\else
+  \let\jlreq at pagewidth=\pdfpagewidth
+  \let\jlreq at pageheight=\pdfpageheight
+\fi
+\setlength{\jlreq at pagewidth}{\paperwidth}
+\setlength{\jlreq at pageheight}{\paperheight}
+\iftombow
+  \addtolength{\jlreq at pagewidth}{2in}
+  \addtolength{\jlreq at pageheight}{2in}
+\fi
+
+
+\ifx l\jlreq at engine
+  \def\jlreq at expand@speciallength#1{%
+    % zhやzwを\zhや\zwにする.
+    \directlua{
+      local act = string.char(92)
+      local s = [[#1]]
+      s = s:gsub("zw",act .. "zw"):gsub("zh",act .. "zh")
+      tex.print(s)
+    }%
+  }
+\else
+  \def\jlreq at expand@speciallength#1{#1}
+\fi
+\def\jlreq at speciallength#1{\dimexpr\jlreq at expand@speciallength{#1}\relax}
+
+% 二段組み用パラメータ
+\setlength{\columnsep}{\jlreq at speciallength{\jlreq at option@column at gap}}
+\setlength{\columnseprule}{0pt}
+
+% デフォルト値は縦横ともにが0.5倍.
+%.. \textwidth:縦書きは縦,横書きは横
+% 一度\textwidthに一行の長さの文字数を入れる(段組の場合でも)
+\@tempdima=1\jlreq at fontsize
+\ifx\jlreq at option@line at length\@empty
+  \if at tate
+    \setlength{\textwidth}{0.75\paperheight}
+  \else
+    \setlength{\textwidth}{0.75\paperwidth}
+  \fi
+  \if at twocolumn
+    \setlength{\textwidth}{\dimexpr(\textwidth - \columnsep)/2\relax}
+  \fi
+  \divide\textwidth\@tempdima
+\else
+  \setlength{\textwidth}{\jlreq at speciallength{\jlreq at option@line at length}}
+  \divide\textwidth\@tempdima
+  \if at tate
+    \ifnum\number\textwidth>52
+      \jlreq at warning{一行の長さは52文字以下が望ましい (2.4.2.c 注2)}
+    \fi
+  \else
+    \ifnum\number\textwidth>40
+      \jlreq at warning{一行の長さは40文字以下が望ましい (2.4.2.c 注2)}
+    \fi
+  \fi
+\fi
+\multiply\textwidth\@tempdima
+\if at twocolumn
+  \setlength{\textwidth}{\dimexpr2\textwidth + \columnsep\relax}
+\fi
+
+%.. \textheight:縦書きは横,横書きは縦
+\ifx\jlreq at option@number at of@lines\@empty
+  \if at tate
+    \setlength{\textheight}{0.75\paperwidth}
+  \else
+    \setlength{\textheight}{0.75\paperheight}
+  \fi
+  \addtolength{\textheight}{-\topskip}
+  \divide\textheight\baselineskip \multiply\textheight\baselineskip
+  \addtolength{\textheight}{\topskip}
+\else
+  \setlength{\textheight}{\dimexpr\jlreq at speciallength{\jlreq at option@number at of@lines\baselineskip} - \baselineskip + \topskip\relax}
+\fi
+
+\setlength{\topskip}{1\zw} % フォントサイズと一致させる
+\ifx\jlreq at option@headfoot at verticalpos\@empty
+  \if at tate\def\jlreq at option@headfoot at verticalpos{1zh}
+  \else\def\jlreq at option@headfoot at verticalpos{2zh}\fi
+\fi
+\setlength{\headsep}{\jlreq at speciallength{\jlreq at option@headfoot at verticalpos}}
+\ifdim\headsep<1\zw\jlreq at warning{基本版面との上下方向の最低の空き量を,基本版面の文字サイズの全角アキとする (26.1.a)}\fi
+\setlength{\headheight}{1\zh}
+%.. 横
+\ifx\jlreq at option@gutter\@empty
+  % 中央配置
+  \setlength{\oddsidemargin}{\paperwidth}
+  \if at tate
+    \addtolength{\oddsidemargin}{-\textheight}
+  \else
+    \addtolength{\oddsidemargin}{-\textwidth}
+  \fi
+  \setlength{\oddsidemargin}{.5\oddsidemargin}
+  \addtolength{\oddsidemargin}{-1in}
+  \setlength{\evensidemargin}{\oddsidemargin}
+\else
+  \setlength{\oddsidemargin}{\jlreq at speciallength{\jlreq at option@gutter}}
+  \setlength{\evensidemargin}{\dimexpr\paperwidth - \textheight - \oddsidemargin\relax}
+  \if at tate
+    \setlength{\jlreq at tempdima}{\oddsidemargin}
+    \setlength{\oddsidemargin}{\evensidemargin}
+    \setlength{\evensidemargin}{\jlreq at tempdima}
+  \fi
+  \addtolength{\oddsidemargin}{-1in}
+  \addtolength{\evensidemargin}{-1in}
+\fi
+%.. 縦
+\ifx\jlreq at option@head at space\@empty
+  \setlength{\topmargin}{\paperheight}
+  \if at tate
+    \addtolength{\topmargin}{-\textwidth}
+  \else
+    \addtolength{\topmargin}{-\textheight}
+  \fi
+  \ifx\jlreq at option@foot at space\@empty
+    % 中央配置
+    \setlength{\topmargin}{0.5\topmargin}
+  \else
+    \addtolength{\topmargin}{-\jlreq at speciallength{\jlreq at option@foot at space}}
+  \fi
+\else
+  \ifx\jlreq at option@foot at space\@empty
+    \setlength{\topmargin}{\jlreq at speciallength{\jlreq at option@head at space}}
+  \else
+    % 両方指定されていたら,縦書きは地を,横書きは天を使う
+    \if at tate
+      \setlength{\topmargin}{\paperheight}
+      \addtolength{\topmargin}{-\textwidth}
+      \addtolength{\topmargin}{-\jlreq at speciallength{\jlreq at option@foot at space}}
+    \else
+      \setlength{\topmargin}{\jlreq at speciallength{\jlreq at option@head at space}}
+    \fi
+  \fi
+\fi
+
+
+\addtolength{\topmargin}{-\headsep}
+\addtolength{\topmargin}{-\headheight}
+\addtolength{\topmargin}{-1in}
+%.. 下
+% 本文から一文字分離すつもり
+\setlength{\footskip}{2\zh}
+% \maxdepth + \topskip = フォントサイズ×1.5
+\setlength{\maxdepth}{1.5\jlreq at fontsize}
+\addtolength{\maxdepth}{-\topskip}
+
+%. 見出し関係 (4.1)
+% 見出しの直前に実行される
+\newcommand*{\jlreq at hook@beforeheadings}[1]{}
+\def\jlreq at heading@allheadings{}
+%.. 中/半扉見出し
+% addcontentslineに渡すやつ:番号出すのと出さないの
+\newcommand{\DeclareTobiraHeading}[3]{%
+  \appto{\jlreq at heading@allheadings}{,#1}%
+  \expandafter\def\csname jlreq at heading@level@#1\endcsname{#2}%
+  \expandafter\edef\csname jlreq at heading@setting@#1\endcsname{\unexpanded{#3}}%
+  \expandafter\def\csname jlreq at heading@type@#1\endcsname{\RenewTobiraHeading}%
+  \@ifundefined{c@#1}{\newcounter{#1}}{}%
+  \@ifundefined{#1mark}{\expandafter\let\csname #1mark\endcsname\@gobble}{}%
+  \@ifundefined{jlreq at heading@maketoc@#1}{%
+    % {1 = *}{2 = ラベル}{3 = running head}
+    \expandafter\def\csname jlreq at heading@maketoc@#1\endcsname##1##2##3{%
+      \ifnum0\jlreq at ifempty{##1}{}{1}\ifnum #2>\c at secnumdepth 1\fi>0\else
+        \csname #1mark\endcsname{##3}%
+        \addcontentsline{toc}{#1}{\protect\numberline{##2}##3}%
+      \fi
+    }%
+  }{}%
+  \begingroup
+    \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 pagestyle{empty}%
+    \jlreq at parsekeyval[DeclareTobiraHeading]{
+      {label_format}{\def\jlreq at label@format{##1}}
+      {format}{\def\jlreq at format####1####2{##1}}
+      {pagestyle}{\def\jlreq at pagestyle{##1}}
+      {type}[han,naka]{
+        \jlreq at switch{##1}{
+          {han}{\def\jlreq at heading@clearpage{\clearpage}}
+          {naka}{\def\jlreq at heading@clearpage{\cleardoublepage}}
+        }
+      }
+    }{#3}%
+    \ifx\jlreq at format\@undefined
+      \def\jlreq at format##1##2{##1##2}%
+    \fi
+    \edef\jlreq at formatwlabel{\noexpand\jlreq at format{\expandonce{\jlreq at label@format}}}%
+    \def\jlreq at addtodo{}%
+    \@ifundefined{l@#1}{%
+      \edef\jlreq at do{\unexpanded{\setbox\jlreq at tempboxa=\hbox}{\expandonce{\jlreq at label@format}}}%
+      \jlreq at do
+      \jlreq at tempdima=\wd\jlreq at tempboxa
+      \jlreq at tempdimb=1\jlreq at mol
+      \divide\jlreq at tempdima by \jlreq at tempdimb
+      \eappto\jlreq at addtodo{%
+        \noexpand\def\expandonce{\csname l@#1\endcsname}{\unexpanded{\@dottedtocline{#2}{0\jlreq at mol}}{\the\numexpr\jlreq at tempdima + 1\relax\noexpand\jlreq at mol}}%
+      }%
+    }{}%
+    \edef\jlreq at do{%
+     \expandonce{\jlreq at addtodo}%
+      \noexpand\def\expandonce{\csname jlreq at TobiraHeading@start@#1\endcsname}[####1]####2{%
+        \unexpanded{\ifnum#2>\c at secnumdepth\else}%
+          \unexpanded{\refstepcounter{#1}}%
+        \noexpand\fi
+        \expandonce{\csname jlreq at heading@maketoc@#1\endcsname}{}{\expandonce{\jlreq at label@format}}{####1}%
+        \unexpanded{\ifnum#2>\c at secnumdepth\relax}%
+          \expandonce{\jlreq at format{}{##1}}%
+        \noexpand\else
+          \expandafter\expandonce\expandafter{\jlreq at formatwlabel{##2}}%
+        \noexpand\fi
+        \noexpand\@afterheading
+        \expandonce{\jlreq at heading@clearpage}%
+        \unexpanded{\if at restonecol\twocolumn\fi}%
+      }%
+      \noexpand\def\expandonce{\csname jlreq at TobiraHeading@start at s@#1\endcsname}####1{%
+        \expandonce{\jlreq at format{}{##1}}%
+        \expandonce{\csname jlreq at heading@maketoc@#1\endcsname}{}{\expandonce{\jlreq at label@format}}{####1}%
+        \noexpand\@afterheading
+        \expandonce{\jlreq at heading@clearpage}%
+        \unexpanded{\if at restonecol\twocolumn\fi}%
+      }%
+      \noexpand\def\expandonce{\csname #1\endcsname}{%
+        \unexpanded{\if at twocolumn\onecolumn\@restonecoltrue\else\@restonecolfalse\fi\cleardoublepage}%
+        \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}}}%
+    }%
+  \expandafter\endgroup
+  \jlreq at do
+}
+
+\newcommand{\NewTobiraHeading}[3]{%
+  \expandafter\@ifdefinable\csname #1\endcsname{\DeclareTobiraHeading{#1}{#2}{#3}}%
+}
+\newcommand{\RenewTobiraHeading}[3]{%
+  \@ifundefined{#1}{\@latex at error{\expandafter\string\csname#1\endcsname\space undefined}\@ehc}{\DeclareTobiraHeading{#1}{#2}{#3}}%
+}
+\newcommand{\ProvideTobiraHeading}[3]{%
+  \@ifundefined{#1}{\DeclareTobiraHeading{#1}{#2}{#3}}{}%
+}
+
+%.. 別行見出し
+% \jlreq at startBlockHeading{1 = 命令名}{2 = レベル}{3 = 字下げ}{4 = 前空き}{5 = 後ろ空き}{6 = トータル行数}{7 =  フォーマット関連}*{見出し}[副題]
+% 字下げはa:**だと追加する値(ページ行頭には入らない),s:**も追加だがページ行頭でも入る,
+% r:**だとその値に強制する.
+\newcommand{\jlreq at startBlockHeading}[7]{%
+  \edef\jlreq at startBlockHeading@format{\unexpanded{#7}}%
+  \jlreq at startBlockHeading@{#1}{#2}{{#3}{#4}{#5}{#6}}%
+}
+% {1 = 命令}{2 = レベル}{3 = スペース関連}
+\newcommand{\jlreq at startBlockHeading@}[3]{%
+  \@ifstar{\@dblarg{\jlreq at startBlockHeading@@{#1}{#2}{#3}{*}}}{\@dblarg{\jlreq at startBlockHeading@@{#1}{#2}{#3}{}}}%
+}
+% {1 = 命令}{2 = レベル}{3 = スペース関連}{4 = *}[5 = running head]{6 = 見出し}
+\long\def\jlreq at startBlockHeading@@#1#2#3#4[#5]#6{%
+  \@ifnextchar[{\jlreq at startBlockHeading@@@{#1}{#2}{#3}{#4}{#5}{#6}}{\jlreq at startBlockHeading@@@{#1}{#2}{#3}{#4}{#5}{#6}[]}%
+}
+
+% {1 = レベル}{2 = ラベルフォーマット}{3 = 本体フォーマット}{4 = 副題フォーマット}{5 = *}{6 = 見出し}{7 = 副題}
+\long\def\jlreq at startBlockHeading@setformat#1#2#3#4#5#6#7{%
+  % \jlreq at tempaに{ラベル}{見出し}{副題}という形のものを入れる
+  \ifnum0\jlreq at ifempty{#5}{}{1}\ifnum #1>\c at secnumdepth 1\fi>0
+    \def\jlreq at tempa{{}{#6}}%
+  \else
+    \def\jlreq at tempa{{#2}{#6}}%
+  \fi
+  \jlreq at ifempty{#7}{%
+    \appto\jlreq at tempa{{}}%
+  }{%
+    \long\def\jlreq at tempb##1{#4}%
+    \expandafter\appto\expandafter\jlreq at tempa\expandafter{\expandafter{\jlreq at tempb{#7}}}%
+  }%
+  \long\def\jlreq at tempb##1##2##3{#3}%
+  \edef\jlreq at tempa{\unexpanded{\expandafter\def\expandafter\jlreq at result\expandafter}{\noexpand\jlreq at tempb\expandonce{\jlreq at tempa}}}%
+  \jlreq at tempa
+}
+% {1 = 命令}{2 = レベル}{3 = スペース関連}{4 = *}{5 = running head}{6 = 見出し}[7 = 副題]
+\def\jlreq at startBlockHeading@@@#1#2#3#4#5#6[#7]{%
+  \ifnum0\jlreq at ifempty{#4}{}{1}\ifnum #2>\c at secnumdepth 1\fi>0\else
+    \refstepcounter{#1}%
+  \fi
+  % 後で呼び出す\jlreq at startBlockHeading@addtocontentslineを定義する
+  \long\def\jlreq at tempa##1##2##3{\def\jlreq at tempa{##1}}%
+  \expandafter\jlreq at tempa\jlreq at startBlockHeading@format
+  \edef\jlreq at startBlockHeading@addtocontentsline{%
+    \expandonce{\csname jlreq at heading@maketoc@#1\endcsname}{\unexpanded{#4}}{\expandonce{\jlreq at tempa}}{\unexpanded{#5}}%
+  }%
+  \def\jlreq at do{\jlreq at startBlockHeading@setformat{#2}}%
+  \expandafter\jlreq at do\jlreq at startBlockHeading@format{#4}{#6}{#7}%
+  \def\jlreq at do{\jlreq at startBlockHeading@@@@#3}%
+  \expandafter\jlreq at do\expandafter{\jlreq at result}%
+}
+\def\jlreq at startBlockHeading@removecolumn#1:{#1}
+
+\def\jlreq at startBlockHeading@analyzespace#1:#2\jlreq at endmark{%
+  \jlreq at ifempty{#1}{%
+    \def\jlreq at startBlockHeading@spacetype{}%
+    \def\jlreq at startBlockHeading@space{}%
+  }{%
+    \let\jlreq at startBlockHeading@spacetype=#1%
+    \expandafter\def\expandafter\jlreq at startBlockHeading@space\expandafter{\jlreq at startBlockHeading@removecolumn#2}%
+  }%
+}
+
+% {1 = 字下げ}{2 = 前空き}{3 = 後ろ空き}{4 = トータル行数}{5 = 出力}
+\long\def\jlreq at startBlockHeading@@@@#1#2#3#4#5{%
+  \if at noskipsec\leavevmode\fi
+  \setbox\jlreq at tempboxa=\vbox{%
+    \jlreq at ifempty{#1}{}{\hsize=\dimexpr\hsize - #1\relax}%
+    \noindent #5}%
+  \par
+  \@afterindenttrue
+  % \jlreq at tempskip(a/b)に前/後ろに入れるべき値を入れる
+  % #2がa:ならばその値は\jlreq at tempskipaには入れず\jlreq at tempskipcに入れておく
+  \jlreq at tempskipc=0pt
+  \jlreq at startBlockHeading@analyzespace#2:\jlreq at endmark
+  \setbox\jlreq at tempboxb=\vbox{ }%
+  \jlreq at ifempty{#4}{%
+    \ifx\jlreq at startBlockHeading@space\@empty\else
+      \jlreq at tempskipa=\glueexpr\jlreq at startBlockHeading@space\relax
+    \fi
+    \jlreq at tempskipb=0pt\relax
+  }{%
+    \jlreq at tempskipb=\glueexpr(\baselineskip*(#4 + 1) - \ht\jlreq at tempboxb - \dp\jlreq at tempboxb - \ht\jlreq at tempboxa - \dp\jlreq at tempboxa)/2\relax
+    \ifx\jlreq at startBlockHeading@space\@empty
+      \jlreq at tempskipa=\jlreq at tempskipb
+    \else
+      \ifx a\jlreq at startBlockHeading@spacetype
+        \jlreq at tempskipa=\jlreq at tempskipb
+        \jlreq at tempskipc=\glueexpr\jlreq at startBlockHeading@space\relax
+      \fi
+      \ifx s\jlreq at startBlockHeading@spacetype
+        \jlreq at tempskipa=\glueexpr\jlreq at tempskipb + \jlreq at startBlockHeading@space\relax
+      \fi
+      \ifx r\jlreq at startBlockHeading@spacetype
+        \jlreq at tempskipa=\glueexpr\jlreq at startBlockHeading@space\relax%
+        \jlreq at tempskipb=\glueexpr(\baselineskip*(#4 + 1) - \ht\jlreq at tempboxb - \dp\jlreq at tempboxb - \ht\jlreq at tempboxa - \dp\jlreq at tempboxa) - \jlreq at startBlockHeading@space\relax
+      \fi
+    \fi
+  }%
+  \ifdim\jlreq at tempskipc=0pt\else\vspace{\jlreq at tempskipc}\fi
+  % \baselineskipから来るglueを引いておく
+  \jlreq at tempskipa=\glueexpr\jlreq at tempskipa - \baselineskip + \dp\jlreq at tempboxb\relax
+  \jlreq at startBlockHeading@addtocontentsline
+  \setbox\jlreq at tempboxa=\vbox{%
+    \ifdim\jlreq at tempskipa=0pt\else\vskip\jlreq at tempskipa\fi
+    \noindent
+    \jlreq at ifempty{#1}{}{\hskip #1}%
+    \box\jlreq at tempboxa\nopagebreak}%
+  \dp\jlreq at tempboxa=\dimexpr\dp\jlreq at tempboxa + \ht\jlreq at tempboxa\relax
+  \ht\jlreq at tempboxa=0pt
+  \box\jlreq at tempboxa
+  \par\nobreak
+  \prevdepth=0pt
+  \jlreq at startBlockHeading@analyzespace#3:\jlreq at endmark
+  \jlreq at tempskipb=\glueexpr\jlreq at tempskipb + \ht\jlreq at tempboxb - \baselineskip\relax
+  \ifx\jlreq at startBlockHeading@space\@empty\else
+    \ifx a\jlreq at startBlockHeading@spacetype
+      \jlreq at tempskipb = \glueexpr\jlreq at tempskipb + \jlreq at startBlockHeading@space\relax
+    \else
+      \jlreq at tempskipb=\glueexpr\jlreq at startBlockHeading@space + \ht\jlreq at tempboxb - \baselineskip\relax
+    \fi
+  \fi
+  \ifdim\jlreq at tempskipb=0pt\else\vspace{\jlreq at tempskipb}\fi
+  \@afterheading
+}
+
+% \DeclareBlockHeading{命令名}{レベル}{設定}
+% 行取り(4.1.6)
+% a: lines=<何行取りか>
+% b,d: before_lines, after_lines
+% c: before_space, after_space
+% f: beforeやafterを省略する
+% font=<見出しフォント>, labelfont=<ラベルフォント>, subtitle_font=<副題フォント>
+% indent=<全体のインデント>
+% pagebreak=clearpage/cleardoublepage/newcolumn/nariyuki
+% なお,これ以外に見出しの前後に記号を付ける,あるいは罫線を見出しの前後に配置する,罫線で見出しを囲むなどといったことも行われている.
+% 縦組の偶数ページの場合は,ページ末に見出しを配置する.
+\newcommand{\DeclareBlockHeading}[3]{%
+  \appto{\jlreq at heading@allheadings}{,#1}%
+  \expandafter\def\csname jlreq at heading@level@#1\endcsname{#2}%
+  \expandafter\edef\csname jlreq at heading@setting@#1\endcsname{\unexpanded{#3}}%
+  \expandafter\def\csname jlreq at heading@type@#1\endcsname{\RenewBlockHeading}%
+  \@ifundefined{c@#1}{\newcounter{#1}}{}%
+  \@ifundefined{#1mark}{\expandafter\let\csname #1mark\endcsname\@gobble}{}%
+  % 目次への出力をするマクロ.外部に切り出しておく.
+  \@ifundefined{jlreq at heading@maketoc@#1}{%
+    % {1 = *}{2 = ラベル}{3 = running head}
+    \expandafter\def\csname jlreq at heading@maketoc@#1\endcsname##1##2##3{%
+      \ifnum0\jlreq at ifempty{##1}{}{1}\ifnum #2>\c at secnumdepth 1\fi>0\else
+        \csname #1mark\endcsname{##3}%
+        \addcontentsline{toc}{#1}{\protect\numberline{##2}##3}%
+      \fi
+    }%
+  }{}%
+  \begingroup
+    \def\jlreq at lines{1}%
+    \def\jlreq at before@space{}%
+    \def\jlreq at after@space{}%
+    \def\jlreq at before@lines{}%
+    \def\jlreq at after@lines{}%
+    \def\jlreq at font{\normalsize}%
+    \def\jlreq at subtitle@font{\normalsize}%
+    \def\jlreq at indent{0}%
+    \let\jlreq at format=\@undefined
+    \def\jlreq at pagebreak{}%
+    \let\jlreq at label@format=\@undefined
+    \let\jlreq at subtitle@format=\@undefined
+    \def\jlreq at pagetop@space{a}%
+    \jlreq at parsekeyval[BlockHeading]{
+      {lines}{\def\jlreq at lines{##1}}
+      {before_space}{\def\jlreq at before@space{##1}}
+      {after_space}{\def\jlreq at after@space{##1}}
+      {before_lines}{\def\jlreq at before@lines{##1}}
+      {after_lines}{\def\jlreq at after@lines{##1}}
+      {font}{\def\jlreq at font{##1}}
+      {subtitle_font}{\def\jlreq at subtitle@font{##1}}
+      {indent}{\def\jlreq at indent{##1}}
+      {format}{\edef\jlreq at format{\unexpanded{##1}}}
+      {label_format}{\edef\jlreq at label@format{\unexpanded{##1}}}
+      {subtitle_format}{\edef\jlreq at subtitle@format{\unexpanded{##1}}}
+      *{pagetop_space}{\def\jlreq at pagetop@space{s}}% ページ頭でもスペースを入れる
+      {pagebreak}[clearpage,cleardoublepage,clearcolumn,nariyuki]{
+        \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{}}
+        }
+      }
+    }{#3}%
+    \ifx\jlreq at format\@undefined
+      \edef\jlreq at format{%
+        \expandonce{\jlreq at font}\unexpanded{##1}\unexpanded{##2}%
+        \unexpanded{##3}%
+      }%
+    \fi
+    \ifx\jlreq at label@format\@undefined
+      \def\jlreq at label@format{\@seccntformat{#1}}%
+    \fi
+    \ifx\jlreq at subtitle@format\@undefined
+      \edef\jlreq at subtitle@format{{\unexpanded{\nobreak\par\hspace*{4\jlreq at mol}}\expandonce{\jlreq at subtitle@font}---\unexpanded{##1}---}}%
+    \fi
+    \def\jlreq at addtodo{}%
+    \@ifundefined{l@#1}{
+      % 長さは適当に計測する
+      \begingroup
+        % ちょっと大きめで計測しておく
+        \csname c@#1\endcsname=9
+        \setbox\jlreq at tempboxa=\hbox{\jlreq at label@format}%
+        \edef\jlreq at do{\noexpand\jlreq at tempdima=\the\dimexpr\wd\jlreq at tempboxa\relax}%
+      \expandafter\endgroup
+      \jlreq at do
+      \jlreq at tempdimb=1\jlreq at mol
+      \divide\jlreq at tempdima by \jlreq at tempdimb
+      \eappto\jlreq at addtodo{%
+        \noexpand\def\expandonce{\csname l@#1\endcsname}{\unexpanded{\@dottedtocline{#2}{0\jlreq at mol}}{\the\numexpr\jlreq at tempdima + 1\relax\noexpand\jlreq at mol}}%
+      }%
+    }{}%
+    % before/after_lines優先
+    \ifx\jlreq at before@space\@empty\else\edef\jlreq at before@space{r:\expandonce{\jlreq at before@space}}\fi
+    \ifx\jlreq at before@lines\@empty\else\edef\jlreq at before@space{\expandonce{\jlreq at pagetop@space}:\expandonce{\jlreq at before@lines}\baselineskip}\fi
+    \ifx\jlreq at after@space\@empty\else\edef\jlreq at after@space{r:\expandonce{\jlreq at after@space}}\fi
+    \ifx\jlreq at after@lines\@empty\else\edef\jlreq at after@space{a:\expandonce{\jlreq at after@lines}\baselineskip}\fi
+    \ifx\jlreq at indent\@empty\else\edef\jlreq at indent{\expandonce{\jlreq at indent}\jlreq at mol}\fi
+    \edef\jlreq at do{%
+      \expandonce{\jlreq at addtodo}%
+      \noexpand\edef\expandonce{\csname #1\endcsname}{\noexpand\unexpanded{%
+        \noexpand\jlreq at hook@beforeheadings{#1}%
+        \expandonce{\jlreq at pagebreak}%
+        \unexpanded{\jlreq at startBlockHeading{#1}{#2}}{\expandonce{\jlreq at indent}}{\expandonce{\jlreq at before@space}}{\expandonce{\jlreq at after@space}}{\expandonce{\jlreq at lines}}{{\expandonce{\jlreq at label@format}}{\expandonce{\jlreq at format}}{\expandonce{\jlreq at subtitle@format}}%
+      }}}%
+    }%
+  \expandafter\endgroup
+  \jlreq at do
+}
+
+\newcommand{\NewBlockHeading}[3]{%
+  \expandafter\@ifdefinable\csname #1\endcsname{\DeclareBlockHeading{#1}{#2}{#3}}%
+}
+\newcommand{\RenewBlockHeading}[3]{%
+  \@ifundefined{#1}{\@latex at error{\expandafter\string\csname#1\endcsname\space undefined}\@ehc}{\DeclareBlockHeading{#1}{#2}{#3}}%
+}
+\newcommand{\ProvideBlockHeading}[3]{%
+  \@ifundefined{#1}{\DeclareBlockHeading{#1}{#2}{#3}}{}%s
+}
+
+%.. 同行見出し
+% \DeclareRuninHeading{命令名}{レベル}{設定}
+\newcommand*{\DeclareRuninHeading}[3]{%
+  \appto{\jlreq at heading@allheadings}{,#1}%
+  \expandafter\def\csname jlreq at heading@level@#1\endcsname{#2}%
+  \expandafter\edef\csname jlreq at heading@setting@#1\endcsname{\unexpanded{#3}}%
+  \expandafter\def\csname jlreq at heading@type@#1\endcsname{\RenewRuninHeading}%
+  \@ifundefined{c@#1}{\newcounter{#1}}{}%
+  \@ifundefined{#1mark}{\expandafter\let\csname #1mark\endcsname\@gobble}{}%
+  \@ifundefined{l@#1}{\expandafter\def\csname l@#1\endcsname{\@dottedtocline{#2}{0\jlreq at mol}{2\jlreq at gol}}}{}%
+  \begingroup
+    \def\jlreq at font{\normalfont\normalsize}%
+    \def\jlreq at indent{0}%
+    \def\jlreq at mark{}%
+    \jlreq at parsekeyval[RuninHeading]{%
+      {font}{\def\jlreq at font{##1}}
+      {indent}{\def\jlreq at indent{##1}}
+      {mark}{\def\jlreq at mark{##1}}
+    }{#3}%
+    % \@startsection{#1}{#2}{<indent>*fontsize}{0pt}{-fontsize}{font}
+    \edef\jlreq at do{%
+      \noexpand\def\expandonce{\csname #1\endcsname}{%
+        \unexpanded{\jlreq at hook@beforeheadings{#1}}%
+        \expandafter\jlreq at ifempty\expandafter{\jlreq at mark}{%
+          \noexpand\@startsection{\unexpanded{#1}}{\unexpanded{#2}}{\expandonce{\jlreq at indent}\noexpand\jlreq at mol}{0pt}{-1\jlreq at fontsize}{\expandonce{\jlreq at font}}%
+        }{%
+          \noexpand\@startsection{\unexpanded{#1}}{\unexpanded{#2}}{\expandonce{\jlreq at indent}\noexpand\jlreq at mol}{0pt}{-1\jlreq at fontsize}{\noexpand\kern\expandonce{\jlreq at indent}\noexpand\jlreq at mol\expandonce{\jlreq at mark}\noexpand\kern-\expandonce{\jlreq at indent}\noexpand\jlreq at mol\expandonce{\jlreq at font}}%
+        }%
+      }%
+    }%
+  \expandafter\endgroup
+  \jlreq at do
+}
+\newcommand*{\NewRuninHeading}[3]{%
+  \expandafter\@ifdefinable\csname #1\endcsname{\DeclareRuninHeading{#1}{#2}{#3}}%
+}
+\newcommand*{\RenewRuninHeading}[3]{%
+  \@ifundefined{#1}{\@latex at error{\expandafter\string\csname#1\endcsname\space undefined}\@ehc}{\DeclareRuninHeading{#1}{#2}{#3}}%
+}
+\newcommand*{\ProvideRuninHeading}[3]{%
+  \@ifundefined{#1}{\DeclareRuninHeading{#1}{#2}{#3}}{}%
+}
+
+%.. 窓見出し
+\newcount\jlreq at wraplinecount
+\newdimen\jlreq at hangindent
+\def\jlreq at CutinHeading@start#1#2#3#4#5#6#7{%
+  \ifnum0\ifnum\jlreq at wraplinecount<-1 1\fi\ifnum\jlreq at wraplinecount>1 1\fi>0
+    \ClassError{jlreq}{Can not use \expandafter\string\csname#1\endcsname\space here}{\@ehc}%
+  \else
+    \jlreq at CutinHeading@@start{#2}{#3}{#4}{#5}{#6}{#7}%
+  \fi
+}
+% 1 = 書式指定,2 = インデント, 3 = 見出しと本文の間, 4 = これを越えたら二行以上,5 = これを越えたら三行以上,6 = テキスト
+\def\jlreq at CutinHeading@@start#1#2#3#4#5#6{%
+  \par\leavevmode
+  % 一行で処理したときの見出し長さを計測
+  \setbox\@tempboxa=\hbox{#1#6}%
+  \@tempdima=\wd\@tempboxa
+  % 何行必要かを\jlreq at CutinHeading@linecountに入れる
+  \ifdim\@tempdima>#5\def\jlreq at CutinHeading@linecount{3}%
+  \else\ifdim\@tempdima>#4\def\jlreq at CutinHeading@linecount{2}%
+  \else\def\jlreq at CutinHeading@linecount{1}\fi\fi
+  % \@tempdimaが実際の一行の長さに近い
+  \divide\@tempdima by \jlreq at CutinHeading@linecount
+  % \jlreq at resultboxに見出し部分を,\jlreq at CutinHeading@linecountに何行使うかを入れる
+  \ifnum\jlreq at CutinHeading@linecount=1\relax
+    \setbox\jlreq at resultbox=\vbox{\parindent=0pt\rightskip=0pt\leftskip=0pt\hbox{#1#6}}%
+    \def\jlreq at CutinHeading@linecount{2}%
+  \else
+    \jlreq at inlinenote@determinelength{#6}{#1}{}{\jlreq at CutinHeading@linecount}{\jlreq at CutinHeading@linecount}{\@tempdima}{\linewidth}%
+    \def\jlreq at CutinHeading@linecount{3}%
+  \fi
+  % 普通の一行の高さ/深さに合わせて見出しのボックスを出力
+  \setbox\@tempboxa=\vtop to \dimexpr\numexpr\jlreq at CutinHeading@linecount - 1\relax\baselineskip + 1\jlreq at gol\relax{\vskip 0pt plus 1fill minus 1fill \box\jlreq at resultbox\vskip 0pt plus 1fill minus 1fill}%
+  \setbox\jlreq at tempboxa=\hbox{あ}%
+  \ht\@tempboxa=\ht\jlreq at tempboxa
+  \dp\@tempboxa=\dp\jlreq at tempboxa
+  \@tempdima=\wd\@tempboxa
+  % \hang****を設定
+  \hangindent=\dimexpr#2\jlreq at mol + \@tempdima + #3\relax\hangafter=-\jlreq at CutinHeading@linecount
+  \jlreq at hangindent=\hangindent\jlreq at wraplinecount=\hangafter
+  \hspace*{#2\jlreq at mol}%
+  \kern-\dimexpr\@tempdima + #3 + \parindent\relax
+  \box\@tempboxa
+  \hspace*{#3}%
+  % 改段落が起こっても\hang****をキープするように\parを書き換えておく(終わったら元に戻す).
+  % \jlreq at hangindent/\jlreq at wraplinecountにそれぞれ\hangindent/\hangafterに対応する値を入れて
+  % \parのたびにそこから代入する.
+  \def\par{%
+    \@@par
+    \ifnum\jlreq at wraplinecount<-1\relax
+      \ifnum\jlreq at wraplinecount<-\prevgraf
+        \advance\jlreq at wraplinecount by \prevgraf\hangindent=\jlreq at hangindent\hangafter=\jlreq at wraplinecount
+      \else
+        \jlreq at wraplinecount=1\jlreq at hangindent=0pt\relax
+        \@restorepar
+      \fi
+    \else
+      \jlreq at wraplinecount=1\jlreq at hangindent=0pt\relax
+      \@restorepar
+    \fi
+  }%
+  \ignorespaces
+}
+
+\newcommand*{\DeclareCutinHeading}[3]{%
+  \expandafter\def\csname jlreq at heading@level@#1\endcsname{#2}%
+  \expandafter\def\csname jlreq at heading@setting@#1\endcsname{#3}%
+  \expandafter\def\csname jlreq at heading@type@#1\endcsname{\RenewCutinHeading}%
+  \begingroup
+    \def\jlreq at fontcommand{\headfont}%
+    \def\jlreq at onelinemax{6\jlreq at fontsize}%
+    \def\jlreq at twolinemax{20\jlreq at fontsize}%
+    \def\jlreq at indent{0}%
+    \def\jlreq at afterindent{1\jlreq at mol}%
+    \jlreq at parsekeyval[CutinHeading]{
+      {font}{\def\jlreq at fontcommand{##1}}
+      {onelinemax}{\def\jlreq at onelinemax{##1}}
+      {twolinemax}{\def\jlreq at twolinemax{##1}}
+      {indent}{\def\jlreq at indent{##1}}
+      {afterindent}{\def\jlreq at afterindent{##1}}
+    }{#3}%
+    \edef\jlreq at do{%
+      \noexpand\def\expandonce{\csname #1\endcsname}{%
+        \noexpand\jlreq at CutinHeading@start{#1}{\expandonce{\jlreq at fontcommand}}{\expandonce{\jlreq at indent}}{\expandonce{\jlreq at afterindent}}{\expandonce{\jlreq at onelinemax}}{\expandonce{\jlreq at twolinemax}}%
+      }%
+    }%
+  \expandafter\endgroup
+  \jlreq at do
+}
+\newcommand*{\NewCutinHeading}[3]{%
+  \expandafter\@ifdefinable\csname #1\endcsname{\DeclareCutinHeading{#1}{#2}{#3}}%
+}
+\newcommand*{\RenewCutinHeading}[3]{%
+  \@ifundefined{#1}{\@latex at error{\expandafter\string\csname#1\endcsname\space undefined}\@ehc}{\DeclareCutinHeading{#1}{#2}{#3}}%
+}
+\newcommand*{\ProvideCutinHeading}[3]{%
+  \@ifundefined{#1}{\DeclareCutinHeading{#1}{#2}{#3}}{}%
+}
+
+\newcommand{\ModifyHeading}[2]{%
+  \begingroup
+    \@ifundefined{jlreq at heading@setting@#1}{\ClassError{jlreq}{Unknown heading: #1}{\@ehc}}%
+    \expandafter\let\expandafter\level\expandafter=\csname jlreq at heading@level@#1\endcsname
+    \expandafter\let\expandafter\setting\expandafter=\csname jlreq at heading@setting@#1\endcsname
+    \expandafter\let\expandafter\macroname\expandafter=\csname jlreq at heading@type@#1\endcsname
+    \edef\jlreq at do{\expandonce{\macroname}{#1}{\expandonce{\level}}{\expandonce{\setting},\unexpanded{#2}}}%
+  \expandafter\endgroup
+  \jlreq at do
+}
+% 見出し#1をマクロ#2に保存する
+\newcommand{\SaveHeading}[2]{%
+  \@ifundefined{jlreq at heading@setting@#1}{\ClassError{jlreq}{Unknown heading: #1}{\@ehc}}%
+  \begingroup
+    \edef\jlreq at do{%
+      \unexpanded{\edef#2}{%
+        \noexpand\expandonce{\expandonce{\csname jlreq at heading@type@#1\endcsname}}%
+        \noexpand\unexpanded{\unexpanded{{#1}}}%
+        {\noexpand\expandonce{\expandonce{\csname jlreq at heading@level@#1\endcsname}}}%
+        {\noexpand\expandonce{\expandonce{\csname jlreq at heading@setting@#1\endcsname}}}%
+      }%
+    }%
+  \expandafter\endgroup
+  \jlreq at do
+}
+
+\newcommand*{\jlreq at keepbaselineskip}[1]{%
+  \begingroup
+    \jlreq at tempdima=\baselineskip
+    \edef\jlreq at do{\unexpanded{#1}\noexpand\baselineskip=\the\jlreq at tempdima}%
+  \expandafter\endgroup
+  \jlreq at do
+}
+
+\setcounter{secnumdepth}{3}
+\newcounter{part}
+\jlreq at switch{\jlreq at article@type}{
+  {article}{\newcounter{section}}
+  {\newcounter{chapter}\newcounter{section}[chapter]}% book, report
+}
+\newcounter{subsection}[section]
+\newcounter{subsubsection}[subsection]
+\newcounter{paragraph}[subsubsection]
+\newcounter{subparagraph}[paragraph]
+\renewcommand*{\@seccntformat}[1]{\csname the#1\endcsname\hspace{1\jlreq at mol}}
+\newcommand*{\headfont}{\gtfamily\sffamily}
+
+
+\newcommand*\jlreq at HeadingType[1]{%
+  \expandafter\ifx\csname jlreq at heading@type@#1\endcsname\relax UndefinedHeading
+  \else
+    \jlreq at HeadingType@{#1}{\RenewTobiraHeading}{TobiraHeading}{%
+    \jlreq at HeadingType@{#1}{\RenewBlockHeading}{BlockHeading}{%
+    \jlreq at HeadingType@{#1}{\RenewRuninHeading}{RuninHeading}{%
+    \jlreq at HeadingType@{#1}{\RenewCutinHeading}{CutinHeading}{%
+    UnknownHeading}}}}%
+  \fi
+}
+\newcommand*\jlreq at HeadingType@[2]{%
+  \expandafter\expandafter\expandafter\ifx\csname jlreq at heading@type@#1\endcsname#2\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
+}
+
+%.. 各種定義
+\if at tate
+  \renewcommand{\thepart}{\Kanji{part}}
+  \ifthenelse{\equal{\jlreq at article@type}{article}}{}{\renewcommand{\thechapter}{\Kanji{chapter}}}
+  \renewcommand{\thesection}{\rensuji{\@arabic\c at section}}
+  \renewcommand{\thesubsection}{\rensuji{\@alph\c at subsection}}
+  \renewcommand{\thesubsubsection}{%
+    \rensuji{\@arabic\c at subsubsection}}
+  \renewcommand{\theparagraph}{%
+    (\rensuji{\@arabic\c at paragraph})}
+  \renewcommand{\thesubparagraph}{%
+    (\rensuji{\@arabic\c at subparagraph})}
+
+  \ifthenelse{\equal{\jlreq at article@type}{article}}{
+    \NewBlockHeading{part}{0}{font={\jlreq at keepbaselineskip{\LARGE\headfont}},indent=4,lines=4}
+  }
+  {% book, report
+    \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\jlreq at mol}},format={\null\vfill {\Huge\headfont \hspace*{2\jlreq at mol}#1#2}\vspace*{2\jlreq at gol}}}
+    \NewBlockHeading{chapter}{0}{indent=2,lines=6,label_format={第\thechapter 章\hspace*{1\jlreq at gol}},font={\huge\headfont}}
+    \renewcommand{\thechapter}{\Kanji{chapter}}
+  }
+  \NewBlockHeading{section}{1}{font={\jlreq at keepbaselineskip{\Large\headfont}},indent=6,lines=3}
+  \NewBlockHeading{subsection}{2}{font={\jlreq at keepbaselineskip{\large\headfont}},indent=8,lines=2}
+  \NewBlockHeading{subsubsection}{3}{font={\jlreq at keepbaselineskip{\normalsize\headfont}},indent=10,lines=1,before_lines=1}
+  \NewRuninHeading{paragraph}{4}{font={\jlreq at keepbaselineskip{\normalsize\headfont}}}
+  \NewRuninHeading{subparagraph}{5}{font={\jlreq at keepbaselineskip{\normalsize\headfont}},indent=1}
+\else
+  \renewcommand{\thepart}{\Roman{part}}
+  \renewcommand{\thesubsection}{\thesection .\arabic{subsection}}
+  \renewcommand{\thesubsubsection}{\thesubsection .\arabic{subsubsection}}
+  \renewcommand{\theparagraph}{\thesubsubsection .\arabic{paragraph}}
+  \renewcommand{\thesubparagraph}{\theparagraph .\arabic{subparagraph}}
+  \ifthenelse{\equal{\jlreq at article@type}{article}}{
+    \NewBlockHeading{part}{0}{font={\jlreq at keepbaselineskip{\LARGE\headfont}},label_format={第\thepart 部\hspace{1\jlreq at mol}},lines=4}
+    \renewcommand{\thesection}{\arabic{section}}
+  }
+  {% book, report
+    \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\jlreq at gol}},format={\null\vfil {\Huge\headfont #1#2}\vfil}}
+    \NewBlockHeading{chapter}{0}{%
+      format={{\jlreq at keepbaselineskip{\huge\headfont} #1#2}#3},
+      label_format={第\thechapter 章\quad},
+      lines=5}
+    \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\headfont}},lines=3}
+  \NewBlockHeading{subsection}{2}{font={\jlreq at keepbaselineskip{\large\headfont}},lines=2}
+  \NewBlockHeading{subsubsection}{3}{font={\jlreq at keepbaselineskip{\normalsize\headfont}},lines=1,before_lines=1}
+  \NewRuninHeading{paragraph}{4}{font={\jlreq at keepbaselineskip{\normalsize\headfont}},indent=1}
+  \NewRuninHeading{subparagraph}{5}{font={\jlreq at keepbaselineskip{\normalsize\headfont}},indent=2}
+\fi
+
+\ifthenelse{\equal{\jlreq at article@type}{article}}{}{% book, report
+  \if at openright
+    \ModifyHeading{part}{type=naka}
+    \ModifyHeading{chapter}{pagebreak=cleardoublepage}
+  \else
+    \ModifyHeading{part}{type=han}
+    \ModifyHeading{chapter}{pagebreak=clearpage}
+  \fi
+}
+\jlreq at switch{\jlreq at article@type}{
+  {book}{%
+    \renewcommand{\jlreq at heading@maketoc at chapter}[3]{%
+      \chaptermark{#3}%
+      \jlreq at ifempty{#1}{%
+        \ifnum0\if at mainmatter\else1\fi\ifnum\jlreq at heading@level at chapter>\c at secnumdepth 1\fi>0
+          \addcontentsline{toc}{chapter}{#3}%
+        \else
+          \addcontentsline{toc}{chapter}{\protect\numberline{#2}#3}%
+        \fi
+      }{}%
+    }
+  }
+  {report}{
+    \renewcommand{\jlreq at heading@maketoc at chapter}[3]{%
+      \chaptermark{#3}%
+      \jlreq at ifempty{#1}{%
+        \ifnum0\ifnum\jlreq at heading@level at chapter>\c at secnumdepth 1\fi>0
+          \addcontentsline{toc}{chapter}{#3}%
+        \else
+          \addcontentsline{toc}{chapter}{\protect\numberline{#2}#3}%
+        \fi
+      }{}%
+    }
+  }
+}
+
+
+%. 注
+% 合印:4.2.3
+% 文字サイズは6ポイントくらい(4.2.3.a)とりあえす\scriptsize
+\newcommand*\jlreq at referencemark@format[1]{#1}
+\ifthenelse{\equal{\jlreq at referencemark}{inline}}{
+  \newcommand*{\jlreq at notemark}[1]{%
+    \jlreq at ifydir{%
+      \hbox{}\hbox{\@textsuperscript{\normalfont\jlreq at referencemark@format{#1}}}\hbox{}%
+    }{%
+      \setbox\@tempboxa=\hbox{\scriptsize\jlreq at referencemark@format{#1}}%
+      \raise\dimexpr.5\jlreq at gol - (\ht\@tempboxa + \dp\@tempboxa)/2\relax\box\@tempboxa
+    }%
+  }
+}{
+  \newcommand*{\jlreq at notemark}[1]{{%
+    \setbox\@tempboxa=\hbox{\scriptsize\jlreq at referencemark@format{#1}}%
+    % 行頭に来たときに頭を天にそろえる処理.
+    \jlreq at savepos@for at rest@linewidth
+    \ifdim\jlreq at current@linewidth<\wd\@tempboxa
+      \@tempdima=\jlreq at current@linewidth
+    \else
+      \@tempdima=\wd\@tempboxa
+    \fi
+    \setbox\jlreq at tempboxa=\hbox to\z@{\hskip-\@tempdima\raise\dimexpr.5\zw + (\ht\@tempboxa + \dp\@tempboxa)/2\relax\box\@tempboxa\hss}%
+    \dp\jlreq at tempboxa=0pt\ht\jlreq at tempboxa=0pt\box\jlreq at tempboxa}}%
+}
+% \@footnotemarkをシンプルなものにする
+\def\jlreq at setdefaultnotemark#1#2{%
+  \def#1{%
+    \leavevmode
+    \ifhmode\edef\@x at sf{\the\spacefactor}\nobreak\fi
+    #2%
+    \ifhmode\spacefactor\@x at sf\fi
+    \relax}
+}
+\let\jlreq at original@@footnotemark=\@footnotemark
+\jlreq at setdefaultnotemark\@footnotemark\@makefnmark
+%.. 脚注  (縦書きの時は傍注,4.2.5)
+{%
+  \footnotesize\global\setlength{\footnotesep}{.7\baselineskip} % 何でかわからん……
+  % \jlreq at tempdimaに罫線と脚注との間の長さを入れる
+  % 脚注の行間よりやや広くする(4.2.5.f)
+  \global\jlreq at tempdima=1.5\dimexpr\baselineskip - 1\jlreq at gol\relax
+}
+% 罫線の前は行間分,最大+文字サイズ分伸びる(4.2.5.g)
+\setlength{\skip\footins}{\dimexpr\baselineskip - 1\jlreq at gol \relax plus 1\jlreq at gol}
+%\setlength{\skip\footins}{0pt}
+% 脚注の前の罫線は表罫で,長さは行長の1/3位(4.2.5.f)
+\edef\jlreq at do{
+  \unexpanded{\renewcommand{\footnoterule}}{%
+    \unexpanded{\hrule width .333\textwidth height \jlreq at omotekeiwidth}%
+    \noexpand\kern\the\jlreq at tempdima
+  }
+}
+\jlreq at do
+
+% インデントの計算:脚注の長さが文字の整数倍になるように字下げする(4.2.5.b)
+{
+  \footnotesize
+  \jlreq at footnoteindent=1\jlreq at mol
+  \@tempdima=\dimexpr\textwidth - \jlreq at footnoteindent\relax
+  \@tempdimb=1\zw
+  \divide\@tempdima\@tempdimb \multiply\@tempdima\@tempdimb
+  \global\jlreq at footnoteindent=\dimexpr\textwidth - \@tempdima\relax
+}
+% 4.2.5.d
+\ifthenelse{\equal{\jlreq at footnotetext@indent}{one}}{
+  \newcommand\@makefntext[1]{\parindent 1\jlreq at mol
+    \addtolength{\leftskip}{\dimexpr\jlreq at footnoteindent + 1\jlreq at mol\relax}% 全体をインデント+1文字分下げる
+    \noindent\hskip -1\jlreq at mol\jlreq at referencemark@format{\@thefnmark}\hskip 1\jlreq at mol#1}% 見出し出力と一文字分の空き
+}{
+  \newcommand\@makefntext[1]{\parindent 1\jlreq at mol
+    \addtolength{\leftskip}{\jlreq at footnoteindent}% 全体をインデント
+    \noindent\hskip 1\jlreq at mol\jlreq at referencemark@format{\@thefnmark}\hskip 1\jlreq at mol#1}% 見出し出力と一文字分の空き
+}
+% 合印
+\renewcommand*{\@makefnmark}{%
+  \jlreq at ifydir{\jlreq at notemark{\@thefnmark}}{\hbox{\jlreq at notemark{\@thefnmark}}}%
+}
+% 4.2.2注3
+\if at tate
+  \renewcommand*{\thefootnote}{\jlreq at open@bracket at before@space\inhibitglue(\rensuji{\@arabic\c at footnote})\inhibitglue}
+\else
+  \renewcommand*{\thefootnote}{\arabic{footnote})\inhibitglue}
+\fi
+
+%.. 後注(4.2.4)
+\def\jlreq at endnotemarkname{@thefnmark}% 合印用番号を一時的に入れるマクロ名
+\def\jlreq at endnotecounter{footnote}% 後注用のカウンタ名
+% 文字サイズは\footnotesizeを使う
+\newdimen\jlreq at endnote@prepostspace
+% 前の分との間は行間分空ける(4.2.4.f)
+\jlreq at endnote@prepostspace=\dimexpr\baselineskip - 1\jlreq at gol\relax
+\newdimen\jlreq at endnote@indent
+% 現在の後注一覧を,\jlreq at endnote@textsに{{合印1}{後注1}}{{合印2}{後注2}}...の形で保持する
+\def\jlreq at endnote@texts{}
+\long\def\jlreq at endnote@addtext#1#2{%
+  \expandafter\gdef\expandafter\jlreq at endnote@texts\expandafter{\jlreq at endnote@texts{{#1}{#2}}}}
+\def\endnote{\@ifnextchar[{\jlreq at endnote}{\jlreq at endnote[]}}
+\def\endnotemark{\@ifnextchar[{\jlreq at endnotemark}{\jlreq at endnotemark[]}}
+\def\endnotetext{\@ifnextchar[{\jlreq at endnotetext}{\jlreq at endnotetext[]}}
+\long\def\jlreq at endnote[#1]#2{\jlreq at endnotemark[#1]\@endnotetext{#2}}
+\def\jlreq at endnotemark[#1]{%
+  \jlreq at ifempty{#1}{%
+    \stepcounter{\jlreq at endnotecounter}%
+    \expandafter\protected at xdef\csname\jlreq at endnotemarkname\endcsname{\csname the\jlreq at endnotecounter\endcsname}%
+  }{%
+    \begingroup
+      \csname c@\jlreq at endnotecounter\endcsname #1\relax
+      \expandafter\unrestored at protected@xdef\csname\jlreq at endnotemarkname\endcsname{\csname \jlreq at endnotecounter\endcsname}%
+    \endgroup
+  }%
+  \@endnotemark
+}
+\jlreq at setdefaultnotemark\@endnotemark\@makeendmark
+\long\def\jlreq at endnotetext[#1]#2{%
+  \jlreq at ifempty{#1}{%
+    \expandafter\protected at xdef\csname\jlreq at endnotemarkname\endcsname{\csname the\jlreq at endnotecounter\endcsname}%
+  }{%
+    \begingroup
+      \csname c@\jlreq at endnotecounter\endcsname #1\relax
+      \expandafter\unrestored at protected@xdef\csname\jlreq at endnotemarkname\endcsname{\csname \jlreq at endnotecounter\endcsname}%
+    \endgroup
+  }%
+  \@endnotetext{#2}%
+}
+\long\def\@endnotetext#1{%
+  \expandafter\let\expandafter\jlreq at tempa\expandafter=\csname\jlreq at endnotemarkname\endcsname
+  \expandafter\jlreq at endnote@addtext\expandafter{\jlreq at tempa}{#1}%
+}
+\long\def\jlreq at theendnotes#1{%
+  \jlreq at ifendmark{#1}{}{%
+    \jlreq at output@endnotes#1
+    \jlreq at theendnotes
+  }%
+}
+\long\def\jlreq at output@endnotes#1#2{%
+  \expandafter\def\csname\jlreq at endnotemarkname\endcsname{#1}%
+  \item\@makeendtext{#2}%
+}
+
+\newcommand*{\theendnotes}{%
+  \ifx\jlreq at endnote@texts\@empty\else
+    \let\jlreq at tempa=\jlreq at endnote@texts
+    \gdef\jlreq at endnote@texts{}%
+    \edef\jlreq at endnote@beforeafterspace{\the\dimexpr\baselineskip - 1\jlreq at gol\relax plus \the\dimexpr 1\jlreq at gol\relax}%
+    \begingroup
+      \par
+      \footnotesize
+      % 後注の長さを文字サイズの整数倍にする(4.2.4.b)
+      \jlreq at tempdima=\dimexpr\linewidth - \jlreq at endnote@indent - \leftskip\relax
+      \@tempdimb=1\jlreq at mol
+      \divide\jlreq at tempdima\@tempdimb\multiply\jlreq at tempdima\@tempdimb
+      \begin{list}{}{%
+        \itemsep=0pt\relax
+        \parsep=0pt\relax
+        \partopsep=0pt\relax
+        \topsep=0pt\relax
+        \leftmargin=\dimexpr\linewidth - \jlreq at tempdima\relax
+        \itemindent=0pt\relax
+        \topsep=\jlreq at endnote@beforeafterspace
+      }%
+      \expandafter\jlreq at theendnotes\jlreq at tempa\jlreq at endmark
+      \end{list}
+    \endgroup
+    \par
+  \fi
+}
+
+\jlreq at endnote@indent=2\jlreq at mol
+% 二行目以降を全角分下げる
+\newcommand{\@makeendtext}[1]{\parindent 1\jlreq at mol
+    \hskip-1\jlreq at mol\csname\jlreq at endnotemarkname\endcsname\hskip 1\jlreq at mol#1}% 見出し出力と一文字分の空き
+\def\@makeendmark{\@makefnmark}
+
+% \theendnoteの出力を仕込む
+\jlreq at tempafalse
+% \jlreq at tempcにセクション名たちを入れていく
+\def\jlreq at tempc{}
+\@for\jlreq at tempa:=\jlreq at endnote@position\do{
+  \jlreq at switch{\jlreq at tempa}{
+    {headings}{\jlreq at tempatrue}
+    {paragraph}{
+      \jlreq at tempatrue% _paragraphの時は_headingsも有効にする
+      \PushPostHook{par}{%
+        \ifx\jlreq at endnote@texts\@empty\else
+          \vskip\dimexpr-\baselineskip\relax
+          \vskip\dimexpr0pt\relax
+          \theendnotes
+        \fi
+      }
+    }
+    {
+      \def\@tempa#1#2\jlreq at endmark{#1}
+      \edef\@tempa{\expandafter\@tempa\jlreq at tempa\jlreq at endmark}
+      \expandafter\ifx\@tempa _
+        \def\@tempa#1#2\jlreq at endmark{\def\jlreq at result{#2}}
+        \expandafter\@tempa\jlreq at tempa\jlreq at endmark
+        \edef\jlreq at tempc{\jlreq at tempc,\jlreq at result}
+      \else
+        \ClassError{jlreq}{invalid value \jlreq at tempa\space in endnote_position}{\@ehc}
+      \fi
+    }
+  }
+}
+
+\ifjlreq at tempa
+  \edef\jlreq at do{%
+    \unexpanded{\def\jlreq at hook@beforeheadings#1}{\expandonce{\jlreq at hook@beforeheadings{#1}}%
+      \noexpand\theendnotes
+    }
+  }
+  \jlreq at do
+\else
+  \@for\@tempa:=\jlreq at tempc\do{
+    \ifx\@tempa\@empty\else
+      \edef\jlreq at do{%
+        \unexpanded{\def\jlreq at hook@beforeheadings#1}{\expandonce{\jlreq at hook@beforeheadings{#1}}%
+          \unexpanded{\def\@tempa}{\@tempa}\unexpanded{\def\@tempb{#1}}%
+          \unexpanded{\ifx\@tempa\@tempb\theendnotes\fi}%
+        }
+      }
+      \jlreq at do
+    \fi
+  }
+\fi
+\AtEndDocument{\theendnotes}
+
+%.. 傍注(4.2.7)
+\setlength{\marginparsep}{2\jlreq at mol} % フォントサイズ×2(4.2.7:特に問題に~e)
+{%
+  \footnotesize
+  \setlength{\jlreq at tempdima}{\dimexpr \paperwidth - \textwidth - 1in - \oddsidemargin - \marginparsep\relax}
+  \ifx\jlreq at option@sidenote at width\@empty
+    \setlength{\marginparwidth}{\dimexpr\jlreq at tempdima-2\jlreq at fontsize\relax}
+  \else
+    \setlength{\marginparwidth}{\jlreq at speciallength{\jlreq at option@sidenote at width}}
+    \ifnum\marginparwidth>\jlreq at tempdima
+      \ClassWarningNoLine{jlreq}{sidenote_width is greater than the width of the margin}
+    \fi
+  \fi
+  \ifdim\marginparwidth>18\jlreq at mol
+    \global\marginparwidth=18\jlreq at mol
+  \else
+    \@tempdima=1\zw% 1\jlreq at mol
+    \global\divide\marginparwidth\@tempdima
+    \global\multiply\marginparwidth\@tempdima
+  \fi
+  \global\setlength{\marginparpush}{.5\@tempdima} % 同上:g
+}
+
+\def\jlreq at sidenotemarkname{@thefnmark}% 合印用番号を一時的に入れるマクロ名
+
+% (1) \footnoteとかと同じ形式 sidenote_type=number
+% (2) 文中にマークを入れて,傍注には見出しが入る sidenote_type=symbol
+% (3) 文中は強調文字列,傍注には見出しが入る sidenote_type=symbol
+% (4) 文中は何も無し,傍注には見出しが入る sidenote_type=symbol
+
+% (1) では\sidenote[]{}を定義
+% (2) では\sidenote{見出し}{注中身}を定義
+\long\def\@sidenotetext#1{%
+  \marginpar{\reset at font\footnotesize
+    \color at begingroup
+    \@makesidetext{#1}%
+    \color at endgroup
+  }%
+}
+\jlreq at setdefaultnotemark\@sidenotemark\@makesidemark
+\ifthenelse{\equal{\jlreq at sidenote@type}{number}}{
+  \def\jlreq at sidenotecounter{footnote}% 傍注用のカウンタ名
+  \def\sidenote{\@ifnextchar[{\jlreq at sidenote}{\jlreq at sidenote[]}}
+  \def\sidenotemark{\@ifnextchar[{\jlreq at sidenotemark}{\jlreq at sidenotemark[]}}
+  \def\sidenotetext{\@ifnextchar[{\jlreq at sidenotetext}{\jlreq at sidenotetext[]}}
+  \long\def\jlreq at sidenote[#1]#2{\jlreq at sidenotemark[#1]\@sidenotetext{#2}}
+  \def\jlreq at sidenotemark[#1]{%
+    \jlreq at ifempty{#1}{%
+      \stepcounter{\jlreq at sidenotecounter}%
+      \expandafter\protected at xdef\csname\jlreq at sidenotemarkname\endcsname{\csname the\jlreq at sidenotecounter\endcsname}%
+    }{%
+      \begingroup
+        \csname c@\jlreq at sidenotecounter\endcsname #1\relax
+        \expandafter\unrestored at protected@xdef\csname\jlreq at sidenotemarkname\endcsname{\csname the\jlreq at sidenotecounter\endcsname}%
+     \endgroup
+    }%
+    \@sidenotemark
+  }
+  \long\def\jlreq at sidenotetext[#1]#2{%
+    \jlreq at ifempty{#1}{%
+      \expandafter\protected at xdef\csname\jlreq at sidenotemarkname\endcsname{\csname the\jlreq at sidenotecounter\endcsname}%
+    }{%
+     \begingroup
+       \csname c@\jlreq at sidenotecounter\endcsname#1\relax
+       \expandafter\unrestored at protected@xdef\csname\jlreq at sidenotemarkname\endcsname{\csname the\jlreq at sidenotecounter\endcsname}%
+     \endgroup
+    }%
+    \@sidenotetext{#2}%
+  }
+  \def\@sidenotemark{\@makesidemark}
+  \ifx l\jlreq at engine
+    \long\def\@makesidetext#1{\csname\jlreq at sidenotemarkname\endcsname\hspace{0.5\jlreq at mol}#1}
+  \else
+    % thefootnote = \inhibitglue (...だと\inhibitglueが効かない
+    \long\def\@makesidetext#1{ \kern-1\zw\csname\jlreq at sidenotemarkname\endcsname\hspace{0.5\jlreq at mol}#1}
+  \fi
+  \def\@makesidemark{\@makefnmark}
+}{% sidenote_type = symbol
+  \jlreq at jlreqsetup@add{sidenote_symbol}{\def\jlreq at sidenote@defaultmark{#1}}
+  \jlreq at jlreqsetup@add{sidenote_keyword_font}{\def\jlreq at sidenote@keywordfont{#1}}
+  \jlreqsetup{
+    sidenote_symbol=*,sidenote_keyword_font={},
+  }
+  \def\sidenote{\jlreq at sidenote}
+  \def\sidenotemark{\jlreq at sidenotemark}
+  \def\sidenotetext{\jlreq at sidenotetext}
+  \long\def\jlreq at sidenote#1#2{\jlreq at sidenotemark{#1}\jlreq at sidenotetext{#1}{#2}}
+  \def\jlreq at sidenotemark#1{%
+    {\reset at font\jlreq at sidenote@keywordfont #1}%
+    \ifx\jlreq at sidenote@defaultmark\@empty\else
+      \expandafter\edef\csname\jlreq at sidenotemarkname\endcsname{\jlreq at sidenote@defaultmark}%
+      \@sidenotemark
+    \fi
+  }
+  \def\@sidenotemark{\@makesidemark}
+  % カスタマイズできるべき?
+  \long\def\jlreq at sidenotetext#1#2{%
+    \expandafter\def\csname\jlreq at sidenotemarkname\endcsname{\inhibitglue\null{\reset at font\headfont\inhibitglue #1}}%
+    \@sidenotetext{#2}%
+  }
+  \long\def\@makesidetext#1{{\headfont\csname\jlreq at sidenotemarkname\endcsname}\hspace*{1\jlreq at mol}#1}
+  \def\@makesidemark{\@makefnmark}
+}
+
+%.. 割注(3.4)
+\def\inlinenotesize{.6\jlreq at fontsize} % 割注の文字サイズ
+\let\jlreq at inlinenote@autolinebreak=\\% 計測時は\linebreakより\\の方が安定する.悩ましい…….
+
+\newcommand{\jlreq at inlinenote@kakkofontsize}{%
+  \fontsize{\dimexpr\inlinenotesize * 2\relax}{\dimexpr \inlinenotesize * 2\relax}%
+  \selectfont
+}
+
+\newcommand{\jlreq at inlinenote@fontsize}{%
+  \fontsize{\inlinenotesize}{\inlinenotesize}%
+  \selectfont
+}
+
+% 割注を入れるための命令.\inlinenote{割注}で使う.
+% 改行位置は自動で計算されるが,常に正しいとは限らない.
+% \inlinenote*は自動で改行されない.\\で改行位置を指定する.
+\newif\ifjlreq at in@inlinenote
+\jlreq at in@inlinenotefalse
+\newcommand*{\inlinenote}{%
+  \ifjlreq at in@inlinenote\ClassError{jlreq}{\string\inlinenote\space can't be nested}{\@ehc}\fi
+  \jlreq at in@inlinenotetrue
+  \ifvmode\leavevmode\fi
+  \@ifstar\jlreq at inlinenote@noauto\jlreq at inlinenote@auto}
+\let\warichu=\inlinenote
+
+\newcommand*{\jlreq at inlinenote@auto}[1]{%
+  % 割注初め括弧の前の場所を保存
+  \jlreq at savepos@for at rest@linewidth
+  % \jlreq at tempdimbに,現在行の残り長さを入れる
+  \jlreq at tempdimb=\jlreq at rest@linewidth
+  % 括弧の分を引いたものが,割注の使える長さ
+  \setbox\@tempboxa=\hbox{\jlreq at inlinenote@kakkofontsize\inhibitglue\jlreq at open@bracket at before@space(\inhibitglue}%
+  \addtolength{\jlreq at tempdimb}{-\wd\@tempboxa}%
+  \ifdim\jlreq at tempdimb<0pt\jlreq at tempdimb=\linewidth\fi
+  {%
+    \setbox\jlreq at tempboxa=\hbox{\jlreq at inlinenote@kakkofontsize\inhibitglue \jlreq at open@bracket at before@space(}%
+    \jlreq at box@putcenter\jlreq at tempboxa
+  }%
+  % 「初回」時はここに強制改行を入れる.これにより現在位置の取得がより正しくなる……といいなぁ
+  \jlreq at savepos@iflabelundefined{\\}{}%
+  % 割注内の\baselineskipを保存(後で使う).
+  {\jlreq at inlinenote@fontsize\xdef\jlreq at inlinenote@baselineskip{\the\baselineskip}}%
+  % 普通に並べた長さを計測し,その半分から始める
+  \setbox\@tempboxa=\hbox{\jlreq at inlinenote@fontsize #1}%
+  \jlreq at tempdimc=\wd\@tempboxa
+  \divide\jlreq at tempdimc by 2\relax
+  % \@tempcntbに,この長さで計測した場合の行数を入れる
+  \ifdim\jlreq at tempdimc<\jlreq at tempdimb\@tempcntb=2\relax
+  \else
+    \jlreq at tempdima=\dimexpr\jlreq at tempdimc - \jlreq at tempdimb\relax
+    \divide\jlreq at tempdima\linewidth
+    \@tempcntb=\number\jlreq at tempdima
+    \multiply\@tempcntb by 2\relax
+    \advance\@tempcntb by 4\relax
+  \fi
+  % \jlreq at parshapeargに\parshapeに指定する書式の最後以外を入れる.
+  \ifnum\@tempcntb>2\relax
+    \edef\jlreq at parshapearg{0pt \the\jlreq at tempdimb\space 0pt \the\jlreq at tempdimb}%
+    \@tempcnta=4\relax
+    \@whilenum\@tempcnta<\@tempcntb\do{%
+      \edef\jlreq at parshapearg{\jlreq at parshapearg\space 0pt \the\linewidth\space 0pt \the\linewidth}%
+      \advance\@tempcnta by 2\relax
+    }%
+    \setlength{\jlreq at tempdimc}{\dimexpr\jlreq at tempdimc - \jlreq at tempdimb - \linewidth * \numexpr(\@tempcntb - 4)/2\relax\relax}%
+  \else
+    \def\jlreq at parshapearg{}%
+  \fi
+  % 行数を伸ばしつつ良いところを探していく
+  \@whilenum\@tempcntb<1001\do{%
+    \ifnum\@tempcntb>2\jlreq at tempdimb=\linewidth\fi
+    \edef\@tempb{\the\@tempcntb}%
+    \jlreq at inlinenote@determinelength{#1}{\jlreq at inlinenote@fontsize}{\jlreq at parshapearg}{2}{\@tempb}{\jlreq at tempdimc}{\jlreq at tempdimb}%
+    \@tempcntb=\@tempb
+    \ifnum\@tempcntb>999\relax% ループが長すぎる
+      \global\setbox\jlreq at resultbox=\voidb at x%
+      \@tempcntb=1001\relax
+    \fi
+    \ifvoid\jlreq at resultbox\else% 成功
+      \edef\jlreq at inlinenote@lines{\the\@tempcntb}% 行数を保存
+      \@tempcntb=1001\relax
+    \fi
+    \advance\@tempcntb by 2\relax
+    \edef\jlreq at parshapearg{\jlreq at parshapearg 0pt \the\jlreq at tempdimb 0pt \the\jlreq at tempdimb}%
+  }%
+  \ifvoid\jlreq at resultbox
+    \ClassWarning{jlreq}{\string\inlinenote\space failed, maybe a bug}%
+  \else
+    \@tempcnta=0
+    \splittopskip=0pt\relax
+    \splitmaxdepth=\maxdimen
+    % 現在行の残り長さを思い出す
+    \jlreq at tempdimb=\jlreq at rest@linewidth
+    \setbox\@tempboxa=\hbox{\jlreq at inlinenote@kakkofontsize\inhibitglue\jlreq at open@bracket at before@space(\inhibitglue}%
+    \addtolength{\jlreq at tempdimb}{-\wd\@tempboxa}%
+    \setbox\@tempboxa=\box\jlreq at resultbox
+    \@whilenum\@tempcnta<\jlreq at inlinenote@lines\do{%
+      \ifnum\@tempcnta>0 \jlreq at inlinenote@autolinebreak\fi
+      % \jlreq at tempdimaに今の行の長さを入れる
+      \ifnum\@tempcnta<\numexpr\jlreq at inlinenote@lines - 2\relax
+        \ifnum\@tempcnta=0\jlreq at tempdima=\jlreq at tempdimb
+        \else\jlreq at tempdima=\linewidth\fi
+      \else
+        \jlreq at tempdima=-1pt\relax
+      \fi
+      {%
+        \edef\@tempa{\the\vbadness}%
+        \vbadness=10000
+        \setbox\jlreq at tempboxa=\vsplit\@tempboxa to \dimexpr\jlreq at inlinenote@baselineskip*2\relax
+        \vbadness=\@tempa\relax
+        % \jlreq at inlinenote@autolinebreak=\\の場合には,割注の長さを計測した物に長さに強制する
+        \jlreq at getlastbox{\jlreq at tempboxa}%
+        \setbox\jlreq at tempboxb=\box\jlreq at resultbox
+        \jlreq at getlastbox{\jlreq at tempboxa}%
+        \setbox\jlreq at tempboxa=\box\jlreq at resultbox
+        \ifx\jlreq at inlinenote@autolinebreak\\\relax
+          \ifdim\jlreq at tempdima>0pt\relax
+            \setbox\jlreq at tempboxa=\vbox{\jlreq at inlinenote@fontsize%
+              \hbox to \jlreq at tempdima{\unhbox\jlreq at tempboxa}%
+              \hbox to \jlreq at tempdima{\unhbox\jlreq at tempboxb}}%
+          \else
+            \setbox\jlreq at tempboxa=\vbox{\jlreq at inlinenote@fontsize%
+              \hbox{\unhbox\jlreq at tempboxa}%
+              \hbox{\unhbox\jlreq at tempboxb}}%
+          \fi
+        \else
+          \setbox\jlreq at tempboxa=\vbox{\jlreq at inlinenote@fontsize%
+            \hbox to \jlreq at tempdima{\unhbox\jlreq at tempboxa}%
+            \hbox to \jlreq at tempdima{\unhbox\jlreq at tempboxb}}%
+        \fi
+        \jlreq at box@putcenter\jlreq at tempboxa
+      }%
+      \advance\@tempcnta by 2\relax
+    }%
+  \fi
+  \jlreq at inlinenote@endnote
+}
+
+\newcommand*{\jlreq at inlinenote@noauto}[1]{%
+  \setbox\jlreq at tempboxa=\hbox{\jlreq at inlinenote@kakkofontsize\inhibitglue\jlreq at open@bracket at before@space(}%
+  \inhibitglue\jlreq at box@putcenter\jlreq at tempboxa
+  \jlreq at inlinenote@noauto@#1\\\jlreq at endmark\jlreq at endmark
+  \jlreq at inlinenote@endnote
+}
+
+\def\jlreq at inlinenote@noauto@#1\\#2#3\jlreq at endmark{%
+  \jlreq at inlinenote@noauto@@#1&\jlreq at endmark\jlreq at endmark
+  \ifx#2\jlreq at endmark\def\jlreq at next{}\else\linebreak\def\jlreq at next{\jlreq at inlinenote@noauto@#2#3\jlreq at endmark}\fi
+  \jlreq at next
+}
+
+\def\jlreq at inlinenote@noauto@@#1&#2#3\jlreq at endmark{%
+  \ifx#2\jlreq at endmark
+    \setbox\@tempboxa=\hbox{\jlreq at inlinenote@fontsize #1}%
+    \jlreq at tempdimc=\wd\@tempboxa
+    \divide\jlreq at tempdimc by 2\relax
+    \jlreq at inlinenote@determinelength{#1}{\jlreq at inlinenote@fontsize}{}{2}{2}{\jlreq at tempdimc}{\maxdimen}%
+    \ifvoid\jlreq at resultbox\else
+      {%
+        \setbox\jlreq at tempboxa=\hbox{\jlreq at inlinenote@fontsize\box\jlreq at resultbox}%
+        \jlreq at box@putcenter\jlreq at tempboxa
+      }%
+    \fi
+    \def\jlreq at next{}%
+  \else
+    \def\jlreq at next{\jlreq at inlinenote@noauto@@@{#1}#2#3}%
+  \fi
+  \jlreq at next
+}
+
+\def\jlreq at inlinenote@noauto@@@#1#2&\jlreq at endmark{%
+  {%
+    \setbox\@tempboxa=\hbox{\jlreq at inlinenote@fontsize\vbox{\hbox{#1}\hbox{#2}}}%
+    \jlreq at box@putcenter\@tempboxa
+  }%
+}
+
+\newcommand{\jlreq at inlinenote@endnote}{%
+  \jlreq at in@inlinenotefalse
+  {%
+%    \jlreq at inlinenote@kakkofontsize
+%    \hbox{)}\inhibitglue
+    \setbox\jlreq at tempboxa=\hbox{\jlreq at inlinenote@kakkofontsize)}%
+    \jlreq at box@putcenter\jlreq at tempboxa
+    \inhibitglue
+  }%
+}
+
+% \jlreq at inlinenote@determinelength{テキスト(1)}{書式指定(2)}{\parshape指定(3)}{調整に使う行数(4)}{成功行数(5)}{最小長さ(6)}{最大長さ(7)}
+% \jlreq at resultboxに整形結果を返す.見つからなかったらvoid
+\newcommand{\jlreq at inlinenote@determinelength}[7]{%
+%  \message{#1 の試行開始,行数 = #5, \the#6 から \the#7まで}%
+  \@tempcnta=1\relax
+  \def\@tempa{}%
+  \@whilenum\@tempcnta<#4\do{%
+    \expandafter\def\expandafter\@tempa\expandafter{\@tempa 0pt \the\jlreq at tempdima}%
+    \advance\@tempcnta by 1\relax
+  }%
+  \@tempcnta=0
+  \jlreq at tempdima=#6\relax
+  % 最後の行を少しずつ伸ばしていく
+  \@whilenum\@tempcnta<1000\do{%
+    \ifnum\@tempcnta>999\relax% ループが長すぎる
+      \global\setbox\jlreq at resultbox=\voidb at x%
+      \@tempcnta=1001\relax
+    \else
+      \setbox\@tempboxa=\vbox{#2%
+        \vbadness=10000\hbadness=10000\vfuzz=\maxdimen\hfuzz=\maxdimen
+        \parindent=0pt\leftskip=0pt\rightskip=0pt
+        \parshape #5 #3 \@tempa 0pt \the\maxdimen
+        #1\par\global\@tempcntb=\prevgraf}%
+%      \message{\string\jlreq at tempdima = \the\jlreq at tempdima で試行,行数は\the\@tempcntb , 書式 #5 #3 \@tempa 0pt \the\maxdimen}%
+    \fi
+    \jlreq at getlastbox{\@tempboxa}%
+    \setbox\jlreq at tempboxa=\box\jlreq at resultbox
+    \ifnum\@tempcntb<#5\relax% 行数が達していないならOK
+%      \message{行数 = \the\@tempcntb により確定}
+      \global\setbox\jlreq at resultbox=\vbox{#2%
+        \unvbox\@tempboxa\hbox{\unhbox\jlreq at tempboxa\unskip\unskip\unpenalty}%
+        \@whilenum\@tempcntb<#5\do{\hbox{}\advance\@tempcntb by 1}}%
+      \@tempcnta=1001\relax
+    \else
+      % そうでない場合は最後の二行の長さを比較する
+      \jlreq at getlastbox{\@tempboxa}%
+      \setbox\jlreq at tempboxb=\box\jlreq at resultbox
+%      \message{最終行の長さ \the\wd\jlreq at tempboxa, その前の長さ \the\wd\jlreq at tempboxb}%
+      \ifdim\wd\jlreq at tempboxa>\wd\jlreq at tempboxb
+        \advance\jlreq at tempdima by 0.3pt\relax
+      \else
+        % 後ろが短いのでOK
+        \global\setbox\jlreq at resultbox=\vbox{#2\unvbox\@tempboxa\box\jlreq at tempboxb\box\jlreq at tempboxa}%
+        \jlreq at resultdimen=\jlreq at tempdima
+        \@tempcnta=1001\relax
+      \fi
+    \fi
+    \ifdim\jlreq at tempdima>#7\relax
+      \global\setbox\jlreq at resultbox=\box\voidb at x
+      \@tempcnta=1001\relax
+    \fi
+    \advance\@tempcnta by 1\relax
+  }%
+}
+
+
+%. ページスタイル.
+% とりあえず脇に縦書きで配置するのは無視する.
+% メモ:
+% 2.6.1.cの後半が前半と整合的でないように見える……
+% 柱:両柱と片柱(2.6.3)
+\@tempdima=\jlreq at speciallength{\jlreq at headfoot@sidemargin}
+\ifthenelse{\lengthtest{\@tempdima=0pt} \OR \(\lengthtest{0.99\zw < \@tempdima} \AND \lengthtest{\@tempdima < 1.01\zw}\)}{}{
+  \jlreq at warning{ノンブルまたは柱は,基本版面の左右にそろえるか,全角アキだけ寄せた位置に配置する (2.6.1.b)}
+}
+
+% bottom-leftみたいなのを解釈する.入力の順番はどっちでも良いが,出力は<top/bottom><left/right>の順番
+% #1にセットする.
+\def\jlreq at pagestyle@parse at position@#1-#2\jlreq at endmark{%
+  \def\jlreq at tempa{#1}\def\jlreq at tempb{#2}%
+  \jlreq at ifempty{#2}{%
+    \ifx\jlreq at tempb\@empty\ClassError{jlreq}{Invalid position: #1}{\@ehc}\fi
+  }{%
+    \def\@tempa##1-{\def\jlreq at tempb{##1}}%
+    \@tempa#2\relax
+  }%
+}
+\newcommand*\jlreq at pagestyle@parse at position@@[1]{%
+  \ifthenelse{\equal{#1}{top} \OR \equal{#1}{bottom}}{\def\jlreq at tempc{#1}}{%
+    \ifthenelse{\equal{#1}{left} \OR \equal{#1}{right} \OR \equal{#1}{center}}{\def\jlreq at tempd{#1}}{%
+      \ClassError{jlreq}{Invalid position: #1}{\@ehc}%
+    }%
+  }%
+}
+\newcommand*{\jlreq at pagestyle@parse at position}[2]{%
+  \begingroup
+    \jlreq at pagestyle@parse at position@#2-\jlreq at endmark
+    % \jlreq at tempcに縦方向を,\jlreq at tempdに横方向を入れる
+    \def\jlreq at tempc{}\def\jlreq at tempd{}%
+    \expandafter\jlreq at pagestyle@parse at position@@\expandafter{\jlreq at tempa}%
+    \expandafter\jlreq at pagestyle@parse at position@@\expandafter{\jlreq at tempb}%
+    \ifx\jlreq at tempc\@empty\edef\jlreq at tempc{\expandafter\@firstoftwo#1}\fi
+    \ifx\jlreq at tempd\@empty\edef\jlreq at tempd{\expandafter\@secondoftwo#1}\fi
+    \edef\jlreq at do{\unexpanded{\def#1}{{\jlreq at tempc}{\jlreq at tempd}}}%
+  \expandafter\endgroup
+  \jlreq at do
+}
+
+% odd_running_head=_sectionのように下線から始まる場合,その値の見出し命令を柱に出すようにする.
+% 要するに\ps@***に\sectionmarkを定義するように仕込む.
+% 常にodd=rightmark,even=leftmarkになる.
+% 場所指定は奇数ページの方.偶数ページは反対になる.
+% mark_format={_chapter={第\thechapter 章\quad #1}}のような形.odd=とかeven=とかも仕込めるようにしたけど
+% あまり意味がない気がしてきた.oddやevenが優先される.
+\newcommand*{\DeclarePageStyle}[2]{%
+  \expandafter\edef\csname jlreq at pagestyle@setting@#1\endcsname{\unexpanded{#2}}%
+  \begingroup
+    \def\jlreq at nombre@position{{bottom}{center}}%
+    \def\jlreq at running@head at position{{top}{center}}%
+    \def\jlreq at nombre{\thepage}%
+    \def\jlreq at odd@running at head{}%
+    \def\jlreq at even@running at head{}%
+    \def\jlreq at command{}%
+    \def\jlreq at mark@format{}%
+    % 柱とノンブルの間
+    \def\jlreq at gap{1.5\zw}%
+    \newif\ifjlreq at clearmark\jlreq at clearmarktrue
+    \jlreq at parsekeyval[PageStyle]{
+      {nombre_position}{\jlreq at pagestyle@parse at position{\jlreq at nombre@position}{##1}}
+      {running_head_position}{\jlreq at pagestyle@parse at position{\jlreq at running@head at position}{##1}}
+      {nombre}{\def\jlreq at nombre{##1}}
+      {odd_running_head}{\def\jlreq at odd@running at head{##1}}
+      {even_running_head}{\def\jlreq at even@running at head{##1}}
+      {mark_format}{\edef\jlreq at mark@format{\unexpanded{##1}}}
+      {command}{\edef\jlreq at command{\unexpanded{##1}}}
+      {gap}{\def\jlreq at gap{##1}}
+      *{no_clear_mark}{\jlreq at clearmarkfalse}
+    }{#2}%
+    \ifthenelse{\(
+      \boolean{@tate} \AND \(
+        \equal{\expandafter\@secondoftwo\jlreq at nombre@position}{right} \OR
+        \equal{\expandafter\@secondoftwo\jlreq at running@head at position}{right}
+    \)\) \OR \(
+      \(\NOT \boolean{@tate}\) \AND \(
+        \equal{\expandafter\@secondoftwo\jlreq at nombre@position}{left} \OR
+        \equal{\expandafter\@secondoftwo\jlreq at running@head at position}{left}
+      \)
+    \)}{%
+      \if at twoside
+        \jlreq at warning{柱やノンブルは,左ページでは,基本版面の左端の延長線にノンブル又は柱の先頭をそろえて配置するか,基本版面の左端の延長線から基本版面の文字サイズの全角アキだけ右に寄せた位置に配置する(ページスタイル #1 内,2.6.1.b)}%
+      \fi
+    }{}%
+    \ifthenelse{\lengthtest{\jlreq at gap < 1.49\zw} \OR \( \lengthtest{\jlreq at gap > 1.51\zw} \AND \lengthtest{\jlreq at gap < 1.99\zw} \) \OR \lengthtest{\jlreq at gap > 2.01\zw}}{\jlreq at warning{ノンブルと柱との空き量は文字サイズの2倍又は1.5倍とする(ページスタイル #1 内,2.6.1.c)}}{}%
+    % 見出しを出す場合:evenに章などの高いレベルの見出しを出す(2.6.3.a)
+    \def\jlreq at markdefinition{}%
+    \def\jlreq at even@running at head@level{}%
+    % **markを作る
+    % \jlreq at makemark{odd/even}running_headの中身\jlreq at endmark
+    \def\jlreq at markdefinition{}%
+    \def\jlreq at makemark##1##2##3\jlreq at endmark{%
+      \ifx_##2%
+        \ifthenelse{\equal{##1}{even}}{%
+          \def\jlreq at even@running at head{\leftmark}%
+        }{%
+          \def\jlreq at odd@running at head{\rightmark}%
+        }%
+        \@ifundefined{jlreq at heading@setting@##3}{}{%
+          \expandafter\edef\csname jlreq@##1 at running@head at level\endcsname{\csname jlreq at heading@level@##3\endcsname}%
+        }%
+        \def\jlreq at tempa####1{%
+          \jlreq at tempafalse
+          \let\jlreq at result=\@undefined
+          \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}
+          }{####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{{}}%
+        }{%
+          \def\jlreq at markcommand{\markright}%
+          \def\jlreq at markcommandafter{}%
+        }%
+        \edef\jlreq at markdefinition{%
+          \expandonce{\jlreq at markdefinition}%
+          \noexpand\def\expandonce{\csname ##3mark\endcsname}\unexpanded{####1}{\expandonce{\jlreq at markcommand}
+            {\expandonce{\jlreq at result}}\expandonce{\jlreq at markcommandafter}}%
+        }%
+      \fi
+      \jlreq at ifendmark{##2}{}{\@gobble}%
+    }%
+    \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{}%
+    \def\@tempb{\jlreq at makemark{odd}}%
+    \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
+        \jlreq at warning{偶数ページには奇数ページよりアウトラインレベルの高い見出しを入れる(ページスタイル #1内,2.6.3.a)}%
+      \fi
+    \fi\fi
+    % ##1 ##2 ##3と並んだヘッダを作る,戻り値は\jlreq at result
+    \def\jlreq at setheadfoot@##1##2##3{%
+      % -.5\zwは端にそろえるための補正
+      \jlreq at ifempty{##1}{\def\jlreq at left{}}{\edef\jlreq at left{\noexpand\hspace*{\dimexpr\jlreq at expand@speciallength{\jlreq at headfoot@sidemargin}\if at tate - 0.5\zw\fi\relax}\unexpanded{##1}}}%
+      % +\topskip - .5\zwは\jlreq at headfoot@sidemargin = 0ptの時に本文の右に一致させるための補正.
+      \jlreq at ifempty{##3}{\def\jlreq at right{}}{\edef\jlreq at right{\unexpanded{##3}\noexpand\hspace*{\dimexpr\jlreq at expand@speciallength{\jlreq at headfoot@sidemargin}\if at tate + \topskip - .5\zw\fi\relax}}}%
+      \jlreq at ifempty{##2}{%
+        \edef\jlreq at result{\expandonce{\jlreq at left}\hfil\expandonce{\jlreq at right}}%
+        \jlreq at ifempty{##1}{\jlreq at ifempty{##3}{\def\jlreq at result{}}{}}{}%
+      }{%
+        \ifx\jlreq at left\@empty\else\edef\jlreq at left{\noexpand\hbox to 0pt{\expandonce{\jlreq at left}\hss}}\fi
+        \ifx\jlreq at right\@empty\else\edef\jlreq at right{\noexpand\hbox to 0pt{\hss\expandonce{\jlreq at right}}}\fi
+        \edef\jlreq at result{\expandonce{\jlreq at left}\hfil\unexpanded{##2}\hfil\expandonce{\jlreq at right}}%
+      }%
+    }%
+    % ##2を##1 = left/center/rightの場所,##4を##3の場所に置く.被った場合は##2を外側にする.
+    % 戻り値は\jlreq at result
+    \def\jlreq at setheadfoot##1##2##3##4{%
+      \def\jlreq at left{}\def\jlreq at center{}\def\jlreq at right{}%
+      % \ifjlreq at tempa = if(##1 == ##3 && ##2 != "" && ##4 != "")
+      \jlreq at tempatrue
+      \jlreq at ifempty{##2}{\jlreq at tempafalse}{}%
+      \jlreq at ifempty{##4}{\jlreq at tempafalse}{}%
+      \ifthenelse{\equal{##1}{##3}}{}{\jlreq at tempafalse}%
+      \ifjlreq at tempa
+        \ifthenelse{\equal{##1}{right}}{%
+          \edef\jlreq at right{\unexpanded{##4}\noexpand\hspace{\gap}\unexpanded{##2}}%
+        }{%
+          \expandafter\edef\csname jlreq@##1\endcsname{\unexpanded{##2}\noexpand\hspace{\gap}\unexpanded{##4}}%
+        }%
+      \else
+        \jlreq at ifempty{##2}{}{\expandafter\def\csname jlreq@##1\endcsname{##2}}%
+        \jlreq at ifempty{##4}{}{\expandafter\def\csname jlreq@##3\endcsname{##4}}%
+      \fi
+      \edef\jlreq at do{\noexpand\jlreq at setheadfoot@{\expandonce{\jlreq at left}}{\expandonce{\jlreq at center}}{\expandonce{\jlreq at right}}}%
+      \jlreq at do
+    }%
+    % \nombre@<top/bottom>を定義
+    \def\jlreq at nombre@top{}\def\jlreq at nombre@bottom{}%
+    \expandafter\edef\csname jlreq at nombre@\expandafter\@firstoftwo\jlreq at nombre@position\endcsname{\expandonce{\jlreq at nombre}}%
+    % \odd at running@head@<top/bottom>を定義
+    \def\jlreq at odd@running at head@top{}\def\jlreq at odd@running at head@bottom{}%
+    \expandafter\edef\csname jlreq at odd@running at head@\expandafter\@firstoftwo\jlreq at running@head at position\endcsname{\expandonce{\jlreq at odd@running at head}}%
+    % \@oddheadを定義
+    \edef\jlreq at do{\unexpanded{\jlreq at setheadfoot{\expandafter\@secondoftwo\jlreq at nombre@position}}{\expandonce{\jlreq at nombre@top}}\unexpanded{{\expandafter\@secondoftwo\jlreq at running@head at position}}{\expandonce{\jlreq at odd@running at head@top}}}%
+    \jlreq at do\let\jlreq at oddhead=\jlreq at result
+    % \@oddfootを定義
+    \edef\jlreq at do{\unexpanded{\jlreq at setheadfoot{\expandafter\@secondoftwo\jlreq at nombre@position}}{\expandonce{\jlreq at nombre@bottom}}\unexpanded{{\expandafter\@secondoftwo\jlreq at running@head at position}}{\expandonce{\jlreq at odd@running at head@bottom}}}%
+    \jlreq at do\let\jlreq at oddfoot=\jlreq at result
+    % ##1 = {}{}の後ろを逆にする
+    \def\getoppositeposition##1{%
+      \jlreq at switch{\expandafter\@secondoftwo##1}{
+        {center}{\def\jlreq at tempe{center}}
+        {right}{\def\jlreq at tempe{left}}
+        {left}{\def\jlreq at tempe{right}}
+      }%
+      \edef##1{{\expandafter\@firstoftwo##1}{\jlreq at tempe}}%
+    }
+    \getoppositeposition\jlreq at nombre@position
+    \getoppositeposition\jlreq at running@head at position
+    % 上と同じことをする
+    % \nombre@<top/bottom>を定義
+    \def\jlreq at nombre@top{}\def\jlreq at nombre@bottom{}%
+    \expandafter\edef\csname jlreq at nombre@\expandafter\@firstoftwo\jlreq at nombre@position\endcsname{\expandonce{\jlreq at nombre}}%
+    % \even at running@head@<top/bottom>を定義
+    \def\jlreq at even@running at head@top{}\def\jlreq at even@running at head@bottom{}%
+    \expandafter\edef\csname jlreq at even@running at head@\expandafter\@firstoftwo\jlreq at running@head at position\endcsname{\expandonce{\jlreq at even@running at head}}%
+    % \@evenheadを定義
+    \edef\jlreq at do{\unexpanded{\jlreq at setheadfoot{\expandafter\@secondoftwo\jlreq at nombre@position}}{\expandonce{\jlreq at nombre@top}}\unexpanded{{\expandafter\@secondoftwo\jlreq at running@head at position}}{\expandonce{\jlreq at even@running at head@top}}}%
+    \jlreq at do\let\jlreq at evenhead=\jlreq at result
+    % \@evenfootを定義
+    \edef\jlreq at do{\unexpanded{\jlreq at setheadfoot{\expandafter\@secondoftwo\jlreq at nombre@position}}{\expandonce{\jlreq at nombre@bottom}}\unexpanded{{\expandafter\@secondoftwo\jlreq at running@head at position}}{\expandonce{\jlreq at even@running at head@bottom}}}%
+    \jlreq at do\let\jlreq at evenfoot=\jlreq at result
+    \edef\jlreq at do{%
+      \noexpand\def\expandonce{\csname ps@#1\endcsname}{%
+        \unexpanded{\def\jlreq at current@pagestyle{#1}}%
+        \ifjlreq at clearmark\noexpand\jlreq at heading@execmacro at toallheadings\noexpand\jlreq at clearheadingmarks\fi
+        \unexpanded{\let\@mkboth=\markboth}%
+        \unexpanded{\def\@oddhead}{\expandonce{\jlreq at oddhead}}%
+        \unexpanded{\def\@oddfoot}{\expandonce{\jlreq at oddfoot}}%
+        \unexpanded{\def\@evenhead}{\expandonce{\jlreq at evenhead}}%
+        \unexpanded{\def\@evenfoot}{\expandonce{\jlreq at evenfoot}}%
+      }%
+      \noexpand\edef\expandonce{\csname ps@#1\endcsname}{%
+        \noexpand\expandonce{\expandonce{\csname ps@#1\endcsname}}%
+        \noexpand\unexpanded{\expandonce{\jlreq at markdefinition}}%
+        \noexpand\unexpanded{\expandonce{\jlreq at command}}%
+      }%
+    }%
+  \expandafter\endgroup
+  \jlreq at do
+}
+
+% 全ての見出しにマクロ#1を適用する.
+\def\jlreq at heading@execmacro at toallheadings#1{%
+  \begingroup
+    \def\jlreq at do{}%
+    \ifx\jlreq at heading@allheadings\@undefined
+      \jlreq at heading@execmacro at toallheadings@{#1}{chapter,part,section,subsection,subsubsection,paragraph,subparagraph}%
+    \else
+      \def\@tempa{\jlreq at heading@execmacro at toallheadings@{#1}}%
+      \expandafter\@tempa\expandafter{\jlreq at heading@allheadings}%
+    \fi
+  \expandafter\endgroup
+  \jlreq at do
+}
+
+\def\jlreq at heading@execmacro at toallheadings@#1#2{
+  \@for\jlreq at tempa:=#2\do{%
+    \@ifundefined{\jlreq at tempa}{}{%
+      \eappto\jlreq at do{\noexpand#1{\expandonce{\jlreq at tempa}}}%
+    }%
+  }%
+}
+\def\jlreq at clearheadingmarks#1{%
+  \@ifundefined{#1mark}{}{%
+    \expandafter\let\csname#1mark\endcsname=\@gobble
+  }%
+}
+  
+\newcommand*{\NewPageStyle}[2]{%
+  \expandafter\@ifdefinable\csname ps@#1\endcsname{\DeclarePageStyle{#1}{#2}}%
+}
+\newcommand*{\RenewPageStyle}[2]{%
+  \@ifundefined{ps@#1}{\@latex at error{\expandafter\string\csname#1\endcsname\space undefined}\@ehc}{\DeclarePageStyle{#1}{#2}}%
+}
+\newcommand*{\ProvidePageStyle}[2]{%
+  \@ifundefined{ps@#1}{\DeclarePageStyle{#1}{#2}}{}%
+}
+\newcommand*{\ModifyPageStyle}[2]{%
+  \begingroup
+    \@ifundefined{jlreq at pagestyle@setting@#1}{\ClassError{jlreq}{Unknown pagestyle: #1}{\@ehc}}{}%
+    \expandafter\let\expandafter\setting\expandafter=\csname jlreq at pagestyle@setting@#1\endcsname
+    \edef\jlreq at do{\noexpand\RenewPageStyle{#1}{\expandonce{\setting},\unexpanded{#2}}}%
+  \expandafter\endgroup
+  \jlreq at do
+}
+
+%.. 各種定義
+\RenewPageStyle{empty}{nombre={},odd_running_head={},even_running_head={}}
+\ifthenelse{\equal{\jlreq at article@type}{article}}{
+  \if at twoside
+    \NewPageStyle{headings}{odd_running_head={_subsection},even_running_head={_section}}
+  \else
+    \NewPageStyle{headings}{odd_running_head={_section},even_running_head={}}
+  \fi
+}{% book, article
+  \if at twoside
+    \NewPageStyle{headings}{odd_running_head={_section},even_running_head={_chapter}}
+  \else
+    \NewPageStyle{headings}{odd_running_head={_chapter},even_running_head={}}
+  \fi
+  \ModifyPageStyle{headings}{mark_format={_chapter={第\thechapter 章\quad #1}}}
+}
+\if at tate
+  \RenewPageStyle{plain}{nombre=\thepage,odd_running_head={},even_running_head={},no_clear_mark}
+  \NewPageStyle{myheadings}{nombre=\thepage,odd_running_head=\rightmark,even_running_head=\leftmark,no_clear_mark}
+  \if at twoside
+    \ModifyPageStyle{plain}{nombre_position={top-left}}
+    \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-left,running_head_position=top-left}
+    \ModifyPageStyle{myheadings}{nombre_position=bottom-left,running_head_position=top-left}
+  \else
+    \ModifyPageStyle{plain}{nombre_position={top-center}}
+    \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center}
+    \ModifyPageStyle{myheadings}{nombre_position=bottom-center,running_head_position=top-center}
+  \fi
+\else% yoko
+  \RenewPageStyle{plain}{nombre=\thepage,odd_running_head={},even_running_head={},nombre_position={bottom-center},no_clear_mark}
+  \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center}
+  \NewPageStyle{myheadings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center,odd_running_head=\rightmark,even_running_head=\leftmark,no_clear_mark}
+\fi
+
+%. フロート関連
+% 4.3.3.dの例,縦組みの時だけど横にも適用……
+\setlength{\floatsep}{1\jlreq at gol plus 1\jlreq at gol}
+\setlength{\textfloatsep}{1\jlreq at gol plus \baselineskip}
+\intextsep=\textfloatsep
+\dblfloatsep=\floatsep
+\dbltextfloatsep=\textfloatsep
+% 残りはデフォルトにしておく.
+
+% 4.3.1 注4
+\newlength\abovecaptionskip
+\newlength\belowcaptionskip
+\newcommand{\@makecaption}[2]{{%
+  \reset at font\small
+  \vskip\abovecaptionskip
+  \sbox\@tempboxa{{\jlreq@@makecaption at label@font #1}\hskip 1\jlreq at mol{\jlreq@@makecaption at font #2}}%
+  \ifdim \wd\@tempboxa >\hsize
+    {\jlreq@@makecaption at label@font #1}\hskip1\jlreq at mol{\jlreq@@makecaption at font #2}\relax\par
+  \else
+    \global\@minipagefalse
+    \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
+  \fi
+  \vskip\belowcaptionskip}}
+\jlreq at jlreqsetup@add{caption_font}{\def\jlreq@@makecaption at font{#1}}
+\jlreq at jlreqsetup@add{caption_label_font}{\def\jlreq@@makecaption at label@font{#1}}
+\jlreqsetup{caption_font=\headfont,caption_label_font=\headfont}
+% 特に根拠のない値
+\setlength\abovecaptionskip{.5\jlreq at gol}
+\setlength\belowcaptionskip{0pt}
+
+
+% \begin{figure}***\caption{???}\end{figure}を
+% \begin{figure}\layoutfloat{***}\pcaption{???}\end{figure}にする.
+% 
+%\def\jlreq at saveoriginalcs#1{
+%  \expandafter\expandafter\expandafter\let\expandafter\expandafter\csname jlreq at original@#1\endcsname\csname #1\endcsname
+%}
+%\long\def\jlreq at replace@layoutfloat#1\caption{\layoutfloat{#1}\jlreq at caption}
+%\long\def\jlreq at caption#1{\ifx#1\jlreq at endmark\else\pcaption{#1}\expandafter\jlreq at replace@layoutfloat\fi}
+%\def\jlreq at modify@float#1{%
+%  \def\lgdef{\long\gdef}
+%  \jlreq at saveoriginalcs{#1}
+%  \@namedef{#1}{\@ifnextchar[{\@nameuse{jlreq at float@#1}}{\@nameuse{jlreq at float@@#1}}}
+%  \expandafter\lgdef\csname jlreq at float@#1\endcsname[##1]{%
+%    \expandafter\csname jlreq at original@#1\endcsname[##1]
+%    \csname jlreq at process@insertlayoutfloat@#1\endcsname{}
+%  }
+%  \expandafter\lgdef\csname jlreq at float@@#1\endcsname{%
+%    \expandafter\csname jlreq at original@#1\endcsname
+%    \csname \jlreq at process@insertlayoutfloat@#1\endcsname{}
+%  }
+%  \expandafter\lgdef\csname jlreq at process@insertlayoutfloat@#1\endcsname ##1##2\end{%
+%    \csname jlreq at checkenvname@#1\endcsname{##1##2}\end
+%  }
+%  \expandafter\lgdef\csname jlreq at checkenvname@#1\endcsname ##1\end##2{%
+%    \def\@tempa{##2}%
+%    \def\@tempb{#1}%
+%    \ifx\@tempa\@tempb
+%      \def\jlreq at next{\jlreq at replace@layoutfloat##1\caption{\jlreq at endmark}\end{##2}}%
+%    \else
+%      \def\jlreq at next{\csname jlreq at process@insertlayoutfloat@#1\endcsname{##1\end{##2}}}%
+%    \fi
+%    \jlreq at next
+%  }
+%}
+
+%.. figure環境
+\newcounter{figure}
+\renewcommand*{\thefigure}{\arabic{figure}}
+\newcommand*{\fps at figure}{h}
+\newcommand*{\ftype at figure}{1}
+\newcommand*{\ext at figure}{lof}
+\newcommand*{\fnum at figure}{\figurename\thefigure}
+\newenvironment{figure}{\@float{figure}}{\end at float}
+\newenvironment{figure*}{\@dblfloat{figure}}{\end at dblfloat}
+\newcommand*{\listfigurename}{図目次}
+\newcommand{\figurename}{図}
+\if at tate
+  \DeclareLayoutCaption{figure}<y>(\floatwidth)[cr]
+\fi
+%\jlreq at modify@float{figure}
+%\jlreq at modify@float{figure*}
+
+%.. table環境
+\newcounter{table}
+\renewcommand*{\thetable}{\arabic{table}}
+\newcommand*{\fps at table}{h}
+\newcommand*{\ftype at table}{2}
+\newcommand*{\ext at table}{lot}
+\newcommand*{\fnum at table}{\tablename\thetable}
+\newenvironment{table}{\@float{table}}{\end at float}
+\newenvironment{table*}{\@dblfloat{table}}{\end at dblfloat}
+\newcommand{\listtablename}{表目次}
+\newcommand{\tablename}{表}
+\if at tate
+  \DeclareLayoutCaption{table}<y>(\floatwidth)[cr]
+\fi
+%\jlreq at modify@float{table}
+%\jlreq at modify@float{table*}
+
+%. タイトル周り
+\newenvironment{titlepage}{%
+  \if at twocolumn
+    \@restonecoltrue\onecolumn
+  \else
+    \@restonecolfalse\newpage
+  \fi
+  \thispagestyle{empty}%
+  \setcounter{page}{1}%
+}{%
+  \if at restonecol\twocolumn\else\newpage\fi
+  \if at twoside\else
+    \setcounter{page}{1}%
+  \fi
+}
+
+\if at titlepage
+  \newcommand{\maketitle}{%
+    % jarticleとかからあまり変更していない
+    \begin{titlepage}%
+    \let\footnotesize\small
+    \let\footnoterule\relax
+    \let\footnote\thanks
+    \null\vfil
+    \vskip 4\baselineskip
+    \begin{center}%
+      {\LARGE \@title \par}%
+      \vskip\baselineskip%
+      {\Large
+      \lineskip .75em%
+      \begin{tabular}[t]{c}%
+        \@author
+      \end{tabular}\par}%
+      \vskip\baselineskip
+      {\large\@date\par}%
+    \end{center}\par
+    \vfil{\centering\@thanks}\vfil\null
+    \end{titlepage}%
+  \jlreq at endofmaketitle
+  }
+\else
+  \newcommand{\maketitle}{%
+    \par
+    \begingroup
+      \renewcommand{\thefootnote}{\fnsymbol{footnote}}%
+      \renewcommand{\@makefnmark}{\hbox{%
+        \jlreq at iftdir{\yoko}{}%
+        \rlap{\@textsuperscript{\normalfont\@thefnmark}}%
+      }}%
+      \if at twocolumn
+        \ifnum\col at number=\@ne
+          \@maketitle
+        \else
+          \twocolumn[\@maketitle]%
+        \fi
+      \else
+        \newpage
+        \global\@topnum\z@
+        \@maketitle
+      \fi
+      % \pagestyle{empty}の時はそのまま.
+      \ifnum0\ifx\@oddhead\@empty\else1\fi\ifx\@evenhead\@empty\else1\fi>0
+        \thispagestyle{plain}%
+      \fi
+      \@thanks
+    \endgroup
+    \jlreq at endofmaketitle
+  }
+\fi
+% いろいろクリアする.
+\def\jlreq at endofmaketitle{%
+  \setcounter{footnote}{0}%
+  \global\let\thanks\relax
+  \global\let\maketitle\relax
+  \global\let\p at thanks\relax
+  \global\let\@thanks\@empty
+  \global\let\@author\@empty
+  \global\let\@date\@empty
+  \global\let\@title\@empty
+  \global\let\title\relax
+  \global\let\author\relax
+  \global\let\date\relax
+  \global\let\and\relax
+}%
+% \vskipを\baselineskipにしてみた.
+\def\@maketitle{%
+  \newpage\null
+  \vskip 2\baselineskip%
+  \begin{center}%
+  {\jlreq at keepbaselineskip{\LARGE}\@title\par}%
+  \vskip\baselineskip
+  {\jlreq at keepbaselineskip{\large}%
+    \lineskip .5\jlreq at gol
+    \begin{tabular}[t]{c}%
+      \@author
+    \end{tabular}%
+    \par
+  }%
+  \vskip\baselineskip
+  {\jlreq at keepbaselineskip{\large}\@date}%
+  \end{center}%
+  \par
+  \vskip\baselineskip
+%  \setbox\jlreq at tempboxa=\vbox{\everypar{}\leavevmode\begin{center}あいうえお\end{center}}%
+%  \unvbox\jlreq at tempboxa
+  \ifvoid\jlreq at abstractbox\else\unvbox\jlreq at abstractbox\fi
+}
+
+%.. abstract
+\ifthenelse{\equal{\jlreq at article@type}{book}}{}{% article,report
+  \newbox\jlreq at abstractbox
+  \newcommand*{\abstractname}{概要}
+  \if at titlepage
+    % articleとかjarticleとかと同じ
+    \newenvironment{abstract}{%
+      \titlepage
+      \null\vfil
+      \@beginparpenalty\@lowpenalty
+      \begin{center}%
+        {\bfseries\gtfamily\abstractname}%
+        \@endparpenalty\@M
+      \end{center}%
+      \par
+    }{%
+      \par\vfil\null\endtitlepage
+    }
+  \else
+    \newenvironment{abstract}{%
+      \ifnum0\if at twocolumn\else1\fi\ifjlreq at preamble1\fi>0
+        % とりあえず全部ボックスに入れる.
+        \global\setbox\jlreq at abstractbox=\vtop\bgroup
+        \ifjlreq at preamble
+          % preamble後っぽく振る舞う
+          \@noskipsecfalse
+          % \@nodocumentが入っているので一時的に無効化
+          \everypar{}
+        \fi
+        \if at twocolumn
+          \parindent=0pt
+          \hsize=\textwidth
+          % 後で\@maketitleとともに呼び出されるときは\twcolumn[***]で呼び出される.
+          \begin{minipage}[b]{\textwidth}%
+        \fi
+        \bgroup
+        \small
+        \parindent=1\jlreq at mol
+        \begin{center}%
+          {\bfseries\abstractname}%
+        \end{center}%
+        \quotation
+      \else
+        \section*{\abstractname}%
+      \fi
+    }{%
+      \ifnum0\if at twocolumn\else1\fi\ifjlreq at preamble1\fi>0
+        \endquotation
+        \egroup
+        \vspace{\baselineskip}%
+        \if at twocolumn
+          \end{minipage}
+        \fi
+        \egroup
+      \fi
+      \ifjlreq at preamble\else
+        \unvbox\jlreq at abstractbox
+      \fi
+    }
+  \fi
+}
+%. 箇条書き.cf. JISX4051 8.4
+% 用語定義型
+\newenvironment{description}{\list{}{%
+  \setlength{\leftmargin}{0\jlreq at mol}% 下げない
+  \setlength{\labelwidth}{0\jlreq at mol}%
+  \addtolength{\leftmargin}{\leftskip}%
+  \addtolength{\leftmargin}{\labelsep}%
+  \let\makelabel=\descriptionlabel
+% 同行じゃない場合はこんな感じ?
+%  \let\jlreq at original@@item=\@item
+%  \def\@item[##1]{\jlreq at original@@item[##1]\mbox{}\par
+  }}{\endlist}
+\newcommand{\descriptionlabel}[1]{\normalfont\headfont #1}
+
+% enumerateとitemize
+% 見出しが一つ上のレベルからどのくらいずれているかを入れる.
+% (見出しは2\zhの箱に右/下詰めで入る.)
+\setlength\leftmargini{2\jlreq at mol}
+\setlength\leftmarginii{1\jlreq at mol}
+\setlength\leftmarginiii{1\jlreq at mol}
+\setlength\leftmarginiv{1\jlreq at mol}
+\setlength\leftmarginv{1\jlreq at mol}
+\setlength\leftmarginvi{1\jlreq at mol}
+
+% enumerate, itemize用初期化
+\def\jlreq at init@list{%
+  \setlength{\labelwidth}{2\jlreq at mol}%
+  \setlength{\topsep}{0pt}%
+  \setlength{\partopsep}{0pt}%
+  \setlength{\itemsep}{0pt}%
+  \setlength{\parsep}{0pt}%
+  \setlength{\listparindent}{\parindent}%
+% itemizeは直後ベタ,enumerateは直後全角空き.
+  \ifthenelse{\equal{\@currenvir}{itemize}}{
+    \setlength{\labelsep}{0\jlreq at mol}%
+  }{%
+    \setlength{\labelsep}{1\jlreq at mol}%
+  }%
+  % \labelsepだけあけるのは一つ目(ラベルの直後)のみ
+  \setlength{\itemindent}{\labelsep}%
+}
+
+\def\@listi{%
+  \jlreq at init@list
+  \setlength{\leftmargin}{\leftmargini}%
+}
+\let\@listI\@listi
+\def\@listii{%
+  \jlreq at init@list
+  \setlength{\leftmargin}{\leftmarginii}%
+}
+\def\@listiii{%
+  \jlreq at init@list
+  \setlength{\leftmargin}{\leftmarginiii}%
+}
+\def\@listiv{%
+  \jlreq at init@list
+  \setlength{\leftmargin}{\leftmarginiv}%
+}
+\def\@listv{%
+  \jlreq at init@list
+  \setlength{\leftmargin}{\leftmarginv}%
+}
+
+\if at tate
+  \renewcommand{\theenumi}{\Kanji{enumi}}
+  \renewcommand{\theenumii}{\rensuji{\@arabic\c at enumii}}
+  \renewcommand{\theenumiii}{\rensuji{\@arabic\c at enumiii}}
+  \renewcommand{\theenumiv}{\rensuji{\@arabc\c at enumiv}}
+\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}
+
+\newcommand{\labelitemi}{\hbox to 1\jlreq at mol{\hss\textbullet\hss}}
+%\newcommand{\labelitemi}{•}
+\if at tate
+  \newcommand{\labelitemii}{○}
+  \newcommand{\labelitemiii}{*}
+\else
+  \newcommand{\labelitemii}{\hbox to 1\jlreq at mol{\hss\textendash\hss}}
+  \newcommand{\labelitemiii}{\hbox to 1\jlreq at mol{\hss\textasteriskcentered\hss}}
+\fi
+\newcommand{\labelitemiv}{\hbox to 1\jlreq at mol{\hss ・\hss}}
+
+% 引用系.1.5em→1\zh,字下げを二文字にした.3.5.2の例.
+\newenvironment{verse}
+  {\let\\\@centercr
+  \list{}{\itemsep\z@ \itemindent -2\jlreq at mol%
+    \listparindent\itemindent
+    \labelwidth\z@
+    \labelsep\z@
+    \leftmargin=2\jlreq at mol
+    \rightmargin\leftmargin \advance\leftmargin 2\jlreq at mol}%
+    \item\relax}{\endlist}
+\newenvironment{quotation}
+  {\list{}{\listparindent\parindent
+    \itemindent\listparindent
+    \labelwidth\z@
+    \labelsep\z@
+    \leftmargin=2\jlreq at mol
+    \rightmargin\leftmargin
+    \parsep\z@ \@plus.1\jlreq at gol}%
+    \item\relax}{\endlist}
+\newenvironment{quote}
+  {\list{}{%
+    \rightmargin\leftmargin
+    \labelwidth\z@
+    \leftmargin=2\jlreq at mol
+    \listparindent\z@}%
+    \item\relax}{\endlist}
+
+%. 表関係 4.4
+% 表内の行間を0にする(4.4.3.f)
+\let\jlreq at original@tabular=\tabular
+\let\jlreq at original@endtabular=\endtabular
+\preto\tabular{\begingroup\appto\@arrayparboxrestore{\baselineskip=0pt\lineskip=0pt}}
+\appto\endtabular{\endgroup}
+% 4.4.3.e
+\setlength\tabcolsep{.5\jlreq at gol}
+\setlength\arraycolsep{.5\jlreq at mol}
+% 4.4.3.j
+%\RequirePackage{tabls} % plextと整合的でない
+%\setlength\extrarulesep{.25\jlreq at gol}
+%\setlength\tablinesep{.25\jlreq at gol}
+%\renewcommand{\arraystretch}{0}
+\setlength\arrayrulewidth{\jlreq at omotekeiwidth} % 4.4.3.c
+\setlength\doublerulesep{2pt}
+\setlength\tabbingsep{\labelsep}
+\skip\@mpfootins=\skip\footins
+\setlength\fboxsep{.3\jlreq at mol}
+\setlength\fboxrule{\jlreq at omotekeiwidth} % 根拠はない
+% 後で
+\renewcommand{\theequation}{\@arabic\c at equation}
+
+%. 目次
+\setcounter{tocdepth}{3}
+\newcommand{\@pnumwidth}{2\jlreq at mol}
+\newcommand{\@tocrmarg}{2.55em}
+\newcommand{\@dotsep}{2} % 狭くしてみた
+\newskip\toclineskip
+\setlength\toclineskip{0\jlreq at gol plus .02\jlreq at gol}
+% tarticleから
+\newdimen\@lnumwidth
+\def\numberline#1{\hbox to\@lnumwidth{#1\hfil}}
+\def\addcontentsline#1#2#3{%
+  \protected at write\@auxout
+    {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
+      \if at tate
+        \@temptokena{\rensuji{\thepage}}%
+      \else
+        \@temptokena{\thepage}%
+      \fi
+    }%
+    {\string\@writefile{#1}%
+      {\protect\contentsline{#2}{#3}{\the\@temptokena}}}%
+}
+
+\newcount\jlreq at top@contents % トップ見出しを入れる.レベルと同じ値.
+\jlreq at top@contents=-1
+\newcommand*{\jlreq at set@top at contents}[1]{%
+  \ifnum\jlreq at top@contents=-1
+    \jlreq at top@contents=#1\relax
+  \fi
+}
+\ifthenelse{\equal{\jlreq at article@type}{article}}{
+  \newcommand{\tableofcontents}{%
+    \jlreq at top@contents=-1\relax
+    \if at twocolumn
+      \@restonecoltrue\onecolumn
+    \else
+      \@restonecolfalse
+    \fi
+    \section*{\contentsname}%
+    \@mkboth{\contentsname}{\contentsname}%
+    \@starttoc{toc}%
+    \if at restonecol\twocolumn\fi
+  }
+}{% book, article
+  \newcommand{\tableofcontents}{%
+    \jlreq at top@contents=-1\relax
+    \if at twocolumn
+      \@restonecoltrue\onecolumn
+    \else
+      \@restonecolfalse
+    \fi
+    \chapter*{\contentsname}%
+    \@mkboth{\contentsname}{\contentsname}%
+    \@starttoc{toc}%
+    \if at restonecol\twocolumn\fi
+  }
+}
+% JIS X 4051自身の目次に近づけようかと……なりきれてないけど.
+% 文字の大きさは全て同じ(\normalsize)にする.
+% 見出しのレベルがあがると1文字分ずつ字下げしていく.
+% 第三引数は,上からの幅に加え更にトップの見出しからの差による補正(プラス)が入る.
+% 補正には\jlreq at top@contentsを使う.
+% 「トップ」というか,一番最初に現れた見出しを入れる.
+% リーダーは.から・に変更しました.更に直後から出るように.
+\def\@dottedtocline#1#2#3#4#5{%
+  \jlreq at set@top at contents{#1}%
+  \ifnum #1>\c at tocdepth \else
+    \vskip\toclineskip
+    {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
+    \parindent #2\relax\@afterindenttrue
+    \interlinepenalty\@M
+    \leavevmode
+    \@lnumwidth #3\relax
+      \@tempcnta=#1\relax
+      \advance\@tempcnta by -\jlreq at top@contents
+      \@tempdima=1\jlreq at mol
+      \multiply \@tempdima by \@tempcnta
+    \advance\leftskip \@lnumwidth \hbox{}\hskip -\leftskip
+      \advance\leftskip\@tempdima
+    {#4}\nobreak
+    \leaders\hbox{$\hbox{・}\mkern \@dotsep mu \m at th \mkern \@dotsep mu$}%
+    \hfill\nobreak
+    \hb at xt@\@pnumwidth{\hss\normalfont\normalcolor #5}%
+    \par}%
+  \fi}
+
+% listoffigures
+\newcommand{\listoffigures}{%
+  \jlreq at top@contents=0
+  \section*{\listfigurename}%
+  \@mkboth{\listfigurename}{\listfigurename}%
+  \@starttoc{lof}%
+}
+\newcommand*{\l at figure}{\@dottedtocline{1}{0\jlreq at gol}{2\jlreq at gol}}
+\newcommand{\listoftables}{%
+  \jlreq at top@contents=0
+  \section*{\listtablename}%
+  \@mkboth{\listtablename}{\listtablename}%
+  \@starttoc{lot}%
+}
+\let\l at table\l at figure
+
+%. 文献,そのまま
+\newdimen\bibindent
+\setlength\bibindent{2\jlreq at mol}
+\newcommand{\newblock}{\hskip .11em\@plus.33em\@minus.07em}
+\newenvironment{thebibliography}[1]{%
+  \jlreq at oldfontcommand@enable
+  \section*{\refname}%
+  \@mkboth{\refname}{\refname}%
+  \list{\@biblabel{\@arabic\c at enumiv}}%
+      {\settowidth\labelwidth{\@biblabel{#1}}%
+      \leftmargin\labelwidth
+      \advance\leftmargin\labelsep
+      \itemindent=0pt
+      \@openbib at code
+      \usecounter{enumiv}%
+      \let\p at enumiv\@empty
+      \renewcommand\theenumiv{\@arabic\c at enumiv}}%
+  \sloppy
+  \clubpenalty4000
+  \@clubpenalty\clubpenalty
+  \widowpenalty4000%
+  \sfcode`\.\@m
+}{%
+  \def\@noitemerr
+    {\@latex at warning{Empty `thebibliography' environment}}%
+  \endlist
+  \jlreq at oldfontcommand@disable
+}
+\let\@openbib at code\@empty
+
+%. 索引
+\newif\ifjlreq at resttate
+\newenvironment{theindex}{%
+  \jlreq at oldfontcommand@enable
+  \jlreq at iftdir{\clearpage\yoko\jlreq at resttatetrue}{\jlreq at resttatefalse}% 常に横書きにする
+  \if at twocolumn\@restonecolfalse\else\@restonecoltrue\fi
+  \columnseprule\z@ \columnsep 2\jlreq at mol
+  \twocolumn[\section*{\indexname}]%
+  \@mkboth{\indexname}{\indexname}%
+  \thispagestyle{plain}%
+  \parindent\z@
+  \parskip\z@ \@plus .03\jlreq at gol\relax
+  \let\item\@idxitem
+}{%
+  \if at restonecol\onecolumn\else\clearpage\fi
+  \ifjlreq at resttate\tate\fi
+}
+\newcommand{\@idxitem}{\par\hangindent 4\jlreq at mol}
+\newcommand{\subitem}{\@idxitem \hspace*{2\jlreq at mol}}
+\newcommand{\subsubitem}{\@idxitem \hspace*{3\jlreq at mol}}
+\newcommand{\indexspace}{\par \vskip 1\jlreq at gol \@plus .5\jlreq at gol \@minus .3\jlreq at gol\relax}
+
+
+%. 前付,後付,付録
+\ifthenelse{\equal{\jlreq at article@type}{book}}{
+  \newif\if at mainmatter
+  \@mainmattertrue
+  \newcommand*\frontmatter{%
+    \if at openright
+      \cleardoublepage
+    \else
+      \clearpage
+    \fi
+    \@mainmatterfalse
+    \let\jlreq at pagestyle@atmain\jlreq at current@pagestyle
+    \ifthenelse{\equal{\jlreq at article@type}{article}}{}{%book, report
+      \SaveHeading{chapter}{\jlreq at heading@chapter at atmain}%
+      \ModifyHeading{chapter}{label_format={}}%
+    }%
+    \pagestyle{plain}%
+    \pagenumbering{roman}}
+  \newcommand*\mainmatter{%
+    \cleardoublepage
+    \@mainmattertrue
+    \@ifundefined{jlreq at pagestyle@atmain}{}{%
+      \expandafter\pagestyle\expandafter{\jlreq at pagestyle@atmain}%
+    }%
+    \@ifundefined{jlreq at heading@chapter at atmain}{}{\jlreq at heading@chapter at atmain}%
+    \setcounter{chapter}{0}%
+    \pagenumbering{arabic}}
+  \newcommand*\backmatter{%
+    \if at openright
+      \cleardoublepage
+    \else
+      \clearpage
+    \fi
+    \ifthenelse{\equal{\jlreq at article@type}{article}}{}{%book, report
+      \SaveHeading{chapter}{\jlreq at heading@chapter at atmain}%
+      \ModifyHeading{chapter}{label_format={}}%
+    }%
+    \pagestyle{plain}%
+    \@mainmatterfalse
+    \setcounter{chapter}{0}}
+}{}
+\newcommand*\appendix{\par
+  \setcounter{section}{0}%
+}
+
+\ifthenelse{\equal{\jlreq at article@type}{article}}{
+  \appto\appendix{%
+    \setcounter{subsection}{0}%
+    \gdef\thesection{\@Alph\c at section}%
+    \if at tate
+      \def\thesection{\rensuji{\Alph{section}}}%
+    \else
+      \def\thesection{\Alph{section}}%
+    \fi
+  }
+}{%book, report
+  \appto\appendix{%
+    \setcounter{chapter}{0}%
+    \if at tate
+      \def\thechapter{\rensuji{\Alph{chapter}}}%
+    \else
+      \def\thechapter{\Alph{chapter}}%
+    \fi
+    \ModifyHeading{chapter}{label_format={付録\thechapter\quad}}%
+    \ifx\jlreq at current@pagestyle\@undefined\else
+      \ifthenelse{\equal{\jlreq at current@pagestyle}{headings}}{%
+        \def\chaptermark#1{\markboth{付録\thechapter\quad #1}{}}%
+        \ModifyPageStyle{headings}{mark_format={_chapter={付録\thechapter\quad #1}}}%
+      }{}%
+    \fi
+  }
+}
+
+
+% 日にち
+\newif\if西暦 \西暦true
+\def\西暦{\西暦true}
+\def\和暦{\西暦false}
+\newcount\heisei \heisei\year \advance\heisei-1988\relax
+
+\def\today{{%
+  \jlreq at iftdir{%
+    \if西暦
+      \kansuji\year 年
+      \kansuji\month 月
+      \kansuji\day 日
+    \else
+      平成\ifnum\heisei=1 元年\else\kansuji\heisei 年\fi
+      \kansuji\month 月
+      \kansuji\day 日
+    \fi
+  }{%
+    \if西暦
+      \number\year~年
+      \number\month~月
+      \number\day~日
+    \else
+      平成\ifnum\heisei=1 元年\else\number\heisei~年\fi
+      \number\month~月
+      \number\day~日
+    \fi
+  }}}
+
+%. 定理環境
+\def\jlreq at theorem@abovebelowspace{1\baselineskip}%とりあえず前後に一行分のアキ
+\def\@begintheorem#1#2{\topsep=\jlreq at theorem@abovebelowspace
+  \trivlist\labelsep=1\jlreq at mol
+   \item[\hskip \labelsep{\headfont #1\ #2}]}
+\def\@opargbegintheorem#1#2#3{\topsep=\jlreq at theorem@abovebelowspace
+  \trivlist\labelsep=1\jlreq at mol
+  \item[\hskip \labelsep{\headfont #1\ #2(#3)}]}
+
+\AtEndOfPackageFile*{amsthm}{
+  \newtheoremstyle{jlreq}{\jlreq at theorem@abovebelowspace}{\jlreq at theorem@abovebelowspace}{\normalfont}{}{\headfont}{}{1\jlreq at mol}{\thmname{#1}\thmnumber{\ #2}\thmnote{ (#3)}}
+  \theoremstyle{jlreq}
+  \let\jlreq at original@proof=\proof
+  \let\jlreq at original@endproof=\endproof
+  \def\proof{\@ifnextchar[{\jlreq at proof}{\jlreq at proof[\proofname]}}
+  \def\jlreq at proof[#1]{\labelsep=1\jlreq at mol\jlreq at original@proof[{\normalfont\headfont #1\inhibitglue}\nopunct]}
+  \renewcommand{\proofname}{証明}
+}
+
+
+% デフォルト設定
+\newcommand{\contentsname}{目 次}
+\newcommand{\refname}{参考文献}
+\newcommand{\indexname}{索 引}
+\pagestyle{plain}
+\pagenumbering{arabic}
+\if at twocolumn
+  \twocolumn
+  \sloppy
+  \flushbottom
+\else
+  \onecolumn
+  \raggedbottom
+\fi
+\endinput
+
+

Modified: trunk/Master/texmf-dist/tex/luatex/jlreq/jfm-jlreq.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/jlreq/jfm-jlreq.lua	2017-02-17 10:54:19 UTC (rev 43258)
+++ trunk/Master/texmf-dist/tex/luatex/jlreq/jfm-jlreq.lua	2017-02-17 22:27:03 UTC (rev 43259)
@@ -1,1223 +1,1223 @@
---[[
-3.1.3
-3.1.6.a
-]]
-
---[[
-優先順位は,第n段階を3 - nに対応させる.
-  段階   1, 2, 3, 4, 5, 6
-priority 2, 1, 0,-1,-2,-3
-xkanjiskipは{1,-3},kanjiskip={0,0}
-\ltjsetparameter{stretch_priority={kanjiskip=1,xkanjiskip=-3}}
-\ltjsetparameter{stretch_priority={kanjiskip=0,xkanjiskip=0}}
-]]
-
-local hyphen_glue = {
-	[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
-	[2] = {0, 0, 0},
-	[300] = {0, 0, 0},
-	[301] = {0, 0, 0},
-	[302] = {0, 0, 0},
-	[4] = {0, 0, 0},
-	[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-	[6] = {0, 0, 0},
-	[7] = {0, 0, 0},
-	[8] = {0, 0, 0},
-	[9] = {0, 0, 0},
-	[10] = {0, 0, 0},
-	[11] = {0, 0, 0},
-	[12] = {0, 0, 0},
-	[13] = {0, 0, 0},
-	[14] = {0, 0, 0},
-	[15] = {0, 0, 0},
-	[16] = {0, 0, 0},
-	[0] = {0, 0, 0},
---[[
-	[20] = {0, 0, 0},
-	[21] = {0, 0, 0},
-	[22] = {0, 0, 0},
-	[23] = {0, 0, 0},
-	[24] = {0, 0, 0},
-	[25] = {0, 0, 0},
-	[26] = {0, 0, 0},
-	[27] = {0, 0, 0},
-	[28] = {0, 0, 0},
-	[29] = {0, 0, 0},
-	[30] = {0, 0, 0},
-]]
-}
-
-
-
-local jfm = {
-	dir = 'yoko',
-	zw = 1.0,
-	zh = 1.0,
-	version = 2,
-	-- 文字クラス4,9,10,11,15,16,19との間は(x)kanjiskipで調整する.
-	kanjiskip = {0, 0.25, 0},
-	xkanjiskip = {0.25, 0.25, 0.125},
-	
-	-- alignは適当
-	[1] = { -- 初め括弧類
-		chars = {'(', '〔', '[', '{', '〈', '《', '「', '『', '【', '⦅', '〘', '〖', '«', '〝',
-			'‘', '“'},
-		width = 0.5,height = 0.88,depth = 0.12,
-		align = 'right',
-		glue = {
-			[1] = {0, 0, 0},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0, 0},
-			[9] = {0, 0, 0},
-			[10] = {0, 0, 0},
-			[11] = {0, 0, 0},
-			[12] = {0, 0, 0},
-			[13] = {0, 0, 0},
-			[14] = {0, 0, 0},
-			[15] = {0, 0, 0},
-			[16] = {0, 0, 0},
-			[0] = {0, 0, 0},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0, 0, 0},
-			[22] = {0, 0, 0},
-			[23] = {0, 0, 0},
-			[24] = {0, 0, 0},
-			[25] = {0, 0, 0},
-			[26] = {0, 0, 0},
-			[27] = {0, 0, 0},
-			[28] = {0, 0, 0},
-			[29] = {0, 0, 0},
-			[30] = {0, 0, 0},
-			-- [22][23] 注1
-		]]
-		},
-	},
-	
-	[2] = { -- 終わり括弧類
-		chars = { ')', '〕', ']', '}', '〉', '》', '」', '』', '】', '⦆', '〙', '〗', '»', '〟',
-			 '’', '”'},
-		width = 0.5,height = 0.88,depth = 0.12,
-		align = 'left',
-		glue = {
-			[1] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[301] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[302] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[4] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[9] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[10] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[11] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[12] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[13] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[14] = {0, 0, 0},
-			[15] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[16] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[0] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[22] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[23] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[24] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[25] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[26] = {0.5, 0, 0, ratio = 0, priority = {0,-2}},
-			[27] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[28] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[29] = {0, 0, 0},
-			[30] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-		]]
-		},
-		end_adjust = {0.5,0},
-	},
-	
-	-- [3*]はハイフン類.幅が違うので分ける.
-	[300] = {
-		chars = {'‐'},
-		width = 0.25,height = 0.88,depth = 0.12,
-		align = 'middle',
-		glue = hyphen_glue,-- 上の方で定義
-	},
-	
-	[301] = {
-		chars = {'゠', '–'},
-		width = 0.5,height = 0.88,depth = 0.12,
-		align = 'middle',
-		glue = hyphen_glue,
-	},
-
-	[302] = {
-		chars = {'〜'},
-		width = 1,height = 0.88,depth = 0.12,
-		align = 'middle',
-		glue = hyphen_glue,
-	},
-
-	[4] = { -- 区切り約物
-		chars = {'!', '?', '‼', '⁇', '⁈', '⁉'},
-		width = 1,height = 0.88,depth = 0.12,
-		align = 'middle',
-		glue = {
-			[1] = {0.5, 0.5, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0, 0},
-			[9] = {0, 0, 0},
-			[10] = {0, 0, 0},
-			[11] = {0, 0, 0},
-			[12] = {0, 0, 0},
-			[13] = {0, 0, 0},
-			[14] = {0, 0, 0},
-			[15] = {0, 0, 0},
-			[16] = {0, 0, 0},
---			[0] = {0, 0, 0},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空けpriority = {0,-1}段階
-			[22] = {0, 0, 0},
-			[23] = {0, 0, 0},
-			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空けpriority = {0,-1}段階
-			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空けpriority = {0,-1}段階
-			[26] = {0, 0, 0},
-		]]
-			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空けpriority = {0,-1}段階
-		--[[
-			[28] = {0, 0, 0},
-			[29] = {0, 0, 0},
-			[30] = {0, 0, 0},
-		]]
-		},
-	},
-	
-	[5] = { -- 中点類
-		chars = {'・', ':', 
-			';'
-		},
-		width = 0.5,height = 0.88,depth = 0.12,
-		align = 'middle',
-		glue = {
-			[1] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[2] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[300] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[301] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[302] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[4] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[5] = {0.5, 0, 0.5, ratio = 0.5, priority = {0,-1}},
-			[6] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[7] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[8] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[9] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[10] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[11] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[12] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[13] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[14] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[15] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[16] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[0] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-		--[[
-			[20] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[21] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[22] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[23] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[24] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[25] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[26] = {0.25, 0, 0, ratio = 0, priority = {0,-1}},
-		]]
-			[27] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-		--[[
-			[28] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[29] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-			[30] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
-		]]
-		},
-		end_adjust = {0.25,0}, -- 0.25 -> 0は詰め,優先順位は第三段階
-	},
-	
-	[6] = { -- 句点類
-		chars = {'。', 
-			'.'}, -- 縦書きでは使わない
-		width = 0.5,height = 0.88,depth = 0.12,
-		align = 'left',
-		glue = {
-			[1] = {0.5, 0, 0, ratio = 0},
-			[2] = {0, 0, 0},
-			[300] = {0.5, 0, 0, ratio = 0},
-			[301] = {0.5, 0, 0, ratio = 0},
-			[302] = {0.5, 0, 0, ratio = 0},
-			[4] = {0.5, 0, 0, ratio = 0},
-			[5] = {0.75, 0, 0.25, ratio = 0.33333333, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0.5, 0, 0, ratio = 0},
-			[9] = {0.5, 0, 0, ratio = 0},
-			[10] = {0.5, 0, 0, ratio = 0},
-			[11] = {0.5, 0, 0, ratio = 0},
-			[12] = {0.5, 0, 0, ratio = 0},
-			[13] = {0.5, 0, 0, ratio = 0},
-			[14] = {0.5, 0, 0, ratio = 0},
-			[15] = {0.5, 0, 0, ratio = 0},
-			[16] = {0.5, 0, 0, ratio = 0},
-			[0] = {0.5, 0, 0, ratio = 0},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0.5, 0, 0, ratio = 0},
-			[22] = {0.5, 0, 0, ratio = 0},
-			[23] = {0.5, 0, 0, ratio = 0},
-			[24] = {0.5, 0, 0, ratio = 0},
-			[25] = {0.5, 0, 0, ratio = 0},
-			[26] = {0.5, 0, 0, ratio = 0},
-		]]
-			[27] = {0.5, 0, 0, ratio = 0},
-		--[[
-			[28] = {0.5, 0, 0, ratio = 0},
-			[29] = {0.5, 0, 0, ratio = 0},
-			[30] = {0.5, 0, 0, ratio = 0},
-		]]
-		},
-		end_adjust = {0.5, 0},
-	},
-	
-	[7] = { -- 読点類
-		chars = {'、', 
-			','}, -- 縦書きでは使わない
-		width = 0.5,height = 0.88,depth = 0.12,
-		align = 'left',
-		glue = {
-			[1] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[301] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[302] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[4] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[5] = {0.75, 0, 0.75, ratio = 0.33333333, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[9] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[10] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[11] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[12] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[13] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[14] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[15] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[16] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[0] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[22] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[23] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[24] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[25] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[26] = {0.5, 0, 0, ratio = 0, priority = {0,-2}},
-		]]
-			[27] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-		--[[
-			[28] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[29] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-			[30] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
-		]]
-		},
-		end_adjust = {0.5, 0},
-	},
-	
-	[8] = { -- 分離禁止文字
-		chars = {'—', '…', '‥', '〳', '〴', '〵'},
-		width = 1,height = 0.88,depth = 0.12,
-		align = 'middle',
-		glue = {
-			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0, 0},
-			[9] = {0, 0.25, 0, priority = {0,0}},
-			[10] = {0, 0.25, 0, priority = {0,0}},
-			[11] = {0, 0.25, 0, priority = {0,0}},
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},
-			[14] = {0, 0, 0},
-			[15] = {0, 0.25, 0, priority = {0,0}},
-			[16] = {0, 0.25, 0, priority = {0,0}},
-			[0] = {0, 0.25, 0, priority = {0,0}},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0, 0.25, 0, priority = {0,0}},
-			[22] = {0, 0.25, 0, priority = {0,0}},
-			[23] = {0, 0.25, 0, priority = {0,0}},
-			[24] = {0, 0, 0},
-			[25] = {0, 0, 0},
-			[26] = {0, 0, 0},
-		]]
-			[27] = {0, 0.25, 0, priority = {0,0}},
-		--[[
-			[28] = {0, 0.25, 0, priority = {0,0}},
-			[29] = {0, 0, 0},
-			[30] = {0, 0.25, 0, priority = {0,0}},
-		]]
-		},
-	},
-	
-	[9] = { -- 繰返し記号
-		chars = {'ヽ', 'ヾ', 'ゝ', 'ゞ', '々', '〻'},
-		height = 0.88,depth = 0.12,
-		align = 'middle',
-		glue = {
-			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0, 0},
-			[9] = {0, 0.25, 0, priority = {0,0}},
-			[10] = {0, 0.25, 0, priority = {0,0}},
-			[11] = {0, 0.25, 0, priority = {0,0}},
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},
-			[14] = {0, 0, 0},
-			[15] = {0, 0.25, 0, priority = {0,0}},
-			[16] = {0, 0.25, 0, priority = {0,0}},
---			[0] = {0, 0.25, 0, priority = {0,0}},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-			[22] = {0, 0.25, 0, priority = {0,0}},
-			[23] = {0, 0.25, 0, priority = {0,0}},
-			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-			[26] = {0, 0, 0},
-		]]
-			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-		--[[
-			[28] = {0, 0.25, 0, priority = {0,0}},
-			[29] = {0, 0, 0},
-			[30] = {0, 0.25, 0, priority = {0,0}},
-		]]
-		},
-	},
-
-	[10] = { -- 長音記号
-		chars = {'ー'},
-		height = 0.88,depth = 0.12,
-		align = 'middle',
-		glue = {
-			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0, 0},
-			[9] = {0, 0.25, 0, priority = {0,0}},
-			[10] = {0, 0.25, 0, priority = {0,0}},
-			[11] = {0, 0.25, 0, priority = {0,0}},
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},
-			[14] = {0, 0, 0},
-			[15] = {0, 0.25, 0, priority = {0,0}},
-			[16] = {0, 0.25, 0, priority = {0,0}},
---			[0] = {0, 0.25, 0, priority = {0,0}},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-			[22] = {0, 0.25, 0, priority = {0,0}},
-			[23] = {0, 0.25, 0, priority = {0,0}},
-			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-			[26] = {0, 0, 0},
-		]]
-			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-		--[[
-			[28] = {0, 0.25, 0, priority = {0,0}},
-			[29] = {0, 0, 0},
-			[30] = {0, 0.25, 0, priority = {0,0}},
-		]]
-		},
-	},
-	
-	[11] = { -- 小書きの仮名
-		chars = {'ぁ', 'ぃ', 'ぅ', 'ぇ', 'ぉ', 'ァ', 'ィ', 'ゥ', 'ェ', 'ォ', 'っ', 'ゃ', 'ゅ', 'ょ', 'ゎ', 'ゕ', 'ゖ', 'ッ', 'ャ', 'ュ', 'ョ', 'ヮ', 'ヵ', 'ヶ', 'ㇰ', 'ㇱ', 'ㇲ', 'ㇳ', 'ㇴ', 'ㇵ', 'ㇶ', 'ㇷ', 'ㇸ', 'ㇹ', 'ㇺ', 'ㇻ', 'ㇼ', 'ㇽ', 'ㇾ', 'ㇿ', 'ㇷ゚'},
-		height = 0.88,depth = 0.12,
-		align = 'middle',
-		glue = {
-			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0, 0},
-			[9] = {0, 0.25, 0, priority = {0,0}},
-			[10] = {0, 0.25, 0, priority = {0,0}},
-			[11] = {0, 0.25, 0, priority = {0,0}},
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},
-			[14] = {0, 0, 0},
-			[15] = {0, 0.25, 0, priority = {0,0}},
-			[16] = {0, 0.25, 0, priority = {0,0}},
---			[0] = {0, 0.25, 0, priority = {0,0}},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0.25, 0, 0.125, ratio = 0, priority = {1,-3}},
-			[22] = {0, 0.25, 0, priority = {0,0}},
-			[23] = {0, 0.25, 0, priority = {0,0}},
-			[24] = {0.25, 0, 0.125, ratio = 0, priority = {1,-3}},
-			[25] = {0.25, 0, 0.125, ratio = 0, priority = {1,-3}},
-			[26] = {0, 0, 0},
-		]]
-			[27] = {0.25, 0, 0.125, ratio = 0, priority = {1,-3}},
-		--[[
-			[28] = {0, 0.25, 0, priority = {0,0}},
-			[29] = {0, 0, 0},
-			[30] = {0, 0.25, 0, priority = {0,0}},
-		]]
-		},
-	},
-	
-	[12] = { -- 前置省略記号
-		chars = {'¥', '$', '£', '#', '€', '№'},
-		height = 0.88,depth = 0.12,
-		align = 'middle',
-		glue = {
-			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0.25, 0, priority = {0,0}},
-			[9] = {0, 0.25, 0, priority = {0,0}},
-			[10] = {0, 0.25, 0, priority = {0,0}},
-			[11] = {0, 0.25, 0, priority = {0,0}},
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},
-			[14] = {0, 0, 0},
-			[15] = {0, 0.25, 0, priority = {0,0}},
-			[16] = {0, 0.25, 0, priority = {0,0}},
-			[0] = {0, 0.25, 0, priority = {0,0}},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0, 0.25, 0, priority = {0,0}},
-			[22] = {0, 0.25, 0, priority = {0,0}},
-			[23] = {0, 0.25, 0, priority = {0,0}},
-			[24] = {0, 0, 0},
-			[25] = {0, 0.25, 0, priority = {0,0}},
-			[26] = {0, 0, 0},
-		]]
-			[27] = {0, 0.25, 0, priority = {0,0}},
-		--[[
-			[28] = {0, 0.25, 0, priority = {0,0}},
-			[29] = {0, 0, 0},
-			[30] = {0, 0.25, 0, priority = {0,0}},
-		]]
-		},
-	},
-	
-	[13] = { -- 後置省略記号
-		chars = {'°', '′', '″', '℃', '¢', '%', '‰', '㏋', 'ℓ', '㌃', '㌍', '㌔', '㌘', '㌢', '㌣', '㌦', '㌧', '㌫', '㌶', '㌻', '㍉', '㍊', '㍍', '㍑', '㍗', '㎎', '㎏', '㎜', '㎝', '㎞', '㎡', '㏄'},
-		height = 0.88,depth = 0.12,
-		align = 'middle',
-		glue = {
-			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0.25, 0, priority = {0,0}},
-			[9] = {0, 0.25, 0, priority = {0,0}},
-			[10] = {0, 0.25, 0, priority = {0,0}},
-			[11] = {0, 0.25, 0, priority = {0,0}},
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},
-			[14] = {0, 0, 0},
-			[15] = {0, 0.25, 0, priority = {0,0}},
-			[16] = {0, 0.25, 0, priority = {0,0}},
-			[0] = {0, 0.25, 0, priority = {0,0}},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0, 0.25, 0, priority = {0,0}},
-			[22] = {0, 0.25, 0, priority = {0,0}},
-			[23] = {0, 0.25, 0, priority = {0,0}},
-			[24] = {0, 0.25, 0, priority = {0,0}},
-			[25] = {0, 0.25, 0, priority = {0,0}},
-			[26] = {0, 0, 0},
-		]]
-			[27] = {0, 0.25, 0, priority = {0,0}},
-		--[[
-			[28] = {0, 0.25, 0, priority = {0,0}},
-			[29] = {0, 0, 0},
-			[30] = {0, 0.25, 0, priority = {0,0}},
-		]]
-		},
-	},
-	
-	[14] = { -- 和字間隔
-		chars = {' '},
-		align = 'middle',
-		width= 1,height = 0.88,depth = 0.12,
-		glue = {
-			[1] = {0, 0, 0},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0, 0},
-			[9] = {0, 0, 0},
-			[10] = {0, 0, 0},
-			[11] = {0, 0, 0},
-			[12] = {0, 0, 0},
-			[13] = {0, 0, 0},
-			[14] = {0, 0, 0},
-			[15] = {0, 0, 0},
-			[16] = {0, 0, 0},
-			[0] = {0, 0, 0},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0, 0, 0},
-			[22] = {0, 0, 0},
-			[23] = {0, 0, 0},
-			[24] = {0, 0, 0},
-			[25] = {0, 0, 0},
-			[26] = {0, 0, 0},
-		]]
-			[27] = {0, 0, 0},
-		--[[
-			[28] = {0, 0, 0},
-			[29] = {0, 0, 0},
-			[30] = {0, 0, 0},
-		]]
-		},
-	},
-	
-	[15] = { -- 平仮名
-		chars = {'あ', 'い', 'う', 'え', 'お', 'か', 'が', 'き', 'ぎ', 'く', 'ぐ', 'け', 'げ', 'こ', 'ご', 'さ', 'ざ', 'し', 'じ', 'す', 'ず', 'せ', 'ぜ', 'そ', 'ぞ', 'た', 'だ', 'ち', 'ぢ', 'つ', 'づ', 'て', 'で', 'と', 'ど', 'な', 'に', 'ぬ', 'ね', 'の', 'は', 'ば', 'ぱ', 'ひ', 'び', 'ぴ', 'ふ', 'ぶ', 'ぷ', 'へ', 'べ', 'ぺ', 'ほ', 'ぼ', 'ぽ', 'ま', 'み', 'む', 'め', 'も', 'や', 'ゆ', 'よ', 'ら', 'り', 'る', 'れ', 'ろ', 'わ', 'ゐ', 'ゑ', 'を', 'ん', 'ゔ', 'か゚', 'き゚', 'く゚', 'け゚', 'こ゚'},
-		height = 0.88,depth = 0.12,
-		align = 'middle',
-		glue = {
-			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0.25, 0, priority = {0,0}},
-			[9] = {0, 0.25, 0, priority = {0,0}},
-			[10] = {0, 0.25, 0, priority = {0,0}},
-			[11] = {0, 0.25, 0, priority = {0,0}},
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},
-			[14] = {0, 0, 0},
-			[15] = {0, 0.25, 0, priority = {0,0}},
-			[16] = {0, 0.25, 0, priority = {0,0}},
---			[0] = {0, 0.25, 0, priority = {0,0}},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-			[22] = {0, 0.25, 0, priority = {0,0}},
-			[23] = {0, 0.25, 0, priority = {0,0}},
-			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-			[26] = {0, 0, 0},
-		]]
-			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-		--[[
-			[28] = {0, 0.25, 0, priority = {0,0}},
-			[29] = {0, 0, 0},
-			[30] = {0, 0.25, 0, priority = {0,0}},
-		]]
-		},
-	},
-	
-	[16] = { -- 片仮名
-		chars = {'ア', 'イ', 'ウ', 'エ', 'オ', 'カ', 'ガ', 'キ', 'ギ', 'ク', 'グ', 'ケ', 'ゲ', 'コ', 'ゴ', 'サ', 'ザ', 'シ', 'ジ', 'ス', 'ズ', 'セ', 'ゼ', 'ソ', 'ゾ', 'タ', 'ダ', 'チ', 'ヂ', 'ツ', 'ヅ', 'テ', 'デ', 'ト', 'ド', 'ナ', 'ニ', 'ヌ', 'ネ', 'ノ', 'ハ', 'バ', 'パ', 'ヒ', 'ビ', 'ピ', 'フ', 'ブ', 'プ', 'ヘ', 'ベ', 'ペ', 'ホ', 'ボ', 'ポ', 'マ', 'ミ', 'ム', 'メ', 'モ', 'ヤ', 'ユ', 'ヨ', 'ラ', 'リ', 'ル', 'レ', 'ロ', 'ワ', 'ヰ', 'ヱ', 'ヲ', 'ン', 'ヴ', 'ヷ', 'ヸ', 'ヹ', 'ヺ', 'カ゚', 'キ゚', 'ク゚', 'ケ゚', 'コ゚', 'セ゚', 'ツ゚', 'ト゚'},
-		height = 0.88,depth = 0.12,
-		align = 'middle',
-		glue = {
-			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0.25, 0, priority = {0,0}},
-			[9] = {0, 0.25, 0, priority = {0,0}},
-			[10] = {0, 0.25, 0, priority = {0,0}},
-			[11] = {0, 0.25, 0, priority = {0,0}},
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},
-			[14] = {0, 0, 0},
-			[15] = {0, 0.25, 0, priority = {0,0}},
-			[16] = {0, 0.25, 0, priority = {0,0}},
---			[0] = {0, 0.25, 0, priority = {0,0}},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-			[22] = {0, 0.25, 0, priority = {0,0}},
-			[23] = {0, 0.25, 0, priority = {0,0}},
-			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-			[26] = {0, 0, 0},
-		]]
-			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-		--[[
-			[28] = {0, 0.25, 0, priority = {0,0}},
-			[29] = {0, 0, 0},
-			[30] = {0, 0.25, 0, priority = {0,0}},
-		]]
-		},
-	},
-	
-	--[[
-	[17] = { -- 等号類
-		chars = {'=', '≠', '≒', '≃', '≅', '≈', '≡', '≢', '<', '>', '≦', '≧', '≪', '≫', '≶', '≷', '⋚', '⋛', '∧', '∨', '⌅', '⌆', '⊂', '⊃', '⊄', '⊅', '⊆', '⊇', '⊊', '⊋', '∈', '∋', '∉', '∪', '∩', '∥', '∦', '⇒', '⇔', '↔', '∽', '∝', '⊥', '⊕', '⊗'},
-		align = 'middle',
-		width = 1,
-	},
-	
-	[18] = { -- 演算記号
-		chars = {'+', '-', '×', '÷', '±', '∓'},
-		align = 'middle',
-		width = 1,
-	},
-	]]
-	
-	-- [19] -- 漢字等:「その他の和文」として[0]で扱う
-	[0] = { -- = [19]
-		left = 0,
-		align = 'middle',
-		width = 1,height = 0.88,depth = 0.12,
-		glue = {
-			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0.25, 0, priority = {0,0}},
---			[9] = {0, 0.25, 0, priority = {0,0}},
---			[10] = {0, 0.25, 0, priority = {0,0}},
---			[11] = {0, 0.25, 0, priority = {0,0}},
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},
-			[14] = {0, 0, 0},
---			[15] = {0, 0.25, 0, priority = {0,0}},
---			[16] = {0, 0.25, 0, priority = {0,0}},
---			[0] = {0, 0.25, 0, priority = {0,0}},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-			[22] = {0, 0.25, 0, priority = {0,0}},
-			[23] = {0, 0.25, 0, priority = {0,0}},
-			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-			[26] = {0, 0, 0},
-		]]
-			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
-		--[[
-			[28] = {0, 0.25, 0, priority = {0,0}},
-			[29] = {0, 0, 0},
-			[30] = {0, 0.25, 0, priority = {0,0}},
-		]]
-		},
-	},
-
-	
-	--[[
-	[20] = { -- 合印中の文字
-		glue = {
-			[1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0.25, 0, priority = {0,0}},
-			[9] = {0, 0.25, 0, priority = {0,0}},
-			[10] = {0, 0.25, 0, priority = {0,0}},
-			[11] = {0, 0.25, 0, priority = {0,0}},
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},
-			[14] = {0, 0, 0},
-			[15] = {0, 0.25, 0, priority = {0,0}},
-			[16] = {0, 0.25, 0, priority = {0,0}},
-			[0] = {0, 0.25, 0, priority = {0,0}},
-			[20] = {0, 0, 0},
-			[21] = {0, 0.25, 0, priority = {0,0}},
-			[22] = {0, 0.25, 0, priority = {0,0}},
-			[23] = {0, 0.25, 0, priority = {0,0}},
-			[24] = {0, 0.25, 0, priority = {0,0}},
-			[25] = {0, 0.25, 0, priority = {0,0}},
-			[26] = {0, 0, 0},
-			[27] = {0, 0.25, 0, priority = {0,0}},
-			[28] = {0, 0.25, 0, priority = {0,0}},
-			[29] = {0, 0, 0},
-			[30] = {0, 0.25, 0, priority = {0,0}},
-		},
-	},
-	
-	[21] = {-- 親文字群中の文字(添え字付き)
-		glue = {
-			[1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0.25, 0, priority = {0,0}},
-			[9] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
-			[10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
-			[11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},
-			[14] = {0, 0, 0},
-			[15] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
-			[16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
-			[0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
-			[20] = {0, 0, 0},
-			[21] = {0, 0, 0},-- 注9,空け注5
-			[22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
-			[23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
-			[24] = {0, 0.25, 0, priority = {0,0}},
-			[25] = {0, 0.25, 0, priority = {0,0}},
-			[26] = {0, 0, 0},
-			[27] = {0, 0.25, 0, priority = {0,0}},
-			[28] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 三段階,表6と表3が整合的でない
-			[29] = {0, 0, 0},
-			[30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-		},
-	},
-	
-	[22] = { -- 親文字群中の文字(熟語ルビ以外のルビ付き)
-		glue = {
-			[1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0.25, 0, priority = {0,0}},
-			[9] = {0, 0.25, 0, priority = {0,0}},
-			[10] = {0, 0.25, 0, priority = {0,0}},
-			[11] = {0, 0.25, 0, priority = {0,0}},
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},
-			[14] = {0, 0, 0},
-			[15] = {0, 0.25, 0, priority = {0,0}},
-			[16] = {0, 0.25, 0, priority = {0,0}},
-			[0] = {0, 0.25, 0, priority = {0,0}},
-			[20] = {0, 0, 0},
-			[21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
-			[22] = {0, 0.25, 0, priority = {0,0}}, -- 空け注10
-			[23] = {0, 0.25, 0, priority = {0,0}},
-			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
-			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
-			[26] = {0, 0, 0},
-			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
-			[28] = {0, 0.25, 0, priority = {0,0}},
-			[29] = {0, 0, 0},
-			[30] = {0, 0.25, 0, priority = {0,0}},
-		},
-	},
-	
-	[23] = { -- 親文字群中の文字(熟語ルビ付き)
-		glue = {
-			[1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0.25, 0, priority = {0,0}},
-			[9] = {0, 0.25, 0, priority = {0,0}},
-			[10] = {0, 0.25, 0, priority = {0,0}},
-			[11] = {0, 0.25, 0, priority = {0,0}},
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},
-			[14] = {0, 0, 0},
-			[15] = {0, 0.25, 0, priority = {0,0}},
-			[16] = {0, 0.25, 0, priority = {0,0}},
-			[0] = {0, 0.25, 0, priority = {0,0}},
-			[20] = {0, 0, 0},
-			[21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
-			[22] = {0, 0.25, 0, priority = {0,0}},
-			[23] = {0, 0.25, 0, priority = {0,0}},-- 空け注7
-			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
-			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
-			[26] = {0, 0, 0},
-			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
-			[28] = {0, 0.25, 0, priority = {0,0}},
-			[29] = {0, 0, 0},
-			[30] = {0, 0.25, 0, priority = {0,0}},
-		},
-	},
-	
-	[24] = { -- 連数字中の文字
-		chars = {'	', ',', '.', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'},
-		glue = {
-			[1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0.25, 0, priority = {0,0}},
-			[9] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0, 0},-- 空け注8
-			[14] = {0, 0, 0},
-			[15] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[20] = {0, 0, 0},
-			[21] = {0, 0.25, 0, priority = {0,0}},
-			[22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[24] = {0, 0, 0},
-			[25] = {0.25, 0, 0, ratio = 0},
-			[26] = {0, 0, 0},
-			[27] = {0, 0, 0},-- 空け注9
-			[28] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
-			[29] = {0, 0, 0},
-			[30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-		}
-	},
-	
-	[25] = { -- 単位記号中の文字
-		chars = {'	', '(', ')', '/', '1', '2', '3', '4', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'Ω', 'μ', '℧', 'Å', '−', '・'},
-		glue = {
-			[1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},-- 注12
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0.25, 0, priority = {0,0}},
-			[9] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},
-			[14] = {0, 0, 0},
-			[15] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[20] = {0, 0, 0},
-			[21] = {0, 0.25, 0, priority = {0,0}},
-			[22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
-			[25] = {0, 0, 0},
-			[26] = {0, 0, 0},
-			[27] = {0, 0, 0},
-			[28] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
-			[29] = {0, 0, 0},
-			[30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-		}
-	},
-	
-	[26] = { -- 欧文間隔
-		chars = {' '},
-		glue = { -- 表3の方には記述がないのは何故?
-			[1] = {0.5, 0, 0.5, ratio = 1},
-			[2] = {0, 0, 0},
-			[300] = {0, 0, 0},
-			[301] = {0, 0, 0},
-			[302] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0, 0},
-			[9] = {0, 0, 0},
-			[10] = {0, 0, 0},
-			[11] = {0, 0, 0},
-			[12] = {0, 0, 0},
-			[13] = {0, 0, 0},
-			[14] = {0, 0, 0},
-			[15] = {0, 0, 0},
-			[16] = {0, 0, 0},
-			[0] = {0, 0, 0},
-			[21] = {0, 0, 0},
-			[22] = {0, 0, 0},
-			[23] = {0, 0, 0},
-			[24] = {0, 0, 0},
-			[25] = {0, 0, 0},
-			[26] = {0, 0, 0},
-			[27] = {0, 0, 0},
-			[28] = {0, 0, 0},
-			[29] = {0, 0, 0},-- 注13, (空け)注4
-			[30] = {0, 0, 0},
-		}
-	},
-	
-	[27] = {-- 欧文
-		chars = {'jcharbdd'},
-		glue = {
-			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[3] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0.25, 0, priority = {0,0}},
-			[9] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},-- 空け注10
-			[14] = {0, 0, 0},
-			[15] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[20] = {0, 0, 0},
-			[21] = {0, 0.25, 0, priority = {0,0}},
-			[22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[24] = {0, 0, 0},
-			[25] = {0.25, 0, 0.125, ratio = 0, priority = {0,-1}},
-			[26] = {0, 0, 0},
-			[27] = {0, 0, 0},
-			[28] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
-			[29] = {0, 0, 0},
-			[30] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
-		}
-	},
-	
-	[28] = { -- 割注始め括弧類
-		chars = {'(', '〔', '['},
-		glue = {
-			[1] = {0, 0, 0},
-			[2] = {0, 0, 0},
-			[3] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0, 0, 0},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0, 0},
-			[9] = {0, 0, 0},-- 注14
-			[10] = {0, 0, 0},-- 注15
-			[11] = {0, 0, 0},-- 注16
-			[12] = {0, 0, 0},
-			[13] = {0, 0, 0},
-			[14] = {0, 0, 0},
-			[15] = {0, 0, 0},
-			[16] = {0, 0, 0},
-			[0] = {0, 0, 0},
-			[20] = {0, 0, 0},
-			[21] = {0, 0, 0},
-			[22] = {0, 0, 0},
-			[23] = {0, 0, 0},
-			[24] = {0, 0, 0},
-			[25] = {0, 0, 0},
-			[26] = {0, 0, 0}, -- 注13, (空け)注4
-			[27] = {0, 0, 0},
-			[28] = {0, 0, 0},
-			[29] = {0, 0, 0},
-			[30] = {0, 0, 0},
-		}
-	},
-	
-	[29] = { -- 割注終わり括弧類
-		chars = {')', '〕', ']'},
-		glue = {
-			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[3] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0.25, 0, priority = {0,0}},
-			[9] = {0, 0.25, 0, priority = {0,0}},
-			[10] = {0, 0.25, 0, priority = {0,0}},
-			[11] = {0, 0.25, 0, priority = {0,0}},
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},
-			[14] = {0, 0, 0},
-			[15] = {0, 0.25, 0, priority = {0,0}},
-			[16] = {0, 0.25, 0, priority = {0,0}},
-			[0] = {0, 0.25, 0, priority = {0,0}},
-			[20] = {0, 0, 0},
-			[21] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[22] = {0, 0.25, 0, priority = {0,0}},
-			[23] = {0, 0.25, 0, priority = {0,0}},
-			[24] = {0.25, 0.25, 0.125, ratio = 1}, priority = {1,-3},-- 空け priority = 二段階
-			[25] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[26] = {0, 0, 0},
-			[27] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[28] = {0, 0.25, 0, priority = {0,0}},
-			[29] = {0, 0, 0},
-			[30] = {0, 0.25, 0, priority = {0,0}},
-		}
-	},
-	
-	[30] = { -- 縦中横中の文字
-		glue = {
-			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
-			[2] = {0, 0, 0},
-			[3] = {0, 0, 0},
-			[4] = {0, 0, 0},
-			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
-			[6] = {0, 0, 0},
-			[7] = {0, 0, 0},
-			[8] = {0, 0.25, 0, priority = {0,0}},
-			[9] = {0, 0.25, 0, priority = {0,0}},
-			[10] = {0, 0.25, 0, priority = {0,0}},
-			[11] = {0, 0.25, 0, priority = {0,0}},
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},
-			[14] = {0, 0, 0},
-			[15] = {0, 0.25, 0, priority = {0,0}},
-			[16] = {0, 0.25, 0, priority = {0,0}},
-			[0] = {0, 0.25, 0, priority = {0,0}},
-			[20] = {0, 0, 0},
-			[21] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[22] = {0, 0.25, 0, priority = {0,0}},
-			[23] = {0, 0.25, 0, priority = {0,0}},
-			[24] = {0.25, 0.25, 0.125, ratio = 1}, priority = {1,-3},-- 空け priority = 二段階
-			[25] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[26] = {0, 0, 0},
-			[27] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
-			[28] = {0, 0.25, 0, priority = {0,0}},
-			[29] = {0, 0, 0},
-			[30] = {0, 0.25, 0, priority = {0,0}},
-		}
-	},
-	]]
-
-	[90] = { -- 行頭
-		chars = {'parbdd','boxbdd'},
-		glue = {
-			[1] = {0, 0, 0}, -- 行頭括弧はベタ組
-		},
-	},
-}
-
-for k,v in pairs(jfm) do
-	if type(k) == "number" then
-		for kk,vv in pairs(v.glue) do
-			vv.kanjiskip_natural = 1
-			vv.kanjiskip_stretch = 1
-		end
-	end
-end
-
-local function add_space(before,after,glueorkern,space,ratio)
-	if jfm[before][glueorkern] == nil then jfm[before][glueorkern] = {} end
-	if jfm[before][glueorkern][after] == nil then jfm[before][glueorkern][after] = {0} end
-	local origratio = jfm[before][glueorkern][after].ratio
-	if origratio == nil then origratio = 0.5 end
-	jfm[before][glueorkern][after].ratio = (jfm[before][glueorkern][after][1] * origratio + space * ratio) /  (jfm[before][glueorkern][after][1] + ratio)
-	jfm[before][glueorkern][after][1] = jfm[before][glueorkern][after][1] + space
-end
-
-if jlreq ~= nil then
-	if type(jlreq.open_bracket_pos) == "string" then
-		local r = jlreq.open_bracket_pos:find("_")
-		local danraku = jlreq.open_bracket_pos:sub(1,r - 1)
-		local orikaeshi = jlreq.open_bracket_pos:sub(r + 1)
-
-		-- 折り返し行頭の開き括弧を二分下げる……つもり
-		if orikaeshi == "nibu" then
-			-- widthを二分増やし,その代わりJFMグルーを二分減らす
-			jfm[1].width = jfm[1].width + 0.5
-			for k,v in pairs(jfm) do
-				if type(k) == "number" then
-					add_space(k,1,"glue",-0.5,1)
-				end
-			end
-		end
-
-		-- 段落行頭の下げ
-		if danraku == "zenkakunibu" then
-			add_space(90,1,"glue",0.5,1)
-		elseif danraku == "nibu" then
-			add_space(90,1,"glue",-0.5,1)
-		end
-	end
-
-	-- ぶら下げ組を有効にする.
-	if jlreq.burasage == true then
-		for _,class in ipairs({6,7}) do
-			table.insert(jfm[class].end_adjust,-0.5)
-		end
-	end
-end
-
-
-luatexja.jfont.define_jfm(jfm)
+--[[
+3.1.3
+3.1.6.a
+]]
+
+--[[
+優先順位は,第n段階を3 - nに対応させる.
+  段階   1, 2, 3, 4, 5, 6
+priority 2, 1, 0,-1,-2,-3
+xkanjiskipは{1,-3},kanjiskip={0,0}
+\ltjsetparameter{stretch_priority={kanjiskip=1,xkanjiskip=-3}}
+\ltjsetparameter{stretch_priority={kanjiskip=0,xkanjiskip=0}}
+]]
+
+local hyphen_glue = {
+	[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
+	[2] = {0, 0, 0},
+	[300] = {0, 0, 0},
+	[301] = {0, 0, 0},
+	[302] = {0, 0, 0},
+	[4] = {0, 0, 0},
+	[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+	[6] = {0, 0, 0},
+	[7] = {0, 0, 0},
+	[8] = {0, 0, 0},
+	[9] = {0, 0, 0},
+	[10] = {0, 0, 0},
+	[11] = {0, 0, 0},
+	[12] = {0, 0, 0},
+	[13] = {0, 0, 0},
+	[14] = {0, 0, 0},
+	[15] = {0, 0, 0},
+	[16] = {0, 0, 0},
+	[0] = {0, 0, 0},
+--[[
+	[20] = {0, 0, 0},
+	[21] = {0, 0, 0},
+	[22] = {0, 0, 0},
+	[23] = {0, 0, 0},
+	[24] = {0, 0, 0},
+	[25] = {0, 0, 0},
+	[26] = {0, 0, 0},
+	[27] = {0, 0, 0},
+	[28] = {0, 0, 0},
+	[29] = {0, 0, 0},
+	[30] = {0, 0, 0},
+]]
+}
+
+
+
+local jfm = {
+	dir = 'yoko',
+	zw = 1.0,
+	zh = 1.0,
+	version = 2,
+	-- 文字クラス4,9,10,11,15,16,19との間は(x)kanjiskipで調整する.
+	kanjiskip = {0, 0.25, 0},
+	xkanjiskip = {0.25, 0.25, 0.125},
+	
+	-- alignは適当
+	[1] = { -- 初め括弧類
+		chars = {'(', '〔', '[', '{', '〈', '《', '「', '『', '【', '⦅', '〘', '〖', '«', '〝',
+			'‘', '“'},
+		width = 0.5,height = 0.88,depth = 0.12,
+		align = 'right',
+		glue = {
+			[1] = {0, 0, 0},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0, 0},
+			[9] = {0, 0, 0},
+			[10] = {0, 0, 0},
+			[11] = {0, 0, 0},
+			[12] = {0, 0, 0},
+			[13] = {0, 0, 0},
+			[14] = {0, 0, 0},
+			[15] = {0, 0, 0},
+			[16] = {0, 0, 0},
+			[0] = {0, 0, 0},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0, 0, 0},
+			[22] = {0, 0, 0},
+			[23] = {0, 0, 0},
+			[24] = {0, 0, 0},
+			[25] = {0, 0, 0},
+			[26] = {0, 0, 0},
+			[27] = {0, 0, 0},
+			[28] = {0, 0, 0},
+			[29] = {0, 0, 0},
+			[30] = {0, 0, 0},
+			-- [22][23] 注1
+		]]
+		},
+	},
+	
+	[2] = { -- 終わり括弧類
+		chars = { ')', '〕', ']', '}', '〉', '》', '」', '』', '】', '⦆', '〙', '〗', '»', '〟',
+			 '’', '”'},
+		width = 0.5,height = 0.88,depth = 0.12,
+		align = 'left',
+		glue = {
+			[1] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[301] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[302] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[4] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[9] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[10] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[11] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[12] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[13] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[14] = {0, 0, 0},
+			[15] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[16] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[0] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[22] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[23] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[24] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[25] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[26] = {0.5, 0, 0, ratio = 0, priority = {0,-2}},
+			[27] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[28] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[29] = {0, 0, 0},
+			[30] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+		]]
+		},
+		end_adjust = {0.5,0},
+	},
+	
+	-- [3*]はハイフン類.幅が違うので分ける.
+	[300] = {
+		chars = {'‐'},
+		width = 0.25,height = 0.88,depth = 0.12,
+		align = 'middle',
+		glue = hyphen_glue,-- 上の方で定義
+	},
+	
+	[301] = {
+		chars = {'゠', '–'},
+		width = 0.5,height = 0.88,depth = 0.12,
+		align = 'middle',
+		glue = hyphen_glue,
+	},
+
+	[302] = {
+		chars = {'〜'},
+		width = 1,height = 0.88,depth = 0.12,
+		align = 'middle',
+		glue = hyphen_glue,
+	},
+
+	[4] = { -- 区切り約物
+		chars = {'!', '?', '‼', '⁇', '⁈', '⁉'},
+		width = 1,height = 0.88,depth = 0.12,
+		align = 'middle',
+		glue = {
+			[1] = {0.5, 0.5, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0, 0},
+			[9] = {0, 0, 0},
+			[10] = {0, 0, 0},
+			[11] = {0, 0, 0},
+			[12] = {0, 0, 0},
+			[13] = {0, 0, 0},
+			[14] = {0, 0, 0},
+			[15] = {0, 0, 0},
+			[16] = {0, 0, 0},
+--			[0] = {0, 0, 0},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空けpriority = {0,-1}段階
+			[22] = {0, 0, 0},
+			[23] = {0, 0, 0},
+			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空けpriority = {0,-1}段階
+			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空けpriority = {0,-1}段階
+			[26] = {0, 0, 0},
+		]]
+			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空けpriority = {0,-1}段階
+		--[[
+			[28] = {0, 0, 0},
+			[29] = {0, 0, 0},
+			[30] = {0, 0, 0},
+		]]
+		},
+	},
+	
+	[5] = { -- 中点類
+		chars = {'・', ':', 
+			';'
+		},
+		width = 0.5,height = 0.88,depth = 0.12,
+		align = 'middle',
+		glue = {
+			[1] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[2] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[300] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[301] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[302] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[4] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[5] = {0.5, 0, 0.5, ratio = 0.5, priority = {0,-1}},
+			[6] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[7] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[8] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[9] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[10] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[11] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[12] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[13] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[14] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[15] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[16] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[0] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+		--[[
+			[20] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[21] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[22] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[23] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[24] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[25] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[26] = {0.25, 0, 0, ratio = 0, priority = {0,-1}},
+		]]
+			[27] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+		--[[
+			[28] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[29] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+			[30] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
+		]]
+		},
+		end_adjust = {0.25,0}, -- 0.25 -> 0は詰め,優先順位は第三段階
+	},
+	
+	[6] = { -- 句点類
+		chars = {'。', 
+			'.'}, -- 縦書きでは使わない
+		width = 0.5,height = 0.88,depth = 0.12,
+		align = 'left',
+		glue = {
+			[1] = {0.5, 0, 0, ratio = 0},
+			[2] = {0, 0, 0},
+			[300] = {0.5, 0, 0, ratio = 0},
+			[301] = {0.5, 0, 0, ratio = 0},
+			[302] = {0.5, 0, 0, ratio = 0},
+			[4] = {0.5, 0, 0, ratio = 0},
+			[5] = {0.75, 0, 0.25, ratio = 0.33333333, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0.5, 0, 0, ratio = 0},
+			[9] = {0.5, 0, 0, ratio = 0},
+			[10] = {0.5, 0, 0, ratio = 0},
+			[11] = {0.5, 0, 0, ratio = 0},
+			[12] = {0.5, 0, 0, ratio = 0},
+			[13] = {0.5, 0, 0, ratio = 0},
+			[14] = {0.5, 0, 0, ratio = 0},
+			[15] = {0.5, 0, 0, ratio = 0},
+			[16] = {0.5, 0, 0, ratio = 0},
+			[0] = {0.5, 0, 0, ratio = 0},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0.5, 0, 0, ratio = 0},
+			[22] = {0.5, 0, 0, ratio = 0},
+			[23] = {0.5, 0, 0, ratio = 0},
+			[24] = {0.5, 0, 0, ratio = 0},
+			[25] = {0.5, 0, 0, ratio = 0},
+			[26] = {0.5, 0, 0, ratio = 0},
+		]]
+			[27] = {0.5, 0, 0, ratio = 0},
+		--[[
+			[28] = {0.5, 0, 0, ratio = 0},
+			[29] = {0.5, 0, 0, ratio = 0},
+			[30] = {0.5, 0, 0, ratio = 0},
+		]]
+		},
+		end_adjust = {0.5, 0},
+	},
+	
+	[7] = { -- 読点類
+		chars = {'、', 
+			','}, -- 縦書きでは使わない
+		width = 0.5,height = 0.88,depth = 0.12,
+		align = 'left',
+		glue = {
+			[1] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[301] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[302] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[4] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[5] = {0.75, 0, 0.75, ratio = 0.33333333, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[9] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[10] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[11] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[12] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[13] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[14] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[15] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[16] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[0] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[22] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[23] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[24] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[25] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[26] = {0.5, 0, 0, ratio = 0, priority = {0,-2}},
+		]]
+			[27] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+		--[[
+			[28] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[29] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+			[30] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
+		]]
+		},
+		end_adjust = {0.5, 0},
+	},
+	
+	[8] = { -- 分離禁止文字
+		chars = {'—', '…', '‥', '〳', '〴', '〵'},
+		width = 1,height = 0.88,depth = 0.12,
+		align = 'middle',
+		glue = {
+			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0, 0},
+			[9] = {0, 0.25, 0, priority = {0,0}},
+			[10] = {0, 0.25, 0, priority = {0,0}},
+			[11] = {0, 0.25, 0, priority = {0,0}},
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},
+			[14] = {0, 0, 0},
+			[15] = {0, 0.25, 0, priority = {0,0}},
+			[16] = {0, 0.25, 0, priority = {0,0}},
+			[0] = {0, 0.25, 0, priority = {0,0}},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0, 0.25, 0, priority = {0,0}},
+			[22] = {0, 0.25, 0, priority = {0,0}},
+			[23] = {0, 0.25, 0, priority = {0,0}},
+			[24] = {0, 0, 0},
+			[25] = {0, 0, 0},
+			[26] = {0, 0, 0},
+		]]
+			[27] = {0, 0.25, 0, priority = {0,0}},
+		--[[
+			[28] = {0, 0.25, 0, priority = {0,0}},
+			[29] = {0, 0, 0},
+			[30] = {0, 0.25, 0, priority = {0,0}},
+		]]
+		},
+	},
+	
+	[9] = { -- 繰返し記号
+		chars = {'ヽ', 'ヾ', 'ゝ', 'ゞ', '々', '〻'},
+		height = 0.88,depth = 0.12,
+		align = 'middle',
+		glue = {
+			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0, 0},
+			[9] = {0, 0.25, 0, priority = {0,0}},
+			[10] = {0, 0.25, 0, priority = {0,0}},
+			[11] = {0, 0.25, 0, priority = {0,0}},
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},
+			[14] = {0, 0, 0},
+			[15] = {0, 0.25, 0, priority = {0,0}},
+			[16] = {0, 0.25, 0, priority = {0,0}},
+--			[0] = {0, 0.25, 0, priority = {0,0}},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+			[22] = {0, 0.25, 0, priority = {0,0}},
+			[23] = {0, 0.25, 0, priority = {0,0}},
+			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+			[26] = {0, 0, 0},
+		]]
+			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+		--[[
+			[28] = {0, 0.25, 0, priority = {0,0}},
+			[29] = {0, 0, 0},
+			[30] = {0, 0.25, 0, priority = {0,0}},
+		]]
+		},
+	},
+
+	[10] = { -- 長音記号
+		chars = {'ー'},
+		height = 0.88,depth = 0.12,
+		align = 'middle',
+		glue = {
+			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0, 0},
+			[9] = {0, 0.25, 0, priority = {0,0}},
+			[10] = {0, 0.25, 0, priority = {0,0}},
+			[11] = {0, 0.25, 0, priority = {0,0}},
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},
+			[14] = {0, 0, 0},
+			[15] = {0, 0.25, 0, priority = {0,0}},
+			[16] = {0, 0.25, 0, priority = {0,0}},
+--			[0] = {0, 0.25, 0, priority = {0,0}},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+			[22] = {0, 0.25, 0, priority = {0,0}},
+			[23] = {0, 0.25, 0, priority = {0,0}},
+			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+			[26] = {0, 0, 0},
+		]]
+			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+		--[[
+			[28] = {0, 0.25, 0, priority = {0,0}},
+			[29] = {0, 0, 0},
+			[30] = {0, 0.25, 0, priority = {0,0}},
+		]]
+		},
+	},
+	
+	[11] = { -- 小書きの仮名
+		chars = {'ぁ', 'ぃ', 'ぅ', 'ぇ', 'ぉ', 'ァ', 'ィ', 'ゥ', 'ェ', 'ォ', 'っ', 'ゃ', 'ゅ', 'ょ', 'ゎ', 'ゕ', 'ゖ', 'ッ', 'ャ', 'ュ', 'ョ', 'ヮ', 'ヵ', 'ヶ', 'ㇰ', 'ㇱ', 'ㇲ', 'ㇳ', 'ㇴ', 'ㇵ', 'ㇶ', 'ㇷ', 'ㇸ', 'ㇹ', 'ㇺ', 'ㇻ', 'ㇼ', 'ㇽ', 'ㇾ', 'ㇿ', 'ㇷ゚'},
+		height = 0.88,depth = 0.12,
+		align = 'middle',
+		glue = {
+			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0, 0},
+			[9] = {0, 0.25, 0, priority = {0,0}},
+			[10] = {0, 0.25, 0, priority = {0,0}},
+			[11] = {0, 0.25, 0, priority = {0,0}},
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},
+			[14] = {0, 0, 0},
+			[15] = {0, 0.25, 0, priority = {0,0}},
+			[16] = {0, 0.25, 0, priority = {0,0}},
+--			[0] = {0, 0.25, 0, priority = {0,0}},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0.25, 0, 0.125, ratio = 0, priority = {1,-3}},
+			[22] = {0, 0.25, 0, priority = {0,0}},
+			[23] = {0, 0.25, 0, priority = {0,0}},
+			[24] = {0.25, 0, 0.125, ratio = 0, priority = {1,-3}},
+			[25] = {0.25, 0, 0.125, ratio = 0, priority = {1,-3}},
+			[26] = {0, 0, 0},
+		]]
+			[27] = {0.25, 0, 0.125, ratio = 0, priority = {1,-3}},
+		--[[
+			[28] = {0, 0.25, 0, priority = {0,0}},
+			[29] = {0, 0, 0},
+			[30] = {0, 0.25, 0, priority = {0,0}},
+		]]
+		},
+	},
+	
+	[12] = { -- 前置省略記号
+		chars = {'¥', '$', '£', '#', '€', '№'},
+		height = 0.88,depth = 0.12,
+		align = 'middle',
+		glue = {
+			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0.25, 0, priority = {0,0}},
+			[9] = {0, 0.25, 0, priority = {0,0}},
+			[10] = {0, 0.25, 0, priority = {0,0}},
+			[11] = {0, 0.25, 0, priority = {0,0}},
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},
+			[14] = {0, 0, 0},
+			[15] = {0, 0.25, 0, priority = {0,0}},
+			[16] = {0, 0.25, 0, priority = {0,0}},
+			[0] = {0, 0.25, 0, priority = {0,0}},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0, 0.25, 0, priority = {0,0}},
+			[22] = {0, 0.25, 0, priority = {0,0}},
+			[23] = {0, 0.25, 0, priority = {0,0}},
+			[24] = {0, 0, 0},
+			[25] = {0, 0.25, 0, priority = {0,0}},
+			[26] = {0, 0, 0},
+		]]
+			[27] = {0, 0.25, 0, priority = {0,0}},
+		--[[
+			[28] = {0, 0.25, 0, priority = {0,0}},
+			[29] = {0, 0, 0},
+			[30] = {0, 0.25, 0, priority = {0,0}},
+		]]
+		},
+	},
+	
+	[13] = { -- 後置省略記号
+		chars = {'°', '′', '″', '℃', '¢', '%', '‰', '㏋', 'ℓ', '㌃', '㌍', '㌔', '㌘', '㌢', '㌣', '㌦', '㌧', '㌫', '㌶', '㌻', '㍉', '㍊', '㍍', '㍑', '㍗', '㎎', '㎏', '㎜', '㎝', '㎞', '㎡', '㏄'},
+		height = 0.88,depth = 0.12,
+		align = 'middle',
+		glue = {
+			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0.25, 0, priority = {0,0}},
+			[9] = {0, 0.25, 0, priority = {0,0}},
+			[10] = {0, 0.25, 0, priority = {0,0}},
+			[11] = {0, 0.25, 0, priority = {0,0}},
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},
+			[14] = {0, 0, 0},
+			[15] = {0, 0.25, 0, priority = {0,0}},
+			[16] = {0, 0.25, 0, priority = {0,0}},
+			[0] = {0, 0.25, 0, priority = {0,0}},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0, 0.25, 0, priority = {0,0}},
+			[22] = {0, 0.25, 0, priority = {0,0}},
+			[23] = {0, 0.25, 0, priority = {0,0}},
+			[24] = {0, 0.25, 0, priority = {0,0}},
+			[25] = {0, 0.25, 0, priority = {0,0}},
+			[26] = {0, 0, 0},
+		]]
+			[27] = {0, 0.25, 0, priority = {0,0}},
+		--[[
+			[28] = {0, 0.25, 0, priority = {0,0}},
+			[29] = {0, 0, 0},
+			[30] = {0, 0.25, 0, priority = {0,0}},
+		]]
+		},
+	},
+	
+	[14] = { -- 和字間隔
+		chars = {' '},
+		align = 'middle',
+		width= 1,height = 0.88,depth = 0.12,
+		glue = {
+			[1] = {0, 0, 0},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0, 0},
+			[9] = {0, 0, 0},
+			[10] = {0, 0, 0},
+			[11] = {0, 0, 0},
+			[12] = {0, 0, 0},
+			[13] = {0, 0, 0},
+			[14] = {0, 0, 0},
+			[15] = {0, 0, 0},
+			[16] = {0, 0, 0},
+			[0] = {0, 0, 0},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0, 0, 0},
+			[22] = {0, 0, 0},
+			[23] = {0, 0, 0},
+			[24] = {0, 0, 0},
+			[25] = {0, 0, 0},
+			[26] = {0, 0, 0},
+		]]
+			[27] = {0, 0, 0},
+		--[[
+			[28] = {0, 0, 0},
+			[29] = {0, 0, 0},
+			[30] = {0, 0, 0},
+		]]
+		},
+	},
+	
+	[15] = { -- 平仮名
+		chars = {'あ', 'い', 'う', 'え', 'お', 'か', 'が', 'き', 'ぎ', 'く', 'ぐ', 'け', 'げ', 'こ', 'ご', 'さ', 'ざ', 'し', 'じ', 'す', 'ず', 'せ', 'ぜ', 'そ', 'ぞ', 'た', 'だ', 'ち', 'ぢ', 'つ', 'づ', 'て', 'で', 'と', 'ど', 'な', 'に', 'ぬ', 'ね', 'の', 'は', 'ば', 'ぱ', 'ひ', 'び', 'ぴ', 'ふ', 'ぶ', 'ぷ', 'へ', 'べ', 'ぺ', 'ほ', 'ぼ', 'ぽ', 'ま', 'み', 'む', 'め', 'も', 'や', 'ゆ', 'よ', 'ら', 'り', 'る', 'れ', 'ろ', 'わ', 'ゐ', 'ゑ', 'を', 'ん', 'ゔ', 'か゚', 'き゚', 'く゚', 'け゚', 'こ゚'},
+		height = 0.88,depth = 0.12,
+		align = 'middle',
+		glue = {
+			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0.25, 0, priority = {0,0}},
+			[9] = {0, 0.25, 0, priority = {0,0}},
+			[10] = {0, 0.25, 0, priority = {0,0}},
+			[11] = {0, 0.25, 0, priority = {0,0}},
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},
+			[14] = {0, 0, 0},
+			[15] = {0, 0.25, 0, priority = {0,0}},
+			[16] = {0, 0.25, 0, priority = {0,0}},
+--			[0] = {0, 0.25, 0, priority = {0,0}},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+			[22] = {0, 0.25, 0, priority = {0,0}},
+			[23] = {0, 0.25, 0, priority = {0,0}},
+			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+			[26] = {0, 0, 0},
+		]]
+			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+		--[[
+			[28] = {0, 0.25, 0, priority = {0,0}},
+			[29] = {0, 0, 0},
+			[30] = {0, 0.25, 0, priority = {0,0}},
+		]]
+		},
+	},
+	
+	[16] = { -- 片仮名
+		chars = {'ア', 'イ', 'ウ', 'エ', 'オ', 'カ', 'ガ', 'キ', 'ギ', 'ク', 'グ', 'ケ', 'ゲ', 'コ', 'ゴ', 'サ', 'ザ', 'シ', 'ジ', 'ス', 'ズ', 'セ', 'ゼ', 'ソ', 'ゾ', 'タ', 'ダ', 'チ', 'ヂ', 'ツ', 'ヅ', 'テ', 'デ', 'ト', 'ド', 'ナ', 'ニ', 'ヌ', 'ネ', 'ノ', 'ハ', 'バ', 'パ', 'ヒ', 'ビ', 'ピ', 'フ', 'ブ', 'プ', 'ヘ', 'ベ', 'ペ', 'ホ', 'ボ', 'ポ', 'マ', 'ミ', 'ム', 'メ', 'モ', 'ヤ', 'ユ', 'ヨ', 'ラ', 'リ', 'ル', 'レ', 'ロ', 'ワ', 'ヰ', 'ヱ', 'ヲ', 'ン', 'ヴ', 'ヷ', 'ヸ', 'ヹ', 'ヺ', 'カ゚', 'キ゚', 'ク゚', 'ケ゚', 'コ゚', 'セ゚', 'ツ゚', 'ト゚'},
+		height = 0.88,depth = 0.12,
+		align = 'middle',
+		glue = {
+			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0.25, 0, priority = {0,0}},
+			[9] = {0, 0.25, 0, priority = {0,0}},
+			[10] = {0, 0.25, 0, priority = {0,0}},
+			[11] = {0, 0.25, 0, priority = {0,0}},
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},
+			[14] = {0, 0, 0},
+			[15] = {0, 0.25, 0, priority = {0,0}},
+			[16] = {0, 0.25, 0, priority = {0,0}},
+--			[0] = {0, 0.25, 0, priority = {0,0}},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+			[22] = {0, 0.25, 0, priority = {0,0}},
+			[23] = {0, 0.25, 0, priority = {0,0}},
+			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+			[26] = {0, 0, 0},
+		]]
+			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+		--[[
+			[28] = {0, 0.25, 0, priority = {0,0}},
+			[29] = {0, 0, 0},
+			[30] = {0, 0.25, 0, priority = {0,0}},
+		]]
+		},
+	},
+	
+	--[[
+	[17] = { -- 等号類
+		chars = {'=', '≠', '≒', '≃', '≅', '≈', '≡', '≢', '<', '>', '≦', '≧', '≪', '≫', '≶', '≷', '⋚', '⋛', '∧', '∨', '⌅', '⌆', '⊂', '⊃', '⊄', '⊅', '⊆', '⊇', '⊊', '⊋', '∈', '∋', '∉', '∪', '∩', '∥', '∦', '⇒', '⇔', '↔', '∽', '∝', '⊥', '⊕', '⊗'},
+		align = 'middle',
+		width = 1,
+	},
+	
+	[18] = { -- 演算記号
+		chars = {'+', '-', '×', '÷', '±', '∓'},
+		align = 'middle',
+		width = 1,
+	},
+	]]
+	
+	-- [19] -- 漢字等:「その他の和文」として[0]で扱う
+	[0] = { -- = [19]
+		left = 0,
+		align = 'middle',
+		width = 1,height = 0.88,depth = 0.12,
+		glue = {
+			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0.25, 0, priority = {0,0}},
+--			[9] = {0, 0.25, 0, priority = {0,0}},
+--			[10] = {0, 0.25, 0, priority = {0,0}},
+--			[11] = {0, 0.25, 0, priority = {0,0}},
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},
+			[14] = {0, 0, 0},
+--			[15] = {0, 0.25, 0, priority = {0,0}},
+--			[16] = {0, 0.25, 0, priority = {0,0}},
+--			[0] = {0, 0.25, 0, priority = {0,0}},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+			[22] = {0, 0.25, 0, priority = {0,0}},
+			[23] = {0, 0.25, 0, priority = {0,0}},
+			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+			[26] = {0, 0, 0},
+		]]
+			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
+		--[[
+			[28] = {0, 0.25, 0, priority = {0,0}},
+			[29] = {0, 0, 0},
+			[30] = {0, 0.25, 0, priority = {0,0}},
+		]]
+		},
+	},
+
+	
+	--[[
+	[20] = { -- 合印中の文字
+		glue = {
+			[1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0.25, 0, priority = {0,0}},
+			[9] = {0, 0.25, 0, priority = {0,0}},
+			[10] = {0, 0.25, 0, priority = {0,0}},
+			[11] = {0, 0.25, 0, priority = {0,0}},
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},
+			[14] = {0, 0, 0},
+			[15] = {0, 0.25, 0, priority = {0,0}},
+			[16] = {0, 0.25, 0, priority = {0,0}},
+			[0] = {0, 0.25, 0, priority = {0,0}},
+			[20] = {0, 0, 0},
+			[21] = {0, 0.25, 0, priority = {0,0}},
+			[22] = {0, 0.25, 0, priority = {0,0}},
+			[23] = {0, 0.25, 0, priority = {0,0}},
+			[24] = {0, 0.25, 0, priority = {0,0}},
+			[25] = {0, 0.25, 0, priority = {0,0}},
+			[26] = {0, 0, 0},
+			[27] = {0, 0.25, 0, priority = {0,0}},
+			[28] = {0, 0.25, 0, priority = {0,0}},
+			[29] = {0, 0, 0},
+			[30] = {0, 0.25, 0, priority = {0,0}},
+		},
+	},
+	
+	[21] = {-- 親文字群中の文字(添え字付き)
+		glue = {
+			[1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0.25, 0, priority = {0,0}},
+			[9] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
+			[10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
+			[11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},
+			[14] = {0, 0, 0},
+			[15] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
+			[16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
+			[0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
+			[20] = {0, 0, 0},
+			[21] = {0, 0, 0},-- 注9,空け注5
+			[22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
+			[23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
+			[24] = {0, 0.25, 0, priority = {0,0}},
+			[25] = {0, 0.25, 0, priority = {0,0}},
+			[26] = {0, 0, 0},
+			[27] = {0, 0.25, 0, priority = {0,0}},
+			[28] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 三段階,表6と表3が整合的でない
+			[29] = {0, 0, 0},
+			[30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+		},
+	},
+	
+	[22] = { -- 親文字群中の文字(熟語ルビ以外のルビ付き)
+		glue = {
+			[1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0.25, 0, priority = {0,0}},
+			[9] = {0, 0.25, 0, priority = {0,0}},
+			[10] = {0, 0.25, 0, priority = {0,0}},
+			[11] = {0, 0.25, 0, priority = {0,0}},
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},
+			[14] = {0, 0, 0},
+			[15] = {0, 0.25, 0, priority = {0,0}},
+			[16] = {0, 0.25, 0, priority = {0,0}},
+			[0] = {0, 0.25, 0, priority = {0,0}},
+			[20] = {0, 0, 0},
+			[21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
+			[22] = {0, 0.25, 0, priority = {0,0}}, -- 空け注10
+			[23] = {0, 0.25, 0, priority = {0,0}},
+			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
+			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
+			[26] = {0, 0, 0},
+			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
+			[28] = {0, 0.25, 0, priority = {0,0}},
+			[29] = {0, 0, 0},
+			[30] = {0, 0.25, 0, priority = {0,0}},
+		},
+	},
+	
+	[23] = { -- 親文字群中の文字(熟語ルビ付き)
+		glue = {
+			[1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0.25, 0, priority = {0,0}},
+			[9] = {0, 0.25, 0, priority = {0,0}},
+			[10] = {0, 0.25, 0, priority = {0,0}},
+			[11] = {0, 0.25, 0, priority = {0,0}},
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},
+			[14] = {0, 0, 0},
+			[15] = {0, 0.25, 0, priority = {0,0}},
+			[16] = {0, 0.25, 0, priority = {0,0}},
+			[0] = {0, 0.25, 0, priority = {0,0}},
+			[20] = {0, 0, 0},
+			[21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
+			[22] = {0, 0.25, 0, priority = {0,0}},
+			[23] = {0, 0.25, 0, priority = {0,0}},-- 空け注7
+			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
+			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
+			[26] = {0, 0, 0},
+			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
+			[28] = {0, 0.25, 0, priority = {0,0}},
+			[29] = {0, 0, 0},
+			[30] = {0, 0.25, 0, priority = {0,0}},
+		},
+	},
+	
+	[24] = { -- 連数字中の文字
+		chars = {'	', ',', '.', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'},
+		glue = {
+			[1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0.25, 0, priority = {0,0}},
+			[9] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0, 0},-- 空け注8
+			[14] = {0, 0, 0},
+			[15] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[20] = {0, 0, 0},
+			[21] = {0, 0.25, 0, priority = {0,0}},
+			[22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[24] = {0, 0, 0},
+			[25] = {0.25, 0, 0, ratio = 0},
+			[26] = {0, 0, 0},
+			[27] = {0, 0, 0},-- 空け注9
+			[28] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
+			[29] = {0, 0, 0},
+			[30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+		}
+	},
+	
+	[25] = { -- 単位記号中の文字
+		chars = {'	', '(', ')', '/', '1', '2', '3', '4', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'Ω', 'μ', '℧', 'Å', '−', '・'},
+		glue = {
+			[1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},-- 注12
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0.25, 0, priority = {0,0}},
+			[9] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},
+			[14] = {0, 0, 0},
+			[15] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[20] = {0, 0, 0},
+			[21] = {0, 0.25, 0, priority = {0,0}},
+			[22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
+			[25] = {0, 0, 0},
+			[26] = {0, 0, 0},
+			[27] = {0, 0, 0},
+			[28] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
+			[29] = {0, 0, 0},
+			[30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+		}
+	},
+	
+	[26] = { -- 欧文間隔
+		chars = {' '},
+		glue = { -- 表3の方には記述がないのは何故?
+			[1] = {0.5, 0, 0.5, ratio = 1},
+			[2] = {0, 0, 0},
+			[300] = {0, 0, 0},
+			[301] = {0, 0, 0},
+			[302] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0, 0},
+			[9] = {0, 0, 0},
+			[10] = {0, 0, 0},
+			[11] = {0, 0, 0},
+			[12] = {0, 0, 0},
+			[13] = {0, 0, 0},
+			[14] = {0, 0, 0},
+			[15] = {0, 0, 0},
+			[16] = {0, 0, 0},
+			[0] = {0, 0, 0},
+			[21] = {0, 0, 0},
+			[22] = {0, 0, 0},
+			[23] = {0, 0, 0},
+			[24] = {0, 0, 0},
+			[25] = {0, 0, 0},
+			[26] = {0, 0, 0},
+			[27] = {0, 0, 0},
+			[28] = {0, 0, 0},
+			[29] = {0, 0, 0},-- 注13, (空け)注4
+			[30] = {0, 0, 0},
+		}
+	},
+	
+	[27] = {-- 欧文
+		chars = {'jcharbdd'},
+		glue = {
+			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[3] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0.25, 0, priority = {0,0}},
+			[9] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},-- 空け注10
+			[14] = {0, 0, 0},
+			[15] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[20] = {0, 0, 0},
+			[21] = {0, 0.25, 0, priority = {0,0}},
+			[22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[24] = {0, 0, 0},
+			[25] = {0.25, 0, 0.125, ratio = 0, priority = {0,-1}},
+			[26] = {0, 0, 0},
+			[27] = {0, 0, 0},
+			[28] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
+			[29] = {0, 0, 0},
+			[30] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
+		}
+	},
+	
+	[28] = { -- 割注始め括弧類
+		chars = {'(', '〔', '['},
+		glue = {
+			[1] = {0, 0, 0},
+			[2] = {0, 0, 0},
+			[3] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0, 0, 0},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0, 0},
+			[9] = {0, 0, 0},-- 注14
+			[10] = {0, 0, 0},-- 注15
+			[11] = {0, 0, 0},-- 注16
+			[12] = {0, 0, 0},
+			[13] = {0, 0, 0},
+			[14] = {0, 0, 0},
+			[15] = {0, 0, 0},
+			[16] = {0, 0, 0},
+			[0] = {0, 0, 0},
+			[20] = {0, 0, 0},
+			[21] = {0, 0, 0},
+			[22] = {0, 0, 0},
+			[23] = {0, 0, 0},
+			[24] = {0, 0, 0},
+			[25] = {0, 0, 0},
+			[26] = {0, 0, 0}, -- 注13, (空け)注4
+			[27] = {0, 0, 0},
+			[28] = {0, 0, 0},
+			[29] = {0, 0, 0},
+			[30] = {0, 0, 0},
+		}
+	},
+	
+	[29] = { -- 割注終わり括弧類
+		chars = {')', '〕', ']'},
+		glue = {
+			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[3] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0.25, 0, priority = {0,0}},
+			[9] = {0, 0.25, 0, priority = {0,0}},
+			[10] = {0, 0.25, 0, priority = {0,0}},
+			[11] = {0, 0.25, 0, priority = {0,0}},
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},
+			[14] = {0, 0, 0},
+			[15] = {0, 0.25, 0, priority = {0,0}},
+			[16] = {0, 0.25, 0, priority = {0,0}},
+			[0] = {0, 0.25, 0, priority = {0,0}},
+			[20] = {0, 0, 0},
+			[21] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[22] = {0, 0.25, 0, priority = {0,0}},
+			[23] = {0, 0.25, 0, priority = {0,0}},
+			[24] = {0.25, 0.25, 0.125, ratio = 1}, priority = {1,-3},-- 空け priority = 二段階
+			[25] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[26] = {0, 0, 0},
+			[27] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[28] = {0, 0.25, 0, priority = {0,0}},
+			[29] = {0, 0, 0},
+			[30] = {0, 0.25, 0, priority = {0,0}},
+		}
+	},
+	
+	[30] = { -- 縦中横中の文字
+		glue = {
+			[1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
+			[2] = {0, 0, 0},
+			[3] = {0, 0, 0},
+			[4] = {0, 0, 0},
+			[5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
+			[6] = {0, 0, 0},
+			[7] = {0, 0, 0},
+			[8] = {0, 0.25, 0, priority = {0,0}},
+			[9] = {0, 0.25, 0, priority = {0,0}},
+			[10] = {0, 0.25, 0, priority = {0,0}},
+			[11] = {0, 0.25, 0, priority = {0,0}},
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},
+			[14] = {0, 0, 0},
+			[15] = {0, 0.25, 0, priority = {0,0}},
+			[16] = {0, 0.25, 0, priority = {0,0}},
+			[0] = {0, 0.25, 0, priority = {0,0}},
+			[20] = {0, 0, 0},
+			[21] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[22] = {0, 0.25, 0, priority = {0,0}},
+			[23] = {0, 0.25, 0, priority = {0,0}},
+			[24] = {0.25, 0.25, 0.125, ratio = 1}, priority = {1,-3},-- 空け priority = 二段階
+			[25] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[26] = {0, 0, 0},
+			[27] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
+			[28] = {0, 0.25, 0, priority = {0,0}},
+			[29] = {0, 0, 0},
+			[30] = {0, 0.25, 0, priority = {0,0}},
+		}
+	},
+	]]
+
+	[90] = { -- 行頭
+		chars = {'parbdd','boxbdd'},
+		glue = {
+			[1] = {0, 0, 0}, -- 行頭括弧はベタ組
+		},
+	},
+}
+
+for k,v in pairs(jfm) do
+	if type(k) == "number" then
+		for kk,vv in pairs(v.glue) do
+			vv.kanjiskip_natural = 1
+			vv.kanjiskip_stretch = 1
+		end
+	end
+end
+
+local function add_space(before,after,glueorkern,space,ratio)
+	if jfm[before][glueorkern] == nil then jfm[before][glueorkern] = {} end
+	if jfm[before][glueorkern][after] == nil then jfm[before][glueorkern][after] = {0} end
+	local origratio = jfm[before][glueorkern][after].ratio
+	if origratio == nil then origratio = 0.5 end
+	jfm[before][glueorkern][after].ratio = (jfm[before][glueorkern][after][1] * origratio + space * ratio) /  (jfm[before][glueorkern][after][1] + ratio)
+	jfm[before][glueorkern][after][1] = jfm[before][glueorkern][after][1] + space
+end
+
+if jlreq ~= nil then
+	if type(jlreq.open_bracket_pos) == "string" then
+		local r = jlreq.open_bracket_pos:find("_")
+		local danraku = jlreq.open_bracket_pos:sub(1,r - 1)
+		local orikaeshi = jlreq.open_bracket_pos:sub(r + 1)
+
+		-- 折り返し行頭の開き括弧を二分下げる……つもり
+		if orikaeshi == "nibu" then
+			-- widthを二分増やし,その代わりJFMグルーを二分減らす
+			jfm[1].width = jfm[1].width + 0.5
+			for k,v in pairs(jfm) do
+				if type(k) == "number" then
+					add_space(k,1,"glue",-0.5,1)
+				end
+			end
+		end
+
+		-- 段落行頭の下げ
+		if danraku == "zenkakunibu" then
+			add_space(90,1,"glue",0.5,1)
+		elseif danraku == "nibu" then
+			add_space(90,1,"glue",-0.5,1)
+		end
+	end
+
+	-- ぶら下げ組を有効にする.
+	if jlreq.burasage == true then
+		for _,class in ipairs({6,7}) do
+			table.insert(jfm[class].end_adjust,-0.5)
+		end
+	end
+end
+
+
+luatexja.jfont.define_jfm(jfm)



More information about the tex-live-commits mailing list