texlive[45894] Master/texmf-dist: jlreq (23nov17)

commits+karl at tug.org commits+karl at tug.org
Thu Nov 23 22:06:15 CET 2017


Revision: 45894
          http://tug.org/svn/texlive?view=revision&revision=45894
Author:   karl
Date:     2017-11-23 22:06:15 +0100 (Thu, 23 Nov 2017)
Log Message:
-----------
jlreq (23nov17)

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

Modified: trunk/Master/texmf-dist/doc/latex/jlreq/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jlreq/LICENSE	2017-11-23 21:05:53 UTC (rev 45893)
+++ trunk/Master/texmf-dist/doc/latex/jlreq/LICENSE	2017-11-23 21:06:15 UTC (rev 45894)
@@ -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.
+

Modified: trunk/Master/texmf-dist/doc/latex/jlreq/README-ja.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jlreq/README-ja.md	2017-11-23 21:05:53 UTC (rev 45893)
+++ trunk/Master/texmf-dist/doc/latex/jlreq/README-ja.md	2017-11-23 21:06:15 UTC (rev 45894)
@@ -1,288 +1,315 @@
-# 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としてこのコピーを行います.
-
-## 使い方
-通常通り
-```latex
-\documentclass{jlreq}
-```
-とします.これで横書きのarticle相当の文書クラスとなります.エンジンは自動判定されますが,指定する場合はクラスオプションに`platex/uplatex/lualatex`のいずれかを渡してください.縦書きにするには`tate`オプションを渡します.また,reportやbook相当の文書クラスとするには,それぞれ`report`や`book`オプションを渡します.たとえば,縦書きの本を作成するには
-```latex
-\documentclass[tate,book]{jlreq}
-```
-とします.
-
-その他,`oneside / twoside / onecolumn / twocolumn / titlepage / notitlepage / draft / final / openright / openany / leqno / fleqn`というよくあるオプションを受け付けます.
-
-標準的な文書クラスと同じように中身を書くことができますが,次のような命令が追加 / 拡張されています.
-
-### `\jlreqsetup`
-設定用命令です.プリアンブルでしか使えません.文書に対する設定は,クラスオプションとして行うか`\jlreqsetup`を通じて行うかします.どちらで設定するかは設定項目によります.
-
-### `\section`
-`\section*[running head]{見出し文字列}[副題]`というように,通常の書式に加えて副題を受け付けられるように拡張されています.その他,`\part`(articleのみ),`\chapter`(book/reportのみ),`\subsection`,`\subsubsection`も副題を受け付けます.
-
-### `abstract`環境
-プリアンブルにもかけるようになっています.プリアンブルに書かれた場合は,`\maketitle`とともに出力されます.二段組の場合は,段組にならず概要を出力することができます.
-
-### `\sidenote`
-傍注(縦組みの場合は脚注)を出力します.内部では`\marginpar`を使っています.デフォルトでは`\footnote`と同様の書式となりますが,`\jlreqsetup`で`sidenote_type=symbol`が指定されている場合,その書式は`\sidenote{該当項目}{注}`となります.たとえば
-```latex
-刊行できる\sidenote{原稿}{印刷などの方法により……}を入手する仕事である.
-```
-とします.後の説明も参照してください.
-
-傍注の幅が正の時にのみ定義されます.デフォルトの基本版面ではこの幅は0に設定されています.従って`\sidenote`は定義されません.後の基本版面の設定を参考にしてください.
-
-### `\endnote`
-後注を指定します.`\footnote`と同様の書式です.デフォルトでは,注自身の出力は見出し直前に行われます.この動作はクラスオプションにより制御できます.また`\theendnotes`を実行するとその場に出力をします.
-
-### `\warichu`
-割注を出力します.行分割位置などは自動で計算されます.(複数回のコンパイルが必要.)`\warichu*`ではこれらの位置を手動で指定できます.書式は
-```
-\warichu*{(一行目前) & (一行目後)\\ (二行目前) & (二行目後)...}
-```
-です.`&`が省略されている場合は自動で調整されます.
-
-### `\tatechuyoko`
-縦中横を出力します.`\tatechuyoko{<文字列>}`とします.縦書きでない場所で使うとエラーになります.
-
-### `\jafontsize`
-和文フォントサイズを指定する`\fontsize`です.クラスオプションで`jafontscale=0.9`とされている場合,`\fontsize{9pt}{15pt}`とすると和文フォントのサイズは`8.1pt`となりますが,`\jafontsize{9pt}{15pt}`とすると`9pt`となります.(欧文フォントサイズは`10pt`となる.)なお,第二引数は`\fontsize`の第二引数と全く同じです.
-
-### `\ `
-全角空白(U+3000)一文字からなるマクロです.和文間隔を挿入します.LuaLaTeXでは` `のみでも和文間隔を入力できます.
-
-### その他
-* ルビや圏点は提供されません.[PXrubrica](https://github.com/zr-tex8r/PXrubrica)またはluatexja-ruby(LuaLaTeX,LuaTeX-jaパッケージに付属)を使うと良いかと思います.
-* 日本語組版処理の要件2.3.2.dによれば,二段組の最後のページの各段の行数は揃えることが望ましいとされていますが,この処理は行われません.`nidanfloat`パッケージを使い,
-```latex
-\usepackage[balance]{nidanfloat}
-```
-とするとこの処理が行われます.ただし,最終ページでの`\newpage`や`\clearpage`が正しく動作しません.詳しくは`nidanfloat`パッケージのマニュアルをご覧ください.
-
-## 各種設計
-設計はクラスオプションまたは`\jlreqsetup`によりkeyval形式で行います.以下では次の用法を使います.
-
-* `[A/B]`:AまたはBです.`[A/B/C]`等も同様.
-* `<寸法>`:TeXが認識する寸法です.簡単な式(`10pt+10pt`のような)を使うこともできます.また,クラスオプションでは,場合によっては次のような特殊な値を使うこともできます.(これらはpLaTeX / upLaTeXではもとから利用可能ですが,LuaLaTeXでも利用可能なように処理されています.)`\jlreqsetup`内のような場所では,常に`\zw`や`\zh`により全角幅が記述できます.以下,たとえば`Q`が利用可能な場合は`<寸法;Q>`のように記述します.
-    - `Q`:0.25mmと解釈されます.
-    - `zw`, `zh`:全角幅として解釈されます.
-
-
-### 基本版面
-クラスオプションです.
-
-* `paper=[<紙サイズ名>/{<寸法>,<寸法>}]`:紙サイズです.紙サイズ名はa0からa10,b0からb10,c2からc8を指定できます.B列はJIS B列です.また,`{<横>,<縦>}`と直接寸法を指定することもできます.
-* `fontsize=<寸法;Q>`:欧文フォントサイズ.デフォルトは10pt.
-* `jafontsize=<寸法;Q>`:和文フォントサイズ.
-* `jafontscale=<実数値>`:欧文フォントと和文フォントの比(和文 / 欧文).`fontsize`と`jafontsize`が両方指定されている場合は無視される.デフォルトは1.
-* `line_length=<寸法;zw,zh>`:一行の長さ.デフォルトは紙の縦幅の0.75倍.実際の値は一文字の長さの整数倍になるように補正されます.
-* `number_of_lines=<自然数値>`:一ページの行数.デフォルトは紙の横幅の0.75倍になるような値.
-* `gutter=<寸法;zw,zh>`:のどの余白の大きさ.
-    - `tate`無指定時は奇数ページ左,偶数ページ右の余白
-    - `tate`指定時は奇数ページ右,偶数ページ左の余白
-    - `twoside`が指定されていない時は,常に奇数ページ扱いで余白が設定される
-* `head_space=<寸法;zw,zh>`:天の空き量.デフォルトは中央寄せになるような値.
-* `foot_space=<寸法;zw,zh>`:地の空き量.デフォルトは中央寄せになるような値.
-* `baselineskip=<寸法;Q,zw,zh>`:行送り.デフォルトは`jafontsize`の1.7倍.
-* `linegap=<寸法;Q,zw,zh>`:行間.
-* `headfoot_sidemargin=<寸法;zw,zh>`:柱やノンブルの左右の空き.
-* `column_gap=<寸法;zw,zh>`:段間(`twocolumn`指定時のみ).
-* `sidenote_length=<寸法;zw,zh>`:傍注の幅を指定します.
-
-### 組み方
-クラスオプションです.
-* `open_bracket_pos=[zenkaku_tentsuki/zenkakunibu_nibu/nibu_tentsuki]`:始め括弧が行頭に来た際の配置方法を指定します.それぞれ段落開始全角折り返し行頭天付き(デフォルト),段落開始全角二分折り返し行頭二分,段落開始二分折り返し行頭天付きを意味します.
-* `hanging_punctuation`:ぶら下げ組をします.
-
-### 注関係
-`\jlreqsetup`で指定します.
-
-* `reference_mark=[inline/interlinear]`:合印の配置方法を指定します.`inline`にすると該当項目の後ろの行中に配置します.`interlinear`を指定すると該当項目の上(横組)または右(縦組)に配置します.
-* `sidenote_type=[number/symbol]`:傍注と本文との対応の方法を指定します.`number`が規定で,注の位置に通し番号が入り,それにより対応が示されます.`symbol`とすると,注の位置に特定の記号が入り,また注がついている単語が強調されます.
-* `sidenote_symbol=<記号>`:`sidenote_symbol=symbol`の時に,注の位置に入る記号.デフォルト*
-* `sidenote_keyword_font=<命令>`:`sidenote_symbol=symbol`の時に,注のついている単語のフォント指定.デフォルトは無し(強調しない)
-* `endnote_position=[headings/paragraph/{_<見出し名1>,_<見出し名2>,...}]`:後注の出力場所を指定します.`headings`は各見出しの直前(デフォルト),`paragraph`は改段落の際に出力します.また,`endnote_position={_chapter,_section}`とすると,`\chapter`と`\section`の直前に出力します.
-
-### キャプション
-図表のキャプションを`\jlreqsetup`で変更できます.
-* `caption_font=<命令>`:キャプション自身のフォントを指定します.
-* `caption_label_font=<命令>`:キャプションのラベルのフォントを指定します.
-
-### 引用
-`quote / quotation / verse`環境の挙動を`\jlreqsetup`で指定できます.
-* `quote_indent=<寸法>`:字下げを指定します.デフォルトは2zwです.一行の長さが文字サイズの整数倍になるように調整されます.
-* `quote_end_indent=<寸法>`:字上げを指定します.デフォルトは0zwです.
-* `quote_beforeafter_space=<寸法>`:前後の空きを指定します.`quote_beforeafter_space=1\baselineskip`とすると一行あきます.
-* `quote_fontsize=[normalsize/small/footnotesize/scriptsize/tiny]`:フォントサイズを指定します.
-
-### 箇条書き
-`\jlreqsetup`で指定します.
-* `itemization_beforeafter_space=<寸法>`:箇条書きの前後の空きを指定します.
-* `itemization_itemsep=<寸法>`:項目同士の空きを指定します.
-
-### 定理環境
-`\jlreqsetup`で指定します.
-* `theorem_beforeafter_space=<寸法>`:定理環境の前後の空きを指定します.
-
-## 見出し
-見出しの設定は,`\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\vfil {\Huge\bfseries #1#2}}`のようにします.`#1`はラベルに,`#2`は見出し文字列に置き換えられます.
-
-### 別行見出し
-`\DeclareBlockHeading`で作成します.`\<命令名>*[running head]{見出し文字列}[副題]`という書式の命令を作成します.設定は以下の通り.
-
-#### 書式関連
-* `font=<命令>`:見出しのフォントを指定します.
-* `subtitle_font=<命令>`:副題のフォントを指定します.
-* `label_format=<命令>`:ラベルのフォーマットを指定します.`label_format={第\thechapter 章}`などのようにします.
-* `subtitle_format=<命令>`:副題のフォーマットを指定します.`subtitle_format={「#1」}`のようにします.`#1`が副題自身になります.
-
-#### インデント関連
-* `align=[left/center/right]`:見出し位置の横方向の配置場所を指定します.
-* `indent=<寸法>`:見出し全体の字下げ量を指定します.
-* `end_indent=<寸法>`:見出し全体の字上げ量を指定します.
-* `after_label_space=<寸法>`:ラベル後,見出し文字列までの空きを指定します.
-* `second_heading_text_indent=[<寸法>/{<寸法>,<寸法>}]`:見出し文字列の二行目以降のインデントを指定します.一行目の頭を起点として指定しますが,`second_heading_text_indent=*1\zw`のように先頭に`*`をつけるとラベルの頭を起点としての指定になります.(ラベルがない時は一行目の頭が起点.)また,`second_heading_text_indent={<ラベルがある時>,<ラベルがない時>}`という指定をすると,ラベルの有無に応じて値を変更することができます.`<ラベルがある時>`の指定ではやはり`*`を使うことができます.
-* `subtitle_indent=<寸法>`:副題のインデント量を指定します.見出し文字列の一行目を起点として指定します.
-
-#### その他
-* `subtitle_break=[true/false]`:見出し文字列と副題の間を改行するか指定します.
-* `allowbreak_if_evenpage=[true/false]`:見出しが偶数ページにあった場合,その直後の改ページを許可します.
-* `pagebreak=[clearpage/cleardoublepage/clearcolumn/nariyuki]`:見出し直前の改ページを指定します.それぞれ,改ページ,改丁,改段,なりゆきです.
-* `afterindent=[true/false]`:見出し直後の段落の字下げを行うかを指定します.
-* `column_spanning=[true/false]`: 段抜きの見出しにします.pagebreak=clearpageまたはcleardoublepageの時にしか使えません.
-
-#### 行取り
-行取りの指定は以下のいずれかの方法で行うことができます.
-
-* 行数を指定し,その中央に配置する.`lines=<自然数値>`により行数を指定します.`before_lines=<自然数値>`や`after_lines=<自然数値>`により,さらに前後に追加する行数を指定します.たとえば`lines=3,after_lines=1`とすれば,四行の中に配置され,前の空きよりも後ろの空きの方が一行分大きくなります.`before_lines`により指定された空きは,ページ頭には入りませんが,`before_lines=*1`というように`*`を先頭につけると常に入るようになります.
-* 行数と,前後いずれかの空きを指定します.`lines=<自然数値>`により行数を,`before_space=<寸法>`または`after_space=<寸法>`のいずれかの指定によりそれぞれ前または後ろの空きを指定します.
-* 前後の空きを指定します.`before_space=<寸法>`および`after_space=<寸法>`を指定します.
-
-### 同行見出し
-`\DeclareRuninHeading`で作成します.通常の文書クラスにおける`\section`と同様の,`\<命令名>*[running head]{見出し文字列}`という書式の命令が作成されます.設定は以下の通り.
-
-* `font=<命令>`:見出しのフォントを指定します.
-* `indent=<寸法>` 見出し文字列全体の字下げ量を指定します.
-
-### 窓見出し
-`\DeclareCutinHeading`で作成します.`\<命令名>{見出し文字列}`という書式の命令を作成します.設定は以下の通り.
-
-* `font=<命令>`:見出しのフォントを指定します.
-* `indent=<寸法>`:見出し全体の字下げ量を指定します.
-* `after_space=<寸法>`:見出しと本文との間の空きを指定します.
-* `onelinemax=<寸法>`, `twolinemax=<寸法>`:見出し文字列の長さが`onelinemax`以下ならば一行で,`twolinemax`以下ならば二行で窓見出しを出力します.それ以上の場合は三行です.デフォルトはそれぞれ6文字,20文字の長さ.
-
-### `\ModifyHeading`
-既に(上のどれかを使い)定義された見出し命令の設定を変更します.たとえば
-```latex
-\ModifyHeading{section}{lines=10}
-```
-とすると,`\section`のフォントなどの設定はそのままに,行取りのみが10行に変更されます.見出しの種類を変更することはできません.
-
-### `\SaveHeading`
-見出し命令の定義を待避します.
-```latex
-\SaveHeading{section}{\restoresection} % \sectionの中身を\restoresectionに待避.
-\RenewBlockHeading{section}{1}{font=……} % \sectionを新しく定義する.
-……
-\restoresection % \sectionの中身を元に戻す.
-```
-のように使います.
-
-## ページスタイル
-```
-\DeclarePageStyle{<ページスタイル名>}{<設定>}
-```
-によりページスタイルを定義することができます.柱やノンブルを出力します.設定は以下の通り.
-
-* `yoko`:横書きで上下に出力します.デフォルト.
-* `tate`:縦書きで小口側に出力します.
-* `font=<命令>`:柱とノンブルのフォントを指定します.
-* `running_head_position`, `nombre_position`:柱とノンブルの位置を指定します.`yoko`か`tate`のどちらが指定されているかで挙動が変わります.
-    - `yoko`指定時:`top-left`のように指定できます.`top/bottom/center/left/right/gutter/fore_edge`が使えます.`gutter`はのど,`fore_edge`は小口です.`left`,`right`の指定は奇数ページに対するものです.`twoside`が指定されている場合,偶数ページはその逆になります.
-    - `tate`指定時:`<寸法>`が指定できます.`running_head_position`は柱の天からの下げ量を,`nombre_position`はノンブルの地からの上げ量を指定します.
-* `nombre=<書式>`:出力するノンブルを指定します.デフォルトは`\thepage`.
-* `odd_running_head=<書式>`,`even_running_head=<書式>`:それぞれ奇数ページ,偶数ページの柱を指定します.`_section`のように`_`から始まる名前を指定すると,対応する見出しを出力します.(`_section`だと現在の`\section`を出力する.)
-
-`\ModifyPageStyle`により既存のページスタイルを改変することが可能です.
-
-## その他
-* クラスオプション`jlreq_notes`が渡されると,日本語組版処理の記述と矛盾する設定が行われた場合に通知がされます.
-
-## ライセンス
-このパッケージは二条項BSDライセンスの元で配布されています.詳しくは[LICENSE](LICENSE)をご覧ください.
-
-## 履歴
-* 2017-02-08
-    - 最初のバージョン.
-* 2017-02-17
-    - いくつかバグを修正.
-    - クラスオプション/`\jlreqsetup`にいくつかのキーを追加/変更.
-    - `abstract`環境を実装.
-    - パッケージを読み込んでいるだけのはやめた.
-* 2017-03-14
-    - いくつかバグを修正.
-    - 和文ファミリを欧文ファミリに従属させるようにした.
-    - `\DeclareBlockHeading`にオプションをたくさん追加.
-    - quote環境などを調整するオプションを追加.
-* 2017-03-20
-    - バグ修正.
-    - `\footnote / \sidenote / \endnote`の周りに必要ならば空白を挿入するようにした.
-* 2017-04-04
-    - バグ修正.
-    - `\DeclarePageStyle`に`tate`と`font`オプションを追加.
-* 2017-04-29
-    - バグ修正
-    - `jafontsize`と`jafontscale`をクラスオプションに,また`\jafontsize`を追加.
-    - `\tatechuyoko`を追加.
-    - クラスオプション`jlreq_warnings`を`jlreq_notes`に変更.
-    - いくつかのクラスオプションを`\jlreqsetup`に移動.
-    - いくつかのオプションを`\jlreqsetup`に追加.
-    - クラスオプションの`paper={<縦>,<横>}`を`paper={<横>,<縦>}`に変更.
-* 2017-06-11
-    - `plext` / `lltjext`の読み込みを中止.
-    - `\DeclareBlockHeading`に`align`を追加.`indent=center`や`end_indent=center`を廃止.
-    - 一部の`\kcatcode` (upLaTeX時) を変更.
-* 2017-08-13
-    - `column_spanning`を`\DeclareBlockHeading`に追加.
-    - ページレイアウトにおける「本文の長さ」に傍注の長さを入れるようにした.
-    - 傍注の長さのデフォルトを0とした.
-    - 傍注の長さが0の時には`\sidenote`を定義しないようにした.
-    - 和文間隔を挿入する命令を追加.
-* 2017-08-29
-    - 縦書きでも著者名が横書きで出てしまうバグを修正.
-
---------------
-Noriyuki Abe
-https://github.com/abenori/jlreq
+# 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としてこのコピーを行います.
+
+## 使い方
+通常通り
+```latex
+\documentclass{jlreq}
+```
+とします.これで横書きのarticle相当の文書クラスとなります.エンジンは自動判定されますが,指定する場合はクラスオプションに`platex/uplatex/lualatex`のいずれかを渡してください.縦書きにするには`tate`オプションを渡します.また,reportやbook相当の文書クラスとするには,それぞれ`report`や`book`オプションを渡します.たとえば,縦書きの本を作成するには
+```latex
+\documentclass[tate,book]{jlreq}
+```
+とします.
+
+その他,`oneside / twoside / onecolumn / twocolumn / titlepage / notitlepage / draft / final / openright / openany / leqno / fleqn`というよくあるオプションを受け付けます.
+
+標準的な文書クラスと同じように中身を書くことができますが,次のような命令が追加 / 拡張されています.
+
+### `\jlreqsetup`
+設定用命令です.プリアンブルでしか使えません.文書に対する設定は,クラスオプションとして行うか`\jlreqsetup`を通じて行うかします.どちらで設定するかは設定項目によります.
+
+### `\section`
+`\section*[running head]{見出し文字列}[副題]`というように,通常の書式に加えて副題を受け付けられるように拡張されています.その他,`\part`(articleのみ),`\chapter`(book/reportのみ),`\subsection`,`\subsubsection`も副題を受け付けます.
+
+### `abstract`環境
+プリアンブルにもかけるようになっています.プリアンブルに書かれた場合は,`\maketitle`とともに出力されます.二段組の場合は,段組にならず概要を出力することができます.
+
+### `\sidenote`
+この命令は傍注の幅が正の時にのみ定義されます.デフォルトの基本版面ではこの幅は0に設定されています.従って`\sidenote`は定義されません.後の基本版面の設定を参考にしてください.
+
+`\sidenote`は傍注(縦組みの場合は脚注)を出力します.内部では`\marginpar`を使っています.デフォルトでは`\footnote`と同様の書式となりますが,`\jlreqsetup`で`sidenote_type=symbol`が指定されている場合,その書式は`\sidenote{該当項目}{注}`となります.たとえば
+```latex
+刊行できる\sidenote{原稿}{印刷などの方法により……}を入手する仕事である.
+```
+とします.後の説明も参照してください.
+
+
+### `\endnote`
+後注を指定します.`\footnote`と同様の書式です.デフォルトでは,注自身の出力は見出し直前に行われます.この動作は`\jlreqsetup`に`endnote_position`を渡すことで制御できます.詳しくは後の注関係の説明をご覧ください.また`\theendnotes`を実行するとその場に出力をします.
+
+### `\warichu`
+割注を出力します.行分割位置などは自動で計算されます.(複数回のコンパイルが必要.)`\warichu*`ではこれらの位置を手動で指定できます.書式は
+```
+\warichu*{(一行目前) & (一行目後)\\ (二行目前) & (二行目後)...}
+```
+です.`&`が省略されている場合は自動で調整されます.
+
+### `\tatechuyoko`
+縦中横を出力します.`\tatechuyoko{<文字列>}`とします.縦書きでない場所で使うとエラーになります.
+
+### `\jafontsize`
+和文フォントサイズを指定する`\fontsize`です.クラスオプションで`jafontscale=0.9`とされている場合,`\fontsize{9pt}{15pt}`とすると和文フォントのサイズは`8.1pt`となりますが,`\jafontsize{9pt}{15pt}`とすると`9pt`となります.(欧文フォントサイズは`10pt`となる.)なお,第二引数は`\fontsize`の第二引数と全く同じです.
+
+### `\ `
+全角空白(U+3000)一文字からなるマクロです.和文間隔を挿入します.LuaLaTeXでは` `のみでも和文間隔を入力できます.
+
+### その他
+* ルビや圏点は提供されません.[PXrubrica](https://github.com/zr-tex8r/PXrubrica)またはluatexja-ruby(LuaLaTeX,LuaTeX-jaパッケージに付属)を使うと良いかと思います.
+* 日本語組版処理の要件2.3.2.dによれば,二段組の最後のページの各段の行数は揃えることが望ましいとされていますが,この処理は行われません.`nidanfloat`パッケージを使い,
+```latex
+\usepackage[balance]{nidanfloat}
+```
+とするとこの処理が行われます.ただし,最終ページでの`\newpage`や`\clearpage`が正しく動作しません.詳しくは`nidanfloat`パッケージのマニュアルをご覧ください.
+
+## 各種設計
+設計はクラスオプションまたは`\jlreqsetup`によりkeyval形式で行います.以下では次の用法を使います.
+
+* `[A/B]`:AまたはBです.`[A/B/C]`等も同様.
+* `<寸法>`:TeXが認識する寸法です.簡単な式(`10pt+10pt`のような)を使うこともできます.また,クラスオプションでは,場合によっては次のような特殊な値を使うこともできます.(これらはpLaTeX / upLaTeXではもとから利用可能ですが,LuaLaTeXでも利用可能なように処理されています.)`\jlreqsetup`内のような場所では,常に`\zw`や`\zh`により全角幅が記述できます.以下,たとえば`Q`が利用可能な場合は`<寸法;Q>`のように記述します.
+    - `Q`:0.25mmと解釈されます.
+    - `zw`, `zh`:全角幅として解釈されます.
+
+
+### 基本版面
+クラスオプションです.
+
+* `paper=[<紙サイズ名>/{<寸法>,<寸法>}]`:紙サイズです.紙サイズ名はa0からa10,b0からb10,c2からc8を指定できます.B列はJIS B列です.また,`{<横>,<縦>}`と直接寸法を指定することもできます.
+* `fontsize=<寸法;Q>`:欧文フォントサイズ.デフォルトは10pt.
+* `jafontsize=<寸法;Q>`:和文フォントサイズ.
+* `jafontscale=<実数値>`:欧文フォントと和文フォントの比(和文 / 欧文).`fontsize`と`jafontsize`が両方指定されている場合は無視される.デフォルトは1.
+* `line_length=<寸法;zw,zh>`:一行の長さ.デフォルトは字送り方向の紙幅の0.75倍.実際の値は一文字の長さの整数倍になるように補正されます.
+* `number_of_lines=<自然数値>`:一ページの行数.デフォルトは行送り方向の紙幅の0.75倍になるような値.
+* `gutter=<寸法;zw,zh>`:のどの余白の大きさ.
+    - `tate`無指定時は奇数ページ左,偶数ページ右の余白
+    - `tate`指定時は奇数ページ右,偶数ページ左の余白
+    - `twoside`が指定されていない時は,常に奇数ページ扱いで余白が設定される
+* `head_space=<寸法;zw,zh>`:天の空き量.デフォルトは中央寄せになるような値.
+* `foot_space=<寸法;zw,zh>`:地の空き量.デフォルトは中央寄せになるような値.
+* `baselineskip=<寸法;Q,zw,zh>`:行送り.デフォルトは`jafontsize`の1.7倍.
+* `linegap=<寸法;Q,zw,zh>`:行間.
+* `headfoot_sidemargin=<寸法;zw,zh>`:柱やノンブルの左右の空き.
+* `column_gap=<寸法;zw,zh>`:段間(`twocolumn`指定時のみ).
+* `sidenote_length=<寸法;zw,zh>`:傍注の幅を指定します.
+
+### 組み方
+クラスオプションです.
+* `open_bracket_pos=[zenkaku_tentsuki/zenkakunibu_nibu/nibu_tentsuki]`:始め括弧が行頭に来た際の配置方法を指定します.それぞれ段落開始全角折り返し行頭天付き(デフォルト),段落開始全角二分折り返し行頭二分,段落開始二分折り返し行頭天付きを意味します.
+* `hanging_punctuation`:ぶら下げ組をします.
+
+### 注関係
+`\jlreqsetup`で指定します.
+
+* `reference_mark=[inline/interlinear]`:合印の配置方法を指定します.`inline`にすると該当項目の後ろの行中に配置します.`interlinear`を指定すると該当項目の上(横組)または右(縦組)に配置します.
+* `sidenote_type=[number/symbol]`:傍注と本文との対応の方法を指定します.`number`が規定で,注の位置に通し番号が入り,それにより対応が示されます.`symbol`とすると,注の位置に特定の記号が入り,また注がついている単語が強調されます.
+* `sidenote_symbol=<記号>`:`sidenote_symbol=symbol`の時に,注の位置に入る記号.デフォルト*
+* `sidenote_keyword_font=<命令>`:`sidenote_symbol=symbol`の時に,注のついている単語のフォント指定.デフォルトは無し(強調しない)
+* `endnote_position=[headings/paragraph/{_<見出し名1>,_<見出し名2>,...}]`:後注の出力場所を指定します.`headings`は各見出しの直前(デフォルト),`paragraph`は改段落の際に出力します.また,`endnote_position={_chapter,_section}`とすると,`\chapter`と`\section`の直前に出力します.
+
+### キャプション
+図表のキャプションを`\jlreqsetup`で変更できます.
+* `caption_font=<命令>`:キャプション自身のフォントを指定します.
+* `caption_label_font=<命令>`:キャプションのラベルのフォントを指定します.
+
+### 引用
+`quote / quotation / verse`環境の挙動を`\jlreqsetup`で指定できます.
+* `quote_indent=<寸法>`:字下げを指定します.デフォルトは2zwです.一行の長さが文字サイズの整数倍になるように調整されます.
+* `quote_end_indent=<寸法>`:字上げを指定します.デフォルトは0zwです.
+* `quote_beforeafter_space=<寸法>`:前後の空きを指定します.`quote_beforeafter_space=1\baselineskip`とすると一行あきます.
+* `quote_fontsize=[normalsize/small/footnotesize/scriptsize/tiny]`:フォントサイズを指定します.
+
+### 箇条書き
+`\jlreqsetup`で指定します.
+* `itemization_beforeafter_space=<寸法>`:箇条書きの前後の空きを指定します.
+* `itemization_itemsep=<寸法>`:項目同士の空きを指定します.
+
+### 定理環境
+`\jlreqsetup`で指定します.
+* `theorem_beforeafter_space=<寸法>`:定理環境の前後の空きを指定します.
+
+## 見出し
+見出しの設定は,`\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\vfil {\Huge\bfseries #1#2}}`のようにします.`#1`はラベルに,`#2`は見出し文字列に置き換えられます.
+
+### 別行見出し
+`\DeclareBlockHeading`で作成します.`\<命令名>*[running head]{見出し文字列}[副題]`という書式の命令を作成します.設定は以下の通り.
+
+#### 書式関連
+* `font=<命令>`:見出しのフォントを指定します.
+* `subtitle_font=<命令>`:副題のフォントを指定します.
+* `label_format=<命令>`:ラベルのフォーマットを指定します.`label_format={第\thechapter 章}`などのようにします.
+* `subtitle_format=<命令>`:副題のフォーマットを指定します.`subtitle_format={「#1」}`のようにします.`#1`が副題自身になります.
+
+#### インデント関連
+* `align=[left/center/right]`:見出し位置の横方向の配置場所を指定します.
+* `indent=<寸法>`:見出し全体の字下げ量を指定します.
+* `end_indent=<寸法>`:見出し全体の字上げ量を指定します.
+* `after_label_space=<寸法>`:ラベル後,見出し文字列までの空きを指定します.
+* `second_heading_text_indent=[<寸法>/{<寸法>,<寸法>}]`:見出し文字列の二行目以降のインデントを指定します.一行目の頭を起点として指定しますが,`second_heading_text_indent=*1\zw`のように先頭に`*`をつけるとラベルの頭を起点としての指定になります.(ラベルがない時は一行目の頭が起点.)また,`second_heading_text_indent={<ラベルがある時>,<ラベルがない時>}`という指定をすると,ラベルの有無に応じて値を変更することができます.`<ラベルがある時>`の指定ではやはり`*`を使うことができます.
+* `subtitle_indent=<寸法>`:副題のインデント量を指定します.見出し文字列の一行目を起点として指定します.
+
+#### その他
+* `subtitle_break=[true/false]`:見出し文字列と副題の間を改行するか指定します.
+* `allowbreak_if_evenpage=[true/false]`:見出しが偶数ページにあった場合,その直後の改ページを許可します.
+* `pagebreak=[clearpage/cleardoublepage/clearcolumn/nariyuki]`:見出し直前の改ページを指定します.それぞれ,改ページ,改丁,改段,なりゆきです.
+* `afterindent=[true/false]`:見出し直後の段落の字下げを行うかを指定します.
+* `column_spanning=[true/false]`: 段抜きの見出しにします.pagebreak=clearpageまたはcleardoublepageの時にしか使えません.
+
+#### 行取り
+行取りの指定は以下のいずれかの方法で行うことができます.
+
+* 行数を指定し,その中央に配置します.`lines=<自然数値>`により行数を指定します.`before_lines=<自然数値>`や`after_lines=<自然数値>`により,さらに前後に追加する行数を指定します.たとえば`lines=3,after_lines=1`とすれば,四行の中に配置され,前の空きよりも後ろの空きの方が一行分大きくなります.`before_lines`により指定された空きはページ頭には入りませんが,`before_lines=*1`というように`*`を先頭につけると常に入るようになります.
+* 行数と,前後いずれかの空きを指定します.`lines=<自然数値>`により行数を,`before_space=<寸法>`または`after_space=<寸法>`のいずれかの指定によりそれぞれ前または後ろの空きを指定します.
+* 前後の空きを指定します.`before_space=<寸法>`および`after_space=<寸法>`を指定します.
+
+#### 連続して掲げる見出しの行取り
+``\SetBlockHeadingSpaces``により,見出しが連続して掲げられたときの行取りを設定することができます.``\SetBlockHeadingSpaces``は
+
+```latex
+\SetBlockHeadingSpaces{
+  {_part{lines=3,before_lines=1},_section{lines=2},_subsection{lines=2}}
+  [lines=5]{_section,23pt,_subsection,16pt}
+}
+```
+
+のように使います.
+
+* 各々の``{}``内には``_<見出し命令名>``か``<寸法>``をカンマ区切りで並べます.
+* 先頭に``[]``で囲まれた設定を追加できます.これは連続して掲げられた見出し全体への設定となります.``lines / before_lines / after_lines / before_space / after_space``が利用可能です.各々の意味は上述の行取り指定と同じです.
+* 寸法はそのまま空き量を表します.
+* ``_<見出し命令名>``の後に``{}``で囲まれた設定を追加することで,その見出しの空き量を設定します.設定しない場合は前後に空きが入りません.
+* 見出しに対する``{}``で囲まれた設定内では,``lines / before_lines / after_lines / before_space / after_space``が利用可能です.各々の意味は上述の行取り指定と同じです.
+* ``{}``で囲まれた部分を``*``のみにすると(例えば``_section{*}``とすると)単独で掲げた場合と同じ設定を使います.
+
+なお,見出しが連続しているかは単純に別行見出しの命令が並んで書かれているかのみで判断します.従ってそれらの命令間に出力には関係しないような命令が挟まっていたとしても,見出しが連続して掲げられているとは判断されません.ただし,見出し命令の間に空白または`\label`のみが挟まれている場合は,見出しが連続していると判断されます.
+
+### 同行見出し
+`\DeclareRuninHeading`で作成します.通常の文書クラスにおける`\section`と同様の,`\<命令名>*[running head]{見出し文字列}`という書式の命令が作成されます.設定は以下の通り.
+
+* `font=<命令>`:見出しのフォントを指定します.
+* `indent=<寸法>` 見出し文字列全体の字下げ量を指定します.
+
+### 窓見出し
+`\DeclareCutinHeading`で作成します.`\<命令名>{見出し文字列}`という書式の命令を作成します.設定は以下の通り.
+
+* `font=<命令>`:見出しのフォントを指定します.
+* `indent=<寸法>`:見出し全体の字下げ量を指定します.
+* `after_space=<寸法>`:見出しと本文との間の空きを指定します.
+* `onelinemax=<寸法>`, `twolinemax=<寸法>`:見出し文字列の長さが`onelinemax`以下ならば一行で,`twolinemax`以下ならば二行で窓見出しを出力します.それ以上の場合は三行です.デフォルトはそれぞれ6文字,20文字の長さ.
+
+### `\ModifyHeading`
+既に(上のどれかを使い)定義された見出し命令の設定を変更します.たとえば
+```latex
+\ModifyHeading{section}{lines=10}
+```
+とすると,`\section`のフォントなどの設定はそのままに,行取りのみが10行に変更されます.見出しの種類を変更することはできません.
+
+### `\SaveHeading`
+見出し命令の定義を待避します.
+```latex
+\SaveHeading{section}{\restoresection} % \sectionの中身を\restoresectionに待避.
+\RenewBlockHeading{section}{1}{font=……} % \sectionを新しく定義する.
+……
+\restoresection % \sectionの中身を元に戻す.
+```
+のように使います.
+
+## ページスタイル
+```
+\DeclarePageStyle{<ページスタイル名>}{<設定>}
+```
+によりページスタイルを定義することができます.`<設定>`はkeyval形式です.定義したページスタイルは`\pagestyle`で適用できます.設定は以下の通り.
+
+* `yoko`:横書きで上下に出力します.デフォルト.
+* `tate`:縦書きで小口側に出力します.
+* `font=<命令>`:柱とノンブルのフォントを指定します.
+* `running_head_position`, `nombre_position`:柱とノンブルの位置を指定します.`yoko`か`tate`のどちらが指定されているかで挙動が変わります.
+    - `yoko`指定時:`top-left`のように指定できます.`top/bottom/center/left/right/gutter/fore_edge`が使えます.`gutter`はのど,`fore_edge`は小口です.`left`,`right`の指定は奇数ページに対するものです.`twoside`が指定されている場合,偶数ページはその逆になります.
+    - `tate`指定時:`<寸法>`が指定できます.`running_head_position`は柱の天からの下げ量を,`nombre_position`はノンブルの地からの上げ量を指定します.
+* `nombre=<書式>`:出力するノンブルを指定します.デフォルトは`\thepage`.
+* `odd_running_head=<書式>`,`even_running_head=<書式>`:それぞれ奇数ページ,偶数ページの柱を指定します.`_section`のように`_`から始まる名前を指定すると,対応する見出しを出力します.(`_section`だと現在の`\section`を出力する.)
+
+`\NewPageStyle`,`\RenewPageStyle`,`\ProvidePageStyle`もあります.`\ModifyPageStyle`により既存のページスタイルを改変することが可能です.
+
+## その他
+* クラスオプション`jlreq_notes`が渡されると,日本語組版処理の記述と矛盾する設定が行われた場合に通知がされます.
+
+## ライセンス
+このパッケージは二条項BSDライセンスの元で配布されています.詳しくは[LICENSE](LICENSE)をご覧ください.
+
+## 履歴
+* 2017-02-08
+    - 最初のバージョン.
+* 2017-02-17
+    - いくつかバグを修正.
+    - クラスオプション/`\jlreqsetup`にいくつかのキーを追加/変更.
+    - `abstract`環境を実装.
+    - パッケージを読み込んでいるだけのはやめた.
+* 2017-03-14
+    - いくつかバグを修正.
+    - 和文ファミリを欧文ファミリに従属させるようにした.
+    - `\DeclareBlockHeading`にオプションをたくさん追加.
+    - quote環境などを調整するオプションを追加.
+* 2017-03-20
+    - バグ修正.
+    - `\footnote / \sidenote / \endnote`の周りに必要ならば空白を挿入するようにした.
+* 2017-04-04
+    - バグ修正.
+    - `\DeclarePageStyle`に`tate`と`font`オプションを追加.
+* 2017-04-29
+    - バグ修正
+    - `jafontsize`と`jafontscale`をクラスオプションに,また`\jafontsize`を追加.
+    - `\tatechuyoko`を追加.
+    - クラスオプション`jlreq_warnings`を`jlreq_notes`に変更.
+    - いくつかのクラスオプションを`\jlreqsetup`に移動.
+    - いくつかのオプションを`\jlreqsetup`に追加.
+    - クラスオプションの`paper={<縦>,<横>}`を`paper={<横>,<縦>}`に変更.
+* 2017-06-11
+    - `plext` / `lltjext`の読み込みを中止.
+    - `\DeclareBlockHeading`に`align`を追加.`indent=center`や`end_indent=center`を廃止.
+    - 一部の`\kcatcode` (upLaTeX時) を変更.
+* 2017-08-13
+    - `column_spanning`を`\DeclareBlockHeading`に追加.
+    - ページレイアウトにおける「本文の長さ」に傍注の長さを入れるようにした.
+    - 傍注の長さのデフォルトを0とした.
+    - 傍注の長さが0の時には`\sidenote`を定義しないようにした.
+    - 和文間隔を挿入する命令を追加.
+* 2017-08-29
+    - 縦書きでも著者名が横書きで出てしまうバグを修正.
+* 2017-11-23
+    - バグ修正
+    - `\SetBlockHeadingSpaces`を追加.
+    - `\contentsname` と `\indexname`に入っていたスペースを削除.
+
+
+--------------
+Noriyuki Abe
+https://github.com/abenori/jlreq

Modified: trunk/Master/texmf-dist/doc/latex/jlreq/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jlreq/README.md	2017-11-23 21:05:53 UTC (rev 45893)
+++ trunk/Master/texmf-dist/doc/latex/jlreq/README.md	2017-11-23 21:06:15 UTC (rev 45894)
@@ -1,64 +1,70 @@
-# 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
-    - Fixed bugs.
-    - Implement `abstract` environment.
-    - Changed/Added some keys to class option/`\jlreqsetup`
-    - Stopped to load `pxrubirica`, `luatexja-ruby` and `nidanfloat`.
-* 2017-03-14
-    - Fixed bugs.
-    - `\sffamily` etc. also change the Japanese font family.
-    - Added many options to `\DeclareBlockHeading`.
-    - Some options related to `quote` environment etc.
-* 2017-03-20
-    - Fixed bugs.
-    - Insert some spaces around `\footnote / \sidenote / \endnote`.
-* 2017-04-04
-    - Fixed a bug.
-    - Added options `tate` and `font` to `\DeclarePageStyle`.
-* 2017-04-29
-    - Fixed bugs.
-    - Added `jafontsize` and `jafontscale` options and `\jafontsize`.
-    - Added `\tatechuyoko`.
-    - `jlreq_warnings` -> `jlreq_notes` (class option).
-    - Moved some class options to `\jlreqsetup`.
-    - Added some options to `\jlreqsetup`.
-    - `paper={<height>,<width>}` -> `paper={<width>,<height>}`.
-* 2017-06-11
-    - Stopped to load `plext` and `lltjext`.
-    - Added `align` to `\DeclareBlockHeading` and delete `indent=center`, `end_indent=center`.
-    - Changed `\kcatcode` for some characters (upLaTeX).
-* 2017-08-13
-    - Added `column_spanning` to `\DeclareBlockHeading`.
-    - Sidenotes are a part of the main text now.
-    - Changed the default length of sidenotes to 0.
-    - jlreq does not define `\sidenote` if the length for sidenotes is zero.
-    - Added a command for the full-width ideographic space.
-* 2017-08-29
-    - Fixed a bug.
-
---------------
-Noriyuki Abe
-https://github.com/abenori/jlreq
+# 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
+    - Fixed bugs.
+    - Implement `abstract` environment.
+    - Changed/Added some keys to class option/`\jlreqsetup`
+    - Stopped to load `pxrubirica`, `luatexja-ruby` and `nidanfloat`.
+* 2017-03-14
+    - Fixed bugs.
+    - `\sffamily` etc. also change the Japanese font family.
+    - Added many options to `\DeclareBlockHeading`.
+    - Some options related to `quote` environment etc.
+* 2017-03-20
+    - Fixed bugs.
+    - Insert some spaces around `\footnote / \sidenote / \endnote`.
+* 2017-04-04
+    - Fixed a bug.
+    - Added options `tate` and `font` to `\DeclarePageStyle`.
+* 2017-04-29
+    - Fixed bugs.
+    - Added `jafontsize` and `jafontscale` options and `\jafontsize`.
+    - Added `\tatechuyoko`.
+    - `jlreq_warnings` -> `jlreq_notes` (class option).
+    - Moved some class options to `\jlreqsetup`.
+    - Added some options to `\jlreqsetup`.
+    - `paper={<height>,<width>}` -> `paper={<width>,<height>}`.
+* 2017-06-11
+    - Stopped to load `plext` and `lltjext`.
+    - Added `align` to `\DeclareBlockHeading` and delete `indent=center`, `end_indent=center`.
+    - Changed `\kcatcode` for some characters (upLaTeX).
+* 2017-08-13
+    - Added `column_spanning` to `\DeclareBlockHeading`.
+    - Sidenotes are a part of the main text now.
+    - Changed the default length of sidenotes to 0.
+    - jlreq does not define `\sidenote` if the length for sidenotes is zero.
+    - Added a command for the full-width ideographic space.
+* 2017-08-29
+    - Fixed a bug.
+* 2017-11-23
+    - Fixed bugs.
+    - Added `\SetBlockHeadingSpaces`.
+    - Removed a space from `\contentsname` and `\indexname`.
+
+
+
+--------------
+Noriyuki Abe
+https://github.com/abenori/jlreq

Modified: trunk/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.html
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.html	2017-11-23 21:05:53 UTC (rev 45893)
+++ trunk/Master/texmf-dist/doc/latex/jlreq/jlreq-ja.html	2017-11-23 21:06:15 UTC (rev 45894)
@@ -1,370 +1,392 @@
-<!DOCTYPE html>
-<html lang="ja">
-<head>
-  <meta charset="utf-8">
-  <meta name="generator" content="pandoc">
-  <title>jlreq</title>
-  <style>
-    .markdown-body {
-      padding-top: 10px;
-      padding-bottom: 10px;
-      background-color: white;
-      padding: 30px;
-      line-height: 170%;
-    }
-    h1{
-      font-size: 200%;
-    }
-    h2{
-      border-style: solid;
-      border-width: 0 0 0.1em 0em;
-      padding: 0 0 0.2em 0em;
-      border-color: #EEEEEE;
-      margin-top: 2em;
-    }
-    h3{
-      border-style: solid;
-      border-width: 0 0 0 0.5em;
-      padding: 0 0 0 0.5em;
-      border-color: #EEEEEE;
-      margin-top: 2em;
-    }
-    code{
-      white-space: pre;
-      font-weight: normal;
-      background-color: #F4F4F4;
-      border-color: #F4F4F4;
-      border-style: solid;
-      border-width: .2em .5em;
-      border-radius: .2em;
-    }
-    pre{
-      background-color: #F8F8F8;
-      border-color: #F8F8F8;
-      border-width: 1em;
-      border-style: solid;
-      border-radius: .5em;
-      padding: 0;
-      margin: 0;
-      line-height: 130%;
-    }
-    pre code{
-      background-color: #F8F8F8;
-      border-style: none;
-    }
-    div.sourceCode { overflow-x: auto; text-indent: 0em;}
-    code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
-    code > span.dt { color: #902000; } /* DataType */
-    code > span.dv { color: #40a070; } /* DecVal */
-    code > span.bn { color: #40a070; } /* BaseN */
-    code > span.fl { color: #40a070; } /* Float */
-    code > span.ch { color: #4070a0; } /* Char */
-    code > span.st { color: #4070a0; } /* String */
-    code > span.co { color: #008000; } /* Comment */
-    code > span.ot { color: #007020; } /* Other */
-    code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
-    code > span.fu { color: #0040FF; } /* Function */
-    code > span.er { color: #ff0000; font-weight: bold; } /* Error */
-    code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
-    code > span.cn { color: #880000; } /* Constant */
-    code > span.sc { color: #4070a0; } /* SpecialChar */
-    code > span.vs { color: #4070a0; } /* VerbatimString */
-    code > span.ss { color: #bb6688; } /* SpecialString */
-    code > span.im { } /* Import */
-    code > span.va { color: #19177c; } /* Variable */
-    code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
-    code > span.op { color: #666666; } /* Operator */
-    code > span.bu { color: #0040FF; } /* BuiltIn */
-    code > span.ex { } /* Extension */
-    code > span.pp { color: #bc7a00; } /* Preprocessor */
-    code > span.at { color: #7d9029; } /* Attribute */
-    code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
-    code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
-    code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
-    code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
-  </style>
-</head>
-<body>
-<article class="markdown-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>
-<div class="sourceCode"><pre class="sourceCode latex"><code class="sourceCode latex"><span class="bu">\documentclass</span>{<span class="ex">jlreq</span>}</code></pre></div>
-<p>とします.これで横書きのarticle相当の文書クラスとなります.エンジンは自動判定されますが,指定する場合はクラスオプションに<code>platex/uplatex/lualatex</code>のいずれかを渡してください.縦書きにするには<code>tate</code>オプションを渡します.また,reportやbook相当の文書クラスとするには,それぞれ<code>report</code>や<code>book</code>オプションを渡します.たとえば,縦書きの本を作成するには</p>
-<div class="sourceCode"><pre class="sourceCode latex"><code class="sourceCode latex"><span class="bu">\documentclass</span>[tate,book]{<span class="ex">jlreq</span>}</code></pre></div>
-<p>とします.</p>
-<p>その他,<code>oneside / twoside / onecolumn / twocolumn / titlepage / notitlepage / draft / final / openright / openany / leqno / fleqn</code>というよくあるオプションを受け付けます.</p>
-<p>標準的な文書クラスと同じように中身を書くことができますが,次のような命令が追加 / 拡張されています.</p>
-<h3 id="jlreqsetup"><code>\jlreqsetup</code></h3>
-<p>設定用命令です.プリアンブルでしか使えません.文書に対する設定は,クラスオプションとして行うか<code>\jlreqsetup</code>を通じて行うかします.どちらで設定するかは設定項目によります.</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="abstract"><code>abstract</code>環境</h3>
-<p>プリアンブルにもかけるようになっています.プリアンブルに書かれた場合は,<code>\maketitle</code>とともに出力されます.二段組の場合は,段組にならず概要を出力することができます.</p>
-<h3 id="sidenote"><code>\sidenote</code></h3>
-<p>傍注(縦組みの場合は脚注)を出力します.内部では<code>\marginpar</code>を使っています.デフォルトでは<code>\footnote</code>と同様の書式となりますが,<code>\jlreqsetup</code>で<code>sidenote_type=symbol</code>が指定されている場合,その書式は<code>\sidenote{該当項目}{注}</code>となります.たとえば</p>
-<div class="sourceCode"><pre class="sourceCode latex"><code class="sourceCode latex">刊行できる<span class="fu">\sidenote</span>{原稿}{印刷などの方法により……}を入手する仕事である.</code></pre></div>
-<p>とします.後の説明も参照してください.</p>
-<p>傍注の幅が正の時にのみ定義されます.デフォルトの基本版面ではこの幅は0に設定されています.従って<code>\sidenote</code>は定義されません.後の基本版面の設定を参考にしてください.</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>
-<pre><code>\warichu*{(一行目前) & (一行目後)\\ (二行目前) & (二行目後)...}</code></pre>
-<p>です.<code>&</code>が省略されている場合は自動で調整されます.</p>
-<h3 id="tatechuyoko"><code>\tatechuyoko</code></h3>
-<p>縦中横を出力します.<code>\tatechuyoko{<文字列>}</code>とします.縦書きでない場所で使うとエラーになります.</p>
-<h3 id="jafontsize"><code>\jafontsize</code></h3>
-<p>和文フォントサイズを指定する<code>\fontsize</code>です.クラスオプションで<code>jafontscale=0.9</code>とされている場合,<code>\fontsize{9pt}{15pt}</code>とすると和文フォントのサイズは<code>8.1pt</code>となりますが,<code>\jafontsize{9pt}{15pt}</code>とすると<code>9pt</code>となります.(欧文フォントサイズは<code>10pt</code>となる.)なお,第二引数は<code>\fontsize</code>の第二引数と全く同じです.</p>
-<h3 id="section-1"><code>\ </code></h3>
-<p>全角空白(U+3000)一文字からなるマクロです.和文間隔を挿入します.LuaLaTeXでは<code> </code>のみでも和文間隔を入力できます.</p>
-<h3>その他</h3>
-<ul>
-<li>ルビや圏点は提供されません.<a href="https://github.com/zr-tex8r/PXrubrica">PXrubrica</a>またはluatexja-ruby(LuaLaTeX,LuaTeX-jaパッケージに付属)を使うと良いかと思います.</li>
-<li><p>日本語組版処理の要件2.3.2.dによれば,二段組の最後のページの各段の行数は揃えることが望ましいとされていますが,この処理は行われません.<code>nidanfloat</code>パッケージを使い,</p>
-<div class="sourceCode"><pre class="sourceCode latex"><code class="sourceCode latex"><span class="bu">\usepackage</span>[balance]{<span class="ex">nidanfloat</span>}</code></pre></div>
-<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が認識する寸法です.簡単な式(<code>10pt+10pt</code>のような)を使うこともできます.また,クラスオプションでは,場合によっては次のような特殊な値を使うこともできます.(これらはpLaTeX / upLaTeXではもとから利用可能ですが,LuaLaTeXでも利用可能なように処理されています.)<code>\jlreqsetup</code>内のような場所では,常に<code>\zw</code>や<code>\zh</code>により全角幅が記述できます.以下,たとえば<code>Q</code>が利用可能な場合は<code><寸法;Q></code>のように記述します.
-<ul>
-<li><code>Q</code>:0.25mmと解釈されます.</li>
-<li><code>zw</code>, <code>zh</code>:全角幅として解釈されます.</li>
-</ul></li>
-</ul>
-<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>jafontsize=<寸法;Q></code>:和文フォントサイズ.</li>
-<li><code>jafontscale=<実数値></code>:欧文フォントと和文フォントの比(和文 / 欧文).<code>fontsize</code>と<code>jafontsize</code>が両方指定されている場合は無視される.デフォルトは1.</li>
-<li><code>line_length=<寸法;zw,zh></code>:一行の長さ.デフォルトは紙の縦幅の0.75倍.実際の値は一文字の長さの整数倍になるように補正されます.</li>
-<li><code>number_of_lines=<自然数値></code>:一ページの行数.デフォルトは紙の横幅の0.75倍になるような値.</li>
-<li><code>gutter=<寸法;zw,zh></code>:のどの余白の大きさ.
-<ul>
-<li><code>tate</code>無指定時は奇数ページ左,偶数ページ右の余白</li>
-<li><code>tate</code>指定時は奇数ページ右,偶数ページ左の余白</li>
-<li><code>twoside</code>が指定されていない時は,常に奇数ページ扱いで余白が設定される</li>
-</ul></li>
-<li><code>head_space=<寸法;zw,zh></code>:天の空き量.デフォルトは中央寄せになるような値.</li>
-<li><code>foot_space=<寸法;zw,zh></code>:地の空き量.デフォルトは中央寄せになるような値.</li>
-<li><code>baselineskip=<寸法;Q,zw,zh></code>:行送り.デフォルトは<code>jafontsize</code>の1.7倍.</li>
-<li><code>linegap=<寸法;Q,zw,zh></code>:行間.</li>
-<li><code>headfoot_sidemargin=<寸法;zw,zh></code>:柱やノンブルの左右の空き.</li>
-<li><code>column_gap=<寸法;zw,zh></code>:段間(<code>twocolumn</code>指定時のみ).</li>
-<li><code>sidenote_length=<寸法;zw,zh></code>:傍注の幅を指定します.</li>
-</ul>
-<h3>組み方</h3>
-<p>クラスオプションです.</p>
-<ul>
-<li><code>open_bracket_pos=[zenkaku_tentsuki/zenkakunibu_nibu/nibu_tentsuki]</code>:始め括弧が行頭に来た際の配置方法を指定します.それぞれ段落開始全角折り返し行頭天付き(デフォルト),段落開始全角二分折り返し行頭二分,段落開始二分折り返し行頭天付きを意味します.</li>
-<li><code>hanging_punctuation</code>:ぶら下げ組をします.</li>
-</ul>
-<h3>注関係</h3>
-<p><code>\jlreqsetup</code>で指定します.</p>
-<ul>
-<li><code>reference_mark=[inline/interlinear]</code>:合印の配置方法を指定します.<code>inline</code>にすると該当項目の後ろの行中に配置します.<code>interlinear</code>を指定すると該当項目の上(横組)または右(縦組)に配置します.</li>
-<li><code>sidenote_type=[number/symbol]</code>:傍注と本文との対応の方法を指定します.<code>number</code>が規定で,注の位置に通し番号が入り,それにより対応が示されます.<code>symbol</code>とすると,注の位置に特定の記号が入り,また注がついている単語が強調されます.</li>
-<li><code>sidenote_symbol=<記号></code>:<code>sidenote_symbol=symbol</code>の時に,注の位置に入る記号.デフォルト*</li>
-<li><code>sidenote_keyword_font=<命令></code>:<code>sidenote_symbol=symbol</code>の時に,注のついている単語のフォント指定.デフォルトは無し(強調しない)</li>
-<li><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>の直前に出力します.</li>
-</ul>
-<h3>キャプション</h3>
-<p>図表のキャプションを<code>\jlreqsetup</code>で変更できます.</p>
-<ul>
-<li><code>caption_font=<命令></code>:キャプション自身のフォントを指定します.</li>
-<li><code>caption_label_font=<命令></code>:キャプションのラベルのフォントを指定します.</li>
-</ul>
-<h3>引用</h3>
-<p><code>quote / quotation / verse</code>環境の挙動を<code>\jlreqsetup</code>で指定できます.</p>
-<ul>
-<li><code>quote_indent=<寸法></code>:字下げを指定します.デフォルトは2zwです.一行の長さが文字サイズの整数倍になるように調整されます.</li>
-<li><code>quote_end_indent=<寸法></code>:字上げを指定します.デフォルトは0zwです.</li>
-<li><code>quote_beforeafter_space=<寸法></code>:前後の空きを指定します.<code>quote_beforeafter_space=1\baselineskip</code>とすると一行あきます.</li>
-<li><code>quote_fontsize=[normalsize/small/footnotesize/scriptsize/tiny]</code>:フォントサイズを指定します.</li>
-</ul>
-<h3>箇条書き</h3>
-<p><code>\jlreqsetup</code>で指定します.</p>
-<ul>
-<li><code>itemization_beforeafter_space=<寸法></code>:箇条書きの前後の空きを指定します.</li>
-<li><code>itemization_itemsep=<寸法></code>:項目同士の空きを指定します.</li>
-</ul>
-<h3>定理環境</h3>
-<p><code>\jlreqsetup</code>で指定します.</p>
-<ul>
-<li><code>theorem_beforeafter_space=<寸法></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\vfil {\Huge\bfseries #1#2}}</code>のようにします.<code>#1</code>はラベルに,<code>#2</code>は見出し文字列に置き換えられます.</li>
-</ul>
-<h3>別行見出し</h3>
-<p><code>\DeclareBlockHeading</code>で作成します.<code>\<命令名>*[running head]{見出し文字列}[副題]</code>という書式の命令を作成します.設定は以下の通り.</p>
-<h4>書式関連</h4>
-<ul>
-<li><code>font=<命令></code>:見出しのフォントを指定します.</li>
-<li><code>subtitle_font=<命令></code>:副題のフォントを指定します.</li>
-<li><code>label_format=<命令></code>:ラベルのフォーマットを指定します.<code>label_format={第\thechapter 章}</code>などのようにします.</li>
-<li><code>subtitle_format=<命令></code>:副題のフォーマットを指定します.<code>subtitle_format={「#1」}</code>のようにします.<code>#1</code>が副題自身になります.</li>
-</ul>
-<h4>インデント関連</h4>
-<ul>
-<li><code>align=[left/center/right]</code>:見出し位置の横方向の配置場所を指定します.</li>
-<li><code>indent=<寸法></code>:見出し全体の字下げ量を指定します.</li>
-<li><code>end_indent=<寸法></code>:見出し全体の字上げ量を指定します.</li>
-<li><code>after_label_space=<寸法></code>:ラベル後,見出し文字列までの空きを指定します.</li>
-<li><code>second_heading_text_indent=[<寸法>/{<寸法>,<寸法>}]</code>:見出し文字列の二行目以降のインデントを指定します.一行目の頭を起点として指定しますが,<code>second_heading_text_indent=*1\zw</code>のように先頭に<code>*</code>をつけるとラベルの頭を起点としての指定になります.(ラベルがない時は一行目の頭が起点.)また,<code>second_heading_text_indent={<ラベルがある時>,<ラベルがない時>}</code>という指定をすると,ラベルの有無に応じて値を変更することができます.<code><ラベルがある時></code>の指定ではやはり<code>*</code>を使うことができます.</li>
-<li><code>subtitle_indent=<寸法></code>:副題のインデント量を指定します.見出し文字列の一行目を起点として指定します.</li>
-</ul>
-<h4 id="-1">その他</h4>
-<ul>
-<li><code>subtitle_break=[true/false]</code>:見出し文字列と副題の間を改行するか指定します.</li>
-<li><code>allowbreak_if_evenpage=[true/false]</code>:見出しが偶数ページにあった場合,その直後の改ページを許可します.</li>
-<li><code>pagebreak=[clearpage/cleardoublepage/clearcolumn/nariyuki]</code>:見出し直前の改ページを指定します.それぞれ,改ページ,改丁,改段,なりゆきです.</li>
-<li><code>afterindent=[true/false]</code>:見出し直後の段落の字下げを行うかを指定します.</li>
-<li><code>column_spanning=[true/false]</code>: 段抜きの見出しにします.pagebreak=clearpageまたはcleardoublepageの時にしか使えません.</li>
-</ul>
-<h4>行取り</h4>
-<p>行取りの指定は以下のいずれかの方法で行うことができます.</p>
-<ul>
-<li>行数を指定し,その中央に配置する.<code>lines=<自然数値></code>により行数を指定します.<code>before_lines=<自然数値></code>や<code>after_lines=<自然数値></code>により,さらに前後に追加する行数を指定します.たとえば<code>lines=3,after_lines=1</code>とすれば,四行の中に配置され,前の空きよりも後ろの空きの方が一行分大きくなります.<code>before_lines</code>により指定された空きは,ページ頭には入りませんが,<code>before_lines=*1</code>というように<code>*</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>と同様の,<code>\<命令名>*[running head]{見出し文字列}</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>after_space=<寸法></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>
-<div class="sourceCode"><pre class="sourceCode latex"><code class="sourceCode latex"><span class="fu">\ModifyHeading</span>{section}{lines=10}</code></pre></div>
-<p>とすると,<code>\section</code>のフォントなどの設定はそのままに,行取りのみが10行に変更されます.見出しの種類を変更することはできません.</p>
-<h3 id="saveheading"><code>\SaveHeading</code></h3>
-<p>見出し命令の定義を待避します.</p>
-<div class="sourceCode"><pre class="sourceCode latex"><code class="sourceCode latex"><span class="fu">\SaveHeading</span>{section}{<span class="fu">\restoresection</span>} <span class="co">% \sectionの中身を\restoresectionに待避.</span>
-<span class="fu">\RenewBlockHeading</span>{section}{1}{font=……} <span class="co">% \sectionを新しく定義する.</span>
-……
-<span class="fu">\restoresection</span> <span class="co">% \sectionの中身を元に戻す.</span></code></pre></div>
-<p>のように使います.</p>
-<h2>ページスタイル</h2>
-<pre><code>\DeclarePageStyle{<ページスタイル名>}{<設定>}</code></pre>
-<p>によりページスタイルを定義することができます.柱やノンブルを出力します.設定は以下の通り.</p>
-<ul>
-<li><code>yoko</code>:横書きで上下に出力します.デフォルト.</li>
-<li><code>tate</code>:縦書きで小口側に出力します.</li>
-<li><code>font=<命令></code>:柱とノンブルのフォントを指定します.</li>
-<li><code>running_head_position</code>, <code>nombre_position</code>:柱とノンブルの位置を指定します.<code>yoko</code>か<code>tate</code>のどちらが指定されているかで挙動が変わります.
-<ul>
-<li><code>yoko</code>指定時:<code>top-left</code>のように指定できます.<code>top/bottom/center/left/right/gutter/fore_edge</code>が使えます.<code>gutter</code>はのど,<code>fore_edge</code>は小口です.<code>left</code>,<code>right</code>の指定は奇数ページに対するものです.<code>twoside</code>が指定されている場合,偶数ページはその逆になります.</li>
-<li><code>tate</code>指定時:<code><寸法></code>が指定できます.<code>running_head_position</code>は柱の天からの下げ量を,<code>nombre_position</code>はノンブルの地からの上げ量を指定します.</li>
-</ul></li>
-<li><code>nombre=<書式></code>:出力するノンブルを指定します.デフォルトは<code>\thepage</code>.</li>
-<li><code>odd_running_head=<書式></code>,<code>even_running_head=<書式></code>:それぞれ奇数ページ,偶数ページの柱を指定します.<code>_section</code>のように<code>_</code>から始まる名前を指定すると,対応する見出しを出力します.(<code>_section</code>だと現在の<code>\section</code>を出力する.)</li>
-</ul>
-<p><code>\ModifyPageStyle</code>により既存のページスタイルを改変することが可能です.</p>
-<h2 id="-2">その他</h2>
-<ul>
-<li>クラスオプション<code>jlreq_notes</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>
-<li>2017-03-14
-<ul>
-<li>いくつかバグを修正.</li>
-<li>和文ファミリを欧文ファミリに従属させるようにした.</li>
-<li><code>\DeclareBlockHeading</code>にオプションをたくさん追加.</li>
-<li>quote環境などを調整するオプションを追加.</li>
-</ul></li>
-<li>2017-03-20
-<ul>
-<li>バグ修正.</li>
-<li><code>\footnote / \sidenote / \endnote</code>の周りに必要ならば空白を挿入するようにした.</li>
-</ul></li>
-<li>2017-04-04
-<ul>
-<li>バグ修正.</li>
-<li><code>\DeclarePageStyle</code>に<code>tate</code>と<code>font</code>オプションを追加.</li>
-</ul></li>
-<li>2017-04-29
-<ul>
-<li>バグ修正</li>
-<li><code>jafontsize</code>と<code>jafontscale</code>をクラスオプションに,また<code>\jafontsize</code>を追加.</li>
-<li><code>\tatechuyoko</code>を追加.</li>
-<li>クラスオプション<code>jlreq_warnings</code>を<code>jlreq_notes</code>に変更.</li>
-<li>いくつかのクラスオプションを<code>\jlreqsetup</code>に移動.</li>
-<li>いくつかのオプションを<code>\jlreqsetup</code>に追加.</li>
-<li>クラスオプションの<code>paper={<縦>,<横>}</code>を<code>paper={<横>,<縦>}</code>に変更.</li>
-</ul></li>
-<li>2017-06-11
-<ul>
-<li><code>plext</code> / <code>lltjext</code>の読み込みを中止.</li>
-<li><code>\DeclareBlockHeading</code>に<code>align</code>を追加.<code>indent=center</code>や<code>end_indent=center</code>を廃止.</li>
-<li>一部の<code>\kcatcode</code> (upLaTeX時) を変更.</li>
-</ul></li>
-<li>2017-08-13
-<ul>
-<li><code>column_spanning</code>を<code>\DeclareBlockHeading</code>に追加.</li>
-<li>ページレイアウトにおける「本文の長さ」に傍注の長さを入れるようにした.</li>
-<li>傍注の長さのデフォルトを0とした.</li>
-<li>傍注の長さが0の時には<code>\sidenote</code>を定義しないようにした.</li>
-<li>和文間隔を挿入する命令を追加.</li>
-</ul></li>
-<li>2017-08-29
-<ul>
-<li>縦書きでも著者名が横書きで出てしまうバグを修正.</li>
-</ul></li>
-</ul>
-<hr />
-<p>Noriyuki Abe<br />
-<a href="https://github.com/abenori/jlreq" class="uri">https://github.com/abenori/jlreq</a></p>
-</article>
-</body>
-</html>
+<!DOCTYPE html>
+<html lang="ja">
+<head>
+  <meta charset="utf-8">
+  <meta name="generator" content="pandoc">
+  <title>jlreq</title>
+  <style>
+    .markdown-body {
+      padding-top: 10px;
+      padding-bottom: 10px;
+      background-color: white;
+      padding: 30px;
+      line-height: 170%;
+    }
+    h1{
+      font-size: 200%;
+    }
+    h2{
+      border-style: solid;
+      border-width: 0 0 0.1em 0em;
+      padding: 0 0 0.2em 0em;
+      border-color: #EEEEEE;
+      margin-top: 2em;
+    }
+    h3{
+      border-style: solid;
+      border-width: 0 0 0 0.5em;
+      padding: 0 0 0 0.5em;
+      border-color: #EEEEEE;
+      margin-top: 2em;
+    }
+    code{
+      white-space: pre;
+      font-weight: normal;
+      background-color: #F4F4F4;
+      border-color: #F4F4F4;
+      border-style: solid;
+      border-width: .2em .5em;
+      border-radius: .2em;
+    }
+    pre{
+      background-color: #F8F8F8;
+      border-color: #F8F8F8;
+      border-width: 1em;
+      border-style: solid;
+      border-radius: .5em;
+      padding: 0;
+      margin: 0;
+      line-height: 130%;
+    }
+    pre code{
+      background-color: #F8F8F8;
+      border-style: none;
+    }
+    div.sourceCode { overflow-x: auto; text-indent: 0em;}
+    code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
+    code > span.dt { color: #902000; } /* DataType */
+    code > span.dv { color: #40a070; } /* DecVal */
+    code > span.bn { color: #40a070; } /* BaseN */
+    code > span.fl { color: #40a070; } /* Float */
+    code > span.ch { color: #4070a0; } /* Char */
+    code > span.st { color: #4070a0; } /* String */
+    code > span.co { color: #008000; } /* Comment */
+    code > span.ot { color: #007020; } /* Other */
+    code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
+    code > span.fu { color: #0040FF; } /* Function */
+    code > span.er { color: #ff0000; font-weight: bold; } /* Error */
+    code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+    code > span.cn { color: #880000; } /* Constant */
+    code > span.sc { color: #4070a0; } /* SpecialChar */
+    code > span.vs { color: #4070a0; } /* VerbatimString */
+    code > span.ss { color: #bb6688; } /* SpecialString */
+    code > span.im { } /* Import */
+    code > span.va { color: #19177c; } /* Variable */
+    code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+    code > span.op { color: #666666; } /* Operator */
+    code > span.bu { color: #0040FF; } /* BuiltIn */
+    code > span.ex { } /* Extension */
+    code > span.pp { color: #bc7a00; } /* Preprocessor */
+    code > span.at { color: #7d9029; } /* Attribute */
+    code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
+    code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+    code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+    code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+  </style>
+</head>
+<body>
+<article class="markdown-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>
+<div class="sourceCode"><pre class="sourceCode latex"><code class="sourceCode latex"><span class="bu">\documentclass</span>{<span class="ex">jlreq</span>}</code></pre></div>
+<p>とします.これで横書きのarticle相当の文書クラスとなります.エンジンは自動判定されますが,指定する場合はクラスオプションに<code>platex/uplatex/lualatex</code>のいずれかを渡してください.縦書きにするには<code>tate</code>オプションを渡します.また,reportやbook相当の文書クラスとするには,それぞれ<code>report</code>や<code>book</code>オプションを渡します.たとえば,縦書きの本を作成するには</p>
+<div class="sourceCode"><pre class="sourceCode latex"><code class="sourceCode latex"><span class="bu">\documentclass</span>[tate,book]{<span class="ex">jlreq</span>}</code></pre></div>
+<p>とします.</p>
+<p>その他,<code>oneside / twoside / onecolumn / twocolumn / titlepage / notitlepage / draft / final / openright / openany / leqno / fleqn</code>というよくあるオプションを受け付けます.</p>
+<p>標準的な文書クラスと同じように中身を書くことができますが,次のような命令が追加 / 拡張されています.</p>
+<h3 id="jlreqsetup"><code>\jlreqsetup</code></h3>
+<p>設定用命令です.プリアンブルでしか使えません.文書に対する設定は,クラスオプションとして行うか<code>\jlreqsetup</code>を通じて行うかします.どちらで設定するかは設定項目によります.</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="abstract"><code>abstract</code>環境</h3>
+<p>プリアンブルにもかけるようになっています.プリアンブルに書かれた場合は,<code>\maketitle</code>とともに出力されます.二段組の場合は,段組にならず概要を出力することができます.</p>
+<h3 id="sidenote"><code>\sidenote</code></h3>
+<p>この命令は傍注の幅が正の時にのみ定義されます.デフォルトの基本版面ではこの幅は0に設定されています.従って<code>\sidenote</code>は定義されません.後の基本版面の設定を参考にしてください.</p>
+<p><code>\sidenote</code>は傍注(縦組みの場合は脚注)を出力します.内部では<code>\marginpar</code>を使っています.デフォルトでは<code>\footnote</code>と同様の書式となりますが,<code>\jlreqsetup</code>で<code>sidenote_type=symbol</code>が指定されている場合,その書式は<code>\sidenote{該当項目}{注}</code>となります.たとえば</p>
+<div class="sourceCode"><pre class="sourceCode latex"><code class="sourceCode latex">刊行できる<span class="fu">\sidenote</span>{原稿}{印刷などの方法により……}を入手する仕事である.</code></pre></div>
+<p>とします.後の説明も参照してください.</p>
+<h3 id="endnote"><code>\endnote</code></h3>
+<p>後注を指定します.<code>\footnote</code>と同様の書式です.デフォルトでは,注自身の出力は見出し直前に行われます.この動作は<code>\jlreqsetup</code>に<code>endnote_position</code>を渡すことで制御できます.詳しくは後の注関係の説明をご覧ください.また<code>\theendnotes</code>を実行するとその場に出力をします.</p>
+<h3 id="warichu"><code>\warichu</code></h3>
+<p>割注を出力します.行分割位置などは自動で計算されます.(複数回のコンパイルが必要.)<code>\warichu*</code>ではこれらの位置を手動で指定できます.書式は</p>
+<pre><code>\warichu*{(一行目前) & (一行目後)\\ (二行目前) & (二行目後)...}</code></pre>
+<p>です.<code>&</code>が省略されている場合は自動で調整されます.</p>
+<h3 id="tatechuyoko"><code>\tatechuyoko</code></h3>
+<p>縦中横を出力します.<code>\tatechuyoko{<文字列>}</code>とします.縦書きでない場所で使うとエラーになります.</p>
+<h3 id="jafontsize"><code>\jafontsize</code></h3>
+<p>和文フォントサイズを指定する<code>\fontsize</code>です.クラスオプションで<code>jafontscale=0.9</code>とされている場合,<code>\fontsize{9pt}{15pt}</code>とすると和文フォントのサイズは<code>8.1pt</code>となりますが,<code>\jafontsize{9pt}{15pt}</code>とすると<code>9pt</code>となります.(欧文フォントサイズは<code>10pt</code>となる.)なお,第二引数は<code>\fontsize</code>の第二引数と全く同じです.</p>
+<h3 id="section-1"><code>\ </code></h3>
+<p>全角空白(U+3000)一文字からなるマクロです.和文間隔を挿入します.LuaLaTeXでは<code> </code>のみでも和文間隔を入力できます.</p>
+<h3>その他</h3>
+<ul>
+<li>ルビや圏点は提供されません.<a href="https://github.com/zr-tex8r/PXrubrica">PXrubrica</a>またはluatexja-ruby(LuaLaTeX,LuaTeX-jaパッケージに付属)を使うと良いかと思います.</li>
+<li><p>日本語組版処理の要件2.3.2.dによれば,二段組の最後のページの各段の行数は揃えることが望ましいとされていますが,この処理は行われません.<code>nidanfloat</code>パッケージを使い,</p>
+<div class="sourceCode"><pre class="sourceCode latex"><code class="sourceCode latex"><span class="bu">\usepackage</span>[balance]{<span class="ex">nidanfloat</span>}</code></pre></div>
+<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が認識する寸法です.簡単な式(<code>10pt+10pt</code>のような)を使うこともできます.また,クラスオプションでは,場合によっては次のような特殊な値を使うこともできます.(これらはpLaTeX / upLaTeXではもとから利用可能ですが,LuaLaTeXでも利用可能なように処理されています.)<code>\jlreqsetup</code>内のような場所では,常に<code>\zw</code>や<code>\zh</code>により全角幅が記述できます.以下,たとえば<code>Q</code>が利用可能な場合は<code><寸法;Q></code>のように記述します.
+<ul>
+<li><code>Q</code>:0.25mmと解釈されます.</li>
+<li><code>zw</code>, <code>zh</code>:全角幅として解釈されます.</li>
+</ul></li>
+</ul>
+<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>jafontsize=<寸法;Q></code>:和文フォントサイズ.</li>
+<li><code>jafontscale=<実数値></code>:欧文フォントと和文フォントの比(和文 / 欧文).<code>fontsize</code>と<code>jafontsize</code>が両方指定されている場合は無視される.デフォルトは1.</li>
+<li><code>line_length=<寸法;zw,zh></code>:一行の長さ.デフォルトは字送り方向の紙幅の0.75倍.実際の値は一文字の長さの整数倍になるように補正されます.</li>
+<li><code>number_of_lines=<自然数値></code>:一ページの行数.デフォルトは行送り方向の紙幅の0.75倍になるような値.</li>
+<li><code>gutter=<寸法;zw,zh></code>:のどの余白の大きさ.
+<ul>
+<li><code>tate</code>無指定時は奇数ページ左,偶数ページ右の余白</li>
+<li><code>tate</code>指定時は奇数ページ右,偶数ページ左の余白</li>
+<li><code>twoside</code>が指定されていない時は,常に奇数ページ扱いで余白が設定される</li>
+</ul></li>
+<li><code>head_space=<寸法;zw,zh></code>:天の空き量.デフォルトは中央寄せになるような値.</li>
+<li><code>foot_space=<寸法;zw,zh></code>:地の空き量.デフォルトは中央寄せになるような値.</li>
+<li><code>baselineskip=<寸法;Q,zw,zh></code>:行送り.デフォルトは<code>jafontsize</code>の1.7倍.</li>
+<li><code>linegap=<寸法;Q,zw,zh></code>:行間.</li>
+<li><code>headfoot_sidemargin=<寸法;zw,zh></code>:柱やノンブルの左右の空き.</li>
+<li><code>column_gap=<寸法;zw,zh></code>:段間(<code>twocolumn</code>指定時のみ).</li>
+<li><code>sidenote_length=<寸法;zw,zh></code>:傍注の幅を指定します.</li>
+</ul>
+<h3>組み方</h3>
+<p>クラスオプションです.</p>
+<ul>
+<li><code>open_bracket_pos=[zenkaku_tentsuki/zenkakunibu_nibu/nibu_tentsuki]</code>:始め括弧が行頭に来た際の配置方法を指定します.それぞれ段落開始全角折り返し行頭天付き(デフォルト),段落開始全角二分折り返し行頭二分,段落開始二分折り返し行頭天付きを意味します.</li>
+<li><code>hanging_punctuation</code>:ぶら下げ組をします.</li>
+</ul>
+<h3>注関係</h3>
+<p><code>\jlreqsetup</code>で指定します.</p>
+<ul>
+<li><code>reference_mark=[inline/interlinear]</code>:合印の配置方法を指定します.<code>inline</code>にすると該当項目の後ろの行中に配置します.<code>interlinear</code>を指定すると該当項目の上(横組)または右(縦組)に配置します.</li>
+<li><code>sidenote_type=[number/symbol]</code>:傍注と本文との対応の方法を指定します.<code>number</code>が規定で,注の位置に通し番号が入り,それにより対応が示されます.<code>symbol</code>とすると,注の位置に特定の記号が入り,また注がついている単語が強調されます.</li>
+<li><code>sidenote_symbol=<記号></code>:<code>sidenote_symbol=symbol</code>の時に,注の位置に入る記号.デフォルト*</li>
+<li><code>sidenote_keyword_font=<命令></code>:<code>sidenote_symbol=symbol</code>の時に,注のついている単語のフォント指定.デフォルトは無し(強調しない)</li>
+<li><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>の直前に出力します.</li>
+</ul>
+<h3>キャプション</h3>
+<p>図表のキャプションを<code>\jlreqsetup</code>で変更できます.</p>
+<ul>
+<li><code>caption_font=<命令></code>:キャプション自身のフォントを指定します.</li>
+<li><code>caption_label_font=<命令></code>:キャプションのラベルのフォントを指定します.</li>
+</ul>
+<h3>引用</h3>
+<p><code>quote / quotation / verse</code>環境の挙動を<code>\jlreqsetup</code>で指定できます.</p>
+<ul>
+<li><code>quote_indent=<寸法></code>:字下げを指定します.デフォルトは2zwです.一行の長さが文字サイズの整数倍になるように調整されます.</li>
+<li><code>quote_end_indent=<寸法></code>:字上げを指定します.デフォルトは0zwです.</li>
+<li><code>quote_beforeafter_space=<寸法></code>:前後の空きを指定します.<code>quote_beforeafter_space=1\baselineskip</code>とすると一行あきます.</li>
+<li><code>quote_fontsize=[normalsize/small/footnotesize/scriptsize/tiny]</code>:フォントサイズを指定します.</li>
+</ul>
+<h3>箇条書き</h3>
+<p><code>\jlreqsetup</code>で指定します.</p>
+<ul>
+<li><code>itemization_beforeafter_space=<寸法></code>:箇条書きの前後の空きを指定します.</li>
+<li><code>itemization_itemsep=<寸法></code>:項目同士の空きを指定します.</li>
+</ul>
+<h3>定理環境</h3>
+<p><code>\jlreqsetup</code>で指定します.</p>
+<ul>
+<li><code>theorem_beforeafter_space=<寸法></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\vfil {\Huge\bfseries #1#2}}</code>のようにします.<code>#1</code>はラベルに,<code>#2</code>は見出し文字列に置き換えられます.</li>
+</ul>
+<h3>別行見出し</h3>
+<p><code>\DeclareBlockHeading</code>で作成します.<code>\<命令名>*[running head]{見出し文字列}[副題]</code>という書式の命令を作成します.設定は以下の通り.</p>
+<h4>書式関連</h4>
+<ul>
+<li><code>font=<命令></code>:見出しのフォントを指定します.</li>
+<li><code>subtitle_font=<命令></code>:副題のフォントを指定します.</li>
+<li><code>label_format=<命令></code>:ラベルのフォーマットを指定します.<code>label_format={第\thechapter 章}</code>などのようにします.</li>
+<li><code>subtitle_format=<命令></code>:副題のフォーマットを指定します.<code>subtitle_format={「#1」}</code>のようにします.<code>#1</code>が副題自身になります.</li>
+</ul>
+<h4>インデント関連</h4>
+<ul>
+<li><code>align=[left/center/right]</code>:見出し位置の横方向の配置場所を指定します.</li>
+<li><code>indent=<寸法></code>:見出し全体の字下げ量を指定します.</li>
+<li><code>end_indent=<寸法></code>:見出し全体の字上げ量を指定します.</li>
+<li><code>after_label_space=<寸法></code>:ラベル後,見出し文字列までの空きを指定します.</li>
+<li><code>second_heading_text_indent=[<寸法>/{<寸法>,<寸法>}]</code>:見出し文字列の二行目以降のインデントを指定します.一行目の頭を起点として指定しますが,<code>second_heading_text_indent=*1\zw</code>のように先頭に<code>*</code>をつけるとラベルの頭を起点としての指定になります.(ラベルがない時は一行目の頭が起点.)また,<code>second_heading_text_indent={<ラベルがある時>,<ラベルがない時>}</code>という指定をすると,ラベルの有無に応じて値を変更することができます.<code><ラベルがある時></code>の指定ではやはり<code>*</code>を使うことができます.</li>
+<li><code>subtitle_indent=<寸法></code>:副題のインデント量を指定します.見出し文字列の一行目を起点として指定します.</li>
+</ul>
+<h4 id="-1">その他</h4>
+<ul>
+<li><code>subtitle_break=[true/false]</code>:見出し文字列と副題の間を改行するか指定します.</li>
+<li><code>allowbreak_if_evenpage=[true/false]</code>:見出しが偶数ページにあった場合,その直後の改ページを許可します.</li>
+<li><code>pagebreak=[clearpage/cleardoublepage/clearcolumn/nariyuki]</code>:見出し直前の改ページを指定します.それぞれ,改ページ,改丁,改段,なりゆきです.</li>
+<li><code>afterindent=[true/false]</code>:見出し直後の段落の字下げを行うかを指定します.</li>
+<li><code>column_spanning=[true/false]</code>: 段抜きの見出しにします.pagebreak=clearpageまたはcleardoublepageの時にしか使えません.</li>
+</ul>
+<h4>行取り</h4>
+<p>行取りの指定は以下のいずれかの方法で行うことができます.</p>
+<ul>
+<li>行数を指定し,その中央に配置します.<code>lines=<自然数値></code>により行数を指定します.<code>before_lines=<自然数値></code>や<code>after_lines=<自然数値></code>により,さらに前後に追加する行数を指定します.たとえば<code>lines=3,after_lines=1</code>とすれば,四行の中に配置され,前の空きよりも後ろの空きの方が一行分大きくなります.<code>before_lines</code>により指定された空きはページ頭には入りませんが,<code>before_lines=*1</code>というように<code>*</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>
+<h4>連続して掲げる見出しの行取り</h4>
+<p><code>\SetBlockHeadingSpaces</code>により,見出しが連続して掲げられたときの行取りを設定することができます.<code>\SetBlockHeadingSpaces</code>は</p>
+<div class="sourceCode"><pre class="sourceCode latex"><code class="sourceCode latex"><span class="fu">\SetBlockHeadingSpaces</span>{
+  {_part{lines=3,before_lines=1},_section{lines=2},_subsection{lines=2}}
+  [lines=5]{_section,23pt,_subsection,16pt}
+}</code></pre></div>
+<p>のように使います.</p>
+<ul>
+<li>各々の<code>{}</code>内には<code>_<見出し命令名></code>か<code><寸法></code>をカンマ区切りで並べます.</li>
+<li>先頭に<code>[]</code>で囲まれた設定を追加できます.これは連続して掲げられた見出し全体への設定となります.<code>lines / before_lines / after_lines / before_space / after_space</code>が利用可能です.各々の意味は上述の行取り指定と同じです.</li>
+<li>寸法はそのまま空き量を表します.</li>
+<li><code>_<見出し命令名></code>の後に<code>{}</code>で囲まれた設定を追加することで,その見出しの空き量を設定します.設定しない場合は前後に空きが入りません.</li>
+<li>見出しに対する<code>{}</code>で囲まれた設定内では,<code>lines / before_lines / after_lines / before_space / after_space</code>が利用可能です.各々の意味は上述の行取り指定と同じです.</li>
+<li><code>{}</code>で囲まれた部分を<code>*</code>のみにすると(例えば<code>_section{*}</code>とすると)単独で掲げた場合と同じ設定を使います.</li>
+</ul>
+<p>なお,見出しが連続しているかは単純に別行見出しの命令が並んで書かれているかのみで判断します.従ってそれらの命令間に出力には関係しないような命令が挟まっていたとしても,見出しが連続して掲げられているとは判断されません.ただし,見出し命令の間に空白または<code>\label</code>のみが挟まれている場合は,見出しが連続していると判断されます.</p>
+<h3>同行見出し</h3>
+<p><code>\DeclareRuninHeading</code>で作成します.通常の文書クラスにおける<code>\section</code>と同様の,<code>\<命令名>*[running head]{見出し文字列}</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>after_space=<寸法></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>
+<div class="sourceCode"><pre class="sourceCode latex"><code class="sourceCode latex"><span class="fu">\ModifyHeading</span>{section}{lines=10}</code></pre></div>
+<p>とすると,<code>\section</code>のフォントなどの設定はそのままに,行取りのみが10行に変更されます.見出しの種類を変更することはできません.</p>
+<h3 id="saveheading"><code>\SaveHeading</code></h3>
+<p>見出し命令の定義を待避します.</p>
+<div class="sourceCode"><pre class="sourceCode latex"><code class="sourceCode latex"><span class="fu">\SaveHeading</span>{section}{<span class="fu">\restoresection</span>} <span class="co">% \sectionの中身を\restoresectionに待避.</span>
+<span class="fu">\RenewBlockHeading</span>{section}{1}{font=……} <span class="co">% \sectionを新しく定義する.</span>
+……
+<span class="fu">\restoresection</span> <span class="co">% \sectionの中身を元に戻す.</span></code></pre></div>
+<p>のように使います.</p>
+<h2>ページスタイル</h2>
+<pre><code>\DeclarePageStyle{<ページスタイル名>}{<設定>}</code></pre>
+<p>によりページスタイルを定義することができます.<code><設定></code>はkeyval形式です.定義したページスタイルは<code>\pagestyle</code>で適用できます.設定は以下の通り.</p>
+<ul>
+<li><code>yoko</code>:横書きで上下に出力します.デフォルト.</li>
+<li><code>tate</code>:縦書きで小口側に出力します.</li>
+<li><code>font=<命令></code>:柱とノンブルのフォントを指定します.</li>
+<li><code>running_head_position</code>, <code>nombre_position</code>:柱とノンブルの位置を指定します.<code>yoko</code>か<code>tate</code>のどちらが指定されているかで挙動が変わります.
+<ul>
+<li><code>yoko</code>指定時:<code>top-left</code>のように指定できます.<code>top/bottom/center/left/right/gutter/fore_edge</code>が使えます.<code>gutter</code>はのど,<code>fore_edge</code>は小口です.<code>left</code>,<code>right</code>の指定は奇数ページに対するものです.<code>twoside</code>が指定されている場合,偶数ページはその逆になります.</li>
+<li><code>tate</code>指定時:<code><寸法></code>が指定できます.<code>running_head_position</code>は柱の天からの下げ量を,<code>nombre_position</code>はノンブルの地からの上げ量を指定します.</li>
+</ul></li>
+<li><code>nombre=<書式></code>:出力するノンブルを指定します.デフォルトは<code>\thepage</code>.</li>
+<li><code>odd_running_head=<書式></code>,<code>even_running_head=<書式></code>:それぞれ奇数ページ,偶数ページの柱を指定します.<code>_section</code>のように<code>_</code>から始まる名前を指定すると,対応する見出しを出力します.(<code>_section</code>だと現在の<code>\section</code>を出力する.)</li>
+</ul>
+<p><code>\NewPageStyle</code>,<code>\RenewPageStyle</code>,<code>\ProvidePageStyle</code>もあります.<code>\ModifyPageStyle</code>により既存のページスタイルを改変することが可能です.</p>
+<h2 id="-2">その他</h2>
+<ul>
+<li>クラスオプション<code>jlreq_notes</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>
+<li>2017-03-14
+<ul>
+<li>いくつかバグを修正.</li>
+<li>和文ファミリを欧文ファミリに従属させるようにした.</li>
+<li><code>\DeclareBlockHeading</code>にオプションをたくさん追加.</li>
+<li>quote環境などを調整するオプションを追加.</li>
+</ul></li>
+<li>2017-03-20
+<ul>
+<li>バグ修正.</li>
+<li><code>\footnote / \sidenote / \endnote</code>の周りに必要ならば空白を挿入するようにした.</li>
+</ul></li>
+<li>2017-04-04
+<ul>
+<li>バグ修正.</li>
+<li><code>\DeclarePageStyle</code>に<code>tate</code>と<code>font</code>オプションを追加.</li>
+</ul></li>
+<li>2017-04-29
+<ul>
+<li>バグ修正</li>
+<li><code>jafontsize</code>と<code>jafontscale</code>をクラスオプションに,また<code>\jafontsize</code>を追加.</li>
+<li><code>\tatechuyoko</code>を追加.</li>
+<li>クラスオプション<code>jlreq_warnings</code>を<code>jlreq_notes</code>に変更.</li>
+<li>いくつかのクラスオプションを<code>\jlreqsetup</code>に移動.</li>
+<li>いくつかのオプションを<code>\jlreqsetup</code>に追加.</li>
+<li>クラスオプションの<code>paper={<縦>,<横>}</code>を<code>paper={<横>,<縦>}</code>に変更.</li>
+</ul></li>
+<li>2017-06-11
+<ul>
+<li><code>plext</code> / <code>lltjext</code>の読み込みを中止.</li>
+<li><code>\DeclareBlockHeading</code>に<code>align</code>を追加.<code>indent=center</code>や<code>end_indent=center</code>を廃止.</li>
+<li>一部の<code>\kcatcode</code> (upLaTeX時) を変更.</li>
+</ul></li>
+<li>2017-08-13
+<ul>
+<li><code>column_spanning</code>を<code>\DeclareBlockHeading</code>に追加.</li>
+<li>ページレイアウトにおける「本文の長さ」に傍注の長さを入れるようにした.</li>
+<li>傍注の長さのデフォルトを0とした.</li>
+<li>傍注の長さが0の時には<code>\sidenote</code>を定義しないようにした.</li>
+<li>和文間隔を挿入する命令を追加.</li>
+</ul></li>
+<li>2017-08-29
+<ul>
+<li>縦書きでも著者名が横書きで出てしまうバグを修正.</li>
+</ul></li>
+<li>2017-11-23
+<ul>
+<li>バグ修正</li>
+<li><code>\SetBlockHeadingSpaces</code>を追加.</li>
+<li><code>\contentsname</code> と <code>\indexname</code>に入っていたスペースを削除.</li>
+</ul></li>
+</ul>
+<hr />
+<p>Noriyuki Abe<br />
+<a href="https://github.com/abenori/jlreq" class="uri">https://github.com/abenori/jlreq</a></p>
+</article>
+</body>
+</html>

Modified: trunk/Master/texmf-dist/doc/latex/jlreq/jlreq.html
===================================================================
--- trunk/Master/texmf-dist/doc/latex/jlreq/jlreq.html	2017-11-23 21:05:53 UTC (rev 45893)
+++ trunk/Master/texmf-dist/doc/latex/jlreq/jlreq.html	2017-11-23 21:06:15 UTC (rev 45894)
@@ -1,139 +1,145 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <meta charset="utf-8">
-  <meta name="generator" content="pandoc">
-  <title>jlreq</title>
-  <style>
-    .markdown-body {
-      padding-top: 10px;
-      padding-bottom: 10px;
-      background-color: white;
-      padding: 30px;
-      line-height: 170%;
-    }
-    h1{
-      font-size: 200%;
-    }
-    h2{
-      border-style: solid;
-      border-width: 0 0 0.1em 0em;
-      padding: 0 0 0.2em 0em;
-      border-color: #EEEEEE;
-      margin-top: 2em;
-    }
-    h3{
-      border-style: solid;
-      border-width: 0 0 0 0.5em;
-      padding: 0 0 0 0.5em;
-      border-color: #EEEEEE;
-      margin-top: 2em;
-    }
-    code{
-      white-space: pre;
-      font-weight: normal;
-      background-color: #F4F4F4;
-      border-color: #F4F4F4;
-      border-style: solid;
-      border-width: .2em .5em;
-      border-radius: .2em;
-    }
-    pre{
-      background-color: #F8F8F8;
-      border-color: #F8F8F8;
-      border-width: 1em;
-      border-style: solid;
-      border-radius: .5em;
-      padding: 0;
-      margin: 0;
-      line-height: 130%;
-    }
-    pre code{
-      background-color: #F8F8F8;
-      border-style: none;
-    }
-  </style>
-</head>
-<body>
-<article class="markdown-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>Fixed bugs.</li>
-<li>Implement <code>abstract</code> environment.</li>
-<li>Changed/Added some keys to class option/<code>\jlreqsetup</code></li>
-<li>Stopped to load <code>pxrubirica</code>, <code>luatexja-ruby</code> and <code>nidanfloat</code>.</li>
-</ul></li>
-<li>2017-03-14
-<ul>
-<li>Fixed bugs.</li>
-<li><code>\sffamily</code> etc. also change the Japanese font family.</li>
-<li>Added many options to <code>\DeclareBlockHeading</code>.</li>
-<li>Some options related to <code>quote</code> environment etc.</li>
-</ul></li>
-<li>2017-03-20
-<ul>
-<li>Fixed bugs.</li>
-<li>Insert some spaces around <code>\footnote / \sidenote / \endnote</code>.</li>
-</ul></li>
-<li>2017-04-04
-<ul>
-<li>Fixed a bug.</li>
-<li>Added options <code>tate</code> and <code>font</code> to <code>\DeclarePageStyle</code>.</li>
-</ul></li>
-<li>2017-04-29
-<ul>
-<li>Fixed bugs.</li>
-<li>Added <code>jafontsize</code> and <code>jafontscale</code> options and <code>\jafontsize</code>.</li>
-<li>Added <code>\tatechuyoko</code>.</li>
-<li><code>jlreq_warnings</code> -> <code>jlreq_notes</code> (class option).</li>
-<li>Moved some class options to <code>\jlreqsetup</code>.</li>
-<li>Added some options to <code>\jlreqsetup</code>.</li>
-<li><code>paper={<height>,<width>}</code> -> <code>paper={<width>,<height>}</code>.</li>
-</ul></li>
-<li>2017-06-11
-<ul>
-<li>Stopped to load <code>plext</code> and <code>lltjext</code>.</li>
-<li>Added <code>align</code> to <code>\DeclareBlockHeading</code> and delete <code>indent=center</code>, <code>end_indent=center</code>.</li>
-<li>Changed <code>\kcatcode</code> for some characters (upLaTeX).</li>
-</ul></li>
-<li>2017-08-13
-<ul>
-<li>Added <code>column_spanning</code> to <code>\DeclareBlockHeading</code>.</li>
-<li>Sidenotes are a part of the main text now.</li>
-<li>Changed the default length of sidenotes to 0.</li>
-<li>jlreq does not define <code>\sidenote</code> if the length for sidenotes is zero.</li>
-<li>Added a command for the full-width ideographic space.</li>
-</ul></li>
-<li>2017-08-29
-<ul>
-<li>Fixed a bug.</li>
-</ul></li>
-</ul>
-<hr />
-<p>Noriyuki Abe<br />
-<a href="https://github.com/abenori/jlreq" class="uri">https://github.com/abenori/jlreq</a></p>
-</article>
-</body>
-</html>
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="utf-8">
+  <meta name="generator" content="pandoc">
+  <title>jlreq</title>
+  <style>
+    .markdown-body {
+      padding-top: 10px;
+      padding-bottom: 10px;
+      background-color: white;
+      padding: 30px;
+      line-height: 170%;
+    }
+    h1{
+      font-size: 200%;
+    }
+    h2{
+      border-style: solid;
+      border-width: 0 0 0.1em 0em;
+      padding: 0 0 0.2em 0em;
+      border-color: #EEEEEE;
+      margin-top: 2em;
+    }
+    h3{
+      border-style: solid;
+      border-width: 0 0 0 0.5em;
+      padding: 0 0 0 0.5em;
+      border-color: #EEEEEE;
+      margin-top: 2em;
+    }
+    code{
+      white-space: pre;
+      font-weight: normal;
+      background-color: #F4F4F4;
+      border-color: #F4F4F4;
+      border-style: solid;
+      border-width: .2em .5em;
+      border-radius: .2em;
+    }
+    pre{
+      background-color: #F8F8F8;
+      border-color: #F8F8F8;
+      border-width: 1em;
+      border-style: solid;
+      border-radius: .5em;
+      padding: 0;
+      margin: 0;
+      line-height: 130%;
+    }
+    pre code{
+      background-color: #F8F8F8;
+      border-style: none;
+    }
+  </style>
+</head>
+<body>
+<article class="markdown-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>Fixed bugs.</li>
+<li>Implement <code>abstract</code> environment.</li>
+<li>Changed/Added some keys to class option/<code>\jlreqsetup</code></li>
+<li>Stopped to load <code>pxrubirica</code>, <code>luatexja-ruby</code> and <code>nidanfloat</code>.</li>
+</ul></li>
+<li>2017-03-14
+<ul>
+<li>Fixed bugs.</li>
+<li><code>\sffamily</code> etc. also change the Japanese font family.</li>
+<li>Added many options to <code>\DeclareBlockHeading</code>.</li>
+<li>Some options related to <code>quote</code> environment etc.</li>
+</ul></li>
+<li>2017-03-20
+<ul>
+<li>Fixed bugs.</li>
+<li>Insert some spaces around <code>\footnote / \sidenote / \endnote</code>.</li>
+</ul></li>
+<li>2017-04-04
+<ul>
+<li>Fixed a bug.</li>
+<li>Added options <code>tate</code> and <code>font</code> to <code>\DeclarePageStyle</code>.</li>
+</ul></li>
+<li>2017-04-29
+<ul>
+<li>Fixed bugs.</li>
+<li>Added <code>jafontsize</code> and <code>jafontscale</code> options and <code>\jafontsize</code>.</li>
+<li>Added <code>\tatechuyoko</code>.</li>
+<li><code>jlreq_warnings</code> -> <code>jlreq_notes</code> (class option).</li>
+<li>Moved some class options to <code>\jlreqsetup</code>.</li>
+<li>Added some options to <code>\jlreqsetup</code>.</li>
+<li><code>paper={<height>,<width>}</code> -> <code>paper={<width>,<height>}</code>.</li>
+</ul></li>
+<li>2017-06-11
+<ul>
+<li>Stopped to load <code>plext</code> and <code>lltjext</code>.</li>
+<li>Added <code>align</code> to <code>\DeclareBlockHeading</code> and delete <code>indent=center</code>, <code>end_indent=center</code>.</li>
+<li>Changed <code>\kcatcode</code> for some characters (upLaTeX).</li>
+</ul></li>
+<li>2017-08-13
+<ul>
+<li>Added <code>column_spanning</code> to <code>\DeclareBlockHeading</code>.</li>
+<li>Sidenotes are a part of the main text now.</li>
+<li>Changed the default length of sidenotes to 0.</li>
+<li>jlreq does not define <code>\sidenote</code> if the length for sidenotes is zero.</li>
+<li>Added a command for the full-width ideographic space.</li>
+</ul></li>
+<li>2017-08-29
+<ul>
+<li>Fixed a bug.</li>
+</ul></li>
+<li>2017-11-23
+<ul>
+<li>Fixed bugs.</li>
+<li>Added <code>\SetBlockHeadingSpaces</code>.</li>
+<li>Removed a space from <code>\contentsname</code> and <code>\indexname</code>.</li>
+</ul></li>
+</ul>
+<hr />
+<p>Noriyuki Abe<br />
+<a href="https://github.com/abenori/jlreq" class="uri">https://github.com/abenori/jlreq</a></p>
+</article>
+</body>
+</html>

Modified: trunk/Master/texmf-dist/tex/latex/jlreq/jlreq.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/jlreq/jlreq.cls	2017-11-23 21:05:53 UTC (rev 45893)
+++ trunk/Master/texmf-dist/tex/latex/jlreq/jlreq.cls	2017-11-23 21:06:15 UTC (rev 45894)
@@ -1,4413 +1,4838 @@
-%% 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/08/29 jlreq]
-\RequirePackage{xkeyval,everyhook,filehook,etoolbox,ifthen}
-
-%. helper1
-\newcount\jlreq at tempcnta
-\newcount\jlreq at tempcntb
-\newcount\jlreq at tempcntc
-\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
-\newskip\jlreq at resultskip
-\newbox\jlreq at resultbox
-\newif\ifjlreq at result
-
-\newcommand*{\jlreq at undefcs}[1]{%
-  \ifundef{#1}{\ClassError{jlreq}{Trying to delete \string#1\space even though it is not defined, maybe a bug}{\@ehc}}{\undef{#1}}%
-}
-
-% クラスファイル内でしか使わないマクロをクラスファイル終了時に未定義にする
-\newcommand*{\jlreq at aftercls@addtodeletecs}[1]{%
-  \appto\jlreq at aftercls@deletecslist{\jlreq at undefcs{#1}}%
-}
-\jlreq at aftercls@addtodeletecs{\jlreq at aftercls@addtodeletecs}
-\newcommand*{\jlreq at aftercls@addtodeleteif}[1]{%
-  \edef\@tempa{\expandafter\@gobble\string#1}%
-  \edef\@tempa{\expandafter\@gobbletwo\@tempa}%
-  \eappto\jlreq at aftercls@deletecslist{%
-    \unexpanded{\jlreq at undefcs{#1}}%
-    \noexpand\jlreq at undefcs{\expandonce{\csname\@tempa true\endcsname}}%
-    \noexpand\jlreq at undefcs{\expandonce{\csname\@tempa false\endcsname}}%
-  }%
-}
-\jlreq at aftercls@addtodeletecs{\jlreq at aftercls@addtodeleteif}
-\AtEndOfClass{%
-  \jlreq at aftercls@deletecslist
-  \jlreq at undefcs{\jlreq at aftercls@deletecslist}%
-  \undef{\jlreq at undefcs}%
-}
-
-\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の先頭トークンが#2か
-\long\def\jlreq at iffirsttoken#1#2{%
-  \expandafter\expandafter\expandafter\ifx\jlreq at getfirsttoken#1\jlreq at uniqtoken{}\jlreq at endmark #2\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
-}
-% #1が\jlreq at endmarkか
-\long\def\jlreq at ifendmark#1{\jlreq at iffirsttoken{#1}{\jlreq at endmark}}
-
-% @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}
-
-% 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}{\eappto\jlreq at do{\unexpanded{#4}}}%
-  \jlreq at helper@parsekeyval@@@{#1}%
-}
-\long\def\jlreq at helper@parsekeyval@@@definekeywithdefault#1#2#3{%
-  \define at key{#1}{#2}[]{\eappto\jlreq at do{\unexpanded{#3}}}%
-  \jlreq at helper@parsekeyval@@@{#1}%
-}
-\long\def\jlreq at helper@parsekeyval@@@definekey#1#2#3{%
-  \define at key{#1}{#2}{\eappto\jlreq at do{\unexpanded{#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
-    \edef\jlreq at tempa{#1}%
-    \expandafter\jlreq at helper@switch@\expandafter{\jlreq at tempa}#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{}%
-  }{%
-    \def\jlreq at tempa{#1}% 最初に\edefで展開済み
-    \edef\jlreq at tempb{#2}%
-    \ifx\jlreq at tempa\jlreq at tempb\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
-    {%
-      \edef\jlreq at do{\unexpanded{#3}}%
-      \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}
-
-\RequirePackage[savepos]{zref}
-\zref at newprop*{jlreq at page}[0]{\number\c at page}
-\zref at addprop{main}{jlreq at page}
-% 現在のページを得る
-\newcount\jlreq at zref@reference at count
-\jlreq at zref@reference at count=0
-\newcount\jlreq at currentpage
-\newcommand*{\jlreq at setcurrentpage}{%
-  \global\advance\jlreq at zref@reference at count by 1
-  \zref at labelbyprops{jlreq at rest@width.page.\the\jlreq at zref@reference at count}{jlreq at page}%
-  \global\jlreq at currentpage=\zref at extractdefault{jlreq at rest@width.page.\the\jlreq at zref@reference at count}{jlreq at page}{\c at page}%
-}
-
-\def\jlreq at saveoriginalcs#1{%
-  \@ifundefined{jlreq at original@#1}{}{%
-    \ClassError{jlreq}{Trying to save \expandafter\string\csname #1\endcsname\space twice, maybe a bug}{\@ehc}%
-  }%
-  \expandafter\expandafter\expandafter\let\expandafter\expandafter\csname jlreq at original@#1\endcsname\csname #1\endcsname
-}
-
-% #1の先頭が文字か
-\def\jlreq at isletter#1{%
-  \expandafter\expandafter\expandafter\jlreq at helper@isletter\jlreq at getfirsttoken#1\jlreq at uniqtoken{}\jlreq at endmark
-}
-\def\jlreq at helper@isletter#1{%
-  \ifnum
-    0\ifcat 阿\noexpand #11\fi
-    \ifcat あ\noexpand #11\fi
-    \ifcat (\noexpand #11\fi
-    \ifcat A\noexpand #11\fi
-    \ifcat 1\noexpand #11\fi
-  >0
-    \expandafter\@firstoftwo\else\expandafter\@secondoftwo
-  \fi
-}
-
-\def\jlreq at helper@checktokenlist#1#2{%
-  \jlreq at ifendmark{#2}{\@firstoftwo}%
-  {%
-    \ifnum0#1{#2}>0 \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
-      {\jlreq at helper@checktokenlist{#1}}%
-      {\expandafter\@secondoftwo\jlreq at deleteuntileendmark}%
-  }%
-}
-\def\jlreq at helper@chknumlist#1{\ifx#101\fi\ifx#111\fi\ifx#121\fi\ifx#131\fi\ifx#141\fi\ifx#151\fi\ifx#161\fi\ifx#171\fi\ifx#181\fi\ifx#191\fi}
-\def\jlreq at helper@chkfloatlist#1{\jlreq at helper@chknumlist{#1}\ifx#1.1\fi}
-% #1が[0-9\.]*に当てはまるか.
-\def\jlreq at iffloat#1{\jlreq at helper@checktokenlist{\jlreq at helper@chkfloatlist}#1\jlreq at endmark}
-\def\jlreq at ifnumber#1{\jlreq at helper@checktokenlist{\jlreq at helper@chknumlist}#1\jlreq at endmark}
-
-%. オプションの定義
-% オプション処理の際にしか使わない変数(後でそれを元に別の変数を調整する)
-% ものは\jlreq at option@<key>に格納する.
-% _とかは@に変換する.
-% 引数無しの\DeclareOptionX
-\newcommand*{\jlreq at DeclareOption}[2]{%
-  \DeclareOptionX{#1}{%
-    \jlreq at ifempty{##1}{}{\ClassError{jlreq}{The option #1 should have no value}{\@ehc}}%
-    #2%
-  }
-}
-\jlreq at aftercls@addtodeletecs{\jlreq at DeclareOption}
-% エンジン類
-\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{}
-\jlreq at aftercls@addtodeletecs{\jlreq at switchpapersize}
-% \jlreq at addpapersize{paper=に指定するもの}{単独オプション名}{横}{縦}
-\newcommand*{\jlreq at addpapersize}[4]{%
-  \@for\@tempa:=#1\do{%
-    \eappto\jlreq at switchpapersize{{\expandonce{\@tempa}}{\unexpanded{\setlength{\paperwidth}{#3}\setlength{\paperheight}{#4}}}}%
-  }%
-  \@for\@tempa:=#2\do{%
-    \expandafter\jlreq at DeclareOption\expandafter{\@tempa}{\setlength{\paperwidth}{#3}\setlength{\paperheight}{#4}}%
-  }%
-}
-\jlreq at aftercls@addtodeletecs{\jlreq at addpapersize}
-\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{\paperwidth}{\dimexpr\jlreq at tempc\relax}%
-        \setlength{\paperheight}{\dimexpr\jlreq at tempd\relax}%
-      \else
-        \ClassError{jlreq}{The paper #1 is unknown}{\@ehc}%
-      \fi
-    }]%
-  }%
-  \jlreq at do
-}
-% 紙サイズ一覧.b*はJIS B.
-\jlreq at addpapersize{a0,A0}{}{841mm}{1189mm}
-\jlreq at addpapersize{a1,A1}{}{594mm}{841mm}
-\jlreq at addpapersize{a2,A2}{}{420mm}{594mm}
-\jlreq at addpapersize{a3,A3}{a3paper}{297mm}{420mm}
-\jlreq at addpapersize{a4,A4}{a4paper}{210mm}{297mm}
-\jlreq at addpapersize{a5,A5}{a5paper}{148mm}{210mm}
-\jlreq at addpapersize{a6,A6}{a6paper}{105mm}{148mm}
-\jlreq at addpapersize{a7,A7}{}{74mm}{105mm}
-\jlreq at addpapersize{a8,A8}{}{52mm}{74mm}
-\jlreq at addpapersize{a9,A9}{}{37mm}{52mm}
-\jlreq at addpapersize{a10,A10}{}{26mm}{37mm}
-
-\jlreq at addpapersize{b0,B0}{}{1030mm}{1456mm}
-\jlreq at addpapersize{b1,B1}{}{728mm}{1030mm}
-\jlreq at addpapersize{b2,B2}{}{515mm}{728mm}
-\jlreq at addpapersize{b3,B3}{}{364mm}{515mm}
-\jlreq at addpapersize{b4,B4}{b4paper}{257mm}{364mm}
-\jlreq at addpapersize{b5,B5}{b5paper}{182mm}{257mm}
-\jlreq at addpapersize{b6,B6}{b6paper}{128mm}{182mm}
-\jlreq at addpapersize{b7,B7}{}{91mm}{128mm}
-\jlreq at addpapersize{b8,B8}{}{64mm}{91mm}
-\jlreq at addpapersize{b9,B9}{}{45mm}{64mm}
-\jlreq at addpapersize{b10,B10}{}{32mm}{45mm}
-
-\jlreq at addpapersize{c2,C2}{}{458mm}{648mm}
-\jlreq at addpapersize{c3,C3}{}{324mm}{458mm}
-\jlreq at addpapersize{c4C,C4}{}{229mm}{354mm}
-\jlreq at addpapersize{c5,C5}{}{162mm}{229mm}
-\jlreq at addpapersize{c6,C6}{}{114mm}{162mm}
-\jlreq at addpapersize{c7,C7}{}{81mm}{114mm}
-\jlreq at addpapersize{c8,C8}{}{57mm}{81mm}
-
-\jlreq at addpapersize{a4var}{}{210mm}{283mm}
-\jlreq at addpapersize{b5var}{}{182mm}{230mm}
-
-\jlreq at addpapersize{letter}{letterpaper}{8.5in}{11in}
-\jlreq at addpapersize{legal}{legalpaper}{8.5in}{14in}
-\jlreq at addpapersize{executive}{executivepaper}{7.25in}{10.5in}
-
-
-%.. フォントサイズ,行長,1ページあたりの行数で基本版面のサイズを決める(2.4.1.a)
-\newcommand*{\jlreq at option@fontsize}{}
-\jlreq at aftercls@addtodeletecs{\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@jafontsize}{}
-\jlreq at aftercls@addtodeletecs{\jlreq at option@jafontsize}
-\DeclareOptionX{jafontsize}{\renewcommand*{\jlreq at option@jafontsize}{#1}}
-\newcommand*{\jlreq at option@jafontscale}{1}
-\DeclareOptionX{jafontscale}{\renewcommand*{\jlreq at option@jafontscale}{#1}}
-\jlreq at aftercls@addtodeletecs{\jlreq at option@jafontscale}
-%.. 行の長さ
-\newcommand*{\jlreq at option@line at length}{}
-\jlreq at aftercls@addtodeletecs{\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}{}
-\jlreq at aftercls@addtodeletecs{\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}{}
-\jlreq at aftercls@addtodeletecs{\jlreq at option@head at space}
-\DeclareOptionX{head_space}{\renewcommand*{\jlreq at option@head at space}{#1}}
-
-%.. 地
-\newcommand*{\jlreq at option@foot at space}{}
-\jlreq at aftercls@addtodeletecs{\jlreq at option@foot at space}
-\DeclareOptionX{foot_space}{\renewcommand*{\jlreq at option@foot at space}{#1}}
-%.. のど
-\newcommand*{\jlreq at option@gutter}{}
-\jlreq at aftercls@addtodeletecs{\jlreq at option@gutter}
-\DeclareOptionX{gutter}{\renewcommand*{\jlreq at option@gutter}{#1}}
-
-%.. 柱とノンブル
-\newcommand*{\jlreq at option@headfoot at verticalpos}{}
-\jlreq at aftercls@addtodeletecs{\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}
-\jlreq at aftercls@addtodeletecs{\jlreq at option@column at gap}
-\DeclareOptionX{column_gap}{\renewcommand*{\jlreq at option@column at gap{#1}}}
-
-%.. 行送り,指定無しの場合は文字サイズの1.7倍とする.(1.5から2倍が好ましい:2.4.2.d 注3)
-\newcommand*{\jlreq at option@baselineskip}{17zw/10}
-\jlreq at aftercls@addtodeletecs{\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}
-
-%.. 注
-% 傍注のタイプ
-\newcommand*{\jlreq at option@sidenote at length}{0pt}
-\jlreq at aftercls@addtodeletecs{\jlreq at option@sidenote at length}
-\DeclareOptionX{sidenote_length}{\renewcommand*{\jlreq at option@sidenote at length}{#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}
-
-\newif\ifjlreq at option@twoside\jlreq at option@twosidefalse % onesideかtwosideが指定された
-\jlreq at aftercls@addtodeleteif{\ifjlreq at option@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 aftercls@addtodeleteif{\ifjlreq at option@open}
-\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 note}[1]{}
-\jlreq at DeclareOption{jlreq_notes}{\renewcommand*{\jlreq at note}[1]{\message{^^JJLReq note: ##1^^J}}}
-
-\ExecuteOptionsX{article_type=article,paper=a4,open_bracket_pos=zenkaku_tentsuki,onecolumn,final}
-% \@removeelementを一旦置き換えてから\ProcessOptionsXを実行する
-\let\jlreq at original@@removeelement=\@removeelement
-\let\@removeelement=\jlreq at helper@removeelement
-\ProcessOptionsX\relax
-\let\@removeelement=\jlreq at original@@removeelement
-\let\jlreq at original@@removeelement=\@undefined
-
-\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}}{%
-  \if at openright
-    \ClassWarningNoLine{jlreq}{The option `openright' is ignored in article}
-    \@openrightfalse
-  \fi
-}{}
-\ifjlreq at option@twoside\else
-  \ifthenelse{\equal{\jlreq at article@type}{book}}{\@twosidetrue}{\@twosidefalse}
-\fi
-
-\def\jlreq at jlreqsetup@keyvallist{}
-\def\jlreq at jlreqsetup@finally{}
-\newcommand{\jlreqsetup}[1]{%
-  \begingroup
-    \edef\jlreq at do{\unexpanded{\jlreq at parsekeyval[jlreqsetup]}{\expandonce{\jlreq at jlreqsetup@keyvallist}}}%
-  \expandafter\endgroup
-  \jlreq at do{#1}%
-  \jlreq at jlreqsetup@finally
-}
-% \jlreqsetupの項目に加えるマクロ.\jlreq at jlreqsetup@add{key}{action}とするとkeyに対して定義できる.
-% action内ではvalが#1として取得できる.(従ってaction内でマクロを定義する際には##1を使う必要がある.)
-\newcommand{\jlreq at jlreqsetup@add}[1]{%
-  \@ifnextchar[{\jlreq at jlreqsetup@add@{#1}}{\jlreq at jlreqsetup@add@@{#1}}%
-}
-\long\def\jlreq at jlreqsetup@add@#1[#2]#3{%
-  \eappto\jlreq at jlreqsetup@keyvallist{\unexpanded{{#1}[#2]{#3}}}%
-}
-\long\def\jlreq at jlreqsetup@add@@#1#2{%
-  \eappto\jlreq at jlreqsetup@keyvallist{\unexpanded{{#1}{#2}}}%
-}
-% \jlreqsetupの最後に必ず実行される処理を入れる.
-\newcommand\jlreq at jlreqsetup@addtofinally[1]{\eappto\jlreq at jlreqsetup@finally{\unexpanded{#1}}}
-\jlreq at aftercls@addtodeletecs{\jlreq at jlreqsetup@add}
-\jlreq at aftercls@addtodeletecs{\jlreq at jlreqsetup@add@}
-\jlreq at aftercls@addtodeletecs{\jlreq at jlreqsetup@add@@}
-\jlreq at aftercls@addtodeletecs{\jlreq at jlreqsetup@addtofinally}
-\@onlypreamble\jlreqsetup
-
-% エンジンの設定
-\ifx\jlreq at engine\@undefined
-  \ifx\directlua\@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
-\if at tate
-  \AtBeginDocument{\tate\message{《縦組モード》}\adjustbaseline}
-\fi
-
-% \jlreq at gol(Gyo Okuri Length), \jlreq at mol (Moji Okuri Length)を定義
-\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
-
-%. helper2(エンジン依存系)
-% 組方向を判定
-% \jlreq at if(y|t)(dir|box)を定義する.
-\ifx l\jlreq at engine\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi{
-  \def\jlreq at ifydir{\ifnum\ltjgetparameter{direction}=4 \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-  \def\jlreq at iftdir{\ifnum\numexpr\ltjgetparameter{direction}-(\ltjgetparameter{direction}/8)*8\relax=3 \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-  \def\jlreq at ifybox#1{\ifnum\ltjgetparameter{boxdir}{#1}=4 \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-  \def\jlreq at iftbox#1{\ifnum\numexpr\ltjgetparameter{boxdir}{#1}-(\ltjgetparameter{boxdir}{#1}/8)*8\relax=3 \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-}{
-  \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
-  \newcommand*{\jlreq at getpostbreakpenalty}[1]{\ltjgetparameter{postbreakpenalty}{#1}}
-\else
-  \newcommand*{\jlreq at getpostbreakpenalty}[1]{\postbreakpenalty#1}
-\fi
-
-% 現在行の残りを得る.
-\ifx l\jlreq at engine
-  % 以下のコードはおかしい.
-  \newcommand*{\jlreq at calc@current at linewidth@onecolumn}{%
-    \dimexpr\zposx{jlreq at rest@width.pos.\the\jlreq at zref@reference at count} sp - \@totalleftmargin -
-    \ifodd\jlreq at currentpage
-      \oddsidemargin
-    \else
-      \evensidemargin
-    \fi
-    - 1in - \hoffset\relax
-  }
-\else
-  \newcommand*{\jlreq at calc@current at linewidth@onecolumn}{%
-    \dimexpr
-      \jlreq at ifydir{%
-        \zposx{jlreq at rest@width.pos.\the\jlreq at zref@reference at count} sp - \hoffset
-        \ifodd\jlreq at currentpage
-          - \oddsidemargin
-        \else
-          - \evensidemargin
-        \fi
-      }{%
-        \ifdim\pdfpagewidth=0pt
-          \paperheight
-        \else
-          \pdfpageheight
-        \fi
-        - \topmargin - \headheight - \headsep - \voffset
-        - \zposy{jlreq at rest@width.pos.\the\jlreq at zref@reference at count} sp
-      }%
-      - \@totalleftmargin - 1in
-    \relax
-  }
-\fi
-\newcommand*{\jlreq at calc@current at linewidth}{%
-  \dimexpr\jlreq at calc@current at linewidth@onecolumn
-    \if at twocolumn
-      \ifdim\jlreq at calc@current at linewidth@onecolumn<\dimexpr\linewidth+\columnsep\relax\else
-        - \linewidth - \columnsep
-      \fi
-   \fi
- \relax
-}
-
-\newdimen\jlreq at current@linewidth
-\newdimen\jlreq at rest@linewidth
-% この命令以降,次にこの命令を実行する前まで\jlreq at current@linewidth/\jlreq at rest@linewidthで
-% この行の行頭からの長さ/残りの長さが取得できる
-\newcommand*{\jlreq at savepos@for at rest@linewidth}{%
-  \jlreq at setcurrentpage
-  \global\advance\jlreq at zref@reference at count by 1\relax
-  \zsavepos{jlreq at rest@width.pos.\the\jlreq at zref@reference at count}%
-  \global\jlreq at current@linewidth=\jlreq at calc@current at linewidth
-  \global\jlreq at rest@linewidth=\dimexpr\linewidth - \jlreq at current@linewidth\relax
-  \edef\jlreq at savepos@iflabelundefined{\noexpand\zref at ifrefundefined{jlreq at rest@width.pos.\the\jlreq at zref@reference at count}}%
-}
-
-\ifx l\jlreq at engine
-  \newcommand*{\lastnodechar}{\directlua{luatexja.pltx_composite_last_node_char()}}% undocumented
-\fi
-
-% #1と#2の間に入るjmglue((x)kanjiskipも)を\jlreq at resultskipに入れる
-\ifx l\jlreq at engine
-  \newcommand*{\jlreq at calc@jfmglue}[2]{%
-    \begingroup
-      \setbox\jlreq at tempboxa=\hbox{\inhibitglue #1\inhibitglue\hbox{}\inhibitglue#2\inhibitglue}%
-      \setbox\jlreq at tempboxb=\hbox{\inhibitglue #1#2\inhibitglue}%
-      \edef\jlreq at do{\noexpand\jlreq at resultskip=\the\dimexpr\wd\jlreq at tempboxb - \wd\jlreq at tempboxa\relax\noexpand\relax}%
-      \jlreq at do
-      \directlua{
-        local width = 0
-        local stretch = 0
-        local shrink = 0
-        local n = tex.box["jlreq at tempboxb"].head
-        while n do
-          if n.id == node.id("glue") then
-            width = width + n.width
-            stretch = stretch + n.stretch
-            shrink = shrink + n.shrink
-          end
-          n = n.next
-        end
-        tex.setglue("jlreq at tempskipa",width,stretch,shrink)
-      }%
-      % TeXで計測した物と一致していなければTeXでの方を信じる
-      \ifdim\jlreq at resultskip=\jlreq at tempskipa
-        \edef\jlreq at do{\noexpand\jlreq at resultskip=\the\jlreq at tempskipa\relax}%
-      \fi
-    \expandafter\endgroup
-    \jlreq at do
-  }
-\else
-  \newcommand*{\jlreq at calc@jfmglue}[2]{%
-    \begingroup
-      \setbox\jlreq at tempboxa=\hbox{\inhibitglue #1\inhibitglue\hbox{}\inhibitglue#2\inhibitglue}%
-      \setbox\jlreq at tempboxb=\hbox{\inhibitglue #1#2\inhibitglue}%
-      \edef\jlreq at do{\noexpand\jlreq at resultskip=\the\dimexpr\wd\jlreq at tempboxb - \wd\jlreq at tempboxa\relax\noexpand\relax}%
-    \expandafter\endgroup
-    \jlreq at do
-  }
-\fi
-\newcount\jlreq at lastnodechar
-% \jlreq at fixjfm<次の文字>の形で使う.
-% jlreq at lastnodecharに入っている値と次のトークン(\futureletで得る)の間に入るJFMグルー等を挿入する
-\newcommand*{\jlreq at fixjfm}{%
-  \ifnum\jlreq at lastnodechar>-1
-    \def\jlreq at do{%
-      \ifnum\jlreq at getpostbreakpenalty{\jlreq at lastnodechar}=0\else\penalty\jlreq at getpostbreakpenalty{\jlreq at lastnodechar}\fi
-      \jlreq at isletter{\jlreq at nextchar}{%
-        \jlreq at calc@jfmglue{\char\jlreq at lastnodechar}{\jlreq at nextchar}%
-%        \message{fixjfm Insert: \the\jlreq at resultskip}%
-        \hskip\jlreq at resultskip
-        \inhibitglue
-      }{}%
-    }%
-    \def\@tempa{%
-      \futurelet\jlreq at nextchar\jlreq at do
-    }%
-  \else\def\@tempa{}\fi
-  \@tempa
-}
-
-% #1÷#2を\jlreq at resultdimenに入れる.(#1,#2は寸法を与える.)
-\ifx l\jlreq at engine
-  \newcommand*{\jlreq at divide}[2]{%
-    \jlreq at resultdimen=\directlua{tex.print(tostring(\strip at pt\dimexpr #1\relax/\strip at pt\dimexpr #2\relax) .. "pt ")}%
-  }
-\else
-  \newcommand*{\jlreq at divide}[2]{%
-    \begingroup
-      \@tempdima=#1\relax\@tempdimb=#2\relax
-      % 分母を正にする
-      \ifdim\@tempdimb<0pt \@tempdima=-\@tempdima\@tempdimb=-\@tempdimb\fi
-      % \jlreq at tempdima*\@tempdimb <= \@tempdima < (\jlreq at tempdima + 1)*\@tempdimb
-      % となる整数\jlreq at tempdimaを捜し,\jlreq at tempdimb=\jlreq at tempdima + 1とする
-      \jlreq at tempdima=0pt
-      \ifdim\@tempdima<0pt
-        \loop\ifdim\strip at pt\jlreq at tempdima\@tempdimb>\@tempdima\advance\jlreq at tempdima by -1pt\repeat
-      \else
-        \loop\ifdim\strip at pt\jlreq at tempdima\@tempdimb<\@tempdima\advance\jlreq at tempdima by 1pt\repeat
-        \ifdim\strip at pt\jlreq at tempdima\@tempdimb=\@tempdima\else\advance\jlreq at tempdima by -1pt\fi
-      \fi
-      \jlreq at tempdimb=\dimexpr\jlreq at tempdima + 1pt\relax
-      % \jlreq at tempdimaと\jlreq at tempdimbで挟んでいく二分法
-      \jlreq at tempcnta=0 % 無限ループを避けるためのカウンタ
-      \loop\ifnum\numexpr\ifdim\dimexpr\jlreq at tempdimb - \jlreq at tempdima\relax>1sp 1\else0\fi*\ifnum\jlreq at tempcnta<100 1\else 0\fi\relax=1
-        \jlreq at tempdimc=\dimexpr(\jlreq at tempdima+\jlreq at tempdimb)/2\relax
-        \ifdim\strip at pt\jlreq at tempdimc\@tempdimb>\@tempdima\jlreq at tempdimb=\jlreq at tempdimc
-        \else\jlreq at tempdima=\jlreq at tempdimc\fi
-        \advance\jlreq at tempcnta by 1
-      \repeat
-      \edef\jlreq at do{\noexpand\jlreq at resultdimen=\the\jlreq at tempdima\noexpand\relax}%
-    \expandafter\endgroup
-    \jlreq at do
-  }
-\fi
-
-%. 基本設定
-\providecommand*{\jlreq at kanjiskip}{0pt plus 0.25\zw minus 0pt}
-\providecommand*{\jlreq at xkanjiskip}{0.25\zw plus 0.25\zw minus 0.125\zw}
-\ifx l\jlreq at engine
-  \ltjsetparameter{kanjiskip=\jlreq at kanjiskip}
-  \ltjsetparameter{xkanjiskip=\jlreq at xkanjiskip}
-\else
-  \kanjiskip=\jlreq at kanjiskip
-  \xkanjiskip=\jlreq at xkanjiskip
-\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 aftercls@addtodeletecs{\jlreq at setpostbreakpenalty}
-\jlreq at aftercls@addtodeletecs{\jlreq at setprebreakpenalty}
-\jlreq at aftercls@addtodeletecs{\jlreq at setjaxspmode}
-
-\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%とか……
-
-%.. 文字範囲
-\ifx u\jlreq at engine
-  % \kcatcodeの設定
-  \def\jlreq at setkcatcode#1#2{\@for\@tempa:=#1\do{\kcatcode"\@tempa=#2\relax}}
-  \jlreq at aftercls@addtodeletecs{\jlreq at setkcatcode}
-  % LuaTeX-jaのデフォルトのままに近い設定をする
-  % 範囲1&8
-  \jlreq at setkcatcode{80}{15} % Latin-1 Supplement,どうしよう……
-  \jlreq at setkcatcode{100,180,250,2B0,300,1E00}{15}
-  % 範囲2
-  \jlreq at setkcatcode{370,400,1F00}{18}
-  % 範囲3
-  \jlreq at setkcatcode{2000,2070,20A0,20D0,2100,2150,2190,2200,2300,2400,2500,2580,25A0,2600,2700,2900,2980,2B00}{18}
-  % 範囲4
-  \jlreq at setkcatcode{500,530,590,600,700,750,780,7C0,800,840,8A0,900,980,A00,A80,B00,B80,C00,C80,D00,D80,E00,E80,F00,1000,10A0,1200,1380,13A0,1400,1680,16A0,1700,1720,1740,1760,1780,1800,18B0,1900,1950,1980,19E0,1A00,1A20,1AB0,1B00,1B80,1BC0,1C00,1C50,1C80,1CC0,1CD0,1D00,1D80,1DC0,2400,2440,27C0,27F0,2800,2A00,2C00,4DC0,A4D0,A500,A640,A6A0,A700,A720,A800,A840,A880,A8E0,A900,A930,A960,A980,A9E0,AA00,AA60,AA80,AAE0,AB00,AB30,AB70,ABC0,FB00,FB50,FE00,FE20,FE70,10000,10080,10100,10140,10190,101D0,10280,102A0,102E0,10300,10330,10350,10380,103A0,10400,10450,10480,104B0,10500,10530,10600,10800,10840,10860,10880,108E0,10900,10920,10980,109A0,10A00,10A60,10A80,10AC0,10B00,10B40,10B60,10B80,10C00,10C80,10E60,11000,11080,110D0,11100,11150,11180,111E0,11200,11280,112B0,11300,11400,11480,11580,11600,11660,11680,11700,118A0,11AC0,11C00,11C70,12000,12400,12480,13000,14400,16800,16A40,16AD0,16B00,16F00,16FE0,17000,18800,1B000,1BC00,1BCA0,1D000,1D100,1D200,1D300,1D360,1D400,1D800,1E000,1E800,1E900,1EE00,1F000,1F030,1F0A0,1F100,1F200,1F300,1F600,1F650,1F680,1F700,1F780,1F800,1F900,E000}{15}
-  % 範囲5(Variation Selectors SupplementはLuaTeX-jaではE01F0--E01EFまで範囲5,他は範囲6)
-  \jlreq at setkcatcode{D800,DB80,DC00,E0000,F0000,100000}{15}
-  % 範囲6
-  \jlreq at setkcatcode{3040,30A0,31F0}{17} % Hiragana,Katakana,Katakana Phonetic Extensions
-  \jlreq at setkcatcode{2460,3000,3200,3300,FE10,FE30,FE50,E0100}{18} % Enclosed Alphanumerics,CJK Symbols and Punctuation,Enclosed CJK Letters and Months,CJK Compatibility,Vertical Forms,CJK Compatibility Forms,Small Form Variants,Variation Selectors Supplement
-  \jlreq at setkcatcode{2E80,3190,3400,4E00,F900,20000}{16}
-  % 範囲7
-  \jlreq at setkcatcode{A000,A490}{18} % Yi Syllables,Yi Radicals
-  \jlreq at setkcatcode{1100,3130,AC00,D7B0}{19} % Hangul Jamo,Hangul Compatibility Jamo,Hangul Syllables,Hangul Jamo Extended-B
-  \jlreq at setkcatcode{2F00,2FF0,3100,31A0,31C0,A830}{16}
-\fi
-
-% フォントサイズを設定
-\newdimen\jlreq at fontsize
-\newdimen\jlreq at jafontsize
-\ifx l\jlreq at engine
-  % Q,zw,zhが正しく扱われるようになる.\dimexprつきに展開される.
-  \def\jlreq at expand@optionfontsize#1{%
-    \dimexpr\directlua{
-      local act = string.char(92)
-      local s = [[#1]]
-      s = s:gsub("Q",act .. "dimexpr 0.25mm" .. act .. "relax")
-      tex.print(s)
-    }\relax
-  }%
-\else
-  \def\jlreq at expand@optionfontsize#1{\dimexpr#1\relax}
-\fi
-\jlreq at aftercls@addtodeletecs{\jlreq at expand@optionfontsize}
-\ifx\jlreq at option@fontsize\@empty
-  \ifx\jlreq at option@jafontsize\@empty
-    \jlreq at fontsize=10pt
-    \jlreq at jafontsize=\jlreq at option@jafontscale\jlreq at fontsize
-  \else
-    \setlength{\jlreq at jafontsize}{\jlreq at expand@optionfontsize{\jlreq at option@jafontsize}}
-    \jlreq at divide{\jlreq at jafontsize}{\jlreq at option@jafontscale pt}
-    \jlreq at fontsize=\jlreq at resultdimen
-  \fi
-\else
-  \setlength{\jlreq at fontsize}{\jlreq at expand@optionfontsize{\jlreq at option@fontsize}}
-  \ifx\jlreq at option@jafontsize\@empty
-    \jlreq at jafontsize=\jlreq at option@jafontscale\jlreq at fontsize
-  \else
-    \setlength{\jlreq at jafontsize}{\jlreq at expand@optionfontsize{\jlreq at option@jafontsize}}
-  \fi
-\fi
-%. フォント
-\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}
-
-%.. 和文
-% 必要になりそうなリスト
-% 開き括弧(文字クラス1)
-\edef\jlreq at charlist@openingbrackets{(〔[{〈《「『【‘“\ifx p\jlreq at engine\else ⦅〘〖«〝\fi}
-% 閉じ括弧(文字クラス2)
-\edef\jlreq at charlist@closingbrackets{)〕]}〉》」』】’”\ifx p\jlreq at engine\else⦆〙〗»〟\fi}
-% 区切り約物(文字クラス4)
-\edef\jlreq at charlist@dividingpunctuationmarks{!?\ifx p\jlreq at engine\else ‼⁇⁈⁉\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
-  % \item後の行頭括弧のために仕込み.
-  \jlreq at saveoriginalcs{list}
-  \jlreq at saveoriginalcs{endlist}
-  \pretocmd{\list}{\jlreq at pushhook@postpar{\directlua{luatexja.jfmglue.create_beginpar_node()}}}{}{}%
-  \apptocmd{\endlist}{\jlreq at pophook@postpar}
-\else
-  % 非LuaTeXの場合はJFMの入れ替えと\everyparでの処理で対処.
-  % 行頭括弧に対して\inhibitglueを入れたりする命令を作る
-  % \jlreq at charlist@openingbracketsの各括弧に対して,\ifx\jlreq at nextchar 「1\fiみたいなのが並んだのを作る
-  \def\jlreq at tempa{}
-  \def\jlreq at do#1{\jlreq at ifendmark{#1}{}{\appto\jlreq at tempa{\ifx\jlreq at nextchar#11\fi}\jlreq at do}}
-  \expandafter\jlreq at do\jlreq at charlist@openingbrackets\jlreq at endmark
-  % JFM glueの伸び縮みで行頭括弧が揃わないのを防ぐために常に\inhibitglueを入れる.
-  \ifthenelse{\equal{\jlreq at open@bracket at pos}{nibu_tentsuki}}{
-    \edef\jlreq at openbracket@hook{\noexpand\ifnum0\expandonce{\jlreq at tempa}>0 \unexpanded{\hskip -.5\jlreq at mol\inhibitglue}\noexpand\fi}
-  }{% zenkakunibu_nibu,zenkaku_tentsuki
-    \edef\jlreq at openbracket@hook{\noexpand\ifnum0\expandonce{\jlreq at tempa}>0 \unexpanded{\inhibitglue}\noexpand\fi}
-  }
-  % \jlreq at jfmnameにJFMの名前を入れる
-  \def\jlreq at jfmname@prefix{}
-  \jlreq at aftercls@addtodeletecs{\jlreq at jfmname@prefix}
-  \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}
-  \AtBeginDocument{\PushPostHook{par}{\futurelet\jlreq at nextchar\jlreq at openbracket@hook}}
-\fi
-\newcount\jlreq at count@listnest
-\jlreq at count@listnest=0
-% 現在のeveryparへのhookを保存スタックに積んでからPushPostHookする.
-% スタックに積まれたものは\jlreq at pophook@postparで復帰できる
-\def\jlreq at pushhook@postpar#1{%
-  \advance\jlreq at count@listnest by 1
-  \def\@tempa{\SavePostHook{par}}%
-  \expandafter\@tempa\csname jlreq at save@posthook at par \the\jlreq at count@listnest\endcsname
-  \PushPostHook{par}{#1}%
-}
-\def\jlreq at pophook@postpar{%
-  \def\@tempa{\RestorePostHook{par}}%
-  \expandafter\@tempa\csname jlreq at save@posthook at par \the\jlreq at count@listnest\endcsname
-  \expandafter\let\csname jlreq at save@posthook at par \the\jlreq at count@listnest\endcsname=\@undefined
-  \advance\jlreq at count@listnest by -1
-}
-
-% 行頭の括弧は \jlreq at open@bracket at before@space \inhibitglue 「みたいにする.
-\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{}
-}
-
-\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 p\jlreq at engine
-  \def\jlreq at yokokanjiencoding{JY1}
-  \def\jlreq at tatekanjiencoding{JT1}
-\fi
-\ifx u\jlreq at engine
-  \def\jlreq at yokokanjiencoding{JY2}
-  \def\jlreq at tatekanjiencoding{JT2}
-\fi
-\jlreq at divide{\jlreq at jafontsize}{\jlreq at fontsize}
-\edef\jlreq at jafontscale{\strip at pt\jlreq at resultdimen}
-\jlreq at aftercls@addtodeletecs{\jlreq at jafontscale}
-\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}{<->s*[\jlreq at jafontscale]\ltj at stdmcfont:jfm=jlreq;script=latn;-kern}{}
-  \DeclareFontShape{JY3}{gt}{m}{n}{<->s*[\jlreq at jafontscale]\ltj at stdgtfont:jfm=jlreq;script=latn;-kern}{}
-  \DeclareFontShape{JT3}{mc}{m}{n}{<->s*[\jlreq at jafontscale]\ltj at stdmcfont:jfm=jlreqv;script=latn;-kern}{}
-  \DeclareFontShape{JT3}{gt}{m}{n}{<->s*[\jlreq at jafontscale]\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}{<->s*[\jlreq at jafontscale]\jlreq at jfmname}{}
-  \DeclareFontShape{\jlreq at yokokanjiencoding}{gt}{m}{n}{<->s*[\jlreq at jafontscale]\jlreq at jfmnameg}{}
-  \DeclareFontShape{\jlreq at tatekanjiencoding}{mc}{m}{n}{<->s*[\jlreq at jafontscale]\jlreq at jfmname-v}{}
-  \DeclareFontShape{\jlreq at tatekanjiencoding}{gt}{m}{n}{<->s*[\jlreq at jafontscale]\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}{}
-
-% 和文ファミリと欧文ファミリの連動
-\DeclareRobustCommand\rmfamily{%
-  \not at math@alphabet\rmfamily\mathrm
-  \romanfamily\rmdefault\kanjifamily\mcdefault\selectfont}
-\DeclareRobustCommand\sffamily{%
-  \not at math@alphabet\sffamily\mathsf
-  \romanfamily\sfdefault\kanjifamily\gtdefault\selectfont}
-\DeclareRobustCommand\ttfamily{%
-  \not at math@alphabet\ttfamily\mathtt
-  \romanfamily\ttdefault\kanjifamily\gtdefault\selectfont}
-
-% 数式フォント設定
-\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}%
-}
-
-% 和文間隔
-\def\jlreq at tempa{}
-\def\jlreq at do#1{\jlreq at ifendmark{#1}{}{\appto\jlreq at tempa{\ifnum\lastnodechar=`#1 1\fi}\jlreq at do}}
-\expandafter\jlreq at do\jlreq at charlist@dividingpunctuationmarks\jlreq at endmark
-\edef\@tempa{\noexpand\ifnum0\expandonce{\jlreq at tempa}>0 }
-\expandafter\DeclareRobustCommand\expandafter*\expandafter\ \expandafter{\@tempa
-    \hskip 1\zw\hbox{}%
-    \jlreq at lastnodechar=` 
-    \expandafter\jlreq at fixjfm
-  \else \fi
-}
-\ifx l\jlreq at engine
-  {
-    \catcode` =\active
-    \global\let =\ 
-  }
-  \AtBeginDocument{\catcode` =\active}
-\fi
-
-% \jaspace
-\DeclareRobustCommand*{\jaspace}[1]{%
-  \expandafter\ifx\csname jlreq at jaspace@#1\endcsname\relax\ClassError{jlreq}{unknown jaspace: #1}{\@ehc}%
-  \else\csname jlreq at jaspace@#1\endcsname\fi
-}
-\def\jlreq at jaspace@zenkaku{\hskip 1\zw}
-\def\jlreq at jaspace@nibu{\hskip .5\zw}
-\def\jlreq at jaspace@shibu{\hskip .25\zw}
-
-% 区切り約物.\? みたいな命令を作る.直後の空きが自動で入る.
-% \?*とすると文中の?として扱われる.
-\def\jlreq at tempa{}
-\def\jlreq at do#1{\jlreq at ifendmark{#1}{}{\appto\jlreq at tempa{\ifx\jlreq at nextchar #11\fi}\jlreq at do}}
-\expandafter\jlreq at do\jlreq at charlist@closingbrackets\jlreq at endmark
-\def\jlreq at do#1{%
-  \jlreq at ifendmark{#1}{}{
-    \edef\jlreq at tempb{\noexpand\DeclareRobustCommand*\expandonce{\csname #1\endcsname}%
-      {%
-        \unexpanded{\@ifstar{\hskip .25\zw #1\hskip .25\zw\ignorespaces}}{%
-          #1%
-          \unexpanded{\def\jlreq at do}{%
-            \noexpand\ifnum 0\expandonce{\jlreq at tempa}>0\unexpanded{\else\  \fi\ignorespaces}%
-          }%
-          \unexpanded{\futurelet\jlreq at nextchar\jlreq at do}%
-        }%
-      }%
-    }
-    \jlreq at tempb
-    \jlreq at do
-  }
-}
-\expandafter\jlreq at do\jlreq at charlist@dividingpunctuationmarks\jlreq at endmark
-
-% \baselineskipの計算
-% いったん文字サイズを変更((u)platexの際にzh/zwをきちんとするため)
-\@setfontsize\normalsize{\jlreq at fontsize}{\jlreq at fontsize}%
-\newdimen\jlreq at baselineskip
-\ifx l\jlreq at engine
-  \setlength{\jlreq at baselineskip}{%
-    \dimexpr\directlua{
-      local act = string.char(92)
-      local s = [[\jlreq at option@baselineskip]]
-      s = s:gsub("Q",act .. "dimexpr 0.25mm" .. act .. "relax"):gsub("zh",act .. "zh"):gsub("zw",act .. "zw")
-      tex.print(s)
-    }\relax
-  }%
-\else
-  \setlength{\jlreq at baselineskip}{\dimexpr\jlreq at option@baselineskip\relax}
-\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\zw} \OR \lengthtest{\jlreq at baselineskip>2\zw}}{
-  \jlreq at note{行間は二分以上全角以下が望ましい (2.4.2.d 注3).}
-}{}
-
-\emergencystretch 3\jlreq at gol
-
-%.. 文字サイズ変更
-\def\jlreq at setfontsizehook{}% set at fontsizeの最後に実行される.
-\jlreq at saveoriginalcs{set at fontsize}
-\apptocmd{\set at fontsize}{\jlreq at setfontsizehook}{}{}
-\appto\jlreq at setfontsizehook{\ifdim\parindent>0pt\setlength{\parindent}{1\zw}\fi}
-\ifx l\jlreq at engine
-  \@tempskipa=\ltjgetparameter{kanjiskip}
-  \ifdim\@tempskipa=\maxdimen\else
-    \appto\jlreq at setfontsizehook{%
-      \ltj at setpar@global
-      \ltjsetkanjiskip\jlreq at kanjiskip
-      \@tempskipa=\ltjgetparameter{xkanjiskip}%
-      \ifdim\@tempskipa>\z@
-        \ltjsetxkanjiskip\jlreq at xkanjiskip
-      \fi
-    }
-  \fi
-\else
-  \appto\jlreq at setfontsizehook{%
-    \kanjiskip=\jlreq at kanjiskip
-    \ifdim\xkanjiskip>0pt
-      \xkanjiskip=\jlreq at xkanjiskip
-    \fi
-  }
-\fi
-\jlreq at divide{\jlreq at fontsize}{\jlreq at jafontsize}
-\edef\jlreq at jafontinvscale{\strip at pt\jlreq at resultdimen}
-\newcommand*{\jafontsize}[2]{%
-  \begingroup
-    \jlreq at iffloat{#1}{%
-      \jlreq at tempdima=\jlreq at jafontinvscale\dimexpr #1pt\relax
-      \edef\jlreq at do{\noexpand\fontsize{\strip at pt\jlreq at tempdima}{\unexpanded{#2}}}%
-    }{%
-      \jlreq at tempdima=\jlreq at jafontinvscale\dimexpr#1\relax
-      \edef\jlreq at do{\noexpand\fontsize{\expandonce{\the\jlreq at tempdima}}{\unexpanded{#2}}}%
-    }%
-  \expandafter\endgroup
-  \jlreq at do
-}
-
-\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
-% 2.5.2 \baselineskipは一定の方がよい?
-% \@listiは再定義しないようにした.(\normalsizeと共用でJLReq通りだと思う.)
-\newcommand{\footnotesize}{%
-  \@setfontsize\footnotesize{.8\jlreq at fontsize}{\dimexpr 115\jlreq at baselineskip/170\relax}% 脚注文字サイズの二分より少し小さい値を行間に: 4.2.5.e
-  \abovedisplayskip .6\jlreq at fontsize \@plus.2\jlreq at fontsize \@minus.4\jlreq at fontsize
-  \abovedisplayshortskip \z@ \@plus.1\jlreq at fontsize
-  \belowdisplayshortskip .3\jlreq at fontsize \@plus.1\jlreq at fontsize \@minus.2\jlreq at fontsize
-  \belowdisplayskip \abovedisplayskip}
-% tsize10.cloの引数を,そのまま\jlreq at fontsize/\jlreq at baselineskipでスケーリングしているだけ.
-\newcommand{\small}{%
-  % jsarticleのもの
-  \@setfontsize\small{.9\jlreq at fontsize}{\dimexpr 13\jlreq at baselineskip/17\relax}%
-  \abovedisplayskip .9\jlreq at fontsize \@plus.3\jlreq at fontsize \@minus.4\jlreq at fontsize
-  \abovedisplayshortskip \z@ \@plus.3\jlreq at fontsize
-  \belowdisplayshortskip \abovedisplayshortskip
-  \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}}
-
-%. plextから一部拝借
-% オプションも*もない\rensuji(コピペ)
-\DeclareRobustCommand{\jlreq at rensuji}[1]{%
-  \ifvmode\leavevmode\fi
-  \jlreq at ifydir{\hbox{#1}}{%
-    \hskip 0pt plus 0.25\zw minus 0pt % \rensujiskipは固定値
-    \setbox\jlreq at tempboxa=\hbox{\yoko#1}%
-    \@tempdima=\dimexpr\ht\jlreq at tempboxa+\dp\jlreq at tempboxa\relax
-    \vrule\@width\z@ \@height.5\@tempdima \@depth.5\@tempdima
-    \hbox to 1\zw{\yoko\hss#1\hss}%
-    \hskip 0pt plus 0.25\zw minus 0pt
-}}
-\def\jlreq at Kanji#1{\expandafter\kansuji\csname c@#1\endcsname}
-
-% このあたりはtarticleと同じ
-\setlength\lineskip{.1\zh}
-\setlength\normallineskip{.1\zh}
-\renewcommand{\baselinestretch}{}
-\setlength\parskip{0\p@ \@plus \p@}
-\setlength\parindent{1\zw}
-\@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}
-
-%.. 傍注(4.2.7)
-\begingroup
-  \footnotesize
-  \setlength{\jlreq at tempdima}{\jlreq at speciallength{\jlreq at option@sidenote at length}}
-  \jlreq at tempdimb=1\zw
-  \divide\jlreq at tempdima\jlreq at tempdimb
-  \multiply\jlreq at tempdima\jlreq at tempdimb
-  \edef\jlreq at do{
-    \noexpand\setlength{\noexpand\marginparwidth}{\the\jlreq at tempdima}
-    \noexpand\setlength{\noexpand\marginparpush}{\the\dimexpr 0.5\zw\relax} % 同上:4.2.7.g
-  }
-  \expandafter\endgroup
-\jlreq at do
-\ifdim\marginparwidth>0pt
-  \setlength{\marginparsep}{2\zw} % フォントサイズ×2(4.2.7:特に問題に~e)
-\else
-  \setlength{\marginparsep}{0pt} % フォントサイズ×2(4.2.7:特に問題に~e)
-\fi
-
-\ifdim\marginparwidth>25\zw\relax
-  \jlreq at note{並列注の字詰め方向の長さ(行長)は,15字から20字くらいである.ケースによっては25字程度にする場合もある (4.2.7).}
-\fi
-% 縦書きの時は脚注に固定
-% (TODO: 頭注)
-\if at tate\@mparswitchfalse\fi
-
-% \textwidthと\textheightのデフォルト値は縦横ともに0.75倍(調整が入る).
-%.. \textwidth:文字送り方向の行長
-% 二段の場合は最初の段の頭から次の段の後まで
-% 一度\textwidthに一行の長さの文字数を入れる(段組の場合でも)
-\@tempdima=1\zw
-\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
-    \addtolength{\textwidth}{\dimexpr-2\marginparwidth - 2\marginparsep\relax}
-    \setlength{\textwidth}{\dimexpr(\textwidth - \columnsep)/2\relax}
-  \else
-    \addtolength{\textwidth}{\dimexpr-\marginparwidth - \marginparsep\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 note{一行の長さは52文字以下が望ましい (2.4.2.c 注2).}
-    \fi
-  \else
-    \ifnum\number\textwidth>40
-      \jlreq at note{一行の長さは40文字以下が望ましい (2.4.2.c 注2).}
-    \fi
-  \fi
-\fi
-\multiply\textwidth\@tempdima
-\if at twocolumn
-  \setlength{\textwidth}{\dimexpr2\textwidth + \columnsep\relax}
-\fi
-
-\setlength{\topskip}{1\zw} % フォントサイズと一致させる
-
-%.. \textheight:行送り方向の長さ
-% 一番上(直後に\topskip由来が入る)から最終行のベースラインまでの長さ.
-% \topskipが十分ある時は先頭行のベースラインから最終行のベースライン+\topskip
-\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 option@number at of@lines\baselineskip - \baselineskip + \topskip\relax}
-\fi
-
-\ifx\jlreq at option@headfoot at verticalpos\@empty
-  \if at tate\def\jlreq at option@headfoot at verticalpos{1zw}
-  \else\def\jlreq at option@headfoot at verticalpos{2zh}\fi
-\fi
-\setlength{\headsep}{\jlreq at speciallength{\jlreq at option@headfoot at verticalpos}}
-\ifdim\headsep<1\zw\relax\jlreq at note{基本版面との上下方向の最低の空き量を,基本版面の文字サイズの全角アキとする (26.1.a).}\fi
-\setlength{\headheight}{1\zw}
-%.. 横
-\ifx\jlreq at option@gutter\@empty
-  % 中央配置
-  \if at tate
-    \setlength{\oddsidemargin}{\dimexpr\paperwidth - \textheight + \topskip\relax}
-  \else
-    \if at twocolumn
-      \setlength{\oddsidemargin}{\dimexpr\paperwidth - \textwidth\relax}
-    \else
-      \setlength{\oddsidemargin}{\dimexpr\paperwidth - \textwidth - \marginparsep - \marginparwidth\relax}
-    \fi
-  \fi
-  \setlength{\oddsidemargin}{.5\oddsidemargin}
-  \ifnum0\if at twocolumn1\fi\if at tate1\fi>0
-    \setlength{\evensidemargin}{\oddsidemargin}
-  \else
-    \setlength{\evensidemargin}{\dimexpr\oddsidemargin + \marginparsep + \marginparwidth\relax}
-  \fi
-\else
-  \if at tate
-    \setlength{\evensidemargin}{\jlreq at speciallength{\jlreq at option@gutter}}
-    \setlength{\oddsidemargin}{\dimexpr\paperwidth - \textheight - \evensidemargin + \topskip - \Cht\relax}
-    \addtolength{\evensidemargin}{\Cdp}
-  \else
-    \setlength{\oddsidemargin}{\jlreq at speciallength{\jlreq at option@gutter}}
-    \if at twocolumn
-      \addtolength{\oddsidemargin}{\dimexpr\marginparsep + \marginparwidth\relax}
-    \fi
-    \setlength{\evensidemargin}{\dimexpr\paperwidth - \textwidth - \oddsidemargin\relax}
-  \fi
-\fi
-\addtolength{\oddsidemargin}{-1in}
-\addtolength{\evensidemargin}{-1in}
-
-%.. 縦
-% \topmarginに全体の頭からテキストの頭までの長さを入れる
-% 天の値からtopmarginを設定する
-\def\jlreq at settopmarginbyhead#1{
-  \if at tate
-    \setlength{\topmargin}{\dimexpr #1 - \headsep - \headheight - 1in\relax}
-    \if at twocolumn
-      \addtolength{\topmargin}{\dimexpr\marginparwidth + \marginparsep\relax}
-    \fi
-    \jlreq at note{縦組の場合は地の空き量を指定する (2.4.1.b).}
-  \else
-    \setlength{\topmargin}{\dimexpr #1 - \headsep - \headheight - 1in - \topskip + \Cht\relax}
-  \fi
-}
-\jlreq at aftercls@addtodeletecs{\jlreq at settopmarginbyhead}
-% 地の値から
-\def\jlreq at settopmarginbyfoot#1{
-  \if at tate
-    \setlength{\topmargin}{\dimexpr\paperheight - \textwidth - \headsep - \headheight - 1in - #1 - \marginparsep - \marginparwidth\relax}
-  \else
-    \jlreq at note{横組の場合は天の空き量を指定する (2.4.1.b).}
-    \setlength{\topmargin}{\dimexpr\paperheight - \textheight + \topskip - 1\zh - \headsep - \headheight - 1in - #1\relax}
-  \fi
-}
-\jlreq at aftercls@addtodeletecs{\jlreq at settopmarginbyfoot}
-\ifx\jlreq at option@head at space\@empty
-  \ifx\jlreq at option@foot at space\@empty
-    \if at tate
-      \if at twocolumn
-        \jlreq at settopmarginbyfoot{\dimexpr(\paperheight - \textwidth - 2\marginparwidth - 2\marginparsep)/2\relax}
-      \else
-        \jlreq at settopmarginbyfoot{\dimexpr(\paperheight - \textwidth - \marginparwidth - \marginparsep)/2\relax}
-      \fi
-    \else
-      \jlreq at settopmarginbyhead{\dimexpr(\paperheight - (\textheight - \topskip + 1\zh))/2\relax}
-    \fi
-  \else
-    \jlreq at settopmarginbyfoot{\jlreq at speciallength{\jlreq at option@foot at space}}
-  \fi
-\else
-  \ifx\jlreq at option@foot at space\@empty
-    \jlreq at settopmarginbyhead{\jlreq at speciallength{\jlreq at option@head at space}}
-  \else
-    % 両方指定されていたら,縦書きは地を,横書きは天を使う
-    \if at tate
-      \jlreq at settopmarginbyfoot{\jlreq at speciallength{\jlreq at option@foot at space}}
-      \ClassWarningNoLine{jlreq}{head_space is ignored}
-    \else
-      \jlreq at settopmarginbyhead{\jlreq at speciallength{\jlreq at option@head at space}}
-      \ClassWarningNoLine{jlreq}{foot_space is ignored}
-    \fi
-  \fi
-\fi
-
-%.. 下
-\setlength{\footskip}{\dimexpr\headsep + 1\zw\relax}
-% \maxdepth + \topskip = フォントサイズ×1.5(だってさ)
-\setlength{\maxdepth}{\dimexpr1.5\zw - \topskip\relax}
-
-%. 見出し関係 (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:#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 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 = 全体フォーマット}*{見出し}[副題]
-% 字下げはa:**だと追加する値(ページ行頭には入らない),s:**も追加だがページ行頭でも入る,
-% r:**だとその値に強制する.
-\newcommand{\jlreq at startBlockHeading}[5]{%
-  \edef\jlreq at startBlockHeading@format{\unexpanded{#4}}%
-  \edef\jlreq at startBlockHeading@totalformat{\unexpanded{#5}}%
-  \jlreq at startBlockHeading@{#1}{#2}{#3}%
-}
-% {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 = *}{8 = 見出し}{9 = 副題}
-\long\def\jlreq at startBlockHeading@setformat#1#2#3#4#5#6#7#8#9{%
-  % \jlreq at tempaに{ラベル}{見出し}{副題}という形のものを入れる
-  \jlreq at ifempty{#7}{%
-    % ラベルあり
-    \def\jlreq at tempa{#1}%
-    \long\def\jlreq at tempb##1{#2}%
-    \jlreq at ifempty{#9}{\def\jlreq at tempc##1{}}{\long\def\jlreq at tempc##1{#4}}%
-  }{%
-    \def\jlreq at tempa{}%
-    \long\def\jlreq at tempb##1{#3}%
-    \jlreq at ifempty{#9}{\def\jlreq at tempc##1{}}{\long\def\jlreq at tempc##1{#5}}%
-  }%
-  \edef\jlreq at tempa{{\expandonce{\jlreq at tempa}}{\expandonce{\jlreq at tempb{#8}}}{\expandonce{\jlreq at tempc{#9}}}}%
-  \long\def\jlreq at tempb##1##2##3{#6}%
-  \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
-    \def\jlreq at tempb{*}%
-  \else
-    \refstepcounter{#1}%
-    \def\jlreq at tempb{}%
-  \fi
-  % 後で呼び出す\jlreq at startBlockHeading@addtocontentslineを定義する
-  \long\def\jlreq at tempa##1##2##3##4##5##6##7{%
-    \def\jlreq at tempa{##1}% 素のラベルのフォーマットを取り出す
-    \edef\jlreq at tempb{\unexpanded{{##2}{##3}{##4}{##5}{##6}{##7}}{\expandonce{\jlreq at tempb}}}% 残り
-  }%
-  \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}}%
-  }%
-  \expandafter\jlreq at startBlockHeading@setformat\jlreq at tempb{#6}{#7}%
-  \long\def\jlreq at do##1{%
-    \long\def\jlreq at tempa####1{##1}%
-    \edef\jlreq at tempb{\unexpanded{\jlreq at startBlockHeading@@@@#3}{\expandonce{\jlreq at result}}}%
-    \expandafter\jlreq at tempa\expandafter{\jlreq at tempb}%
-  }%
-  \expandafter\jlreq at do\expandafter{\jlreq at startBlockHeading@totalformat}%
-  \ignorespaces
-}
-\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 = 配置(clr)}{2 = 字下げ}{3 = 字上げ}{4 = 前空き}{5 = 後ろ空き}{6 = トータル行数}{7 = 偶数ページ改ページ}{8 = 出力}
-\long\def\jlreq at startBlockHeading@@@@#1#2#3#4#5#6#7#8{%
-  \if at noskipsec\leavevmode\fi
-  \par
-  \jlreq at ifempty{#7}{}{\jlreq at setcurrentpage}%
-  \setbox\jlreq at tempboxa=\vbox{\noindent
-    \ifx#1c\centering\fi
-    \ifx#1r\raggedleft\fi
-    \jlreq at ifempty{#2}{}{\hsize=\dimexpr\hsize - #2\relax}%
-    \jlreq at ifempty{#3}{}{\hsize=\dimexpr\hsize - #3\relax}%
-    #8}%
-  % \jlreq at tempskip(a/b)に前/後ろに入れるべき値を入れる
-  % #4がa:ならばその値は\jlreq at tempskipaには足さず\jlreq at tempskipcに入れておく
-  \jlreq at tempskipc=0pt
-  \jlreq at startBlockHeading@analyzespace#4:\jlreq at endmark
-  \setbox\jlreq at tempboxb=\vbox{ }%
-  \jlreq at ifempty{#6}{%
-    \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(#6\baselineskip + \baselineskip - \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(#6\baselineskip + \baselineskip - \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{#2}{}{\hskip #2}%
-    \box\jlreq at tempboxa}%
-  \dp\jlreq at tempboxa=\dimexpr\dp\jlreq at tempboxa + \ht\jlreq at tempboxa\relax
-  \ht\jlreq at tempboxa=0pt
-%  \showbox\jlreq at tempboxa
-  \box\jlreq at tempboxa
-  \par
-  \jlreq at ifempty{#7}{\ifodd\jlreq at currentpage\nobreak\fi}{\nobreak}%
-  \prevdepth=0pt
-  \jlreq at startBlockHeading@analyzespace#5:\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
-}
-
-% \DeclareBlockHeading{命令名}{レベル}{設定}
-\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{}%
-    \def\jlreq at subtitle@font{}%
-    \def\jlreq at indent{0\jlreq at mol}%
-    \def\jlreq at end@indent{0\jlreq at mol}%
-    \def\jlreq at align{l}%
-    \edef\jlreq at format{\unexpanded{##1##2##3}}%
-    \edef\jlreq at heading@text at format{\unexpanded{##1}}%
-    \def\jlreq at pagebreak{}%
-    \def\jlreq at label@format{\@seccntformat{#1}}%
-    \newif\ifjlreq at hang\jlreq at hangtrue
-    \def\jlreq at after@label at space{1\jlreq at mol}%
-    \def\jlreq at second@heading at text@indent at wlabel{0pt}%
-    \def\jlreq at second@heading at text@indent at wolabel{0pt}%
-    \edef\jlreq at subtitle@format{\unexpanded{---##1---}}%
-    \def\jlreq at subtitle@indent{1\jlreq at mol}%
-    \def\jlreq at afterindent{\@afterindenttrue}%
-    \def\jlreq at allowbreak@evenpage{*}% 偶数ページでも改ページを許可するならば空,そうでないなら*
-    \newif\ifjlreq at subtitle@break\jlreq at subtitle@breaktrue
-    \def\jlreq at subtitle@indent{1\zw}%
-    \def\jlreq at column@spanning{false}%
-    % 先頭が*なら\jlreq at resultをtrueにする.*を除いた部分を\jlreq at resultに入れる.
-    \def\jlreq at ifstar##1{%
-      \jlreq at iffirsttoken{##1}{*}{%
-        \jlreq at resulttrue
-        \expandafter\def\expandafter\jlreq at result\expandafter{\@gobble##1}%
-      }{%
-        \jlreq at resultfalse
-        \def\jlreq at result{##1}%
-      }%
-    }%
-    % a,bみたいなのをaとbにわける.カンマがなければbは空.引数を{a}{b}として##2を呼び出す.
-    \def\jlreq at parsecomma##1##2{%
-      \def\jlreq at tempa####1####2{##2}%
-      \def\@tempa####1,####2\jlreq at endmark{%
-        \jlreq at ifempty{####2}{%
-          \def\@tempa{}%
-        }{%
-          \def\@tempa########1,\jlreq at endmark{\def\@tempa{########1}}%
-          \@tempa####2\jlreq at endmark
-        }%
-        \edef\@tempa{\unexpanded{\jlreq at tempa{####1}}{\expandonce{\@tempa}}}%
-        \edef\jlreq at do{\expandafter\expandafter\expandafter\unexpanded\expandafter\expandafter\expandafter{\@tempa}}%
-      }%
-      \@tempa##1,\jlreq at endmark
-      \jlreq at do
-    }%
-    \jlreq at parsekeyval[BlockHeading:#1]{
-      {lines}{\def\jlreq at lines{##1}}
-      {before_space}{\def\jlreq at before@space{##1}}
-      {after_space}{\def\jlreq at after@space{##1}}
-      {before_lines}{%
-        \jlreq at ifstar{##1}%
-        \edef\jlreq at before@lines{%
-          \ifjlreq at result s:\else a:\fi
-          \expandonce{\jlreq at result}%
-        }%
-      }
-      {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}}
-      {end_indent}{\def\jlreq at end@indent{##1}}
-      {align}{%
-        \jlreq at switch{##1}{
-          {left}{\def\jlreq at align{l}}
-          {center}{\def\jlreq at align{c}}
-          {right}{\def\jlreq at align{r}}
-          {\ClassError{jlreq}{Unknown position `##1' in block heading #1}{\@ehc}}
-        }%
-      }
-      {format}{\edef\jlreq at format{\unexpanded{##1}}}
-      {after_label_space}{\def\jlreq at after@label at space{##1}}
-      {second_heading_text_indent}{%
-        \jlreq at parsecomma{##1}{%
-          \jlreq at ifstar{####1}%
-          \ifjlreq at result\jlreq at hangfalse\else\jlreq at hangtrue\fi
-          \let\jlreq at second@heading at text@indent at wlabel=\jlreq at result
-          \jlreq at ifempty{####2}{%
-            \let\jlreq at second@heading at text@indent at wolabel=\jlreq at second@heading at text@indent at wlabel
-          }{%
-            \def\jlreq at second@heading at text@indent at wolabel{####2}%
-          }%
-        }%
-      }
-      {label_format}{\edef\jlreq at label@format{\unexpanded{##1}}}
-      {subtitle_format}{\edef\jlreq at subtitle@format{\unexpanded{##1}}}
-      {subtitle_indent}{\def\jlreq at subtitle@indent{##1}}
-      {subtitle_break}[true,false]{\csname jlreq at subtitle@break##1\endcsname}
-      {afterindent}[true,false]{\edef\jlreq at afterindent{\expandonce{\csname @afterindent##1\endcsname}}}
-      {allowbreak_if_evenpage}[true,false]{%
-        \jlreq at switch{##1}{
-          {true}{\def\jlreq at allowbreak@evenpage{}}
-          {false}{\def\jlreq at allowbreak@evenpage{*}}
-        }%
-      }
-      {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{}}
-        }%
-      }
-      % 後々数字を受け付けるようになったりするかもしれないので……
-      {column_spanning}{%
-        \jlreq at tempatrue % validな入力に対してfalse
-        \jlreq at ifempty{##1}{}{
-          \jlreq at ifnumber{##1}{% 数字の時はtrueに回す
-            \jlreq at tempafalse
-            \def\jlreq at column@spanning{true}%
-          }{%
-            \jlreq at switch{##1}{%
-              {true}{\jlreq at tempafalse\def\jlreq at column@spanning{true}}
-              {false}{\jlreq at tempafalse\def\jlreq at column@spanning{false}}
-            }%
-          }%
-        }%
-        \ifjlreq at tempa\ClassWarningNoLine{jlreq}{Invalid input `##1' for column_spanning in BlockHeading #1}\fi
-      }
-    }{#3}%
-    % 入力チェック
-    \ifthenelse{\equal{\jlreq at column@spanning}{true}}{%
-      \expandafter\ifx\jlreq at pagebreak\clearpage\relax\else\expandafter\ifx\jlreq at pagebreak\cleardoublepage\relax\else
-        \ClassWarningNoLine{jlreq}{column_spanning can be used only with pagebreak=clearpage or pagebreak=cleardoublepage (in BlockHeading #1)}%
-        \def\jlreq at column@spanning{false}%
-      \fi\fi
-    }{}%
-    \ifx\jlreq at font\@empty\else
-      \edef\jlreq at format{%
-        \expandonce{\jlreq at font}\expandonce{\jlreq at format}%
-      }%
-    \fi
-    \edef\jlreq at label@format at modified{%
-      \noexpand\noindent
-      \unexpanded{\setbox\jlreq at tempboxa=\hbox}{\expandonce{\jlreq at label@format}}%
-      \unexpanded{\hangindent=}%
-      \ifjlreq at hang
-        \wd\jlreq at tempboxa
-      \else
-        0pt
-        \unexpanded{\edef\jlreq at startBlockHeading@labellength{\the\wd\jlreq at tempboxa}}%
-      \fi
-      \unexpanded{\hangindent=\dimexpr\hangindent + }(\expandonce{\jlreq at after@label at space}) + (\expandonce{\jlreq at second@heading at text@indent at wlabel})\noexpand\relax
-      \box\jlreq at tempboxa
-      \hskip0pt\relax
-    }%
-    \edef\jlreq at heading@text at format@wlabel{%
-      \ifdim\jlreq at after@label at space=0pt\else
-        \noexpand\hspace*{\noexpand\dimexpr\expandonce{\jlreq at after@label at space}\noexpand\relax}%
-      \fi
-      \expandonce{\jlreq at heading@text at format}%
-    }%
-    \edef\jlreq at heading@text at format@wolabel{%
-      \ifdim\dimexpr\jlreq at second@heading at text@indent at wolabel\relax=0pt\else
-        \noexpand\hangindent=\noexpand\dimexpr\expandonce{\jlreq at second@heading at text@indent at wolabel}\noexpand\relax
-      \fi
-      \expandonce{\jlreq at heading@text at format}%
-    }%
-    \def\jlreq at make@subtitle at format##1##2{%
-      \edef##1{%
-        \ifjlreq at subtitle@break\unexpanded{{\par}\nobreak\noindent\global\hangafter=0}\fi
-        \unexpanded{\global\hangindent=\dimexpr\hangindent + }(\expandonce{\jlreq at subtitle@indent}) ##2\noexpand\relax
-        \ifdim\jlreq at subtitle@indent=0pt\else
-          \ifjlreq at subtitle@break\else\unexpanded{\hspace*}{\expandonce{\jlreq at subtitle@indent}}\fi
-        \fi
-        {\ifx\jlreq at subtitle@font\@empty\else\expandonce{\jlreq at subtitle@font}\fi\expandonce{\jlreq at subtitle@format}}%
-      }%
-    }%
-    \jlreq at make@subtitle at format\jlreq at subtitle@format at wlabel{%
-      - (\expandonce{\jlreq at second@heading at text@indent at wlabel})%
-      \ifjlreq at hang\else + (\noexpand\jlreq at startBlockHeading@labellength)\fi
-    }%
-    \jlreq at make@subtitle at format\jlreq at subtitle@format at wolabel{- (\expandonce{\jlreq at second@heading at text@indent at wolabel})}%
-    \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 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
-    \edef\jlreq at totalformat{\unexpanded{##1}\expandonce{\jlreq at afterindent}\noexpand\@afterheading}%
-    \if at twocolumn
-      \ifthenelse{\equal{\jlreq at column@spanning}{true}}{\edef\jlreq at totalformat{\unexpanded{\twocolumn[{##1}]}}}{}%
-    \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 align}}{\expandonce{\jlreq at indent}}{\expandonce{\jlreq at end@indent}}{\expandonce{\jlreq at before@space}}{\expandonce{\jlreq at after@space}}{\expandonce{\jlreq at lines}}{\expandonce{\jlreq at allowbreak@evenpage}}}%
-        {%
-          {\expandonce{\jlreq at label@format}}{\expandonce{\jlreq at label@format at modified}}%
-          {\expandonce{\jlreq at heading@text at format@wlabel}}{\expandonce{\jlreq at heading@text at format@wolabel}}%
-          {\expandonce{\jlreq at subtitle@format at wlabel}}{\expandonce{\jlreq at subtitle@format at wolabel}}%
-          {\expandonce{\jlreq at format}}%
-        }%
-        {\expandonce{\jlreq at totalformat}}%
-      }}%
-    }%
-  \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\jlreq at mol}%
-    \def\jlreq at mark{}%
-    \def\jlreq at label@font{}%
-    \def\jlreq at after@space{1\jlreq at mol}%
-    \jlreq at parsekeyval[RuninHeading:#1]{%
-      {font}{\def\jlreq at font{##1}}
-      {indent}{\def\jlreq at indent{##1}}
-      {mark}{\def\jlreq at mark{##1}}
-      {after_space}{%
-        \ifdim\dimexpr##1\relax<0pt\ClassWarning{jlreq}{after_space in Runin Heading #1 should be positive}\fi
-        \def\jlreq at after@space{##1}%
-      }
-    }{#3}%
-    % \@startsection{#1}{#2}{indent}{0pt}{-after_space}{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}}{0pt}{-\expandonce{\jlreq at after@space}}{\expandonce{\jlreq at font}}%
-        }{%
-          \noexpand\@startsection{\unexpanded{#1}}{\unexpanded{#2}}{\expandonce{\jlreq at indent}}{0pt}{-\expandonce{\jlreq at after@space}}{\noexpand\kern\expandonce{\jlreq at indent}\expandonce{\jlreq at mark}\noexpand\kern-\expandonce{\jlreq at indent}\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 + \@tempdima + #3\relax\hangafter=-\jlreq at CutinHeading@linecount
-  \jlreq at hangindent=\hangindent\jlreq at wraplinecount=\hangafter
-  \hspace*{#2}%
-  \kern-\dimexpr\hangindent + \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{\sffamily\bfseries}%
-    \def\jlreq at onelinemax{6\zw}%
-    \def\jlreq at twolinemax{20\zw}%
-    \def\jlreq at indent{0\jlreq at mol}%
-    \def\jlreq at after@space{1\jlreq at mol}%
-    \jlreq at parsekeyval[CutinHeading:#1]{
-      {font}{\def\jlreq at fontcommand{##1}}
-      {onelinemax}{\def\jlreq at onelinemax{##1}}
-      {twolinemax}{\def\jlreq at twolinemax{##1}}
-      {indent}{\def\jlreq at indent{##1}}
-      {after_space}{\def\jlreq at after@space{##1}}
-    }{#3}%
-    \ifthenelse{\lengthtest{\jlreq at after@space < 0.99\jlreq at mol} \OR \lengthtest{\jlreq at after@space > 2.01\jlreq at mol}}{%
-      \jlreq at note{窓見出しと本文との空き量は,基本版面の文字サイズの全角以上,2倍未満とする (4.1.10.c).}%&
-    }{}%
-    \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 after@space}}{\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
-    \edef\jlreq at do{\unexpanded{#1}\noexpand\baselineskip=\the\baselineskip}%
-  \expandafter\endgroup
-  \jlreq at do
-}
-
-\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
-}
-
-% 全ての見出しにマクロ#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
-  }%
-}
-
-%.. 各種定義
-\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}
-
-\if at tate
-  \renewcommand{\thepart}{\jlreq at Kanji{part}}
-  \ifthenelse{\equal{\jlreq at article@type}{article}}{}{\renewcommand{\thechapter}{\jlreq at Kanji{chapter}}}
-  \renewcommand{\thesection}{\jlreq at rensuji{\@arabic\c at section}}
-  \renewcommand{\thesubsection}{\jlreq at rensuji{\@alph\c at subsection}}
-  \renewcommand{\thesubsubsection}{\jlreq at rensuji{\@arabic\c at subsubsection}}
-  \renewcommand{\theparagraph}{(\jlreq at rensuji{\@arabic\c at paragraph})}
-  \renewcommand{\thesubparagraph}{(\jlreq at rensuji{\@arabic\c at subparagraph})}
-
-  \ifthenelse{\equal{\jlreq at article@type}{article}}{
-    \NewBlockHeading{part}{0}{font={\jlreq at keepbaselineskip{\LARGE}},indent=4\jlreq at mol,lines=4,after_label_space=1\jlreq at mol,second_heading_text_indent={-1\jlreq at mol,1\jlreq at mol},subtitle_font={\jlreq at keepbaselineskip{\large}}}
-    \if at twoside\ModifyHeading{part}{allowbreak_if_evenpage=true}\fi
-  }
-  {% book, report
-    \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\jlreq at mol}},format={\null\vfill {\Huge\hspace*{2\jlreq at mol}#1#2}\vspace*{2\jlreq at gol}}}
-    \NewBlockHeading{chapter}{0}{indent=2\jlreq at mol,lines=6,label_format={第\thechapter 章},font={\huge},after_label_space=1\jlreq at mol,second_heading_text_indent={-1\jlreq at mol,1\jlreq at mol},subtitle_font={\jlreq at keepbaselineskip{\Large}}}
-    \if at twoside\ModifyHeading{chapter}{allowbreak_if_evenpage=true}\fi
-    \renewcommand{\thechapter}{\jlreq at Kanji{chapter}}
-  }
-  \NewBlockHeading{section}{1}{font={\jlreq at keepbaselineskip{\Large}},indent=6\jlreq at mol,lines=3,after_label_space=1\jlreq at mol,second_heading_text_indent={-1\jlreq at mol,1\jlreq at mol},subtitle_font={\jlreq at keepbaselineskip{\normalsize}}}
-  \if at twoside\ModifyHeading{section}{allowbreak_if_evenpage=true}\fi
-  \NewBlockHeading{subsection}{2}{font={\jlreq at keepbaselineskip{\large}},indent=8\jlreq at mol,lines=2,after_label_space=1\jlreq at mol,second_heading_text_indent={-1\jlreq at mol,1\jlreq at mol},subtitle_font={\jlreq at keepbaselineskip{\small}}}
-  \if at twoside\ModifyHeading{subsection}{allowbreak_if_evenpage=true}\fi
-  \NewBlockHeading{subsubsection}{3}{font={\jlreq at keepbaselineskip{\normalsize}},indent=10\jlreq at mol,lines=1,before_lines=1,subtitle_break=false,after_label_space=1\jlreq at mol,second_heading_text_indent={-1\jlreq at mol,1\jlreq at mol},,subtitle_font={\jlreq at keepbaselineskip{\scriptsize}}}
-  \if at twoside\ModifyHeading{subsubsection}{allowbreak_if_evenpage=true}\fi
-  \NewRuninHeading{paragraph}{4}{font={\jlreq at keepbaselineskip{\normalsize}}}
-  \NewRuninHeading{subparagraph}{5}{font={\jlreq at keepbaselineskip{\normalsize}},indent=1\jlreq at mol}
-\else% yoko
-  \renewcommand{\thepart}{\Roman{part}}
-  \renewcommand{\thesubsection}{\thesection .\arabic{subsection}}
-  \renewcommand{\thesubsubsection}{\thesubsection .\arabic{subsubsection}}
-  \renewcommand{\theparagraph}{\thesubsubsection .\arabic{paragraph}}
-  \renewcommand{\thesubparagraph}{\theparagraph .\arabic{subparagraph}}
-  \ifthenelse{\equal{\jlreq at article@type}{article}}{
-    \NewBlockHeading{part}{0}{font={\jlreq at keepbaselineskip{\LARGE\sffamily\bfseries}},label_format={第\thepart 部},lines=4,after_label_space=1\jlreq at mol,second_heading_text_indent={-1\jlreq at mol,1\jlreq at mol},subtitle_font={\jlreq at keepbaselineskip{\large}}}
-    \renewcommand{\thesection}{\arabic{section}}
-  }
-  {% book, report
-    \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\jlreq at gol}},format={\null\vfil {\Huge\sffamily\bfseries #1#2}\vfil}}
-    \NewBlockHeading{chapter}{0}{%
-      font={\jlreq at keepbaselineskip{\huge\sffamily\bfseries}},
-      label_format={第\thechapter 章},
-      lines=5,after_label_space=1\jlreq at mol,second_heading_text_indent={-1\jlreq at mol,1\jlreq at mol},
-      subtitle_font={\jlreq at keepbaselineskip{\Large}}}
-    \renewcommand{\thechapter}{\arabic{chapter}}
-    \renewcommand{\thesection}{\thechapter.\arabic{section}}
-    \ifthenelse{\equal{\jlreq at article@type}{book}}{
-      \ModifyHeading{chapter}{pagebreak=cleardoublepage}
-    }{
-      \ModifyHeading{chapter}{pagebreak=clearpage}
-    }
-  }
-  \NewBlockHeading{section}{1}{font={\jlreq at keepbaselineskip{\Large\sffamily\bfseries}},lines=3,after_label_space=1\jlreq at mol,second_heading_text_indent={-1\jlreq at mol,1\jlreq at mol},subtitle_font={\jlreq at keepbaselineskip{\normalsize}}}
-  \NewBlockHeading{subsection}{2}{font={\jlreq at keepbaselineskip{\large\sffamily\bfseries}},lines=2,after_label_space=1\jlreq at mol,second_heading_text_indent={-1\jlreq at mol,1\jlreq at mol},subtitle_font={\jlreq at keepbaselineskip{\small}}}
-  \NewBlockHeading{subsubsection}{3}{font={\jlreq at keepbaselineskip{\normalsize\sffamily\bfseries}},lines=1,before_lines=1,subtitle_break=false,after_label_space=1\jlreq at mol,second_heading_text_indent={-1\jlreq at mol,1\jlreq at mol},subtitle_font={\jlreq at keepbaselineskip{\scriptsize}}}
-  \NewRuninHeading{paragraph}{4}{font={\jlreq at keepbaselineskip{\normalsize\sffamily\bfseries}},indent=1\jlreq at mol}
-  \NewRuninHeading{subparagraph}{5}{font={\jlreq at keepbaselineskip{\normalsize\sffamily\bfseries}},indent=2\jlreq at mol}
-\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]{%
-      \jlreq at ifempty{#1}{%
-        \chaptermark{#3}%
-        \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]{%
-      \jlreq at ifempty{#1}{%
-        \chaptermark{#3}%
-        \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
-
-% \footnoteと\footnotemarkの前後に\jlreq at hook@prenote/\jlreq at hook@postnoteを入れる
-\jlreq at saveoriginalcs{footnote}%
-\edef\jlreq at do{
-  \unexpanded{\long\def\jlreq at fixjfm@footnote@[#1]#2}{%
-    \expandonce{\footnote[#1]{#2}}%
-    \noexpand\jlreq at hook@postnote
-  }
-  \unexpanded{\long\def\jlreq at fixjfm@footnote@@#1}{%
-    \expandonce{\footnote{#1}}%
-    \noexpand\jlreq at hook@postnote
-  }
-}
-\jlreq at do
-\def\footnote{%
-  \jlreq at hook@prenote
-  \@ifnextchar[{\jlreq at fixjfm@footnote@}{\jlreq at fixjfm@footnote@@}%
-}
-\edef\jlreq at do{
-  \unexpanded{\def\jlreq at fixjfm@footnotemark@[#1]}{%
-    \expandonce{\footnotemark[#1]}%
-    \noexpand\jlreq at hook@postnote
-  }
-  \unexpanded{\def\jlreq at fixjfm@footnotemark@@}{%
-    \expandonce{\footnotemark}%
-    \noexpand\jlreq at hook@postnote
-  }
-}
-\jlreq at do
-\jlreq at saveoriginalcs{footnotemark}%
-\def\footnotemark{%
-  \jlreq at hook@prenote
-  \@ifnextchar[{\jlreq at fixjfm@footnotemark@}{\jlreq at fixjfm@footnotemark@@}%
-}
-
-\newcommand*\jlreq at referencemark@format[1]{#1}
-\newif\ifjlreqadjustreferencemark
-\jlreqadjustreferencemarktrue
-\jlreq at jlreqsetup@add{reference_mark}[inline,interlinear]{
-  \def\jlreq at referencemark{#1}
-  \ifthenelse{\equal{\jlreq at referencemark}{inline}}{
-    \def\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\relax\box\@tempboxa
-      }%
-    }
-    \def\jlreq at hook@prenote{\inhibitglue}
-    \def\jlreq at hook@postnote{\inhibitglue}
-  }{% reference_mark=interlinear
-    \def\jlreq at notemark##1{{%
-      \setbox\@tempboxa=\hbox{\scriptsize\jlreq at referencemark@format{##1}}%
-      \@tempdima=\wd\@tempboxa
-      % 行頭に来たときに頭を天にそろえる処理.
-      \ifjlreqadjustreferencemark
-        \jlreq at savepos@for at rest@linewidth
-        \ifdim\jlreq at current@linewidth<\wd\@tempboxa
-          \@tempdima=\jlreq at current@linewidth
-        \fi
-      \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}%
-    }%
-    \ifx l\jlreq at engine
-      \def\jlreq at hook@prenote{%
-        \jlreq at lastnodechar=\lastnodechar
-        \ifnum\lastnodechar>-1\inhibitglue\fi
-      }
-    \else
-      % (u)platexの時は代入すると\inhibitglueが効かなくなる
-      \def\jlreq at hook@prenote{%
-        \ifnum\lastnodechar>-1\inhibitglue\fi
-        \jlreq at lastnodechar=\lastnodechar
-      }
-    \fi
-    \def\jlreq at hook@postnote{\jlreq at fixjfm}
-  }
-}
-\jlreqsetup{reference_mark=inline}
-% \@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}
-}
-\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\footnoterule{%
-  \unexpanded{\hrule width .333\textwidth height \jlreq at omotekeiwidth}%
-  \noexpand\kern\the\jlreq at tempdima
-}
-
-% インデントの計算:脚注の長さが文字の整数倍になるように字下げする(4.2.5.b)
-{
-  \footnotesize
-  \jlreq at footnoteindent=1\jlreq at mol
-  \@tempdima=\dimexpr\textwidth - \jlreq at footnoteindent\relax
-  \@tempdimb=1\jlreq at mol
-  \divide\@tempdima\@tempdimb \multiply\@tempdima\@tempdimb
-  \global\jlreq at footnoteindent=\dimexpr\textwidth - \@tempdima\relax
-}
-% 4.2.5.d
-\newcommand{\@makefntext}[1]{\jlreq at makefntext{#1}}
-\jlreq at jlreqsetup@add{footnotetext_indent}{
-  \ifthenelse{\equal{#1}{one}}{
-    \long\def\jlreq at 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}% 見出し出力と一文字分の空き
-  }{
-    \long\def\jlreq at 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}% 見出し出力と一文字分の空き
-  }
-}
-\jlreqsetup{footnotetext_indent=one}
-% 合印
-\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(\jlreq at rensuji{\@arabic\c at footnote})\inhibitglue}
-\else
-  \renewcommand*{\thefootnote}{\arabic{footnote}\hbox{})\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{\jlreq at hook@prenote\@ifnextchar[{\jlreq at endnote}{\jlreq at endnote[]}}  
-\def\endnotemark{\jlreq at hook@prenote\@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}\jlreq at hook@postnote}
-\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 hook@postnote
-}
-\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の出力を仕込む
-\PushPostHook{par}{\jlreq at endnote@parhook}
-\apptocmd{\jlreq at hook@beforeheadings}{\jlreq at endnote@hook at beforeheadings{#1}}{}{}
-
-\jlreq at jlreqsetup@add{endnote_position}{
-  \def\jlreq at endnote@parhook{}
-  \def\jlreq at endnote@hook at beforeheadings##1{}
-  \jlreq at tempafalse % headingsが指定された
-  % \jlreq at tempcにセクション名たちを入れていく
-  \def\jlreq at tempc{}
-  \@for\jlreq at tempa:=#1\do{
-    \jlreq at switch{\jlreq at tempa}{
-      {headings}{\jlreq at tempatrue}
-      {paragraph}{
-        \jlreq at tempatrue% _paragraphの時は_headingsも有効にする
-        \def\jlreq at endnote@parhook{%
-          \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
-    \apptocmd{\jlreq at endnote@hook at beforeheadings}{\theendnotes}{}{}
-  \else
-    \@for\@tempa:=\jlreq at tempc\do{
-      \ifx\@tempa\@empty\else
-        \edef\jlreq at do{%
-          \unexpanded{\def\jlreq at endnote@hook at beforeheadings##1}{\expandonce{\jlreq at endnote@hook at beforeheadings{##1}}%
-            \unexpanded{\def\@tempa}{\@tempa}\unexpanded{\def\@tempb{##1}}%
-            \unexpanded{\ifx\@tempa\@tempb\theendnotes\fi}%
-          }
-        }
-        \jlreq at do
-      \fi
-    }
-  \fi
-}
-\jlreqsetup{endnote_position=headings}
-\AtEndDocument{\theendnotes}
-
-\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{見出し}{注中身}を定義
-% \marginparwidth>0ptの時のみ定義する
-\ifdim\marginparwidth>0pt \expandafter\@firstofone\else\expandafter\@gobble\fi
-{
-  \long\def\@sidenotetext#1{%
-    \marginpar{\reset at font\footnotesize
-      \color at begingroup
-      \@makesidetext{#1}%
-      \color at endgroup
-    }%
-  }
-  \jlreq at setdefaultnotemark\@sidenotemark\@makesidemark
-  \def\jlreq at sidenotecounter{footnote}% 傍注用のカウンタ名
-  \jlreq at jlreqsetup@add{sidenote_type}[number,symbol]{\def\jlreq at sidenote@type{#1}}
-  \jlreqsetup{sidenote_type=number}
-  \jlreq at jlreqsetup@addtofinally{
-    \ifthenelse{\equal{\jlreq at sidenote@type}{number}}{
-      \def\sidenote{\jlreq at hook@prenote\@ifnextchar[{\jlreq at sidenote}{\jlreq at sidenote[]}}
-      \def\sidenotemark{\jlreq at hook@prenote\@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}\jlreq at hook@postnote}
-      \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
-        \jlreq at hook@postnote
-      }
-      \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}%
-      }
-      % \hspace{0.5\jlreq at mol}の部分は二分空きにする例もある(4.2.7.g)
-      \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
-      \long\def\sidenote#1#2{\jlreq at sidenote{#1}{#2}}
-      \def\sidenotemark#1{\jlreq at sidenotemark{#1}}
-      \long\def\sidenotetext#1#2{\jlreq at sidenotetext{#1}{#2}}
-      \long\def\jlreq at sidenote#1#2{\jlreq at sidenotemark{#1}\jlreq at sidenotetext{#1}{#2}}
-      \edef\jlreq at sidenotemark#1{%
-        {\unexpanded{\reset at font\jlreq at sidenote@keywordfont}#1}%
-        \noexpand\jlreq at hook@prenote
-        \ifx\jlreq at sidenote@defaultmark\@empty\else
-          \expandafter\edef\expandonce{\csname\jlreq at sidenotemarkname\endcsname}{\expandonce{\jlreq at sidenote@defaultmark}}%
-          \noexpand\@sidenotemark
-        \fi
-      }
-      % カスタマイズできるべき?
-      \long\def\jlreq at sidenotetext#1#2{%
-        \expandafter\def\csname\jlreq at sidenotemarkname\endcsname{\inhibitglue\null{\reset at font\sffamily\bfseries\inhibitglue #1}}%
-        \@sidenotetext{#2}%
-      }
-      \long\def\@makesidetext#1{{\sffamily\bfseries\csname\jlreq at sidenotemarkname\endcsname}\hspace*{1\jlreq at mol}#1}
-      \def\@makesidemark{\@makefnmark}
-
-      \apptocmd{\sidenote}{\jlreq at hook@postnote}{}{}
-      \apptocmd{\sidenotemark}{\jlreq at hook@postnote}{}{}
-    }
-  }
-  \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={}}
-}
-
-%.. 割注(3.4)
-\def\inlinenotesize{.6\jlreq at jafontsize} % 割注の文字サイズ
-\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\warichu\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 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
-        \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
-        \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
-  {%
-    \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)}
-% 次を満たす長さXの最小値を求める(ただし#6 <= X <= #7)
-% #1を
-% * #5 - #4行目までは#3の指定に従う
-% * それ以降はX
-% として整形した際に,#5行以内に収まる.
-% \jlreq at resultboxに整形結果を返す(垂直ボックス).見つからなかったらvoid
-\newcommand{\jlreq at inlinenote@determinelength}[7]{%
-%  \message{#1 の試行開始,行数 = #5, \the\dimexpr#6\relax から \the\dimexpr#7\relaxまで}%
-  \@tempcnta=1\relax
-  \def\@tempa{}%
-  % 調整に使う行の\parshape指定を\@tempaに入れる.長さは\jlreq at tempdima.
-  \@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
-  % \jlreq at tempdimaを少しずつ伸ばしていく
-  \@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 により確定}
-      % #5行になるまで空の水平ボックスを加えていく.
-      \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% 0.3ptに意味はない
-      \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 note{ノンブルまたは柱は,基本版面の左右にそろえるか,全角アキだけ寄せた位置に配置する (2.6.1.b).}
-}
-
-% bottom-leftみたいなのを解釈する.入力の順番はどっちでも良いが,出力は<top/bottom><left/right>の順番
-% #1 = bottom-leftみたいなのを{bottom}{left}に変換し,#2に代入,#3はデフォルト値,出力形式で入れる
-\newcommand*{\jlreq at pagestyle@parse at position}[3]{%
-  \begingroup
-    \jlreq at pagestyle@parse at position@#1-\jlreq at endmark
-    % \jlreq at tempcに縦方向を,\jlreq at tempdに横方向を入れる
-    \def\jlreq at tempc{}\def\jlreq at tempd{}%
-    \jlreq at pagestyle@parse at position@@{\jlreq at tempa}%
-    \jlreq at pagestyle@parse at position@@{\jlreq at tempb}%
-    \ifx\jlreq at tempc\@empty\edef\jlreq at tempc{\expandafter\@firstoftwo#3}\fi
-    \ifx\jlreq at tempd\@empty\edef\jlreq at tempd{\expandafter\@secondoftwo#3}\fi
-    \edef\jlreq at do{\unexpanded{\def#2}{{\jlreq at tempc}{\jlreq at tempd}}}%
-  \expandafter\endgroup
-  \jlreq at do
-}
-
-\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]{%
-  \jlreq at switch{#1}{
-    {top}{\def\jlreq at tempc{#1}}
-    {bottom}{\def\jlreq at tempc{#1}}
-    {left}{\def\jlreq at tempd{#1}}
-    {right}{\def\jlreq at tempd{#1}}
-    {center}{\def\jlreq at tempd{#1}}
-    {gutter}{\if at tate\def\jlreq at tempd{right}\else\def\jlreq at tempd{left}\fi}
-    {fore_edge}{\if at tate\def\jlreq at tempd{left}\else\def\jlreq at tempd{right}\fi}
-    {\ClassError{jlreq}{Invalid position: #1}{\@ehc}}
-  }%
-}
-
-
-% 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{}%
-    \def\jlreq at running@head at position{}%
-    \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 font{}%
-    % 柱とノンブルの間
-    \def\jlreq at gap{1.5\zw}%
-    \newif\ifjlreq at clearmark\jlreq at clearmarktrue
-    \newif\ifjlreq at pstate\jlreq at pstatefalse % PageStyleTATE
-    \jlreq at parsekeyval[PageStyle:#1]{
-      *{tate}{\jlreq at pstatetrue}
-      *{yoko}{\jlreq at pstatefalse}
-      {nombre_position}{\def\jlreq at nombre@position{##1}}
-      {running_head_position}{\def\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}}
-      {font}{\def\jlreq at font{##1}}
-      {mark_format}{\edef\jlreq at mark@format{\unexpanded{##1}}}
-      {command}{\edef\jlreq at command{\unexpanded{##1}}}
-      {gap}{\def\jlreq at gap{##1}}
-      {clear_mark}[true,false]{\csname jlreq at clearmark##1\endcsname}
-    }{#2}%
-    % 見出しを出す場合:evenに章などの高いレベルの見出しを出す(2.6.3.a)
-    \def\jlreq at markdefinition{}%
-    \def\jlreq at even@running at head@level{}%
-    \def\jlreq at markdefinition{}%
-    % _***な指定な時に,
-    % * \jlreq@[even/odd]@running at headを\leftmarkや\rightmarkに書き換える
-    % * \jlreq at markdefinitionに\***markを定義するマクロを入れる.
-    % また\jlreq@[even/odd]@running at head@levelに見出しのレベルを入れる.
-    % \jlreq at makemark{odd/even}running_headの中身\jlreq at endmark\jlreq at endmark
-    \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}%
-        }%
-        % mark_formatを調べる
-        \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 note{偶数ページには奇数ページよりアウトラインレベルの高い見出しを入れる (ページスタイル #1内,2.6.3.a).}%
-      \fi
-    \fi\fi
-    % \jlreq@[even/odd][head/foot]に入れていく.tateか否かで場合分け.
-    \ifjlreq at pstate\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi{%
-      \ifx\jlreq at nombre@position\@empty\def\jlreq at nombre@position{0pt}\fi
-      \ifx\jlreq at running@head at position\@empty\def\jlreq at running@head at position{0pt}\fi
-      \if at tate\else
-        \jlreq at note{ノンブルおよび柱を縦組にして配置するのは縦組の場合のみである (ページスタイル #1 内,2.6.1).}%
-      \fi
-      % 柱とノンブルを入れる箱を作る(\jlreq at resultを展開すると\setboxするマクロがでる)
-      \def\jlreq at make@tatebox##1{%
-        \edef\jlreq at result{%
-          \unexpanded{\setbox\jlreq at tempboxa=\hbox to }%
-          \unexpanded{\dimexpr\headsep + \headheight + \textheight}\if at tate\else\unexpanded{ - \topskip + 1\zh}\fi\noexpand\relax
-          {\unexpanded{\tate\adjustbaseline}%
-            \ifx##1\@empty\else
-              \noexpand\hspace{\unexpanded{\dimexpr\headsep + \headheight + }%
-              \if at tate\else\unexpanded{\topskip - \Cht + }\fi
-              \expandonce{\jlreq at running@head at position}\noexpand\relax}%
-              \expandonce{##1}%
-            \fi
-            \ifx\jlreq at nombre\@empty\else
-              \noexpand\hfill
-              \expandonce{\jlreq at nombre}%
-              \ifdim\dimexpr\jlreq at nombre@position\relax=0pt\else
-                \unexpanded{\hspace{\dimexpr\jlreq at nombre@position\relax}}%
-              \fi
-            \fi
-          }%
-          % Overfull防止
-          \ifx l\jlreq at engine
-            \unexpanded{\wd\jlreq at tempboxa=\headheight}%
-          \else
-            \unexpanded{\ht\jlreq at tempboxa=\headheight\dp\jlreq at tempboxa=0pt}%
-          \fi
-        }%
-      }%
-      % 左に配置するヘッダ.#1は柱の中身.(一回展開で正しくでてくる.)
-      \def\jlreq at make@lefthead##1{%
-        \jlreq at make@tatebox{##1}%
-        \edef\jlreq at lefthead{%
-          \expandonce{\jlreq at result}%
-          \noexpand\hspace{\noexpand\dimexpr
-            \if at tate\unexpanded{-\Cdp}\fi - \unexpanded{\headsep - 1\zw}%
-          \noexpand\relax}%
-          \unexpanded{\box\jlreq at tempboxa\hfil}%
-        }%
-      }%
-      % 右に配置するヘッダ.
-      \def\jlreq at make@righthead##1{%
-        \jlreq at make@tatebox{##1}%
-        \edef\jlreq at righthead{%
-          \expandonce{\jlreq at result}%
-          \noexpand\hspace{\unexpanded{\dimexpr\textwidth}
-            \if at tate\unexpanded{- \topskip + \Cht}\fi
-            \unexpanded{ + \headsep}%
-          \noexpand\relax}%
-          \unexpanded{\box\jlreq at tempboxa\hss}%
-        }%
-      }%
-      \if at tate
-        \jlreq at make@lefthead{\jlreq at odd@running at head}%
-        \let\jlreq at oddhead=\jlreq at lefthead
-        \jlreq at make@righthead{\jlreq at even@running at head}%
-        \let\jlreq at evenhead=\jlreq at righthead
-      \else
-        \jlreq at make@righthead{\jlreq at odd@running at head}%
-        \let\jlreq at oddhead=\jlreq at righthead
-        \jlreq at make@lefthead{\jlreq at even@running at head}%
-        \let\jlreq at evenhead=\jlreq at lefthead
-      \fi
-      \let\jlreq at oddfoot=\@empty
-      \let\jlreq at evenfoot=\@empty
-    }{% yoko
-      % \jlreq at nombre@positoinと\jlreq at running@head at positionの中身を{bottom}{center}みたいに変換する.
-      \ifx\jlreq at nombre@position\@empty\def\jlreq at nombre@position{bottom-center}\fi
-      \expandafter\jlreq at pagestyle@parse at position\expandafter{\jlreq at nombre@position}{\jlreq at nombre@position}{{bottom}{center}}%
-      \ifx\jlreq at running@head at position\@empty\def\jlreq at running@head at position{top-center}\fi
-      \expandafter\jlreq at pagestyle@parse at position\expandafter{\jlreq at running@head at position}{\jlreq at running@head at position}{{top}{center}}%
-      \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 note{柱やノンブルは,左ページでは,基本版面の左端の延長線にノンブル又は柱の先頭をそろえて配置するか,基本版面の左端の延長線から基本版面の文字サイズの全角アキだけ右に寄せた位置に配置する (ページスタイル #1 内,2.6.1.b).}%
-        \fi
-      }{}%
-      {\jlreq at font
-        \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 note{ノンブルと柱との空き量は文字サイズの2倍又は1.5倍とする (ページスタイル #1 内,2.6.1.c).}}{}%
-      }%
-      % ##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{\expandonce{\jlreq at gap}}\unexpanded{##2}}%
-          }{%
-            \expandafter\edef\csname jlreq@##1\endcsname{\unexpanded{##2}\noexpand\hspace{\expandonce{\jlreq at 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
-        % フォント命令を挿入
-        \ifx\jlreq at font\@empty\else
-          \ifx\jlreq at left\@empty\else\edef\jlreq at left{{\expandonce{\jlreq at font}\expandonce{\jlreq at left}}}\fi
-          \ifx\jlreq at center\@empty\else\edef\jlreq at center{{\expandonce{\jlreq at font}\expandonce{\jlreq at center}}}\fi
-          \ifx\jlreq at right\@empty\else\edef\jlreq at right{{\expandonce{\jlreq at font}\expandonce{\jlreq at right}}}\fi
-        \fi
-        % \jlreq at setheadfoot@に回して処理
-        \edef\jlreq at do{\noexpand\jlreq at setheadfoot@{\expandonce{\jlreq at left}}{\expandonce{\jlreq at center}}{\expandonce{\jlreq at right}}}%
-        \jlreq at do
-      }%
-      % ##1 ##2 ##3と並んだヘッダを作る,戻り値は\jlreq at result
-      \def\jlreq at setheadfoot@##1##2##3{%
-        % - \Cdpは端にそろえるための補正
-        \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 - \Cdp\fi\relax}\unexpanded{##1}}}%
-        % +\topskip - \Chtは\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 - \Cht\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}}%
-        }%
-      }%
-      % \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{\noexpand\jlreq at setheadfoot{\expandafter\@secondoftwo\jlreq at nombre@position}{\expandonce{\jlreq at nombre@top}}{\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{\noexpand\jlreq at setheadfoot{\expandafter\@secondoftwo\jlreq at nombre@position}{\expandonce{\jlreq at nombre@bottom}}{\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
-    }%
-    % 傍注がある場合はその分を調整
-    % \hbox to ***{+++}というのがあるが,+++は空でなければ\hfillを含むのでUndefullすることはない.
-    \ifdim\marginparwidth>0pt \ifjlreq at pstate\else
-      \if at tate
-        \def\jlreq at do##1{%
-          \ifx##1\@empty\else
-            \edef##1{%
-              \unexpanded{\raise-\dimexpr\marginparwidth+\marginparsep\relax\hbox to \textwidth}{\expandonce{##1}}%
-            }%
-          \fi
-        }%
-        \jlreq at do\jlreq at oddfoot
-        \jlreq at do\jlreq at evenfoot
-      \else
-        \if at twocolumn
-          \def\jlreq at do##1{%
-            \ifx##1\@empty\else
-              \edef##1{%
-                \unexpanded{\hspace*{-\dimexpr\marginparwidth+\marginparsep\relax}}%
-                \noexpand\hbox to \unexpanded{\dimexpr\textwidth + 2\marginparwidth + 2\marginparsep\relax}{\expandonce{##1}}%
-                \unexpanded{\hspace*{-\dimexpr\marginparwidth+\marginparsep\relax}}%
-              }%
-            \fi
-          }%
-          \jlreq at do\jlreq at oddhead
-          \jlreq at do\jlreq at oddfoot
-          \jlreq at do\jlreq at evenhead
-          \jlreq at do\jlreq at evenfoot
-        \else
-          % 奇数ページ
-          \def\jlreq at do##1{%
-            \ifx##1\@empty\else
-              \edef##1{%
-                \noexpand\hbox to \unexpanded{\dimexpr\textwidth + \marginparwidth + \marginparsep\relax}{\expandonce{##1}}%
-                \unexpanded{\hspace*{-\dimexpr\marginparwidth+\marginparsep\relax}}%
-              }%
-            \fi
-          }%
-          \jlreq at do\jlreq at oddhead
-          \jlreq at do\jlreq at oddfoot
-          % 偶数ページ
-          \def\jlreq at do##1{%
-            \ifx##1\@empty\else
-              \edef##1{%
-                \unexpanded{\hspace*{-\dimexpr\marginparwidth+\marginparsep\relax}}%
-                \noexpand\hbox to \unexpanded{\dimexpr\textwidth + \marginparwidth + \marginparsep\relax}{\expandonce{##1}}%
-              }%
-            \fi
-          }%
-          \jlreq at do\jlreq at evenhead
-          \jlreq at do\jlreq at evenfoot
-        \fi
-      \fi
-    \fi\fi
-    \edef\jlreq at do{%
-      \noexpand\def\expandonce{\csname ps@#1\endcsname}{%
-        \unexpanded{\def\jlreq at current@pagestyle{#1}}%
-        \ifjlreq at clearmark\unexpanded{\jlreq at heading@execmacro at toallheadings\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}}%
-      }%
-      % \jlreq at markdefinition/\jlreq at commandは引数トークンを持つ可能性がある
-      \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
-}
-
-\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={},clear_mark=false}
-  \NewPageStyle{myheadings}{nombre=\thepage,odd_running_head=\rightmark,even_running_head=\leftmark,clear_mark=false}
-  \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},clear_mark=false}
-  \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center}
-  \NewPageStyle{myheadings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center,odd_running_head=\rightmark,even_running_head=\leftmark,clear_mark=false}
-\fi
-\ModifyPageStyle{plain}{font=\small}
-\ModifyPageStyle{headings}{font=\small}
-\ModifyPageStyle{myheadings}{font=\small}
-
-%. フロート関連
-% 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={\sffamily\bfseries},caption_label_font={\sffamily\bfseries}}
-% 特に根拠のない値
-\setlength\abovecaptionskip{.5\jlreq at gol}
-\setlength\belowcaptionskip{0pt}
-
-%.. 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}{図}
-
-%.. 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}{表}
-
-%. タイトル周り
-\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%
-      % 縦書き時には表組み内でも縦書きにするようにする
-      \if at tate
-        \let\jlreq at temporary@original at ialign=\ialign
-        \pretocmd{\ialign}{\unexpanded{\tate\let\ialign=\jlreq at temporary@original at ialign}}{}{}%
-      \fi
-      \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}}%
-      }}%
-      \renewcommand{\jlreq at referencemark@format}[1]{\@makefnmark}% うーん
-      \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
-    % 縦書き時には表組み内でも縦書きにするようにする
-    \if at tate
-      \let\jlreq at temporary@original at ialign=\ialign
-      \pretocmd{\ialign}{\unexpanded{\tate\let\ialign=\jlreq at temporary@original at ialign}}{}{}%
-    \fi
-    \begin{tabular}[t]{c}%
-      \@author
-    \end{tabular}%
-    \par
-  }%
-  \vskip\baselineskip
-  {\jlreq at keepbaselineskip{\large}\@date}%
-  \end{center}%
-  \par
-  \vskip\baselineskip
-  \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}%
-        {\sffamily\bfseries\abstractname}%
-        \@endparpenalty\@M
-      \end{center}%
-      \par
-    }{%
-      \par\vfil\null\endtitlepage
-    }
-  \else
-    \newenvironment{abstract}{%
-      \ifnum0\if at twocolumn\else1\fi\ifjlreq at preamble1\fi>0
-        \ifjlreq at preamble
-          \ifx l\jlreq at engine\else
-            \jlreq at pushhook@postpar{\futurelet\jlreq at nextchar\jlreq at openbracket@hook}%
-          \fi
-        \fi
-        % とりあえず全部ボックスに入れる.
-        \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\zw
-        \begin{center}%
-          {\sffamily\bfseries\abstractname}%
-        \end{center}%
-        \list{}{%
-          \listparindent\parindent
-          \itemindent\listparindent
-          \labelwidth\z@
-          \labelsep\z@
-          \leftmargin=2\zw
-          \rightmargin\leftmargin
-          \@tempdima=1\zw
-          \@tempdimb=\dimexpr\linewidth - \@totalleftmargin - \leftmargin - \rightmargin\relax
-          \@tempdimc=\@tempdimb
-          \divide\@tempdimb by \@tempdima\multiply\@tempdimb by \@tempdima
-          \ifdim\@tempdimb=\@tempdimc\else\@tempdimb=\dimexpr\@tempdimb - 1\zw\relax\fi
-          \leftmargin=\dimexpr\leftmargin + (\@tempdimc - \@tempdimb)/2\relax
-          \rightmargin=\dimexpr\rightmargin + (\@tempdimc - \@tempdimb)/2\relax
-          \parsep\z@ \@plus.1\zh
-        }%
-        \item\relax
-      \else
-        \section*{\abstractname}%
-      \fi
-    }{%
-      \ifnum0\if at twocolumn\else1\fi\ifjlreq at preamble1\fi>0
-        \endlist
-        \egroup
-        \vspace{\baselineskip}%
-        \if at twocolumn
-          \end{minipage}
-        \fi
-        \egroup
-      \fi
-      \ifjlreq at preamble
-        \ifx l\jlreq at engine\else
-          \jlreq at pophook@postpar
-        \fi
-      \else
-        \unvbox\jlreq at abstractbox
-      \fi
-    }
-  \fi
-}
-%. 箇条書き.cf. JISX4051 8.4
-% 用語定義型
-\newenvironment{description}{\list{}{%
-  \setlength{\leftmargin}{0\zw}% 下げない
-  \setlength{\labelwidth}{0\zw}%
-  \setlength{\labelsep}{1\zw}
-%  \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\sffamily\bfseries #1}
-
-% enumerateとitemize
-% 見出しが一つ上のレベルからどのくらいずれているかを入れる.
-% (見出しは2\zwの箱に右/下詰めで入る.)
-\setlength\leftmargini{2\zw}
-\setlength\leftmarginii{1\zw}
-\setlength\leftmarginiii{1\zw}
-\setlength\leftmarginiv{1\zw}
-\setlength\leftmarginv{1\zw}
-\setlength\leftmarginvi{1\zw}
-
-%.. 箇条書き
-\jlreq at jlreqsetup@add{itemization_beforeafter_space}{\def\jlreq at itemization@beforeafter at space{#1}}
-\jlreq at jlreqsetup@add{itemization_itemsep}{\def\jlreq at itemization@itemsep{#1}}
-\jlreqsetup{itemization_beforeafter_space=0pt,itemization_itemsep=0pt}
-% enumerate, itemize用初期化
-\def\jlreq at init@list{%
-  \setlength{\labelwidth}{2\jlreq at mol}%
-  \setlength{\topsep}{\dimexpr\jlreq at itemization@beforeafter at space\relax}%
-  \setlength{\partopsep}{0pt}%
-  \setlength{\itemsep}{\dimexpr\jlreq at itemization@itemsep\relax}%
-  \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}{\jlreq at Kanji{enumi}}
-  \renewcommand{\theenumii}{\jlreq at rensuji{\@arabic\c at enumii}}
-  \renewcommand{\theenumiii}{\jlreq at rensuji{\@arabic\c at enumiii}}
-  \renewcommand{\theenumiv}{\jlreq at rensuji{\@arabic\c at enumiv}}
-\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}}
-
-% 引用系.3.5.2の例.
-\jlreq at jlreqsetup@add{quote_indent}{\def\jlreq at quote@indent{#1}}
-\jlreq at jlreqsetup@add{quote_end_indent}{\def\jlreq at quote@end at indent{#1}}
-\jlreq at jlreqsetup@add{quote_fontsize}[normalsize,small,footnotesize,scriptsize,tiny,]{\jlreq at ifempty{#1}{\def\jlreq at quote@fontsize{}}{\edef\jlreq at quote@fontsize{\expandonce{\csname #1\endcsname}}}}
-\jlreq at jlreqsetup@add{quote_beforeafter_space}{\def\jlreq at quote@beforeafter at space{#1}}
-\jlreqsetup{quote_indent=2\zw,quote_end_indent=0pt,quote_fontsize=,quote_beforeafter_space=0pt}
-
-\newenvironment{verse}
-  {\let\\\@centercr
-  \list{}{\itemsep\z@ \itemindent -2\jlreq at mol
-    \listparindent\itemindent
-    \labelwidth\z@
-    \labelsep\z@
-    \leftmargin=\dimexpr\jlreq at quote@indent\relax
-    \addtolength{\leftmargin}{2\jlreq at mol}%
-    \rightmargin=\dimexpr\jlreq at quote@end at indent\relax
-    \jlreq at quote@fontsize
-    \@tempdima=1\zw
-    \@tempdimb=\dimexpr\linewidth - \@totalleftmargin - \leftmargin - \rightmargin\relax
-    \@tempdimc=\@tempdimb
-    \divide\@tempdimb by \@tempdima\multiply\@tempdimb by \@tempdima
-    \topsep=\dimexpr\jlreq at quote@beforeafter at space\relax
-    \leftmargin=\dimexpr\leftmargin + \@tempdimc - \@tempdimb\relax}%
-    \item\relax}{\endlist}
-\newenvironment{quotation}
-  {\list{}{%
-    \leftmargin=\dimexpr\jlreq at quote@indent\relax
-    \rightmargin=\dimexpr\jlreq at quote@end at indent\relax
-    \jlreq at quote@fontsize
-    \@tempdima=1\zw
-    \@tempdimb=\dimexpr\linewidth - \@totalleftmargin - \leftmargin - \rightmargin\relax
-    \@tempdimc=\@tempdimb
-    \divide\@tempdimb by \@tempdima\multiply\@tempdimb by \@tempdima
-    \leftmargin=\dimexpr\leftmargin + \@tempdimc - \@tempdimb\relax
-    \listparindent\parindent
-    \itemindent\listparindent
-    \labelwidth\z@
-    \labelsep\z@
-    \topsep=\dimexpr\jlreq at quote@beforeafter at space\relax
-    \parsep\z@ \@plus.1\jlreq at gol}%
-    \item\relax}{\endlist}
-\newenvironment{quote}
-  {\list{}{%
-    \leftmargin=\dimexpr\jlreq at quote@indent\relax
-    \rightmargin=\dimexpr\jlreq at quote@end at indent\relax
-    \jlreq at quote@fontsize
-    \@tempdima=1\zw
-    \@tempdimb=\dimexpr\linewidth - \@totalleftmargin - \leftmargin - \rightmargin\relax
-    \@tempdimc=\@tempdimb
-    \divide\@tempdimb by \@tempdima\multiply\@tempdimb by \@tempdima
-    \leftmargin=\dimexpr\leftmargin + \@tempdimc - \@tempdimb\relax
-    \labelwidth\z@
-    \itemindent\z@
-    \topsep=\jlreq at speciallength{\jlreq at quote@beforeafter at space}%
-    \listparindent\z@}%
-    \item\relax}{\endlist}
-
-%. 表関係 4.4
-% 表内の行間を0にする(4.4.3.f)
-\jlreq at saveoriginalcs{tabular}
-\jlreq at saveoriginalcs{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
-\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{\jlreq at 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{$\m at th\mkern \@dotsep mu$\null\inhibitglue ・\inhibitglue\null$\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
-  \jlreq at oldfontcommand@disable
-}
-\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
-    \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{\jlreq at rensuji{\Alph{section}}}%
-    \else
-      \def\thesection{\Alph{section}}%
-    \fi
-  }
-}{%book, report
-  \appto\appendix{%
-    \setcounter{chapter}{0}%
-    \if at tate
-      \def\thechapter{\jlreq at rensuji{\Alph{chapter}}}%
-    \else
-      \def\thechapter{\Alph{chapter}}%
-    \fi
-    \ModifyHeading{chapter}{label_format={付録\thechapter}}%
-    \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
-  }
-}
-
-%. その他諸々
-%.. 縦中横
-\DeclareRobustCommand*{\tatechuyoko}[1]{%
-  \jlreq at ifydir{\ClassError{jlreq}{\string\tatechuyoko\space is not allowed in yoko mode}{\@ehc}}{}%
-  \jlreq at lastnodechar=\lastnodechar
-  \ifvmode\leavevmode\fi
-  \ifnum\jlreq at lastnodechar=-1\else
-    \inhibitglue
-    \jlreq at calc@jfmglue{\char\jlreq at lastnodechar}{阿}%
-    \edef\@tempa{\the\jlreq at resultskip}%
-    \edef\@tempb{\detokenize{0.0pt}}%
-    \ifx\@tempa\@tempb\else\hskip\jlreq at resultskip\fi
-  \fi
-  \hbox{\yoko 
-    \setbox\jlreq at tempboxa=\hbox{阿}%
-    \vrule width 0pt height \ht\jlreq at tempboxa depth \dp\jlreq at tempboxa #1}%
-  \def\jlreq at do{%
-    \jlreq at isletter{\jlreq at nextchar}{%
-      \jlreq at calc@jfmglue{阿}{\jlreq at nextchar}%
-      \edef\@tempa{\the\jlreq at resultskip}%
-      \edef\@tempb{\detokenize{0.0pt}}%
-      \ifx\@tempa\@tempb\else\hskip\jlreq at resultskip\fi
-      \inhibitglue
-    }{}%
-  }%
-  \futurelet\jlreq at nextchar\jlreq at do
-}
-
-% 日にち
-\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
-  }}}
-
-%.. 定理環境
-\jlreq at saveoriginalcs{@begintheorem}
-\jlreq at saveoriginalcs{@opargbegintheorem}
-\def\@begintheorem#1#2{\topsep=\dimexpr\jlreq at theorem@beforeafter at space\relax
-  \trivlist\labelsep=1\zw
-  \itemindent=\dimexpr\jlreq at theorem@indent\relax
-   \item[\hskip \labelsep{\sffamily\bfseries #1\ #2}]}
-\def\@opargbegintheorem#1#2#3{\topsep=\dimexpr\jlreq at theorem@beforeafter at space\relax
-  \trivlist\labelsep=1\zw
-  \itemindent=\dimexpr\jlreq at theorem@indent\relax
-  \item[\hskip \labelsep{\sffamily\bfseries #1\ #2(#3)}]}
-\AtEndOfPackageFile*{amsthm}{%
-  \jlreq at saveoriginalcs{proof}%
-  \jlreq at saveoriginalcs{endproof}%
-  \edef\jlreq at do{
-    \unexpanded{\def\jlreq at proof[#1]}{%
-      \labelsep=1\zw
-      \expandonce{\proof[{\normalfont\sffamily\bfseries #1\inhibitglue}\nopunct]}%
-    }
-  }
-  \jlreq at do
-  \def\proof{\@ifnextchar[{\jlreq at proof}{\jlreq at proof[\proofname]}}
-  \renewcommand{\proofname}{証明}
-  \jlreq at setupamsthm
-  \theoremstyle{jlreq}
-}
-\def\jlreq at setupamsthm{
-  \newtheoremstyle{jlreq}{\dimexpr\jlreq at theorem@beforeafter at space\relax}{\dimexpr\jlreq at theorem@beforeafter at space\relax}{\normalfont}{\dimexpr\jlreq at theorem@indent\relax}{\sffamily\bfseries}{}{1\zw}{\thmname{##1}\thmnumber{\ ##2}\thmnote{(##3)}}
-}
-\jlreq at jlreqsetup@add{theorem_beforeafter_space}{
-  \def\jlreq at theorem@beforeafter at space{#1}
-  \@ifpackageloaded{amsthm}{\jlreq at setupamsthm}{}
-}
-\jlreq at jlreqsetup@add{theorem_indent}{
-  \def\jlreq at theorem@indent{#1}
-  \@ifpackageloaded{amsthm}{\jlreq at setupamsthm}{}
-}
-\jlreqsetup{theorem_beforeafter_space=1\baselineskip,theorem_indent=0pt}
-
-
-% デフォルト設定
-\newcommand{\contentsname}{目 次}
-\newcommand{\refname}{参考文献}
-\newcommand{\indexname}{索 引}
-\pagestyle{plain}
-\pagenumbering{arabic}
-\if at twocolumn
-  \twocolumn
-  \sloppy
-  \flushbottom
-\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/11/23 jlreq]
+\RequirePackage{xkeyval,everyhook,filehook,etoolbox,ifthen}
+
+%. helper1
+\newcount\jlreq at tempcnta
+\newcount\jlreq at tempcntb
+\newcount\jlreq at tempcntc
+\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
+\newskip\jlreq at resultskip
+\newbox\jlreq at resultbox
+\newif\ifjlreq at result
+
+\newcommand*{\jlreq at undefcs}[1]{%
+  \ifundef{#1}{\ClassError{jlreq}{Trying to delete \string#1\space even though it is not defined, may be a bug}{\@ehc}}{\undef{#1}}%
+}
+
+% クラスファイル内でしか使わないマクロをクラスファイル終了時に未定義にする
+\newcommand*{\jlreq at aftercls@addtodeletecs}[1]{%
+  \appto\jlreq at aftercls@deletecslist{\jlreq at undefcs{#1}}%
+}
+\jlreq at aftercls@addtodeletecs{\jlreq at aftercls@addtodeletecs}
+\newcommand*{\jlreq at aftercls@addtodeleteif}[1]{%
+  \edef\@tempa{\expandafter\@gobble\string#1}%
+  \edef\@tempa{\expandafter\@gobbletwo\@tempa}%
+  \eappto\jlreq at aftercls@deletecslist{%
+    \unexpanded{\jlreq at undefcs{#1}}%
+    \noexpand\jlreq at undefcs{\expandonce{\csname\@tempa true\endcsname}}%
+    \noexpand\jlreq at undefcs{\expandonce{\csname\@tempa false\endcsname}}%
+  }%
+}
+\jlreq at aftercls@addtodeletecs{\jlreq at aftercls@addtodeleteif}
+\AtEndOfClass{%
+  \jlreq at aftercls@deletecslist
+  \jlreq at undefcs{\jlreq at aftercls@deletecslist}%
+  \undef{\jlreq at undefcs}%
+}
+
+\def\jlreq at uniqtoken{\jlreq at uniqtoken}
+\def\jlreq at endmark{\jlreq at endmark}
+\long\def\jlreq at deleteuntileendmark#1\jlreq at endmark{}
+
+\def\jlreq at expandafter@ii{\expandafter\expandafter\expandafter}
+\edef\jlreq at expandafter@iii{\expandonce{\jlreq at expandafter@ii}\noexpand\expandafter\expandonce{\jlreq at expandafter@ii}}
+\edef\jlreq at expandtwice#1{\expandonce{\jlreq at expandafter@ii}\noexpand\unexpanded\expandonce{\jlreq at expandafter@ii}{#1}}
+\edef\jlreq at expand@three#1{\expandonce{\jlreq at expandafter@iii}\noexpand\unexpanded\expandonce{\jlreq at expandafter@iii}{#1}}
+
+% \jlreq at getfirsttoken#1\jlreq at uniqtoken{}\jlreq at endmark@の形で使う
+% 二回展開すると,#1の先頭(ただし空白は無視される)を取り出す.#1が空の場合は\jlreq at uniqtoken,先頭が{の場合は\bgroupとなる
+\def\jlreq at endmark@{\jlreq at endmark@} % \jlreq at getfirsttokenだけのためのendmark
+\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の先頭トークンが#2か(ただし#1が空ならば#2=\jlreq at uniqtoken,#1={ならば#2=\bgroupでTRUEとなる)
+\long\edef\jlreq at iffirsttoken#1#2{%
+  % スペースチェック
+  \unexpanded{\expandafter\expandafter\expandafter\jlreq at deleteuntileendmark\expandafter\ifx\expandafter}\expandonce{\space}\noexpand\detokenize{#1}\unexpanded{\@undefined\jlreq at endmark\expandafter\@firstoftwo\else\jlreq at endmark\expandafter\@secondoftwo\fi}{%
+    \noexpand\ifx\expandonce{\space}#2\unexpanded{\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}%
+  }{%
+    \noexpand\jlreq at iffirsttoken@ignorespaces{#1}{#2}%
+  }%
+}
+% こちらは先頭のスペースを読み飛ばす
+\long\def\jlreq at iffirsttoken@ignorespaces#1#2{%
+  \expandafter\expandafter\expandafter\ifx\jlreq at getfirsttoken#1\jlreq at uniqtoken{}\jlreq at endmark@#2\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
+}
+
+% #1が\jlreq at endmarkか
+\long\def\jlreq at ifendmark#1{\jlreq at iffirsttoken{#1}{\jlreq at endmark}}
+
+% #1の先頭がマクロか
+\long\def\jlreq at ifmacro#1{%
+  \jlreq at ifempty{#1}{\@secondoftwo}{%
+    \jlreq at iffirsttoken{#1}{ }{\@secondoftwo}{%
+      \expandafter\expandafter\expandafter\jlreq at ifmacro@\jlreq at getfirsttoken#1\jlreq at uniqtoken{}\jlreq at endmark@
+}}}
+\long\def\jlreq at ifmacro@#1{\expandafter\jlreq at ifmacro@@\expandafter{\meaning #1}}
+\edef\jlreq at do{%
+  \unexpanded{\def\jlreq at ifmacro@@}##1{\noexpand\jlreq at ifmacro@@@##1\expandonce{\detokenize{macro:}}\noexpand\jlreq at endmark}
+  \unexpanded{\def\jlreq at ifmacro@@@}##1\expandonce{\detokenize{macro:}}##2\noexpand\jlreq at endmark{\noexpand\jlreq at ifempty{##1}}
+}
+\jlreq at do
+
+\def\jlreq at ifgluezero#1{%
+  \edef\@tempa{\the#1}%
+  \edef\@tempb{\detokenize{0.0pt}}%
+  \ifx\@tempa\@tempb\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
+}
+
+
+% @removeelementの括弧があっても動くかもしれない版
+% 次の変数を使う:\jlreq at tempa:消したいやつ,\jlreq at tempb:消していない分を放り込んでいく
+% #2から#1を消して#3に入れる
+\def\jlreq at helper@removeelement#1#2#3{%
+  \begingroup
+    \def\jlreq at tempb{}%
+    \def\jlreq at tempa{#1}%
+    \jlreq at helper@removeelement@{#2}%
+    \edef\jlreq at do{\unexpanded{\def#3}{\expandonce{\jlreq at tempb}}}%
+  \expandafter\endgroup
+  \jlreq at do
+}
+\def\jlreq at helper@removeelement@#1{%
+  \jlreq at helper@dividebycomma{#1}%
+  \ifx\jlreq at resulta\jlreq at tempa\else
+    \ifx\jlreq at tempb\@empty
+      \edef\jlreq at tempb{\expandonce{\jlreq at resulta}}%
+    \else
+      \eappto\jlreq at tempb{,\expandonce{\jlreq at resulta}}%
+    \fi
+  \fi
+  \ifjlreq at result\expandafter\@firstofone\else\expandafter\@gobble\fi
+    {\expandafter\jlreq at helper@removeelement@\expandafter{\jlreq at resultb}}%
+}
+
+% 空白を無視しない\@ifnextchar
+\long\def\jlreq at ifnextchar#1#2#3{%
+  \let\reserved at d=#1%
+  \edef\reserved at a{\unexpanded{#2}}%
+  \edef\reserved at b{\unexpanded{#3}}%
+  \futurelet\jlreq at nextchar\jlreq at ifnextchar@
+}
+\def\jlreq at ifnextchar@{%
+  \ifx\jlreq at nextchar\reserved at d\let\reserved at b\reserved at a\fi
+  \reserved at b
+}
+% \@ifsart
+\def\jlreq at ifstar#1#2{\jlreq at ifnextchar *{\edef\reserved at a*{\unexpanded{#1}}\reserved at a}{#2}}
+% カンマで区切って,その前と後ろを\jlreq at resulta,\jlreq at resultbに入れる
+% もしカンマがない場合は\ifjlreq at resultが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 resulta{#1}%
+  \def\jlreq at resultb{#2}%
+  \ifx\jlreq at resultb\@empty\jlreq at resultfalse\else\jlreq at resulttrue\expandafter\def\expandafter\jlreq at resultb\expandafter{\jlreq at helper@removelastcomma#2\jlreq at endmark}\fi
+}
+\def\jlreq at helper@removelastcomma#1,\jlreq at endmark{#1}
+
+% 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 iffirsttoken@ignorespaces{#2}{*}{%
+    \jlreq at helper@parsekeyval@@@definekeywithdefault{#1}%
+  }{%
+    \jlreq at helper@parsekeyval@@@@{#1}%
+  }%
+}
+\long\def\jlreq at helper@parsekeyval@@@@#1#2{%
+  \jlreq at ifendmark{#2}{}{%
+    \@ifnextchar[{\jlreq at helper@parsekeyval@@@choicekey{#1}{#2}}{\jlreq at helper@parsekeyval@@@definekey{#1}{#2}}%
+  }%
+}
+\long\def\jlreq at helper@parsekeyval@@@choicekey#1#2[#3]#4{%
+  \define at choicekey{#1}{#2}{#3}{\eappto\jlreq at do{\unexpanded{#4}}}%
+  \jlreq at helper@parsekeyval@@@{#1}%
+}
+\long\def\jlreq at helper@parsekeyval@@@definekeywithdefault#1#2#3{%
+  \define at key{#1}{#2}[]{\eappto\jlreq at do{\unexpanded{#3}}}%
+  \jlreq at helper@parsekeyval@@@{#1}%
+}
+\long\def\jlreq at helper@parsekeyval@@@definekey#1#2#3{%
+  \define at key{#1}{#2}{\eappto\jlreq at do{\unexpanded{#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
+    \edef\jlreq at tempa{#1}%
+    \expandafter\jlreq at helper@switch@\expandafter{\jlreq at tempa}#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}{}{\jlreq at helper@switch@@{#1}{#2}}%
+}
+
+\long\def\jlreq at helper@switch@@#1#2#3{%
+  \jlreq at ifendmark{#3}{%
+    \edef\jlreq at do{\unexpanded{#2}}%
+  }{%
+    \def\jlreq at tempa{#1}% 最初に\edefで展開済み
+    \edef\jlreq at tempb{#2}%
+    \ifx\jlreq at tempa\jlreq at tempb\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
+    {%
+      \edef\jlreq at do{\unexpanded{#3}}%
+      \jlreq at deleteuntileendmark
+    }{%
+      \jlreq at helper@switch@{#1}%
+    }%
+  }%
+}
+
+% preambleにいるかのスイッチ
+\newif\ifjlreq at preamble
+\jlreq at preambletrue
+\AtBeginDocument{\jlreq at preamblefalse}
+
+\RequirePackage[savepos]{zref}
+\zref at newprop*{jlreq at page}[0]{\number\c at page}
+\zref at addprop{main}{jlreq at page}
+% 現在のページを得る
+\newcount\jlreq at zref@reference at count
+\jlreq at zref@reference at count=0
+\newcount\jlreq at currentpage
+\newcommand*{\jlreq at setcurrentpage}{%
+  \global\advance\jlreq at zref@reference at count by 1
+  \zref at labelbyprops{jlreq at rest@width.page.\the\jlreq at zref@reference at count}{jlreq at page}%
+  \global\jlreq at currentpage=\zref at extractdefault{jlreq at rest@width.page.\the\jlreq at zref@reference at count}{jlreq at page}{\c at page}%
+}
+
+\def\jlreq at saveoriginalcs#1{%
+  \@ifundefined{#1}{%
+    \ClassError{jlreq}{Trying to save \expandafter\string\csname #1\endcsname\space but it's not defined, may be a bug}{\@ehc}%
+  }{}%
+  \@ifundefined{jlreq at original@#1}{}{%
+    \ClassError{jlreq}{Trying to save \expandafter\string\csname #1\endcsname\space twice, may be a bug}{\@ehc}%
+  }%
+  \expandafter\expandafter\expandafter\let\expandafter\expandafter\csname jlreq at original@#1\endcsname\csname #1\endcsname
+}
+
+% #1の先頭が文字か
+\long\def\jlreq at ifletter#1{%
+  \jlreq at ifempty{#1}{\@secondoftwo}{%
+    \jlreq at iffirsttoken{#1}{ }{\@secondoftwo}{%
+      \expandafter\expandafter\expandafter\jlreq at helper@ifletter\jlreq at getfirsttoken#1\jlreq at uniqtoken{}\jlreq at endmark@
+  }}%
+}
+
+\long\def\jlreq at helper@ifletter#1{%
+  \ifnum
+    0\ifcat 阿\noexpand #11\fi
+    \ifcat あ\noexpand #11\fi
+    \ifcat (\noexpand #11\fi
+    \ifcat A\noexpand #11\fi
+    \ifcat 1\noexpand #11\fi
+  >0
+    \expandafter\@firstoftwo\else\expandafter\@secondoftwo
+  \fi
+}
+
+% こっちは先頭にあるマクロを展開してチェックする
+\long\def\jlreq at ifletter@expandmacros#1{%
+  \jlreq at ifmacro{#1}{\expandafter\jlreq at ifletter@expandmacros\expandafter{#1}}{\jlreq at ifletter{#1}}%
+}
+
+% 先頭にあるマクロを展開しまくった結果を#2に入れる.
+\long\def\jlreq at expandmacros#1#2{%
+  \jlreq at ifmacro{#1}{\expandafter\jlreq at expandmacros\expandafter{#1}{#2}}{\def#2{#1}}%
+}
+
+\def\jlreq at helper@checktokenlist#1#2{%
+  \jlreq at ifendmark{#2}{\@firstoftwo}%
+  {%
+    \ifnum0#1{#2}>0 \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
+      {\jlreq at helper@checktokenlist{#1}}%
+      {\expandafter\@secondoftwo\jlreq at deleteuntileendmark}%
+  }%
+}
+\def\jlreq at helper@chknumlist#1{\ifx#101\fi\ifx#111\fi\ifx#121\fi\ifx#131\fi\ifx#141\fi\ifx#151\fi\ifx#161\fi\ifx#171\fi\ifx#181\fi\ifx#191\fi}
+\def\jlreq at helper@chkfloatlist#1{\jlreq at helper@chknumlist{#1}\ifx#1.1\fi}
+% #1が[0-9\.]*に当てはまるか.
+\def\jlreq at iffloat#1{\jlreq at helper@checktokenlist{\jlreq at helper@chkfloatlist}#1\jlreq at endmark}
+\def\jlreq at ifnumber#1{\jlreq at helper@checktokenlist{\jlreq at helper@chknumlist}#1\jlreq at endmark}
+
+%. オプションの定義
+% オプション処理の際にしか使わない変数(後でそれを元に別の変数を調整する)
+% ものは\jlreq at option@<key>に格納する.
+% _とかは@に変換する.
+% 引数無しの\DeclareOptionX
+\newcommand*{\jlreq at DeclareOption}[2]{%
+  \DeclareOptionX{#1}{%
+    \jlreq at ifempty{##1}{}{\ClassError{jlreq}{The option #1 should have no value}{\@ehc}}%
+    #2%
+  }
+}
+\jlreq at aftercls@addtodeletecs{\jlreq at DeclareOption}
+% エンジン類
+\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{}
+\jlreq at aftercls@addtodeletecs{\jlreq at switchpapersize}
+% \jlreq at addpapersize{paper=に指定するもの}{単独オプション名}{横}{縦}
+\newcommand*{\jlreq at addpapersize}[4]{%
+  \@for\@tempa:=#1\do{%
+    \eappto\jlreq at switchpapersize{{\expandonce{\@tempa}}{\unexpanded{\setlength{\paperwidth}{#3}\setlength{\paperheight}{#4}}}}%
+  }%
+  \@for\@tempa:=#2\do{%
+    \expandafter\jlreq at DeclareOption\expandafter{\@tempa}{\setlength{\paperwidth}{#3}\setlength{\paperheight}{#4}}%
+  }%
+}
+\jlreq at aftercls@addtodeletecs{\jlreq at addpapersize}
+\DeclareOptionX{paper}{
+  \edef\jlreq at do{%
+    \unexpanded{\jlreq at switch{#1}}{\expandonce{\jlreq at switchpapersize}}%
+    [\unexpanded{%
+      \jlreq at helper@dividebycomma{#1}%
+      \ifjlreq at result
+        \setlength{\paperwidth}{\dimexpr\jlreq at resulta\relax}%
+        \setlength{\paperheight}{\dimexpr\jlreq at resultb\relax}%
+      \else
+        \ClassError{jlreq}{The paper #1 is unknown}{\@ehc}%
+      \fi
+    }]%
+  }%
+  \jlreq at do
+}
+% 紙サイズ一覧.b*はJIS B.
+\jlreq at addpapersize{a0,A0}{}{841mm}{1189mm}
+\jlreq at addpapersize{a1,A1}{}{594mm}{841mm}
+\jlreq at addpapersize{a2,A2}{}{420mm}{594mm}
+\jlreq at addpapersize{a3,A3}{a3paper}{297mm}{420mm}
+\jlreq at addpapersize{a4,A4}{a4paper}{210mm}{297mm}
+\jlreq at addpapersize{a5,A5}{a5paper}{148mm}{210mm}
+\jlreq at addpapersize{a6,A6}{a6paper}{105mm}{148mm}
+\jlreq at addpapersize{a7,A7}{}{74mm}{105mm}
+\jlreq at addpapersize{a8,A8}{}{52mm}{74mm}
+\jlreq at addpapersize{a9,A9}{}{37mm}{52mm}
+\jlreq at addpapersize{a10,A10}{}{26mm}{37mm}
+
+\jlreq at addpapersize{b0,B0}{}{1030mm}{1456mm}
+\jlreq at addpapersize{b1,B1}{}{728mm}{1030mm}
+\jlreq at addpapersize{b2,B2}{}{515mm}{728mm}
+\jlreq at addpapersize{b3,B3}{}{364mm}{515mm}
+\jlreq at addpapersize{b4,B4}{b4paper}{257mm}{364mm}
+\jlreq at addpapersize{b5,B5}{b5paper}{182mm}{257mm}
+\jlreq at addpapersize{b6,B6}{b6paper}{128mm}{182mm}
+\jlreq at addpapersize{b7,B7}{}{91mm}{128mm}
+\jlreq at addpapersize{b8,B8}{}{64mm}{91mm}
+\jlreq at addpapersize{b9,B9}{}{45mm}{64mm}
+\jlreq at addpapersize{b10,B10}{}{32mm}{45mm}
+
+\jlreq at addpapersize{c2,C2}{}{458mm}{648mm}
+\jlreq at addpapersize{c3,C3}{}{324mm}{458mm}
+\jlreq at addpapersize{c4C,C4}{}{229mm}{354mm}
+\jlreq at addpapersize{c5,C5}{}{162mm}{229mm}
+\jlreq at addpapersize{c6,C6}{}{114mm}{162mm}
+\jlreq at addpapersize{c7,C7}{}{81mm}{114mm}
+\jlreq at addpapersize{c8,C8}{}{57mm}{81mm}
+
+\jlreq at addpapersize{a4var}{}{210mm}{283mm}
+\jlreq at addpapersize{b5var}{}{182mm}{230mm}
+
+\jlreq at addpapersize{letter}{letterpaper}{8.5in}{11in}
+\jlreq at addpapersize{legal}{legalpaper}{8.5in}{14in}
+\jlreq at addpapersize{executive}{executivepaper}{7.25in}{10.5in}
+
+
+%.. フォントサイズ,行長,1ページあたりの行数で基本版面のサイズを決める(2.4.1.a)
+\newcommand*{\jlreq at option@fontsize}{}
+\jlreq at aftercls@addtodeletecs{\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@jafontsize}{}
+\jlreq at aftercls@addtodeletecs{\jlreq at option@jafontsize}
+\DeclareOptionX{jafontsize}{\renewcommand*{\jlreq at option@jafontsize}{#1}}
+\newcommand*{\jlreq at option@jafontscale}{1}
+\DeclareOptionX{jafontscale}{\renewcommand*{\jlreq at option@jafontscale}{#1}}
+\jlreq at aftercls@addtodeletecs{\jlreq at option@jafontscale}
+%.. 行の長さ
+\newcommand*{\jlreq at option@line at length}{}
+\jlreq at aftercls@addtodeletecs{\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}{}
+\jlreq at aftercls@addtodeletecs{\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}{}
+\jlreq at aftercls@addtodeletecs{\jlreq at option@head at space}
+\DeclareOptionX{head_space}{\renewcommand*{\jlreq at option@head at space}{#1}}
+
+%.. 地
+\newcommand*{\jlreq at option@foot at space}{}
+\jlreq at aftercls@addtodeletecs{\jlreq at option@foot at space}
+\DeclareOptionX{foot_space}{\renewcommand*{\jlreq at option@foot at space}{#1}}
+%.. のど
+\newcommand*{\jlreq at option@gutter}{}
+\jlreq at aftercls@addtodeletecs{\jlreq at option@gutter}
+\DeclareOptionX{gutter}{\renewcommand*{\jlreq at option@gutter}{#1}}
+
+%.. 柱とノンブル
+\newcommand*{\jlreq at option@headfoot at verticalpos}{}
+\jlreq at aftercls@addtodeletecs{\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}
+\jlreq at aftercls@addtodeletecs{\jlreq at option@column at gap}
+\DeclareOptionX{column_gap}{\renewcommand*{\jlreq at option@column at gap{#1}}}
+
+%.. 行送り,指定無しの場合は文字サイズの1.7倍とする.(1.5から2倍が好ましい:2.4.2.d 注3)
+\newcommand*{\jlreq at option@baselineskip}{17zw/10}
+\jlreq at aftercls@addtodeletecs{\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}
+
+%.. 注
+% 傍注のタイプ
+\newcommand*{\jlreq at option@sidenote at length}{0pt}
+\jlreq at aftercls@addtodeletecs{\jlreq at option@sidenote at length}
+\DeclareOptionX{sidenote_length}{\renewcommand*{\jlreq at option@sidenote at length}{#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}
+
+\newif\ifjlreq at option@twoside\jlreq at option@twosidefalse % onesideかtwosideが指定された
+\jlreq at aftercls@addtodeleteif{\ifjlreq at option@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 aftercls@addtodeleteif{\ifjlreq at option@open}
+\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 note}[1]{}
+\jlreq at DeclareOption{jlreq_notes}{\renewcommand*{\jlreq at note}[1]{\message{^^JJLReq note: ##1^^J}}}
+
+\ExecuteOptionsX{article_type=article,paper=a4,open_bracket_pos=zenkaku_tentsuki,onecolumn,final}
+% \@removeelementを一旦置き換えてから\ProcessOptionsXを実行する
+\let\jlreq at original@@removeelement=\@removeelement
+\let\@removeelement=\jlreq at helper@removeelement
+\ProcessOptionsX\relax
+\let\@removeelement=\jlreq at original@@removeelement
+\let\jlreq at original@@removeelement=\@undefined
+
+\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}}{%
+  \if at openright
+    \ClassWarningNoLine{jlreq}{The option `openright' is ignored in article}
+    \@openrightfalse
+  \fi
+}{}
+\ifjlreq at option@twoside\else
+  \ifthenelse{\equal{\jlreq at article@type}{book}}{\@twosidetrue}{\@twosidefalse}
+\fi
+
+\def\jlreq at jlreqsetup@keyvallist{}
+\def\jlreq at jlreqsetup@finally{}
+\newcommand{\jlreqsetup}[1]{%
+  \begingroup
+    \edef\jlreq at do{\unexpanded{\jlreq at parsekeyval[jlreqsetup]}{\expandonce{\jlreq at jlreqsetup@keyvallist}}}%
+  \expandafter\endgroup
+  \jlreq at do{#1}%
+  \jlreq at jlreqsetup@finally
+}
+% \jlreqsetupの項目に加えるマクロ.\jlreq at jlreqsetup@add{key}{action}とするとkeyに対して定義できる.
+% action内ではvalが#1として取得できる.(従ってaction内でマクロを定義する際には##1を使う必要がある.)
+\newcommand{\jlreq at jlreqsetup@add}[1]{%
+  \@ifnextchar[{\jlreq at jlreqsetup@add@{#1}}{\jlreq at jlreqsetup@add@@{#1}}%
+}
+\long\def\jlreq at jlreqsetup@add@#1[#2]#3{%
+  \eappto\jlreq at jlreqsetup@keyvallist{\unexpanded{{#1}[#2]{#3}}}%
+}
+\long\def\jlreq at jlreqsetup@add@@#1#2{%
+  \eappto\jlreq at jlreqsetup@keyvallist{\unexpanded{{#1}{#2}}}%
+}
+% \jlreqsetupの最後に必ず実行される処理を入れる.
+\newcommand\jlreq at jlreqsetup@addtofinally[1]{\eappto\jlreq at jlreqsetup@finally{\unexpanded{#1}}}
+\jlreq at aftercls@addtodeletecs{\jlreq at jlreqsetup@add}
+\jlreq at aftercls@addtodeletecs{\jlreq at jlreqsetup@add@}
+\jlreq at aftercls@addtodeletecs{\jlreq at jlreqsetup@add@@}
+\jlreq at aftercls@addtodeletecs{\jlreq at jlreqsetup@addtofinally}
+\@onlypreamble\jlreqsetup
+
+% \jlreq at ifprimitive#1#2#3: #1がprimitiveならば#2を,そうでなければ#3を実行する
+% (\if(pdf)primitiveを避けるようにしている.)
+\def\jlreq at ifprimitive#1{%
+  \edef\@tempa{\string#1}%
+  \edef\@tempb{\meaning#1}%
+  \ifx\@tempa\@tempb\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
+}
+% エンジンの設定
+\ifx\jlreq at engine\@undefined
+  \jlreq at ifprimitive\directlua{
+    \let\jlreq at engine=l
+  }{
+    \jlreq at ifprimitive\ucs{
+      \let\jlreq at engine=u
+    }{
+      \let\jlreq at engine=p
+    }
+  }
+\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
+\if at tate
+  \AtBeginDocument{\tate\message{《縦組モード》}\adjustbaseline}
+\fi
+
+% \jlreq at gol(Gyo Okuri Length), \jlreq at mol (Moji Okuri Length)を定義
+\let\jlreq at gol=\zh
+\let\jlreq at mol=\zw
+
+%. helper2(エンジン依存系)
+% 組方向を判定
+% \jlreq at if(y|t)(dir|box)を定義する.
+\ifx l\jlreq at engine\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi{
+  \def\jlreq at ifydir{\ifnum\ltjgetparameter{direction}=4 \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+  \def\jlreq at iftdir{\ifnum\numexpr\ltjgetparameter{direction}-(\ltjgetparameter{direction}/8)*8\relax=3 \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+  \def\jlreq at ifybox#1{\ifnum\ltjgetparameter{boxdir}{#1}=4 \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+  \def\jlreq at iftbox#1{\ifnum\numexpr\ltjgetparameter{boxdir}{#1}-(\ltjgetparameter{boxdir}{#1}/8)*8\relax=3 \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+}{
+  \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
+  \newcommand*{\jlreq at getpostbreakpenalty}[1]{\ltjgetparameter{postbreakpenalty}{#1}}
+\else
+  \newcommand*{\jlreq at getpostbreakpenalty}[1]{\postbreakpenalty#1}
+\fi
+
+% 現在行の残りを得る.
+\ifx l\jlreq at engine
+  % 以下のコードはおかしい.
+  \newcommand*{\jlreq at calc@current at linewidth@onecolumn}{%
+    \dimexpr\zposx{jlreq at rest@width.pos.\the\jlreq at zref@reference at count} sp - \@totalleftmargin -
+    \ifodd\jlreq at currentpage
+      \oddsidemargin
+    \else
+      \evensidemargin
+    \fi
+    - 1in - \hoffset\relax
+  }
+\else
+  \newcommand*{\jlreq at calc@current at linewidth@onecolumn}{%
+    \dimexpr
+      \jlreq at ifydir{%
+        \zposx{jlreq at rest@width.pos.\the\jlreq at zref@reference at count} sp - \hoffset
+        \ifodd\jlreq at currentpage
+          - \oddsidemargin
+        \else
+          - \evensidemargin
+        \fi
+      }{%
+        \ifdim\pdfpagewidth=0pt
+          \paperheight
+        \else
+          \pdfpageheight
+        \fi
+        - \topmargin - \headheight - \headsep - \voffset
+        - \zposy{jlreq at rest@width.pos.\the\jlreq at zref@reference at count} sp
+      }%
+      - \@totalleftmargin - 1in
+    \relax
+  }
+\fi
+\newcommand*{\jlreq at calc@current at linewidth}{%
+  \dimexpr\jlreq at calc@current at linewidth@onecolumn
+    \if at twocolumn
+      \ifdim\jlreq at calc@current at linewidth@onecolumn<\dimexpr\linewidth+\columnsep\relax\else
+        - \linewidth - \columnsep
+      \fi
+   \fi
+ \relax
+}
+
+\newdimen\jlreq at current@linewidth
+\newdimen\jlreq at rest@linewidth
+% この命令以降,次にこの命令を実行する前まで\jlreq at current@linewidth/\jlreq at rest@linewidthで
+% この行の行頭からの長さ/残りの長さが取得できる
+\newcommand*{\jlreq at savepos@for at rest@linewidth}{%
+  \jlreq at setcurrentpage
+  \global\advance\jlreq at zref@reference at count by 1\relax
+  \zsavepos{jlreq at rest@width.pos.\the\jlreq at zref@reference at count}%
+  \global\jlreq at current@linewidth=\jlreq at calc@current at linewidth
+  \global\jlreq at rest@linewidth=\dimexpr\linewidth - \jlreq at current@linewidth\relax
+  \edef\jlreq at savepos@iflabelundefined{\noexpand\zref at ifrefundefined{jlreq at rest@width.pos.\the\jlreq at zref@reference at count}}%
+}
+
+\ifx l\jlreq at engine
+  \newcommand*{\lastnodechar}{\directlua{luatexja.pltx_composite_last_node_char()}}% undocumentedな機能を使っている
+\fi
+
+% #1と#2の間に入るjmglue((x)kanjiskipも)を\jlreq at resultskipに入れる
+\ifx l\jlreq at engine
+  \newcommand*{\jlreq at calc@jfmglue}[2]{%
+    \begingroup
+      \setbox\jlreq at tempboxa=\hbox{\inhibitglue #1\inhibitglue\hbox{}\inhibitglue#2\inhibitglue}%
+      \setbox\jlreq at tempboxb=\hbox{\inhibitglue #1#2\inhibitglue}%
+      \edef\jlreq at do{\noexpand\jlreq at resultskip=\the\dimexpr\wd\jlreq at tempboxb - \wd\jlreq at tempboxa\relax\noexpand\relax}%
+      \jlreq at do
+      \directlua{
+        local width = 0
+        local stretch = 0
+        local shrink = 0
+        local n = tex.box["jlreq at tempboxb"].head
+        while n do
+          % すべてのglueの和を計算する.
+          if n.id == node.id("glue") then
+            width = width + n.width
+            stretch = stretch + n.stretch
+            shrink = shrink + n.shrink
+          end
+          n = n.next
+        end
+        tex.setglue("jlreq at tempskipa",width,stretch,shrink)
+      }%
+      % TeXで計測した物と一致していなければTeXでの方を信じる
+      \ifdim\jlreq at resultskip=\jlreq at tempskipa
+        \edef\jlreq at do{\noexpand\jlreq at resultskip=\the\jlreq at tempskipa\relax}%
+      \fi
+    \expandafter\endgroup
+    \jlreq at do
+  }
+\else
+  \newcommand*{\jlreq at calc@jfmglue}[2]{%
+    \begingroup
+      \setbox\jlreq at tempboxa=\hbox{\inhibitglue #1\inhibitglue\hbox{}\inhibitglue#2\inhibitglue}%
+      \setbox\jlreq at tempboxb=\hbox{\inhibitglue #1#2\inhibitglue}%
+      \edef\jlreq at do{\noexpand\jlreq at resultskip=\the\dimexpr\wd\jlreq at tempboxb - \wd\jlreq at tempboxa\relax\noexpand\relax}%
+    \expandafter\endgroup
+    \jlreq at do
+  }
+\fi
+
+\newcount\jlreq at lastnodechar
+% \jlreq at fixjfm<次の文字>の形で使う.
+% jlreq at lastnodecharに入っている値と次のトークン(\futureletで得る)の間に入るJFMグルー等を挿入する
+\newcommand*{\jlreq at fixjfm}{%
+  \ifnum\jlreq at lastnodechar>-1
+    \def\@tempa{\futurelet\jlreq at nextchar\jlreq at insertjfm}%
+  \else\def\@tempa{}\fi
+  \@tempa
+}
+% \jlreq at nextcharと\jlreq at lastnodecharの間のJFMグルーを挿入
+\def\jlreq at insertjfm{%
+  \ifnum\jlreq at getpostbreakpenalty{\jlreq at lastnodechar}=0\else\penalty\jlreq at getpostbreakpenalty{\jlreq at lastnodechar}\fi
+  \jlreq at ifletter@expandmacros{\jlreq at nextchar}{%
+    \jlreq at expandmacros{\jlreq at nextchar}{\jlreq at tempa}%
+    \def\jlreq at tempb##1##2\jlreq at endmark{\def\jlreq at tempa{##1}}%
+    \expandafter\jlreq at tempb\jlreq at tempa\jlreq at endmark
+    \jlreq at calc@jfmglue{\char\jlreq at lastnodechar}{\jlreq at tempa}%
+%   \message{fixjfm Insert: \the\jlreq at resultskip}%
+    \hskip\jlreq at resultskip
+    \inhibitglue
+  }{}%
+}
+
+% #1÷#2を\jlreq at resultdimenに入れる.(#1,#2は寸法を与える.)
+\ifx l\jlreq at engine
+  \newcommand*{\jlreq at divide}[2]{%
+    \jlreq at resultdimen=\directlua{tex.print(tostring(\strip at pt\dimexpr #1\relax/\strip at pt\dimexpr #2\relax) .. "pt ")}%
+  }
+\else
+  \newcommand*{\jlreq at divide}[2]{%
+    \begingroup
+      \@tempdima=#1\relax\@tempdimb=#2\relax
+      % 分母を正にする
+      \ifdim\@tempdimb<0pt \@tempdima=-\@tempdima\@tempdimb=-\@tempdimb\fi
+      % \jlreq at tempdima*\@tempdimb <= \@tempdima < (\jlreq at tempdima + 1)*\@tempdimb
+      % となる整数\jlreq at tempdimaを捜し,\jlreq at tempdimb=\jlreq at tempdima + 1とする
+      \jlreq at tempdima=0pt
+      \ifdim\@tempdima<0pt
+        \loop\ifdim\strip at pt\jlreq at tempdima\@tempdimb>\@tempdima\advance\jlreq at tempdima by -1pt\repeat
+      \else
+        \loop\ifdim\strip at pt\jlreq at tempdima\@tempdimb<\@tempdima\advance\jlreq at tempdima by 1pt\repeat
+        \ifdim\strip at pt\jlreq at tempdima\@tempdimb=\@tempdima\else\advance\jlreq at tempdima by -1pt\fi
+      \fi
+      \jlreq at tempdimb=\dimexpr\jlreq at tempdima + 1pt\relax
+      % \jlreq at tempdimaと\jlreq at tempdimbで挟んでいく二分法
+      \jlreq at tempcnta=0 % 無限ループを避けるためのカウンタ
+      \loop\ifnum\numexpr\ifdim\dimexpr\jlreq at tempdimb - \jlreq at tempdima\relax>1sp 1\else0\fi*\ifnum\jlreq at tempcnta<100 1\else 0\fi\relax=1
+        \jlreq at tempdimc=\dimexpr(\jlreq at tempdima+\jlreq at tempdimb)/2\relax
+        \ifdim\strip at pt\jlreq at tempdimc\@tempdimb>\@tempdima\jlreq at tempdimb=\jlreq at tempdimc
+        \else\jlreq at tempdima=\jlreq at tempdimc\fi
+        \advance\jlreq at tempcnta by 1
+      \repeat
+      \edef\jlreq at do{\noexpand\jlreq at resultdimen=\the\jlreq at tempdima\noexpand\relax}%
+    \expandafter\endgroup
+    \jlreq at do
+  }
+\fi
+
+%. 基本設定
+\providecommand*{\jlreq at kanjiskip}{0pt plus 0.25\zw minus 0pt}
+\providecommand*{\jlreq at xkanjiskip}{0.25\zw plus 0.25\zw minus 0.125\zw}
+\ifx l\jlreq at engine
+  \ltjsetparameter{kanjiskip=\jlreq at kanjiskip}
+  \ltjsetparameter{xkanjiskip=\jlreq at xkanjiskip}
+\else
+  \kanjiskip=\jlreq at kanjiskip
+  \xkanjiskip=\jlreq at xkanjiskip
+\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 aftercls@addtodeletecs{\jlreq at setpostbreakpenalty}
+\jlreq at aftercls@addtodeletecs{\jlreq at setprebreakpenalty}
+\jlreq at aftercls@addtodeletecs{\jlreq at setjaxspmode}
+
+\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%とか……
+
+%.. 文字範囲
+\ifx u\jlreq at engine
+  % \kcatcodeの設定
+  \def\jlreq at setkcatcode#1#2{\@for\@tempa:=#1\do{\kcatcode"\@tempa=#2\relax}}
+  \jlreq at aftercls@addtodeletecs{\jlreq at setkcatcode}
+  % LuaTeX-jaのデフォルトのままに近い設定をする
+  % 範囲1&8
+  \jlreq at setkcatcode{80}{15} % Latin-1 Supplement,どうしよう……
+  \jlreq at setkcatcode{100,180,250,2B0,300,1E00}{15}
+  % 範囲2
+  \jlreq at setkcatcode{370,400,1F00}{18}
+  % 範囲3
+  \jlreq at setkcatcode{2000,2070,20A0,20D0,2100,2150,2190,2200,2300,2400,2500,2580,25A0,2600,2700,2900,2980,2B00}{18}
+  % 範囲4
+  \jlreq at setkcatcode{500,530,590,600,700,750,780,7C0,800,840,8A0,900,980,A00,A80,B00,B80,C00,C80,D00,D80,E00,E80,F00,1000,10A0,1200,1380,13A0,1400,1680,16A0,1700,1720,1740,1760,1780,1800,18B0,1900,1950,1980,19E0,1A00,1A20,1AB0,1B00,1B80,1BC0,1C00,1C50,1C80,1CC0,1CD0,1D00,1D80,1DC0,2400,2440,27C0,27F0,2800,2A00,2C00,4DC0,A4D0,A500,A640,A6A0,A700,A720,A800,A840,A880,A8E0,A900,A930,A960,A980,A9E0,AA00,AA60,AA80,AAE0,AB00,AB30,AB70,ABC0,FB00,FB50,FE00,FE20,FE70,10000,10080,10100,10140,10190,101D0,10280,102A0,102E0,10300,10330,10350,10380,103A0,10400,10450,10480,104B0,10500,10530,10600,10800,10840,10860,10880,108E0,10900,10920,10980,109A0,10A00,10A60,10A80,10AC0,10B00,10B40,10B60,10B80,10C00,10C80,10E60,11000,11080,110D0,11100,11150,11180,111E0,11200,11280,112B0,11300,11400,11480,11580,11600,11660,11680,11700,118A0,11AC0,11C00,11C70,12000,12400,12480,13000,14400,16800,16A40,16AD0,16B00,16F00,16FE0,17000,18800,1B000,1BC00,1BCA0,1D000,1D100,1D200,1D300,1D360,1D400,1D800,1E000,1E800,1E900,1EE00,1F000,1F030,1F0A0,1F100,1F200,1F300,1F600,1F650,1F680,1F700,1F780,1F800,1F900,E000}{15}
+  % 範囲5(Variation Selectors SupplementはLuaTeX-jaではE01F0--E01EFまで範囲5,他は範囲6)
+  \jlreq at setkcatcode{D800,DB80,DC00,E0000,F0000,100000}{15}
+  % 範囲6
+  \jlreq at setkcatcode{3040,30A0,31F0}{17} % Hiragana,Katakana,Katakana Phonetic Extensions
+  \jlreq at setkcatcode{2460,3000,3200,3300,FE10,FE30,FE50,E0100}{18} % Enclosed Alphanumerics,CJK Symbols and Punctuation,Enclosed CJK Letters and Months,CJK Compatibility,Vertical Forms,CJK Compatibility Forms,Small Form Variants,Variation Selectors Supplement
+  \jlreq at setkcatcode{2E80,3190,3400,4E00,F900,20000}{16}
+  % 範囲7
+  \jlreq at setkcatcode{A000,A490}{18} % Yi Syllables,Yi Radicals
+  \jlreq at setkcatcode{1100,3130,AC00,D7B0}{19} % Hangul Jamo,Hangul Compatibility Jamo,Hangul Syllables,Hangul Jamo Extended-B
+  \jlreq at setkcatcode{2F00,2FF0,3100,31A0,31C0,A830}{16}
+\fi
+
+% フォントサイズを設定
+\newdimen\jlreq at fontsize
+\newdimen\jlreq at jafontsize
+\ifx l\jlreq at engine
+  % Q,zw,zhが正しく扱われるようになる.\dimexprつきに展開される.
+  \def\jlreq at expand@optionfontsize#1{%
+    \dimexpr\directlua{
+      local act = string.char(92)
+      local s = [[#1]]
+      s = s:gsub("Q",act .. "dimexpr 0.25mm" .. act .. "relax")
+      tex.print(s)
+    }\relax
+  }%
+\else
+  \def\jlreq at expand@optionfontsize#1{\dimexpr#1\relax}
+\fi
+\jlreq at aftercls@addtodeletecs{\jlreq at expand@optionfontsize}
+\ifx\jlreq at option@fontsize\@empty
+  \ifx\jlreq at option@jafontsize\@empty
+    \jlreq at fontsize=10pt
+    \jlreq at jafontsize=\jlreq at option@jafontscale\jlreq at fontsize
+  \else
+    \setlength{\jlreq at jafontsize}{\jlreq at expand@optionfontsize{\jlreq at option@jafontsize}}
+    \jlreq at divide{\jlreq at jafontsize}{\jlreq at option@jafontscale pt}
+    \jlreq at fontsize=\jlreq at resultdimen
+  \fi
+\else
+  \setlength{\jlreq at fontsize}{\jlreq at expand@optionfontsize{\jlreq at option@fontsize}}
+  \ifx\jlreq at option@jafontsize\@empty
+    \jlreq at jafontsize=\jlreq at option@jafontscale\jlreq at fontsize
+  \else
+    \setlength{\jlreq at jafontsize}{\jlreq at expand@optionfontsize{\jlreq at option@jafontsize}}
+  \fi
+\fi
+%. フォント
+\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}
+
+%.. 和文
+% 必要になりそうなリスト
+% 開き括弧(文字クラス1)
+\edef\jlreq at charlist@openingbrackets{(〔[{〈《「『【‘“\ifx p\jlreq at engine\else ⦅〘〖«〝\fi}
+% 閉じ括弧(文字クラス2)
+\edef\jlreq at charlist@closingbrackets{)〕]}〉》」』】’”\ifx p\jlreq at engine\else⦆〙〗»〟\fi}
+% 区切り約物(文字クラス4)
+\edef\jlreq at charlist@dividingpunctuationmarks{!?\ifx p\jlreq at engine\else ‼⁇⁈⁉\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
+  % \item後の行頭括弧のために仕込み.
+  \jlreq at saveoriginalcs{list}
+  \jlreq at saveoriginalcs{endlist}
+  \pretocmd{\list}{\jlreq at pushhook@postpar{\directlua{luatexja.jfmglue.create_beginpar_node()}}}{}{}% ltjsclassesから
+  \apptocmd{\endlist}{\jlreq at pophook@postpar}
+\else
+  % 非LuaTeXの場合はJFMの入れ替えと\everyparでの処理で対処.
+  % 行頭括弧に対して\inhibitglueを入れたりする命令を作る
+  % \jlreq at charlist@openingbracketsの各括弧に対して,\ifx\jlreq at nextchar 「1\fiみたいなのが並んだのを作る
+  \def\jlreq at tempa{}
+  \def\jlreq at do#1{\jlreq at ifendmark{#1}{}{\appto\jlreq at tempa{\ifx\jlreq at nextchar#11\fi}\jlreq at do}}
+  \expandafter\jlreq at do\jlreq at charlist@openingbrackets\jlreq at endmark
+  % JFM glueの伸び縮みで行頭括弧が揃わないのを防ぐために常に\inhibitglueを入れる.
+  \ifthenelse{\equal{\jlreq at open@bracket at pos}{nibu_tentsuki}}{
+    \edef\jlreq at openbracket@hook{\noexpand\ifnum0\expandonce{\jlreq at tempa}>0 \unexpanded{\hskip -.5\zw\inhibitglue}\noexpand\fi}
+  }{% zenkakunibu_nibu,zenkaku_tentsuki
+    \edef\jlreq at openbracket@hook{\noexpand\ifnum0\expandonce{\jlreq at tempa}>0 \unexpanded{\inhibitglue}\noexpand\fi}
+  }
+  \def\jlreq at jfmname@prefix{}
+  \jlreq at aftercls@addtodeletecs{\jlreq at jfmname@prefix}
+  \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} % JFMの名前
+  \edef\jlreq at jfmnameg{\jlreq at jfmname@prefix jlreqg} % ゴシックなJFMの名前
+  \AtBeginDocument{\PushPostHook{par}{\futurelet\jlreq at nextchar\jlreq at openbracket@hook}}
+\fi
+\newcount\jlreq at count@listnest
+\jlreq at count@listnest=0
+% 現在のeveryparへのhookを保存スタックに積んでからPushPostHookする.
+% スタックに積まれたものは\jlreq at pophook@postparで復帰できる
+\def\jlreq at pushhook@postpar#1{%
+  \advance\jlreq at count@listnest by 1
+  \def\@tempa{\SavePostHook{par}}%
+  \expandafter\@tempa\csname jlreq at save@posthook at par \the\jlreq at count@listnest\endcsname
+  \PushPostHook{par}{#1}%
+}
+\def\jlreq at pophook@postpar{%
+  \def\@tempa{\RestorePostHook{par}}%
+  \expandafter\@tempa\csname jlreq at save@posthook at par \the\jlreq at count@listnest\endcsname
+  \expandafter\let\csname jlreq at save@posthook at par \the\jlreq at count@listnest\endcsname=\@undefined
+  \advance\jlreq at count@listnest by -1
+}
+
+% 行頭の括弧は \jlreq at open@bracket at before@space \inhibitglue 「みたいにする.
+\ifthenelse{\equal{\jlreq at open@bracket at pos}{zenkakunibu_nibu}}{
+  \def\jlreq at open@bracket at before@space{\hskip -.5\zw}
+}{
+  \def\jlreq at open@bracket at before@space{}
+}
+
+\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 p\jlreq at engine
+  \def\jlreq at yokokanjiencoding{JY1}
+  \def\jlreq at tatekanjiencoding{JT1}
+\fi
+\ifx u\jlreq at engine
+  \def\jlreq at yokokanjiencoding{JY2}
+  \def\jlreq at tatekanjiencoding{JT2}
+\fi
+\jlreq at divide{\jlreq at jafontsize}{\jlreq at fontsize}
+\edef\jlreq at jafontscale{\strip at pt\jlreq at resultdimen}
+\jlreq at aftercls@addtodeletecs{\jlreq at jafontscale}
+\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}{<->s*[\jlreq at jafontscale]\ltj at stdmcfont:jfm=jlreq;script=latn;-kern}{}
+  \DeclareFontShape{JY3}{gt}{m}{n}{<->s*[\jlreq at jafontscale]\ltj at stdgtfont:jfm=jlreq;script=latn;-kern}{}
+  \DeclareFontShape{JT3}{mc}{m}{n}{<->s*[\jlreq at jafontscale]\ltj at stdmcfont:jfm=jlreqv;script=latn;-kern}{}
+  \DeclareFontShape{JT3}{gt}{m}{n}{<->s*[\jlreq at jafontscale]\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}{<->s*[\jlreq at jafontscale]\jlreq at jfmname}{}
+  \DeclareFontShape{\jlreq at yokokanjiencoding}{gt}{m}{n}{<->s*[\jlreq at jafontscale]\jlreq at jfmnameg}{}
+  \DeclareFontShape{\jlreq at tatekanjiencoding}{mc}{m}{n}{<->s*[\jlreq at jafontscale]\jlreq at jfmname-v}{}
+  \DeclareFontShape{\jlreq at tatekanjiencoding}{gt}{m}{n}{<->s*[\jlreq at jafontscale]\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}{}
+
+% 和文ファミリと欧文ファミリの連動
+\DeclareRobustCommand\rmfamily{%
+  \not at math@alphabet\rmfamily\mathrm
+  \romanfamily\rmdefault\kanjifamily\mcdefault\selectfont}
+\DeclareRobustCommand\sffamily{%
+  \not at math@alphabet\sffamily\mathsf
+  \romanfamily\sfdefault\kanjifamily\gtdefault\selectfont}
+\DeclareRobustCommand\ttfamily{%
+  \not at math@alphabet\ttfamily\mathtt
+  \romanfamily\ttdefault\kanjifamily\gtdefault\selectfont}
+
+% 数式フォント設定
+\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}%
+}
+
+% 和文間隔
+\def\jlreq at zenkakuspace@fixjfm{%
+  \ifnum\jlreq at lastnodechar>-1
+    \def\@tempa{\futurelet\jlreq at nextchar\jlreq at zenkakuspace@fixjfm@}%
+  \else\def\@tempa{\ignorespaces}\fi
+  \@tempa
+}
+\def\jlreq at zenkakuspace@fixjfm@{\jlreq at insertjfm\ignorespaces}
+
+\def\jlreq at tempa{}
+\def\jlreq at do#1{\jlreq at ifendmark{#1}{}{\appto\jlreq at tempa{\ifnum\lastnodechar=`#1 1\fi}\jlreq at do}}
+\expandafter\jlreq at do\jlreq at charlist@dividingpunctuationmarks\jlreq at endmark
+\edef\@tempa{\noexpand\ifnum0\expandonce{\jlreq at tempa}>0 }
+\expandafter\DeclareRobustCommand\expandafter*\expandafter\ \expandafter{\@tempa
+    \hskip 1\zw\hbox{}%
+    \jlreq at lastnodechar=` 
+    \expandafter\jlreq at zenkakuspace@fixjfm
+  \else \expandafter\ignorespaces\fi
+}
+\ifx l\jlreq at engine
+  {
+    \catcode` =\active
+    \global\let =\ 
+  }
+  \AtBeginDocument{\catcode` =\active}
+\fi
+
+% \jaspace
+\DeclareRobustCommand*{\jaspace}[1]{%
+  \ifcsname jlreq at jaspace@#1\endcsname\csname jlreq at jaspace@#1\endcsname
+  \else\ClassError{jlreq}{unknown jaspace: #1}{\@ehc}\fi
+}
+\def\jlreq at jaspace@zenkaku{\hskip \glueexpr 1\zw\relax}
+\def\jlreq at jaspace@nibu{\hskip \glueexpr .5\zw\relax}
+\def\jlreq at jaspace@shibu{\hskip \glueexpr .25\zw\relax}
+
+% 区切り約物.\? みたいな命令を作る.直後の空きが自動で入る.
+% \?*とすると文中の?として扱われる.
+\def\jlreq at tempa{}
+\def\jlreq at do#1{\jlreq at ifendmark{#1}{}{\appto\jlreq at tempa{\ifx\jlreq at nextchar #11\fi}\jlreq at do}}
+\expandafter\jlreq at do\jlreq at charlist@closingbrackets\jlreq at endmark
+\edef\jlreq at dividingpunctuationmarkscommand{%
+  \noexpand\ifnum 0\expandonce{\jlreq at tempa}>0\unexpanded{\else\ \fi\ignorespaces}%
+}
+\def\jlreq at do#1{%
+  \jlreq at ifendmark{#1}{}{
+    \expandafter\DeclareRobustCommand\expandafter*\csname #1\endcsname{%
+      \jlreq at ifstar
+        {\hskip .25\zw #1\hskip .25\zw\ignorespaces}%
+        {#1\futurelet\jlreq at nextchar\jlreq at dividingpunctuationmarkscommand}%
+    }
+    \jlreq at do
+  }
+}
+\expandafter\jlreq at do\jlreq at charlist@dividingpunctuationmarks\jlreq at endmark
+
+% \baselineskipの計算
+% いったん文字サイズを変更((u)platexの際にzh/zwをきちんとするため)
+\@setfontsize\normalsize{\jlreq at fontsize}{\jlreq at fontsize}%
+\newdimen\jlreq at baselineskip
+\ifx l\jlreq at engine
+  \setlength{\jlreq at baselineskip}{%
+    \dimexpr\directlua{
+      local act = string.char(92)
+      local s = [[\jlreq at option@baselineskip]]
+      s = s:gsub("Q",act .. "dimexpr 0.25mm" .. act .. "relax"):gsub("zh",act .. "zh"):gsub("zw",act .. "zw")
+      tex.print(s)
+    }\relax
+  }%
+\else
+  \setlength{\jlreq at baselineskip}{\dimexpr\jlreq at option@baselineskip\relax}
+\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\zw} \OR \lengthtest{\jlreq at baselineskip>2\zw}}{
+  \jlreq at note{行間は二分以上全角以下が望ましい (2.4.2.d 注3).}
+}{}
+
+\emergencystretch 3\jlreq at gol
+
+%.. 文字サイズ変更
+\def\jlreq at setfontsizehook{}
+\jlreq at saveoriginalcs{set at fontsize}
+\apptocmd{\set at fontsize}{\expandafter\def\expandafter\size at update\expandafter{\size at update\jlreq at setfontsizehook}}{}{}
+\appto\jlreq at setfontsizehook{\ifdim\parindent>0pt \setlength{\parindent}{1\zw}\fi}
+\ifx l\jlreq at engine
+  \@tempskipa=\ltjgetparameter{kanjiskip}
+  \ifdim\@tempskipa=\maxdimen\else
+    \appto\jlreq at setfontsizehook{%
+      \ltj at setpar@global
+      \ltjsetkanjiskip\jlreq at kanjiskip
+      \@tempskipa=\ltjgetparameter{xkanjiskip}%
+      \ifdim\@tempskipa>0pt
+        \ltjsetxkanjiskip\jlreq at xkanjiskip
+      \fi
+    }
+  \fi
+\else
+  \appto\jlreq at setfontsizehook{%
+    \kanjiskip=\jlreq at kanjiskip
+    \ifdim\xkanjiskip>0pt
+      \xkanjiskip=\jlreq at xkanjiskip
+    \fi
+  }
+\fi
+\jlreq at divide{\jlreq at fontsize}{\jlreq at jafontsize}
+\edef\jlreq at jafontinvscale{\strip at pt\jlreq at resultdimen}
+\newcommand*{\jafontsize}[2]{%
+  \begingroup
+    \jlreq at iffloat{#1}{%
+      \jlreq at tempdima=\jlreq at jafontinvscale\dimexpr #1pt\relax
+      \edef\jlreq at do{\noexpand\fontsize{\strip at pt\jlreq at tempdima}{\unexpanded{#2}}}%
+    }{%
+      \jlreq at tempdima=\jlreq at jafontinvscale\dimexpr#1\relax
+      \edef\jlreq at do{\noexpand\fontsize{\expandonce{\the\jlreq at tempdima}}{\unexpanded{#2}}}%
+    }%
+  \expandafter\endgroup
+  \jlreq at do
+}
+
+\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
+\setbox\jlreq at tempboxa\hbox{阿}
+\setlength\Cht{\ht\jlreq at tempboxa}
+\setlength\Cdp{\dp\jlreq at tempboxa}
+\setlength\Cwd{\wd\jlreq at tempboxa}
+\setlength\Cvs{\baselineskip}
+\setlength\Chs{\wd\jlreq at tempboxa}
+
+% 4.1.3.a
+% 2.5.2 \baselineskipは一定の方がよい?
+% \@listiは再定義しないようにした.(\normalsizeと共用でJLReq通りだと思う.)
+\newcommand{\footnotesize}{%
+  \@setfontsize\footnotesize{.8\jlreq at fontsize}{\dimexpr 115\jlreq at baselineskip/170\relax}% 脚注文字サイズの二分より少し小さい値を行間に: 4.2.5.e
+  \abovedisplayskip .6\jlreq at fontsize \@plus.2\jlreq at fontsize \@minus.4\jlreq at fontsize
+  \abovedisplayshortskip \z@ \@plus.1\jlreq at fontsize
+  \belowdisplayshortskip .3\jlreq at fontsize \@plus.1\jlreq at fontsize \@minus.2\jlreq at fontsize
+  \belowdisplayskip \abovedisplayskip}
+% tsize10.cloの引数を,そのまま\jlreq at fontsize/\jlreq at baselineskipでスケーリングしているだけ.
+\newcommand{\small}{%
+  % jsarticleのもの
+  \@setfontsize\small{.9\jlreq at fontsize}{\dimexpr 13\jlreq at baselineskip/17\relax}%
+  \abovedisplayskip .9\jlreq at fontsize \@plus.3\jlreq at fontsize \@minus.4\jlreq at fontsize
+  \abovedisplayshortskip \z@ \@plus.3\jlreq at fontsize
+  \belowdisplayshortskip \abovedisplayshortskip
+  \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}}
+
+%. plextから一部拝借
+% オプションも*もない\rensuji(コピペ)
+\DeclareRobustCommand{\jlreq at rensuji}[1]{%
+  \ifvmode\leavevmode\fi
+  \jlreq at ifydir{\hbox{#1}}{%
+    \hskip 0pt plus 0.25\zw minus 0pt % \rensujiskipは固定値
+    \setbox\jlreq at tempboxa=\hbox{\yoko#1}%
+    \@tempdima=\dimexpr\ht\jlreq at tempboxa+\dp\jlreq at tempboxa\relax
+    \vrule\@width\z@ \@height.5\@tempdima \@depth.5\@tempdima
+    \hbox to 1\zw{\yoko\hss#1\hss}%
+    \hskip 0pt plus 0.25\zw minus 0pt
+}}
+\def\jlreq at Kanji#1{\expandafter\kansuji\csname c@#1\endcsname}
+
+% このあたりはtarticleと同じ
+\setlength\lineskip{.1\zh}
+\setlength\normallineskip{.1\zh}
+\renewcommand{\baselinestretch}{}
+\setlength\parskip{0\p@ \@plus \p@}
+\setlength\parindent{1\zw}
+\@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}
+
+%.. 傍注(4.2.7)
+\begingroup
+  \footnotesize
+  \setlength{\jlreq at tempdima}{\jlreq at speciallength{\jlreq at option@sidenote at length}}
+  \jlreq at tempdimb=1\zw
+  \divide\jlreq at tempdima\jlreq at tempdimb
+  \multiply\jlreq at tempdima\jlreq at tempdimb
+  \edef\jlreq at do{
+    \noexpand\setlength{\noexpand\marginparwidth}{\the\jlreq at tempdima}
+    \noexpand\setlength{\noexpand\marginparpush}{\the\dimexpr 0.5\zw\relax} % 同上:4.2.7.g
+  }
+  \expandafter\endgroup
+\jlreq at do
+\ifdim\marginparwidth>0pt
+  \setlength{\marginparsep}{2\zw} % フォントサイズ×2(4.2.7:特に問題に~e)
+\else
+  \setlength{\marginparsep}{0pt} % フォントサイズ×2(4.2.7:特に問題に~e)
+\fi
+
+\ifdim\marginparwidth>25\zw\relax
+  \jlreq at note{並列注の字詰め方向の長さ(行長)は,15字から20字くらいである.ケースによっては25字程度にする場合もある (4.2.7).}
+\fi
+% 縦書きの時は脚注に固定
+% (TODO: 頭注)
+\if at tate\@mparswitchfalse\fi
+
+% \textwidthと\textheightのデフォルト値は縦横ともに0.75倍(調整が入る).
+%.. \textwidth:文字送り方向の行長
+% 二段の場合は最初の段の頭から次の段の後まで
+% 一度\textwidthに一行の長さの文字数を入れる(段組の場合でも)
+\@tempdima=1\zw
+\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
+    \addtolength{\textwidth}{\dimexpr-2\marginparwidth - 2\marginparsep\relax}
+    \setlength{\textwidth}{\dimexpr(\textwidth - \columnsep)/2\relax}
+  \else
+    \addtolength{\textwidth}{\dimexpr-\marginparwidth - \marginparsep\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 note{一行の長さは52文字以下が望ましい (2.4.2.c 注2).}
+    \fi
+  \else
+    \ifnum\number\textwidth>40
+      \jlreq at note{一行の長さは40文字以下が望ましい (2.4.2.c 注2).}
+    \fi
+  \fi
+\fi
+\multiply\textwidth\@tempdima
+\if at twocolumn
+  \setlength{\textwidth}{\dimexpr2\textwidth + \columnsep\relax}
+\fi
+
+\setlength{\topskip}{1\zw} % フォントサイズと一致させる
+
+%.. \textheight:行送り方向の長さ
+% 一番上(直後に\topskip由来が入る)から最終行のベースラインまでの長さ.
+% \topskipが十分ある時は先頭行のベースラインから最終行のベースライン+\topskip
+\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 option@number at of@lines\baselineskip - \baselineskip + \topskip\relax}
+\fi
+
+\ifx\jlreq at option@headfoot at verticalpos\@empty
+  \if at tate\def\jlreq at option@headfoot at verticalpos{1zw}
+  \else\def\jlreq at option@headfoot at verticalpos{2zh}\fi
+\fi
+\setlength{\headsep}{\jlreq at speciallength{\jlreq at option@headfoot at verticalpos}}
+\ifdim\headsep<1\zw\relax\jlreq at note{基本版面との上下方向の最低の空き量を,基本版面の文字サイズの全角アキとする (26.1.a).}\fi
+\setlength{\headheight}{1\zw}
+%.. 横
+\ifx\jlreq at option@gutter\@empty
+  % 中央配置
+  \if at tate
+    \setlength{\oddsidemargin}{\dimexpr\paperwidth - \textheight + \topskip\relax}
+  \else
+    \if at twocolumn
+      \setlength{\oddsidemargin}{\dimexpr\paperwidth - \textwidth\relax}
+    \else
+      \setlength{\oddsidemargin}{\dimexpr\paperwidth - \textwidth - \marginparsep - \marginparwidth\relax}
+    \fi
+  \fi
+  \setlength{\oddsidemargin}{.5\oddsidemargin}
+  \ifnum0\if at twocolumn1\fi\if at tate1\fi>0
+    \setlength{\evensidemargin}{\oddsidemargin}
+  \else
+    \setlength{\evensidemargin}{\dimexpr\oddsidemargin + \marginparsep + \marginparwidth\relax}
+  \fi
+\else
+  \if at tate
+    \setlength{\evensidemargin}{\jlreq at speciallength{\jlreq at option@gutter}}
+    \setlength{\oddsidemargin}{\dimexpr\paperwidth - \textheight - \evensidemargin + \topskip - \Cht\relax}
+    \addtolength{\evensidemargin}{\Cdp}
+  \else
+    \setlength{\oddsidemargin}{\jlreq at speciallength{\jlreq at option@gutter}}
+    \if at twocolumn
+      \addtolength{\oddsidemargin}{\dimexpr\marginparsep + \marginparwidth\relax}
+    \fi
+    \setlength{\evensidemargin}{\dimexpr\paperwidth - \textwidth - \oddsidemargin\relax}
+  \fi
+\fi
+\addtolength{\oddsidemargin}{-1in}
+\addtolength{\evensidemargin}{-1in}
+
+%.. 縦
+% \topmarginに全体の頭からテキストの頭までの長さを入れる
+% 天の値からtopmarginを設定する
+\def\jlreq at settopmarginbyhead#1{
+  \if at tate
+    \setlength{\topmargin}{\dimexpr #1 - \headsep - \headheight - 1in\relax}
+    \if at twocolumn
+      \addtolength{\topmargin}{\dimexpr\marginparwidth + \marginparsep\relax}
+    \fi
+    \jlreq at note{縦組の場合は地の空き量を指定する (2.4.1.b).}
+  \else
+    \setlength{\topmargin}{\dimexpr #1 - \headsep - \headheight - 1in - \topskip + \Cht\relax}
+  \fi
+}
+\jlreq at aftercls@addtodeletecs{\jlreq at settopmarginbyhead}
+% 地の値から
+\def\jlreq at settopmarginbyfoot#1{
+  \if at tate
+    \setlength{\topmargin}{\dimexpr\paperheight - \textwidth - \headsep - \headheight - 1in - #1 - \marginparsep - \marginparwidth\relax}
+  \else
+    \jlreq at note{横組の場合は天の空き量を指定する (2.4.1.b).}
+    \setlength{\topmargin}{\dimexpr\paperheight - \textheight + \topskip - 1\zh - \headsep - \headheight - 1in - #1\relax}
+  \fi
+}
+\jlreq at aftercls@addtodeletecs{\jlreq at settopmarginbyfoot}
+\ifx\jlreq at option@head at space\@empty
+  \ifx\jlreq at option@foot at space\@empty
+    \if at tate
+      \if at twocolumn
+        \jlreq at settopmarginbyfoot{\dimexpr(\paperheight - \textwidth - 2\marginparwidth - 2\marginparsep)/2\relax}
+      \else
+        \jlreq at settopmarginbyfoot{\dimexpr(\paperheight - \textwidth - \marginparwidth - \marginparsep)/2\relax}
+      \fi
+    \else
+      \jlreq at settopmarginbyhead{\dimexpr(\paperheight - (\textheight - \topskip + 1\zh))/2\relax}
+    \fi
+  \else
+    \jlreq at settopmarginbyfoot{\jlreq at speciallength{\jlreq at option@foot at space}}
+  \fi
+\else
+  \ifx\jlreq at option@foot at space\@empty
+    \jlreq at settopmarginbyhead{\jlreq at speciallength{\jlreq at option@head at space}}
+  \else
+    % 両方指定されていたら,縦書きは地を,横書きは天を使う
+    \if at tate
+      \jlreq at settopmarginbyfoot{\jlreq at speciallength{\jlreq at option@foot at space}}
+      \ClassWarningNoLine{jlreq}{head_space is ignored}
+    \else
+      \jlreq at settopmarginbyhead{\jlreq at speciallength{\jlreq at option@head at space}}
+      \ClassWarningNoLine{jlreq}{foot_space is ignored}
+    \fi
+  \fi
+\fi
+
+%.. 下
+\setlength{\footskip}{\dimexpr\headsep + 1\zw\relax}
+% \maxdepth + \topskip = フォントサイズ×1.5(だってさ)
+\setlength{\maxdepth}{\dimexpr1.5\zw - \topskip\relax}
+
+%. 見出し関係 (4.1)
+% 同行見出し以外では,jlreq at heading@maketoc@<命令名>が\tableofcontents用の出力をするために呼び出される.
+% #1=*または空(見出し命令に*がついていたかで分岐),#2=ラベル,#3=running head
+% デフォルトでは\<命令名>markと\addcontentslineが必要ならば呼ばれる.
+% 同行見出しでは\@startsection任せ
+
+% 見出しの直前に実行される
+\newcommand*{\jlreq at hook@beforeheadings}[1]{}
+% 見出し名一覧を格納する
+\def\jlreq at heading@allheadings{}
+
+%.. 中/半扉見出し
+% addcontentslineに渡すやつ:番号出すのと出さないの
+\newcommand{\DeclareTobiraHeading}[3]{%
+  \def\jlreq at do{\@removeelement{#1}}%
+  \expandafter\jlreq at do\expandafter{\jlreq at heading@allheadings}{\jlreq at heading@allheadings}%
+  \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:#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}%
+    \def\jlreq at do{}%
+    \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}}}%
+    \@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\zw
+      \divide\jlreq at tempdima by \jlreq at tempdimb
+      \eappto\jlreq at do{%
+        \noexpand\def\expandonce{\csname l@#1\endcsname}{\unexpanded{\@dottedtocline{#2}{0\zw}}{\the\numexpr\jlreq at tempdima + 1\relax\noexpand\zw}}%
+      }%
+    }{}%
+    \edef\jlreq at do{%
+      \expandonce{\jlreq at do}%
+      \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:別行見出しを出力する命令.
+% \jlreq at startBlockHeading{1 = 命令名}{2 = レベル}{3 = スペース関連}{4 =  フォーマット関連}{5 = 全体フォーマット}*{見出し}[副題]
+% スペース関連={配置:lcr(左中央右)}{字下げ(寸法)}{字上げ(寸法)}{前空き}{後空き}{行取りの行数}{空か*か,偶数ページでも改ページを許可するならば空}
+% 前/後空きはprefixにa:/s:/r:が入る.r:は空きがその値そのものになる.a:/s:は行取りに加えて入る.a:で指定された空きはページ行頭では入らない
+% 後空きの時はs:は指定できない.
+% フォーマット関連:
+% フォーマット関連={ラベルのみのフォーマット}{ラベルフォーマット}{見出し文字列フォーマット}{見出し文字列フォーマット(ラベル無し)}{副題フォーマット}{副題フォーマット(ラベル無し)}{見出し全体のフォーマット}
+% 見出しそのものは「全体フォーマット」に従い出力される.パラメータトークン#1を含み,#1=見出し本体:スペース関連と上の「見出し全体のフォーマット」に基づいて整形される.
+% 見出し全体のフォーマット内では#1=ラベル,#2=見出し文字列,#3=副題,それぞれ各々のフォーマットに基づき整形される.
+% ラベルフォーマットでは#1=カウンタ名,見出し文字列フォーマットでは#1=見出し文字列,副題フォーマットでは#1=副題
+% ラベルのみのフォーマットは目次に使われる.
+\newcommand{\jlreq at startBlockHeading}[5]{%
+  % 一端フックを無効化
+  \edef\jlreq at BlockHeading@start at format{\unexpanded{#4}}% この二つは\parを含むかもしれないので引数渡しはしない(後の\@ifstarで詰まる)
+  \edef\jlreq at BlockHeading@start at totalformat{\unexpanded{#5}}%
+  \jlreq at BlockHeading@start@{#1}{#2}{#3}%
+}
+% {1 = 命令}{2 = レベル}{3 = スペース関連}
+\newcommand{\jlreq at BlockHeading@start@}[3]{%
+  \@ifstar{\@dblarg{\jlreq at BlockHeading@start@@{#1}{#2}{#3}{*}}}{\@dblarg{\jlreq at BlockHeading@start@@{#1}{#2}{#3}{}}}%
+}
+% {1 = 命令}{2 = レベル}{3 = スペース関連}{4 = *}[5 = running head]{6 = 見出し}
+\long\def\jlreq at BlockHeading@start@@#1#2#3#4[#5]#6{%
+  \jlreq at ifnextchar[{\jlreq at BlockHeading@start@@@{#1}{#2}{#3}{#4}{#5}{#6}}{\jlreq at BlockHeading@start@@@{#1}{#2}{#3}{#4}{#5}{#6}[]}%
+}
+
+% {1 = 命令}{2 = レベル}{3 = スペース関連}{4 = *}{5 = running head}{6 = 見出し}[7 = 副題]
+\long\def\jlreq at BlockHeading@start@@@#1#2#3#4#5#6[#7]{%
+  \edef\jlreq at do{\unexpanded{\jlreq at BlockHeading@start@@@@{#1}{#2}{#3}}{\expandonce{\jlreq at BlockHeading@start at format}}{\expandonce{\jlreq at BlockHeading@start at totalformat}}}%
+  \jlreq at do{#4}{#5}{#6}{#7}%
+}
+
+% {1 = 命令}{2 = レベル}{3 = スペース関連}{4 = フォーマット群}{5 = 全フォーマット}{6 = *}{7 = running head}{8 = 見出し}{9 = 副題}
+\long\def\jlreq at BlockHeading@start@@@@#1#2#3#4#5#6#7#8#9{%
+  \edef\jlreq at tempa##1##2##3##4##5##6##7{%
+    \unexpanded{\jlreq at BlockHeading@start at makeoutput{#1}{#2}}{{##1}{##2}{##3}}\unexpanded{{#4}{#6}{#7}{#8}{#9}}%
+    \unexpanded{\def\jlreq at tempb}{{##4}{##5}{##6}{##7}}% 縦方向空き
+  }%
+  \jlreq at tempa#3%
+  \global\advance\jlreq at BlockHeading@spaces at current@count by 1
+  \appto\jlreq at BlockHeading@spaces at current@sequence{_#1}%
+  \expandafter\xdef\csname jlreq at BlockHeading@spaces at current@output@\the\jlreq at BlockHeading@spaces at current@count\endcsname{%
+    \expandonce{\jlreq at resultb}%
+  }%
+  \expandafter\xdef\csname jlreq at BlockHeading@spaces at current@space@\the\jlreq at BlockHeading@spaces at current@count\endcsname{%
+    \expandonce{\jlreq at tempb}%
+  }%
+  \expandafter\xdef\csname jlreq at BlockHeading@spaces at current@format@\the\jlreq at BlockHeading@spaces at current@count\endcsname{%
+    \unexpanded{#5}%
+  }%
+  \expandafter\xdef\csname jlreq at BlockHeading@spaces at current@before@\the\jlreq at BlockHeading@spaces at current@count\endcsname{
+    \expandonce{\jlreq at resulta}%
+  }%
+  \expandafter\xdef\csname jlreq at BlockHeading@spaces at current@after@\the\jlreq at BlockHeading@spaces at current@count\endcsname{}%
+  \jlreq at BlockHeading@start at afterheading
+}
+
+\def\jlreq at BlockHeading@start at afterheading{\futurelet\jlreq at nextchar\jlreq at BlockHeading@start at afterheading@}
+\edef\jlreq at BlockHeading@start at afterheading@{%
+  \noexpand\ifx\expandonce{\space}\unexpanded{\jlreq at nextchar\expandafter\jlreq at BlockHeading@start at afterheading@@}%
+  \unexpanded{\else\expandafter\jlreq at BlockHeading@start at afterheading@@@\fi}%
+}
+% スペースを読み飛ばす
+\expandafter\def\expandafter\jlreq at BlockHeading@start at afterheading@@\space{\jlreq at BlockHeading@start at afterheading}
+\def\jlreq at BlockHeading@start at afterheading@@@{%
+  \def\jlreq at do{\jlreq at BlockHeading@spaces at output\jlreq at BlockHeading@spaces at clear}%
+  \expandafter\@for\expandafter\@tempa\expandafter:\expandafter=\jlreq at BlockHeading@allheadings\do{%
+    \expandafter\ifx\csname\@tempa\endcsname\jlreq at nextchar\def\jlreq at do{}\fi
+  }%
+  % \jlreq at BlockHeading@HeadingSpaces at ignoretokens内のものは特別扱いする
+  \expandafter\@tfor\expandafter\@tempa\expandafter:\expandafter=\jlreq at BlockHeading@HeadingSpaces at ignoretokens\do{%
+    \expandafter\ifx\@tempa\jlreq at nextchar
+      \edef\jlreq at do{%
+        \unexpanded{\let\jlreq at BlockHeading@start at savecs=}\expandonce{\@tempa}%
+        \noexpand\pretocmd\expandonce{\@tempa}{\noexpand\let\expandonce{\@tempa}=\noexpand\jlreq at BlockHeading@start at savecs\noexpand\jlreq at BlockHeading@HeadingSpaces at saveafter}{}{}%
+        \noexpand\apptocmd\expandonce{\@tempa}{\unexpanded{\jlreq at endmark\jlreq at BlockHeading@start at afterheading}}{}{}%
+      }%
+    \fi
+  }%
+  \jlreq at do
+}
+
+\def\jlreq at BlockHeading@HeadingSpaces at saveafter#1\jlreq at endmark{%
+  \csxappto{jlreq at BlockHeading@spaces at current@after@\the\jlreq at BlockHeading@spaces at current@count}{\unexpanded{#1}}%
+}
+
+% 特別扱いしたいトークンの列を並べる
+\def\jlreq at BlockHeading@HeadingSpaces at ignoretokens{\label}
+
+% \jlreq at resultaにaux吐き出しとかを入れて,\jlreq at resultbに出力を入れる(縦方向調整なし)
+% {1 = 命令}{2 = レベル}{3 = スペース関連(横方向のみ)}{4 = フォーマット群}{5 = *}{6 = running head}{7 = 見出し}{8 = 副題}
+\long\def\jlreq at BlockHeading@start at makeoutput#1#2#3#4#5#6#7#8{%
+  \begingroup
+    \ifnum0\jlreq at ifempty{#5}{}{1}\ifnum #2>\c at secnumdepth 1\fi>0
+      \def\jlreq at tempc{*}%
+    \else
+      \def\jlreq at tempc{}%
+    \fi
+    \long\def\jlreq at tempa##1##2##3##4##5##6##7{%
+      \long\def\jlreq at tempa{##1}% 素のラベルのフォーマットを取り出す
+      \edef\jlreq at tempb{\unexpanded{{##2}{##3}{##4}{##5}{##6}{##7}}{\expandonce{\jlreq at tempc}}}% 残り
+    }%
+    \jlreq at tempa#4%
+    \expandafter\jlreq at BlockHeading@start at makeoutput@@\jlreq at tempb{#7}{#8}%
+    \edef\jlreq at do{\noexpand\jlreq at BlockHeading@start at makeoutput@\unexpanded{#3}{\expandonce{\jlreq at result}}}%
+    \jlreq at do
+    \edef\jlreq at do{%
+      \unexpanded{\def\jlreq at resulta}{%
+        \expandafter\if\jlreq at tempc *\else\unexpanded{\refstepcounter{#1}}\fi
+        \expandonce{\csname jlreq at heading@maketoc@#1\endcsname}{\unexpanded{#5}}{\expandonce{\jlreq at tempa}}{\unexpanded{#6}}%
+      }%
+      \unexpanded{\def\jlreq at resultb}{%
+        \expandonce{\jlreq at result}%
+      }%
+    }%
+  \expandafter\endgroup
+  \jlreq at do
+}
+
+% {1 = 配置(clr)}{2 = 字下げ}{3 = 字上げ}{4 = 出力}
+\long\def\jlreq at BlockHeading@start at makeoutput@#1#2#3#4{%
+  \edef\jlreq at result{%
+    \noindent
+    \jlreq at ifempty{#2}{}{\unexpanded{\hskip #2}}%
+    \noexpand\vbox{%
+      \noexpand\noindent
+      \ifx#1c\noexpand\centering\fi
+      \ifx#1r\noexpand\raggedleft\fi
+      \jlreq at ifempty{#2}{}{\unexpanded{\hsize=\dimexpr\hsize - #2\relax}}%
+      \jlreq at ifempty{#3}{}{\unexpanded{\hsize=\dimexpr\hsize - #3\relax}}%
+      \unexpanded{#4}}%
+  }%
+}
+
+% {1 = ラベルフォーマット}{2 = 見出し文字列フォーマット}{3 = 見出し文字列フォーマット(ラベル無し)}{4 = 副題フォーマット}{5 = 副題フォーマット(ラベル無し)}{6 = 全体フォーマット}{7 = *}{8 = 見出し}{9 = 副題}
+% \jlreq at resultに出力対象を入れる
+\long\def\jlreq at BlockHeading@start at makeoutput@@#1#2#3#4#5#6#7#8#9{%
+  \begingroup
+    % \jlreq at tempaに{ラベル}{見出し}{副題}という形のものを入れる
+    \jlreq at ifempty{#7}{%
+      % ラベルあり
+      \long\def\jlreq at tempa{#1}%
+      \long\def\jlreq at tempb##1{#2}%
+      \jlreq at ifempty{#9}{\def\jlreq at tempc##1{}}{\long\def\jlreq at tempc##1{#4}}%
+    }{%
+      \long\def\jlreq at tempa{}%
+      \long\def\jlreq at tempb##1{#3}%
+      \jlreq at ifempty{#9}{\def\jlreq at tempc##1{}}{\long\def\jlreq at tempc##1{#5}}%
+    }%
+    \edef\jlreq at tempa{{\expandonce{\jlreq at tempa}}{\expandonce{\jlreq at tempb{#8}}}{\expandonce{\jlreq at tempc{#9}}}}%
+    \long\def\jlreq at tempb##1##2##3{#6}%
+    \edef\jlreq at tempa{\noexpand\expandonce{\noexpand\jlreq at tempb\expandonce{\jlreq at tempa}}}%
+    \edef\jlreq at do{\unexpanded{\def\jlreq at result}{\jlreq at tempa}}%
+  \expandafter\endgroup
+  \jlreq at do
+}
+
+\def\jlreq at BlockHeading@start at removecolumn#1:{#1}
+
+% 空き指定を解釈する.a:10pt -> \jlreq at resulta=a,\jlreq at resultb=10pt
+\def\jlreq at BlockHeading@start at analyzespace#1:#2\jlreq at endmark{%
+  \jlreq at ifempty{#1}{%
+    \def\jlreq at resulta{}%
+    \def\jlreq at resultb{}%
+  }{%
+    \let\jlreq at resulta=#1%
+    \edef\jlreq at resultb{\expandonce{\jlreq at BlockHeading@start at removecolumn#2}}%
+  }%
+}
+
+% 行取り処理
+% {1 = 前空き}{2 = 後ろ空き}{3 = トータル行数}{4 = 偶数ページ改ページするなら空}{5 = 出力}
+\long\def\jlreq at BlockHeading@start at gyodori#1#2#3#4#5{{%
+  \par
+  \jlreq at ifempty{#4}{\jlreq at setcurrentpage}{}%
+  \setbox\jlreq at tempboxa=\vbox{#5}%
+  % \jlreq at tempskip(a/b)に前/後ろに入れるべき値を入れる
+  % #1がa:ならばその値は\jlreq at tempskipaには足さず\jlreq at tempskipcに入れておく
+  \jlreq at tempskipa=0pt
+  \jlreq at tempskipc=0pt
+  \jlreq at BlockHeading@start at analyzespace#1:\jlreq at endmark
+  \let\jlreq at maeakitype=\jlreq at resulta
+  \let\jlreq at maeaki=\jlreq at resultb
+  \jlreq at BlockHeading@start at analyzespace#2:\jlreq at endmark
+  \let\jlreq at ushiroakitype=\jlreq at resulta
+  \let\jlreq at ushiroaki=\jlreq at resultb
+  \def\jlreq at lines{#3}%
+  % 両方強制指定の場合は行数を無視する.
+  \ifx r\jlreq at maeakitype\ifx r\jlreq at ushiroakitype\def\jlreq at lines{}\fi\fi
+  \setbox\jlreq at tempboxb=\hbox{阿}%
+  \ifx\jlreq at lines\@empty
+    \ifx\jlreq at maeaki\@empty\else
+      \jlreq at tempskipa=\glueexpr\jlreq at maeaki\relax
+    \fi
+    \ifx\jlreq at ushiroaki\@empty\else
+      \jlreq at tempskipb=\glueexpr\jlreq at ushiroaki\relax
+    \fi
+  \else
+    % 行取り時の前後の空きを足した値
+    \jlreq at tempdima=\glueexpr(#3\baselineskip - \baselineskip - \ht\jlreq at tempboxa - \dp\jlreq at tempboxa)\relax
+    \ifx\jlreq at maeakitype\@empty
+      \jlreq at tempskipa=\glueexpr(\jlreq at tempdima + \dp\jlreq at tempboxb - \ht\jlreq at tempboxb)/2\relax
+    \else
+      \ifx a\jlreq at maeakitype
+        \jlreq at tempskipa=\glueexpr(\jlreq at tempdima + \dp\jlreq at tempboxb - \ht\jlreq at tempboxb)/2\relax
+        \jlreq at tempskipc=\glueexpr\jlreq at maeaki\relax
+      \fi
+      \ifx s\jlreq at maeakitype
+        \jlreq at tempskipa=\glueexpr(\jlreq at tempdima + \dp\jlreq at tempboxb - \ht\jlreq at tempboxb)/2 + \jlreq at maeaki\relax
+        \jlreq at tempdima=\dimexpr\jlreq at tempdima + \jlreq at maeaki\relax
+      \fi
+      \ifx r\jlreq at maeakitype
+        \jlreq at tempskipa=\glueexpr\jlreq at maeaki\relax
+        \jlreq at tempdima=\dimexpr\jlreq at tempdima + \baselineskip - \dp\jlreq at tempboxb\relax
+      \fi
+    \fi
+    \ifx\jlreq at ushiroakitype\@empty
+      \jlreq at tempskipb=\glueexpr\jlreq at tempdima - \jlreq at tempskipa\relax
+    \else
+      \ifx a\jlreq at ushiroakitype
+        \jlreq at tempskipb=\glueexpr\jlreq at tempdima - \jlreq at tempskipa + \jlreq at ushiroaki\relax
+      \fi
+      \ifx r\jlreq at ushiroakitype
+        \jlreq at tempskipb=\glueexpr\jlreq at ushiroaki\relax
+        \jlreq at tempskipa=\glueexpr\jlreq at tempdima - \jlreq at tempskipb + \baselineskip - \ht\jlreq at tempboxb\relax
+      \fi
+    \fi
+  \fi
+  \jlreq at ifgluezero\jlreq at tempskipc{}{\vskip\jlreq at tempskipc\relax}%
+  \ifx r\jlreq at maeakitype\prevdepth=-1000pt\fi
+  \setbox\jlreq at tempboxa=\vbox{%
+    \jlreq at ifgluezero\jlreq at tempskipa{}{\vskip\jlreq at tempskipa}%
+    \unvbox\jlreq at tempboxa}%
+  \dp\jlreq at tempboxa=\dimexpr\dp\jlreq at tempboxa + \ht\jlreq at tempboxa\relax
+  \ht\jlreq at tempboxa=0pt
+  \box\jlreq at tempboxa
+  \par
+  \jlreq at ifempty{#4}{\ifodd\jlreq at currentpage\nobreak\fi}{\nobreak}%
+  \ifx r\jlreq at ushiroakitype\prevdepth=-1000pt\else\prevdepth=0pt\fi
+  \jlreq at ifgluezero\jlreq at tempskipb{}{\vskip\jlreq at tempskipb}%
+}}
+
+% 行取り情報をゲットだぜ
+% \jlreq at resultに{1 = 前空き}{2 = 後ろ空き}{3 = トータル行数}を入れる
+% #2#3#4はそれぞれ前空き,後ろ開き,トータル行数のデフォルト値
+% *つきは\setkeys*を使う.[]はkeyvalのファミリー.
+\def\jlreq at BlockHeading@gyodori at parsekeyval{%
+  \@ifstar{\jlreq at BlockHeading@gyodori at parsekeyval@{*}}{\jlreq at BlockHeading@gyodori at parsekeyval@{}}%
+}
+\def\jlreq at BlockHeading@gyodori at parsekeyval@#1{%
+  \@ifnextchar[{\jlreq at BlockHeading@gyodori at parsekeyval@@{#1}}{\jlreq at BlockHeading@gyodori at parsekeyval@@{#1}[jlreq at key]}%
+}
+\def\jlreq at BlockHeading@gyodori at parsekeyval@@#1[#2]#3#4#5#6{%
+  \begingroup
+    \def\jlreq at lines{#6}%
+    \def\jlreq at before@space{}%
+    \def\jlreq at before@lines{}%
+    \def\jlreq at after@space{}%
+    \def\jlreq at after@lines{}%
+    \jlreq at parsekeyval#1[#2]{
+      {lines}{\def\jlreq at lines{##1}}
+      {before_space}{\def\jlreq at before@space{##1}}
+      {after_space}{\def\jlreq at after@space{##1}}
+      {before_lines}{%
+        \jlreq at iffirsttoken{##1}{*}%
+          {\edef\jlreq at before@lines{s:\expandonce{\@gobble ##1}}}%
+          {\def\jlreq at before@lines{a:##1}}%
+      }
+      {after_lines}{\def\jlreq at after@lines{##1}}
+    }{#3}%
+    % 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 before@lines}\baselineskip}\fi
+    \ifx\jlreq at before@space\@empty\def\jlreq at before@space{#4}\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 after@space\@empty\def\jlreq at after@space{#5}\fi
+    \edef\jlreq at do{%
+      \unexpanded{\def\jlreq at result}{{\expandonce{\jlreq at before@space}}{\expandonce{\jlreq at after@space}}{\expandonce{\jlreq at lines}}}%
+    }%
+  \expandafter\endgroup
+  \jlreq at do
+}
+
+% \DeclareBlockHeading{命令名}{レベル}{設定}
+\def\jlreq at BlockHeading@allheadings{}% 別行見出し一覧
+\newcommand{\DeclareBlockHeading}[3]{%
+  \def\jlreq at do{\@removeelement{#1}}%
+  \expandafter\jlreq at do\expandafter{\jlreq at heading@allheadings}{\jlreq at heading@allheadings}%
+  \appto\jlreq at heading@allheadings{,#1}%
+  \expandafter\jlreq at do\expandafter{\jlreq at BlockHeading@allheadings}{\jlreq at BlockHeading@allheadings}%
+  \appto\jlreq at BlockHeading@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 font{}%
+    \def\jlreq at subtitle@font{}%
+    \def\jlreq at indent{0\zw}%
+    \def\jlreq at end@indent{0\zw}%
+    \def\jlreq at align{l}%
+    \edef\jlreq at format{\unexpanded{##1##2##3}}%
+    \edef\jlreq at heading@text at format{\unexpanded{##1}}%
+    \def\jlreq at pagebreak{}%
+    \def\jlreq at label@format{\@seccntformat{#1}}%
+    \newif\ifjlreq at hang\jlreq at hangtrue
+    \def\jlreq at after@label at space{1\zw}%
+    \def\jlreq at second@heading at text@indent at wlabel{0pt}%
+    \def\jlreq at second@heading at text@indent at wolabel{0pt}%
+    \edef\jlreq at subtitle@format{\unexpanded{---##1---}}%
+    \def\jlreq at subtitle@indent{1\zw}%
+    \def\jlreq at afterindent{\@afterindenttrue}%
+    \def\jlreq at allowbreak@evenpage{*}% 偶数ページでも改ページを許可するならば空,そうでないなら*
+    \newif\ifjlreq at subtitle@break\jlreq at subtitle@breaktrue
+    \def\jlreq at subtitle@indent{1\zw}%
+    \def\jlreq at column@spanning{false}%
+    % a,bみたいなのをaとbにわける.カンマがなければbは空.引数を{a}{b}として##2を呼び出す.
+    \def\jlreq at parsecomma##1##2{%
+      \def\jlreq at tempa####1####2{##2}%
+      \def\@tempa####1,####2\jlreq at endmark{%
+        \jlreq at ifempty{####2}{%
+          \def\@tempa{}%
+        }{%
+          \def\@tempa########1,\jlreq at endmark{\def\@tempa{########1}}%
+          \@tempa####2\jlreq at endmark
+        }%
+        \edef\@tempa{\unexpanded{\jlreq at tempa{####1}}{\expandonce{\@tempa}}}%
+        \edef\jlreq at do{\jlreq at expandtwice{\@tempa}}%
+      }%
+      \@tempa##1,\jlreq at endmark
+      \jlreq at do
+    }%
+    \jlreq at parsekeyval[BlockHeading:#1]{
+      {lines}{}
+      {before_space}{}
+      {after_space}{}
+      {before_lines}{}
+      {after_lines}{}
+      {font}{\def\jlreq at font{##1}}
+      {subtitle_font}{\def\jlreq at subtitle@font{##1}}
+      {indent}{\def\jlreq at indent{##1}}
+      {end_indent}{\def\jlreq at end@indent{##1}}
+      {align}[left,center,right]{%
+        \jlreq at switch{##1}{
+          {left}{\def\jlreq at align{l}}
+          {center}{\def\jlreq at align{c}}
+          {right}{\def\jlreq at align{r}}
+        }%
+      }
+      {format}{\edef\jlreq at format{\unexpanded{##1}}}
+      {after_label_space}{\def\jlreq at after@label at space{##1}}
+      {second_heading_text_indent}{%
+        \jlreq at parsecomma{##1}{%
+          \jlreq at iffirsttoken{####1}{*}{%
+            \jlreq at hangfalse
+            \edef\jlreq at second@heading at text@indent at wlabel{\expandonce{\@gobble ####1}}%
+          }{%
+            \jlreq at hangtrue
+            \def\jlreq at second@heading at text@indent at wlabel{####1}%
+          }%
+          \jlreq at ifempty{####2}{%
+            \let\jlreq at second@heading at text@indent at wolabel=\jlreq at second@heading at text@indent at wlabel
+          }{%
+            \def\jlreq at second@heading at text@indent at wolabel{####2}%
+          }%
+        }%
+      }
+      {label_format}{\edef\jlreq at label@format{\unexpanded{##1}}}
+      {subtitle_format}{\edef\jlreq at subtitle@format{\unexpanded{##1}}}
+      {subtitle_indent}{\def\jlreq at subtitle@indent{##1}}
+      {subtitle_break}[true,false]{\csname jlreq at subtitle@break##1\endcsname}
+      {afterindent}[true,false]{\edef\jlreq at afterindent{\expandonce{\csname @afterindent##1\endcsname}}}
+      {allowbreak_if_evenpage}[true,false]{%
+        \jlreq at switch{##1}{
+          {true}{\def\jlreq at allowbreak@evenpage{}}
+          {false}{\def\jlreq at allowbreak@evenpage{*}}
+        }%
+      }
+      {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{}}
+        }%
+      }
+      % 後々数字を受け付けるようになったりするかもしれないので……
+      {column_spanning}{%
+        \jlreq at tempatrue % validな入力に対してfalse
+        \jlreq at ifempty{##1}{}{%
+          \jlreq at ifnumber{##1}{% 数字の時はtrueに回す
+            \jlreq at tempafalse
+            \def\jlreq at column@spanning{true}%
+          }{%
+            \jlreq at switch{##1}{%
+              {true}{\jlreq at tempafalse\def\jlreq at column@spanning{true}}
+              {false}{\jlreq at tempafalse\def\jlreq at column@spanning{false}}
+            }%
+          }%
+        }%
+        \ifjlreq at tempa\ClassWarningNoLine{jlreq}{Invalid input `##1' for column_spanning in BlockHeading #1}\fi
+      }
+    }{#3}%
+    \def\jlreq at do{}% 初期化.これに最終処理を入れていく.
+    % 入力チェック
+    \ifthenelse{\equal{\jlreq at column@spanning}{true}}{%
+      \expandafter\ifx\jlreq at pagebreak\clearpage\relax\else\expandafter\ifx\jlreq at pagebreak\cleardoublepage\relax\else
+        \ClassWarningNoLine{jlreq}{column_spanning can be used only with pagebreak=clearpage or pagebreak=cleardoublepage (in BlockHeading #1)}%
+        \def\jlreq at column@spanning{false}%
+      \fi\fi
+    }{}%
+    \edef\jlreq at format{\expandonce{\jlreq at font}\expandonce{\jlreq at format}}%
+    \edef\jlreq at label@format at modified{%
+      \noexpand\noindent
+      \unexpanded{\setbox\jlreq at tempboxa=\hbox}{\expandonce{\jlreq at label@format}}%
+      \unexpanded{\hangindent=}%
+      \ifjlreq at hang
+        \wd\jlreq at tempboxa
+      \else
+        0pt
+        \unexpanded{\edef\jlreq at BlockHeading@start at labellength{\the\wd\jlreq at tempboxa}}%
+      \fi
+      \unexpanded{\hangindent=\dimexpr\hangindent + }(\expandonce{\jlreq at after@label at space}) + (\expandonce{\jlreq at second@heading at text@indent at wlabel})\noexpand\relax
+      \box\jlreq at tempboxa
+      \hskip0pt\relax
+    }%
+    \edef\jlreq at heading@text at format@wlabel{%
+      \ifdim\jlreq at after@label at space=0pt\else
+        \noexpand\hspace*{\noexpand\dimexpr\expandonce{\jlreq at after@label at space}\noexpand\relax}%
+      \fi
+      \expandonce{\jlreq at heading@text at format}%
+    }%
+    \edef\jlreq at heading@text at format@wolabel{%
+      \ifdim\dimexpr\jlreq at second@heading at text@indent at wolabel\relax=0pt\else
+        \noexpand\hangindent=\noexpand\dimexpr\expandonce{\jlreq at second@heading at text@indent at wolabel}\noexpand\relax
+      \fi
+      \expandonce{\jlreq at heading@text at format}%
+    }%
+    \def\jlreq at make@subtitle at format##1##2{%
+      \edef##1{%
+        \ifjlreq at subtitle@break\unexpanded{{\par}\nobreak\noindent\global\hangafter=0}\fi
+        \unexpanded{\global\hangindent=\dimexpr\hangindent + }(\expandonce{\jlreq at subtitle@indent}) ##2\noexpand\relax
+        \ifdim\jlreq at subtitle@indent=0pt\else
+          \ifjlreq at subtitle@break\else\unexpanded{\hspace*}{\expandonce{\jlreq at subtitle@indent}}\fi
+        \fi
+        {\ifx\jlreq at subtitle@font\@empty\else\expandonce{\jlreq at subtitle@font}\fi\expandonce{\jlreq at subtitle@format}}%
+      }%
+    }%
+    \jlreq at make@subtitle at format\jlreq at subtitle@format at wlabel{%
+      - (\expandonce{\jlreq at second@heading at text@indent at wlabel})%
+      \ifjlreq at hang\else + (\noexpand\jlreq at BlockHeading@start at labellength)\fi
+    }%
+    \jlreq at make@subtitle at format\jlreq at subtitle@format at wolabel{- (\expandonce{\jlreq at second@heading at text@indent at wolabel})}%
+    \@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\zw
+      \divide\jlreq at tempdima by \jlreq at tempdimb
+      \eappto\jlreq at do{%
+        \noexpand\def\expandonce{\csname l@#1\endcsname}{\unexpanded{\@dottedtocline{#2}{0\zw}}{\the\numexpr\jlreq at tempdima + 1\relax\noexpand\zw}}%
+      }%
+    }{}%
+    \jlreq at BlockHeading@gyodori at parsekeyval*[BlockHeading:#1]{#3}{}{}{1}%
+    \let\jlreq at spaceset=\jlreq at result
+    \edef\jlreq at totalformat{\unexpanded{##1}\expandonce{\jlreq at afterindent}\noexpand\@afterheading}%
+    \if at twocolumn
+      \ifthenelse{\equal{\jlreq at column@spanning}{true}}{\edef\jlreq at totalformat{\unexpanded{\twocolumn[{##1}]}}}{}%
+    \fi
+    \edef\jlreq at do{%
+      \expandonce{\jlreq at do}%
+      \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 align}}{\expandonce{\jlreq at indent}}{\expandonce{\jlreq at end@indent}}\expandonce{\jlreq at spaceset}{\expandonce{\jlreq at allowbreak@evenpage}}}%
+        {%
+          {\expandonce{\jlreq at label@format}}{\expandonce{\jlreq at label@format at modified}}%
+          {\expandonce{\jlreq at heading@text at format@wlabel}}{\expandonce{\jlreq at heading@text at format@wolabel}}%
+          {\expandonce{\jlreq at subtitle@format at wlabel}}{\expandonce{\jlreq at subtitle@format at wolabel}}%
+          {\expandonce{\jlreq at format}}%
+        }%
+        {\expandonce{\jlreq at totalformat}}%
+      }}%
+    }%
+  \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}}{}%
+}
+
+% 別行見出しが連続した場合の処理
+% 設定値保存に次のマクロを使う
+% \jlreq at BlockHeading@spaces at headingslist
+%   : スペースを考慮しないとならない見出しのリスト.,_chapter_section_subsection,_section_subsection,...みたいな感じ
+% \jlreq at BlockHeading@spaces at setlist@<見出し名リスト>
+%   : 見出し名リストが続いたときの空き関連設定.<見出し名リスト>は_chapter_section_subsectionみたいなやつ.
+%     {***}{***}...というリスト.各々の***は次のどれか.
+%     最初:全体への指定.{前空き}{後ろ空き}{行数}
+%     _{前空き}{後ろ空き}{行数}:見出しに対する指定.先頭が_*の場合は,デフォルト設定をロードしてからということ.
+%     それ以外:空き量
+%       最初や最後に空き量指定がある場合は,全体への指定に組み込むことにする.
+%
+% 現在状況保存に以下のマクロを使う
+% \jlreq at BlockHeading@spaces at current@sequence
+%   : 現在どのような見出しが続いているかリスト.
+% \jlreq at BlockHeading@spaces at current@space@<n>
+%   : 現在処理中のn番目の見出しに対する空き情報.{前空き}{後ろ空き}{トータル行数}{偶数ページbreak情報}.n=1から始まる.
+% \jlreq at BlockHeading@spaces at current@output@<n>
+%   : 現在処理中のn番目の見出しの中身.
+% \jlreq at BlockHeading@spaces at current@format@<n>
+%   : 現在処理中のn番目の見出しのフォーマット.行取りマクロを包み込むようにする.
+% \jlreq at BlockHeading@spaces at current@before@<n>
+%   : n番目の見出しの前に出すもの
+% \jlreq at BlockHeading@spaces at current@after@<n>
+%   : n番目の見出しの後ろに出すもの
+% \jlreq at BlockHeading@spaces at current@count
+%   : 現在いくつ目の連続する見出しを処理しているかのカウンター
+\newcount\jlreq at BlockHeading@spaces at current@count
+\jlreq at BlockHeading@spaces at current@count=0
+
+\def\jlreq at BlockHeading@spaces at current@sequence{}%
+
+\def\jlreq at BlockHeading@spaces at headingslist{}
+\newcommand{\SetBlockHeadingSpaces}[1]{%
+  \begingroup
+    % 現段階の情報をクリアする
+    \expandafter\@for\expandafter\jlreq at tempa\expandafter:\expandafter=\jlreq at BlockHeading@spaces at headingslist\do{%
+      \expandafter\let\csname jlreq at BlockHeading@spaces at setlist@\jlreq at tempa\endcsname=\@undefined
+    }%
+    \def\jlreq at BlockHeading@spaces at headingslist{}%
+    \def\jlreq at tempa{}% 見出しリスト
+    \def\jlreq at tempb{}% 設定リスト \def\jlreq at BlockHeading@spaces@***{{**}{**}...}ってのを入れる
+    \jlreq at SetBlockHeadingSpaces#1\jlreq at endmark
+    \edef\jlreq at do{%
+      \unexpanded{\def\jlreq at BlockHeading@spaces at headingslist}{\expandonce{\jlreq at tempa}}%
+      \expandonce{\jlreq at tempb}%
+    }%
+  \expandafter\endgroup
+  \jlreq at do
+}
+\def\jlreq at SetBlockHeadingSpaces{% カンマを無視する処理
+  \@ifnextchar,{\expandafter\jlreq at SetBlockHeadingSpaces@\@gobble}{\jlreq at SetBlockHeadingSpaces@}%
+}
+\def\jlreq at SetBlockHeadingSpaces@{%
+  \@ifnextchar[{\jlreq at SetBlockHeadingSpaces@@}{\jlreq at SetBlockHeadingSpaces@@[]}%
+}
+\def\jlreq at SetBlockHeadingSpaces@@[#1]#2{%
+  \jlreq at ifendmark{#2}{}{%
+    \def\jlreq at headings{}% 見出し名リスト
+    \jlreq at BlockHeading@gyodori at parsekeyval[BlockHeadingSpaces]{#1}{}{}{}%
+    \edef\jlreq at totalset{\expandonce{\jlreq at result}}% 上の#1に対応する設定
+    \def\jlreq at set{}% 個々の設定
+    \def\jlreq at lastdimen{}% 最後の寸法
+    \def\jlreq at do##1##2##3{%
+      \jlreq at ifempty{##1}{\jlreq at tempatrue}{\jlreq at tempafalse}% 前開きが空ならば\jlreq at tempatrue
+      \jlreq at ifempty{##2}{\jlreq at tempbtrue}{\jlreq at tempbfalse}% 後ろ開きが空ならば\jlreq at tempbtrue
+    }%
+    \expandafter\jlreq at do\jlreq at totalset
+    \jlreq at SetBlockHeadingSpaces@@@{#2}%
+    \eappto\jlreq at tempa{,\expandonce{\jlreq at headings}}% \jlreq at tempaに\jlreq at headingsを追加
+    \ifjlreq at tempb
+      \ifx\jlreq at lastdimen\@empty\else % 最後が寸法だったので\jlreq at SetBlockHeadingSpaces@totalsetを改変
+        \def\jlreq at do##1##2##3{%
+          \edef\jlreq at totalset{{\unexpanded{##1}}{r:\expandonce{\jlreq at lastdimen}}{\unexpanded{##3}}}%
+        }%
+        \expandafter\jlreq at do\jlreq at totalset
+      \fi
+    \else
+      \eappto\jlreq at set{{\expandonce{\jlreq at lastdimen}}}%
+    \fi
+    \eappto\jlreq at tempb{%
+      \noexpand\@ifundefined{jlreq at BlockHeading@spaces at setlist@\jlreq at headings}{}{%
+        \noexpand\ClassError{jlrqe}{The spaces for \jlreq at headings\space is multiplly defined (in SetBlockHeadingSpaces)}{\noexpand\@ehc}%
+      }%
+      \noexpand\def\expandonce{\csname jlreq at BlockHeading@spaces at setlist@\jlreq at headings\endcsname}{{\expandonce{\jlreq at totalset}}\expandonce{\jlreq at set}}%
+    }%
+    \jlreq at SetBlockHeadingSpaces
+  }%
+}
+\def\jlreq at SetBlockHeadingSpaces@@@#1{%
+  \@for\@tempa:=#1\do{%
+    \expandafter\jlreq at iffirsttoken@ignorespaces\expandafter{\@tempa}{_}{%
+      \ifx\jlreq at lastdimen\@empty\else\eappto\jlreq at set{{\expandonce{\jlreq at lastdimen}}}\fi%
+      \def\jlreq at lastdimen{}%
+      \expandafter\jlreq at SetBlockHeadingSpaces@@@@\@tempa{\jlreq at endmark}%
+    }{%
+      \ifjlreq at tempa
+        \def\jlreq at do##1##2##3{%
+          \edef\jlreq at totalset{{r:\expandonce{\@tempa}}{\unexpanded{##2}}{\unexpanded{##3}}}%
+        }%
+        \expandafter\jlreq at do\jlreq at totalset
+      \else
+        \ifx\jlreq at lastdimen\@empty\else\eappto\jlreq at set{{\expandonce{\jlreq at lastdimen}}}\fi
+        \let\jlreq at lastdimen=\@tempa
+      \fi
+    }%
+    \jlreq at tempafalse
+  }%
+}
+\def\jlreq at SetBlockHeadingSpaces@@@@#1#{%
+  \expandafter\jlreq at SetBlockHeadingSpaces@ifcontainsunderbar\expandafter{\@gobble #1}{%
+    \ClassWarning{jlreq}{Unusual heading name `\@gobble #1' is found. You forgot a comma? (in SetBlockHeadingSpaces)}%
+  }{}%
+  \appto\jlreq at headings{#1}%
+  \jlreq at SetBlockHeadingSpaces@@@@@
+}
+\def\jlreq at SetBlockHeadingSpaces@@@@@#1{%
+  % 空っぽの場合は{_{r:0pt}{r:0pt}{}}
+  \jlreq at ifendmark{#1}{\appto\jlreq at set{{_{r:0pt}{r:0pt}{}}}}{%
+    \jlreq at iffirsttoken{#1}{*}{% *始まりの場合は{_*{}{}{}}
+      \expandafter\jlreq at BlockHeading@gyodori at parsekeyval\expandafter{\@gobble #1}{}{}{}%
+      \eappto\jlreq at set{{_*\expandonce{\jlreq at result}}}%
+    }{% それ以外の場合は{_{}{}{}}
+      \jlreq at BlockHeading@gyodori at parsekeyval{#1}{}{}{}%
+      \eappto\jlreq at set{{_\expandonce{\jlreq at result}}}%
+    }%
+    \@gobble % \jlreq at endmarkを食う
+  }%
+}
+% #1に_が含まれているか
+\def\jlreq at SetBlockHeadingSpaces@ifcontainsunderbar@#1_#2\jlreq at endmark{%
+  \jlreq at ifempty{#2}{\@secondoftwo}{\@firstoftwo}%
+}
+\def\jlreq at SetBlockHeadingSpaces@ifcontainsunderbar#1{%
+  \jlreq at SetBlockHeadingSpaces@ifcontainsunderbar@#1_\jlreq at endmark
+}
+
+
+% 現在の情報に基づき出力
+\def\jlreq at BlockHeading@spaces at output{{%
+  \@ifundefined{jlreq at BlockHeading@spaces at setlist@\jlreq at BlockHeading@spaces at current@sequence}{%
+    \jlreq at BlockHeading@spaces at outputwospace
+  }{%
+    \expandafter\expandafter\expandafter\jlreq at BlockHeading@spaces at output@\csname jlreq at BlockHeading@spaces at setlist@\jlreq at BlockHeading@spaces at current@sequence\endcsname\jlreq at endmark
+  }%
+}}
+
+% 連続スペース情報とか無視して各々の見出しを出力する
+\def\jlreq at BlockHeading@spaces at outputwospace{%
+  \jlreq at tempcnta=0
+  \@whilenum\jlreq at tempcnta<\jlreq at BlockHeading@spaces at current@count\do{%
+    \advance\jlreq at tempcnta by 1
+    \edef\jlreq at tempa{%
+      \unexpanded{\long\def\jlreq at tempa##1}{\csexpandonce{jlreq at BlockHeading@spaces at current@format@\the\jlreq at tempcnta}}%
+    }%
+    \jlreq at tempa
+    \edef\jlreq at tempb{%
+      \noexpand\expandonce{\noexpand\jlreq at tempa{%
+        \noexpand\jlreq at BlockHeading@start at gyodori
+          \csexpandonce{jlreq at BlockHeading@spaces at current@space@\the\jlreq at tempcnta}%
+          {\csexpandonce{jlreq at BlockHeading@spaces at current@output@\the\jlreq at tempcnta}}%
+      }}%
+    }%
+    \edef\jlreq at do{\jlreq at tempb}%
+    \csname jlreq at BlockHeading@spaces at current@before@\the\jlreq at tempcnta\endcsname
+    \jlreq at do
+    \csname jlreq at BlockHeading@spaces at current@after@\the\jlreq at tempcnta\endcsname
+  }%
+}
+
+\def\jlreq at BlockHeading@spaces at output@#1#2\jlreq at endmark{%
+  \def\jlreq at result{}%
+  \jlreq at tempcnta=0
+  \jlreq at BlockHeading@spaces at output@@#2\jlreq at endmark
+  \jlreq at tempatrue % 周りの行取り処理が必要か
+  \jlreq at ifempty{#1}{\jlreq at tempafalse}{}%
+  \ifthenelse{\equal{#1}{{}{}{}}}{\jlreq at tempafalse}{}%
+  \edef\jlreq at do{%
+    \ifjlreq at tempa
+      \unexpanded{\jlreq at BlockHeading@start at gyodori#1}{*}{%
+        \expandonce{\jlreq at result}%
+      }%
+    \else
+      \expandonce{\jlreq at result}%
+    \fi
+  }%
+  \jlreq at do
+}
+% jlreq at resultに出力すべきものを入れていく
+\def\jlreq at BlockHeading@spaces at output@@#1{%
+  \jlreq at ifendmark{#1}{}{%
+    \jlreq at iffirsttoken@ignorespaces{#1}{_}{%
+      \advance\jlreq at tempcnta by 1
+      \expandafter\jlreq at BlockHeading@spaces at output@@@\expandafter{\@gobble #1}%
+    }{%
+      \appto\jlreq at result{\vskip\glueexpr #1\relax}%
+    }%
+    \jlreq at BlockHeading@spaces at output@@
+  }%
+}
+\def\jlreq at BlockHeading@spaces at output@@@#1{%
+  \edef\jlreq at do{%
+    \noexpand\jlreq at BlockHeading@spaces at output@@@@
+    \jlreq at iffirsttoken@ignorespaces{#1}{*}{{*}\expandonce{\@gobble #1}}{{}#1}%
+      \csexpandonce{jlreq at BlockHeading@spaces at current@space@\the\jlreq at tempcnta}%
+      {\csexpandonce{jlreq at BlockHeading@spaces at current@output@\the\jlreq at tempcnta}}%
+  }%
+  \jlreq at do
+}
+% #1: デフォルト値を使うならば*,#2#3#4が設定された値,#5#6#7がデフォルト値,#8は偶数ページの,#9が出力
+\def\jlreq at BlockHeading@spaces at output@@@@#1#2#3#4#5#6#7#8#9{%
+  \edef\jlreq at tempa{%
+    \unexpanded{\long\def\jlreq at tempa##1}{\csexpandonce{jlreq at BlockHeading@spaces at current@format@\the\jlreq at tempcnta}}%
+  }%
+  \jlreq at tempa
+  \edef\jlreq at tempb{%
+    \noexpand\expandonce{\noexpand\jlreq at tempa{%
+      \noexpand\jlreq at BlockHeading@start at gyodori
+      \jlreq at ifempty{#1}{\unexpanded{{#2}{#3}{#4}}}{%
+        {\jlreq at ifempty{#2}{\unexpanded{#5}}{\unexpanded{#2}}}%
+        {\jlreq at ifempty{#3}{\unexpanded{#6}}{\unexpanded{#3}}}%
+        {\jlreq at ifempty{#4}{\unexpanded{#7}}{\unexpanded{#4}}}%
+      }\unexpanded{{#8}{#9}}%
+    }}%
+  }%
+  \edef\jlreq at do{\unexpanded{\appto\jlreq at result}{%
+    \csexpandonce{jlreq at BlockHeading@spaces at current@before@\the\jlreq at tempcnta}%
+    \jlreq at tempb
+    \csexpandonce{jlreq at BlockHeading@spaces at current@after@\the\jlreq at tempcnta}%
+  }}%
+  \jlreq at do
+}
+
+% 連続見出しスペース調整用のデータをすべてクリアする
+\def\jlreq at BlockHeading@spaces at clear{%
+  \jlreq at tempcnta=0
+  \@whilenum\jlreq at tempcnta<\jlreq at BlockHeading@spaces at current@count\do{%
+    \expandafter\global\expandafter\let\csname jlreq at BlockHeading@spaces at current@space@\the\jlreq at tempcnta\endcsname=\@undefined
+    \expandafter\global\expandafter\let\csname jlreq at BlockHeading@spaces at current@output@\the\jlreq at tempcnta\endcsname=\@undefined
+    \expandafter\global\expandafter\let\csname jlreq at BlockHeading@spaces at current@between@\the\jlreq at tempcnta\endcsname=\@undefined
+    \advance\jlreq at tempcnta by 1
+  }%
+  \gdef\jlreq at BlockHeading@spaces at current@sequence{}%
+  \global\jlreq at BlockHeading@spaces at current@count=0
+}
+
+%.. 同行見出し
+% \DeclareRuninHeading{命令名}{レベル}{設定}
+\newcommand*{\DeclareRuninHeading}[3]{%
+  \def\jlreq at do{\@removeelement{#1}}%
+  \expandafter\jlreq at do\expandafter{\jlreq at heading@allheadings}{\jlreq at heading@allheadings}%
+  \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\zw}{2\jlreq at gol}}}{}%
+  \begingroup
+    \def\jlreq at font{\normalfont\normalsize}%
+    \def\jlreq at indent{0\zw}%
+    \def\jlreq at mark{}%
+    \def\jlreq at label@font{}%
+    \def\jlreq at after@space{1\zw}%
+    \jlreq at parsekeyval[RuninHeading:#1]{%
+      {font}{\def\jlreq at font{##1}}
+      {indent}{\def\jlreq at indent{##1}}
+      {mark}{\def\jlreq at mark{##1}}
+      {after_space}{%
+        \ifdim\dimexpr##1\relax<0pt\ClassWarning{jlreq}{after_space in Runin Heading #1 should be positive}\fi
+        \def\jlreq at after@space{##1}%
+      }
+    }{#3}%
+    % \@startsection{#1}{#2}{indent}{0pt}{-after_space}{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}}{0pt}{-\expandonce{\jlreq at after@space}}{\expandonce{\jlreq at font}}%
+        }{%
+          \noexpand\@startsection{\unexpanded{#1}}{\unexpanded{#2}}{\expandonce{\jlreq at indent}}{0pt}{-\expandonce{\jlreq at after@space}}{\noexpand\kern\expandonce{\jlreq at indent}\expandonce{\jlreq at mark}\noexpand\kern-\expandonce{\jlreq at indent}\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 + \@tempdima + #3\relax\hangafter=-\jlreq at CutinHeading@linecount
+  \jlreq at hangindent=\hangindent\jlreq at wraplinecount=\hangafter
+  \hspace*{#2}%
+  \kern-\dimexpr\hangindent + \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{\sffamily\bfseries}%
+    \def\jlreq at onelinemax{6\zw}%
+    \def\jlreq at twolinemax{20\zw}%
+    \def\jlreq at indent{0\zw}%
+    \def\jlreq at after@space{1\zw}%
+    \jlreq at parsekeyval[CutinHeading:#1]{
+      {font}{\def\jlreq at fontcommand{##1}}
+      {onelinemax}{\def\jlreq at onelinemax{##1}}
+      {twolinemax}{\def\jlreq at twolinemax{##1}}
+      {indent}{\def\jlreq at indent{##1}}
+      {after_space}{\def\jlreq at after@space{##1}}
+    }{#3}%
+    \ifthenelse{\lengthtest{\jlreq at after@space < 0.99\zw} \OR \lengthtest{\jlreq at after@space > 2.01\zw}}{%
+      \jlreq at note{窓見出しと本文との空き量は,基本版面の文字サイズの全角以上,2倍未満とする (4.1.10.c).}%
+    }{}%
+    \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 after@space}}{\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]{%
+  \@ifundefined{jlreq at heading@setting@#1}{\ClassError{jlreq}{Unknown heading: #1}{\@ehc}}%
+  \edef\jlreq at do{\csexpandonce{jlreq at heading@type@#1}{#1}{\csexpandonce{jlreq at heading@level@#1}}{\csexpandonce{jlreq at heading@setting@#1},\unexpanded{#2}}}%
+  \jlreq at do
+}
+% 見出し#1をマクロ#2に保存する
+\newcommand{\SaveHeading}[2]{%
+  \@ifundefined{jlreq at heading@setting@#1}{\ClassError{jlreq}{Unknown heading: #1}{\@ehc}}{}%
+  \edef#2{%
+    \csexpandonce{jlreq at heading@type@#1}{\unexpanded{#1}}{\csexpandonce{jlreq at heading@level@#1}}{\csexpandonce{jlreq at heading@setting@#1}}%
+  }%
+}
+
+\newcommand*{\jlreq at keepbaselineskip}[1]{%
+  \begingroup
+    \edef\jlreq at do{\unexpanded{#1}\noexpand\baselineskip=\the\baselineskip}%
+  \expandafter\endgroup
+  \jlreq at do
+}
+
+\newcommand*\jlreq at HeadingType[1]{%
+  \ifcsname jlreq at heading@type@#1\endcsname
+    \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}}}}%
+  \else
+    UndefinedHeading%
+  \fi
+}
+\newcommand*\jlreq at HeadingType@[2]{%
+  \expandafter\expandafter\expandafter\ifx\csname jlreq at heading@type@#1\endcsname#2\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
+}
+
+% 全ての見出しにマクロ#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
+  }%
+}
+
+%.. 各種定義
+\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}
+
+\if at tate
+  \renewcommand{\thepart}{\jlreq at Kanji{part}}
+  \ifthenelse{\equal{\jlreq at article@type}{article}}{}{\renewcommand{\thechapter}{\jlreq at Kanji{chapter}}}
+  \renewcommand{\thesection}{\jlreq at rensuji{\@arabic\c at section}}
+  \renewcommand{\thesubsection}{\jlreq at rensuji{\@alph\c at subsection}}
+  \renewcommand{\thesubsubsection}{\jlreq at rensuji{\@arabic\c at subsubsection}}
+  \renewcommand{\theparagraph}{(\jlreq at rensuji{\@arabic\c at paragraph})}
+  \renewcommand{\thesubparagraph}{(\jlreq at rensuji{\@arabic\c at subparagraph})}
+
+  \ifthenelse{\equal{\jlreq at article@type}{article}}{
+    \NewBlockHeading{part}{0}{font={\jlreq at keepbaselineskip{\LARGE}},indent=4\zw,lines=4,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq at keepbaselineskip{\large}}}
+    \if at twoside\ModifyHeading{part}{allowbreak_if_evenpage=true}\fi
+  }
+  {% book, report
+    \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\zw}},format={\null\vfill {\Huge\hspace*{2\zw}#1#2}\vspace*{2\jlreq at gol}}}
+    \NewBlockHeading{chapter}{0}{indent=2\zw,lines=6,label_format={第\thechapter 章},font={\huge},after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq at keepbaselineskip{\Large}}}
+    \if at twoside\ModifyHeading{chapter}{allowbreak_if_evenpage=true}\fi
+    \renewcommand{\thechapter}{\jlreq at Kanji{chapter}}
+  }
+  \NewBlockHeading{section}{1}{font={\jlreq at keepbaselineskip{\Large}},indent=6\zw,lines=3,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq at keepbaselineskip{\normalsize}}}
+  \if at twoside\ModifyHeading{section}{allowbreak_if_evenpage=true}\fi
+  \NewBlockHeading{subsection}{2}{font={\jlreq at keepbaselineskip{\large}},indent=8\zw,lines=2,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq at keepbaselineskip{\small}}}
+  \if at twoside\ModifyHeading{subsection}{allowbreak_if_evenpage=true}\fi
+  \NewBlockHeading{subsubsection}{3}{font={\jlreq at keepbaselineskip{\normalsize}},indent=10\zw,lines=1,before_lines=1,subtitle_break=false,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},,subtitle_font={\jlreq at keepbaselineskip{\scriptsize}}}
+  \if at twoside\ModifyHeading{subsubsection}{allowbreak_if_evenpage=true}\fi
+  \NewRuninHeading{paragraph}{4}{font={\jlreq at keepbaselineskip{\normalsize}}}
+  \NewRuninHeading{subparagraph}{5}{font={\jlreq at keepbaselineskip{\normalsize}},indent=1\zw}
+\else% yoko
+  \renewcommand{\thepart}{\Roman{part}}
+  \renewcommand{\thesubsection}{\thesection .\arabic{subsection}}
+  \renewcommand{\thesubsubsection}{\thesubsection .\arabic{subsubsection}}
+  \renewcommand{\theparagraph}{\thesubsubsection .\arabic{paragraph}}
+  \renewcommand{\thesubparagraph}{\theparagraph .\arabic{subparagraph}}
+  \ifthenelse{\equal{\jlreq at article@type}{article}}{
+    \NewBlockHeading{part}{0}{font={\jlreq at keepbaselineskip{\LARGE\sffamily\bfseries}},label_format={第\thepart 部},lines=4,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq at keepbaselineskip{\large}}}
+    \renewcommand{\thesection}{\arabic{section}}
+  }
+  {% book, report
+    \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\jlreq at gol}},format={\null\vfil {\Huge\sffamily\bfseries #1#2}\vfil}}
+    \NewBlockHeading{chapter}{0}{%
+      font={\jlreq at keepbaselineskip{\huge\sffamily\bfseries}},
+      label_format={第\thechapter 章},
+      lines=5,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},
+      subtitle_font={\jlreq at keepbaselineskip{\Large}}}
+    \renewcommand{\thechapter}{\arabic{chapter}}
+    \renewcommand{\thesection}{\thechapter.\arabic{section}}
+    \ifthenelse{\equal{\jlreq at article@type}{book}}{
+      \ModifyHeading{chapter}{pagebreak=cleardoublepage}
+    }{
+      \ModifyHeading{chapter}{pagebreak=clearpage}
+    }
+  }
+  \NewBlockHeading{section}{1}{font={\jlreq at keepbaselineskip{\Large\sffamily\bfseries}},lines=3,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq at keepbaselineskip{\normalsize}}}
+  \NewBlockHeading{subsection}{2}{font={\jlreq at keepbaselineskip{\large\sffamily\bfseries}},lines=2,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq at keepbaselineskip{\small}}}
+  \NewBlockHeading{subsubsection}{3}{font={\jlreq at keepbaselineskip{\normalsize\sffamily\bfseries}},lines=1,before_lines=1,subtitle_break=false,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq at keepbaselineskip{\scriptsize}}}
+  \NewRuninHeading{paragraph}{4}{font={\jlreq at keepbaselineskip{\normalsize\sffamily\bfseries}},indent=1\zw}
+  \NewRuninHeading{subparagraph}{5}{font={\jlreq at keepbaselineskip{\normalsize\sffamily\bfseries}},indent=2\zw}
+\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]{%
+      \jlreq at ifempty{#1}{%
+        \chaptermark{#3}%
+        \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]{%
+      \jlreq at ifempty{#1}{%
+        \chaptermark{#3}%
+        \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
+
+% \footnoteと\footnotemarkの前後に\jlreq at hook@prenote/\jlreq at hook@postnoteを入れる
+\jlreq at saveoriginalcs{footnote}%
+\edef\jlreq at do{
+  \unexpanded{\long\def\jlreq at fixjfm@footnote@[#1]#2}{%
+    \expandonce{\footnote[#1]{#2}}%
+    \noexpand\jlreq at hook@postnote
+  }
+  \unexpanded{\long\def\jlreq at fixjfm@footnote@@#1}{%
+    \expandonce{\footnote{#1}}%
+    \noexpand\jlreq at hook@postnote
+  }
+}
+\jlreq at do
+\def\footnote{%
+  \jlreq at hook@prenote
+  \@ifnextchar[{\jlreq at fixjfm@footnote@}{\jlreq at fixjfm@footnote@@}%
+}
+\edef\jlreq at do{
+  \unexpanded{\def\jlreq at fixjfm@footnotemark@[#1]}{%
+    \expandonce{\footnotemark[#1]}%
+    \noexpand\jlreq at hook@postnote
+  }
+  \unexpanded{\def\jlreq at fixjfm@footnotemark@@}{%
+    \expandonce{\footnotemark}%
+    \noexpand\jlreq at hook@postnote
+  }
+}
+\jlreq at do
+\jlreq at saveoriginalcs{footnotemark}%
+\def\footnotemark{%
+  \jlreq at hook@prenote
+  \@ifnextchar[{\jlreq at fixjfm@footnotemark@}{\jlreq at fixjfm@footnotemark@@}%
+}
+
+\newcommand*\jlreq at referencemark@format[1]{#1}
+\newif\ifjlreqadjustreferencemark
+\jlreqadjustreferencemarktrue
+\jlreq at jlreqsetup@add{reference_mark}[inline,interlinear]{
+  \def\jlreq at referencemark{#1}
+  \ifthenelse{\equal{\jlreq at referencemark}{inline}}{
+    \def\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\relax\box\@tempboxa
+      }%
+    }
+    \def\jlreq at hook@prenote{\inhibitglue}
+    \def\jlreq at hook@postnote{\inhibitglue}
+  }{% reference_mark=interlinear
+    \def\jlreq at notemark##1{{%
+      \setbox\@tempboxa=\hbox{\scriptsize\jlreq at referencemark@format{##1}}%
+      \@tempdima=\wd\@tempboxa
+      % 行頭に来たときに頭を天にそろえる処理.
+      \ifjlreqadjustreferencemark
+        \jlreq at savepos@for at rest@linewidth
+        \ifdim\jlreq at current@linewidth<\wd\@tempboxa
+          \@tempdima=\jlreq at current@linewidth
+        \fi
+      \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}%
+    }%
+    \ifx l\jlreq at engine
+      \def\jlreq at hook@prenote{%
+        \jlreq at lastnodechar=\lastnodechar\relax
+        \ifnum\lastnodechar>-1\inhibitglue\fi
+      }
+    \else
+      % (u)platexの時は代入すると\inhibitglueが効かなくなる
+      \def\jlreq at hook@prenote{%
+        \ifnum\lastnodechar>-1\inhibitglue\fi
+        \jlreq at lastnodechar=\lastnodechar\relax
+      }
+    \fi
+    \def\jlreq at hook@postnote{\jlreq at fixjfm}
+  }
+}
+\jlreqsetup{reference_mark=inline}
+% \@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}
+}
+\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\footnoterule{%
+  \unexpanded{\hrule width .333\textwidth height \jlreq at omotekeiwidth}%
+  \noexpand\kern\the\jlreq at tempdima
+}
+
+% インデントの計算:脚注の長さが文字の整数倍になるように字下げする(4.2.5.b)
+{
+  \footnotesize
+  \jlreq at footnoteindent=1\jlreq at mol
+  \@tempdima=\dimexpr\textwidth - \jlreq at footnoteindent\relax
+  \@tempdimb=1\jlreq at mol
+  \divide\@tempdima\@tempdimb \multiply\@tempdima\@tempdimb
+  \global\jlreq at footnoteindent=\dimexpr\textwidth - \@tempdima\relax
+}
+% 4.2.5.d
+\newcommand{\@makefntext}[1]{\jlreq at makefntext{#1}}
+\jlreq at jlreqsetup@add{footnotetext_indent}{
+  \ifthenelse{\equal{#1}{one}}{
+    \long\def\jlreq at 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}% 見出し出力と一文字分の空き
+  }{
+    \long\def\jlreq at 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}% 見出し出力と一文字分の空き
+  }
+}
+\jlreqsetup{footnotetext_indent=one}
+% 合印
+\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(\jlreq at rensuji{\@arabic\c at footnote})\inhibitglue}
+\else
+  \renewcommand*{\thefootnote}{\arabic{footnote}\hbox{})\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}}}}
+% \endnote自身は後で定義する
+\def\jlreq at endnote@impl{\jlreq at hook@prenote\@ifnextchar[{\jlreq at endnote}{\jlreq at endnote[]}}  
+\def\endnotemark{\jlreq at hook@prenote\@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}\jlreq at hook@postnote}
+\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 hook@postnote
+}
+\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の出力を仕込む
+\apptocmd{\jlreq at hook@beforeheadings}{\jlreq at endnote@hook at beforeheadings{#1}}{}{}
+
+\jlreq at jlreqsetup@add{endnote_position}{
+  \def\jlreq at endnote@hook at beforeheadings##1{}
+  \jlreq at tempafalse % headingsが指定された
+  \jlreq at tempbfalse % paragraphが指定された
+  % \jlreq at tempcにセクション名たちを入れていく
+  \def\jlreq at tempc{}
+  \@for\jlreq at tempa:=#1\do{
+    \jlreq at switch{\jlreq at tempa}{
+      {headings}{\jlreq at tempatrue}
+      {paragraph}{
+        \jlreq at tempatrue% _paragraphの時は_headingsも有効にする
+        \jlreq at tempbtrue
+      }
+      {
+        \expandafter\jlreq at iffirsttoken@ignorespaces\expandafter{\jlreq at tempa}{_}{
+          \edef\jlreq at tempc{\jlreq at tempc,\expandafter\@gobble\jlreq at tempa}
+        }{
+          \ClassError{jlreq}{Invalid value \jlreq at tempa\space in endnote_position}{\@ehc}
+        }
+      }
+    }
+  }
+  
+  \ifjlreq at tempb
+    \edef\endnote{\unexpanded{\def\par{\@restorepar\theendnotes\par}}\expandonce{\jlreq at endnote@impl}}
+  \else
+    \let\endnote=\jlreq at endnote@impl
+  \fi
+
+  \ifjlreq at tempa
+    \apptocmd{\jlreq at endnote@hook at beforeheadings}{\theendnotes}{}{}
+  \else
+    \@for\@tempa:=\jlreq at tempc\do{
+      \ifx\@tempa\@empty\else
+        \edef\jlreq at do{%
+          \unexpanded{\def\jlreq at endnote@hook at beforeheadings##1}{\expandonce{\jlreq at endnote@hook at beforeheadings{##1}}%
+            \unexpanded{\def\@tempa}{\@tempa}\unexpanded{\def\@tempb{##1}}%
+            \unexpanded{\ifx\@tempa\@tempb\theendnotes\fi}%
+          }
+        }
+        \jlreq at do
+      \fi
+    }
+  \fi
+}
+\jlreqsetup{endnote_position=headings}
+\AtEndDocument{\theendnotes}
+
+\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{見出し}{注中身}を定義
+% \marginparwidth>0ptの時のみ定義する
+\ifdim\marginparwidth>0pt \expandafter\@firstofone\else\expandafter\@gobble\fi
+{
+  \long\def\@sidenotetext#1{%
+    \marginpar{\reset at font\footnotesize
+      \color at begingroup
+      \@makesidetext{#1}%
+      \color at endgroup
+    }%
+  }
+  \jlreq at setdefaultnotemark\@sidenotemark\@makesidemark
+  \def\jlreq at sidenotecounter{footnote}% 傍注用のカウンタ名
+  \jlreq at jlreqsetup@add{sidenote_type}[number,symbol]{\def\jlreq at sidenote@type{#1}}
+  \jlreqsetup{sidenote_type=number}
+  \jlreq at jlreqsetup@addtofinally{
+    \ifthenelse{\equal{\jlreq at sidenote@type}{number}}{
+      \def\sidenote{\jlreq at hook@prenote\@ifnextchar[{\jlreq at sidenote}{\jlreq at sidenote[]}}
+      \def\sidenotemark{\jlreq at hook@prenote\@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}\jlreq at hook@postnote}
+      \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
+        \jlreq at hook@postnote
+      }
+      \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}%
+      }
+      % \hspace{0.5\jlreq at mol}の部分は二分空きにする例もある(4.2.7.g)
+      \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
+      \long\def\sidenote#1#2{\jlreq at sidenote{#1}{#2}}
+      \def\sidenotemark#1{\jlreq at sidenotemark{#1}}
+      \long\def\sidenotetext#1#2{\jlreq at sidenotetext{#1}{#2}}
+      \long\def\jlreq at sidenote#1#2{\jlreq at sidenotemark{#1}\jlreq at sidenotetext{#1}{#2}}
+      \edef\jlreq at sidenotemark#1{%
+        {\unexpanded{\reset at font\jlreq at sidenote@keywordfont}#1}%
+        \noexpand\jlreq at hook@prenote
+        \ifx\jlreq at sidenote@defaultmark\@empty\else
+          \expandafter\edef\expandonce{\csname\jlreq at sidenotemarkname\endcsname}{\expandonce{\jlreq at sidenote@defaultmark}}%
+          \noexpand\@sidenotemark
+        \fi
+      }
+      % カスタマイズできるべき?
+      \long\def\jlreq at sidenotetext#1#2{%
+        \expandafter\def\csname\jlreq at sidenotemarkname\endcsname{\inhibitglue\null{\reset at font\sffamily\bfseries\inhibitglue #1}}%
+        \@sidenotetext{#2}%
+      }
+      \long\def\@makesidetext#1{{\sffamily\bfseries\csname\jlreq at sidenotemarkname\endcsname}\hspace*{1\jlreq at mol}#1}
+      \def\@makesidemark{\@makefnmark}
+
+      \apptocmd{\sidenote}{\jlreq at hook@postnote}{}{}
+      \apptocmd{\sidenotemark}{\jlreq at hook@postnote}{}{}
+    }
+  }
+  \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={}}
+}
+
+%.. 割注(3.4)
+\def\inlinenotesize{.6\jlreq at jafontsize} % 割注の文字サイズ
+\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\warichu\space failed, may be 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 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
+        \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
+        \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
+  {%
+    \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)}
+% 次を満たす長さXの最小値を求める(ただし#6 <= X <= #7)
+% #1を
+% * #5 - #4行目までは#3の指定に従う
+% * それ以降はX
+% として整形した際に,#5行以内に収まる.
+% \jlreq at resultboxに整形結果を返す(垂直ボックス).見つからなかったらvoid
+\newcommand{\jlreq at inlinenote@determinelength}[7]{%
+%  \message{#1 の試行開始,行数 = #5, \the\dimexpr#6\relax から \the\dimexpr#7\relaxまで}%
+  \@tempcnta=1\relax
+  \def\@tempa{}%
+  % 調整に使う行の\parshape指定を\@tempaに入れる.長さは\jlreq at tempdima.
+  \@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
+  % \jlreq at tempdimaを少しずつ伸ばしていく
+  \@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 により確定}
+      % #5行になるまで空の水平ボックスを加えていく.
+      \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% 0.3ptに意味はない
+      \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 note{ノンブルまたは柱は,基本版面の左右にそろえるか,全角アキだけ寄せた位置に配置する (2.6.1.b).}
+}
+
+% bottom-leftみたいなのを解釈する.入力の順番はどっちでも良いが,出力は<top/bottom><left/right>の順番
+% #1 = bottom-leftみたいなのを{bottom}{left}に変換し,#2に代入,#3はデフォルト値,出力形式で入れる
+\newcommand*{\jlreq at pagestyle@parse at position}[3]{%
+  \begingroup
+    \jlreq at pagestyle@parse at position@#1-\jlreq at endmark
+    % \jlreq at tempcに縦方向を,\jlreq at tempdに横方向を入れる
+    \def\jlreq at tempc{}\def\jlreq at tempd{}%
+    \jlreq at pagestyle@parse at position@@{\jlreq at tempa}%
+    \jlreq at pagestyle@parse at position@@{\jlreq at tempb}%
+    \ifx\jlreq at tempc\@empty\edef\jlreq at tempc{\expandafter\@firstoftwo#3}\fi
+    \ifx\jlreq at tempd\@empty\edef\jlreq at tempd{\expandafter\@secondoftwo#3}\fi
+    \edef\jlreq at do{\unexpanded{\def#2}{{\jlreq at tempc}{\jlreq at tempd}}}%
+  \expandafter\endgroup
+  \jlreq at do
+}
+
+\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]{%
+  \jlreq at switch{#1}{
+    {top}{\def\jlreq at tempc{#1}}
+    {bottom}{\def\jlreq at tempc{#1}}
+    {left}{\def\jlreq at tempd{#1}}
+    {right}{\def\jlreq at tempd{#1}}
+    {center}{\def\jlreq at tempd{#1}}
+    {gutter}{\if at tate\def\jlreq at tempd{right}\else\def\jlreq at tempd{left}\fi}
+    {fore_edge}{\if at tate\def\jlreq at tempd{left}\else\def\jlreq at tempd{right}\fi}
+    {\ClassError{jlreq}{Invalid position: #1}{\@ehc}}
+  }%
+}
+
+
+% 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{}%
+    \def\jlreq at running@head at position{}%
+    \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 font{}%
+    % 柱とノンブルの間
+    \def\jlreq at gap{1.5\zw}%
+    \newif\ifjlreq at clearmark\jlreq at clearmarktrue
+    \newif\ifjlreq at pstate\jlreq at pstatefalse % PageStyleTATE
+    \jlreq at parsekeyval[PageStyle:#1]{
+      *{tate}{\jlreq at pstatetrue}
+      *{yoko}{\jlreq at pstatefalse}
+      {nombre_position}{\def\jlreq at nombre@position{##1}}
+      {running_head_position}{\def\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}}
+      {font}{\def\jlreq at font{##1}}
+      {mark_format}{\edef\jlreq at mark@format{\unexpanded{##1}}}
+      {command}{\edef\jlreq at command{\unexpanded{##1}}}
+      {gap}{\def\jlreq at gap{##1}}
+      {clear_mark}[true,false]{\csname jlreq at clearmark##1\endcsname}
+    }{#2}%
+    % 見出しを出す場合:evenに章などの高いレベルの見出しを出す(2.6.3.a)
+    \def\jlreq at markdefinition{}%
+    \def\jlreq at even@running at head@level{}%
+    \def\jlreq at markdefinition{}%
+    % _***な指定な時に,
+    % * \jlreq@[even/odd]@running at headを\leftmarkや\rightmarkに書き換える
+    % * \jlreq at markdefinitionに\***markを定義するマクロを入れる.
+    % また\jlreq@[even/odd]@running at head@levelに見出しのレベルを入れる.
+    % \jlreq at makemark{odd/even}running_headの中身\jlreq at endmark\jlreq at endmark
+    \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}%
+        }%
+        % mark_formatを調べる
+        \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 note{偶数ページには奇数ページよりアウトラインレベルの高い見出しを入れる (ページスタイル #1内,2.6.3.a).}%
+      \fi
+    \fi\fi
+    % \jlreq@[even/odd][head/foot]に入れていく.tateか否かで場合分け.
+    \ifjlreq at pstate\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi{%
+      \ifx\jlreq at nombre@position\@empty\def\jlreq at nombre@position{0pt}\fi
+      \ifx\jlreq at running@head at position\@empty\def\jlreq at running@head at position{0pt}\fi
+      \if at tate\else
+        \jlreq at note{ノンブルおよび柱を縦組にして配置するのは縦組の場合のみである (ページスタイル #1 内,2.6.1).}%
+      \fi
+      % 柱とノンブルを入れる箱を作る(\jlreq at resultを展開すると\setboxするマクロがでる)
+      \def\jlreq at make@tatebox##1{%
+        \edef\jlreq at result{%
+          \unexpanded{\setbox\jlreq at tempboxa=\hbox to }%
+          \unexpanded{\dimexpr\headsep + \headheight + \textheight}\if at tate\else\unexpanded{ - \topskip + 1\zh}\fi\noexpand\relax
+          {\unexpanded{\tate\adjustbaseline}%
+            \ifx##1\@empty\else
+              \noexpand\hspace{\unexpanded{\dimexpr\headsep + \headheight + }%
+              \if at tate\else\unexpanded{\topskip - \Cht + }\fi
+              \expandonce{\jlreq at running@head at position}\noexpand\relax}%
+              \expandonce{##1}%
+            \fi
+            \ifx\jlreq at nombre\@empty\else
+              \noexpand\hfill
+              \expandonce{\jlreq at nombre}%
+              \ifdim\dimexpr\jlreq at nombre@position\relax=0pt\else
+                \unexpanded{\hspace{\dimexpr\jlreq at nombre@position\relax}}%
+              \fi
+            \fi
+          }%
+          % Overfull防止
+          \ifx l\jlreq at engine
+            \unexpanded{\wd\jlreq at tempboxa=\headheight}%
+          \else
+            \unexpanded{\ht\jlreq at tempboxa=\headheight\dp\jlreq at tempboxa=0pt}%
+          \fi
+        }%
+      }%
+      % 左に配置するヘッダ.#1は柱の中身.(一回展開で正しくでてくる.)
+      \def\jlreq at make@lefthead##1{%
+        \jlreq at make@tatebox{##1}%
+        \edef\jlreq at lefthead{%
+          \expandonce{\jlreq at result}%
+          \noexpand\hspace{\noexpand\dimexpr
+            \if at tate\unexpanded{-\Cdp}\fi - \unexpanded{\headsep - 1\zw}%
+          \noexpand\relax}%
+          \unexpanded{\box\jlreq at tempboxa\hfil}%
+        }%
+      }%
+      % 右に配置するヘッダ.
+      \def\jlreq at make@righthead##1{%
+        \jlreq at make@tatebox{##1}%
+        \edef\jlreq at righthead{%
+          \expandonce{\jlreq at result}%
+          \noexpand\hspace{\unexpanded{\dimexpr\textwidth}
+            \if at tate\unexpanded{- \topskip + \Cht}\fi
+            \unexpanded{ + \headsep}%
+          \noexpand\relax}%
+          \unexpanded{\box\jlreq at tempboxa\hss}%
+        }%
+      }%
+      \if at tate
+        \jlreq at make@lefthead{\jlreq at odd@running at head}%
+        \let\jlreq at oddhead=\jlreq at lefthead
+        \jlreq at make@righthead{\jlreq at even@running at head}%
+        \let\jlreq at evenhead=\jlreq at righthead
+      \else
+        \jlreq at make@righthead{\jlreq at odd@running at head}%
+        \let\jlreq at oddhead=\jlreq at righthead
+        \jlreq at make@lefthead{\jlreq at even@running at head}%
+        \let\jlreq at evenhead=\jlreq at lefthead
+      \fi
+      \let\jlreq at oddfoot=\@empty
+      \let\jlreq at evenfoot=\@empty
+    }{% yoko
+      % \jlreq at nombre@positoinと\jlreq at running@head at positionの中身を{bottom}{center}みたいに変換する.
+      \ifx\jlreq at nombre@position\@empty\def\jlreq at nombre@position{bottom-center}\fi
+      \expandafter\jlreq at pagestyle@parse at position\expandafter{\jlreq at nombre@position}{\jlreq at nombre@position}{{bottom}{center}}%
+      \ifx\jlreq at running@head at position\@empty\def\jlreq at running@head at position{top-center}\fi
+      \expandafter\jlreq at pagestyle@parse at position\expandafter{\jlreq at running@head at position}{\jlreq at running@head at position}{{top}{center}}%
+      \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 note{柱やノンブルは,左ページでは,基本版面の左端の延長線にノンブル又は柱の先頭をそろえて配置するか,基本版面の左端の延長線から基本版面の文字サイズの全角アキだけ右に寄せた位置に配置する (ページスタイル #1 内,2.6.1.b).}%
+        \fi
+      }{}%
+      {\jlreq at font
+        \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 note{ノンブルと柱との空き量は文字サイズの2倍又は1.5倍とする (ページスタイル #1 内,2.6.1.c).}}{}%
+      }%
+      % ##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{\expandonce{\jlreq at gap}}\unexpanded{##2}}%
+          }{%
+            \expandafter\edef\csname jlreq@##1\endcsname{\unexpanded{##2}\noexpand\hspace{\expandonce{\jlreq at 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
+        % フォント命令を挿入
+        \ifx\jlreq at font\@empty\else
+          \ifx\jlreq at left\@empty\else\edef\jlreq at left{{\expandonce{\jlreq at font}\expandonce{\jlreq at left}}}\fi
+          \ifx\jlreq at center\@empty\else\edef\jlreq at center{{\expandonce{\jlreq at font}\expandonce{\jlreq at center}}}\fi
+          \ifx\jlreq at right\@empty\else\edef\jlreq at right{{\expandonce{\jlreq at font}\expandonce{\jlreq at right}}}\fi
+        \fi
+        % \jlreq at setheadfoot@に回して処理
+        \edef\jlreq at do{\noexpand\jlreq at setheadfoot@{\expandonce{\jlreq at left}}{\expandonce{\jlreq at center}}{\expandonce{\jlreq at right}}}%
+        \jlreq at do
+      }%
+      % ##1 ##2 ##3と並んだヘッダを作る,戻り値は\jlreq at result
+      \def\jlreq at setheadfoot@##1##2##3{%
+        % - \Cdpは端にそろえるための補正
+        \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 - \Cdp\fi\relax}\unexpanded{##1}}}%
+        % +\topskip - \Chtは\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 - \Cht\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}}%
+        }%
+      }%
+      % \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{\noexpand\jlreq at setheadfoot{\expandafter\@secondoftwo\jlreq at nombre@position}{\expandonce{\jlreq at nombre@top}}{\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{\noexpand\jlreq at setheadfoot{\expandafter\@secondoftwo\jlreq at nombre@position}{\expandonce{\jlreq at nombre@bottom}}{\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
+    }%
+    % 傍注がある場合はその分を調整
+    % \hbox to ***{+++}というのがあるが,+++は空でなければ\hfillを含むのでUndefullすることはない.
+    \ifdim\marginparwidth>0pt \ifjlreq at pstate\else
+      \if at tate
+        \def\jlreq at do##1{%
+          \ifx##1\@empty\else
+            \edef##1{%
+              \unexpanded{\raise-\dimexpr\marginparwidth+\marginparsep\relax\hbox to \textwidth}{\expandonce{##1}}%
+            }%
+          \fi
+        }%
+        \jlreq at do\jlreq at oddfoot
+        \jlreq at do\jlreq at evenfoot
+      \else
+        \if at twocolumn
+          \def\jlreq at do##1{%
+            \ifx##1\@empty\else
+              \edef##1{%
+                \unexpanded{\hspace*{-\dimexpr\marginparwidth+\marginparsep\relax}}%
+                \noexpand\hbox to \unexpanded{\dimexpr\textwidth + 2\marginparwidth + 2\marginparsep\relax}{\expandonce{##1}}%
+                \unexpanded{\hspace*{-\dimexpr\marginparwidth+\marginparsep\relax}}%
+              }%
+            \fi
+          }%
+          \jlreq at do\jlreq at oddhead
+          \jlreq at do\jlreq at oddfoot
+          \jlreq at do\jlreq at evenhead
+          \jlreq at do\jlreq at evenfoot
+        \else
+          % 奇数ページ
+          \def\jlreq at do##1{%
+            \ifx##1\@empty\else
+              \edef##1{%
+                \noexpand\hbox to \unexpanded{\dimexpr\textwidth + \marginparwidth + \marginparsep\relax}{\expandonce{##1}}%
+                \unexpanded{\hspace*{-\dimexpr\marginparwidth+\marginparsep\relax}}%
+              }%
+            \fi
+          }%
+          \jlreq at do\jlreq at oddhead
+          \jlreq at do\jlreq at oddfoot
+          % 偶数ページ
+          \def\jlreq at do##1{%
+            \ifx##1\@empty\else
+              \edef##1{%
+                \unexpanded{\hspace*{-\dimexpr\marginparwidth+\marginparsep\relax}}%
+                \noexpand\hbox to \unexpanded{\dimexpr\textwidth + \marginparwidth + \marginparsep\relax}{\expandonce{##1}}%
+              }%
+            \fi
+          }%
+          \jlreq at do\jlreq at evenhead
+          \jlreq at do\jlreq at evenfoot
+        \fi
+      \fi
+    \fi\fi
+    \edef\jlreq at do{%
+      \noexpand\def\expandonce{\csname ps@#1\endcsname}{%
+        \unexpanded{\def\jlreq at current@pagestyle{#1}}%
+        \ifjlreq at clearmark\unexpanded{\jlreq at heading@execmacro at toallheadings\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}}%
+      }%
+      % \jlreq at markdefinition/\jlreq at commandは引数トークンを持つ可能性がある
+      \noexpand\edef\expandonce{\csname ps@#1\endcsname}{%
+        \noexpand\csexpandonce{ps@#1}%
+        \noexpand\unexpanded{%
+          \expandonce{\jlreq at markdefinition}%
+          \expandonce{\jlreq at command}%
+        }%
+      }%
+    }%
+  \expandafter\endgroup
+  \jlreq at do
+}
+
+\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={},clear_mark=false}
+  \NewPageStyle{myheadings}{nombre=\thepage,odd_running_head=\rightmark,even_running_head=\leftmark,clear_mark=false}
+  \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},clear_mark=false}
+  \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center}
+  \NewPageStyle{myheadings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center,odd_running_head=\rightmark,even_running_head=\leftmark,clear_mark=false}
+\fi
+\ModifyPageStyle{plain}{font=\small}
+\ModifyPageStyle{headings}{font=\small}
+\ModifyPageStyle{myheadings}{font=\small}
+
+%. フロート関連
+% 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\zw{\jlreq@@makecaption at font #2}}%
+  \ifdim \wd\@tempboxa >\hsize
+    {\jlreq@@makecaption at label@font #1}\hskip1\zw{\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={\sffamily\bfseries},caption_label_font={\sffamily\bfseries}}
+% 特に根拠のない値
+\setlength\abovecaptionskip{.5\jlreq at gol}
+\setlength\belowcaptionskip{0pt}
+
+%.. 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}{図}
+
+%.. 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}{表}
+
+%. タイトル周り
+\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%
+      % 縦書き時には表組み内でも縦書きにするようにする
+      \if at tate
+        \let\jlreq at temporary@original at ialign=\ialign
+        \pretocmd{\ialign}{\unexpanded{\tate\let\ialign=\jlreq at temporary@original at ialign}}{}{}%
+      \fi
+      \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}}%
+      }}%
+      \renewcommand{\jlreq at referencemark@format}[1]{\@makefnmark}% うーん
+      \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\zh
+    % 縦書き時には表組み内でも縦書きにするようにする
+    \if at tate
+      \let\jlreq at temporary@original at ialign=\ialign
+      \pretocmd{\ialign}{\unexpanded{\tate\let\ialign=\jlreq at temporary@original at ialign}}{}{}%
+    \fi
+    \begin{tabular}[t]{c}%
+      \@author
+    \end{tabular}%
+    \par
+  }%
+  \ifx\@date\@empty\else
+    \vskip\baselineskip
+    {\jlreq at keepbaselineskip{\large}\@date}%
+  \fi
+  \end{center}%
+  \par
+  \vskip\baselineskip
+  \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}%
+        {\sffamily\bfseries\abstractname}%
+        \@endparpenalty\@M
+      \end{center}%
+      \par
+    }{%
+      \par\vfil\null\endtitlepage
+    }
+  \else
+    \newenvironment{abstract}{%
+      \ifnum0\if at twocolumn\else1\fi\ifjlreq at preamble1\fi>0
+        \ifjlreq at preamble
+          \ifx l\jlreq at engine\else
+            \jlreq at pushhook@postpar{\futurelet\jlreq at nextchar\jlreq at openbracket@hook}%
+          \fi
+        \fi
+        % とりあえず全部ボックスに入れる.
+        \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\zw
+        \begin{center}%
+          {\sffamily\bfseries\abstractname}%
+        \end{center}%
+        \list{}{%
+          \listparindent\parindent
+          \itemindent\listparindent
+          \labelwidth\z@
+          \labelsep\z@
+          \leftmargin=2\zw
+          \rightmargin\leftmargin
+          \@tempdima=1\zw
+          \@tempdimb=\dimexpr\linewidth - \@totalleftmargin - \leftmargin - \rightmargin\relax
+          \@tempdimc=\@tempdimb
+          \divide\@tempdimb by \@tempdima\multiply\@tempdimb by \@tempdima
+          \ifdim\@tempdimb=\@tempdimc\else\@tempdimb=\dimexpr\@tempdimb - 1\zw\relax\fi
+          \leftmargin=\dimexpr\leftmargin + (\@tempdimc - \@tempdimb)/2\relax
+          \rightmargin=\dimexpr\rightmargin + (\@tempdimc - \@tempdimb)/2\relax
+          \parsep\z@ \@plus.1\zh
+        }%
+        \item\relax
+      \else
+        \section*{\abstractname}%
+      \fi
+    }{%
+      \ifnum0\if at twocolumn\else1\fi\ifjlreq at preamble1\fi>0
+        \endlist
+        \egroup
+        \vspace{\baselineskip}%
+        \if at twocolumn
+          \end{minipage}
+        \fi
+        \egroup
+      \fi
+      \ifjlreq at preamble
+        \ifx l\jlreq at engine\else
+          \jlreq at pophook@postpar
+        \fi
+      \else
+        \unvbox\jlreq at abstractbox
+      \fi
+    }
+  \fi
+}
+%. 箇条書き.cf. JISX4051 8.4
+% 用語定義型
+\newenvironment{description}{\list{}{%
+  \setlength{\leftmargin}{0\zw}% 下げない
+  \setlength{\labelwidth}{0\zw}%
+  \setlength{\labelsep}{1\zw}
+%  \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\sffamily\bfseries #1}
+
+% enumerateとitemize
+% 見出しが一つ上のレベルからどのくらいずれているかを入れる.
+% (見出しは2\zwの箱に右/下詰めで入る.)
+\setlength\leftmargini{2\zw}
+\setlength\leftmarginii{1\zw}
+\setlength\leftmarginiii{1\zw}
+\setlength\leftmarginiv{1\zw}
+\setlength\leftmarginv{1\zw}
+\setlength\leftmarginvi{1\zw}
+
+%.. 箇条書き
+\jlreq at jlreqsetup@add{itemization_beforeafter_space}{\def\jlreq at itemization@beforeafter at space{#1}}
+\jlreq at jlreqsetup@add{itemization_itemsep}{\def\jlreq at itemization@itemsep{#1}}
+\jlreqsetup{itemization_beforeafter_space=0pt,itemization_itemsep=0pt}
+% enumerate, itemize用初期化
+\def\jlreq at init@list{%
+  \setlength{\labelwidth}{2\jlreq at mol}%
+  \setlength{\topsep}{\dimexpr\jlreq at itemization@beforeafter at space\relax}%
+  \setlength{\partopsep}{0pt}%
+  \setlength{\itemsep}{\dimexpr\jlreq at itemization@itemsep\relax}%
+  \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}{\jlreq at Kanji{enumi}}
+  \renewcommand{\theenumii}{\jlreq at rensuji{\@arabic\c at enumii}}
+  \renewcommand{\theenumiii}{\jlreq at rensuji{\@arabic\c at enumiii}}
+  \renewcommand{\theenumiv}{\jlreq at rensuji{\@arabic\c at enumiv}}
+\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\zw{\hss\textbullet\hss}}
+%\newcommand{\labelitemi}{•}
+\if at tate
+  \newcommand{\labelitemii}{○}
+  \newcommand{\labelitemiii}{*}
+\else
+  \newcommand{\labelitemii}{\hbox to 1\zw{\hss\textendash\hss}}
+  \newcommand{\labelitemiii}{\hbox to 1\zw{\hss\textasteriskcentered\hss}}
+\fi
+\newcommand{\labelitemiv}{\hbox to 1\zw{\hss ・\hss}}
+
+% 引用系.3.5.2の例.
+\jlreq at jlreqsetup@add{quote_indent}{\def\jlreq at quote@indent{#1}}
+\jlreq at jlreqsetup@add{quote_end_indent}{\def\jlreq at quote@end at indent{#1}}
+\jlreq at jlreqsetup@add{quote_fontsize}[normalsize,small,footnotesize,scriptsize,tiny,]{\jlreq at ifempty{#1}{\def\jlreq at quote@fontsize{}}{\edef\jlreq at quote@fontsize{\expandonce{\csname #1\endcsname}}}}
+\jlreq at jlreqsetup@add{quote_beforeafter_space}{\def\jlreq at quote@beforeafter at space{#1}}
+\jlreqsetup{quote_indent=2\zw,quote_end_indent=0pt,quote_fontsize=,quote_beforeafter_space=0pt}
+
+\newenvironment{verse}
+  {\let\\\@centercr
+  \list{}{\itemsep\z@ \itemindent -2\jlreq at mol
+    \listparindent\itemindent
+    \labelwidth\z@
+    \labelsep\z@
+    \leftmargin=\dimexpr\jlreq at quote@indent\relax
+    \addtolength{\leftmargin}{2\jlreq at mol}%
+    \rightmargin=\dimexpr\jlreq at quote@end at indent\relax
+    \jlreq at quote@fontsize
+    \@tempdima=1\zw
+    \@tempdimb=\dimexpr\linewidth - \@totalleftmargin - \leftmargin - \rightmargin\relax
+    \@tempdimc=\@tempdimb
+    \divide\@tempdimb by \@tempdima\multiply\@tempdimb by \@tempdima
+    \topsep=\dimexpr\jlreq at quote@beforeafter at space\relax
+    \leftmargin=\dimexpr\leftmargin + \@tempdimc - \@tempdimb\relax}%
+    \item\relax}{\endlist}
+\newenvironment{quotation}
+  {\list{}{%
+    \leftmargin=\dimexpr\jlreq at quote@indent\relax
+    \rightmargin=\dimexpr\jlreq at quote@end at indent\relax
+    \jlreq at quote@fontsize
+    \@tempdima=1\zw
+    \@tempdimb=\dimexpr\linewidth - \@totalleftmargin - \leftmargin - \rightmargin\relax
+    \@tempdimc=\@tempdimb
+    \divide\@tempdimb by \@tempdima\multiply\@tempdimb by \@tempdima
+    \leftmargin=\dimexpr\leftmargin + \@tempdimc - \@tempdimb\relax
+    \listparindent\parindent
+    \itemindent\listparindent
+    \labelwidth\z@
+    \labelsep\z@
+    \topsep=\dimexpr\jlreq at quote@beforeafter at space\relax
+    \parsep\z@ \@plus.1\jlreq at gol}%
+    \item\relax}{\endlist}
+\newenvironment{quote}
+  {\list{}{%
+    \leftmargin=\dimexpr\jlreq at quote@indent\relax
+    \rightmargin=\dimexpr\jlreq at quote@end at indent\relax
+    \jlreq at quote@fontsize
+    \@tempdima=1\zw
+    \@tempdimb=\dimexpr\linewidth - \@totalleftmargin - \leftmargin - \rightmargin\relax
+    \@tempdimc=\@tempdimb
+    \divide\@tempdimb by \@tempdima\multiply\@tempdimb by \@tempdima
+    \leftmargin=\dimexpr\leftmargin + \@tempdimc - \@tempdimb\relax
+    \labelwidth\z@
+    \itemindent\z@
+    \topsep=\jlreq at speciallength{\jlreq at quote@beforeafter at space}%
+    \listparindent\z@}%
+    \item\relax}{\endlist}
+
+%. 表関係 4.4
+% 表内の行間を0にする(4.4.3.f)
+\jlreq at saveoriginalcs{tabular}
+\jlreq at saveoriginalcs{endtabular}
+\preto\tabular{\begingroup\appto\@arrayparboxrestore{\baselineskip=0pt\lineskip=0pt}}
+\appto\endtabular{\endgroup}
+% 4.4.3.e
+\setlength\tabcolsep{.5\zh}
+\setlength\arraycolsep{.5\zw}
+% 4.4.3.j
+\setlength\arrayrulewidth{\jlreq at omotekeiwidth} % 4.4.3.c
+\setlength\doublerulesep{2pt}
+\setlength\tabbingsep{\labelsep}
+\skip\@mpfootins=\skip\footins
+\setlength\fboxsep{.3\zw}
+\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{\jlreq at 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{$\m at th\mkern \@dotsep mu$\null\inhibitglue ・\inhibitglue\null$\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
+  \jlreq at oldfontcommand@disable
+}
+\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
+    \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{\jlreq at rensuji{\Alph{section}}}%
+    \else
+      \def\thesection{\Alph{section}}%
+    \fi
+  }
+}{%book, report
+  \appto\appendix{%
+    \setcounter{chapter}{0}%
+    \if at tate
+      \def\thechapter{\jlreq at rensuji{\Alph{chapter}}}%
+    \else
+      \def\thechapter{\Alph{chapter}}%
+    \fi
+    \ModifyHeading{chapter}{label_format={付録\thechapter}}%
+    \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
+  }
+}
+
+%. その他諸々
+%.. 縦中横
+\DeclareRobustCommand*{\tatechuyoko}[1]{%
+  \jlreq at ifydir{\ClassError{jlreq}{\string\tatechuyoko\space is not allowed in yoko mode}{\@ehc}}{}%
+  \jlreq at lastnodechar=\lastnodechar
+  \ifvmode\leavevmode\fi
+  % 前のJFM glue
+  \ifnum\jlreq at lastnodechar=-1\else
+    \inhibitglue
+    \jlreq at calc@jfmglue{\char\jlreq at lastnodechar}{阿}%
+    \jlreq at ifgluezero\jlreq at resultskip{}{\hskip\jlreq at resultskip}%
+  \fi
+  \hbox{\yoko 
+    \setbox\jlreq at tempboxa=\hbox{阿}%
+    \vrule width 0pt height \ht\jlreq at tempboxa depth \dp\jlreq at tempboxa #1}%
+  \def\jlreq at do{%
+    % 後ろのJFM glue
+    \jlreq at ifletter{\jlreq at nextchar}{%
+      \jlreq at expandmacros{\jlreq at nextchar}{\jlreq at tempa}%
+      \def\jlreq at tempb####1####2\jlreq at endmark{\def\jlreq at tempa{####1}}%
+      \expandafter\jlreq at tempb\jlreq at tempa\jlreq at endmark
+      \jlreq at calc@jfmglue{\char\jlreq at lastnodechar}{\jlreq at tempa}%
+      \jlreq at calc@jfmglue{阿}{\jlreq at tempa}%
+      \jlreq at ifgluezero\jlreq at resultskip{}{\hskip\jlreq at resultskip}%
+      \inhibitglue
+    }{}%
+  }%
+  \futurelet\jlreq at nextchar\jlreq at do
+}
+
+% 日にち
+\newif\if西暦
+\def\西暦{\西暦true}
+\def\和暦{\西暦false}
+% #1年#2月#3日 #4は\numberとか\kansujiとか
+\def\jlreq at wareki#1#2#3#4{%
+  % 昭和:1989年1月7日まで
+  \ifnum0\ifnum#1<1988 1\fi\ifnum#1=1989 \ifnum#2=1 \ifnum#3<8 1\fi\fi\fi>0
+    昭和\jlreq at warekiyear@{#1}{1926}{#4}%
+  \else
+    平成\jlreq at warekiyear@{#1}{1989}{#4}%
+  \fi
+  #4#2月#4#3日%
+}
+\def\jlreq at warekiyear@#1#2#3{\ifnum#1=#2 元年\else #3\numexpr#1-#2+1\relax 年\fi}
+\def\today{%
+  \if西暦
+    \jlreq at iftdir{%
+      \kansuji\year 年%
+      \kansuji\month 月%
+      \kansuji\day 日%
+    }{%
+      \number\year 年%
+      \number\month 月%
+      \number\day 日%
+    }%
+  \else
+    \jlreq at iftdir{%
+      \jlreq at wareki{\year}{\month}{\day}{\kansuji}%
+    }{%
+      \jlreq at wareki{\year}{\month}{\day}{\number}%
+    }%
+  \fi
+}
+\jlreq at jlreqsetup@add{year_style}[seireki,wareki]{%
+  \jlreq at switch{#1}{%
+    {seireki}{\西暦true}
+    {wareki}{\西暦false}
+  }
+}
+\if at tate
+  \jlreqsetup{year_style=wareki}
+\else
+  \jlreqsetup{year_style=seireki}
+\fi
+%.. 定理環境
+\jlreq at saveoriginalcs{@begintheorem}
+\jlreq at saveoriginalcs{@opargbegintheorem}
+\def\@begintheorem#1#2{\topsep=\dimexpr\jlreq at theorem@beforeafter at space\relax
+  \trivlist\labelsep=1\zw
+  \itemindent=\dimexpr\jlreq at theorem@indent\relax
+   \item[\hskip \labelsep{\sffamily\bfseries #1\ #2}]}
+\def\@opargbegintheorem#1#2#3{\topsep=\dimexpr\jlreq at theorem@beforeafter at space\relax
+  \trivlist\labelsep=1\zw
+  \itemindent=\dimexpr\jlreq at theorem@indent\relax
+  \item[\hskip \labelsep{\sffamily\bfseries #1\ #2(#3)}]}
+\AtEndOfPackageFile*{amsthm}{%
+  \jlreq at saveoriginalcs{proof}%
+  \jlreq at saveoriginalcs{endproof}%
+  \edef\jlreq at do{
+    \unexpanded{\def\jlreq at proof[#1]}{%
+      \labelsep=1\zw
+      \expandonce{\proof[{\reset at font\sffamily\bfseries #1\inhibitglue}\nopunct]}%
+    }
+  }
+  \jlreq at do
+  \def\proof{\@ifnextchar[{\jlreq at proof}{\jlreq at proof[\proofname]}}
+  \renewcommand{\proofname}{証明}
+  \jlreq at setupamsthm
+  \theoremstyle{jlreq}
+}
+\def\jlreq at setupamsthm{
+  \newtheoremstyle{jlreq}{\dimexpr\jlreq at theorem@beforeafter at space\relax}{\dimexpr\jlreq at theorem@beforeafter at space\relax}{\normalfont}{\dimexpr\jlreq at theorem@indent\relax}{\sffamily\bfseries}{}{1\zw}{\thmname{##1}\thmnumber{\ ##2}\thmnote{(##3)}}
+}
+\jlreq at jlreqsetup@add{theorem_beforeafter_space}{
+  \def\jlreq at theorem@beforeafter at space{#1}
+  \@ifpackageloaded{amsthm}{\jlreq at setupamsthm}{}
+}
+\jlreq at jlreqsetup@add{theorem_indent}{
+  \def\jlreq at theorem@indent{#1}
+  \@ifpackageloaded{amsthm}{\jlreq at setupamsthm}{}
+}
+\jlreqsetup{theorem_beforeafter_space=1\baselineskip,theorem_indent=0pt}
+
+
+% デフォルト設定
+\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-11-23 21:05:53 UTC (rev 45893)
+++ trunk/Master/texmf-dist/tex/luatex/jlreq/jfm-jlreq.lua	2017-11-23 21:06:15 UTC (rev 45894)
@@ -1,1203 +1,1203 @@
---[[
-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}},
-			[22] = {0, 0, 0},
-			[23] = {0, 0, 0},
-			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
-			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
-			[26] = {0, 0, 0},
-		]]
---			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
-		--[[
-			[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}},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0.25, 0.25, 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.25, 0.125, ratio = 0, priority = {1,-3}},
-			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
-			[26] = {0, 0, 0},
-		]]
-			[27] = {0.25, 0.25, 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}},
-		]]
-		},
-	},
-
-	[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}},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0.25, 0.25, 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.25, 0.125, ratio = 0, priority = {1,-3}},
-			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
-			[26] = {0, 0, 0},
-		]]
-			[27] = {0.25, 0.25, 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}},
-		]]
-		},
-	},
-	
-	[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}},
-		--[[
-			[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}},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0.25, 0.25, 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.25, 0.125, ratio = 0, priority = {1,-3}},
-			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
-			[26] = {0, 0, 0},
-		]]
-			[27] = {0.25, 0.25, 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}},
-		]]
-		},
-	},
-	
-	[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}},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0.25, 0.25, 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.25, 0.125, ratio = 0, priority = {1,-3}},
-			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
-			[26] = {0, 0, 0},
-		]]
-			[27] = {0.25, 0.25, 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}},
-		]]
-		},
-	},
-	
-	--[[
-	[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}},
-			[12] = {0, 0.25, 0, priority = {0,0}},
-			[13] = {0, 0.25, 0, priority = {0,0}},
-			[14] = {0, 0, 0},
-		--[[
-			[20] = {0, 0, 0},
-			[21] = {0.25, 0.25, 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.25, 0.125, ratio = 0, priority = {1,-3}},
-			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
-			[26] = {0, 0, 0},
-		]]
---			[27] = {0.25, 0.25, 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}},
-		]]
-		},
-	},
-
-	
-	--[[
-	[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}},
-			[10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[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}},
-			[16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[20] = {0, 0, 0},
-			[21] = {0, 0, 0},-- 注9,空け注5
-			[22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[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}},表6と表3が整合的でない
-			[29] = {0, 0, 0},
-			[30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-		},
-	},
-	
-	[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}},
-			[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}},
-			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
-			[26] = {0, 0, 0},
-			[27] = {0.25, 0.25, 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}},
-		},
-	},
-	
-	[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}},
-			[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}},
-			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
-			[26] = {0, 0, 0},
-			[27] = {0.25, 0.25, 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}},
-		},
-	},
-	
-	[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}},
-			[10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[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}},
-			[16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[20] = {0, 0, 0},
-			[21] = {0, 0.25, 0, priority = {0,0}},
-			[22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[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}},
-			[29] = {0, 0, 0},
-			[30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-		}
-	},
-	
-	[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}},
-			[10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[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}},
-			[16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[20] = {0, 0, 0},
-			[21] = {0, 0.25, 0, priority = {0,0}},
-			[22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[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}},
-			[29] = {0, 0, 0},
-			[30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-		}
-	},
-	
-	[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}},
-			[10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[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}},
-			[16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[20] = {0, 0, 0},
-			[21] = {0, 0.25, 0, priority = {0,0}},
-			[22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[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}},
-			[29] = {0, 0, 0},
-			[30] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
-		}
-	},
-	
-	[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}},
-			[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},
-			[25] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[26] = {0, 0, 0},
-			[27] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[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}},
-			[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},
-			[25] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[26] = {0, 0, 0},
-			[27] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
-			[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}, -- 行頭括弧はベタ組
-		},
-	},
-}
-
-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}},
+			[22] = {0, 0, 0},
+			[23] = {0, 0, 0},
+			[24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
+			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
+			[26] = {0, 0, 0},
+		]]
+--			[27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
+		--[[
+			[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}},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0.25, 0.25, 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.25, 0.125, ratio = 0, priority = {1,-3}},
+			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
+			[26] = {0, 0, 0},
+		]]
+			[27] = {0.25, 0.25, 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}},
+		]]
+		},
+	},
+
+	[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}},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0.25, 0.25, 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.25, 0.125, ratio = 0, priority = {1,-3}},
+			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
+			[26] = {0, 0, 0},
+		]]
+			[27] = {0.25, 0.25, 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}},
+		]]
+		},
+	},
+	
+	[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}},
+		--[[
+			[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}},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0.25, 0.25, 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.25, 0.125, ratio = 0, priority = {1,-3}},
+			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
+			[26] = {0, 0, 0},
+		]]
+			[27] = {0.25, 0.25, 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}},
+		]]
+		},
+	},
+	
+	[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}},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0.25, 0.25, 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.25, 0.125, ratio = 0, priority = {1,-3}},
+			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
+			[26] = {0, 0, 0},
+		]]
+			[27] = {0.25, 0.25, 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}},
+		]]
+		},
+	},
+	
+	--[[
+	[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}},
+			[12] = {0, 0.25, 0, priority = {0,0}},
+			[13] = {0, 0.25, 0, priority = {0,0}},
+			[14] = {0, 0, 0},
+		--[[
+			[20] = {0, 0, 0},
+			[21] = {0.25, 0.25, 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.25, 0.125, ratio = 0, priority = {1,-3}},
+			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
+			[26] = {0, 0, 0},
+		]]
+--			[27] = {0.25, 0.25, 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}},
+		]]
+		},
+	},
+
+	
+	--[[
+	[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}},
+			[10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[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}},
+			[16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[20] = {0, 0, 0},
+			[21] = {0, 0, 0},-- 注9,空け注5
+			[22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[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}},表6と表3が整合的でない
+			[29] = {0, 0, 0},
+			[30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+		},
+	},
+	
+	[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}},
+			[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}},
+			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
+			[26] = {0, 0, 0},
+			[27] = {0.25, 0.25, 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}},
+		},
+	},
+	
+	[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}},
+			[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}},
+			[25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
+			[26] = {0, 0, 0},
+			[27] = {0.25, 0.25, 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}},
+		},
+	},
+	
+	[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}},
+			[10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[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}},
+			[16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[20] = {0, 0, 0},
+			[21] = {0, 0.25, 0, priority = {0,0}},
+			[22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[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}},
+			[29] = {0, 0, 0},
+			[30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+		}
+	},
+	
+	[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}},
+			[10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[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}},
+			[16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[20] = {0, 0, 0},
+			[21] = {0, 0.25, 0, priority = {0,0}},
+			[22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[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}},
+			[29] = {0, 0, 0},
+			[30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+		}
+	},
+	
+	[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}},
+			[10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[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}},
+			[16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[20] = {0, 0, 0},
+			[21] = {0, 0.25, 0, priority = {0,0}},
+			[22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[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}},
+			[29] = {0, 0, 0},
+			[30] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
+		}
+	},
+	
+	[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}},
+			[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},
+			[25] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[26] = {0, 0, 0},
+			[27] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[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}},
+			[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},
+			[25] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[26] = {0, 0, 0},
+			[27] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},
+			[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}, -- 行頭括弧はベタ組
+		},
+	},
+}
+
+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)

Modified: trunk/Master/texmf-dist/tex/luatex/jlreq/jfm-jlreqv.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/jlreq/jfm-jlreqv.lua	2017-11-23 21:05:53 UTC (rev 45893)
+++ trunk/Master/texmf-dist/tex/luatex/jlreq/jfm-jlreqv.lua	2017-11-23 21:06:15 UTC (rev 45894)
@@ -1,1162 +1,1162 @@
-local jfm={
- [0]={
-  ["align"]="middle",
-  ["depth"]=0.5,
-  ["glue"]={
-   {
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=1,
-   },
-   { 0, 0, 0 },
-   [4]={ 0, 0, 0 },
-   [5]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=1,
-   },
-   [6]={ 0, 0, 0 },
-   [7]={ 0, 0, 0 },
-   [8]={
-    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 },
-   [300]={ 0, 0, 0 },
-   [301]={ 0, 0, 0 },
-   [302]={ 0, 0, 0 },
-  },
-  ["height"]=0.5,
-  ["left"]=0,
-  ["width"]=1,
- },
- {
-  ["align"]="right",
-  ["chars"]={ "(", "〔", "[", "{", "〈", "《", "「", "『", "【", "⦅", "〘", "〖", "«", "〝", "‘", "“" },
-  ["depth"]=0.5,
-  ["glue"]={
-   [0]={ 0, 0, 0 },
-   { 0, 0, 0 },
-   { 0, 0, 0 },
-   [4]={ 0, 0, 0 },
-   [5]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["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 },
-   [300]={ 0, 0, 0 },
-   [301]={ 0, 0, 0 },
-   [302]={ 0, 0, 0 },
-  },
-  ["height"]=0.5,
-  ["width"]=0.5,
- },
- {
-  ["align"]="left",
-  ["chars"]={ ")", "〕", "]", "}", "〉", "》", "」", "』", "】", "⦆", "〙", "〗", "»", "〟", "’", "”" },
-  ["depth"]=0.5,
-  ["end_adjust"]={ 0.5, 0 },
-  ["glue"]={
-   [0]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   {
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   { 0, 0, 0 },
-   [4]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [5]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=1,
-   },
-   [6]={ 0, 0, 0 },
-   [7]={ 0, 0, 0 },
-   [8]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [9]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [10]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [11]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [12]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [13]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [14]={ 0, 0, 0 },
-   [15]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [16]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [300]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [301]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [302]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-  },
-  ["height"]=0.5,
-  ["width"]=0.5,
- },
- [4]={
-  ["align"]="middle",
-  ["chars"]={ "!", "?", "‼", "⁇", "⁈", "⁉" },
-  ["depth"]=0.5,
-  ["glue"]={
-   {
-    0.5,
-    0.5,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=1,
-   },
-   { 0, 0, 0 },
-   [4]={ 0, 0, 0 },
-   [5]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["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 },
-   [300]={ 0, 0, 0 },
-   [301]={ 0, 0, 0 },
-   [302]={ 0, 0, 0 },
-  },
-  ["height"]=0.5,
-  ["width"]=1,
- },
- [5]={
-  ["align"]="middle",
-  ["chars"]={ "・", ":", ";" },
-  ["depth"]=0.5,
-  ["end_adjust"]={ 0.25, 0 },
-  ["glue"]={
-   [0]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   {
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   {
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   [4]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   [5]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0.5,
-   },
-   [6]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   [7]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   [8]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   [9]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   [10]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   [11]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   [12]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   [13]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   [14]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   [15]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   [16]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   [27]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   [300]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   [301]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-   [302]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0,
-   },
-  },
-  ["height"]=0.5,
-  ["width"]=0.5,
- },
- [6]={
-  ["align"]="left",
-  ["chars"]={ "。", "." },
-  ["depth"]=0.5,
-  ["end_adjust"]={ 0.5, 0 },
-  ["glue"]={
-   [0]={
-    0.5,
-    0,
-    0,
-    ["ratio"]=0,
-   },
-   {
-    0.5,
-    0,
-    0,
-    ["ratio"]=0,
-   },
-   { 0, 0, 0 },
-   [4]={
-    0.5,
-    0,
-    0,
-    ["ratio"]=0,
-   },
-   [5]={
-    0.75,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0.33333333,
-   },
-   [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,
-   },
-   [27]={
-    0.5,
-    0,
-    0,
-    ["ratio"]=0,
-   },
-   [300]={
-    0.5,
-    0,
-    0,
-    ["ratio"]=0,
-   },
-   [301]={
-    0.5,
-    0,
-    0,
-    ["ratio"]=0,
-   },
-   [302]={
-    0.5,
-    0,
-    0,
-    ["ratio"]=0,
-   },
-  },
-  ["height"]=0.5,
-  ["width"]=0.5,
- },
- [7]={
-  ["align"]="left",
-  ["chars"]={ "、", "," },
-  ["depth"]=0.5,
-  ["end_adjust"]={ 0.5, 0 },
-  ["glue"]={
-   [0]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   {
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   { 0, 0, 0 },
-   [4]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [5]={
-    0.75,
-    0,
-    0.75,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=0.33333333,
-   },
-   [6]={ 0, 0, 0 },
-   [7]={ 0, 0, 0 },
-   [8]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [9]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [10]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [11]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [12]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [13]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [14]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [15]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [16]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [27]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [300]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [301]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-   [302]={
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=0,
-   },
-  },
-  ["height"]=0.5,
-  ["width"]=0.5,
- },
- [8]={
-  ["align"]="middle",
-  ["chars"]={ "—", "…", "‥", "〳", "〴", "〵" },
-  ["depth"]=0.5,
-  ["glue"]={
-   [0]={
-    0,
-    0.25,
-    0,
-    ["priority"]={ 0, 0 },
-   },
-   {
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=1,
-   },
-   { 0, 0, 0 },
-   [4]={ 0, 0, 0 },
-   [5]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=1,
-   },
-   [6]={ 0, 0, 0 },
-   [7]={ 0, 0, 0 },
-   [8]={ 0, 0, 0 },
-   [14]={ 0, 0, 0 },
-   [27]={
-    0,
-    0.25,
-    0,
-    ["priority"]={ 0, 0 },
-   },
-   [300]={ 0, 0, 0 },
-   [301]={ 0, 0, 0 },
-   [302]={ 0, 0, 0 },
-  },
-  ["height"]=0.5,
-  ["width"]=1,
- },
- [9]={
-  ["align"]="middle",
-  ["chars"]={ "ヽ", "ヾ", "ゝ", "ゞ", "々", "〻" },
-  ["depth"]=0.5,
-  ["glue"]={
-   {
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=1,
-   },
-   { 0, 0, 0 },
-   [4]={ 0, 0, 0 },
-   [5]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=1,
-   },
-   [6]={ 0, 0, 0 },
-   [7]={ 0, 0, 0 },
-   [8]={ 0, 0, 0 },
-   [14]={ 0, 0, 0 },
-   [27]={
-    0.25,
-    0.25,
-    0.125,
-    ["priority"]={ 1, -3 },
-    ["ratio"]=0,
-   },
-   [300]={ 0, 0, 0 },
-   [301]={ 0, 0, 0 },
-   [302]={ 0, 0, 0 },
-  },
-  ["height"]=0.5,
- },
- [10]={
-  ["align"]="middle",
-  ["chars"]={ "ー" },
-  ["depth"]=0.5,
-  ["glue"]={
-   {
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=1,
-   },
-   { 0, 0, 0 },
-   [4]={ 0, 0, 0 },
-   [5]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=1,
-   },
-   [6]={ 0, 0, 0 },
-   [7]={ 0, 0, 0 },
-   [8]={ 0, 0, 0 },
-   [14]={ 0, 0, 0 },
-   [27]={
-    0.25,
-    0.25,
-    0.125,
-    ["priority"]={ 1, -3 },
-    ["ratio"]=0,
-   },
-   [300]={ 0, 0, 0 },
-   [301]={ 0, 0, 0 },
-   [302]={ 0, 0, 0 },
-  },
-  ["height"]=0.5,
- },
- [11]={
-  ["align"]="middle",
-  ["chars"]={ "ぁ", "ぃ", "ぅ", "ぇ", "ぉ", "ァ", "ィ", "ゥ", "ェ", "ォ", "っ", "ゃ", "ゅ", "ょ", "ゎ", "ゕ", "ゖ", "ッ", "ャ", "ュ", "ョ", "ヮ", "ヵ", "ヶ", "ㇰ", "ㇱ", "ㇲ", "ㇳ", "ㇴ", "ㇵ", "ㇶ", "ㇷ", "ㇸ", "ㇹ", "ㇺ", "ㇻ", "ㇼ", "ㇽ", "ㇾ", "ㇿ", "ㇷ゚" },
-  ["depth"]=0.5,
-  ["glue"]={
-   {
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=1,
-   },
-   { 0, 0, 0 },
-   [4]={ 0, 0, 0 },
-   [5]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=1,
-   },
-   [6]={ 0, 0, 0 },
-   [7]={ 0, 0, 0 },
-   [8]={ 0, 0, 0 },
-   [14]={ 0, 0, 0 },
-   [27]={
-    0.25,
-    0,
-    0.125,
-    ["priority"]={ 1, -3 },
-    ["ratio"]=0,
-   },
-   [300]={ 0, 0, 0 },
-   [301]={ 0, 0, 0 },
-   [302]={ 0, 0, 0 },
-  },
-  ["height"]=0.5,
- },
- [12]={
-  ["align"]="middle",
-  ["chars"]={ "¥", "$", "£", "#", "€", "№" },
-  ["depth"]=0.5,
-  ["glue"]={
-   {
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=1,
-   },
-   { 0, 0, 0 },
-   [4]={ 0, 0, 0 },
-   [5]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=1,
-   },
-   [6]={ 0, 0, 0 },
-   [7]={ 0, 0, 0 },
-   [14]={ 0, 0, 0 },
-   [27]={
-    0,
-    0.25,
-    0,
-    ["priority"]={ 0, 0 },
-   },
-   [300]={ 0, 0, 0 },
-   [301]={ 0, 0, 0 },
-   [302]={ 0, 0, 0 },
-  },
-  ["height"]=0.5,
- },
- [13]={
-  ["align"]="middle",
-  ["chars"]={ "°", "′", "″", "℃", "¢", "%", "‰", "㏋", "ℓ", "㌃", "㌍", "㌔", "㌘", "㌢", "㌣", "㌦", "㌧", "㌫", "㌶", "㌻", "㍉", "㍊", "㍍", "㍑", "㍗", "㎎", "㎏", "㎜", "㎝", "㎞", "㎡", "㏄" },
-  ["depth"]=0.5,
-  ["glue"]={
-   [0]={
-    0,
-    0.25,
-    0,
-    ["priority"]={ 0, 0 },
-   },
-   {
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=1,
-   },
-   { 0, 0, 0 },
-   [4]={ 0, 0, 0 },
-   [5]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=1,
-   },
-   [6]={ 0, 0, 0 },
-   [7]={ 0, 0, 0 },
-   [14]={ 0, 0, 0 },
-   [27]={
-    0,
-    0.25,
-    0,
-    ["priority"]={ 0, 0 },
-   },
-   [300]={ 0, 0, 0 },
-   [301]={ 0, 0, 0 },
-   [302]={ 0, 0, 0 },
-  },
-  ["height"]=0.5,
- },
- [14]={
-  ["align"]="middle",
-  ["chars"]={ " " },
-  ["depth"]=0.5,
-  ["glue"]={
-   [0]={ 0, 0, 0 },
-   { 0, 0, 0 },
-   { 0, 0, 0 },
-   [4]={ 0, 0, 0 },
-   [5]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["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 },
-   [27]={ 0, 0, 0 },
-   [300]={ 0, 0, 0 },
-   [301]={ 0, 0, 0 },
-   [302]={ 0, 0, 0 },
-  },
-  ["height"]=0.5,
-  ["width"]=1,
- },
- [15]={
-  ["align"]="middle",
-  ["chars"]={ "あ", "い", "う", "え", "お", "か", "が", "き", "ぎ", "く", "ぐ", "け", "げ", "こ", "ご", "さ", "ざ", "し", "じ", "す", "ず", "せ", "ぜ", "そ", "ぞ", "た", "だ", "ち", "ぢ", "つ", "づ", "て", "で", "と", "ど", "な", "に", "ぬ", "ね", "の", "は", "ば", "ぱ", "ひ", "び", "ぴ", "ふ", "ぶ", "ぷ", "へ", "べ", "ぺ", "ほ", "ぼ", "ぽ", "ま", "み", "む", "め", "も", "や", "ゆ", "よ", "ら", "り", "る", "れ", "ろ", "わ", "ゐ", "ゑ", "を", "ん", "ゔ", "か゚", "き゚", "く゚", "け゚", "こ゚" },
-  ["depth"]=0.5,
-  ["glue"]={
-   {
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=1,
-   },
-   { 0, 0, 0 },
-   [4]={ 0, 0, 0 },
-   [5]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=1,
-   },
-   [6]={ 0, 0, 0 },
-   [7]={ 0, 0, 0 },
-   [14]={ 0, 0, 0 },
-   [27]={
-    0.25,
-    0.25,
-    0.125,
-    ["priority"]={ 1, -3 },
-    ["ratio"]=0,
-   },
-   [300]={ 0, 0, 0 },
-   [301]={ 0, 0, 0 },
-   [302]={ 0, 0, 0 },
-  },
-  ["height"]=0.5,
- },
- [16]={
-  ["align"]="middle",
-  ["chars"]={ "ア", "イ", "ウ", "エ", "オ", "カ", "ガ", "キ", "ギ", "ク", "グ", "ケ", "ゲ", "コ", "ゴ", "サ", "ザ", "シ", "ジ", "ス", "ズ", "セ", "ゼ", "ソ", "ゾ", "タ", "ダ", "チ", "ヂ", "ツ", "ヅ", "テ", "デ", "ト", "ド", "ナ", "ニ", "ヌ", "ネ", "ノ", "ハ", "バ", "パ", "ヒ", "ビ", "ピ", "フ", "ブ", "プ", "ヘ", "ベ", "ペ", "ホ", "ボ", "ポ", "マ", "ミ", "ム", "メ", "モ", "ヤ", "ユ", "ヨ", "ラ", "リ", "ル", "レ", "ロ", "ワ", "ヰ", "ヱ", "ヲ", "ン", "ヴ", "ヷ", "ヸ", "ヹ", "ヺ", "カ゚", "キ゚", "ク゚", "ケ゚", "コ゚", "セ゚", "ツ゚", "ト゚" },
-  ["depth"]=0.5,
-  ["glue"]={
-   {
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=1,
-   },
-   { 0, 0, 0 },
-   [4]={ 0, 0, 0 },
-   [5]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["ratio"]=1,
-   },
-   [6]={ 0, 0, 0 },
-   [7]={ 0, 0, 0 },
-   [14]={ 0, 0, 0 },
-   [27]={
-    0.25,
-    0.25,
-    0.125,
-    ["priority"]={ 1, -3 },
-    ["ratio"]=0,
-   },
-   [300]={ 0, 0, 0 },
-   [301]={ 0, 0, 0 },
-   [302]={ 0, 0, 0 },
-  },
-  ["height"]=0.5,
- },
- [90]={
-  ["chars"]={ "parbdd", "boxbdd" },
-  ["depth"]=0.5,
-  ["glue"]={
-   { 0, 0, 0 },
-  },
-  ["height"]=0.5,
- },
- [300]={
-  ["align"]="middle",
-  ["chars"]={ "‐" },
-  ["depth"]=0.5,
-  ["glue"]={
-   [0]={ 0, 0, 0 },
-   {
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=1,
-   },
-   { 0, 0, 0 },
-   [4]={ 0, 0, 0 },
-   [5]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["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 },
-   [300]={ 0, 0, 0 },
-   [301]={ 0, 0, 0 },
-   [302]={ 0, 0, 0 },
-  },
-  ["height"]=0.5,
-  ["width"]=0.25,
- },
- [301]={
-  ["align"]="middle",
-  ["chars"]={ "゠", "–" },
-  ["depth"]=0.5,
-  ["glue"]={
-   [0]={ 0, 0, 0 },
-   {
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=1,
-   },
-   { 0, 0, 0 },
-   [4]={ 0, 0, 0 },
-   [5]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["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 },
-   [300]={ 0, 0, 0 },
-   [301]={ 0, 0, 0 },
-   [302]={ 0, 0, 0 },
-  },
-  ["height"]=0.5,
-  ["width"]=0.5,
- },
- [302]={
-  ["align"]="middle",
-  ["chars"]={ "〜" },
-  ["depth"]=0.5,
-  ["glue"]={
-   [0]={ 0, 0, 0 },
-   {
-    0.5,
-    0,
-    0.5,
-    ["priority"]={ 0, -2 },
-    ["ratio"]=1,
-   },
-   { 0, 0, 0 },
-   [4]={ 0, 0, 0 },
-   [5]={
-    0.25,
-    0,
-    0.25,
-    ["priority"]={ 0, -1 },
-    ["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 },
-   [300]={ 0, 0, 0 },
-   [301]={ 0, 0, 0 },
-   [302]={ 0, 0, 0 },
-  },
-  ["height"]=0.5,
-  ["width"]=1,
- },
- ["dir"]="tate",
- ["kanjiskip"]={ 0, 0.25, 0 },
- ["version"]=2,
- ["xkanjiskip"]={ 0.25, 0.25, 0.125 },
- ["zh"]=1,
- ["zw"]=1,
-}
-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)
+local jfm={
+ [0]={
+  ["align"]="middle",
+  ["depth"]=0.5,
+  ["glue"]={
+   {
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=1,
+   },
+   { 0, 0, 0 },
+   [4]={ 0, 0, 0 },
+   [5]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=1,
+   },
+   [6]={ 0, 0, 0 },
+   [7]={ 0, 0, 0 },
+   [8]={
+    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 },
+   [300]={ 0, 0, 0 },
+   [301]={ 0, 0, 0 },
+   [302]={ 0, 0, 0 },
+  },
+  ["height"]=0.5,
+  ["left"]=0,
+  ["width"]=1,
+ },
+ {
+  ["align"]="right",
+  ["chars"]={ "(", "〔", "[", "{", "〈", "《", "「", "『", "【", "⦅", "〘", "〖", "«", "〝", "‘", "“" },
+  ["depth"]=0.5,
+  ["glue"]={
+   [0]={ 0, 0, 0 },
+   { 0, 0, 0 },
+   { 0, 0, 0 },
+   [4]={ 0, 0, 0 },
+   [5]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["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 },
+   [300]={ 0, 0, 0 },
+   [301]={ 0, 0, 0 },
+   [302]={ 0, 0, 0 },
+  },
+  ["height"]=0.5,
+  ["width"]=0.5,
+ },
+ {
+  ["align"]="left",
+  ["chars"]={ ")", "〕", "]", "}", "〉", "》", "」", "』", "】", "⦆", "〙", "〗", "»", "〟", "’", "”" },
+  ["depth"]=0.5,
+  ["end_adjust"]={ 0.5, 0 },
+  ["glue"]={
+   [0]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   {
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   { 0, 0, 0 },
+   [4]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [5]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=1,
+   },
+   [6]={ 0, 0, 0 },
+   [7]={ 0, 0, 0 },
+   [8]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [9]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [10]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [11]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [12]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [13]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [14]={ 0, 0, 0 },
+   [15]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [16]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [300]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [301]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [302]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+  },
+  ["height"]=0.5,
+  ["width"]=0.5,
+ },
+ [4]={
+  ["align"]="middle",
+  ["chars"]={ "!", "?", "‼", "⁇", "⁈", "⁉" },
+  ["depth"]=0.5,
+  ["glue"]={
+   {
+    0.5,
+    0.5,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=1,
+   },
+   { 0, 0, 0 },
+   [4]={ 0, 0, 0 },
+   [5]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["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 },
+   [300]={ 0, 0, 0 },
+   [301]={ 0, 0, 0 },
+   [302]={ 0, 0, 0 },
+  },
+  ["height"]=0.5,
+  ["width"]=1,
+ },
+ [5]={
+  ["align"]="middle",
+  ["chars"]={ "・", ":", ";" },
+  ["depth"]=0.5,
+  ["end_adjust"]={ 0.25, 0 },
+  ["glue"]={
+   [0]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   {
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   {
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   [4]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   [5]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0.5,
+   },
+   [6]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   [7]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   [8]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   [9]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   [10]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   [11]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   [12]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   [13]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   [14]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   [15]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   [16]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   [27]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   [300]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   [301]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+   [302]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0,
+   },
+  },
+  ["height"]=0.5,
+  ["width"]=0.5,
+ },
+ [6]={
+  ["align"]="left",
+  ["chars"]={ "。", "." },
+  ["depth"]=0.5,
+  ["end_adjust"]={ 0.5, 0 },
+  ["glue"]={
+   [0]={
+    0.5,
+    0,
+    0,
+    ["ratio"]=0,
+   },
+   {
+    0.5,
+    0,
+    0,
+    ["ratio"]=0,
+   },
+   { 0, 0, 0 },
+   [4]={
+    0.5,
+    0,
+    0,
+    ["ratio"]=0,
+   },
+   [5]={
+    0.75,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0.33333333,
+   },
+   [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,
+   },
+   [27]={
+    0.5,
+    0,
+    0,
+    ["ratio"]=0,
+   },
+   [300]={
+    0.5,
+    0,
+    0,
+    ["ratio"]=0,
+   },
+   [301]={
+    0.5,
+    0,
+    0,
+    ["ratio"]=0,
+   },
+   [302]={
+    0.5,
+    0,
+    0,
+    ["ratio"]=0,
+   },
+  },
+  ["height"]=0.5,
+  ["width"]=0.5,
+ },
+ [7]={
+  ["align"]="left",
+  ["chars"]={ "、", "," },
+  ["depth"]=0.5,
+  ["end_adjust"]={ 0.5, 0 },
+  ["glue"]={
+   [0]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   {
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   { 0, 0, 0 },
+   [4]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [5]={
+    0.75,
+    0,
+    0.75,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=0.33333333,
+   },
+   [6]={ 0, 0, 0 },
+   [7]={ 0, 0, 0 },
+   [8]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [9]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [10]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [11]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [12]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [13]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [14]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [15]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [16]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [27]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [300]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [301]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+   [302]={
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=0,
+   },
+  },
+  ["height"]=0.5,
+  ["width"]=0.5,
+ },
+ [8]={
+  ["align"]="middle",
+  ["chars"]={ "—", "…", "‥", "〳", "〴", "〵" },
+  ["depth"]=0.5,
+  ["glue"]={
+   [0]={
+    0,
+    0.25,
+    0,
+    ["priority"]={ 0, 0 },
+   },
+   {
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=1,
+   },
+   { 0, 0, 0 },
+   [4]={ 0, 0, 0 },
+   [5]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=1,
+   },
+   [6]={ 0, 0, 0 },
+   [7]={ 0, 0, 0 },
+   [8]={ 0, 0, 0 },
+   [14]={ 0, 0, 0 },
+   [27]={
+    0,
+    0.25,
+    0,
+    ["priority"]={ 0, 0 },
+   },
+   [300]={ 0, 0, 0 },
+   [301]={ 0, 0, 0 },
+   [302]={ 0, 0, 0 },
+  },
+  ["height"]=0.5,
+  ["width"]=1,
+ },
+ [9]={
+  ["align"]="middle",
+  ["chars"]={ "ヽ", "ヾ", "ゝ", "ゞ", "々", "〻" },
+  ["depth"]=0.5,
+  ["glue"]={
+   {
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=1,
+   },
+   { 0, 0, 0 },
+   [4]={ 0, 0, 0 },
+   [5]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=1,
+   },
+   [6]={ 0, 0, 0 },
+   [7]={ 0, 0, 0 },
+   [8]={ 0, 0, 0 },
+   [14]={ 0, 0, 0 },
+   [27]={
+    0.25,
+    0.25,
+    0.125,
+    ["priority"]={ 1, -3 },
+    ["ratio"]=0,
+   },
+   [300]={ 0, 0, 0 },
+   [301]={ 0, 0, 0 },
+   [302]={ 0, 0, 0 },
+  },
+  ["height"]=0.5,
+ },
+ [10]={
+  ["align"]="middle",
+  ["chars"]={ "ー" },
+  ["depth"]=0.5,
+  ["glue"]={
+   {
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=1,
+   },
+   { 0, 0, 0 },
+   [4]={ 0, 0, 0 },
+   [5]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=1,
+   },
+   [6]={ 0, 0, 0 },
+   [7]={ 0, 0, 0 },
+   [8]={ 0, 0, 0 },
+   [14]={ 0, 0, 0 },
+   [27]={
+    0.25,
+    0.25,
+    0.125,
+    ["priority"]={ 1, -3 },
+    ["ratio"]=0,
+   },
+   [300]={ 0, 0, 0 },
+   [301]={ 0, 0, 0 },
+   [302]={ 0, 0, 0 },
+  },
+  ["height"]=0.5,
+ },
+ [11]={
+  ["align"]="middle",
+  ["chars"]={ "ぁ", "ぃ", "ぅ", "ぇ", "ぉ", "ァ", "ィ", "ゥ", "ェ", "ォ", "っ", "ゃ", "ゅ", "ょ", "ゎ", "ゕ", "ゖ", "ッ", "ャ", "ュ", "ョ", "ヮ", "ヵ", "ヶ", "ㇰ", "ㇱ", "ㇲ", "ㇳ", "ㇴ", "ㇵ", "ㇶ", "ㇷ", "ㇸ", "ㇹ", "ㇺ", "ㇻ", "ㇼ", "ㇽ", "ㇾ", "ㇿ", "ㇷ゚" },
+  ["depth"]=0.5,
+  ["glue"]={
+   {
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=1,
+   },
+   { 0, 0, 0 },
+   [4]={ 0, 0, 0 },
+   [5]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=1,
+   },
+   [6]={ 0, 0, 0 },
+   [7]={ 0, 0, 0 },
+   [8]={ 0, 0, 0 },
+   [14]={ 0, 0, 0 },
+   [27]={
+    0.25,
+    0,
+    0.125,
+    ["priority"]={ 1, -3 },
+    ["ratio"]=0,
+   },
+   [300]={ 0, 0, 0 },
+   [301]={ 0, 0, 0 },
+   [302]={ 0, 0, 0 },
+  },
+  ["height"]=0.5,
+ },
+ [12]={
+  ["align"]="middle",
+  ["chars"]={ "¥", "$", "£", "#", "€", "№" },
+  ["depth"]=0.5,
+  ["glue"]={
+   {
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=1,
+   },
+   { 0, 0, 0 },
+   [4]={ 0, 0, 0 },
+   [5]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=1,
+   },
+   [6]={ 0, 0, 0 },
+   [7]={ 0, 0, 0 },
+   [14]={ 0, 0, 0 },
+   [27]={
+    0,
+    0.25,
+    0,
+    ["priority"]={ 0, 0 },
+   },
+   [300]={ 0, 0, 0 },
+   [301]={ 0, 0, 0 },
+   [302]={ 0, 0, 0 },
+  },
+  ["height"]=0.5,
+ },
+ [13]={
+  ["align"]="middle",
+  ["chars"]={ "°", "′", "″", "℃", "¢", "%", "‰", "㏋", "ℓ", "㌃", "㌍", "㌔", "㌘", "㌢", "㌣", "㌦", "㌧", "㌫", "㌶", "㌻", "㍉", "㍊", "㍍", "㍑", "㍗", "㎎", "㎏", "㎜", "㎝", "㎞", "㎡", "㏄" },
+  ["depth"]=0.5,
+  ["glue"]={
+   [0]={
+    0,
+    0.25,
+    0,
+    ["priority"]={ 0, 0 },
+   },
+   {
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=1,
+   },
+   { 0, 0, 0 },
+   [4]={ 0, 0, 0 },
+   [5]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=1,
+   },
+   [6]={ 0, 0, 0 },
+   [7]={ 0, 0, 0 },
+   [14]={ 0, 0, 0 },
+   [27]={
+    0,
+    0.25,
+    0,
+    ["priority"]={ 0, 0 },
+   },
+   [300]={ 0, 0, 0 },
+   [301]={ 0, 0, 0 },
+   [302]={ 0, 0, 0 },
+  },
+  ["height"]=0.5,
+ },
+ [14]={
+  ["align"]="middle",
+  ["chars"]={ " " },
+  ["depth"]=0.5,
+  ["glue"]={
+   [0]={ 0, 0, 0 },
+   { 0, 0, 0 },
+   { 0, 0, 0 },
+   [4]={ 0, 0, 0 },
+   [5]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["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 },
+   [27]={ 0, 0, 0 },
+   [300]={ 0, 0, 0 },
+   [301]={ 0, 0, 0 },
+   [302]={ 0, 0, 0 },
+  },
+  ["height"]=0.5,
+  ["width"]=1,
+ },
+ [15]={
+  ["align"]="middle",
+  ["chars"]={ "あ", "い", "う", "え", "お", "か", "が", "き", "ぎ", "く", "ぐ", "け", "げ", "こ", "ご", "さ", "ざ", "し", "じ", "す", "ず", "せ", "ぜ", "そ", "ぞ", "た", "だ", "ち", "ぢ", "つ", "づ", "て", "で", "と", "ど", "な", "に", "ぬ", "ね", "の", "は", "ば", "ぱ", "ひ", "び", "ぴ", "ふ", "ぶ", "ぷ", "へ", "べ", "ぺ", "ほ", "ぼ", "ぽ", "ま", "み", "む", "め", "も", "や", "ゆ", "よ", "ら", "り", "る", "れ", "ろ", "わ", "ゐ", "ゑ", "を", "ん", "ゔ", "か゚", "き゚", "く゚", "け゚", "こ゚" },
+  ["depth"]=0.5,
+  ["glue"]={
+   {
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=1,
+   },
+   { 0, 0, 0 },
+   [4]={ 0, 0, 0 },
+   [5]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=1,
+   },
+   [6]={ 0, 0, 0 },
+   [7]={ 0, 0, 0 },
+   [14]={ 0, 0, 0 },
+   [27]={
+    0.25,
+    0.25,
+    0.125,
+    ["priority"]={ 1, -3 },
+    ["ratio"]=0,
+   },
+   [300]={ 0, 0, 0 },
+   [301]={ 0, 0, 0 },
+   [302]={ 0, 0, 0 },
+  },
+  ["height"]=0.5,
+ },
+ [16]={
+  ["align"]="middle",
+  ["chars"]={ "ア", "イ", "ウ", "エ", "オ", "カ", "ガ", "キ", "ギ", "ク", "グ", "ケ", "ゲ", "コ", "ゴ", "サ", "ザ", "シ", "ジ", "ス", "ズ", "セ", "ゼ", "ソ", "ゾ", "タ", "ダ", "チ", "ヂ", "ツ", "ヅ", "テ", "デ", "ト", "ド", "ナ", "ニ", "ヌ", "ネ", "ノ", "ハ", "バ", "パ", "ヒ", "ビ", "ピ", "フ", "ブ", "プ", "ヘ", "ベ", "ペ", "ホ", "ボ", "ポ", "マ", "ミ", "ム", "メ", "モ", "ヤ", "ユ", "ヨ", "ラ", "リ", "ル", "レ", "ロ", "ワ", "ヰ", "ヱ", "ヲ", "ン", "ヴ", "ヷ", "ヸ", "ヹ", "ヺ", "カ゚", "キ゚", "ク゚", "ケ゚", "コ゚", "セ゚", "ツ゚", "ト゚" },
+  ["depth"]=0.5,
+  ["glue"]={
+   {
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=1,
+   },
+   { 0, 0, 0 },
+   [4]={ 0, 0, 0 },
+   [5]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["ratio"]=1,
+   },
+   [6]={ 0, 0, 0 },
+   [7]={ 0, 0, 0 },
+   [14]={ 0, 0, 0 },
+   [27]={
+    0.25,
+    0.25,
+    0.125,
+    ["priority"]={ 1, -3 },
+    ["ratio"]=0,
+   },
+   [300]={ 0, 0, 0 },
+   [301]={ 0, 0, 0 },
+   [302]={ 0, 0, 0 },
+  },
+  ["height"]=0.5,
+ },
+ [90]={
+  ["chars"]={ "parbdd", "boxbdd" },
+  ["depth"]=0.5,
+  ["glue"]={
+   { 0, 0, 0 },
+  },
+  ["height"]=0.5,
+ },
+ [300]={
+  ["align"]="middle",
+  ["chars"]={ "‐" },
+  ["depth"]=0.5,
+  ["glue"]={
+   [0]={ 0, 0, 0 },
+   {
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=1,
+   },
+   { 0, 0, 0 },
+   [4]={ 0, 0, 0 },
+   [5]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["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 },
+   [300]={ 0, 0, 0 },
+   [301]={ 0, 0, 0 },
+   [302]={ 0, 0, 0 },
+  },
+  ["height"]=0.5,
+  ["width"]=0.25,
+ },
+ [301]={
+  ["align"]="middle",
+  ["chars"]={ "゠", "–" },
+  ["depth"]=0.5,
+  ["glue"]={
+   [0]={ 0, 0, 0 },
+   {
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=1,
+   },
+   { 0, 0, 0 },
+   [4]={ 0, 0, 0 },
+   [5]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["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 },
+   [300]={ 0, 0, 0 },
+   [301]={ 0, 0, 0 },
+   [302]={ 0, 0, 0 },
+  },
+  ["height"]=0.5,
+  ["width"]=0.5,
+ },
+ [302]={
+  ["align"]="middle",
+  ["chars"]={ "〜" },
+  ["depth"]=0.5,
+  ["glue"]={
+   [0]={ 0, 0, 0 },
+   {
+    0.5,
+    0,
+    0.5,
+    ["priority"]={ 0, -2 },
+    ["ratio"]=1,
+   },
+   { 0, 0, 0 },
+   [4]={ 0, 0, 0 },
+   [5]={
+    0.25,
+    0,
+    0.25,
+    ["priority"]={ 0, -1 },
+    ["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 },
+   [300]={ 0, 0, 0 },
+   [301]={ 0, 0, 0 },
+   [302]={ 0, 0, 0 },
+  },
+  ["height"]=0.5,
+  ["width"]=1,
+ },
+ ["dir"]="tate",
+ ["kanjiskip"]={ 0, 0.25, 0 },
+ ["version"]=2,
+ ["xkanjiskip"]={ 0.25, 0.25, 0.125 },
+ ["zh"]=1,
+ ["zw"]=1,
+}
+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