diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/jlreq/LICENSE | 24 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/jlreq/README-ja.html | 182 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/jlreq/README-ja.md | 378 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/jlreq/README.html | 43 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/jlreq/README.md | 54 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/jlreq/jlreq.cls | 7092 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/jlreq/jfm-jlreq.lua | 2446 |
7 files changed, 5249 insertions, 4970 deletions
diff --git a/Master/texmf-dist/doc/latex/jlreq/LICENSE b/Master/texmf-dist/doc/latex/jlreq/LICENSE index c44a7560586..b6d60f14c17 100644 --- a/Master/texmf-dist/doc/latex/jlreq/LICENSE +++ b/Master/texmf-dist/doc/latex/jlreq/LICENSE @@ -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. + diff --git a/Master/texmf-dist/doc/latex/jlreq/README-ja.html b/Master/texmf-dist/doc/latex/jlreq/README-ja.html new file mode 100644 index 00000000000..76d487f7971 --- /dev/null +++ b/Master/texmf-dist/doc/latex/jlreq/README-ja.html @@ -0,0 +1,182 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta http-equiv="Content-Style-Type" content="text/css" /> + <meta name="generator" content="pandoc" /> + <title></title> + <style type="text/css">code{white-space: pre;}</style> + <link href="data:text/css;charset=utf-8,body%20%7B%0Afont%2Dfamily%3A%20Helvetica%2C%20arial%2C%20sans%2Dserif%3B%0Afont%2Dsize%3A%2014px%3B%0Aline%2Dheight%3A%201%2E6%3B%0Apadding%2Dtop%3A%2010px%3B%0Apadding%2Dbottom%3A%2010px%3B%0Abackground%2Dcolor%3A%20white%3B%0Apadding%3A%2030px%3B%20%7D%0Abody%20%3E%20%2A%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%20%21important%3B%20%7D%0Abody%20%3E%20%2A%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%20%21important%3B%20%7D%0Aa%20%7B%0Acolor%3A%20%234183C4%3B%20%7D%0Aa%2Eabsent%20%7B%0Acolor%3A%20%23cc0000%3B%20%7D%0Aa%2Eanchor%20%7B%0Adisplay%3A%20block%3B%0Apadding%2Dleft%3A%2030px%3B%0Amargin%2Dleft%3A%20%2D30px%3B%0Acursor%3A%20pointer%3B%0Aposition%3A%20absolute%3B%0Atop%3A%200%3B%0Aleft%3A%200%3B%0Abottom%3A%200%3B%20%7D%0Ah1%2C%20h2%2C%20h3%2C%20h4%2C%20h5%2C%20h6%20%7B%0Amargin%3A%2020px%200%2010px%3B%0Apadding%3A%200%3B%0Afont%2Dweight%3A%20bold%3B%0A%2Dwebkit%2Dfont%2Dsmoothing%3A%20antialiased%3B%0Acursor%3A%20text%3B%0Aposition%3A%20relative%3B%20%7D%0Ah1%3Ahover%20a%2Eanchor%2C%20h2%3Ahover%20a%2Eanchor%2C%20h3%3Ahover%20a%2Eanchor%2C%20h4%3Ahover%20a%2Eanchor%2C%20h5%3Ahover%20a%2Eanchor%2C%20h6%3Ahover%20a%2Eanchor%20%7B%0A%0Atext%2Ddecoration%3A%20none%3B%20%7D%0Ah1%20tt%2C%20h1%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah2%20tt%2C%20h2%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah3%20tt%2C%20h3%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah4%20tt%2C%20h4%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah5%20tt%2C%20h5%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah6%20tt%2C%20h6%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah1%20%7B%0Afont%2Dsize%3A%2028px%3B%0Acolor%3A%20black%3B%20%7D%0Ah2%20%7B%0Afont%2Dsize%3A%2024px%3B%0Aborder%2Dbottom%3A%201px%20solid%20%23cccccc%3B%0Acolor%3A%20black%3B%20%7D%0Ah3%20%7B%0Afont%2Dsize%3A%2018px%3B%20%7D%0Ah4%20%7B%0Afont%2Dsize%3A%2016px%3B%20%7D%0Ah5%20%7B%0Afont%2Dsize%3A%2014px%3B%20%7D%0Ah6%20%7B%0Acolor%3A%20%23777777%3B%0Afont%2Dsize%3A%2014px%3B%20%7D%0Ap%2C%20blockquote%2C%20ul%2C%20ol%2C%20dl%2C%20li%2C%20table%2C%20pre%20%7B%0Amargin%3A%2015px%200%3B%20%7D%0Ahr%20%7B%0A%0Aborder%3A%200%20none%3B%0Acolor%3A%20%23cccccc%3B%0Aheight%3A%204px%3B%0Apadding%3A%200%3B%20%7D%0Abody%20%3E%20h2%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Abody%20%3E%20h1%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Abody%20%3E%20h1%3Afirst%2Dchild%20%2B%20h2%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Abody%20%3E%20h3%3Afirst%2Dchild%2C%20body%20%3E%20h4%3Afirst%2Dchild%2C%20body%20%3E%20h5%3Afirst%2Dchild%2C%20body%20%3E%20h6%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Aa%3Afirst%2Dchild%20h1%2C%20a%3Afirst%2Dchild%20h2%2C%20a%3Afirst%2Dchild%20h3%2C%20a%3Afirst%2Dchild%20h4%2C%20a%3Afirst%2Dchild%20h5%2C%20a%3Afirst%2Dchild%20h6%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Ah1%20p%2C%20h2%20p%2C%20h3%20p%2C%20h4%20p%2C%20h5%20p%2C%20h6%20p%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Ali%20p%2Efirst%20%7B%0Adisplay%3A%20inline%2Dblock%3B%20%7D%0Aul%2C%20ol%20%7B%0Apadding%2Dleft%3A%2030px%3B%20%7D%0Aul%20%3Afirst%2Dchild%2C%20ol%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Aul%20%3Alast%2Dchild%2C%20ol%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Adl%20%7B%0Apadding%3A%200%3B%20%7D%0Adl%20dt%20%7B%0Afont%2Dsize%3A%2014px%3B%0Afont%2Dweight%3A%20bold%3B%0Afont%2Dstyle%3A%20italic%3B%0Apadding%3A%200%3B%0Amargin%3A%2015px%200%205px%3B%20%7D%0Adl%20dt%3Afirst%2Dchild%20%7B%0Apadding%3A%200%3B%20%7D%0Adl%20dt%20%3E%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Adl%20dt%20%3E%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Adl%20dd%20%7B%0Amargin%3A%200%200%2015px%3B%0Apadding%3A%200%2015px%3B%20%7D%0Adl%20dd%20%3E%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Adl%20dd%20%3E%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Ablockquote%20%7B%0Aborder%2Dleft%3A%204px%20solid%20%23dddddd%3B%0Apadding%3A%200%2015px%3B%0Acolor%3A%20%23777777%3B%20%7D%0Ablockquote%20%3E%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Ablockquote%20%3E%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Atable%20%7B%0Apadding%3A%200%3B%20%7D%0Atable%20tr%20%7B%0Aborder%2Dtop%3A%201px%20solid%20%23cccccc%3B%0Abackground%2Dcolor%3A%20white%3B%0Amargin%3A%200%3B%0Apadding%3A%200%3B%20%7D%0Atable%20tr%3Anth%2Dchild%282n%29%20%7B%0Abackground%2Dcolor%3A%20%23f8f8f8%3B%20%7D%0Atable%20tr%20th%20%7B%0Afont%2Dweight%3A%20bold%3B%0Aborder%3A%201px%20solid%20%23cccccc%3B%0Atext%2Dalign%3A%20left%3B%0Amargin%3A%200%3B%0Apadding%3A%206px%2013px%3B%20%7D%0Atable%20tr%20td%20%7B%0Aborder%3A%201px%20solid%20%23cccccc%3B%0Atext%2Dalign%3A%20left%3B%0Amargin%3A%200%3B%0Apadding%3A%206px%2013px%3B%20%7D%0Atable%20tr%20th%20%3Afirst%2Dchild%2C%20table%20tr%20td%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Atable%20tr%20th%20%3Alast%2Dchild%2C%20table%20tr%20td%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Aimg%20%7B%0Amax%2Dwidth%3A%20100%25%3B%20%7D%0Aspan%2Eframe%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%20%7D%0Aspan%2Eframe%20%3E%20span%20%7B%0Aborder%3A%201px%20solid%20%23dddddd%3B%0Adisplay%3A%20block%3B%0Afloat%3A%20left%3B%0Aoverflow%3A%20hidden%3B%0Amargin%3A%2013px%200%200%3B%0Apadding%3A%207px%3B%0Awidth%3A%20auto%3B%20%7D%0Aspan%2Eframe%20span%20img%20%7B%0Adisplay%3A%20block%3B%0Afloat%3A%20left%3B%20%7D%0Aspan%2Eframe%20span%20span%20%7B%0Aclear%3A%20both%3B%0Acolor%3A%20%23333333%3B%0Adisplay%3A%20block%3B%0Apadding%3A%205px%200%200%3B%20%7D%0Aspan%2Ealign%2Dcenter%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Aclear%3A%20both%3B%20%7D%0Aspan%2Ealign%2Dcenter%20%3E%20span%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Amargin%3A%2013px%20auto%200%3B%0Atext%2Dalign%3A%20center%3B%20%7D%0Aspan%2Ealign%2Dcenter%20span%20img%20%7B%0Amargin%3A%200%20auto%3B%0Atext%2Dalign%3A%20center%3B%20%7D%0Aspan%2Ealign%2Dright%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Aclear%3A%20both%3B%20%7D%0Aspan%2Ealign%2Dright%20%3E%20span%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Amargin%3A%2013px%200%200%3B%0Atext%2Dalign%3A%20right%3B%20%7D%0Aspan%2Ealign%2Dright%20span%20img%20%7B%0Amargin%3A%200%3B%0Atext%2Dalign%3A%20right%3B%20%7D%0Aspan%2Efloat%2Dleft%20%7B%0Adisplay%3A%20block%3B%0Amargin%2Dright%3A%2013px%3B%0Aoverflow%3A%20hidden%3B%0Afloat%3A%20left%3B%20%7D%0Aspan%2Efloat%2Dleft%20span%20%7B%0Amargin%3A%2013px%200%200%3B%20%7D%0Aspan%2Efloat%2Dright%20%7B%0Adisplay%3A%20block%3B%0Amargin%2Dleft%3A%2013px%3B%0Aoverflow%3A%20hidden%3B%0Afloat%3A%20right%3B%20%7D%0Aspan%2Efloat%2Dright%20%3E%20span%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Amargin%3A%2013px%20auto%200%3B%0Atext%2Dalign%3A%20right%3B%20%7D%0Acode%2C%20tt%20%7B%0Amargin%3A%200%202px%3B%0Apadding%3A%200%205px%3B%0Awhite%2Dspace%3A%20nowrap%3B%0Aborder%3A%201px%20solid%20%23eaeaea%3B%0Abackground%2Dcolor%3A%20%23f8f8f8%3B%0Aborder%2Dradius%3A%203px%3B%20%7D%0Apre%20code%20%7B%0Amargin%3A%200%3B%0Apadding%3A%200%3B%0Awhite%2Dspace%3A%20pre%3B%0Aborder%3A%20none%3B%0Abackground%3A%20transparent%3B%20%7D%0A%2Ehighlight%20pre%20%7B%0Abackground%2Dcolor%3A%20%23f8f8f8%3B%0Aborder%3A%201px%20solid%20%23cccccc%3B%0Afont%2Dsize%3A%2013px%3B%0Aline%2Dheight%3A%2019px%3B%0Aoverflow%3A%20auto%3B%0Apadding%3A%206px%2010px%3B%0Aborder%2Dradius%3A%203px%3B%20%7D%0Apre%20%7B%0Abackground%2Dcolor%3A%20%23f8f8f8%3B%0Aborder%3A%201px%20solid%20%23cccccc%3B%0Afont%2Dsize%3A%2013px%3B%0Aline%2Dheight%3A%2019px%3B%0Aoverflow%3A%20auto%3B%0Apadding%3A%206px%2010px%3B%0Aborder%2Dradius%3A%203px%3B%20%7D%0Apre%20code%2C%20pre%20tt%20%7B%0Abackground%2Dcolor%3A%20transparent%3B%0Aborder%3A%20none%3B%20%7D%0A" rel="stylesheet" type="text/css" /> +</head> +<body> +<h1 id="jlreq">jlreq</h1> +<h2>これは何?</h2> +<p><a href="https://www.w3.org/TR/jlreq/ja/">日本語組版処理の要件</a>の実装を試みる<a href="https://osdn.jp/projects/luatex-ja/wiki/FrontPage">LuaTeX-ja</a> / pLaTeX / upLaTeX用のクラスファイルと,それに必要なJFMの組み合わせです.</p> +<h2>提供されるもの</h2> +<p>クラスファイルjlreq.clsと,横書きLuaTeX-ja用のJFMであるjfm-jlreq.luaが用意されています.また,縦書きのJFMやpLaTeX / upLaTeX 用のJFMを生成するいくつかのスクリプトがあります.</p> +<h2>インストール</h2> +<p><code>make</code>で必要なJFMを生成してください.その後,</p> +<ul> +<li>*.tfm -> $TEXMF/fonts/tfm/public/jlreq</li> +<li>*.vf -> $TEXMF/fonts/vf/public/jlreq</li> +<li>jfm-jlreq.lua jfm-jlreqv.lua -> $TEXMF/tex/luatex/jlreq</li> +<li>jlreq.cls -> $TEXMF/tex/latex/jlreq</li> +</ul> +<p>と配置します.<code>make install</code>とすると,$TEXMF=$TEXMFHOMEとしてこのコピーを行います.</p> +<h2>使い方</h2> +<p>通常通り</p> +<pre><code>\documentclass{jlreq}</code></pre> +<p>とします.これで横書きのarticle相当の文書クラスとなります.エンジンは自動判定されますが,指定する場合はクラスオプションに<code>platex/uplatex/lualatex</code>のいずれかを渡してください.縦書きにするには<code>tate</code>オプションを渡します.また,reportやbook相当の文書クラスとするには,それぞれ<code>report</code>や<code>book</code>オプションを渡します.たとえば,縦書きの本を作成するには</p> +<pre><code>\documentclass[tate,book]{jlreq}</code></pre> +<p>とします.</p> +<p>その他,<code>oneside / twoside / onecolumn / twocolumn / titlepage / notitlepage / draft / final / openright / openany / leqno / fleqn</code>というよくあるオプションを受け付けます.</p> +<p>標準的な文書クラスと同じように中身を書くことができますが,次のような命令が追加 / 拡張されています.</p> +<h3 id="section"><code>\section</code></h3> +<p><code>\section*[running head]{見出し文字列}[副題]</code>というように,通常の書式に加えて副題を受け付けられるように拡張されています.その他,<code>\part</code>(articleのみ),<code>\chapter</code>(book/reportのみ),<code>\subsection</code>も副題を受け付けます.(<code>\subsubsection</code>も受け付けますが,汚い見た目になります.)</p> +<h3 id="sidenote"><code>\sidenote</code></h3> +<p>傍注(縦組みの場合は脚注)を出力します.デフォルトでは<code>\footnote</code>と同様の書式となりますが,クラスオプションに<code>sidenote_type=mark</code>が指定されている場合,その書式は<code>\sidenote{該当項目}{注}</code>となります.たとえば</p> +<pre><code>刊行できる\sidenote{原稿}{印刷などの方法により……}を入手する仕事である.</code></pre> +<p>とします.後の説明も参照してください.</p> +<p>デフォルトの基本版面では余白が少なく,実用にはならないかと思います.後の基本版面の設定を参考にしてください.</p> +<h3 id="endnote"><code>\endnote</code></h3> +<p>後注を指定します.<code>\footnote</code>と同様の書式です.デフォルトでは,注自身の出力は見出し直前に行われます.この動作はクラスオプションにより制御できます.また<code>\theendnotes</code>を実行するとその場に出力をします.</p> +<h3 id="warichu"><code>\warichu</code></h3> +<p>割注を出力します.行分割位置などは自動で計算されます.(複数回のコンパイルが必要.)<code>\warichu*</code>ではこれらの位置を手動で指定できます.書式は</p> +<p><code>\warichu*{(一行目前) & (一行目後)\\ (二行目前) & (二行目後)...}</code></p> +<p>です.<code>&</code>が省略されている場合は自動で調整されます.</p> +<h3 id="jlreqsetup"><code>\jlreqsetup</code></h3> +<p>設定用命令です.プリアンブルでしか使えません.文書に対する殆どの設定はクラスオプションにより行いますが,一部の設定はこの命令を通じて行います.</p> +<h3>その他</h3> +<ul> +<li>ルビは提供されません.<a href="https://github.com/zr-tex8r/PXrubrica">PXrubrica</a>またはluatexja-ruby(LuaTeX利用時のみ,LuaTeX-jaパッケージに付属)を使うと良いかと思います.</li> +<li><p>日本語組版処理の要件2.3.2.dによれば,二段組の最後のページの各段の行数は揃えることが望ましいとされていますが,この処理は行われません.<code>nidanfloat</code>パッケージを使い,</p> +<pre><code>\usepackage[balance]{nidanfloat}</code></pre> +<p>とするとこの処理が行われます.ただし,最終ページでの<code>\newpage</code>や<code>\clearpage</code>が正しく動作しません.詳しくは<code>nidanfloat</code>パッケージのマニュアルをご覧ください.</p></li> +</ul> +<h2>各種設計</h2> +<p>設計はクラスオプションまたは<code>\jlreqsetup</code>によりkeyval形式で行います.以下では次の用法を使います.</p> +<ul> +<li><code>[A/B]</code>: AまたはBです.<code>[A/B/C]</code>等も同様.</li> +<li><code><寸法></code>: TeXが認識する寸法です.簡単な式(10pt+10ptのような)を使うこともできます.また,場合によっては次のような特殊な値を使うこともできます. +<ul> +<li><code>Q</code>: 0.25mmと解釈されます.</li> +<li><code>zh</code>, <code>zw</code>: 全角幅として解釈されます.</li> +</ul></li> +</ul> +<p>たとえば<code>Q</code>が利用可能な場合は<code><寸法;Q></code>のように記述します.</p> +<h3>基本版面</h3> +<p>すべてクラスファイルへのオプションです.</p> +<ul> +<li><code>paper=[<紙サイズ名>/{<寸法>,<寸法>}]</code>:紙サイズです.紙サイズ名はa0からa10,b0からb10,c2からc8を指定できます.B列はJIS B列です.また,<code>{<縦>,<横>}</code>と直接寸法を指定することもできます.</li> +<li><code>fontsize=<寸法;Q></code> : フォントサイズ.デフォルトは10pt.</li> +<li><code>line_length=<寸法;zw,zh></code> : 一行の長さ.デフォルトは紙の縦幅の0.75倍.実際の値は一文字の長さの整数倍になるように補正されます.</li> +<li><code>number_of_lines=<整数値></code> : 一ページの行数.デフォルトは紙の横幅の0.75倍になるような値.</li> +<li><code>gutter=<寸法;zh,zw></code> : のどの余白の大きさ. +<ul> +<li><code>tate</code>無指定時は奇数ページ左,偶数ページ右の余白</li> +<li><code>tate</code>指定時は奇数ページ右,偶数ページ左の余白</li> +<li><code>twoside</code>が指定されていない時は,常に奇数ページ扱いで余白が設定される</li> +</ul></li> +<li><code>head_space=<寸法;zh,zw></code> : 天の空き量.デフォルトは中央寄せになるような値.</li> +<li><code>foot_space=<寸法;zh,zw></code> : 地の空き量.デフォルトは中央寄せになるような値.</li> +<li><code>baselineskip=<寸法;Q,zh,zw></code> : 行送り.デフォルトはfontsizeの1.7倍.</li> +<li><code>linegap=<寸法;Q,zh,zw></code> : 行間.</li> +<li><code>headfoot_sidemargin=<寸法;zw,zh></code>:柱やノンブルの左右の空き.</li> +<li><code>column_gap=<寸法;zw,zh></code>: 段間(twocolumn指定時のみ).</li> +</ul> +<h3>組み方</h3> +<ul> +<li><code>open_bracket_pos=[zenkaku_tentsuki/zenkakunibu_nibu/nibu_tentsuki]</code>: 始め括弧が行頭に来た際の配置方法を指定します.それぞれ段落開始全角折り返し行頭天付き(デフォルト),段落開始全角二分折り返し行頭二分,段落開始二分折り返し行頭天付きを意味します.</li> +<li><code>hanging_punctuation</code>: ぶら下げ組をします.</li> +</ul> +<h3>注関係</h3> +<ul> +<li><code>reference_mark=[inline/interlinear]</code>: 合印の配置方法を指定します.<code>inline</code>にすると該当項目の後ろの行中に配置します.<code>interlinear</code>を指定すると該当項目の上(横組)または右(縦組)に配置します.</li> +<li><p><code>sidenote_type=[number/symbol]</code>: 傍注と本文との対応の方法を指定します.<code>number</code>が規定で,注の位置に通し番号が入り,それにより対応が示されます.<code>symbol</code>とすると,注の位置に特定の記号が入り,また注がついている単語が強調されます.ここに入る記号と単語の強調は<code>\jlreqsetup</code>に次を渡すことで指定します.</p> +<ul> +<li><code>sidenote_symbol</code>: 注の位置に入る記号.デフォルト*</li> +<li><code>sidenote_keyword_font</code>: 注のついている単語のフォント命令.デフォルトは無し(強調しない)</li> +</ul></li> +<li><code>sidenote_width=<寸法;zh,zw></code>: 傍注の幅を指定します.基本版面の設定に合わせて設定してください.</li> +<li><p><code>endnote_position=[headings/paragraph/{_<見出し名1>,_<見出し名2>,...}]</code>:後注の出力場所を指定します.<code>headings</code>は各見出しの直前(デフォルト),<code>paragraph</code>は改段落の際に出力します.また,<code>endnote_position={_chapter,_section}</code>とすると,<code>\chapter</code>と<code>\section</code>の直前に出力します.</p></li> +</ul> +<h3>キャプション</h3> +<p>図表のキャプションを<code>\jlreqsetup</code>で変更できます.</p> +<ul> +<li><code>caption_font=<命令></code>: キャプション自身のフォントを指定します.</li> +<li><code>caption_label_font=<命令></code>: キャプションのラベルのフォントを指定します.</li> +</ul> +<h2>見出し</h2> +<p>見出しの設定は,<code>\Declare***Heading</code>という命令で行います(***には見出しの種類に応じた文字列が入る).書式はすべて</p> +<pre><code>\Declare****Heading{<命令名>}{<レベル>}{<設定>}</code></pre> +<p>となっています.また,<code>\New***Heading</code>,<code>\Renew***Heading</code>,<code>\Provide***Heading</code>も同時に用意されます.それぞれ<code>\newcommand</code>,<code>\renewcommand</code>,<code>\providecommand</code>に対応した動きをします.</p> +<h3>扉見出し</h3> +<p><code>\DeclareTobiraHeading</code>で作成します.通常のクラスファイルにおける<code>\section</code>等と同じ書式の命令ができます.設定は以下の通り.</p> +<ul> +<li><code>type=[han/naka]</code>: <code>han</code>だと半扉見出しを,<code>naka</code>だと中扉見出しを作ります.</li> +<li><code>pagestyle=<ページスタイル></code>: 見出し箇所のページスタイルを指定します.</li> +<li><code>label_format=<書式></code>: ラベルを出力する命令を指定します.たとえば<code>label_format={第\thechapter 章}</code>のように指定します.</li> +<li><code>format=<書式></code>: 実際に出力する書式を指定します.<code>format={\null\vfill {\Huge\bfseries #1#2}}</code>のようにします.<code>#1</code>はラベルに,<code>#2</code>は見出し文字列に置き換えられます.</li> +</ul> +<h3>別行見出し</h3> +<p><code>\DeclareBlockHeading</code>で作成します.<code>\<命令名>*[running head]{見出し文字列}[副題]</code>という書式の命令を作成します.設定は以下の通り.</p> +<ul> +<li><code>font=<命令></code>: 見出しのフォントを指定します.</li> +<li><code>indent=<整数値></code> 見出し全体の字下げ量を全角文字数で指定します.</li> +<li><code>subtitle_font=<命令></code>: 副題のフォントを指定します.</li> +<li><code>pagebreak=[clearpage/cleardoublepage/clearcolumn/nariyuki]</code>: 見出し直前の改ページを指定します.それぞれ,改ページ,改丁,改段,なりゆきです.</li> +</ul> +<p>また,行取りの指定を行うことができます.次のいずれかの方法で行います.</p> +<ul> +<li>行数を指定し,その中央に配置する.<code>lines=<整数値></code>により行数を指定します.<code>before_lines=<整数値></code>や<code>after_lines=<整数値></code>により,さらに前後に追加する行数を指定します.たとえば<code>lines=3,after_lines=1</code>とすれば,四行の中に配置され,前の空きよりも後ろの空きの方が一行分大きくなります.</li> +<li>行数と,前後いずれかの空きを指定します.<code>lines=<整数値></code>により行数を,<code>before_space=<寸法></code>または<code>after_space=<寸法></code>のいずれかの指定によりそれぞれ前またら後ろの空きを指定します.</li> +<li>前後の空きを指定します.<code>before_space=<寸法></code>および<code>after_space=<寸法></code>を指定します.</li> +</ul> +<h3>同行見出し</h3> +<p><code>\DeclareRuninHeading</code>で作成します.<code>\section</code>と同様の書式の命令が作成されます.設定は以下の通り.</p> +<ul> +<li><code>font=<命令></code>: 見出しのフォントを指定します.</li> +<li><code>indent=<整数値></code> 見出し文字列全体の字下げ量を全角文字数で指定します.</li> +</ul> +<h3>窓見出し</h3> +<p><code>\DeclareCutinHeading</code>で作成します.<code>\<命令名>{見出し文字列}</code>という書式の命令を作成します.設定は以下の通り.</p> +<ul> +<li><code>font=<命令></code>: 見出しのフォントを指定します.</li> +<li><code>indent=<整数値></code>: 見出し全体の字下げ量を全角文字数で指定します.</li> +<li><code>onelinemax=<寸法></code>, <code>twolinemax=<寸法></code>: 見出し文字列の長さが<code>onelinemax</code>以下ならば一行で,<code>twolinemax</code>以下ならば二行で窓見出しを出力します.それ以上の場合は三行です.デフォルトはそれぞれ6文字,20文字の長さ.</li> +</ul> +<h3 id="modifyheading"><code>\ModifyHeading</code></h3> +<p>既に(上のどれかを使い)定義された見出し命令の設定を変更します.たとえば</p> +<pre><code>\ModifyHeading{section}{lines=10}</code></pre> +<p>とすると,<code>\section</code>のフォントなどの設定はそのままに,行取りのみが10行に変更されます.見出しの種類を変更することはできません.</p> +<h2>ページスタイル</h2> +<pre><code>\DeclarePageStyle{<ページスタイル名>}{<設定>}</code></pre> +<p>によりページスタイルを定義することができます.設定は以下の通り.</p> +<ul> +<li><code>nombre_position</code>,<code>running_head_position</code>: ノンブルと柱の位置を指定します.<code>top-left</code>のように指定できます.<code>center/left/right/top/bottom</code>が使えます.</li> +<li><code>nombre=<書式></code>: 出力するノンブルを指定します.デフォルトは<code>\thepage</code>.</li> +<li><code>odd_running_head=<書式></code>,<code>even_running_head=<書式></code>:それぞれ奇数ページ,偶数ページの柱を指定します.<code>_section</code>のように<code>_</code>から始まる名前を指定すると,対応する見出しを出力します.(<code>_section</code>だと現在の<code>\section</code>を出力する.)</li> +</ul> +<p><code>\ModifyPageStyle</code>により既存のページスタイルを改変することが可能です.</p> +<h2 id="-1">その他</h2> +<ul> +<li>クラスオプション<code>jlreq_warnings</code>を渡されると,日本語組版処理の要件に反する設定が行われた場合に警告がされます.</li> +</ul> +<h2>ライセンス</h2> +<p>このパッケージは二条項BSDライセンスの元で配布されています.詳しくは<a href="LICENSE" class="uri">LICENSE</a>をご覧ください.</p> +<h2>履歴</h2> +<ul> +<li>2017-02-08 +<ul> +<li>最初のバージョン.</li> +</ul></li> +<li>2017-02-17 +<ul> +<li>いくつかバグを修正.</li> +<li>クラスオプション/<code>\jlreqsetup</code>にいくつかのキーを追加/変更.</li> +<li><code>abstract</code>環境を実装.</li> +<li>パッケージを読み込んでいるだけのはやめた.</li> +</ul></li> +</ul> +</body> +</html> diff --git a/Master/texmf-dist/doc/latex/jlreq/README-ja.md b/Master/texmf-dist/doc/latex/jlreq/README-ja.md index eb2d4a810e0..f491a116eaa 100644 --- a/Master/texmf-dist/doc/latex/jlreq/README-ja.md +++ b/Master/texmf-dist/doc/latex/jlreq/README-ja.md @@ -1,185 +1,193 @@ -# jlreq
-
-## これは何?
-[日本語組版処理の要件](https://www.w3.org/TR/jlreq/ja/)の実装を試みる[LuaTeX-ja](https://osdn.jp/projects/luatex-ja/wiki/FrontPage) / pLaTeX / upLaTeX用のクラスファイルと,それに必要なJFMの組み合わせです.
-
-## 提供されるもの
-クラスファイルjlreq.clsと,横書きLuaTeX-ja用のJFMであるjfm-jlreq.luaが用意されています.また,縦書きのJFMやpLaTeX / upLaTeX 用のJFMを生成するいくつかのスクリプトがあります.
-
-## インストール
-`make`で必要なJFMを生成してください.その後,
-
-* *.tfm -> $TEXMF/fonts/tfm/public/jlreq
-* *.vf -> $TEXMF/fonts/vf/public/jlreq
-* jfm-jlreq.lua jfm-jlreqv.lua -> $TEXMF/tex/luatex/jlreq
-* jlreq.cls -> $TEXMF/tex/latex/jlreq
-
-と配置します.`make install`とすると,$TEXMF=$TEXMFHOMEとしてこのコピーを行います.
-
-## 使い方
-通常通り
-````
-\documentclass{jlreq}
-````
-とします.これで横書きのarticle相当の文書クラスとなります.エンジンは自動判定されますが,指定する場合はクラスオプションに`platex/uplatex/lualatex`のいずれかを渡してください.縦書きにするには`tate`オプションを渡します.また,reportやbook相当の文書クラスとするには,それぞれ`report`や`book`オプションを渡します.たとえば,縦書きの本を作成するには
-````
-\documentclass[tate,book]{jlreq}
-````
-とします.
-
-その他,`oneside / twoside / onecolumn / twocolumn / titlepage / notitlepage / draft / final / openright / openany / leqno / fleqn`というよくあるオプションを受け付けます.
-
-標準的な文書クラスと同じように中身を書くことができますが,次のような命令が追加 / 拡張されています.
-
-### `\section`
-`\section*[running head]{見出し文字列}[副題]`というように,通常の書式に加えて副題を受け付けられるように拡張されています.その他,`\part`(articleのみ),`\chapter`(book/reportのみ),`\subsection`も副題を受け付けます.(`\subsubsection`も受け付けますが,汚い見た目になります.)
-
-### `\sidenote`
-傍注(縦組みの場合は脚注)を出力します.デフォルトでは`\footnote`と同様の書式となりますが,クラスオプションに`sidenote_type=mark`が指定されている場合,その書式は`\sidenote{該当項目}{注}`となります.たとえば
-````
-刊行できる\sidenote{該当項目}{原稿とは,印刷などの方法により……}を入手する仕事である.
-````
-とします.後の説明も参照してください.
-
-デフォルトの基本反面では余白が少なく,実用にはならないかと思います.後の基本反面の設定を参考にしてください.
-
-### `\endnote`
-後注を指定します.`\footnote`と同様の書式です.デフォルトでは,注自身の出力は見出し直前に行われます.この動作はクラスオプションにより制御できます.また`\theendnotes`を実行するとその場に出力をします.
-
-### `\warichu`
-割注を出力します.行分割位置などは自動で計算されます.(複数回のコンパイルが必要.)`\warichu*`ではこれらの位置を手動で指定できます.書式は
-
-``\warichu*{(一行目前) & (一行目後)\\ (二行目前) & (二行目後)...}``
-
-です.`&`が省略されている場合は自動で調整されます.
-
-### `\jlreqsetup`
-設定用命令です.プリアンブルでしか使えません.文書に対する殆どの設定はクラスオプションにより行いますが,一部の設定はこの命令を通じて行います.
-
-
-## 各種設計
-設計はクラスオプションまたは`\jlreqsetup`によりkeyval形式で行います.以下では次の用法を使います.
-
-* `[A/B]`: AまたはBです.`[A/B/C]`等も同様.
-* `<寸法>`: TeXが認識する寸法です.簡単な式(10pt+10ptのような)を使うこともできます.また,場合によっては次のような特殊な値を使うこともできます.
- * `Q`: 0.25mmと解釈されます.
- * `zh`, `zw`: 全角幅として解釈されます.
-
-たとえば`Q`が利用可能な場合は`<寸法;Q>`のように記述します.
-
-
-### 基本版面
-すべてクラスファイルへのオプションです.
-
-* `paper=[<紙サイズ名>/{<寸法>,<寸法>}]`:紙サイズです.紙サイズ名はa0からa10,b0からb10,c2からc8を指定できます.B列はJIS B列です.また,`{<縦>,<横>}`と直接寸法を指定することもできます.
-* `fontsize=<寸法;Q>` : フォントサイズ.デフォルトは10pt.
-* `line_length=<寸法;zw,zh>` : 一行の長さ.デフォルトは紙の縦幅の0.75倍.実際の値は一文字の長さの整数倍になるように補正されます.
-* `number_of_lines=<整数値>` : 一ページの行数.デフォルトは紙の横幅の0.75倍になるような値.
-* `gutter=<寸法;zh,zw>` : のどの余白の大きさ.(`tate`や`twoside`が指定されているかに応じて少し効果が変わる.)
-* `head_space=<寸法;zh,zw>` : 天の空き量.デフォルトは中央寄せになるような値.
-* `foot_space=<寸法;zh,zw>` : 地の空き量.デフォルトは中央寄せになるような値.
-* `baselineskip=<寸法;Q,zh,zw>` : 行送り.デフォルトはfontsizeの1.7倍.
-* `linegap=<寸法;Q,zh,zw>` : 行間.
-* `headfoot_sidemargin=<寸法;zw,zh>`:柱やノンブルの左右の空き.
-* `column_gap=<寸法;zw,zh>`: 段間(twocolumn指定時のみ).
-
-### 組み方
-* `open_bracket_pos=[zenkaku_tentsuki/zenkakunibu_nibu/nibu_tentsuki]`: 始め括弧が行頭に来た際の配置方法を指定します.それぞれ段落開始全角折り返し行頭天付き(デフォルト),段落開始全角二分折り返し行頭二分,段落開始二分折り返し行頭天付きを意味します.
-* `hanging_punctuation`: ぶら下げ組をします.
-
-### 注関係
-* `reference_mark=[inline/interlinear]`: 合印の配置方法を指定します.`inline`にすると該当項目の後ろの行中に配置します.`interlinear`を指定すると該当項目の上(横組)または右(縦組)に配置します.
-* `sidenote_type=[number/mark]`: 傍注と本文との対応の方法を指定します.`mark`は注のついている該当項目により指定します.`mark`が指定されている場合は,さらに該当項目の装飾方法を指定できます.これは`\jlreqsetup`に
-````
-sidenote_mark={
- mark=<文字列>,
- headingfont=<命令>
-}
-````
-を渡すことで行います.`mark`により指定された文字列が該当項目につき,また`headingfont`で指定された命令で装飾されます.デフォルトは
-````
-sidenote_mark={
- mark={*},
- headingfont={\gtfamily\bfseries}
-}
-````
-です.
-* `sidenote_width=<寸法;zh,zw>`: 傍注の幅を指定します.基本版面の設定に合わせて設定してください.
-* `endnote_position=[_headings/_paragraph/{<見出し名1>,<見出し名2>,...}]`:後注の出力場所を指定します.`_headings`は各見出しの直前(デフォルト),`_paragraph`は改段落の際に出力します.また,`endnote_position={chapter,section}`とすると,`\chapter`と`\section`の直前に出力します.
-
-## 見出し
-見出しの設定は,`\Declare***Heading`という命令で行います(***には見出しの種類に応じた文字列が入る).書式はすべて
-
-```
-\Declare****Heading{<命令名>}{<レベル>}{<設定>}
-```
-
-となっています.また,`\New***Heading`,`\Renew***Heading`,`\Provide***Heading`も同時に用意されます.それぞれ`\newcommand`,`\renewcommand`,`\providecommand`に対応した動きをします.
-
-### 扉見出し
-`\DeclareTobiraHeading`で作成します.通常のクラスファイルにおける`\section`等と同じ書式の命令ができます.設定は以下の通り.
-
-* `type=[han/naka]`: `han`だと半扉見出しを,`naka`だと中扉見出しを作ります.
-* `pagestyle=<ページスタイル>`: 見出し箇所のページスタイルを指定します.
-* `label_format=<書式>`: ラベルを出力する命令を指定します.たとえば`label_format={第\thechapter 章}`のように指定します.
-* `format=<書式>`: 実際に出力する書式を指定します.`format={\null\vfill {\Huge\bfseries #1#2}}`のようにします.`#1`はラベルに,`#2`は見出し文字列に置き換えられます.
-
-### 別行見出し
-`\DeclareBlockHeading`で作成します.`\<命令名>*[running head]{見出し文字列}[副題]`という書式の命令を作成します.設定は以下の通り.
-
-* `font=<命令>`: 見出しのフォントを指定します.
-* `indent=<整数値>` 見出し全体の字下げ量を全角文字数で指定します.
-* `subtitle_font=<命令>`: 副題のフォントを指定します.
-* `pagebreak=[clearpage/cleardoublepage/clearcolumn/nariyuki]`: 見出し直前の改ページを指定します.それぞれ,改ページ,改丁,改段,なりゆきです.
-
-また,行取りの指定を行うことができます.次のいずれかの方法で行います.
-
-* 行数を指定し,その中央に配置する.`lines=<整数値>`により行数を指定します.`before_lines=<整数値>`や`after_lines=<整数値>`により,さらに前後に追加する行数を指定します.たとえば`lines=3,after_lines=1`とすれば,四行の中に配置され,前の空きよりも後ろの空きの方が一行分大きくなります.
-* 行数と,前後いずれかの空きを指定します.`lines=<整数値>`により行数を,`before_space=<寸法>`または`after_space=<寸法>`のいずれかの指定によりそれぞれ前またら後ろの空きを指定します.
-* 前後の空きを指定します.`before_space=<寸法>`および`after_space=<寸法>`を指定します.
-
-### 同行見出し
-`\DeclareRuninHeading`で作成します.`\section`と同様の書式の命令が作成されます.設定は以下の通り.
-
-* `font=<命令>`: 見出しのフォントを指定します.
-* `indent=<整数値>` 見出し文字列全体の字下げ量を全角文字数で指定します.
-
-### 窓見出し
-`\DeclareCutinHeading`で作成します.`\<命令名>{見出し文字列}`という書式の命令を作成します.設定は以下の通り.
-
-* `font=<命令>`: 見出しのフォントを指定します.
-* `indent=<整数値>`: 見出し全体の字下げ量を全角文字数で指定します.
-* `onelinemax=<寸法>`, `twolinemax=<寸法>`: 見出し文字列の長さが`onelinemax`以下ならば一行で,`twolinemax`以下ならば二行で窓見出しを出力します.それ以上の場合は三行です.デフォルトはそれぞれ6文字,20文字の長さ.
-
-### `\ModifyHeading`
-既に(上のどれかを使い)定義された見出し命令の設定を変更します.たとえば
-
-```
-\ModifyHeading{section}{lines=10}
-````
-
-とすると,`\section`のフォントなどの設定はそのままに,行取りのみが10行に変更されます.見出しの種類を変更することはできません.
-
-## ページスタイル
-
-``\DeclarePageStyle{<ページスタイル名>}{<設定>}``
-
-によりページスタイルを定義することができます.設定は以下の通り.
-
-* `nombre-position`,`running_head_position`: ノンブルと柱の位置を指定します.`top-left`のように指定できます.`center/left/right/top/bottom`が使えます.
-* `nombre=<書式>`: 出力するノンブルを指定します.デフォルトは`\thepage`.
-* `odd_running_head=<書式>`,`even_running_head=<書式>`:それぞれ奇数ページ,偶数ページの柱を指定します.`_section`のように`_`から始まる名前を指定すると,対応する見出しを出力します.(`_section`だと現在の`\section`を出力する.)
-
-`\ModifyPageStyle`により既存のページスタイルを改変することが可能です.
-
-## その他
-* クラスオプション`jlreq_warnings`を渡されると,日本語組版処理の要件に反する設定が行われた場合に警告がされます.
-
-## ライセンス
-このパッケージは二条項BSDライセンスの元で配布されています.詳しくは[LICENSE](LICENSE)をご覧ください.
-
-## 履歴
-## CHANGELOG
-* 2017-02-08
- - 最初のバージョン.
-
+# jlreq + +## これは何? +[日本語組版処理の要件](https://www.w3.org/TR/jlreq/ja/)の実装を試みる[LuaTeX-ja](https://osdn.jp/projects/luatex-ja/wiki/FrontPage) / pLaTeX / upLaTeX用のクラスファイルと,それに必要なJFMの組み合わせです. + +## 提供されるもの +クラスファイルjlreq.clsと,横書きLuaTeX-ja用のJFMであるjfm-jlreq.luaが用意されています.また,縦書きのJFMやpLaTeX / upLaTeX 用のJFMを生成するいくつかのスクリプトがあります. + +## インストール +`make`で必要なJFMを生成してください.その後, + +* *.tfm -> $TEXMF/fonts/tfm/public/jlreq +* *.vf -> $TEXMF/fonts/vf/public/jlreq +* jfm-jlreq.lua jfm-jlreqv.lua -> $TEXMF/tex/luatex/jlreq +* jlreq.cls -> $TEXMF/tex/latex/jlreq + +と配置します.`make install`とすると,$TEXMF=$TEXMFHOMEとしてこのコピーを行います. + +## 使い方 +通常通り +```` +\documentclass{jlreq} +```` +とします.これで横書きのarticle相当の文書クラスとなります.エンジンは自動判定されますが,指定する場合はクラスオプションに`platex/uplatex/lualatex`のいずれかを渡してください.縦書きにするには`tate`オプションを渡します.また,reportやbook相当の文書クラスとするには,それぞれ`report`や`book`オプションを渡します.たとえば,縦書きの本を作成するには +```` +\documentclass[tate,book]{jlreq} +```` +とします. + +その他,`oneside / twoside / onecolumn / twocolumn / titlepage / notitlepage / draft / final / openright / openany / leqno / fleqn`というよくあるオプションを受け付けます. + +標準的な文書クラスと同じように中身を書くことができますが,次のような命令が追加 / 拡張されています. + +### `\section` +`\section*[running head]{見出し文字列}[副題]`というように,通常の書式に加えて副題を受け付けられるように拡張されています.その他,`\part`(articleのみ),`\chapter`(book/reportのみ),`\subsection`も副題を受け付けます.(`\subsubsection`も受け付けますが,汚い見た目になります.) + +### `\sidenote` +傍注(縦組みの場合は脚注)を出力します.デフォルトでは`\footnote`と同様の書式となりますが,クラスオプションに`sidenote_type=mark`が指定されている場合,その書式は`\sidenote{該当項目}{注}`となります.たとえば +```` +刊行できる\sidenote{原稿}{印刷などの方法により……}を入手する仕事である. +```` +とします.後の説明も参照してください. + +デフォルトの基本版面では余白が少なく,実用にはならないかと思います.後の基本版面の設定を参考にしてください. + +### `\endnote` +後注を指定します.`\footnote`と同様の書式です.デフォルトでは,注自身の出力は見出し直前に行われます.この動作はクラスオプションにより制御できます.また`\theendnotes`を実行するとその場に出力をします. + +### `\warichu` +割注を出力します.行分割位置などは自動で計算されます.(複数回のコンパイルが必要.)`\warichu*`ではこれらの位置を手動で指定できます.書式は + +``\warichu*{(一行目前) & (一行目後)\\ (二行目前) & (二行目後)...}`` + +です.`&`が省略されている場合は自動で調整されます. + +### `\jlreqsetup` +設定用命令です.プリアンブルでしか使えません.文書に対する殆どの設定はクラスオプションにより行いますが,一部の設定はこの命令を通じて行います. + +### その他 +* ルビは提供されません.[PXrubrica](https://github.com/zr-tex8r/PXrubrica)またはluatexja-ruby(LuaTeX利用時のみ,LuaTeX-jaパッケージに付属)を使うと良いかと思います. +* 日本語組版処理の要件2.3.2.dによれば,二段組の最後のページの各段の行数は揃えることが望ましいとされていますが,この処理は行われません.`nidanfloat`パッケージを使い, +```` +\usepackage[balance]{nidanfloat} +```` +とするとこの処理が行われます.ただし,最終ページでの`\newpage`や`\clearpage`が正しく動作しません.詳しくは`nidanfloat`パッケージのマニュアルをご覧ください. + +## 各種設計 +設計はクラスオプションまたは`\jlreqsetup`によりkeyval形式で行います.以下では次の用法を使います. + +* `[A/B]`: AまたはBです.`[A/B/C]`等も同様. +* `<寸法>`: TeXが認識する寸法です.簡単な式(10pt+10ptのような)を使うこともできます.また,場合によっては次のような特殊な値を使うこともできます. + * `Q`: 0.25mmと解釈されます. + * `zh`, `zw`: 全角幅として解釈されます. + +たとえば`Q`が利用可能な場合は`<寸法;Q>`のように記述します. + + +### 基本版面 +すべてクラスファイルへのオプションです. + +* `paper=[<紙サイズ名>/{<寸法>,<寸法>}]`:紙サイズです.紙サイズ名はa0からa10,b0からb10,c2からc8を指定できます.B列はJIS B列です.また,`{<縦>,<横>}`と直接寸法を指定することもできます. +* `fontsize=<寸法;Q>` : フォントサイズ.デフォルトは10pt. +* `line_length=<寸法;zw,zh>` : 一行の長さ.デフォルトは紙の縦幅の0.75倍.実際の値は一文字の長さの整数倍になるように補正されます. +* `number_of_lines=<整数値>` : 一ページの行数.デフォルトは紙の横幅の0.75倍になるような値. +* `gutter=<寸法;zh,zw>` : のどの余白の大きさ. + - `tate`無指定時は奇数ページ左,偶数ページ右の余白 + - `tate`指定時は奇数ページ右,偶数ページ左の余白 + - `twoside`が指定されていない時は,常に奇数ページ扱いで余白が設定される +* `head_space=<寸法;zh,zw>` : 天の空き量.デフォルトは中央寄せになるような値. +* `foot_space=<寸法;zh,zw>` : 地の空き量.デフォルトは中央寄せになるような値. +* `baselineskip=<寸法;Q,zh,zw>` : 行送り.デフォルトはfontsizeの1.7倍. +* `linegap=<寸法;Q,zh,zw>` : 行間. +* `headfoot_sidemargin=<寸法;zw,zh>`:柱やノンブルの左右の空き. +* `column_gap=<寸法;zw,zh>`: 段間(twocolumn指定時のみ). + +### 組み方 +* `open_bracket_pos=[zenkaku_tentsuki/zenkakunibu_nibu/nibu_tentsuki]`: 始め括弧が行頭に来た際の配置方法を指定します.それぞれ段落開始全角折り返し行頭天付き(デフォルト),段落開始全角二分折り返し行頭二分,段落開始二分折り返し行頭天付きを意味します. +* `hanging_punctuation`: ぶら下げ組をします. + +### 注関係 +* `reference_mark=[inline/interlinear]`: 合印の配置方法を指定します.`inline`にすると該当項目の後ろの行中に配置します.`interlinear`を指定すると該当項目の上(横組)または右(縦組)に配置します. +* `sidenote_type=[number/symbol]`: 傍注と本文との対応の方法を指定します.`number`が規定で,注の位置に通し番号が入り,それにより対応が示されます.`symbol`とすると,注の位置に特定の記号が入り,また注がついている単語が強調されます.ここに入る記号と単語の強調は`\jlreqsetup`に次を渡すことで指定します. + + - `sidenote_symbol`: 注の位置に入る記号.デフォルト* + - `sidenote_keyword_font`: 注のついている単語のフォント命令.デフォルトは無し(強調しない) + +* `sidenote_width=<寸法;zh,zw>`: 傍注の幅を指定します.基本版面の設定に合わせて設定してください. +* `endnote_position=[headings/paragraph/{_<見出し名1>,_<見出し名2>,...}]`:後注の出力場所を指定します.`headings`は各見出しの直前(デフォルト),`paragraph`は改段落の際に出力します.また,`endnote_position={_chapter,_section}`とすると,`\chapter`と`\section`の直前に出力します. + +### キャプション +図表のキャプションを`\jlreqsetup`で変更できます. +* `caption_font=<命令>`: キャプション自身のフォントを指定します. +* `caption_label_font=<命令>`: キャプションのラベルのフォントを指定します. + + +## 見出し +見出しの設定は,`\Declare***Heading`という命令で行います(***には見出しの種類に応じた文字列が入る).書式はすべて + +``` +\Declare****Heading{<命令名>}{<レベル>}{<設定>} +``` + +となっています.また,`\New***Heading`,`\Renew***Heading`,`\Provide***Heading`も同時に用意されます.それぞれ`\newcommand`,`\renewcommand`,`\providecommand`に対応した動きをします. + +### 扉見出し +`\DeclareTobiraHeading`で作成します.通常のクラスファイルにおける`\section`等と同じ書式の命令ができます.設定は以下の通り. + +* `type=[han/naka]`: `han`だと半扉見出しを,`naka`だと中扉見出しを作ります. +* `pagestyle=<ページスタイル>`: 見出し箇所のページスタイルを指定します. +* `label_format=<書式>`: ラベルを出力する命令を指定します.たとえば`label_format={第\thechapter 章}`のように指定します. +* `format=<書式>`: 実際に出力する書式を指定します.`format={\null\vfill {\Huge\bfseries #1#2}}`のようにします.`#1`はラベルに,`#2`は見出し文字列に置き換えられます. + +### 別行見出し +`\DeclareBlockHeading`で作成します.`\<命令名>*[running head]{見出し文字列}[副題]`という書式の命令を作成します.設定は以下の通り. + +* `font=<命令>`: 見出しのフォントを指定します. +* `indent=<整数値>` 見出し全体の字下げ量を全角文字数で指定します. +* `subtitle_font=<命令>`: 副題のフォントを指定します. +* `pagebreak=[clearpage/cleardoublepage/clearcolumn/nariyuki]`: 見出し直前の改ページを指定します.それぞれ,改ページ,改丁,改段,なりゆきです. + +また,行取りの指定を行うことができます.次のいずれかの方法で行います. + +* 行数を指定し,その中央に配置する.`lines=<整数値>`により行数を指定します.`before_lines=<整数値>`や`after_lines=<整数値>`により,さらに前後に追加する行数を指定します.たとえば`lines=3,after_lines=1`とすれば,四行の中に配置され,前の空きよりも後ろの空きの方が一行分大きくなります. +* 行数と,前後いずれかの空きを指定します.`lines=<整数値>`により行数を,`before_space=<寸法>`または`after_space=<寸法>`のいずれかの指定によりそれぞれ前またら後ろの空きを指定します. +* 前後の空きを指定します.`before_space=<寸法>`および`after_space=<寸法>`を指定します. + +### 同行見出し +`\DeclareRuninHeading`で作成します.`\section`と同様の書式の命令が作成されます.設定は以下の通り. + +* `font=<命令>`: 見出しのフォントを指定します. +* `indent=<整数値>` 見出し文字列全体の字下げ量を全角文字数で指定します. + +### 窓見出し +`\DeclareCutinHeading`で作成します.`\<命令名>{見出し文字列}`という書式の命令を作成します.設定は以下の通り. + +* `font=<命令>`: 見出しのフォントを指定します. +* `indent=<整数値>`: 見出し全体の字下げ量を全角文字数で指定します. +* `onelinemax=<寸法>`, `twolinemax=<寸法>`: 見出し文字列の長さが`onelinemax`以下ならば一行で,`twolinemax`以下ならば二行で窓見出しを出力します.それ以上の場合は三行です.デフォルトはそれぞれ6文字,20文字の長さ. + +### `\ModifyHeading` +既に(上のどれかを使い)定義された見出し命令の設定を変更します.たとえば +``` +\ModifyHeading{section}{lines=10} +```` +とすると,`\section`のフォントなどの設定はそのままに,行取りのみが10行に変更されます.見出しの種類を変更することはできません. + +## ページスタイル + +```` +\DeclarePageStyle{<ページスタイル名>}{<設定>} +```` +によりページスタイルを定義することができます.設定は以下の通り. + +* `nombre_position`,`running_head_position`: ノンブルと柱の位置を指定します.`top-left`のように指定できます.`center/left/right/top/bottom`が使えます. +* `nombre=<書式>`: 出力するノンブルを指定します.デフォルトは`\thepage`. +* `odd_running_head=<書式>`,`even_running_head=<書式>`:それぞれ奇数ページ,偶数ページの柱を指定します.`_section`のように`_`から始まる名前を指定すると,対応する見出しを出力します.(`_section`だと現在の`\section`を出力する.) + +`\ModifyPageStyle`により既存のページスタイルを改変することが可能です. + +## その他 +* クラスオプション`jlreq_warnings`を渡されると,日本語組版処理の要件に反する設定が行われた場合に警告がされます. + +## ライセンス +このパッケージは二条項BSDライセンスの元で配布されています.詳しくは[LICENSE](LICENSE)をご覧ください. + +## 履歴 +* 2017-02-08 + - 最初のバージョン. +* 2017-02-17 + - いくつかバグを修正. + - クラスオプション/`\jlreqsetup`にいくつかのキーを追加/変更. + - `abstract`環境を実装. + - パッケージを読み込んでいるだけのはやめた. diff --git a/Master/texmf-dist/doc/latex/jlreq/README.html b/Master/texmf-dist/doc/latex/jlreq/README.html new file mode 100644 index 00000000000..761d89b199f --- /dev/null +++ b/Master/texmf-dist/doc/latex/jlreq/README.html @@ -0,0 +1,43 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta http-equiv="Content-Style-Type" content="text/css" /> + <meta name="generator" content="pandoc" /> + <title></title> + <style type="text/css">code{white-space: pre;}</style> + <link href="data:text/css;charset=utf-8,body%20%7B%0Afont%2Dfamily%3A%20Helvetica%2C%20arial%2C%20sans%2Dserif%3B%0Afont%2Dsize%3A%2014px%3B%0Aline%2Dheight%3A%201%2E6%3B%0Apadding%2Dtop%3A%2010px%3B%0Apadding%2Dbottom%3A%2010px%3B%0Abackground%2Dcolor%3A%20white%3B%0Apadding%3A%2030px%3B%20%7D%0Abody%20%3E%20%2A%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%20%21important%3B%20%7D%0Abody%20%3E%20%2A%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%20%21important%3B%20%7D%0Aa%20%7B%0Acolor%3A%20%234183C4%3B%20%7D%0Aa%2Eabsent%20%7B%0Acolor%3A%20%23cc0000%3B%20%7D%0Aa%2Eanchor%20%7B%0Adisplay%3A%20block%3B%0Apadding%2Dleft%3A%2030px%3B%0Amargin%2Dleft%3A%20%2D30px%3B%0Acursor%3A%20pointer%3B%0Aposition%3A%20absolute%3B%0Atop%3A%200%3B%0Aleft%3A%200%3B%0Abottom%3A%200%3B%20%7D%0Ah1%2C%20h2%2C%20h3%2C%20h4%2C%20h5%2C%20h6%20%7B%0Amargin%3A%2020px%200%2010px%3B%0Apadding%3A%200%3B%0Afont%2Dweight%3A%20bold%3B%0A%2Dwebkit%2Dfont%2Dsmoothing%3A%20antialiased%3B%0Acursor%3A%20text%3B%0Aposition%3A%20relative%3B%20%7D%0Ah1%3Ahover%20a%2Eanchor%2C%20h2%3Ahover%20a%2Eanchor%2C%20h3%3Ahover%20a%2Eanchor%2C%20h4%3Ahover%20a%2Eanchor%2C%20h5%3Ahover%20a%2Eanchor%2C%20h6%3Ahover%20a%2Eanchor%20%7B%0A%0Atext%2Ddecoration%3A%20none%3B%20%7D%0Ah1%20tt%2C%20h1%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah2%20tt%2C%20h2%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah3%20tt%2C%20h3%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah4%20tt%2C%20h4%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah5%20tt%2C%20h5%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah6%20tt%2C%20h6%20code%20%7B%0Afont%2Dsize%3A%20inherit%3B%20%7D%0Ah1%20%7B%0Afont%2Dsize%3A%2028px%3B%0Acolor%3A%20black%3B%20%7D%0Ah2%20%7B%0Afont%2Dsize%3A%2024px%3B%0Aborder%2Dbottom%3A%201px%20solid%20%23cccccc%3B%0Acolor%3A%20black%3B%20%7D%0Ah3%20%7B%0Afont%2Dsize%3A%2018px%3B%20%7D%0Ah4%20%7B%0Afont%2Dsize%3A%2016px%3B%20%7D%0Ah5%20%7B%0Afont%2Dsize%3A%2014px%3B%20%7D%0Ah6%20%7B%0Acolor%3A%20%23777777%3B%0Afont%2Dsize%3A%2014px%3B%20%7D%0Ap%2C%20blockquote%2C%20ul%2C%20ol%2C%20dl%2C%20li%2C%20table%2C%20pre%20%7B%0Amargin%3A%2015px%200%3B%20%7D%0Ahr%20%7B%0A%0Aborder%3A%200%20none%3B%0Acolor%3A%20%23cccccc%3B%0Aheight%3A%204px%3B%0Apadding%3A%200%3B%20%7D%0Abody%20%3E%20h2%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Abody%20%3E%20h1%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Abody%20%3E%20h1%3Afirst%2Dchild%20%2B%20h2%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Abody%20%3E%20h3%3Afirst%2Dchild%2C%20body%20%3E%20h4%3Afirst%2Dchild%2C%20body%20%3E%20h5%3Afirst%2Dchild%2C%20body%20%3E%20h6%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Aa%3Afirst%2Dchild%20h1%2C%20a%3Afirst%2Dchild%20h2%2C%20a%3Afirst%2Dchild%20h3%2C%20a%3Afirst%2Dchild%20h4%2C%20a%3Afirst%2Dchild%20h5%2C%20a%3Afirst%2Dchild%20h6%20%7B%0Amargin%2Dtop%3A%200%3B%0Apadding%2Dtop%3A%200%3B%20%7D%0Ah1%20p%2C%20h2%20p%2C%20h3%20p%2C%20h4%20p%2C%20h5%20p%2C%20h6%20p%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Ali%20p%2Efirst%20%7B%0Adisplay%3A%20inline%2Dblock%3B%20%7D%0Aul%2C%20ol%20%7B%0Apadding%2Dleft%3A%2030px%3B%20%7D%0Aul%20%3Afirst%2Dchild%2C%20ol%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Aul%20%3Alast%2Dchild%2C%20ol%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Adl%20%7B%0Apadding%3A%200%3B%20%7D%0Adl%20dt%20%7B%0Afont%2Dsize%3A%2014px%3B%0Afont%2Dweight%3A%20bold%3B%0Afont%2Dstyle%3A%20italic%3B%0Apadding%3A%200%3B%0Amargin%3A%2015px%200%205px%3B%20%7D%0Adl%20dt%3Afirst%2Dchild%20%7B%0Apadding%3A%200%3B%20%7D%0Adl%20dt%20%3E%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Adl%20dt%20%3E%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Adl%20dd%20%7B%0Amargin%3A%200%200%2015px%3B%0Apadding%3A%200%2015px%3B%20%7D%0Adl%20dd%20%3E%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Adl%20dd%20%3E%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Ablockquote%20%7B%0Aborder%2Dleft%3A%204px%20solid%20%23dddddd%3B%0Apadding%3A%200%2015px%3B%0Acolor%3A%20%23777777%3B%20%7D%0Ablockquote%20%3E%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Ablockquote%20%3E%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Atable%20%7B%0Apadding%3A%200%3B%20%7D%0Atable%20tr%20%7B%0Aborder%2Dtop%3A%201px%20solid%20%23cccccc%3B%0Abackground%2Dcolor%3A%20white%3B%0Amargin%3A%200%3B%0Apadding%3A%200%3B%20%7D%0Atable%20tr%3Anth%2Dchild%282n%29%20%7B%0Abackground%2Dcolor%3A%20%23f8f8f8%3B%20%7D%0Atable%20tr%20th%20%7B%0Afont%2Dweight%3A%20bold%3B%0Aborder%3A%201px%20solid%20%23cccccc%3B%0Atext%2Dalign%3A%20left%3B%0Amargin%3A%200%3B%0Apadding%3A%206px%2013px%3B%20%7D%0Atable%20tr%20td%20%7B%0Aborder%3A%201px%20solid%20%23cccccc%3B%0Atext%2Dalign%3A%20left%3B%0Amargin%3A%200%3B%0Apadding%3A%206px%2013px%3B%20%7D%0Atable%20tr%20th%20%3Afirst%2Dchild%2C%20table%20tr%20td%20%3Afirst%2Dchild%20%7B%0Amargin%2Dtop%3A%200%3B%20%7D%0Atable%20tr%20th%20%3Alast%2Dchild%2C%20table%20tr%20td%20%3Alast%2Dchild%20%7B%0Amargin%2Dbottom%3A%200%3B%20%7D%0Aimg%20%7B%0Amax%2Dwidth%3A%20100%25%3B%20%7D%0Aspan%2Eframe%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%20%7D%0Aspan%2Eframe%20%3E%20span%20%7B%0Aborder%3A%201px%20solid%20%23dddddd%3B%0Adisplay%3A%20block%3B%0Afloat%3A%20left%3B%0Aoverflow%3A%20hidden%3B%0Amargin%3A%2013px%200%200%3B%0Apadding%3A%207px%3B%0Awidth%3A%20auto%3B%20%7D%0Aspan%2Eframe%20span%20img%20%7B%0Adisplay%3A%20block%3B%0Afloat%3A%20left%3B%20%7D%0Aspan%2Eframe%20span%20span%20%7B%0Aclear%3A%20both%3B%0Acolor%3A%20%23333333%3B%0Adisplay%3A%20block%3B%0Apadding%3A%205px%200%200%3B%20%7D%0Aspan%2Ealign%2Dcenter%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Aclear%3A%20both%3B%20%7D%0Aspan%2Ealign%2Dcenter%20%3E%20span%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Amargin%3A%2013px%20auto%200%3B%0Atext%2Dalign%3A%20center%3B%20%7D%0Aspan%2Ealign%2Dcenter%20span%20img%20%7B%0Amargin%3A%200%20auto%3B%0Atext%2Dalign%3A%20center%3B%20%7D%0Aspan%2Ealign%2Dright%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Aclear%3A%20both%3B%20%7D%0Aspan%2Ealign%2Dright%20%3E%20span%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Amargin%3A%2013px%200%200%3B%0Atext%2Dalign%3A%20right%3B%20%7D%0Aspan%2Ealign%2Dright%20span%20img%20%7B%0Amargin%3A%200%3B%0Atext%2Dalign%3A%20right%3B%20%7D%0Aspan%2Efloat%2Dleft%20%7B%0Adisplay%3A%20block%3B%0Amargin%2Dright%3A%2013px%3B%0Aoverflow%3A%20hidden%3B%0Afloat%3A%20left%3B%20%7D%0Aspan%2Efloat%2Dleft%20span%20%7B%0Amargin%3A%2013px%200%200%3B%20%7D%0Aspan%2Efloat%2Dright%20%7B%0Adisplay%3A%20block%3B%0Amargin%2Dleft%3A%2013px%3B%0Aoverflow%3A%20hidden%3B%0Afloat%3A%20right%3B%20%7D%0Aspan%2Efloat%2Dright%20%3E%20span%20%7B%0Adisplay%3A%20block%3B%0Aoverflow%3A%20hidden%3B%0Amargin%3A%2013px%20auto%200%3B%0Atext%2Dalign%3A%20right%3B%20%7D%0Acode%2C%20tt%20%7B%0Amargin%3A%200%202px%3B%0Apadding%3A%200%205px%3B%0Awhite%2Dspace%3A%20nowrap%3B%0Aborder%3A%201px%20solid%20%23eaeaea%3B%0Abackground%2Dcolor%3A%20%23f8f8f8%3B%0Aborder%2Dradius%3A%203px%3B%20%7D%0Apre%20code%20%7B%0Amargin%3A%200%3B%0Apadding%3A%200%3B%0Awhite%2Dspace%3A%20pre%3B%0Aborder%3A%20none%3B%0Abackground%3A%20transparent%3B%20%7D%0A%2Ehighlight%20pre%20%7B%0Abackground%2Dcolor%3A%20%23f8f8f8%3B%0Aborder%3A%201px%20solid%20%23cccccc%3B%0Afont%2Dsize%3A%2013px%3B%0Aline%2Dheight%3A%2019px%3B%0Aoverflow%3A%20auto%3B%0Apadding%3A%206px%2010px%3B%0Aborder%2Dradius%3A%203px%3B%20%7D%0Apre%20%7B%0Abackground%2Dcolor%3A%20%23f8f8f8%3B%0Aborder%3A%201px%20solid%20%23cccccc%3B%0Afont%2Dsize%3A%2013px%3B%0Aline%2Dheight%3A%2019px%3B%0Aoverflow%3A%20auto%3B%0Apadding%3A%206px%2010px%3B%0Aborder%2Dradius%3A%203px%3B%20%7D%0Apre%20code%2C%20pre%20tt%20%7B%0Abackground%2Dcolor%3A%20transparent%3B%0Aborder%3A%20none%3B%20%7D%0A" rel="stylesheet" type="text/css" /> +</head> +<body> +<h1 id="jlreq">jlreq</h1> +<h2 id="what-is-this">What is this?</h2> +<p>This package provides the class file and JFM (Japanese font metric) files for LuaTeX-ja / pLaTeX / upLaTeX. This aims to implement <a href="https://www.w3.org/TR/jlreq/">Requirements for Japanese Text Layout</a>.</p> +<h2 id="installation">Installation</h2> +<p>Run <code>make</code>, then JFM files are created. Move the files as follows:</p> +<ul> +<li>*.tfm -> $TEXMF/fonts/tfm/public/jlreq</li> +<li>*.vf -> $TEXMF/fonts/vf/public/jlreq</li> +<li>jfm-jlreq.lua jfm-jlreqv.lua -> $TEXMF/tex/luatex/jlreq</li> +<li>jlreq.cls -> $TEXMF/tex/latex/jlreq</li> +</ul> +<p><code>make install</code> will do this where $TEXMF=$TEXMFHOME</p> +<h2 id="usage">Usage</h2> +<p>See <a href="README-ja.md" class="uri">README-ja.md</a> (in Japanese).</p> +<h2 id="license">LICENSE</h2> +<p>This package is distributed under the BSD 2-Clause License. See <a href="LICENSE" class="uri">LICENSE</a>.</p> +<h2 id="changelog">CHANGELOG</h2> +<ul> +<li>2017-02-08 +<ul> +<li>First release.</li> +</ul></li> +<li>2017-02-17 +<ul> +<li>Fix bugs.</li> +<li>Implement <code>abstract</code> environment.</li> +<li>Change/Add some keys to class option/<code>\jlreqsetup</code></li> +<li>Stop to load <code>pxrubirica</code>, <code>luatexja-ruby</code> and <code>nidanfloat</code>.</li> +</ul></li> +</ul> +</body> +</html> diff --git a/Master/texmf-dist/doc/latex/jlreq/README.md b/Master/texmf-dist/doc/latex/jlreq/README.md index 21f928d3a42..17b4df62d9e 100644 --- a/Master/texmf-dist/doc/latex/jlreq/README.md +++ b/Master/texmf-dist/doc/latex/jlreq/README.md @@ -1,25 +1,29 @@ -# jlreq
-
-## What is this?
-This package provides the class file and JFM (Japanese font metric) files for LuaTeX-ja / pLaTeX / upLaTeX. This aims to implement [Requirements for Japanese Text Layout](https://www.w3.org/TR/jlreq/).
-
-## Installation
-Run `make`, then JFM files are created. Move the files as follows:
-
-* *.tfm -> $TEXMF/fonts/tfm/public/jlreq
-* *.vf -> $TEXMF/fonts/vf/public/jlreq
-* jfm-jlreq.lua jfm-jlreqv.lua -> $TEXMF/tex/luatex/jlreq
-* jlreq.cls -> $TEXMF/tex/latex/jlreq
-
-`make install` will do this where $TEXMF=$TEXMFHOME
-
-## Usage
-See [README-ja.md](README-ja.md) (in Japanese).
-
-## LICENSE
-This package is distributed under the BSD 2-Clause License. See [LICENSE](LICENSE).
-
-## CHANGELOG
-* 2017-02-08
- - First release
-
+# jlreq + +## What is this? +This package provides the class file and JFM (Japanese font metric) files for LuaTeX-ja / pLaTeX / upLaTeX. This aims to implement [Requirements for Japanese Text Layout](https://www.w3.org/TR/jlreq/). + +## Installation +Run `make`, then JFM files are created. Move the files as follows: + +* *.tfm -> $TEXMF/fonts/tfm/public/jlreq +* *.vf -> $TEXMF/fonts/vf/public/jlreq +* jfm-jlreq.lua jfm-jlreqv.lua -> $TEXMF/tex/luatex/jlreq +* jlreq.cls -> $TEXMF/tex/latex/jlreq + +`make install` will do this where $TEXMF=$TEXMFHOME + +## Usage +See [README-ja.md](README-ja.md) (in Japanese). + +## LICENSE +This package is distributed under the BSD 2-Clause License. See [LICENSE](LICENSE). + +## CHANGELOG +* 2017-02-08 + - First release. +* 2017-02-17 + - Fix bugs. + - Implement `abstract` environment. + - Change/Add some keys to class option/`\jlreqsetup` + - Stop to load `pxrubirica`, `luatexja-ruby` and `nidanfloat`. diff --git a/Master/texmf-dist/tex/latex/jlreq/jlreq.cls b/Master/texmf-dist/tex/latex/jlreq/jlreq.cls index 74a9d100290..f0dd59e52db 100644 --- a/Master/texmf-dist/tex/latex/jlreq/jlreq.cls +++ b/Master/texmf-dist/tex/latex/jlreq/jlreq.cls @@ -1,3525 +1,3567 @@ -%% Japanese document class based on requirements for Japanese text layout
-%%
-%% The package is distributed under the BSD 2-Clause License
-%%
-%%
-% (based on JLREQ 20120403 https://www.w3.org/TR/2012/NOTE-jlreq-20120403/ja/)
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{jlreq}[2017/02/08 jlreq]
-\RequirePackage{xkeyval,everyhook,filehook,etoolbox,ifthen}
-
-%. helper1
-\newdimen\jlreq@tempdima
-\newdimen\jlreq@tempdimb
-\newdimen\jlreq@tempdimc
-\newskip\jlreq@tempskipa
-\newskip\jlreq@tempskipb
-\newskip\jlreq@tempskipc
-\newif\ifjlreq@tempa
-\newif\ifjlreq@tempb
-\newif\ifjlreq@tempc
-\newbox\jlreq@tempboxa
-\newbox\jlreq@tempboxb
-\newbox\jlreq@tempboxc
-% 計算結果を返すための変数
-\newdimen\jlreq@resultdimen
-\newbox\jlreq@resultbox
-
-\def\jlreq@uniqtoken{\jlreq@uniqtoken}
-\def\jlreq@endmark{\jlreq@endmark}
-
-% 与えられたトークン列が空か(展開はしないでチェック)
-\long\def\jlreq@helper@ifempty@getfirsttoken#1#2\jlreq@uniqtoken{#1}
-\long\def\jlreq@ifempty#1{\expandafter\ifx\jlreq@helper@ifempty@getfirsttoken#1\jlreq@uniqtoken\jlreq@uniqtoken\jlreq@uniqtoken\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-% #1が\jlreq@endmarkか
-\long\def\jlreq@helper@ifendmark@getfirsttoken#1#2\jlreq@endmark{#1}
-\long\def\jlreq@ifendmark#1{\expandafter\ifx\jlreq@helper@ifendmark@getfirsttoken#1\jlreq@endmark\jlreq@endmark\@empty\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-
-% @removeelementの括弧があっても動くかもしれない版
-% 次の変数を使う:\jlreq@tempa:消したいやつ,\jlreq@tempb:今処理している部分.
-\def\jlreq@helper@removeelement#1#2#3{%
- \begingroup
- \def\jlreq@tempb{}%
- \def\jlreq@tempa{#1}%
- \def#3{}%
- \jlreq@helper@removeelement@#3#2{\jlreq@endmark}%
- \edef\jlreq@do{\unexpanded{\def#3}{\expandonce{#3}}}%
- \expandafter\endgroup
- \jlreq@do
-}
-% 最初のグルーピングの前までを取得し,@@に回す.グルーピング以降は@@@で処理する
-\def\jlreq@helper@removeelement@#1#2#{%
- \jlreq@helper@removeelement@@{#1}{#2}%
- \jlreq@helper@removeelement@@@{#1}%
-}
-% #1をカンマで区切り,既に得ていた\jlreq@tempbと併せて一つの部分を作る.
-\def\jlreq@helper@removeelement@@#1#2{%
- \jlreq@helper@dividebycomma{#2}%
- \edef\jlreq@tempb{\expandonce{\jlreq@tempb}\expandonce{\jlreq@tempc}}%
- \ifjlreq@tempa
- \ifx\jlreq@tempa\jlreq@tempb\else
- \ifx#1\@empty\edef#1{\expandonce{\jlreq@tempb}}%
- \else\edef#1{\expandonce{#1},\expandonce{\jlreq@tempb}}\fi
- \fi
- \def\jlreq@tempb{}%
- \expandafter\jlreq@helper@removeelement@@\expandafter#1\expandafter{\jlreq@tempd}%
- \fi
-}
-% グルーピング部分を\jlreq@tempbに加え,@に戻る
-\def\jlreq@helper@removeelement@@@#1#2{%
- \jlreq@ifendmark{#2}{%
- % 全体の解釈が終わった
- \ifx\jlreq@tempa\jlreq@tempb\else
- \ifx#1\@empty\edef#1{\expandonce{\jlreq@tempb}}%
- \else\edef#1{\expandonce{#1},\expandonce{\jlreq@tempb}}\fi
- \fi
- }{%
- \edef\jlreq@tempb{\expandonce{\jlreq@tempb}{#2}}%
- \def\jlreq@next{\jlreq@helper@removeelement@{#1}}%
- \expandafter\jlreq@next
- }%
-}
-% カンマで区切って,その前と後ろを\jlreq@tempc,\jlreq@tempdに入れる
-% もしカンマがない場合は\ifjlreq@tempaがfalseになる.
-\def\jlreq@helper@dividebycomma#1{\jlreq@helper@dividebycomma@#1,\jlreq@endmark}
-\def\jlreq@helper@dividebycomma@#1,#2\jlreq@endmark{%
- \def\jlreq@tempc{#1}%
- \def\jlreq@tempd{#2}%
- \ifx\jlreq@tempd\@empty\jlreq@tempafalse\else\jlreq@tempatrue\expandafter\def\expandafter\jlreq@tempd\expandafter{\jlreq@helper@removelastcomma#2\jlreq@endmark}\fi
-}
-\def\jlreq@helper@removelastcomma#1,\jlreq@endmark{#1}
-
-\long\def\jlreq@deleteuntileendmark#1\jlreq@endmark{}
-
-% #1が#2のトークン内と\ifxで一致すれば#3を,そうでなければ#4を実行する.
-% #2は\edefで展開する.
-\def\jlreq@ifintokenlist#1#2{%
- \begingroup
- \jlreq@tempafalse
- \edef\@tempa{#2}%
- \expandafter\jlreq@helper@ifintokenlist@\expandafter{\@tempa}{#1}%
- \ifjlreq@tempa\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
- {\def\jlreq@do{\@firstoftwo}}{\def\jlreq@do{\@secondoftwo}}%
- \expandafter\endgroup
- \jlreq@do
-}
-\def\jlreq@helper@ifintokenlist@#1#2{%
- \jlreq@helper@ifintokenlist@@{#2}#1\jlreq@endmark
-}
-\def\jlreq@helper@ifintokenlist@@#1#2{%
- \jlreq@ifendmark{#2}{%
- \def\jlreq@next{}%
- }{%
- \ifx#1#2\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
- {\jlreq@tempatrue\def\jlreq@next{\jlreq@deleteuntileendmark}}%
- {\def\jlreq@next{\jlreq@helper@ifintokenlist@@{#1}}}%
- }%
- \jlreq@next
-}
-
-% vbox #1の最後を\jlreq@resultboxに入れる
-% #1の最後の行は消える
-\newcommand*{\jlreq@getlastbox}[1]{%
- \setbox#1=\vbox{\unvbox#1\relax
- \unskip\unskip\unpenalty\global\setbox\jlreq@resultbox=\lastbox}%
- \ifhbox\jlreq@resultbox
- \global\setbox\jlreq@resultbox=\hbox{%
- \unhbox\jlreq@resultbox\unskip\unskip\unpenalty}%
- \else
- \global\setbox\jlreq@resultbox=\copy\voidb@x
- \fi
-}
-
-% vbox #1の最初を\jlreq@resultboxに入れる
-% #1は消える
-\newcommand*{\jlreq@getfirstbox}[1]{%
- \loop\ifdim\dimexpr\dp#1+\ht#1=0pt\relax\else\jlreq@getlastbox{#1}\repeat
-}
-
-% 簡易なkeyvalのパース.
-% \jlreq@parsekeyval*[family=jlreq@key]{ % *ありは\setkeys*を使う
-% {key}{\def\val{#1}}
-% *{key}{\def\val{#1}} % デフォルト値を空文字列にする
-% {key}[choice1,choice2]{\def\valchoice{#1}}
-%}{parse対象}
-\def\jlreq@parsekeyval{%
- \@ifstar{\jlreq@helper@parsekeyval@{*}}{\jlreq@helper@parsekeyval@{}}%
-}
-\def\jlreq@helper@parsekeyval@#1{%
- \@ifnextchar[{\jlreq@helper@parsekeyval@@{#1}}{\jlreq@helper@parsekeyval@@{#1}[jlreq@key]}%
-}
-\long\def\jlreq@helper@parsekeyval@@#1[#2]#3#4{%
- \begingroup
- \def\jlreq@do{}%
- \jlreq@helper@parsekeyval@@@{#2}#3{\jlreq@endmark}%
- \setkeys#1{#2}{#4}%
- \expandafter\endgroup
- \jlreq@do
-}
-\def\jlreq@helper@parsekeyval@@@#1#2#{\jlreq@helper@parsekeyval@@@@{#1}#2\jlreq@endmark}%
-\def\jlreq@helper@parsekeyval@@@@#1#2{%
- \jlreq@ifendmark{#2}{%
- \def\@tempa{\jlreq@helper@parsekeyval@@@@@{#1}}%
- }{%
- \def\@tempa{\expandafter\@tempb\jlreq@deleteuntileendmark}%
- \ifx *#2%
- \def\@tempb{\jlreq@helper@parsekeyval@@@definekeywithdefault{#1}}%
- \else
- \def\@tempb{\jlreq@helper@parsekeyval@@@@@{#1}}%
- \fi
- }%
- \@tempa
-}
-
-\long\def\jlreq@helper@parsekeyval@@@@@#1#2{%
- \jlreq@ifendmark{#2}{%
- \def\@tempa{}%
- }{%
- \def\@tempa{%
- \@ifnextchar[{\jlreq@helper@parsekeyval@@@choicekey{#1}{#2}}{\jlreq@helper@parsekeyval@@@definekey{#1}{#2}}%
- }%
- }%
- \@tempa
-}
-\long\def\jlreq@helper@parsekeyval@@@choicekey#1#2[#3]#4{%
- \define@choicekey{#1}{#2}{#3}{\appto\jlreq@do{#4}}%
- \jlreq@helper@parsekeyval@@@{#1}%
-}
-\long\def\jlreq@helper@parsekeyval@@@definekeywithdefault#1#2#3{%
- \define@key{#1}{#2}[]{\appto\jlreq@do{#3}}%
- \jlreq@helper@parsekeyval@@@{#1}%
-}
-\long\def\jlreq@helper@parsekeyval@@@definekey#1#2#3{%
- \define@key{#1}{#2}{\appto\jlreq@do{#3}}%
- \jlreq@helper@parsekeyval@@@{#1}%
-}
-
-% #1のboxを今の真ん中に配置する.
-\def\jlreq@box@putcenter#1{%
- \begingroup
- \jlreq@tempdima=\dimexpr(\ht#1 - \dp#1)/2\relax
- \setbox\jlreq@tempboxa=\hbox{あ}%
- \edef\jlreq@do{%
- \noexpand\lower\the\dimexpr(\jlreq@tempdima - (\ht\jlreq@tempboxa - \dp\jlreq@tempboxa)/2)\relax\unexpanded{\box#1}%
- }%
- \expandafter\endgroup
- \jlreq@do
-}
-
-% \jlreq@switch{str}{
-% {str}{abcd}
-% {str1}{xyz}
-%}[default: input = #1] -> abcd
-%または
-%
-% \jlreq@switch{str}{
-% {str}{abcd}
-% {str1}{xyz}
-% {default} % ここは#1を受け付けない(パラメータトークンを受け付けたい場合のため).
-%} -> abcd
-% 文字列比較→\edefして比較する
-\long\def\jlreq@helper@switch@executeoption#1[#2]{%
- \begingroup
- \def\jlreq@do##1{#2}%
- \expandafter\endgroup
- \jlreq@do{#1}%
-}
-\long\def\jlreq@helper@removeoption[#1]{}
-\long\def\jlreq@switch#1#2{%
- \begingroup
- \let\jlreq@do\@undefined
- \jlreq@helper@switch@{#1}#2\jlreq@endmark
- \ifx\jlreq@do\@undefined
- \def\jlreq@do{\@ifnextchar[{\jlreq@helper@switch@executeoption{#1}}{}}%
- \else
- \edef\jlreq@do{\expandonce{\jlreq@do}\unexpanded{\@ifnextchar[{\jlreq@helper@removeoption}{}}}%
- \fi
- \expandafter\endgroup
- \jlreq@do
-}
-\long\def\jlreq@helper@switch@#1#2{%
- \jlreq@ifendmark{#2}{%
- \def\jlreq@next{}%
- }{%
- \edef\jlreq@next{\unexpanded{\jlreq@helper@switch@@{#1}{#2}}}%
- }%
- \jlreq@next
-}
-\long\def\jlreq@helper@switch@@#1#2#3{%
- \jlreq@ifendmark{#3}{%
- \edef\jlreq@do{\unexpanded{#2}}%
- \def\jlreq@next{}%
- }{%
- \edef\jlreq@tempa{#1}%
- \edef\jlreq@tempb{#2}%
- \ifx\jlreq@tempa\jlreq@tempb\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
- {%
- \edef\jlreq@do{\unexpanded{#3}}%
- \def\jlreq@next{\jlreq@deleteuntileendmark}%
- }{%
- \def\jlreq@next{\jlreq@helper@switch@{#1}}%
- }%
- }%
- \jlreq@next
-}
-
-%. オプションの定義
-% オプション処理の際にしか使わない変数(後でそれを元に別の変数を調整する)
-% ものは\jlreq@option@<key>に格納する.
-% _とかは@に変換する.
-\newcommand*{\jlreq@checkempty}[2]{
- \jlreq@ifempty{#2}{}{\ClassError{jlreq}{The option #1 should have no value}{\@ehc}}%
-}
-% 引数無しの\DeclareOptionX
-\newcommand*{\jlreq@DeclareOption}[2]{%
- \DeclareOptionX{#1}{\jlreq@checkempty{#1}{##1}#2}
-}
-% エンジン類
-\jlreq@DeclareOption{uplatex}{\let\jlreq@engine=u}
-\jlreq@DeclareOption{platex}{\let\jlreq@engine=p}
-\jlreq@DeclareOption{lualatex}{\let\jlreq@engine=l}
-
-% 文書のタイプ
-\newcommand*\jlreq@article@type{article}
-\define@choicekey{jlreq.cls}{article_type}{article,report,book}{\renewcommand*{\jlreq@article@type}{#1}}
-\jlreq@DeclareOption{article}{\renewcommand*{\jlreq@article@type}{article}}
-\jlreq@DeclareOption{report}{\renewcommand*{\jlreq@article@type}{report}}
-\jlreq@DeclareOption{book}{\renewcommand*{\jlreq@article@type}{book}}
-
-%.. 基本版面.まずは紙サイズ.
-\def\jlreq@switchpapersize{}
-\newcommand*\jlreq@addpapersize[4][]{%
- \jlreq@ifempty{#2}{}{
- \jlreq@DeclareOption{#2}{\setlength\paperheight{#3}\setlength\paperwidth{#4}}
- \appto\jlreq@switchpapersize{{#2}{\setlength\paperheight{#3}\setlength\paperwidth{#4}}}
- }
- \jlreq@ifempty{#1}{}{
- \appto\jlreq@switchpapersize{{#1}{\setlength\paperheight{#3}\setlength\paperwidth{#4}}}
- }
-}
-\DeclareOptionX{paper}{
- \edef\jlreq@do{%
- \unexpanded{\jlreq@switch{#1}}{\expandonce{\jlreq@switchpapersize}}%
- [\unexpanded{%
- \jlreq@helper@dividebycomma{#1}%
- \ifjlreq@tempa
- \setlength{\paperheight}{\dimexpr\jlreq@tempc\relax}%
- \setlength{\paperwidth}{\dimexpr\jlreq@tempd\relax}%
- \else
- \ClassError{jlreq}{The paper #1 is unknown}{\@ehc}%
- \fi
- }]%
- }%
- \jlreq@do
-}
-% 紙サイズ一覧.b*はJIS B.
-% [paper=で指定できるようにするもの]{オプション名}{縦}{横}
-\jlreq@addpapersize[a3]{a3paper}{420mm}{297mm}
-\jlreq@addpapersize[a4]{a4paper}{297mm}{210mm}
-\jlreq@addpapersize[a5]{a5paper}{210mm}{148mm}
-\jlreq@addpapersize[a6]{a6paper}{148mm}{105mm}
-\jlreq@addpapersize[b4]{b4paper}{364mm}{257mm}
-\jlreq@addpapersize[b5]{b5paper}{257mm}{182mm}
-\jlreq@addpapersize[b6]{b6paper}{182mm}{128mm}
-\jlreq@addpapersize{a4j}{297mm}{210mm}
-\jlreq@addpapersize{a5j}{210mm}{148mm}
-\jlreq@addpapersize{b4j}{364mm}{257mm}
-\jlreq@addpapersize{b5j}{257mm}{182mm}
-\jlreq@addpapersize{a4var}{283mm}{210mm}
-\jlreq@addpapersize{b5var}{230mm}{182mm}
-\jlreq@addpapersize[letter]{letterpaper}{11in}{8.5in}
-\jlreq@addpapersize[legal]{legalpaper}{14in}{8.5in}
-\jlreq@addpapersize[executive]{executivepaper}{10.5in}{7.25in}
-% 追加
-\jlreq@addpapersize[a0]{}{1189mm}{841mm}
-\jlreq@addpapersize[a1]{}{841mm}{594mm}
-\jlreq@addpapersize[a2]{}{420mm}{594mm}
-\jlreq@addpapersize[a7]{}{74mm}{105mm}
-\jlreq@addpapersize[a8]{}{52mm}{74mm}
-\jlreq@addpapersize[a9]{}{37mm}{52mm}
-\jlreq@addpapersize[a10]{}{26mm}{37mm}
-
-\jlreq@addpapersize[b0]{}{1030mm}{1456mm}
-\jlreq@addpapersize[b1]{}{728mm}{1030mm}
-\jlreq@addpapersize[b2]{}{515mm}{728mm}
-\jlreq@addpapersize[b3]{}{364mm}{515mm}
-\jlreq@addpapersize[b7]{}{91mm}{128mm}
-\jlreq@addpapersize[b8]{}{64mm}{91mm}
-\jlreq@addpapersize[b9]{}{45mm}{64mm}
-\jlreq@addpapersize[b10]{}{32mm}{45mm}
-
-\jlreq@addpapersize[c2]{}{458mm}{648mm}
-\jlreq@addpapersize[c3]{}{324mm}{458mm}
-\jlreq@addpapersize[c4]{}{229mm}{354mm}
-\jlreq@addpapersize[c5]{}{162mm}{229mm}
-\jlreq@addpapersize[c6]{}{114mm}{162mm}
-\jlreq@addpapersize[c7]{}{81mm}{114mm}
-\jlreq@addpapersize[c8]{}{57mm}{81mm}
-
-%.. フォントサイズ,行長,1ページあたりの行数で基本版面のサイズを決める(2.4.1.a)
-\newcommand*{\jlreq@option@fontsize}{}
-\DeclareOptionX{fontsize}{\renewcommand*{\jlreq@option@fontsize}{#1}}
-\jlreq@DeclareOption{10pt}{\renewcommand*{\jlreq@option@fontsize}{10pt}}
-\jlreq@DeclareOption{11pt}{\renewcommand*{\jlreq@option@fontsize}{11pt}}
-\jlreq@DeclareOption{12pt}{\renewcommand*{\jlreq@option@fontsize}{12pt}}
-
-%.. 行の長さ
-\newcommand*{\jlreq@option@line@length}{}
-\DeclareOptionX{line_length}{\renewcommand*{\jlreq@option@line@length}{#1}}
-%.. 1ページあたりの行数
-\newcommand*{\jlreq@option@number@of@lines}{}
-\DeclareOptionX{number_of_lines}{\renewcommand*{\jlreq@option@number@of@lines}{#1}}
-
-% 地の空き量,のどの空き量で配置位置を決める(2.4.1.b)省略されたら中央配置.
-%.. 天
-\newcommand*{\jlreq@option@head@space}{}
-\DeclareOptionX{head_space}{\renewcommand*{\jlreq@option@head@space}{#1}}
-
-%.. 地
-\newcommand*{\jlreq@option@foot@space}{}
-\DeclareOptionX{foot_space}{\renewcommand*{\jlreq@option@foot@space}{#1}}
-%.. のど
-\newcommand*{\jlreq@option@gutter}{}
-\DeclareOptionX{gutter}{\renewcommand*{\jlreq@option@gutter}{#1}}
-
-%.. 柱とノンブル
-\newcommand*{\jlreq@option@headfoot@verticalpos}{}
-\DeclareOptionX{headfoot_verticalposition}{\renewcommand*{\jlreq@option@headfoot@verticalpos}{#1}}
-\newcommand*{\jlreq@headfoot@sidemargin}{0pt}
-\DeclareOptionX{headfoot_sidemargin}{\renewcommand*{\jlreq@headfoot@sidemargin}{#1}}
-
-%.. 段間
-\newcommand*{\jlreq@option@column@gap}{2zw}
-\DeclareOptionX{column_gap}{\renewcommand*{\jlreq@option@column@gap{#1}}}
-
-%.. 行送り,指定無しの場合は文字サイズの1.7倍とする.(1.5から2倍が好ましい:2.4.2.d 注3)
-\newcommand*{\jlreq@option@baselineskip}{}
-\DeclareOptionX{baselineskip}{\def\jlreq@option@baselineskip{#1}}
-\DeclareOptionX{linegap}{\def\jlreq@option@baselineskip{1zw + #1}}
-
-%.. 組み方系
-% 行頭に括弧が来たときの配置:3.1.5
-% 段落頭指定_折り返し行頭指定 で与える.
-\newcommand*{\jlreq@open@bracket@pos}{zenkaku_tentsuki}
-\define@choicekey{jlreq.cls}{open_bracket_pos}{zenkaku_tentsuki,zenkakunibu_nibu,nibu_tentsuki}{\renewcommand*{\jlreq@open@bracket@pos}{#1}}
-% ぶら下げ組みをするか:3.8.2 注1
-\newif\ifjlreq@burasage\jlreq@burasagefalse
-\jlreq@DeclareOption{hanging_punctuation}{\jlreq@burasagetrue}
-
-%.. 注
-% 合印の場所(4.2.3)行間に入れるか否か
-\newcommand*{\jlreq@referencemark}{inline}
-\define@choicekey{jlreq.cls}{reference_mark}{inline,interlinear}{\renewcommand*{\jlreq@referencemark}{#1}}
-% 脚注の字下げ,一行目を下げるならばone,二行目以降ならばtwo.ちょっと酷いので後で考える.
-\newcommand*{\jlreq@footnotetext@indent}{one}
-\define@choicekey{jlreq.cls}{footnotetext_indent}{one,two}{\renewcommand*{\jlreq@footnotetext@indent}{#1}}
-% 後注をどこに配置するか._headings(全ての見出し),_paragraph(段落後),_で始まらないやつ(その名前の見出し).カンマ区切り
-\newcommand*{\jlreq@endnote@position}{_headings}
-\DeclareOptionX{endnote_position}{\renewcommand*{\jlreq@endnote@position}{#1}}
-% 傍注のタイプ
-\newcommand*{\jlreq@sidenote@type}{number}
-\define@choicekey{jlreq.cls}{sidenote_type}{number,mark}{\renewcommand*{\jlreq@sidenote@type}{#1}}
-\newcommand*{\jlreq@option@sidenote@width}{}
-\DeclareOptionX{sidenote_width}{\renewcommand*{\jlreq@option@sidenote@width}{#1}}
-
-\newif\if@restonecol \@restonecolfalse
-\newif\if@titlepage \@titlepagefalse
-\newif\ifjlreq@option@titlepage \jlreq@option@titlepagefalse % titlepageかnotitlepageかが指定された
-\newif\if@landscape \@landscapefalse
-\newif\if@tate \@tatefalse
-\jlreq@DeclareOption{landscape}{\@landscapetrue}
-\jlreq@DeclareOption{tombo}{%
- \tombowtrue \tombowdatefalse
- \setlength{\@tombowwidth}{.1\p@}%
- \maketombowbox}
-\jlreq@DeclareOption{mentuke}{%
- \tombowtrue \tombowdatefalse
- \setlength{\@tombowwidth}{\z@}%
- \maketombowbox}
-\jlreq@DeclareOption{tate}{\@tatetrue
- \AtBeginDocument{\tate\message{\jlreq@tategumi@message}\adjustbaseline}%
-}
-\newif\ifjlreq@option@twoside\jlreq@option@twosidefalse % onesideかtwosideが指定された
-\jlreq@DeclareOption{oneside}{\@twosidefalse\@mparswitchfalse\jlreq@option@twosidetrue}
-\jlreq@DeclareOption{twoside}{\@twosidetrue\@mparswitchtrue\jlreq@option@twosidetrue}
-\jlreq@DeclareOption{onecolumn}{\@twocolumnfalse}
-\jlreq@DeclareOption{twocolumn}{\@twocolumntrue}
-\jlreq@DeclareOption{titlepage}{\jlreq@option@titlepagetrue\@titlepagetrue}
-\jlreq@DeclareOption{notitlepage}{\jlreq@option@titlepagetrue\@titlepagefalse}
-\jlreq@DeclareOption{draft}{\setlength\overfullrule{5pt}}
-\jlreq@DeclareOption{final}{\setlength\overfullrule{0pt}}
-\newif\if@openright
-\newif\ifjlreq@option@open \jlreq@option@openfalse % openrightかopenanyが指定された
-\jlreq@DeclareOption{openright}{\@openrighttrue\jlreq@option@opentrue}
-\jlreq@DeclareOption{openany}{\@openrightfalse\jlreq@option@opentrue}
-\jlreq@DeclareOption{leqno}{\input{leqno.clo}}
-\jlreq@DeclareOption{fleqn}{\input{fleqn.clo}}
-
-\newcommand*{\jlreq@warning}[1]{}
-\jlreq@DeclareOption{jlreq_warnings}{\renewcommand*{\jlreq@warning}[1]{\ClassWarningNoLine{jlreq}{(JLREQ warning) ##1}}}
-
-\ExecuteOptionsX{article_type=article,paper=a4,fontsize=10pt,open_bracket_pos=zenkaku_tentsuki,reference_mark=inline,footnotetext_indent=one,endnote_position=_headings,onecolumn,final}
-% \@removeelementを一旦置き換えてから\ProcessOptionsXを実行する
-\let\jlreq@original@@removeelement=\@removeelement
-\let\@removeelement=\jlreq@helper@removeelement
-\ProcessOptionsX*\relax
-\let\@removeelement=\jlreq@original@@removeelement
-
-\ifjlreq@option@titlepage\else
- \ifthenelse{\equal{\jlreq@article@type}{article}}{\@titlepagefalse}{\@titlepagetrue}
-\fi
-\ifjlreq@option@open\else
- \ifthenelse{\equal{\jlreq@article@type}{book}}{\@openrighttrue}{\@openrightfalse}
-\fi
-% articleではopenrightは効かない.
-\ifthenelse{\equal{\jlreq@article@type}{article}}{\@openrightfalse}{}
-\ifjlreq@option@twoside\else
- \ifthenelse{\equal{\jlreq@article@type}{book}}{\@twosidetrue}{\@twosidefalse}
-\fi
-
-\newcommand{\jlreqsetup}[1]{%
- \jlreq@parsekeyval[jlreqsetup]{
- {sidenote_mark}{
- \jlreq@parsekeyval[sidenote_mark]{
- {mark}{\def\jlreq@sidenote@defaultmark{####1}}
- {headingfont}{\def\jlreq@sidenote@keywordfont{####1}}
- }{##1}
- }
- }{#1}
-}
-\@onlypreamble\jlreqsetup
-
-% エンジンの設定
-\ifx\jlreq@engine\@undefined
- \ifx\luatexversion\@undefined
- \ifx\ucs\@undefined
- \let\jlreq@engine=p
- \else
- \let\jlreq@engine=u
- \fi
- \else
- \let\jlreq@engine=l
- \fi
-\fi
-
-\ifx l\jlreq@engine
- \RequirePackage{luatexja}
- \directlua{jlreq = {}}
-\fi
-
-% (u)pLaTeXの場合ここで初めて\epTeXinputencodingが発行されるので,
-% これ以前には和文は使えない.
-\ifx l\jlreq@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@tate\AtEndPreamble{\par}\fi
-\fi
-\def\jlreq@tategumi@message{《縦組モード》}
-
-% \jlreq@gol(Gyo Okuri Length), \jlreq@mol (Moji Okuri Length)を定義
-\if@tate
- \ifx l\jlreq@engine
- \def\jlreq@gol{\zw}\def\jlreq@mol{\zh}
- \else
- \def\jlreq@gol{zw}\def\jlreq@mol{zh}
- \fi
-\else
- \ifx l\jlreq@engine
- \def\jlreq@gol{\zh}\def\jlreq@mol{\zw}
- \else
- \def\jlreq@gol{zh}\def\jlreq@mol{zw}
- \fi
-\fi
-
-%. helper2(エンジン依存系)
-% 組方向を判定
-% \jlreq@if(y|t)(dir|box)を定義する.
-\def\jlreq@do{%
- \def\jlreq@ifydir{\ifydir\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
- \def\jlreq@iftdir{\iftdir\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
- \def\jlreq@ifybox##1{\ifybox##1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
- \def\jlreq@iftbox##1{\iftbox##1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-}
-\ifx l\jlreq@engine
- \def\jlreq@ifydir{\ifnum\ltjgetparameter{direction}=4\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
- \def\jlreq@iftdir{\ifnum\numexpr\ltjgetparameter{direction}-(\ltjgetparameter{direction}/8)*8=3\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
- \def\jlreq@ifybox#1{\ifnum\ltjgetparameter{boxdir}{#1}=4\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
- \def\jlreq@iftbox#1{\ifnum\numexpr\ltjgetparameter{boxdir}{#1}-(\ltjgetparameter{boxdir}{#1}/8)*8=3\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-\else
- \jlreq@do
-\fi
-
-% 現在行の残りを得る.
-\RequirePackage[savepos]{zref}
-\newcount\jlreq@rest@linewidth@count
-\jlreq@rest@linewidth@count=0
-
-\ifx l\jlreq@engine
- % 以下のコードはおかしい.
- \newcommand*{\jlreq@calc@current@linewidth}{%
- \dimexpr\zposx{jlreq@rest@width.pos.\the\jlreq@rest@linewidth@count} sp - \@totalleftmargin -
- \ifodd\zref@extractdefault{jlreq@rest@width.page.\the\jlreq@rest@linewidth@count}{page}{\c@page}%
- \oddsidemargin
- \else
- \evensidemargin
- \fi
- - 1in - \hoffset\relax
- }
-\else
- \newcommand*{\jlreq@calc@current@linewidth}{%
- \dimexpr
- \jlreq@ifydir{%
- \zposx{jlreq@rest@width.pos.\the\jlreq@rest@linewidth@count} sp - \hoffset
- \ifodd\zref@extractdefault{jlreq@rest@width.page.\the\jlreq@rest@linewidth@count}{page}{\c@page}%
- - \oddsidemargin
- \else
- - \evensidemargin
- \fi
- }{%
- \ifdim\pdfpagewidth=0pt
- \paperheight
- \else
- \pdfpageheight
- \fi
- - \topmargin - \headheight - \headsep - \voffset
- - \zposy{jlreq@rest@width.pos.\the\jlreq@rest@linewidth@count} sp
- }%
- - \@totalleftmargin - 1in
- \relax
- }
-\fi
-
-\newdimen\jlreq@current@linewidth
-\newdimen\jlreq@rest@linewidth
-% この命令以降,次にこの命令を実行する前まで\jlreq@rest@linewidth/\jlreq@rest@linewidthで
-% この場所における残り長さが取得できる.
-\newcommand*{\jlreq@savepos@for@rest@linewidth}{%
- \global\advance\jlreq@rest@linewidth@count by 1\relax
- \zsavepos{jlreq@rest@width.pos.\the\jlreq@rest@linewidth@count}%
- \zref@labelbyprops{jlreq@rest@width.page.\the\jlreq@rest@linewidth@count}{page}%
- \jlreq@current@linewidth=\jlreq@calc@current@linewidth
- \jlreq@rest@linewidth=\dimexpr\linewidth - \jlreq@current@linewidth\relax
-}
-\def\jlreq@savepos@iflabelundefined{\@ifundefined{\ZREF@RefPrefix @jlreq@rest@width.pos.\the\jlreq@rest@linewidth@count}}
-
-%. 基本設定
-% 和文文字,欧文文字の設定(とりあえずLuaTeX-jaのデフォルトのまま)
-\ifx l\jlreq@engine
- \ltjsetparameter{jacharrange={-1, +2, +3, -4, -5, +6, +7, -8}}
- % kanjiskip, xkanjiskipはjfmのものを使う
- \ltjsetparameter{kanjiskip=\maxdimen}
- \ltjsetparameter{xkanjiskip=\maxdimen}
-\else
- \kanjiskip=0pt plus 0.25zw minus 0pt
- \xkanjiskip=0.25zw plus 0.25zw minus 0.125zw
-\fi
-
-% 禁則処理,表1,2に従う
-% 行末
-% 初め括弧類
-\ifx l\jlreq@engine
- \newcommand*{\jlreq@setpostbreakpenalty}[2]{\ltjsetparameter{postbreakpenalty={`#1,#2}}}
- \newcommand*{\jlreq@setprebreakpenalty}[2]{\ltjsetparameter{prebreakpenalty={`#1,#2}}}
- \newcommand*{\jlreq@setjaxspmode}[2]{\ltjsetparameter{jaxspmode={`#1,#2}}}
-\else
- \newcommand*{\jlreq@setpostbreakpenalty}[2]{\postbreakpenalty`#1=#2}
- \newcommand*{\jlreq@setprebreakpenalty}[2]{\prebreakpenalty`#1=#2}
- \newcommand*{\jlreq@setjaxspmode}[2]{%
- \jlreq@switch{#2}{
- {inhibit}{\inhibitxspcode`#1=0}
- {preonly}{\inhibitxspcode`#1=1}
- {postonly}{\inhibitxspcode`#1=2}
- {allow}{\inhibitxspcode`#1=3}
- {\inhibitxspcode`#1=#2}
- }
- }
-\fi
-
-\jlreq@setpostbreakpenalty{(}{10000}
-\jlreq@setpostbreakpenalty{〔}{10000}
-\jlreq@setpostbreakpenalty{[}{10000}
-\jlreq@setpostbreakpenalty{{}{10000}
-\jlreq@setpostbreakpenalty{〈}{10000}
-\jlreq@setpostbreakpenalty{《}{10000}
-\jlreq@setpostbreakpenalty{「}{10000}
-\jlreq@setpostbreakpenalty{『}{10000}
-\jlreq@setpostbreakpenalty{【}{10000}
-\ifx p\jlreq@engine\else
-\jlreq@setpostbreakpenalty{⦅}{10000}
-\jlreq@setpostbreakpenalty{〘}{10000}
-\jlreq@setpostbreakpenalty{〖}{10000}
-\jlreq@setpostbreakpenalty{«}{10000}
-\jlreq@setpostbreakpenalty{〝}{10000}
-\fi
-\jlreq@setpostbreakpenalty{‘}{10000}
-\jlreq@setpostbreakpenalty{“}{10000}
-% 前置省略記号
-\jlreq@setpostbreakpenalty{¥}{10000}
-\jlreq@setpostbreakpenalty{$}{10000}
-\jlreq@setpostbreakpenalty{£}{10000}
-\jlreq@setpostbreakpenalty{#}{10000}
-\ifx p\jlreq@engine\else
-\jlreq@setpostbreakpenalty{€}{10000}
-\jlreq@setpostbreakpenalty{№}{10000}
-\fi
-% 行頭
-% 終わり括弧類
-\jlreq@setprebreakpenalty{)}{10000}
-\jlreq@setprebreakpenalty{〕}{10000}
-\jlreq@setprebreakpenalty{]}{10000}
-\jlreq@setprebreakpenalty{}}{10000}
-\jlreq@setprebreakpenalty{〉}{10000}
-\jlreq@setprebreakpenalty{》}{10000}
-\jlreq@setprebreakpenalty{」}{10000}
-\jlreq@setprebreakpenalty{』}{10000}
-\jlreq@setprebreakpenalty{】}{10000}
-\ifx p\jlreq@engine\else
-\jlreq@setprebreakpenalty{⦆}{10000}
-\jlreq@setprebreakpenalty{〙}{10000}
-\jlreq@setprebreakpenalty{〗}{10000}
-\jlreq@setprebreakpenalty{»}{10000}
-\jlreq@setprebreakpenalty{〟}{10000}
-\fi
-\jlreq@setprebreakpenalty{’}{10000}
-\jlreq@setprebreakpenalty{”}{10000}
-% ハイフン類
-\jlreq@setprebreakpenalty{‐}{10000}
-\ifx p\jlreq@engine\else
-\jlreq@setprebreakpenalty{゠}{10000}
-\jlreq@setprebreakpenalty{–}{10000}
-\jlreq@setprebreakpenalty{〜}{10000}
-\fi
-% 区切り約物
-\jlreq@setprebreakpenalty{!}{10000}
-\jlreq@setprebreakpenalty{?}{10000}
-\ifx p\jlreq@engine\else
-\jlreq@setprebreakpenalty{‼}{10000}
-\jlreq@setprebreakpenalty{⁇}{10000}
-\jlreq@setprebreakpenalty{⁈}{10000}
-\jlreq@setprebreakpenalty{⁉}{10000}
-\fi
-% 中点類
-\jlreq@setprebreakpenalty{・}{10000}
-\jlreq@setprebreakpenalty{:}{10000}
-\jlreq@setprebreakpenalty{;}{10000}
-% 句点類
-\jlreq@setprebreakpenalty{。}{10000}
-\jlreq@setprebreakpenalty{.}{10000}
-% 読点類
-\jlreq@setprebreakpenalty{、}{10000}
-\jlreq@setprebreakpenalty{,}{10000}
-% 繰返し記号
-\jlreq@setprebreakpenalty{ヽ}{10000}
-\jlreq@setprebreakpenalty{ヾ}{10000}
-\jlreq@setprebreakpenalty{ゝ}{10000}
-\jlreq@setprebreakpenalty{ゞ}{10000}
-\jlreq@setprebreakpenalty{々}{10000}
-\ifx p\jlreq@engine\else
-\jlreq@setprebreakpenalty{〻}{10000}
-\fi
-% 長音記号
-\jlreq@setprebreakpenalty{ー}{10000}
-% 小書きの仮名
-\jlreq@setprebreakpenalty{ぁ}{10000}
-\jlreq@setprebreakpenalty{ぃ}{10000}
-\jlreq@setprebreakpenalty{ぅ}{10000}
-\jlreq@setprebreakpenalty{ぇ}{10000}
-\jlreq@setprebreakpenalty{ぉ}{10000}
-\jlreq@setprebreakpenalty{ァ}{10000}
-\jlreq@setprebreakpenalty{ィ}{10000}
-\jlreq@setprebreakpenalty{ゥ}{10000}
-\jlreq@setprebreakpenalty{ェ}{10000}
-\jlreq@setprebreakpenalty{ォ}{10000}
-\jlreq@setprebreakpenalty{っ}{10000}
-\jlreq@setprebreakpenalty{ゃ}{10000}
-\jlreq@setprebreakpenalty{ゅ}{10000}
-\jlreq@setprebreakpenalty{ょ}{10000}
-\jlreq@setprebreakpenalty{ゎ}{10000}
-\ifx p\jlreq@engine\else
-\jlreq@setprebreakpenalty{ゕ}{10000}
-\jlreq@setprebreakpenalty{ゖ}{10000}
-\fi
-\jlreq@setprebreakpenalty{ッ}{10000}
-\jlreq@setprebreakpenalty{ャ}{10000}
-\jlreq@setprebreakpenalty{ュ}{10000}
-\jlreq@setprebreakpenalty{ョ}{10000}
-\jlreq@setprebreakpenalty{ヮ}{10000}
-\jlreq@setprebreakpenalty{ヵ}{10000}
-\jlreq@setprebreakpenalty{ヶ}{10000}
-\ifx p\jlreq@engine\else
-\jlreq@setprebreakpenalty{ㇰ}{10000}
-\jlreq@setprebreakpenalty{ㇱ}{10000}
-\jlreq@setprebreakpenalty{ㇲ}{10000}
-\jlreq@setprebreakpenalty{ㇳ}{10000}
-\jlreq@setprebreakpenalty{ㇴ}{10000}
-\jlreq@setprebreakpenalty{ㇵ}{10000}
-\jlreq@setprebreakpenalty{ㇶ}{10000}
-\jlreq@setprebreakpenalty{ㇷ}{10000}
-\jlreq@setprebreakpenalty{ㇸ}{10000}
-\jlreq@setprebreakpenalty{ㇹ}{10000}
-\jlreq@setprebreakpenalty{ㇺ}{10000}
-\jlreq@setprebreakpenalty{ㇻ}{10000}
-\jlreq@setprebreakpenalty{ㇼ}{10000}
-\jlreq@setprebreakpenalty{ㇽ}{10000}
-\jlreq@setprebreakpenalty{ㇾ}{10000}
-\jlreq@setprebreakpenalty{ㇿ}{10000}
-\fi
-
-% xkanjiskip
-% 初め括弧類(二分)
-\jlreq@setjaxspmode{(}{preonly}
-\jlreq@setjaxspmode{〔}{preonly}
-\jlreq@setjaxspmode{[}{preonly}
-\jlreq@setjaxspmode{{}{preonly}
-\jlreq@setjaxspmode{〈}{preonly}
-\jlreq@setjaxspmode{《}{preonly}
-\jlreq@setjaxspmode{「}{preonly}
-\jlreq@setjaxspmode{『}{preonly}
-\jlreq@setjaxspmode{【}{preonly}
-\ifx p\jlreq@engine\else
-\jlreq@setjaxspmode{⦅}{preonly}
-\jlreq@setjaxspmode{〘}{preonly}
-\jlreq@setjaxspmode{〖}{preonly}
-\jlreq@setjaxspmode{«}{preonly}
-\jlreq@setjaxspmode{〝}{preonly}
-\fi
-\jlreq@setjaxspmode{‘}{preonly}
-\jlreq@setjaxspmode{“}{preonly}
-% 終わり括弧類(二分)
-\jlreq@setjaxspmode{)}{postonly}
-\jlreq@setjaxspmode{〕}{postonly}
-\jlreq@setjaxspmode{]}{postonly}
-\jlreq@setjaxspmode{}}{postonly}
-\jlreq@setjaxspmode{〉}{postonly}
-\jlreq@setjaxspmode{》}{postonly}
-\jlreq@setjaxspmode{」}{postonly}
-\jlreq@setjaxspmode{』}{postonly}
-\jlreq@setjaxspmode{】}{postonly}
-\ifx p\jlreq@engine\else
-\jlreq@setjaxspmode{⦆}{postonly}
-\jlreq@setjaxspmode{〙}{postonly}
-\jlreq@setjaxspmode{〗}{postonly}
-\jlreq@setjaxspmode{»}{postonly}
-\jlreq@setjaxspmode{〟}{postonly}
-\fi
-\jlreq@setjaxspmode{’}{postonly}
-\jlreq@setjaxspmode{”}{postonly}
-% ハイフン類(二分)
-\jlreq@setjaxspmode{‐}{inhibit}
-\ifx p\jlreq@engine\else
-\jlreq@setjaxspmode{゠}{inhibit}
-\jlreq@setjaxspmode{–}{inhibit}
-\jlreq@setjaxspmode{〜}{inhibit}
-\fi
-% 区切り約物
-\jlreq@setjaxspmode{!}{postonly}
-\jlreq@setjaxspmode{?}{postonly}
-\ifx p\jlreq@engine\else
-\jlreq@setjaxspmode{‼}{postonly}
-\jlreq@setjaxspmode{⁇}{postonly}
-\jlreq@setjaxspmode{⁈}{postonly}
-\jlreq@setjaxspmode{⁉}{postonly}
-\fi
-% 中点類
-\jlreq@setjaxspmode{・}{postonly}
-\jlreq@setjaxspmode{:}{postonly}
-\jlreq@setjaxspmode{;}{postonly}
-% 句点類(二分)
-\jlreq@setjaxspmode{。}{postonly}
-\jlreq@setjaxspmode{.}{postonly}
-% 読点類(二分)
-\jlreq@setjaxspmode{、}{postonly}
-\jlreq@setjaxspmode{,}{postonly}
-% 分離禁止文字
-\jlreq@setjaxspmode{—}{inhibit}
-\jlreq@setjaxspmode{…}{inhibit}
-\jlreq@setjaxspmode{‥}{inhibit}
-\ifx p\jlreq@engine\else
-\jlreq@setjaxspmode{〳}{inhibit}
-\jlreq@setjaxspmode{〴}{inhibit}
-\jlreq@setjaxspmode{〵}{inhibit}
-\fi
-% 前置省略記号
-\jlreq@setjaxspmode{¥}{inhibit}
-\jlreq@setjaxspmode{$}{inhibit}
-\jlreq@setjaxspmode{£}{inhibit}
-\jlreq@setjaxspmode{#}{inhibit}
-\ifx p\jlreq@engine\else
-\jlreq@setjaxspmode{€}{inhibit}
-\jlreq@setjaxspmode{№}{inhibit}
-\fi
-% 後置省略記号
-\jlreq@setjaxspmode{°}{inhibit}
-\jlreq@setjaxspmode{′}{inhibit}
-\jlreq@setjaxspmode{″}{inhibit}
-\jlreq@setjaxspmode{℃}{inhibit}
-\jlreq@setjaxspmode{¢}{inhibit}
-\jlreq@setjaxspmode{%}{inhibit}
-\jlreq@setjaxspmode{‰}{inhibit}
-\ifx p\jlreq@engine\else
-\jlreq@setjaxspmode{㏋}{inhibit}
-\jlreq@setjaxspmode{ℓ}{inhibit}
-\jlreq@setjaxspmode{㌃}{inhibit}
-\jlreq@setjaxspmode{㌍}{inhibit}
-\jlreq@setjaxspmode{㌔}{inhibit}
-\jlreq@setjaxspmode{㌘}{inhibit}
-\jlreq@setjaxspmode{㌢}{inhibit}
-\jlreq@setjaxspmode{㌣}{inhibit}
-\jlreq@setjaxspmode{㌦}{inhibit}
-\jlreq@setjaxspmode{㌧}{inhibit}
-\jlreq@setjaxspmode{㌫}{inhibit}
-\jlreq@setjaxspmode{㌶}{inhibit}
-\jlreq@setjaxspmode{㌻}{inhibit}
-\jlreq@setjaxspmode{㍉}{inhibit}
-\jlreq@setjaxspmode{㍊}{inhibit}
-\jlreq@setjaxspmode{㍍}{inhibit}
-\jlreq@setjaxspmode{㍑}{inhibit}
-\jlreq@setjaxspmode{㍗}{inhibit}
-\jlreq@setjaxspmode{㎎}{inhibit}
-\jlreq@setjaxspmode{㎏}{inhibit}
-\jlreq@setjaxspmode{㎜}{inhibit}
-\jlreq@setjaxspmode{㎝}{inhibit}
-\jlreq@setjaxspmode{㎞}{inhibit}
-\jlreq@setjaxspmode{㎡}{inhibit}
-\jlreq@setjaxspmode{㏄}{inhibit}
-\fi
-% 分割禁止(分離禁止文字は特定の並びで分割禁止だが,とりあえず一括で禁止しておく.)
-\jlreq@setprebreakpenalty{—}{10000}
-\jlreq@setprebreakpenalty{…}{10000}
-\jlreq@setprebreakpenalty{‥}{10000}
-% ¥100とか70%とか……
-
-
-%. オプション処理
-%.. フォント関連
-\newdimen\jlreq@fontsize
-\ifx l\jlreq@engine
- \jlreq@tempdima=0.25mm
- \setlength{\jlreq@fontsize}{%
- \dimexpr\directlua{
- local act = string.char(92)
- local s = [[\jlreq@option@fontsize]]
- s = s:gsub("Q",act .. "jlreq@tempdima")
- tex.print(s)
- }\relax
- }%
-\else
- \setlength{\jlreq@fontsize}{\dimexpr\jlreq@option@fontsize\relax}
-\fi
-
-% JFMに関連する設定
-\ifx l\jlreq@engine
- % この値は後でjfm-jlreq内で読む
- \directlua{jlreq.open_bracket_pos = [[\jlreq@open@bracket@pos]]}
- \ifjlreq@burasage\directlua{jlreq.burasage = true}
- \else\directlua{jlreq.burasage = false}\fi
-\else
- % 非LuaTeXの場合はJFMの入れ替えと\everyparでの処理で対処.
- \def\jlreq@jfmname@prefix{}
- \def\jlreq@openbreackets@list{(〔[{〈《「『【}
- \ifx u\jlreq@engine\edef\jlreq@openbreackets@list{\jlreq@openbreackets@list {⦅〘〖«〝‘“}}\fi
- % \jlreq@jfmnameにJFMの名前を入れる
- \ifjlreq@burasage\edef\jlreq@jfmname@prefix{b\jlreq@jfmname@prefix}\fi
- \ifthenelse{\equal{\jlreq@open@bracket@pos}{zenkakunibu_nibu}}{\edef\jlreq@jfmname@prefix{\jlreq@jfmname@prefix z}}{}
- \ifx u\jlreq@engine\edef\jlreq@jfmname@prefix{u\jlreq@jfmname@prefix}\fi
- \edef\jlreq@jfmname{\jlreq@jfmname@prefix jlreq}
- \edef\jlreq@jfmnameg{\jlreq@jfmname@prefix jlreqg}
- \ifthenelse{\equal{\jlreq@open@bracket@pos}{zenkaku_tentsuki}}{
- \def\jlreq@openbracket@hook{\jlreq@ifintokenlist{\jlreq@nextchar}{\jlreq@openbreackets@list}{\inhibitglue}{}}
- \AtBeginDocument{\PushPostHook{par}{\futurelet\jlreq@nextchar\jlreq@openbracket@hook}}
- }{}
- \ifthenelse{\equal{\jlreq@open@bracket@pos}{nibu_tentsuki}}{
- \def\jlreq@openbracket@hook{\jlreq@ifintokenlist{\jlreq@nextchar}{\jlreq@openbreackets@list}{\hskip -1\jlreq@mol}{}}
- \AtBeginDocument{\PushPostHook{par}{\futurelet\jlreq@nextchar\jlreq@openbracket@hook}}
- }{}
-\fi
-% 開き括弧の幅が全角の場合は,ベタ組にするために補正が必要
-\ifthenelse{\equal{\jlreq@open@bracket@pos}{zenkakunibu_nibu}}{
- \def\jlreq@open@bracket@before@space{\hskip -.5\jlreq@mol}
-}{
- \def\jlreq@open@bracket@before@space{}
-}
-
-%. フォント
-\RequirePackage{lmodern}
-
-% 古いフォントコマンド
-\DeclareOldFontCommand{\jlreq@oldfontcommand@mc}{\normalfont\mcfamily}{\mathmc}
-\DeclareOldFontCommand{\jlreq@oldfontcommand@gt}{\normalfont\gtfamily}{\mathgt}
-\DeclareOldFontCommand{\jlreq@oldfontcommand@rm}{\normalfont\rmfamily}{\mathrm}
-\DeclareOldFontCommand{\jlreq@oldfontcommand@sf}{\normalfont\sffamily}{\mathsf}
-\DeclareOldFontCommand{\jlreq@oldfontcommand@tt}{\normalfont\ttfamily}{\mathtt}
-\DeclareOldFontCommand{\jlreq@oldfontcommand@bf}{\normalfont\bfseries}{\mathbf}
-\DeclareOldFontCommand{\jlreq@oldfontcommand@it}{\normalfont\itshape}{\mathit}
-\DeclareOldFontCommand{\jlreq@oldfontcommand@sl}{\normalfont\slshape}{\@nomath\sl}
-\DeclareOldFontCommand{\jlreq@oldfontcommand@sc}{\normalfont\scshape}{\@nomath\sc}
-\newcommand*{\jlreq@oldfontcommand@enable}{%
- \let\mc=\jlreq@oldfontcommand@mc
- \let\gt=\jlreq@oldfontcommand@gt
- \let\rm=\jlreq@oldfontcommand@rm
- \let\sf=\jlreq@oldfontcommand@sf
- \let\tt=\jlreq@oldfontcommand@tt
- \let\bf=\jlreq@oldfontcommand@bf
- \let\it=\jlreq@oldfontcommand@it
- \let\sl=\jlreq@oldfontcommand@sl
- \let\sc=\jlreq@oldfontcommand@sc
-}
-\newcommand*{\jlreq@oldfontcommand@disable}{%
- \let\mc=\@undefined
- \let\gt=\@undefined
- \let\rm=\@undefined
- \let\sf=\@undefined
- \let\tt=\@undefined
- \let\bf=\@undefined
- \let\it=\@undefined
- \let\sl=\@undefined
- \let\sc=\@undefined
-}
-
-\DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal}
-\DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal}
-
-%.. 和文
-\ifx l\jlreq@engine
- \RequirePackage{luatexja-adjust}
- \ltjenableadjust[lineend=extended,priority=true]
- \ltjsetparameter{stretch_priority={kanjiskip=10,xkanjiskip=-30}}
- \ltjsetparameter{shrink_priority={kanjiskip=0,xkanjiskip=0}}
-\fi
-
-\ifx u\jlreq@engine
- \def\jlreq@yokokanjiencoding{JY2}
- \def\jlreq@tatekanjiencoding{JT2}
-\fi
-\ifx p\jlreq@engine
- \def\jlreq@yokokanjiencoding{JY1}
- \def\jlreq@tatekanjiencoding{JT1}
-\fi
-\ifx l\jlreq@engine
- \def\jlreq@yokokanjiencoding{JY3}
- \def\jlreq@tatekanjiencoding{JT3}
- \expandafter\let\csname JY3/mc/m/n/10\endcsname\relax
- \expandafter\let\csname JT3/mc/m/n/10\endcsname\relax
- \DeclareFontShape{JY3}{mc}{m}{n}{<->\ltj@stdmcfont:jfm=jlreq;script=latn;-kern}{}
- \DeclareFontShape{JY3}{gt}{m}{n}{<->\ltj@stdgtfont:jfm=jlreq;script=latn;-kern}{}
- \DeclareFontShape{JT3}{mc}{m}{n}{<->\ltj@stdmcfont:jfm=jlreqv;script=latn;-kern}{}
- \DeclareFontShape{JT3}{gt}{m}{n}{<->\ltj@stdgtfont:jfm=jlreqv;script=latn;-kern}{}
-\else
- \expandafter\let\csname \jlreq@yokokanjiencoding/mc/m/n/10\endcsname\relax
- \expandafter\let\csname \jlreq@tatekanjiencoding/mc/m/n/10\endcsname\relax
- \DeclareFontShape{\jlreq@yokokanjiencoding}{mc}{m}{n}{<-> \jlreq@jfmname}{}
- \DeclareFontShape{\jlreq@yokokanjiencoding}{gt}{m}{n}{<-> \jlreq@jfmnameg}{}
- \DeclareFontShape{\jlreq@tatekanjiencoding}{mc}{m}{n}{<-> \jlreq@jfmname-v}{}
- \DeclareFontShape{\jlreq@tatekanjiencoding}{gt}{m}{n}{<-> \jlreq@jfmnameg-v}{}
-\fi
-\DeclareFontShape{\jlreq@yokokanjiencoding}{mc}{bx}{n}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq@yokokanjiencoding}{gt}{bx}{n}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq@yokokanjiencoding}{mc}{m}{it}{<->ssub*mc/m/n}{}
-\DeclareFontShape{\jlreq@yokokanjiencoding}{mc}{m}{sl}{<->ssub*mc/m/n}{}
-\DeclareFontShape{\jlreq@yokokanjiencoding}{mc}{m}{sc}{<->ssub*mc/m/n}{}
-\DeclareFontShape{\jlreq@yokokanjiencoding}{gt}{m}{it}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq@yokokanjiencoding}{gt}{m}{sl}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq@yokokanjiencoding}{mc}{bx}{it}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq@yokokanjiencoding}{mc}{bx}{sl}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq@tatekanjiencoding}{mc}{bx}{n}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq@tatekanjiencoding}{gt}{bx}{n}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq@tatekanjiencoding}{mc}{m}{it}{<->ssub*mc/m/n}{}
-\DeclareFontShape{\jlreq@tatekanjiencoding}{mc}{m}{sl}{<->ssub*mc/m/n}{}
-\DeclareFontShape{\jlreq@tatekanjiencoding}{mc}{m}{sc}{<->ssub*mc/m/n}{}
-\DeclareFontShape{\jlreq@tatekanjiencoding}{gt}{m}{it}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq@tatekanjiencoding}{gt}{m}{sl}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq@tatekanjiencoding}{mc}{bx}{it}{<->ssub*gt/m/n}{}
-\DeclareFontShape{\jlreq@tatekanjiencoding}{mc}{bx}{sl}{<->ssub*gt/m/n}{}
-
-% 数式フォント設定
-\ifx l\jlreq@engine\else
- \DeclareSymbolFont{mincho}{\jlreq@yokokanjiencoding}{mc}{m}{n}
- \DeclareSymbolFontAlphabet{\mathmc}{mincho}
- \SetSymbolFont{mincho}{bold}{\jlreq@yokokanjiencoding}{gt}{m}{n}
- \jfam\symmincho
- \DeclareMathAlphabet{\mathgt}{\jlreq@yokokanjiencoding}{gt}{m}{n}
-\fi
-\AtBeginDocument{%
- \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc}%
- \reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt}%
-}
-
-% \baselineskipの計算
-% いったん文字サイズを変更((u)platexの際にzh/zwをきちんとするため)
-\@setfontsize\normalsize{\jlreq@fontsize}{\jlreq@fontsize}%
-\newdimen\jlreq@baselineskip
-\ifx\jlreq@option@baselineskip\@empty
- \setlength{\jlreq@baselineskip}{\dimexpr 17\jlreq@fontsize/10\relax}%
-\else
- \ifx l\jlreq@engine
- \jlreq@tempdima=0.25mm
- \setlength{\jlreq@baselineskip}{%
- \dimexpr\directlua{
- local act = string.char(92)
- local s = [[\jlreq@option@baselineskip]]
- s = s:gsub("Q",act .. "jlreq@tempdima"):gsub("zh",act .. "zh"):gsub("zw",act .. "zw")
- tex.print(s)
- }\relax
- }%
- \else
- \setlength{\jlreq@baselineskip}{\jlreq@option@baselineskip}
- \fi
-\fi
-\ifdim\jlreq@fontsize>\jlreq@baselineskip
- \ClassError{jlreq}{The baselineskip is less than fontsize}{\@ehc}%
-\fi
-\ifthenelse{\lengthtest{\jlreq@baselineskip<1.5\jlreq@fontsize} \OR \lengthtest{\jlreq@baselineskip>2\jlreq@fontsize}}{
- \jlreq@warning{行間は二分以上全角以下が望ましい (2.4.2.d 注3)}
-}{}
-
-\emergencystretch 3\jlreq@mol
-
-\renewcommand{\normalsize}{%
- \@setfontsize\normalsize{\jlreq@fontsize}{\jlreq@baselineskip}%
- \abovedisplayskip 1.1\jlreq@fontsize \@plus .3\jlreq@fontsize \@minus .4\jlreq@fontsize
- \abovedisplayshortskip \z@ \@plus .3\jlreq@fontsize
- \belowdisplayskip .9\jlreq@fontsize \@plus.3\jlreq@fontsize \@minus.4\jlreq@fontsize
- \belowdisplayshortskip \belowdisplayskip
- \let\@listi\@listI}
-
-\if@tate\tate\fi % ここで発行しておく
-\mcfamily\selectfont\normalsize
-\setbox0\hbox{ } % 全角スペース
-\setlength\Cht{\ht0}
-\setlength\Cdp{\dp0}
-\setlength\Cwd{\wd0}
-\setlength\Cvs{\baselineskip}
-\setlength\Chs{\wd0}
-
-% 4.1.3.a
-% 文字サイズを基準としているような寸法に対しては,
-% \@setfontsizeが実行されるたびに追随して値を変える
-% その処理は\jlreq@setfontsizehookに入れる
-\let\jlreq@original@@setfontsize=\@setfontsize
-\renewcommand*{\@setfontsize}[3]{%
- \jlreq@original@@setfontsize{#1}{#2}{#3}%
- \jlreq@setfontsizehook
-}
-\def\jlreq@setfontsizehook{}
-\appto\jlreq@setfontsizehook{\ifdim\parindent>0pt\setlength{\parindent}{1\jlreq@mol}\fi}
-
-% 2.5.2 \baselineskipは一定の方がよい?
-\newcommand{\footnotesize}{%
- \@setfontsize\footnotesize{.8\jlreq@fontsize}{\dimexpr 115\jlreq@baselineskip/170\relax}% 脚注文字サイズの二分より少し小さい値を行間に: 4.2.5.e
- \abovedisplayskip .6\jlreq@gol \@plus.2\jlreq@gol \@minus.4\jlreq@gol
- \abovedisplayshortskip \z@ \@plus.1\jlreq@gol
- \belowdisplayshortskip .3\jlreq@gol \@plus.1\jlreq@gol \@minus.2\jlreq@gol
- \def\@listi{\leftmargin\leftmargini
- \topsep .3\jlreq@gol \@plus.1\jlreq@gol \@minus.1\jlreq@gol
- \parsep .2\jlreq@gol \@plus.1\jlreq@gol \@minus.1\jlreq@gol
- \itemsep \parsep}%
- \belowdisplayskip \abovedisplayskip}
-% tsize10.cloの引数を,そのまま\jlreq@fontsize/\jlreq@baselineskipでスケーリングしているだけ.
-\newcommand{\small}{%
- \@setfontsize\small{.9\jlreq@fontsize}{\dimexpr 11\jlreq@baselineskip/17\relax}%
- \abovedisplayskip .85\jlreq@gol \@plus.3\jlreq@gol \@minus.4\jlreq@gol
- \abovedisplayshortskip \z@ \@plus.2\jlreq@gol
- \belowdisplayshortskip .4\jlreq@gol \@plus.2\jlreq@gol \@minus.2\jlreq@gol
- \def\@listi{\leftmargin\leftmargini
- \topsep .4\jlreq@gol \@plus.2\jlreq@gol \@minus.2\jlreq@gol
- \parsep .2\jlreq@gol \@plus.1\jlreq@gol \@minus.1\jlreq@gol
- \itemsep \parsep}%
- \belowdisplayskip \abovedisplayskip}
-\newcommand{\scriptsize}{\@setfontsize\scriptsize{\dimexpr 7\jlreq@fontsize/10\relax}{\dimexpr 8\jlreq@baselineskip/17\relax}}
-\newcommand{\tiny}{\@setfontsize\tiny{\dimexpr 5\jlreq@fontsize/10\relax}{\dimexpr 6\jlreq@baselineskip/17\relax}}
-\newcommand{\large}{\@setfontsize\large{\dimexpr12\jlreq@fontsize/10\relax}{\jlreq@baselineskip}}
-\newcommand{\Large}{\@setfontsize\Large{\dimexpr14\jlreq@fontsize/10\relax}{\dimexpr 21\jlreq@baselineskip/17\relax}}
-\newcommand{\LARGE}{\@setfontsize\LARGE{\dimexpr17\jlreq@fontsize/10\relax}{\dimexpr 25\jlreq@baselineskip/17\relax}}
-\newcommand{\huge}{\@setfontsize\huge{2\jlreq@fontsize}{\dimexpr 28\jlreq@baselineskip/17\relax}}
-\newcommand{\Huge}{\@setfontsize\Huge{\dimexpr 25\jlreq@fontsize/10\relax}{\dimexpr 33\jlreq@baselineskip/17\relax}}
-
-\if@tate
- \ifx l\jlreq@engine
- \RequirePackage{lltjext}
- \else
- \RequirePackage{plext}
- \fi
- \renewcommand*{\@Kanji}[1]{\expandafter\kansuji\number #1\relax} % \relax追加
- \rensujiskip=0\zh plus 0.25\zh minus 0\zh
-\fi
-
-% このあたりはtarticleと同じ
-\setlength\lineskip{.1\jlreq@gol}
-\setlength\normallineskip{.1\jlreq@gol}
-\renewcommand{\baselinestretch}{}
-\setlength\parskip{0\p@ \@plus \p@}
-\setlength\parindent{1\jlreq@mol}
-\@lowpenalty 51
-\@medpenalty 151
-\@highpenalty 301
-
-% 変数定義(他にも散らばっているけど)
-% 罫線の太さ(4.4.3.c 注1)
-\newdimen\jlreq@omotekeiwidth
-\jlreq@omotekeiwidth=0.12mm
-\newdimen\jlreq@chuubusokeiwidth
-\jlreq@chuubusokeiwidth=0.25mm
-\newdimen\jlreq@urakeiwidth
-\jlreq@urakeiwidth=0.4mm
-% 脚注のインデント
-\newdimen\jlreq@footnoteindent
-
-%\RequirePackage{jlreq-debug}
-
-%. ページレイアウト
-% landscapeの場合縦横をひっくり返す
-\if@landscape
- \setlength\@tempdima {\paperheight}
- \setlength\paperheight{\paperwidth}
- \setlength\paperwidth {\@tempdima}
-\fi
-
-% \pdfpagewidthとか設定
-\ifx l\jlreq@engine
- \let\jlreq@pagewidth=\pagewidth
- \let\jlreq@pageheight=\pageheight
-\else
- \let\jlreq@pagewidth=\pdfpagewidth
- \let\jlreq@pageheight=\pdfpageheight
-\fi
-\setlength{\jlreq@pagewidth}{\paperwidth}
-\setlength{\jlreq@pageheight}{\paperheight}
-\iftombow
- \addtolength{\jlreq@pagewidth}{2in}
- \addtolength{\jlreq@pageheight}{2in}
-\fi
-
-
-\ifx l\jlreq@engine
- \def\jlreq@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@expand@speciallength#1{#1}
-\fi
-\def\jlreq@speciallength#1{\dimexpr\jlreq@expand@speciallength{#1}\relax}
-
-% 二段組み用パラメータ
-\setlength{\columnsep}{\jlreq@speciallength{\jlreq@option@column@gap}}
-\setlength{\columnseprule}{0pt}
-
-% デフォルト値は縦横ともにが0.5倍.
-%.. \textwidth:縦書きは縦,横書きは横
-% 一度\textwidthに一行の長さの文字数を入れる(段組の場合でも)
-\@tempdima=1\jlreq@fontsize
-\ifx\jlreq@option@line@length\@empty
- \if@tate
- \setlength{\textwidth}{0.75\paperheight}
- \else
- \setlength{\textwidth}{0.75\paperwidth}
- \fi
- \if@twocolumn
- \setlength{\textwidth}{\dimexpr(\textwidth - \columnsep)/2\relax}
- \fi
- \divide\textwidth\@tempdima
-\else
- \setlength{\textwidth}{\jlreq@speciallength{\jlreq@option@line@length}}
- \divide\textwidth\@tempdima
- \if@tate
- \ifnum\number\textwidth>52
- \jlreq@warning{一行の長さは52文字以下が望ましい (2.4.2.c 注2)}
- \fi
- \else
- \ifnum\number\textwidth>40
- \jlreq@warning{一行の長さは40文字以下が望ましい (2.4.2.c 注2)}
- \fi
- \fi
-\fi
-\multiply\textwidth\@tempdima
-\if@twocolumn
- \setlength{\textwidth}{\dimexpr2\textwidth + \columnsep\relax}
-\fi
-
-%.. \textheight:縦書きは横,横書きは縦
-\ifx\jlreq@option@number@of@lines\@empty
- \if@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@speciallength{\jlreq@option@number@of@lines\baselineskip} - \baselineskip + \topskip\relax}
-\fi
-
-\setlength{\topskip}{1\zw} % フォントサイズと一致させる
-\ifx\jlreq@option@headfoot@verticalpos\@empty
- \if@tate\def\jlreq@option@headfoot@verticalpos{1zh}
- \else\def\jlreq@option@headfoot@verticalpos{2zh}\fi
-\fi
-\setlength{\headsep}{\jlreq@speciallength{\jlreq@option@headfoot@verticalpos}}
-\ifdim\headsep<1\zw\jlreq@warning{基本版面との上下方向の最低の空き量を,基本版面の文字サイズの全角アキとする (26.1.a)}\fi
-\setlength{\headheight}{1\zh}
-%.. 横
-\ifx\jlreq@option@gutter\@empty
- % 中央配置
- \setlength{\oddsidemargin}{\paperwidth}
- \if@tate
- \addtolength{\oddsidemargin}{-\textheight}
- \else
- \addtolength{\oddsidemargin}{-\textwidth}
- \fi
- \setlength{\oddsidemargin}{.5\oddsidemargin}
- \addtolength{\oddsidemargin}{-1in}
- \setlength{\evensidemargin}{\oddsidemargin}
-\else
- \setlength{\oddsidemargin}{\jlreq@speciallength{\jlreq@option@gutter}}
- \setlength{\evensidemargin}{\dimexpr\paperwidth - \textheight - \oddsidemargin\relax}
- \if@tate
- \setlength{\jlreq@tempdima}{\oddsidemargin}
- \setlength{\oddsidemargin}{\evensidemargin}
- \setlength{\evensidemargin}{\jlreq@tempdima}
- \fi
- \addtolength{\oddsidemargin}{-1in}
- \addtolength{\evensidemargin}{-1in}
-\fi
-%.. 縦
-\ifx\jlreq@option@head@space\@empty
- \setlength{\topmargin}{\paperheight}
- \if@tate
- \addtolength{\topmargin}{-\textwidth}
- \else
- \addtolength{\topmargin}{-\textheight}
- \fi
- \ifx\jlreq@option@foot@space\@empty
- % 中央配置
- \setlength{\topmargin}{0.5\topmargin}
- \else
- \addtolength{\topmargin}{-\jlreq@speciallength{\jlreq@option@foot@space}}
- \fi
-\else
- \ifx\jlreq@option@foot@space\@empty
- \setlength{\topmargin}{\jlreq@speciallength{\jlreq@option@head@space}}
- \else
- % 両方指定されていたら,縦書きは地を,横書きは天を使う
- \if@tate
- \setlength{\topmargin}{\paperheight}
- \addtolength{\topmargin}{-\textwidth}
- \addtolength{\topmargin}{-\jlreq@speciallength{\jlreq@option@foot@space}}
- \else
- \setlength{\topmargin}{\jlreq@speciallength{\jlreq@option@head@space}}
- \fi
- \fi
-\fi
-
-
-\addtolength{\topmargin}{-\headsep}
-\addtolength{\topmargin}{-\headheight}
-\addtolength{\topmargin}{-1in}
-%.. 下
-% 本文から一文字分離すつもり
-\setlength{\footskip}{2\zh}
-% \maxdepth + \topskip = フォントサイズ×1.5
-\setlength{\maxdepth}{1.5\jlreq@fontsize}
-\addtolength{\maxdepth}{-\topskip}
-
-%. 見出し関係 (4.1)
-% 見出しの直前に実行される
-\newcommand*{\jlreq@hook@beforeheadings}[1]{}
-\def\jlreq@heading@allheadings{}
-%.. 中/半扉見出し
-% addcontentslineに渡すやつ:番号出すのと出さないの
-\newcommand{\DeclareTobiraHeading}[3]{%
- \appto{\jlreq@heading@allheadings}{,#1}%
- \expandafter\def\csname jlreq@heading@level@#1\endcsname{#2}%
- \expandafter\edef\csname jlreq@heading@setting@#1\endcsname{\unexpanded{#3}}%
- \expandafter\def\csname jlreq@heading@type@#1\endcsname{\RenewTobiraHeading}%
- \@ifundefined{c@#1}{\newcounter{#1}}{}%
- \@ifundefined{#1mark}{\expandafter\let\csname #1mark\endcsname\@gobble}{}%
- \@ifundefined{jlreq@heading@maketoc@#1}{%
- % {1 = *}{2 = ラベル}{3 = running head}
- \expandafter\def\csname jlreq@heading@maketoc@#1\endcsname##1##2##3{%
- \ifnum0\jlreq@ifempty{##1}{}{1}\ifnum #2>\c@secnumdepth 1\fi>0\else
- \csname #1mark\endcsname{##3}%
- \addcontentsline{toc}{#1}{\protect\numberline{##2}##3}%
- \fi
- }%
- }{}%
- \begingroup
- \def\jlreq@contents@format##1{##1}%
- \let\jlreq@contents@label@format=\@undefined
- \let\jlreq@format=\@undefined
- \edef\jlreq@label@format{\expandonce{\csname the#1\endcsname}}%
- \def\jlreq@heading@clearpage{\cleardoublepage}%
- \def\jlreq@pagestyle{empty}%
- \jlreq@parsekeyval[DeclareTobiraHeading]{
- {contentsline_format}{\def\jlreq@contents@format####1{##1}}
- {contentsline_label_format}{\def\jlreq@contents@label@format{##1}}
- {label_format}{\def\jlreq@label@format{##1}}
- {format}{\def\jlreq@format####1####2{##1}}
- {pagestyle}{\def\jlreq@pagestyle{##1}}
- {type}[han,naka]{
- \jlreq@switch{##1}{
- {han}{\def\jlreq@heading@clearpage{\clearpage}}
- {naka}{\def\jlreq@heading@clearpage{\cleardoublepage}}
- }
- }
- }{#3}%
- \ifx\jlreq@contents@label@format\@undefined
- \let\jlreq@contents@label@format=\jlreq@label@format
- \fi
- \ifx\jlreq@format\@undefined
- \def\jlreq@format##1##2{##1##2}%
- \fi
- \edef\jlreq@formatwlabel{\noexpand\jlreq@format{\expandonce{\jlreq@label@format}}}%
- \def\jlreq@addtodo{}%
- \@ifundefined{l@#1}{%
- \edef\jlreq@do{\unexpanded{\setbox\jlreq@tempboxa=\hbox}{\expandonce{\jlreq@label@format}}}%
- \jlreq@do
- \jlreq@tempdima=\wd\jlreq@tempboxa
- \jlreq@tempdimb=1\jlreq@mol
- \divide\jlreq@tempdima by \jlreq@tempdimb
- \eappto\jlreq@addtodo{%
- \noexpand\def\expandonce{\csname l@#1\endcsname}{\unexpanded{\@dottedtocline{#2}{0\jlreq@mol}}{\the\numexpr\jlreq@tempdima + 1\relax\noexpand\jlreq@mol}}%
- }%
- }{}%
- \edef\jlreq@do{%
- \expandonce{\jlreq@addtodo}%
- \noexpand\def\expandonce{\csname jlreq@TobiraHeading@start@#1\endcsname}[####1]####2{%
- \unexpanded{\ifnum#2>\c@secnumdepth\else}%
- \unexpanded{\refstepcounter{#1}}%
- \noexpand\fi
- \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}{}{\expandonce{\jlreq@label@format}}{####1}%
- \unexpanded{\ifnum#2>\c@secnumdepth\relax}%
- \expandonce{\jlreq@format{}{##1}}%
- \noexpand\else
- \expandafter\expandonce\expandafter{\jlreq@formatwlabel{##2}}%
- \noexpand\fi
- \noexpand\@afterheading
- \expandonce{\jlreq@heading@clearpage}%
- \unexpanded{\if@restonecol\twocolumn\fi}%
- }%
- \noexpand\def\expandonce{\csname jlreq@TobiraHeading@start@s@#1\endcsname}####1{%
- \expandonce{\jlreq@format{}{##1}}%
- \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}{}{\expandonce{\jlreq@label@format}}{####1}%
- \noexpand\@afterheading
- \expandonce{\jlreq@heading@clearpage}%
- \unexpanded{\if@restonecol\twocolumn\fi}%
- }%
- \noexpand\def\expandonce{\csname #1\endcsname}{%
- \unexpanded{\if@twocolumn\onecolumn\@restonecoltrue\else\@restonecolfalse\fi\cleardoublepage}%
- \ifx\jlreq@pagestyle\@empty\else\noexpand\thispagestyle{\expandonce{\jlreq@pagestyle}}\fi
- \noexpand\secdef{\expandonce{\csname jlreq@TobiraHeading@start@#1\endcsname}}{\expandonce{\csname jlreq@TobiraHeading@start@s@#1\endcsname}}}%
- }%
- \expandafter\endgroup
- \jlreq@do
-}
-
-\newcommand{\NewTobiraHeading}[3]{%
- \expandafter\@ifdefinable\csname #1\endcsname{\DeclareTobiraHeading{#1}{#2}{#3}}%
-}
-\newcommand{\RenewTobiraHeading}[3]{%
- \@ifundefined{#1}{\@latex@error{\expandafter\string\csname#1\endcsname\space undefined}\@ehc}{\DeclareTobiraHeading{#1}{#2}{#3}}%
-}
-\newcommand{\ProvideTobiraHeading}[3]{%
- \@ifundefined{#1}{\DeclareTobiraHeading{#1}{#2}{#3}}{}%
-}
-
-%.. 別行見出し
-% \jlreq@startBlockHeading{1 = 命令名}{2 = レベル}{3 = 字下げ}{4 = 前空き}{5 = 後ろ空き}{6 = トータル行数}{7 = フォーマット関連}*{見出し}[副題]
-% 字下げはa:**だと追加する値(ページ行頭には入らない),s:**も追加だがページ行頭でも入る,
-% r:**だとその値に強制する.
-\newcommand{\jlreq@startBlockHeading}[7]{%
- \edef\jlreq@startBlockHeading@format{\unexpanded{#7}}%
- \jlreq@startBlockHeading@{#1}{#2}{{#3}{#4}{#5}{#6}}%
-}
-% {1 = 命令}{2 = レベル}{3 = スペース関連}
-\newcommand{\jlreq@startBlockHeading@}[3]{%
- \@ifstar{\@dblarg{\jlreq@startBlockHeading@@{#1}{#2}{#3}{*}}}{\@dblarg{\jlreq@startBlockHeading@@{#1}{#2}{#3}{}}}%
-}
-% {1 = 命令}{2 = レベル}{3 = スペース関連}{4 = *}[5 = running head]{6 = 見出し}
-\long\def\jlreq@startBlockHeading@@#1#2#3#4[#5]#6{%
- \@ifnextchar[{\jlreq@startBlockHeading@@@{#1}{#2}{#3}{#4}{#5}{#6}}{\jlreq@startBlockHeading@@@{#1}{#2}{#3}{#4}{#5}{#6}[]}%
-}
-
-% {1 = レベル}{2 = ラベルフォーマット}{3 = 本体フォーマット}{4 = 副題フォーマット}{5 = *}{6 = 見出し}{7 = 副題}
-\long\def\jlreq@startBlockHeading@setformat#1#2#3#4#5#6#7{%
- % \jlreq@tempaに{ラベル}{見出し}{副題}という形のものを入れる
- \ifnum0\jlreq@ifempty{#5}{}{1}\ifnum #1>\c@secnumdepth 1\fi>0
- \def\jlreq@tempa{{}{#6}}%
- \else
- \def\jlreq@tempa{{#2}{#6}}%
- \fi
- \jlreq@ifempty{#7}{%
- \appto\jlreq@tempa{{}}%
- }{%
- \long\def\jlreq@tempb##1{#4}%
- \expandafter\appto\expandafter\jlreq@tempa\expandafter{\expandafter{\jlreq@tempb{#7}}}%
- }%
- \long\def\jlreq@tempb##1##2##3{#3}%
- \edef\jlreq@tempa{\unexpanded{\expandafter\def\expandafter\jlreq@result\expandafter}{\noexpand\jlreq@tempb\expandonce{\jlreq@tempa}}}%
- \jlreq@tempa
-}
-% {1 = 命令}{2 = レベル}{3 = スペース関連}{4 = *}{5 = running head}{6 = 見出し}[7 = 副題]
-\def\jlreq@startBlockHeading@@@#1#2#3#4#5#6[#7]{%
- \ifnum0\jlreq@ifempty{#4}{}{1}\ifnum #2>\c@secnumdepth 1\fi>0\else
- \refstepcounter{#1}%
- \fi
- % 後で呼び出す\jlreq@startBlockHeading@addtocontentslineを定義する
- \long\def\jlreq@tempa##1##2##3{\def\jlreq@tempa{##1}}%
- \expandafter\jlreq@tempa\jlreq@startBlockHeading@format
- \edef\jlreq@startBlockHeading@addtocontentsline{%
- \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}{\unexpanded{#4}}{\expandonce{\jlreq@tempa}}{\unexpanded{#5}}%
- }%
- \def\jlreq@do{\jlreq@startBlockHeading@setformat{#2}}%
- \expandafter\jlreq@do\jlreq@startBlockHeading@format{#4}{#6}{#7}%
- \def\jlreq@do{\jlreq@startBlockHeading@@@@#3}%
- \expandafter\jlreq@do\expandafter{\jlreq@result}%
-}
-\def\jlreq@startBlockHeading@removecolumn#1:{#1}
-
-\def\jlreq@startBlockHeading@analyzespace#1:#2\jlreq@endmark{%
- \jlreq@ifempty{#1}{%
- \def\jlreq@startBlockHeading@spacetype{}%
- \def\jlreq@startBlockHeading@space{}%
- }{%
- \let\jlreq@startBlockHeading@spacetype=#1%
- \expandafter\def\expandafter\jlreq@startBlockHeading@space\expandafter{\jlreq@startBlockHeading@removecolumn#2}%
- }%
-}
-
-% {1 = 字下げ}{2 = 前空き}{3 = 後ろ空き}{4 = トータル行数}{5 = 出力}
-\long\def\jlreq@startBlockHeading@@@@#1#2#3#4#5{%
- \if@noskipsec\leavevmode\fi
- \setbox\jlreq@tempboxa=\vbox{%
- \jlreq@ifempty{#1}{}{\hsize=\dimexpr\hsize - #1\relax}%
- \noindent #5}%
- \par
- \@afterindenttrue
- % \jlreq@tempskip(a/b)に前/後ろに入れるべき値を入れる
- % #2がa:ならばその値は\jlreq@tempskipaには入れず\jlreq@tempskipcに入れておく
- \jlreq@tempskipc=0pt
- \jlreq@startBlockHeading@analyzespace#2:\jlreq@endmark
- \setbox\jlreq@tempboxb=\vbox{ }%
- \jlreq@ifempty{#4}{%
- \ifx\jlreq@startBlockHeading@space\@empty\else
- \jlreq@tempskipa=\glueexpr\jlreq@startBlockHeading@space\relax
- \fi
- \jlreq@tempskipb=0pt\relax
- }{%
- \jlreq@tempskipb=\glueexpr(\baselineskip*(#4 + 1) - \ht\jlreq@tempboxb - \dp\jlreq@tempboxb - \ht\jlreq@tempboxa - \dp\jlreq@tempboxa)/2\relax
- \ifx\jlreq@startBlockHeading@space\@empty
- \jlreq@tempskipa=\jlreq@tempskipb
- \else
- \ifx a\jlreq@startBlockHeading@spacetype
- \jlreq@tempskipa=\jlreq@tempskipb
- \jlreq@tempskipc=\glueexpr\jlreq@startBlockHeading@space\relax
- \fi
- \ifx s\jlreq@startBlockHeading@spacetype
- \jlreq@tempskipa=\glueexpr\jlreq@tempskipb + \jlreq@startBlockHeading@space\relax
- \fi
- \ifx r\jlreq@startBlockHeading@spacetype
- \jlreq@tempskipa=\glueexpr\jlreq@startBlockHeading@space\relax%
- \jlreq@tempskipb=\glueexpr(\baselineskip*(#4 + 1) - \ht\jlreq@tempboxb - \dp\jlreq@tempboxb - \ht\jlreq@tempboxa - \dp\jlreq@tempboxa) - \jlreq@startBlockHeading@space\relax
- \fi
- \fi
- }%
- \ifdim\jlreq@tempskipc=0pt\else\vspace{\jlreq@tempskipc}\fi
- % \baselineskipから来るglueを引いておく
- \jlreq@tempskipa=\glueexpr\jlreq@tempskipa - \baselineskip + \dp\jlreq@tempboxb\relax
- \jlreq@startBlockHeading@addtocontentsline
- \setbox\jlreq@tempboxa=\vbox{%
- \ifdim\jlreq@tempskipa=0pt\else\vskip\jlreq@tempskipa\fi
- \noindent
- \jlreq@ifempty{#1}{}{\hskip #1}%
- \box\jlreq@tempboxa\nopagebreak}%
- \dp\jlreq@tempboxa=\dimexpr\dp\jlreq@tempboxa + \ht\jlreq@tempboxa\relax
- \ht\jlreq@tempboxa=0pt
- \box\jlreq@tempboxa
- \par\nobreak
- \prevdepth=0pt
- \jlreq@startBlockHeading@analyzespace#3:\jlreq@endmark
- \jlreq@tempskipb=\glueexpr\jlreq@tempskipb + \ht\jlreq@tempboxb - \baselineskip\relax
- \ifx\jlreq@startBlockHeading@space\@empty\else
- \ifx a\jlreq@startBlockHeading@spacetype
- \jlreq@tempskipb = \glueexpr\jlreq@tempskipb + \jlreq@startBlockHeading@space\relax
- \else
- \jlreq@tempskipb=\glueexpr\jlreq@startBlockHeading@space + \ht\jlreq@tempboxb - \baselineskip\relax
- \fi
- \fi
- \ifdim\jlreq@tempskipb=0pt\else\vspace{\jlreq@tempskipb}\fi
- \@afterheading
-}
-
-% \DeclareBlockHeading{命令名}{レベル}{設定}
-% 行取り(4.1.6)
-% a: lines=<何行取りか>
-% b,d: before_lines, after_lines
-% c: before_space, after_space
-% f: beforeやafterを省略する
-% font=<見出しフォント>, labelfont=<ラベルフォント>, subtitle_font=<副題フォント>
-% indent=<全体のインデント>
-% pagebreak=clearpage/cleardoublepage/newcolumn/nariyuki
-% なお,これ以外に見出しの前後に記号を付ける,あるいは罫線を見出しの前後に配置する,罫線で見出しを囲むなどといったことも行われている.
-% 縦組の偶数ページの場合は,ページ末に見出しを配置する.
-\newcommand{\DeclareBlockHeading}[3]{%
- \appto{\jlreq@heading@allheadings}{,#1}%
- \expandafter\def\csname jlreq@heading@level@#1\endcsname{#2}%
- \expandafter\edef\csname jlreq@heading@setting@#1\endcsname{\unexpanded{#3}}%
- \expandafter\def\csname jlreq@heading@type@#1\endcsname{\RenewBlockHeading}%
- \@ifundefined{c@#1}{\newcounter{#1}}{}%
- \@ifundefined{#1mark}{\expandafter\let\csname #1mark\endcsname\@gobble}{}%
- % 目次への出力をするマクロ.外部に切り出しておく.
- \@ifundefined{jlreq@heading@maketoc@#1}{%
- % {1 = *}{2 = ラベル}{3 = running head}
- \expandafter\def\csname jlreq@heading@maketoc@#1\endcsname##1##2##3{%
- \ifnum0\jlreq@ifempty{##1}{}{1}\ifnum #2>\c@secnumdepth 1\fi>0\else
- \csname #1mark\endcsname{##3}%
- \addcontentsline{toc}{#1}{\protect\numberline{##2}##3}%
- \fi
- }%
- }{}%
- \begingroup
- \def\jlreq@lines{1}%
- \def\jlreq@before@space{}%
- \def\jlreq@after@space{}%
- \def\jlreq@before@lines{}%
- \def\jlreq@after@lines{}%
- \def\jlreq@font{\normalsize}%
- \def\jlreq@subtitle@font{\normalsize}%
- \def\jlreq@indent{0}%
- \let\jlreq@format=\@undefined
- \def\jlreq@pagebreak{}%
- \let\jlreq@label@format=\@undefined
- \let\jlreq@subtitle@format=\@undefined
- \def\jlreq@pagetop@space{a}%
- \jlreq@parsekeyval[BlockHeading]{
- {lines}{\def\jlreq@lines{##1}}
- {before_space}{\def\jlreq@before@space{##1}}
- {after_space}{\def\jlreq@after@space{##1}}
- {before_lines}{\def\jlreq@before@lines{##1}}
- {after_lines}{\def\jlreq@after@lines{##1}}
- {font}{\def\jlreq@font{##1}}
- {subtitle_font}{\def\jlreq@subtitle@font{##1}}
- {indent}{\def\jlreq@indent{##1}}
- {format}{\edef\jlreq@format{\unexpanded{##1}}}
- {label_format}{\edef\jlreq@label@format{\unexpanded{##1}}}
- {subtitle_format}{\def\jlreq@subtitle@format{##1}}
- *{pagetop_space}{\def\jlreq@pagetop@space{s}}% ページ頭でもスペースを入れる
- {pagebreak}[clearpage,cleardoublepage,clearcolumn,nariyuki]{
- \jlreq@switch{##1}{
- {clearpage}{\def\jlreq@pagebreak{\clearpage}}
- {cleardoublepage}{\def\jlreq@pagebreak{\cleardoublepage}}
- {clearcolumn}{\if@twocolumn\def\jlreq@pagebreak{\newpage}\else\def\jlreq@pagebreak{}\fi}
- {nariyuki}{\def\jlreq@pagebreak{}}
- }
- }
- }{#3}%
- \ifx\jlreq@format\@undefined
- \edef\jlreq@format{%
- \expandonce{\jlreq@font}\unexpanded{##1}\unexpanded{##2}%
- \unexpanded{##3}%
- }%
- \fi
- \ifx\jlreq@label@format\@undefined
- \def\jlreq@label@format{\@seccntformat{#1}}%
- \fi
- \ifx\jlreq@subtitle@format\@undefined
- \edef\jlreq@subtitle@format{{\unexpanded{\nobreak\par\hspace*{4\jlreq@mol}}\expandonce{\jlreq@subtitle@font}---\unexpanded{##1}---}}%
- \fi
- \def\jlreq@addtodo{}%
- \@ifundefined{l@#1}{
- % 長さは適当に計測する
- \begingroup
- % ちょっと大きめで計測しておく
- \csname c@#1\endcsname=9
- \setbox\jlreq@tempboxa=\hbox{\jlreq@label@format}%
- \edef\jlreq@do{\noexpand\jlreq@tempdima=\the\dimexpr\wd\jlreq@tempboxa\relax}%
- \expandafter\endgroup
- \jlreq@do
- \jlreq@tempdimb=1\jlreq@mol
- \divide\jlreq@tempdima by \jlreq@tempdimb
- \eappto\jlreq@addtodo{%
- \noexpand\def\expandonce{\csname l@#1\endcsname}{\unexpanded{\@dottedtocline{#2}{0\jlreq@mol}}{\the\numexpr\jlreq@tempdima + 1\relax\noexpand\jlreq@mol}}%
- }%
- }{}%
- % before/after_lines優先
- \ifx\jlreq@before@space\@empty\else\edef\jlreq@before@space{r:\expandonce{\jlreq@before@space}}\fi
- \ifx\jlreq@before@lines\@empty\else\edef\jlreq@before@space{\expandonce{\jlreq@pagetop@space}:\expandonce{\jlreq@before@lines}\baselineskip}\fi
- \ifx\jlreq@after@space\@empty\else\edef\jlreq@after@space{r:\expandonce{\jlreq@after@space}}\fi
- \ifx\jlreq@after@lines\@empty\else\edef\jlreq@after@space{a:\expandonce{\jlreq@after@lines}\baselineskip}\fi
- \ifx\jlreq@indent\@empty\else\edef\jlreq@indent{\expandonce{\jlreq@indent}\jlreq@mol}\fi
- \edef\jlreq@do{%
- \expandonce{\jlreq@addtodo}%
- \noexpand\edef\expandonce{\csname #1\endcsname}{\noexpand\unexpanded{%
- \noexpand\jlreq@hook@beforeheadings{#1}%
- \expandonce{\jlreq@pagebreak}%
- \unexpanded{\jlreq@startBlockHeading{#1}{#2}}{\expandonce{\jlreq@indent}}{\expandonce{\jlreq@before@space}}{\expandonce{\jlreq@after@space}}{\expandonce{\jlreq@lines}}{{\expandonce{\jlreq@label@format}}{\expandonce{\jlreq@format}}{\expandonce{\jlreq@subtitle@format}}%
- }}}%
- }%
- \expandafter\endgroup
- \jlreq@do
-}
-
-\newcommand{\NewBlockHeading}[3]{%
- \expandafter\@ifdefinable\csname #1\endcsname{\DeclareBlockHeading{#1}{#2}{#3}}%
-}
-\newcommand{\RenewBlockHeading}[3]{%
- \@ifundefined{#1}{\@latex@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@heading@allheadings}{,#1}%
- \expandafter\def\csname jlreq@heading@level@#1\endcsname{#2}%
- \expandafter\edef\csname jlreq@heading@setting@#1\endcsname{\unexpanded{#3}}%
- \expandafter\def\csname jlreq@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@mol}{2\jlreq@gol}}}{}%
- \begingroup
- \def\jlreq@font{\normalfont\normalsize}%
- \def\jlreq@indent{0}%
- \def\jlreq@mark{}%
- \jlreq@parsekeyval[RuninHeading]{%
- {font}{\def\jlreq@font{##1}}
- {indent}{\def\jlreq@indent{##1}}
- {mark}{\def\jlreq@mark{##1}}
- }{#3}%
- % \@startsection{#1}{#2}{<indent>*fontsize}{0pt}{-fontsize}{font}
- \edef\jlreq@do{%
- \noexpand\def\expandonce{\csname #1\endcsname}{%
- \unexpanded{\jlreq@hook@beforeheadings{#1}}%
- \noexpand\@startsection{\unexpanded{#1}}{\unexpanded{#2}}{\expandonce{\jlreq@indent}\jlreq@mol}{0pt}{-1\jlreq@fontsize}{\expandonce{\jlreq@font}\expandonce{\jlreq@mark}}%
- }%
- }%
- \expandafter\endgroup
- \jlreq@do
-}
-\newcommand*{\NewRuninHeading}[3]{%
- \expandafter\@ifdefinable\csname #1\endcsname{\DeclareRuninHeading{#1}{#2}{#3}}%
-}
-\newcommand*{\RenewRuninHeading}[3]{%
- \@ifundefined{#1}{\@latex@error{\expandafter\string\csname#1\endcsname\space undefined}\@ehc}{\DeclareRuninHeading{#1}{#2}{#3}}%
-}
-\newcommand*{\ProvideRuninHeading}[3]{%
- \@ifundefined{#1}{\DeclareRuninHeading{#1}{#2}{#3}}{}%
-}
-
-%.. 窓見出し
-\newcount\jlreq@wraplinecount
-\newdimen\jlreq@hangindent
-\def\jlreq@CutinHeading@start#1#2#3#4#5#6#7{%
- \ifnum0\ifnum\jlreq@wraplinecount<-1 1\fi\ifnum\jlreq@wraplinecount>1 1\fi>0
- \ClassError{jlreq}{Can not use \expandafter\string\csname#1\endcsname\space here}{\@ehc}%
- \else
- \jlreq@CutinHeading@@start{#2}{#3}{#4}{#5}{#6}{#7}%
- \fi
-}
-% 1 = 書式指定,2 = インデント, 3 = 見出しと本文の間, 4 = これを越えたら二行以上,5 = これを越えたら三行以上,6 = テキスト
-\def\jlreq@CutinHeading@@start#1#2#3#4#5#6{%
- \par\leavevmode
- % 一行で処理したときの見出し長さを計測
- \setbox\@tempboxa=\hbox{#1#6}%
- \@tempdima=\wd\@tempboxa
- % 何行必要かを\jlreq@CutinHeading@linecountに入れる
- \ifdim\@tempdima>#5\def\jlreq@CutinHeading@linecount{3}%
- \else\ifdim\@tempdima>#4\def\jlreq@CutinHeading@linecount{2}%
- \else\def\jlreq@CutinHeading@linecount{1}\fi\fi
- % \@tempdimaが実際の一行の長さに近い
- \divide\@tempdima by \jlreq@CutinHeading@linecount
- % \jlreq@resultboxに見出し部分を,\jlreq@CutinHeading@linecountに何行使うかを入れる
- \ifnum\jlreq@CutinHeading@linecount=1\relax
- \setbox\jlreq@resultbox=\vbox{\parindent=0pt\rightskip=0pt\leftskip=0pt\hbox{#1#6}}%
- \def\jlreq@CutinHeading@linecount{2}%
- \else
- \jlreq@inlinenote@determinelength{#6}{#1}{}{\jlreq@CutinHeading@linecount}{\jlreq@CutinHeading@linecount}{\@tempdima}{\linewidth}%
- \def\jlreq@CutinHeading@linecount{3}%
- \fi
- % 普通の一行の高さ/深さに合わせて見出しのボックスを出力
- \setbox\@tempboxa=\vtop to \dimexpr\numexpr\jlreq@CutinHeading@linecount - 1\relax\baselineskip + 1\jlreq@gol\relax{\vskip 0pt plus 1fill minus 1fill \box\jlreq@resultbox\vskip 0pt plus 1fill minus 1fill}%
- \setbox\jlreq@tempboxa=\hbox{あ}%
- \ht\@tempboxa=\ht\jlreq@tempboxa
- \dp\@tempboxa=\dp\jlreq@tempboxa
- \@tempdima=\wd\@tempboxa
- % \hang****を設定
- \hangindent=\dimexpr#2\jlreq@mol + \@tempdima + #3\relax\hangafter=-\jlreq@CutinHeading@linecount
- \jlreq@hangindent=\hangindent\jlreq@wraplinecount=\hangafter
- \hspace*{#2\jlreq@mol}%
- \kern-\dimexpr\@tempdima + #3 + \parindent\relax
- \box\@tempboxa
- \hspace*{#3}%
- % 改段落が起こっても\hang****をキープするように\parを書き換えておく(終わったら元に戻す).
- % \jlreq@hangindent/\jlreq@wraplinecountにそれぞれ\hangindent/\hangafterに対応する値を入れて
- % \parのたびにそこから代入する.
- \def\par{%
- \@@par
- \ifnum\jlreq@wraplinecount<-1\relax
- \ifnum\jlreq@wraplinecount<-\prevgraf
- \advance\jlreq@wraplinecount by \prevgraf\hangindent=\jlreq@hangindent\hangafter=\jlreq@wraplinecount
- \else
- \jlreq@wraplinecount=1\jlreq@hangindent=0pt\relax
- \@restorepar
- \fi
- \else
- \jlreq@wraplinecount=1\jlreq@hangindent=0pt\relax
- \@restorepar
- \fi
- }%
- \ignorespaces
-}
-
-\newcommand*{\DeclareCutinHeading}[3]{%
- \expandafter\def\csname jlreq@heading@level@#1\endcsname{#2}%
- \expandafter\def\csname jlreq@heading@setting@#1\endcsname{#3}%
- \expandafter\def\csname jlreq@heading@type@#1\endcsname{\RenewCutinHeading}%
- \begingroup
- \def\jlreq@fontcommand{\headfont}%
- \def\jlreq@onelinemax{6\jlreq@fontsize}%
- \def\jlreq@twolinemax{20\jlreq@fontsize}%
- \def\jlreq@indent{0}%
- \def\jlreq@afterindent{1\jlreq@mol}%
- \jlreq@parsekeyval[CutinHeading]{
- {font}{\def\jlreq@fontcommand{##1}}
- {onelinemax}{\def\jlreq@onelinemax{##1}}
- {twolinemax}{\def\jlreq@twolinemax{##1}}
- {indent}{\def\jlreq@indent{##1}}
- {afterindent}{\def\jlreq@afterindent{##1}}
- }{#3}%
- \edef\jlreq@do{%
- \noexpand\def\expandonce{\csname #1\endcsname}{%
- \noexpand\jlreq@CutinHeading@start{#1}{\expandonce{\jlreq@fontcommand}}{\expandonce{\jlreq@indent}}{\expandonce{\jlreq@afterindent}}{\expandonce{\jlreq@onelinemax}}{\expandonce{\jlreq@twolinemax}}%
- }%
- }%
- \expandafter\endgroup
- \jlreq@do
-}
-\newcommand*{\NewCutinHeading}[3]{%
- \expandafter\@ifdefinable\csname #1\endcsname{\DeclareCutinHeading{#1}{#2}{#3}}%
-}
-\newcommand*{\RenewCutinHeading}[3]{%
- \@ifundefined{#1}{\@latex@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@heading@setting@#1}{\ClassError{jlreq}{Unknown heading: #1}{\@ehc}}%
- \expandafter\let\expandafter\level\expandafter=\csname jlreq@heading@level@#1\endcsname
- \expandafter\let\expandafter\setting\expandafter=\csname jlreq@heading@setting@#1\endcsname
- \expandafter\let\expandafter\macroname\expandafter=\csname jlreq@heading@type@#1\endcsname
- \edef\jlreq@do{\expandonce{\macroname}{#1}{\expandonce{\level}}{\expandonce{\setting},\unexpanded{#2}}}%
- \expandafter\endgroup
- \jlreq@do
-}
-% 見出し#1をマクロ#2に保存する
-\newcommand{\SaveHeading}[2]{%
- \@ifundefined{jlreq@heading@setting@#1}{\ClassError{jlreq}{Unknown heading: #1}{\@ehc}}%
- \begingroup
- \edef\jlreq@do{%
- \unexpanded{\edef#2}{%
- \noexpand\expandonce{\expandonce{\csname jlreq@heading@type@#1\endcsname}}%
- \noexpand\unexpanded{\unexpanded{{#1}}}%
- {\noexpand\expandonce{\expandonce{\csname jlreq@heading@level@#1\endcsname}}}%
- {\noexpand\expandonce{\expandonce{\csname jlreq@heading@setting@#1\endcsname}}}%
- }%
- }%
- \expandafter\endgroup
- \jlreq@do
-}
-
-\newcommand*{\jlreq@keepbaselineskip}[1]{%
- \begingroup
- \jlreq@tempdima=\baselineskip
- \edef\jlreq@do{\unexpanded{#1}\noexpand\baselineskip=\the\jlreq@tempdima}%
- \expandafter\endgroup
- \jlreq@do
-}
-
-\setcounter{secnumdepth}{3}
-\newcounter{part}
-\jlreq@switch{\jlreq@article@type}{
- {article}{\newcounter{section}}
- {\newcounter{chapter}\newcounter{section}[chapter]}% book, report
-}
-\newcounter{subsection}[section]
-\newcounter{subsubsection}[subsection]
-\newcounter{paragraph}[subsubsection]
-\newcounter{subparagraph}[paragraph]
-\renewcommand*{\@seccntformat}[1]{\csname the#1\endcsname\hspace{1\jlreq@mol}}
-\newcommand*{\headfont}{\gtfamily\sffamily}
-
-
-\newcommand*\jlreq@HeadingType[1]{%
- \expandafter\ifx\csname jlreq@heading@type@#1\endcsname\relax UndefinedHeading
- \else
- \jlerq@HeadingType@{#1}{\RenewTobiraHeading}{TobiraHeading}{%
- \jlerq@HeadingType@{#1}{\RenewBlockHeading}{BlockHeading}{%
- \jlerq@HeadingType@{#1}{\RenewRuninHeading}{RuninHeading}{%
- \jlerq@HeadingType@{#1}{\RenewCutinHeading}{CutinHeading}{%
- UnknownHeading}}}}%
- \fi
-}
-\newcommand*\jlerq@HeadingType@[2]{%
- \expandafter\expandafter\expandafter\ifx\csname jlreq@heading@type@#1\endcsname#2\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
-}
-
-%.. 各種定義
-\if@tate
- \renewcommand{\thepart}{\Kanji{part}}
- \ifthenelse{\equal{\jlreq@article@type}{article}}{}{\renewcommand{\thechapter}{\Kanji{chapter}}}
- \renewcommand{\thesection}{\rensuji{\@arabic\c@section}}
- \renewcommand{\thesubsection}{\rensuji{\@alph\c@subsection}}
- \renewcommand{\thesubsubsection}{%
- \rensuji{\@arabic\c@subsubsection}}
- \renewcommand{\theparagraph}{%
- (\rensuji{\@arabic\c@paragraph})}
- \renewcommand{\thesubparagraph}{%
- (\rensuji{\@arabic\c@subparagraph})}
-
- \ifthenelse{\equal{\jlreq@article@type}{article}}{
- \NewBlockHeading{part}{0}{font={\jlreq@keepbaselineskip{\LARGE\headfont}},indent=4,lines=4}
- }
- {% book, report
- \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\jlreq@mol}},format={\null\vfill {\Huge\headfont \hspace*{2\jlreq@mol}#1#2}\vspace*{2\jlreq@gol}}}
- \NewBlockHeading{chapter}{0}{indent=2,lines=6,label_format={第\thechapter 章\hspace*{1\jlreq@gol}},font={\huge\headfont}}
- \renewcommand{\thechapter}{\Kanji{chapter}}
- }
- \NewBlockHeading{section}{1}{font={\jlreq@keepbaselineskip{\Large\headfont}},indent=6,lines=3}
- \NewBlockHeading{subsection}{2}{font={\jlreq@keepbaselineskip{\large\headfont}},indent=8,lines=2}
- \NewBlockHeading{subsubsection}{3}{font={\jlreq@keepbaselineskip{\normalsize\headfont}},indent=10,lines=1,before_lines=1}
- \NewRuninHeading{paragraph}{4}{font={\jlreq@keepbaselineskip{\normalsize\headfont}}}
- \NewRuninHeading{subparagraph}{5}{font={\jlreq@keepbaselineskip{\normalsize\headfont}},indent=1}
-\else
- \renewcommand{\thepart}{\Roman{part}}
- \renewcommand{\thesubsection}{\thesection .\arabic{subsection}}
- \renewcommand{\thesubsubsection}{\thesubsection .\arabic{subsubsection}}
- \renewcommand{\theparagraph}{\thesubsubsection .\arabic{paragraph}}
- \renewcommand{\thesubparagraph}{\theparagraph .\arabic{subparagraph}}
- \ifthenelse{\equal{\jlreq@article@type}{article}}{
- \NewBlockHeading{part}{0}{font={\jlreq@keepbaselineskip{\LARGE\headfont}},label_format={第\thepart 部\hspace{1\jlreq@mol}},lines=4}
- \renewcommand{\thesection}{\arabic{section}}
- }
- {% book, report
- \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\jlreq@gol}},format={\null\vfil {\Huge\headfont #1#2}\vfil}}
- \NewBlockHeading{chapter}{0}{%
- format={{\jlreq@keepbaselineskip{\huge\headfont} #1#2}#3},
- label_format={第\thechapter 章\quad},
- lines=5}
- \renewcommand{\thechapter}{\arabic{chapter}}
- \renewcommand{\thesection}{\thechapter.\arabic{section}}
- \ifthenelse{\equal{\jlreq@article@type}{book}}{
- \ModifyHeading{chapter}{pagebreak=cleardoublepage}
- }{
- \ModifyHeading{chapter}{pagebreak=clearpage}
- }
- }
- \NewBlockHeading{section}{1}{font={\jlreq@keepbaselineskip{\Large\headfont}},lines=3}
- \NewBlockHeading{subsection}{2}{font={\jlreq@keepbaselineskip{\large\headfont}},lines=2}
- \NewBlockHeading{subsubsection}{3}{font={\jlreq@keepbaselineskip{\normalsize\headfont}},lines=1,before_lines=1}
- \NewRuninHeading{paragraph}{4}{font={\jlreq@keepbaselineskip{\normalsize\headfont}},indent=1}
- \NewRuninHeading{subparagraph}{5}{font={\jlreq@keepbaselineskip{\normalsize\headfont}},indent=2}
-\fi
-
-\ifthenelse{\equal{\jlreq@article@type}{article}}{}{% book, report
- \if@openright
- \ModifyHeading{part}{type=naka}
- \ModifyHeading{chapter}{pagebreak=cleardoublepage}
- \else
- \ModifyHeading{part}{type=han}
- \ModifyHeading{chapter}{pagebreak=clearpage}
- \fi
-}
-\jlreq@switch{\jlreq@article@type}{
- {book}{%
- \renewcommand{\jlreq@heading@maketoc@chapter}[3]{%
- \chaptermark{#3}%
- \jlreq@ifempty{#1}{%
- \ifnum0\if@mainmatter\else1\fi\ifnum\jlreq@heading@level@chapter>\c@secnumdepth 1\fi>0
- \addcontentsline{toc}{chapter}{#3}%
- \else
- \addcontentsline{toc}{chapter}{\protect\numberline{#2}#3}%
- \fi
- }{}%
- }
- }
- {report}{
- \renewcommand{\jlreq@heading@maketoc@chapter}[3]{%
- \chaptermark{#3}%
- \jlreq@ifempty{#1}{%
- \ifnum0\ifnum\jlreq@heading@level@chapter>\c@secnumdepth 1\fi>0
- \addcontentsline{toc}{chapter}{#3}%
- \else
- \addcontentsline{toc}{chapter}{\protect\numberline{#2}#3}%
- \fi
- }{}%
- }
- }
-}
-
-
-%. 注
-% 合印:4.2.3
-% 文字サイズは6ポイントくらい(4.2.3.a)とりあえす\scriptsize
-\newcommand*\jlreq@referencemark@format[1]{#1}
-\ifthenelse{\equal{\jlreq@referencemark}{inline}}{
- \newcommand*{\jlreq@notemark}[1]{%
- \jlreq@ifydir{%
- \hbox{}\hbox{\@textsuperscript{\normalfont\jlreq@referencemark@format{#1}}}\hbox{}%
- }{%
- \setbox\@tempboxa=\hbox{\scriptsize\jlreq@referencemark@format{#1}}%
- \raise\dimexpr.5\jlreq@gol - (\ht\@tempboxa + \dp\@tempboxa)/2\relax\box\@tempboxa
- }%
- }
-}{
- \newcommand*{\jlreq@notemark}[1]{{%
- \setbox\@tempboxa=\hbox{\scriptsize\jlreq@referencemark@format{#1}}%
- % 行頭に来たときに頭を天にそろえる処理.
- \jlreq@savepos@for@rest@linewidth
- \ifdim\jlreq@current@linewidth<\wd\@tempboxa
- \@tempdima=\jlreq@current@linewidth
- \else
- \@tempdima=\wd\@tempboxa
- \fi
- \setbox\jlreq@tempboxa=\hbox to\z@{\hskip-\@tempdima\raise\dimexpr.5\zw + (\ht\@tempboxa + \dp\@tempboxa)/2\relax\box\@tempboxa\hss}%
- \dp\jlreq@tempboxa=0pt\ht\jlreq@tempboxa=0pt\box\jlreq@tempboxa}}%
-}
-% \@footnotemarkをシンプルなものにする
-\def\jlreq@setdefaultnotemark#1#2{%
- \def#1{%
- \leavevmode
- \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
- #2%
- \ifhmode\spacefactor\@x@sf\fi
- \relax}
-}
-\let\jlreq@original@@footnotemark=\@footnotemark
-\jlreq@setdefaultnotemark\@footnotemark\@makefnmark
-%.. 脚注 (縦書きの時は傍注,4.2.5)
-{%
- \footnotesize\global\setlength{\footnotesep}{.7\baselineskip} % 何でかわからん……
- % \jlreq@tempdimaに罫線と脚注との間の長さを入れる
- % 脚注の行間よりやや広くする(4.2.5.f)
- \global\jlreq@tempdima=1.5\dimexpr\baselineskip - 1\jlreq@gol\relax
-}
-% 罫線の前は行間分,最大+文字サイズ分伸びる(4.2.5.g)
-\setlength{\skip\footins}{\dimexpr\baselineskip - 1\jlreq@gol \relax plus 1\jlreq@gol}
-%\setlength{\skip\footins}{0pt}
-% 脚注の前の罫線は表罫で,長さは行長の1/3位(4.2.5.f)
-\edef\jlreq@do{
- \unexpanded{\renewcommand{\footnoterule}}{%
- \unexpanded{\hrule width .333\textwidth height \jlreq@omotekeiwidth}%
- \noexpand\kern\the\jlreq@tempdima
- }
-}
-\jlreq@do
-
-% インデントの計算:脚注の長さが文字の整数倍になるように字下げする(4.2.5.b)
-{
- \footnotesize
- \jlreq@footnoteindent=1\jlreq@mol
- \@tempdima=\dimexpr\textwidth - \jlreq@footnoteindent\relax
- \@tempdimb=1\zw
- \divide\@tempdima\@tempdimb \multiply\@tempdima\@tempdimb
- \global\jlreq@footnoteindent=\dimexpr\textwidth - \@tempdima\relax
-}
-% 4.2.5.d
-\ifthenelse{\equal{\jlreq@footnotetext@indent}{one}}{
- \newcommand\@makefntext[1]{\parindent 1\jlreq@mol
- \addtolength{\leftskip}{\dimexpr\jlreq@footnoteindent + 1\jlreq@mol\relax}% 全体をインデント+1文字分下げる
- \noindent\hskip -1\jlreq@mol\jlreq@referencemark@format{\@thefnmark}\hskip 1\jlreq@mol#1}% 見出し出力と一文字分の空き
-}{
- \newcommand\@makefntext[1]{\parindent 1\jlreq@mol
- \addtolength{\leftskip}{\jlreq@footnoteindent}% 全体をインデント
- \noindent\hskip 1\jlreq@mol\jlreq@referencemark@format{\@thefnmark}\hskip 1\jlreq@mol#1}% 見出し出力と一文字分の空き
-}
-% 合印
-\renewcommand*{\@makefnmark}{%
- \jlreq@ifydir{\jlreq@notemark{\@thefnmark}}{\hbox{\jlreq@notemark{\@thefnmark}}}%
-}
-% 4.2.2注3
-\if@tate
- \renewcommand*{\thefootnote}{\jlreq@open@bracket@before@space\inhibitglue(\rensuji{\@arabic\c@footnote})\inhibitglue}
-\else
- \renewcommand*{\thefootnote}{\arabic{footnote})\inhibitglue}
-\fi
-
-%.. 後注(4.2.4)
-\def\jlreq@endnotemarkname{@thefnmark}% 合印用番号を一時的に入れるマクロ名
-\def\jlreq@endnotecounter{footnote}% 後注用のカウンタ名
-% 文字サイズは\footnotesizeを使う
-\newdimen\jlreq@endnote@prepostspace
-% 前の分との間は行間分空ける(4.2.4.f)
-\jlreq@endnote@prepostspace=\dimexpr\baselineskip - 1\jlreq@gol\relax
-\newdimen\jlreq@endnote@indent
-% 現在の後注一覧を,\jlreq@endnote@textsに{{合印1}{後注1}}{{合印2}{後注2}}...の形で保持する
-\def\jlreq@endnote@texts{}
-\def\jlreq@endnote@addtext#1#2{%
- \expandafter\gdef\expandafter\jlreq@endnote@texts\expandafter{\jlreq@endnote@texts{{#1}{#2}}}}
-\def\endnote{\@ifnextchar[{\jlreq@endnote}{\jlreq@endnote[]}}
-\def\endnotemark{\@ifnextchar[{\jlreq@endnotemark}{\jlreq@endnotemark[]}}
-\def\endnotetext{\@ifnextchar[{\jlreq@endnotetext}{\jlreq@endnotetext[]}}
-\long\def\jlreq@endnote[#1]#2{\jlreq@endnotemark[#1]\@endnotetext{#2}}
-\def\jlreq@endnotemark[#1]{%
- \jlreq@ifempty{#1}{%
- \stepcounter{\jlreq@endnotecounter}%
- \expandafter\protected@xdef\csname\jlreq@endnotemarkname\endcsname{\csname the\jlreq@endnotecounter\endcsname}%
- }{%
- \begingroup
- \csname c@\jlreq@endnotecounter\endcsname #1\relax
- \expandafter\unrestored@protected@xdef\csname\jlreq@endnotemarkname\endcsname{\csname \jlreq@endnotecounter\endcsname}%
- \endgroup
- }%
- \@endnotemark
-}
-\jlreq@setdefaultnotemark\@endnotemark\@makeendmark
-\long\def\jlreq@endnotetext[#1]#2{%
- \jlreq@ifempty{#1}{%
- \expandafter\protected@xdef\csname\jlreq@endnotemarkname\endcsname{\csname the\jlreq@endnotecounter\endcsname}%
- }{%
- \begingroup
- \csname c@\jlreq@endnotecounter\endcsname #1\relax
- \expandafter\unrestored@protected@xdef\csname\jlreq@endnotemarkname\endcsname{\csname \jlreq@endnotecounter\endcsname}%
- \endgroup
- }%
- \@endnotetext{#2}%
-}
-\def\@endnotetext#1{%
- \expandafter\let\expandafter\jlreq@tempa\expandafter=\csname\jlreq@endnotemarkname\endcsname
- \expandafter\jlreq@endnote@addtext\expandafter{\jlreq@tempa}{#1}%
-}
-\def\jlreq@theendnotes#1{%
- \jlreq@ifendmark{#1}{}{%
- \jlreq@output@endnotes#1
- \jlreq@theendnotes
- }%
-}
-\def\jlreq@output@endnotes#1#2{%
- \expandafter\def\csname\jlreq@endnotemarkname\endcsname{#1}%
- \item\@makeendtext{#2}%
-}
-
-\newcommand*{\theendnotes}{%
- \ifx\jlreq@endnote@texts\@empty\else
- \let\jlreq@tempa=\jlreq@endnote@texts
- \gdef\jlreq@endnote@texts{}%
- \edef\jlreq@endnote@beforeafterspace{\the\dimexpr\baselineskip - 1\jlreq@gol\relax plus \the\dimexpr 1\jlreq@gol\relax}%
- \begingroup
- \par
- \footnotesize
- % 後注の長さを文字サイズの整数倍にする(4.2.4.b)
- \jlreq@tempdima=\dimexpr\linewidth - \jlreq@endnote@indent - \leftskip\relax
- \@tempdimb=1\jlreq@mol
- \divide\jlreq@tempdima\@tempdimb\multiply\jlreq@tempdima\@tempdimb
- \begin{list}{}{%
- \itemsep=0pt\relax
- \parsep=0pt\relax
- \partopsep=0pt\relax
- \topsep=0pt\relax
- \leftmargin=\dimexpr\linewidth - \jlreq@tempdima\relax
- \itemindent=0pt\relax
- \topsep=\jlreq@endnote@beforeafterspace
- }%
- \expandafter\jlreq@theendnotes\jlreq@tempa\jlreq@endmark
- \end{list}
- \endgroup
- \par
- \fi
-}
-
-\jlreq@endnote@indent=2\jlreq@mol
-% 二行目以降を全角分下げる
-\newcommand{\@makeendtext}[1]{\parindent 1\jlreq@mol
- \hskip-1\jlreq@mol\csname\jlreq@endnotemarkname\endcsname\hskip 1\jlreq@mol#1}% 見出し出力と一文字分の空き
-\def\@makeendmark{\@makefnmark}
-
-% \theendnoteの出力を仕込む
-\jlreq@tempafalse
-% \jlreq@tempcにセクション名たちを入れていく
-\def\jlreq@tempc{}
-\@for\jlreq@tempa:=\jlreq@endnote@position\do{
- \jlreq@switch{\jlreq@tempa}{
- {_headings}{\jlreq@tempatrue}
- {_paragraph}{
- \jlreq@tempatrue% _paragraphの時は_headingsも有効にする
- \PushPostHook{par}{%
- \ifx\jlreq@endnote@texts\@empty\else
- \vskip\dimexpr-\baselineskip\relax
- \vskip\dimexpr0pt\relax
- \theendnotes
- \fi
- }
- }
- {\edef\jlreq@tempc{\jlreq@tempc,\jlreq@tempa}}
- }
-}
-
-\ifjlreq@tempa
- \edef\jlreq@do{%
- \unexpanded{\def\jlreq@hook@beforeheadings#1}{\expandonce{\jlreq@hook@beforeheadings{#1}}%
- \noexpand\theendnotes
- }
- }
- \jlreq@do
-\else
- \@for\@tempa:=\jlreq@tempc\do{
- \ifx\@tempa\@empty\else
- \edef\jlreq@do{%
- \unexpanded{\def\jlreq@hook@beforeheadings#1}{\expandonce{\jlreq@hook@beforeheadings{#1}}%
- \unexpanded{\def\@tempa}{\@tempa}\unexpanded{\def\@tempb{#1}}%
- \unexpanded{\ifx\@tempa\@tempb\theendnotes\fi}%
- }
- }
- \jlreq@do
- \fi
- }
-\fi
-\AtEndDocument{\theendnotes}
-
-%.. 傍注(4.2.7)
-\setlength{\marginparsep}{2\jlreq@mol} % フォントサイズ×2(4.2.7:特に問題に~e)
-{%
- \footnotesize
- \setlength{\jlreq@tempdima}{\dimexpr \paperwidth - \textwidth - 1in - \oddsidemargin - \marginparsep\relax}
- \ifx\jlreq@option@sidenote@width\@empty
- \setlength{\marginparwidth}{\dimexpr\jlreq@tempdima-2\jlreq@fontsize\relax}
- \else
- \setlength{\marginparwidth}{\jlreq@speciallength{\jlreq@option@sidenote@width}}
- \ifnum\marginparwidth>\jlreq@tempdima
- \ClassWarningNoLine{jlreq}{sidenote_width is greater than the width of the margin}
- \fi
- \fi
- \ifdim\marginparwidth>18\jlreq@mol
- \global\marginparwidth=18\jlreq@mol
- \else
- \@tempdima=1\zw% 1\jlreq@mol
- \global\divide\marginparwidth\@tempdima
- \global\multiply\marginparwidth\@tempdima
- \fi
- \global\setlength{\marginparpush}{.5\@tempdima} % 同上:g
-}
-
-\def\jlreq@sidenotemarkname{@thefnmark}% 合印用番号を一時的に入れるマクロ名
-
-% (1) \footnoteとかと同じ形式 sidenote_type=number
-% (2) 文中にマークを入れて,傍注には見出しが入る sidenote_type=mark
-% (3) 文中は強調文字列,傍注には見出しが入る sidenote_type=font
-% (4) 文中は何も無し,傍注には見出しが入る sidenote_type=none
-
-% (1) では\sidenote[]{}を定義
-% (2) では\sidenote{見出し}{注中身}を定義
-\def\@sidenotetext#1{%
- \marginpar{\reset@font\footnotesize
- \color@begingroup
- \@makesidetext{#1}%
- \color@endgroup
- }%
-}
-\jlreq@setdefaultnotemark\@sidenotemark\@makesidemark
-\ifthenelse{\equal{\jlreq@sidenote@type}{number}}{
- \def\jlreq@sidenotecounter{footnote}% 傍注用のカウンタ名
- \def\sidenote{\@ifnextchar[{\jlreq@sidenote}{\jlreq@sidenote[]}}
- \def\sidenotemark{\@ifnextchar[{\jlreq@sidenotemark}{\jlreq@sidenotemark[]}}
- \def\sidenotetext{\@ifnextchar[{\jlrqe@sidenotetext}{\jlreq@sidenotetext[]}}
- \long\def\jlreq@sidenote[#1]#2{\jlreq@sidenotemark[#1]\@sidenotetext{#2}}
- \def\jlreq@sidenotemark[#1]{%
- \jlreq@ifempty{#1}{%
- \stepcounter{\jlreq@sidenotecounter}%
- \expandafter\protected@xdef\csname\jlreq@sidenotemarkname\endcsname{\csname the\jlreq@sidenotecounter\endcsname}%
- }{%
- \begingroup
- \csname c@\jlreq@sidenotecounter\endcsname #1\relax
- \expandafter\unrestored@protected@xdef\csname\jlreq@sidenotemarkname\endcsname{\csname the\jlreq@sidenotecounter\endcsname}%
- \endgroup
- }%
- \@sidenotemark
- }
- \long\def\jlreq@sidenotetext[#1]#2{%
- \jlreq@ifempty{#1}{%
- \expandafter\protected@xdef\csname\jlreq@sidenotemarkname\endcsname{\csname the\jlreq@sidenotecounter\endcsname}%
- }{%
- \begingroup
- \csname c@\jlreq@sidenotecounter\endcsname#1\relax
- \expandafter\unrestored@protected@xdef\csname\jlreq@sidenotemarkname\endcsname{\csname the\jlreq@sidenotecounter\endcsname}%
- \endgroup
- }%
- \@sidenotetext{#2}%
- }
- \def\@sidenotemark{\@makesidemark}
- \ifx l\jlreq@engine
- \def\@makesidetext#1{\csname\jlreq@sidenotemarkname\endcsname\hspace{0.5\jlreq@mol}#1}
- \else
- % thefootnote = \inhibitglue (...だと\inhibitglueが効かない
- \def\@makesidetext#1{ \kern-1\zw\csname\jlreq@sidenotemarkname\endcsname\hspace{0.5\jlreq@mol}#1}
- \fi
- \def\@makesidemark{\@makefnmark}
-}{
- \def\jlreq@sidenote@keywordfont{\headfont}
- \def\jlreq@sidenote@defaultmark{*}
- \def\sidenote{\jlreq@sidenote}
- \def\sidenotemark{\jlreq@sidenotemark}
- \def\sidenotetext{\jlreq@sidenotetext}
- \def\jlreq@sidenote#1#2{\jlreq@sidenotemark{#1}\jlreq@sidenotetext{#1}{#2}}
- \def\jlreq@sidenotemark#1{%
- {\reset@font\jlreq@sidenote@keywordfont #1}%
- \ifx\jlreq@sidenote@defaultmark\@empty\else
- \expandafter\edef\csname\jlreq@sidenotemarkname\endcsname{\jlreq@sidenote@defaultmark}%
- \@sidenotemark
- \fi
- }
- \def\@sidenotemark{\@makesidemark}
- \def\jlreq@sidenotetext#1#2{%
- \expandafter\def\csname\jlreq@sidenotemarkname\endcsname{\jlreq@sidenote@defaultmark\inhibitglue\null{\reset@font\jlreq@sidenote@keywordfont\inhibitglue #1}}%
- \@sidenotetext{#2}%
- }
- \def\@makesidetext#1{{\headfont\csname\jlreq@sidenotemarkname\endcsname}\hspace*{1\jlreq@mol}#1}
- \def\@makesidemark{\@makefnmark}
-}
-
-%.. 割注(3.4)
-\def\inlinenotesize{.6\jlreq@fontsize} % 割注の文字サイズ
-\let\jlreq@inlinenote@autolinebreak=\\% 計測時は\linebreakより\\の方が安定する.悩ましい…….
-
-\newcommand{\jlreq@inlinenote@kakkofontsize}{%
- \fontsize{\dimexpr\inlinenotesize * 2\relax}{\dimexpr \inlinenotesize * 2\relax}%
- \selectfont
-}
-
-\newcommand{\jlreq@inlinenote@fontsize}{%
- \fontsize{\inlinenotesize}{\inlinenotesize}%
- \selectfont
-}
-
-% 割注を入れるための命令.\inlinenote{割注}で使う.
-% 改行位置は自動で計算されるが,常に正しいとは限らない.
-% \inlinenote*は自動で改行されない.\\で改行位置を指定する.
-\newif\ifjlreq@in@inlinenote
-\jlreq@in@inlinenotefalse
-\newcommand*{\inlinenote}{%
- \ifjlreq@in@inlinenote\ClassError{jlreq}{\string\inlinenote\space can't be nested}{\@ehc}\fi
- \jlreq@in@inlinenotetrue
- \ifvmode\leavevmode\fi
- \@ifstar\jlreq@inlinenote@noauto\jlreq@inlinenote@auto}
-\let\warichu=\inlinenote
-
-\newcommand*{\jlreq@inlinenote@auto}[1]{%
- % 割注初め括弧の前の場所を保存
- \jlreq@savepos@for@rest@linewidth
- % \jlreq@tempdimbに,現在行の残り長さを入れる
- \jlreq@tempdimb=\jlreq@rest@linewidth
- % 括弧の分を引いたものが,割注の使える長さ
- \setbox\@tempboxa=\hbox{\jlreq@inlinenote@kakkofontsize\inhibitglue\jlreq@open@bracket@before@space(\inhibitglue}%
- \addtolength{\jlreq@tempdimb}{-\wd\@tempboxa}%
- \ifdim\jlreq@tempdimb<0pt\jlreq@tempdimb=\linewidth\fi
- {%
- \setbox\jlreq@tempboxa=\hbox{\jlreq@inlinenote@kakkofontsize\inhibitglue \jlreq@open@bracket@before@space(}%
- \jlreq@box@putcenter\jlreq@tempboxa
- }%
- % 「初回」時はここに強制改行を入れる.これにより現在位置の取得がより正しくなる……といいなぁ
- \jlreq@savepos@iflabelundefined{\\}{}%
- % 割注内の\baselineskipを保存(後で使う).
- {\jlreq@inlinenote@fontsize\xdef\jlreq@inlinenote@baselineskip{\the\baselineskip}}%
- % 普通に並べた長さを計測し,その半分から始める
- \setbox\@tempboxa=\hbox{\jlreq@inlinenote@fontsize #1}%
- \jlreq@tempdimc=\wd\@tempboxa
- \divide\jlreq@tempdimc by 2\relax
- % \@tempcntbに,この長さで計測した場合の行数を入れる
- \ifdim\jlreq@tempdimc<\jlreq@tempdimb\@tempcntb=2\relax
- \else
- \jlreq@tempdima=\dimexpr\jlreq@tempdimc - \jlreq@tempdimb\relax
- \divide\jlreq@tempdima\linewidth
- \@tempcntb=\number\jlreq@tempdima
- \multiply\@tempcntb by 2\relax
- \advance\@tempcntb by 4\relax
- \fi
- % \jlreq@parshapeargに\parshapeに指定する書式の最後以外を入れる.
- \ifnum\@tempcntb>2\relax
- \edef\jlreq@parshapearg{0pt \the\jlreq@tempdimb\space 0pt \the\jlreq@tempdimb}%
- \@tempcnta=4\relax
- \@whilenum\@tempcnta<\@tempcntb\do{%
- \edef\jlreq@parshapearg{\jlreq@parshapearg\space 0pt \the\linewidth\space 0pt \the\linewidth}%
- \advance\@tempcnta by 2\relax
- }%
- \setlength{\jlreq@tempdimc}{\dimexpr\jlreq@tempdimc - \jlreq@tempdimb - \linewidth * \numexpr(\@tempcntb - 4)/2\relax\relax}%
- \else
- \def\jlreq@parshapearg{}%
- \fi
- % 行数を伸ばしつつ良いところを探していく
- \@whilenum\@tempcntb<1001\do{%
- \ifnum\@tempcntb>2\jlreq@tempdimb=\linewidth\fi
- \edef\@tempb{\the\@tempcntb}%
- \jlreq@inlinenote@determinelength{#1}{\jlreq@inlinenote@fontsize}{\jlreq@parshapearg}{2}{\@tempb}{\jlreq@tempdimc}{\jlreq@tempdimb}%
- \@tempcntb=\@tempb
- \ifnum\@tempcntb>999\relax% ループが長すぎる
- \global\setbox\jlreq@resultbox=\voidb@x%
- \@tempcntb=1001\relax
- \fi
- \ifvoid\jlreq@resultbox\else% 成功
- \edef\jlreq@inlinenote@lines{\the\@tempcntb}% 行数を保存
- \@tempcntb=1001\relax
- \fi
- \advance\@tempcntb by 2\relax
- \edef\jlreq@parshapearg{\jlreq@parshapearg 0pt \the\jlreq@tempdimb 0pt \the\jlreq@tempdimb}%
- }%
- \ifvoid\jlreq@resultbox
- \ClassWarning{jlreq}{\string\inlinenote\space failed, maybe a bug}%
- \else
- \@tempcnta=0
- \splittopskip=0pt\relax
- \splitmaxdepth=\maxdimen
- % 現在行の残り長さを思い出す
- \jlreq@tempdimb=\jlreq@rest@linewidth
- \setbox\@tempboxa=\hbox{\jlreq@inlinenote@kakkofontsize\inhibitglue\jlreq@open@bracket@before@space(\inhibitglue}%
- \addtolength{\jlreq@tempdimb}{-\wd\@tempboxa}%
- \setbox\@tempboxa=\box\jlreq@resultbox
- \@whilenum\@tempcnta<\jlreq@inlinenote@lines\do{%
- \ifnum\@tempcnta>0 \jlreq@inlinenote@autolinebreak\fi
- % \jlreq@tempdimaに今の行の長さを入れる
- \ifnum\@tempcnta<\numexpr\jlreq@inlinenote@lines - 2\relax
- \ifnum\@tempcnta=0\jlreq@tempdima=\jlreq@tempdimb
- \else\jlreq@tempdima=\linewidth\fi
- \else
- \jlreq@tempdima=-1pt\relax
- \fi
- {%
- \edef\@tempa{\the\vbadness}%
- \vbadness=10000
- \setbox\jlreq@tempboxa=\vsplit\@tempboxa to \dimexpr\jlreq@inlinenote@baselineskip*2\relax
- \vbadness=\@tempa\relax
- % \jlreq@inlinenote@autolinebreak=\\の場合には,割注の長さを計測した物に長さに強制する
- \jlreq@getlastbox{\jlreq@tempboxa}%
- \setbox\jlreq@tempboxb=\box\jlreq@resultbox
- \jlreq@getlastbox{\jlreq@tempboxa}%
- \setbox\jlreq@tempboxa=\box\jlreq@resultbox
- \ifx\jlreq@inlinenote@autolinebreak\\\relax
- \ifdim\jlreq@tempdima>0pt\relax
- \setbox\jlreq@tempboxa=\vbox{\jlreq@inlinenote@fontsize%
- \hbox to \jlreq@tempdima{\unhbox\jlreq@tempboxa}%
- \hbox to \jlreq@tempdima{\unhbox\jlreq@tempboxb}}%
- \else
- \setbox\jlreq@tempboxa=\vbox{\jlreq@inlinenote@fontsize%
- \hbox{\unhbox\jlreq@tempboxa}%
- \hbox{\unhbox\jlreq@tempboxb}}%
- \fi
- \else
- \setbox\jlreq@tempboxa=\vbox{\jlreq@inlinenote@fontsize%
- \hbox to \jlreq@tempdima{\unhbox\jlreq@tempboxa}%
- \hbox to \jlreq@tempdima{\unhbox\jlreq@tempboxb}}%
- \fi
- \jlreq@box@putcenter\jlreq@tempboxa
- }%
- \advance\@tempcnta by 2\relax
- }%
- \fi
- \jlreq@inlinenote@endnote
-}
-
-\newcommand*{\jlreq@inlinenote@noauto}[1]{%
- \setbox\jlreq@tempboxa=\hbox{\jlreq@inlinenote@kakkofontsize\jlreq@open@bracket@before@space(}%
- \inhibitglue\jlreq@box@putcenter\jlreq@tempboxa
- \jlreq@inlinenote@noauto@#1\\\jlreq@endmark\jlreq@endmark
- \jlreq@inlinenote@endnote
-}
-
-\def\jlreq@inlinenote@noauto@#1\\#2#3\jlreq@endmark{%
- \jlreq@inlinenote@noauto@@#1&\jlreq@endmark\jlreq@endmark
- \ifx#2\jlreq@endmark\def\jlreq@next{}\else\linebreak\def\jlreq@next{\jlreq@inlinenote@noauto@#2#3\jlreq@endmark}\fi
- \jlreq@next
-}
-
-\def\jlreq@inlinenote@noauto@@#1#3\jlreq@endmark{%
- \ifx#2\jlreq@endmark
- \setbox\@tempboxa=\hbox{\jlreq@inlinenote@fontsize #1}%
- \jlreq@tempdimc=\wd\@tempboxa
- \divide\jlreq@tempdimc by 2\relax
- \jlreq@inlinenote@determinelength{#1}{\jlreq@inlinenote@fontsize}{}{2}{2}{\jlreq@tempdimc}{\maxdimen}%
- \ifvoid\jlreq@resultbox\else
- {%
- \setbox\jlreq@tempboxa=\hbox{\jlreq@inlinenote@fontsize\box\jlreq@resultbox}%
- \jlreq@box@putcenter\jlreq@tempboxa
- }%
- \fi
- \def\jlreq@next{}%
- \else
- \def\jlreq@next{\jlreq@inlinenote@noauto@@@{#1}#2#3}%
- \fi
- \jlreq@next
-}
-
-\def\jlreq@inlinenote@noauto@@@#1#2&\jlreq@endmark{%
- {%
- \setbox\@tempboxa=\hbox{\jlreq@inlinenote@fontsize\vbox{\hbox{#1}\hbox{#2}}}%
- \jlreq@box@putcenter\@tempboxa
- }%
-}
-
-\newcommand{\jlreq@inlinenote@endnote}{%
- \jlreq@in@inlinenotefalse
- {%
-% \jlreq@inlinenote@kakkofontsize
-% \hbox{)}\inhibitglue
- \setbox\jlreq@tempboxa=\hbox{\jlreq@inlinenote@kakkofontsize)}%
- \jlreq@box@putcenter\jlreq@tempboxa
- \inhibitglue
- }%
-}
-
-% \jlreq@inlinenote@determinelength{テキスト(1)}{書式指定(2)}{\parshape指定(3)}{調整に使う行数(4)}{成功行数(5)}{最小長さ(6)}{最大長さ(7)}
-% \jlreq@resultboxに整形結果を返す.見つからなかったらvoid
-\newcommand{\jlreq@inlinenote@determinelength}[7]{%
-% \message{#1 の試行開始,行数 = #5, \the#6 から \the#7まで}%
- \@tempcnta=1\relax
- \def\@tempa{}%
- \@whilenum\@tempcnta<#4\do{%
- \expandafter\def\expandafter\@tempa\expandafter{\@tempa 0pt \the\jlreq@tempdima}%
- \advance\@tempcnta by 1\relax
- }%
- \@tempcnta=0
- \jlreq@tempdima=#6\relax
- % 最後の行を少しずつ伸ばしていく
- \@whilenum\@tempcnta<1000\do{%
- \ifnum\@tempcnta>999\relax% ループが長すぎる
- \global\setbox\jlreq@resultbox=\voidb@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@tempdima = \the\jlreq@tempdima で試行,行数は\the\@tempcntb , 書式 #5 #3 \@tempa 0pt \the\maxdimen}%
- \fi
- \jlreq@getlastbox{\@tempboxa}%
- \setbox\jlreq@tempboxa=\box\jlreq@resultbox
- \ifnum\@tempcntb<#5\relax% 行数が達していないならOK
-% \message{行数 = \the\@tempcntb により確定}
- \global\setbox\jlreq@resultbox=\vbox{#2%
- \unvbox\@tempboxa\hbox{\unhbox\jlreq@tempboxa\unskip\unskip\unpenalty}%
- \@whilenum\@tempcntb<#5\do{\hbox{}\advance\@tempcntb by 1}}%
- \@tempcnta=1001\relax
- \else
- % そうでない場合は最後の二行の長さを比較する
- \jlreq@getlastbox{\@tempboxa}%
- \setbox\jlreq@tempboxb=\box\jlreq@resultbox
-% \message{最終行の長さ \the\wd\jlreq@tempboxa, その前の長さ \the\wd\jlreq@tempboxb}%
- \ifdim\wd\jlreq@tempboxa>\wd\jlreq@tempboxb
- \advance\jlreq@tempdima by 0.3pt\relax
- \else
- % 後ろが短いのでOK
- \global\setbox\jlreq@resultbox=\vbox{#2\unvbox\@tempboxa\box\jlreq@tempboxb\box\jlreq@tempboxa}%
- \jlreq@resultdimen=\jlreq@tempdima
- \@tempcnta=1001\relax
- \fi
- \fi
- \ifdim\jlreq@tempdima>#7\relax
- \global\setbox\jlreq@resultbox=\box\voidb@x
- \@tempcnta=1001\relax
- \fi
- \advance\@tempcnta by 1\relax
- }%
-}
-
-
-%. ページスタイル.
-% とりあえず脇に縦書きで配置するのは無視する.
-% メモ:
-% 2.6.1.cの後半が前半と整合的でないように見える……
-% 柱:両柱と片柱(2.6.3)
-\@tempdima=\jlreq@speciallength{\jlreq@headfoot@sidemargin}
-\ifthenelse{\lengthtest{\@tempdima=0pt} \OR \(\lengthtest{0.99\zw < \@tempdima} \AND \lengthtest{\@tempdima < 1.01\zw}\)}{}{
- \jlreq@warning{ノンブルまたは柱は,基本版面の左右にそろえるか,全角アキだけ寄せた位置に配置する (2.6.1.b)}
-}
-
-% bottom-leftみたいなのを解釈する.入力の順番はどっちでも良いが,出力は<top/bottom><left/right>の順番
-% #1にセットする.
-\def\jlreq@pagestyle@parse@position@#1-#2\jlreq@endmark{%
- \def\jlreq@tempa{#1}\def\jlreq@tempb{#2}%
- \jlreq@ifempty{#2}{%
- \ifx\jlreq@tempb\@empty\ClassError{jlreq}{Invalid position: #1}{\@ehc}\fi
- }{%
- \def\@tempa##1-{\def\jlreq@tempb{##1}}%
- \@tempa#2\relax
- }%
-}
-\newcommand*\jlreq@pagestyle@parse@position@@[1]{%
- \ifthenelse{\equal{#1}{top} \OR \equal{#1}{bottom}}{\def\jlreq@tempc{#1}}{%
- \ifthenelse{\equal{#1}{left} \OR \equal{#1}{right} \OR \equal{#1}{center}}{\def\jlreq@tempd{#1}}{%
- \ClassError{jlreq}{Invalid position: #1}{\@ehc}%
- }%
- }%
-}
-\newcommand*{\jlreq@pagestyle@parse@position}[2]{%
- \begingroup
- \jlreq@pagestyle@parse@position@#2-\jlreq@endmark
- % \jlreq@tempcに縦方向を,\jlreq@tempdに横方向を入れる
- \def\jlreq@tempc{}\def\jlreq@tempd{}%
- \expandafter\jlreq@pagestyle@parse@position@@\expandafter{\jlreq@tempa}%
- \expandafter\jlreq@pagestyle@parse@position@@\expandafter{\jlreq@tempb}%
- \ifx\jlreq@tempc\@empty\edef\jlreq@tempc{\expandafter\@firstoftwo#1}\fi
- \ifx\jlreq@tempd\@empty\edef\jlreq@tempd{\expandafter\@secondoftwo#1}\fi
- \edef\jlreq@do{\unexpanded{\def#1}{{\jlreq@tempc}{\jlreq@tempd}}}%
- \expandafter\endgroup
- \jlreq@do
-}
-
-% odd_running_head=_sectionのように下線から始まる場合,その値の見出し命令を柱に出すようにする.
-% 要するに\ps@***に\sectionmarkを定義するように仕込む.
-% 常にodd=rightmark,even=leftmarkになる.
-% 場所指定は奇数ページの方.偶数ページは反対になる.
-% mark_format={_chapter={第\thechapter 章\quad #1}}のような形.odd=とかeven=とかも仕込めるようにしたけど
-% あまり意味がない気がしてきた.oddやevenが優先される.
-\newcommand*{\DeclarePageStyle}[2]{%
- \expandafter\edef\csname jlreq@pagestyle@setting@#1\endcsname{\unexpanded{#2}}%
- \begingroup
- \def\jlreq@nombre@position{{bottom}{center}}%
- \def\jlreq@running@head@position{{top}{center}}%
- \def\jlreq@nombre{\thepage}%
- \def\jlreq@odd@running@head{}%
- \def\jlreq@even@running@head{}%
- \def\jlreq@command{}%
- \def\jlreq@mark@format{}%
- % 柱とノンブルの間
- \def\jlreq@gap{1.5\zw}%
- \newif\ifjlreq@clearmark\jlreq@clearmarktrue
- \jlreq@parsekeyval[PageStyle]{
- {nombre_position}{\jlreq@pagestyle@parse@position{\jlreq@nombre@position}{##1}}
- {running_head_position}{\jlreq@pagestyle@parse@position{\jlreq@running@head@position}{##1}}
- {nombre}{\def\jlreq@nombre{##1}}
- {odd_running_head}{\def\jlreq@odd@running@head{##1}}
- {even_running_head}{\def\jlreq@even@running@head{##1}}
- {mark_format}{\edef\jlreq@mark@format{\unexpanded{##1}}}
- {command}{\edef\jlreq@command{\unexpanded{##1}}}
- {gap}{\def\jlreq@gap{##1}}
- *{no_clear_mark}{\jlreq@clearmarkfalse}
- }{#2}%
- \ifthenelse{\(
- \boolean{@tate} \AND \(
- \equal{\expandafter\@secondoftwo\jlreq@nombre@position}{right} \OR
- \equal{\expandafter\@secondoftwo\jlreq@running@head@position}{right}
- \)\) \OR \(
- \(\NOT \boolean{@tate}\) \AND \(
- \equal{\expandafter\@secondoftwo\jlreq@nombre@position}{left} \OR
- \equal{\expandafter\@secondoftwo\jlreq@running@head@position}{left}
- \)
- \)}{%
- \if@twoside
- \jlreq@warning{柱やノンブルは,左ページでは,基本版面の左端の延長線にノンブル又は柱の先頭をそろえて配置するか,基本版面の左端の延長線から基本版面の文字サイズの全角アキだけ右に寄せた位置に配置する(ページスタイル #1 内,2.6.1.b)}%
- \fi
- }{}%
- \ifthenelse{\lengthtest{\jlreq@gap < 1.49\zw} \OR \( \lengthtest{\jlreq@gap > 1.51\zw} \AND \lengthtest{\jlreq@gap < 1.99\zw} \) \OR \lengthtest{\jlreq@gap > 2.01\zw}}{\jlreq@warning{ノンブルと柱との空き量は文字サイズの2倍又は1.5倍とする(ページスタイル #1 内,2.6.1.c)}}{}%
- % 見出しを出す場合:evenに章などの高いレベルの見出しを出す(2.6.3.a)
- \def\jlreq@markdefinition{}%
- \def\jlreq@even@running@head@level{}%
- % **markを作る
- % \jlreq@makemark{odd/even}running_headの中身\jlreq@endmark
- \def\jlreq@markdefinition{}%
- \def\jlreq@makemark##1##2##3\jlreq@endmark{%
- \ifx_##2%
- \ifthenelse{\equal{##1}{even}}{%
- \def\jlreq@even@running@head{\leftmark}%
- }{%
- \def\jlreq@odd@running@head{\rightmark}%
- }%
- \@ifundefined{jlreq@heading@setting@##3}{}{%
- \expandafter\edef\csname jlreq@##1@running@head@level\endcsname{\csname jlreq@heading@level@##3\endcsname}%
- }%
- \def\jlreq@tempa####1{%
- \jlreq@tempafalse
- \let\jlreq@result=\@undefined
- \jlreq@parsekeyval*{
- {##1}{\edef\jlreq@result{\unexpanded{########1}}\jlreq@tempatrue}
- {##2##3}{\ifjlreq@tempa\else\edef\jlreq@result{\unexpanded{########1}}\fi}
- }{####1}%
- }%
- \expandafter\jlreq@tempa\expandafter{\jlreq@mark@format}%
- \ifx\jlreq@result\@undefined
- \edef\jlreq@result{\expandonce{\csname the##3\endcsname}\noexpand\quad\unexpanded{####1}}%
- \fi
- \ifthenelse{\equal{##1}{even}}{%
- \def\jlreq@markcommand{\markboth}%
- \def\jlreq@markcommandafter{{}}%
- }{%
- \def\jlreq@markcommand{\markright}%
- \def\jlreq@markcommandafter{}%
- }%
- \edef\jlreq@markdefinition{%
- \expandonce{\jlreq@markdefinition}%
- \noexpand\def\expandonce{\csname ##3mark\endcsname}\unexpanded{####1}{\expandonce{\jlreq@markcommand}
- {\expandonce{\jlreq@result}}\expandonce{\jlreq@markcommandafter}}%
- }%
- \fi
- \jlreq@ifendmark{##2}{}{\@gobble}%
- }%
- \def\@tempb{\jlreq@makemark{even}}%
- \expandafter\@tempb\jlreq@even@running@head\jlreq@endmark\jlreq@endmark
- \def\jlreq@odd@running@head@level{}%
- \def\@tempb{\jlreq@makemark{odd}}%
- \expandafter\@tempb\jlreq@odd@running@head\jlreq@endmark\jlreq@endmark
- \ifx\jlreq@odd@running@head@level\@empty\else\ifx\jlreq@even@running@head@level\@empty\else
- \ifnum\jlreq@odd@running@head@level<\jlreq@even@running@head@level
- \jlreq@warning{偶数ページには奇数ページよりアウトラインレベルの高い見出しを入れる(ページスタイル #1内,2.6.3.a)}%
- \fi
- \fi\fi
- % ##1 ##2 ##3と並んだヘッダを作る,戻り値は\jlreq@result
- \def\jlreq@setheadfoot@##1##2##3{%
- % -.5\zwは端にそろえるための補正
- \jlreq@ifempty{##1}{\def\jlreq@left{}}{\edef\jlreq@left{\noexpand\hspace*{\dimexpr\jlreq@expand@speciallength{\jlreq@headfoot@sidemargin}\if@tate - 0.5\zw\fi\relax}\unexpanded{##1}}}%
- % +\topskip - .5\zwは\jlreq@headfoot@sidemargin = 0ptの時に本文の右に一致させるための補正.
- \jlreq@ifempty{##3}{\def\jlreq@right{}}{\edef\jlreq@right{\unexpanded{##3}\noexpand\hspace*{\dimexpr\jlreq@expand@speciallength{\jlreq@headfoot@sidemargin}\if@tate + \topskip - .5\zw\fi\relax}}}%
- \jlreq@ifempty{##2}{%
- \edef\jlreq@result{\expandonce{\jlreq@left}\hfil\expandonce{\jlreq@right}}%
- \jlreq@ifempty{##1}{\jlreq@ifempty{##3}{\def\jlreq@result{}}{}}{}%
- }{%
- \ifx\jlreq@left\@empty\else\edef\jlreq@left{\noexpand\hbox to 0pt{\expandonce{\jlreq@left}\hss}}\fi
- \ifx\jlreq@right\@empty\else\edef\jlreq@right{\noexpand\hbox to 0pt{\hss\expandonce{\jlreq@right}}}\fi
- \edef\jlreq@result{\expandonce{\jlreq@left}\hfil\unexpanded{##2}\hfil\expandonce{\jlreq@right}}%
- }%
- }%
- % ##2を##1 = left/center/rightの場所,##4を##3の場所に置く.被った場合は##2を外側にする.
- % 戻り値は\jlreq@result
- \def\jlreq@setheadfoot##1##2##3##4{%
- \def\jlreq@left{}\def\jlreq@center{}\def\jlreq@right{}%
- % \ifjlreq@tempa = if(##1 == ##3 && ##2 != "" && ##4 != "")
- \jlreq@tempatrue
- \jlreq@ifempty{##2}{\jlreq@tempafalse}{}%
- \jlreq@ifempty{##4}{\jlreq@tempafalse}{}%
- \ifthenelse{\equal{##1}{##3}}{}{\jlreq@tempafalse}%
- \ifjlreq@tempa
- \ifthenelse{\equal{##1}{right}}{%
- \edef\jlreq@right{\unexpanded{##4}\noexpand\hspace{\gap}\unexpanded{##2}}%
- }{%
- \expandafter\edef\csname jlreq@##1\endcsname{\unexpanded{##2}\noexpand\hspace{\gap}\unexpanded{##4}}%
- }%
- \else
- \jlreq@ifempty{##2}{}{\expandafter\def\csname jlreq@##1\endcsname{##2}}%
- \jlreq@ifempty{##4}{}{\expandafter\def\csname jlreq@##3\endcsname{##4}}%
- \fi
- \edef\jlreq@do{\noexpand\jlreq@setheadfoot@{\expandonce{\jlreq@left}}{\expandonce{\jlreq@center}}{\expandonce{\jlreq@right}}}%
- \jlreq@do
- }%
- % \nombre@<top/bottom>を定義
- \def\jlreq@nombre@top{}\def\jlreq@nombre@bottom{}%
- \expandafter\edef\csname jlreq@nombre@\expandafter\@firstoftwo\jlreq@nombre@position\endcsname{\expandonce{\jlreq@nombre}}%
- % \odd@running@head@<top/bottom>を定義
- \def\jlreq@odd@running@head@top{}\def\jlreq@odd@running@head@bottom{}%
- \expandafter\edef\csname jlreq@odd@running@head@\expandafter\@firstoftwo\jlreq@running@head@position\endcsname{\expandonce{\jlreq@odd@running@head}}%
- % \@oddheadを定義
- \edef\jlreq@do{\unexpanded{\jlreq@setheadfoot{\expandafter\@secondoftwo\jlreq@nombre@position}}{\expandonce{\jlreq@nombre@top}}\unexpanded{{\expandafter\@secondoftwo\jlreq@running@head@position}}{\expandonce{\jlreq@odd@running@head@top}}}%
- \jlreq@do\let\jlreq@oddhead=\jlreq@result
- % \@oddfootを定義
- \edef\jlreq@do{\unexpanded{\jlreq@setheadfoot{\expandafter\@secondoftwo\jlreq@nombre@position}}{\expandonce{\jlreq@nombre@bottom}}\unexpanded{{\expandafter\@secondoftwo\jlreq@running@head@position}}{\expandonce{\jlreq@odd@running@head@bottom}}}%
- \jlreq@do\let\jlreq@oddfoot=\jlreq@result
- % ##1 = {}{}の後ろを逆にする
- \def\getoppositeposition##1{%
- \jlreq@switch{\expandafter\@secondoftwo##1}{
- {center}{\def\jlreq@tempe{center}}
- {right}{\def\jlreq@tempe{left}}
- {left}{\def\jlreq@tempe{right}}
- }%
- \edef##1{{\expandafter\@firstoftwo##1}{\jlreq@tempe}}%
- }
- \getoppositeposition\jlreq@nombre@position
- \getoppositeposition\jlreq@running@head@position
- % 上と同じことをする
- % \nombre@<top/bottom>を定義
- \def\jlreq@nombre@top{}\def\jlreq@nombre@bottom{}%
- \expandafter\edef\csname jlreq@nombre@\expandafter\@firstoftwo\jlreq@nombre@position\endcsname{\expandonce{\jlreq@nombre}}%
- % \even@running@head@<top/bottom>を定義
- \def\jlreq@even@running@head@top{}\def\jlreq@even@running@head@bottom{}%
- \expandafter\edef\csname jlreq@even@running@head@\expandafter\@firstoftwo\jlreq@running@head@position\endcsname{\expandonce{\jlreq@even@running@head}}%
- % \@evenheadを定義
- \edef\jlreq@do{\unexpanded{\jlreq@setheadfoot{\expandafter\@secondoftwo\jlreq@nombre@position}}{\expandonce{\jlreq@nombre@top}}\unexpanded{{\expandafter\@secondoftwo\jlreq@running@head@position}}{\expandonce{\jlreq@even@running@head@top}}}%
- \jlreq@do\let\jlreq@evenhead=\jlreq@result
- % \@evenfootを定義
- \edef\jlreq@do{\unexpanded{\jlreq@setheadfoot{\expandafter\@secondoftwo\jlreq@nombre@position}}{\expandonce{\jlreq@nombre@bottom}}\unexpanded{{\expandafter\@secondoftwo\jlreq@running@head@position}}{\expandonce{\jlreq@even@running@head@bottom}}}%
- \jlreq@do\let\jlreq@evenfoot=\jlreq@result
- \edef\jlreq@do{%
- \noexpand\def\expandonce{\csname ps@#1\endcsname}{%
- \unexpanded{\def\jlreq@current@pagestyle{#1}}%
- \ifjlreq@clearmark\noexpand\jlreq@heading@execmacro@toallheadings\noexpand\jlreq@clearheadingmarks\fi
- \unexpanded{\let\@mkboth=\markboth}%
- \unexpanded{\def\@oddhead}{\expandonce{\jlreq@oddhead}}%
- \unexpanded{\def\@oddfoot}{\expandonce{\jlreq@oddfoot}}%
- \unexpanded{\def\@evenhead}{\expandonce{\jlreq@evenhead}}%
- \unexpanded{\def\@evenfoot}{\expandonce{\jlreq@evenfoot}}%
- }%
- \noexpand\edef\expandonce{\csname ps@#1\endcsname}{%
- \noexpand\expandonce{\expandonce{\csname ps@#1\endcsname}}%
- \noexpand\unexpanded{\expandonce{\jlreq@markdefinition}}%
- \noexpand\unexpanded{\expandonce{\jlreq@command}}%
- }%
- }%
- \expandafter\endgroup
- \jlreq@do
-}
-
-% 全ての見出しにマクロ#1を適用する.
-\def\jlreq@heading@execmacro@toallheadings#1{%
- \begingroup
- \def\jlreq@do{}%
- \ifx\jlreq@heading@allheadings\@undefined
- \jlreq@heading@execmacro@toallheadings@{#1}{chapter,part,section,subsection,subsubsection,paragraph,subparagraph}%
- \else
- \def\@tempa{\jlreq@heading@execmacro@toallheadings@{#1}}%
- \expandafter\@tempa\expandafter{\jlreq@heading@allheadings}%
- \fi
- \expandafter\endgroup
- \jlreq@do
-}
-
-\def\jlreq@heading@execmacro@toallheadings@#1#2{
- \@for\jlreq@tempa:=#2\do{%
- \@ifundefined{\jlreq@tempa}{}{%
- \eappto\jlreq@do{\noexpand#1{\expandonce{\jlreq@tempa}}}%
- }%
- }%
-}
-\def\jlreq@clearheadingmarks#1{%
- \@ifundefined{#1mark}{}{%
- \expandafter\let\csname#1mark\endcsname=\@gobble
- }%
-}
-
-\newcommand*{\NewPageStyle}[2]{%
- \expandafter\@ifdefinable\csname ps@#1\endcsname{\DeclarePageStyle{#1}{#2}}%
-}
-\newcommand*{\RenewPageStyle}[2]{%
- \@ifundefined{ps@#1}{\@latex@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@pagestyle@setting@#1}{\ClassError{jlreq}{Unknown pagestyle: #1}{\@ehc}}{}%
- \expandafter\let\expandafter\setting\expandafter=\csname jlreq@pagestyle@setting@#1\endcsname
- \edef\jlreq@do{\noexpand\RenewPageStyle{#1}{\expandonce{\setting},\unexpanded{#2}}}%
- \expandafter\endgroup
- \jlreq@do
-}
-
-%.. 各種定義
-\RenewPageStyle{empty}{nombre={},odd_running_head={},even_running_head={}}
-\ifthenelse{\equal{\jlreq@article@type}{article}}{
- \if@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@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@tate
- \RenewPageStyle{plain}{nombre=\thepage,odd_running_head={},even_running_head={},no_clear_mark}
- \NewPageStyle{myheadings}{nombre=\thepage,odd_running_head=\rightmark,even_running_head=\leftmark,no_clear_mark}
- \if@twoside
- \ModifyPageStyle{plain}{nombre_position={top-left}}
- \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-left,running_head_position=top-left}
- \ModifyPageStyle{myheadings}{nombre_position=bottom-left,running_head_position=top-left}
- \else
- \ModifyPageStyle{plain}{nombre_position={top-center}}
- \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center}
- \ModifyPageStyle{myheadings}{nombre_position=bottom-center,running_head_position=top-center}
- \fi
-\else% yoko
- \RenewPageStyle{plain}{nombre=\thepage,odd_running_head={},even_running_head={},nombre_position={bottom-center},no_clear_mark}
- \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center}
- \NewPageStyle{myheadings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center,odd_running_head=\rightmark,even_running_head=\leftmark,no_clear_mark}
-\fi
-
-%. フロート関連
-% 4.3.3.dの例,縦組みの時だけど横にも適用……
-\setlength{\floatsep}{1\jlreq@gol plus 1\jlreq@gol}
-\setlength{\textfloatsep}{1\jlreq@gol plus \baselineskip}
-\intextsep=\textfloatsep
-\dblfloatsep=\floatsep
-\dbltextfloatsep=\textfloatsep
-% 残りはデフォルトにしておく.
-
-% 4.3.1 注4
-\newlength\abovecaptionskip
-\newlength\belowcaptionskip
-\newcommand{\@makecaption}[2]{{%
- \reset@font\small\headfont
- \vskip\abovecaptionskip
- \sbox\@tempboxa{#1\hskip 1\jlreq@mol#2}%
- \ifdim \wd\@tempboxa >\hsize
- #1\hskip1\jlreq@mol#2\relax\par
- \else
- \global\@minipagefalse
- \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
- \fi
- \vskip\belowcaptionskip}}
-% 特に根拠のない値
-\setlength\abovecaptionskip{.5\jlreq@gol}
-\setlength\belowcaptionskip{0pt}
-
-
-% \begin{figure}***\caption{???}\end{figure}を
-% \begin{figure}\layoutfloat{***}\pcaption{???}\end{figure}にする.
-%
-%\def\jlreq@saveoriginalcs#1{
-% \expandafter\expandafter\expandafter\let\expandafter\expandafter\csname jlreq@original@#1\endcsname\csname #1\endcsname
-%}
-%\long\def\jlreq@replace@layoutfloat#1\caption{\layoutfloat{#1}\jlreq@caption}
-%\long\def\jlreq@caption#1{\ifx#1\jlreq@endmark\else\pcaption{#1}\expandafter\jlreq@replace@layoutfloat\fi}
-%\def\jlreq@modify@float#1{%
-% \def\lgdef{\long\gdef}
-% \jlreq@saveoriginalcs{#1}
-% \@namedef{#1}{\@ifnextchar[{\@nameuse{jlreq@float@#1}}{\@nameuse{jlreq@float@@#1}}}
-% \expandafter\lgdef\csname jlreq@float@#1\endcsname[##1]{%
-% \expandafter\csname jlreq@original@#1\endcsname[##1]
-% \csname jlreq@process@insertlayoutfloat@#1\endcsname{}
-% }
-% \expandafter\lgdef\csname jlreq@float@@#1\endcsname{%
-% \expandafter\csname jlreq@original@#1\endcsname
-% \csname \jlreq@process@insertlayoutfloat@#1\endcsname{}
-% }
-% \expandafter\lgdef\csname jlreq@process@insertlayoutfloat@#1\endcsname ##1##2\end{%
-% \csname jlreq@checkenvname@#1\endcsname{##1##2}\end
-% }
-% \expandafter\lgdef\csname jlreq@checkenvname@#1\endcsname ##1\end##2{%
-% \def\@tempa{##2}%
-% \def\@tempb{#1}%
-% \ifx\@tempa\@tempb
-% \def\jlreq@next{\jlreq@replace@layoutfloat##1\caption{\jlreq@endmark}\end{##2}}%
-% \else
-% \def\jlreq@next{\csname jlreq@process@insertlayoutfloat@#1\endcsname{##1\end{##2}}}%
-% \fi
-% \jlreq@next
-% }
-%}
-
-%.. figure環境
-\newcounter{figure}
-\renewcommand*{\thefigure}{\arabic{figure}}
-\newcommand*{\fps@figure}{h}
-\newcommand*{\ftype@figure}{1}
-\newcommand*{\ext@figure}{lof}
-\newcommand*{\fnum@figure}{\figurename\thefigure}
-\newenvironment{figure}{\@float{figure}}{\end@float}
-\newenvironment{figure*}{\@dblfloat{figure}}{\end@dblfloat}
-\newcommand*{\listfigurename}{図目次}
-\newcommand{\figurename}{図}
-\if@tate
- \DeclareLayoutCaption{figure}<y>(\floatwidth)[cr]
-\fi
-%\jlreq@modify@float{figure}
-%\jlreq@modify@float{figure*}
-
-%.. table環境
-\newcounter{table}
-\renewcommand*{\thetable}{\arabic{table}}
-\newcommand*{\fps@table}{h}
-\newcommand*{\ftype@table}{2}
-\newcommand*{\ext@table}{lot}
-\newcommand*{\fnum@table}{\tablename\thetable}
-\newenvironment{table}{\@float{table}}{\end@float}
-\newenvironment{table*}{\@dblfloat{table}}{\end@dblfloat}
-\newcommand{\listtablename}{表目次}
-\newcommand{\tablename}{表}
-\if@tate
- \DeclareLayoutCaption{table}<y>(\floatwidth)[cr]
-\fi
-%\jlreq@modify@float{table}
-%\jlreq@modify@float{table*}
-
-%. タイトル周り
-\newenvironment{titlepage}{%
- \if@twocolumn
- \@restonecoltrue\onecolumn
- \else
- \@restonecolfalse\newpage
- \fi
- \thispagestyle{empty}%
- \setcounter{page}{1}%
-}{%
- \if@restonecol\twocolumn\else\newpage\fi
- \if@twoside\else
- \setcounter{page}{1}%
- \fi
-}
-
-\if@titlepage
- \newcommand{\maketitle}{%
- % jarticleとかからあまり変更していない
- \begin{titlepage}%
- \let\footnotesize\small
- \let\footnoterule\relax
- \let\footnote\thanks
- \null\vfil
- \vskip 4\baselineskip
- \begin{center}%
- {\LARGE \@title \par}%
- \vskip\baselineskip%
- {\Large
- \lineskip .75em%
- \begin{tabular}[t]{c}%
- \@author
- \end{tabular}\par}%
- \vskip\baselineskip
- {\large\@date\par}%
- \end{center}\par
- \vfil{\centering\@thanks}\vfil\null
- \end{titlepage}%
- \jlreq@endofmaketitle
- }
-\else
- \newcommand{\maketitle}{%
- \par
- \begingroup
- \renewcommand{\thefootnote}{\fnsymbol{footnote}}%
- \renewcommand{\@makefnmark}{\hbox{%
- \jlreq@iftdir{\yoko}{}%
- \rlap{\@textsuperscript{\normalfont\@thefnmark}}%
- }}%
- \if@twocolumn
- \ifnum\col@number=\@ne
- \@maketitle
- \else
- \twocolumn[\@maketitle]%
- \fi
- \else
- \newpage
- \global\@topnum\z@
- \@maketitle
- \fi
- % \pagestyle{empty}の時はそのまま.
- \ifnum0\ifx\@oddhead\@empty\else1\fi\ifx\@evenhead\@empty\else1\fi>0
- \thispagestyle{plain}%
- \fi
- \@thanks
- \endgroup
- \ifvoid\jlreq@abstractbox\else
- \centerline{\box\jlreq@abstractbox}
- \fi
- \jlreq@endofmaketitle
- }
-\fi
-% いろいろクリアする.
-\def\jlreq@endofmaketitle{%
- \setcounter{footnote}{0}%
- \global\let\thanks\relax
- \global\let\maketitle\relax
- \global\let\p@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@keepbaselineskip{\LARGE}\@title\par}%
- \vskip\baselineskip
- {\jlreq@keepbaselineskip{\large}%
- \lineskip .5\jlreq@gol
- \begin{tabular}[t]{c}%
- \@author
- \end{tabular}%
- \par
- }%
- \vskip\baselineskip
- {\jlreq@keepbaselineskip{\large}\@date}%
- \end{center}%
- \par\vskip\baselineskip}
-
-%.. abstract
-\ifthenelse{\equal{jlreq@article@type}{book}}{}{% article,report
- \newbox\jlreq@abstractbox
- \newcommand*{\abstractname}{概要}
- \if@titlepage
- % articleとかjarticleとかと同じ
- \newenvironment{abstract}{%
- \titlepage
- \null\vfil
- \@beginparpenalty\@lowpenalty
- \begin{center}%
- {\bfseries\gtfamily\abstractname}%
- \@endparpenalty\@M
- \end{center}%
- }{%
- \par\vfil\null\endtitlepage
- }
- \else
- \newenvironment{abstract}{%
- \if@twocolumn
- \ifx\maketitle\relax
- \section*{\abstractname}%
- \else
- \fi
- \else
- \global\setbox\jlreq@abstractbox=\vtop\bgroup\bgroup
- \small
- \begin{center}%
- {\bfseries\abstractname}%
- \end{center}%
- \quotation
- \fi
- }{\if@twocolumn\else\endquotation\egroup\vspace{2\baselineskip}\egroup\fi}
- \fi
-}
-%. 箇条書き.cf. JISX4051 8.4
-% 用語定義型
-\newenvironment{description}{\list{}{%
- \setlength{\leftmargin}{0\jlreq@mol}% 下げない
- \setlength{\labelwidth}{0\jlreq@mol}%
- \addtolength{\leftmargin}{\leftskip}%
- \addtolength{\leftmargin}{\labelsep}%
- \let\makelabel=\descriptionlabel
-% 同行じゃない場合はこんな感じ?
-% \let\jlreq@original@@item=\@item
-% \def\@item[##1]{\jlreq@original@@item[##1]\mbox{}\par
- }}{\endlist}
-\newcommand{\descriptionlabel}[1]{\normalfont\headfont #1}
-
-% enumerateとitemize
-% 見出しが一つ上のレベルからどのくらいずれているかを入れる.
-% (見出しは2\zhの箱に右/下詰めで入る.)
-\setlength\leftmargini{2\jlreq@mol}
-\setlength\leftmarginii{1\jlreq@mol}
-\setlength\leftmarginiii{1\jlreq@mol}
-\setlength\leftmarginiv{1\jlreq@mol}
-\setlength\leftmarginv{1\jlreq@mol}
-\setlength\leftmarginvi{1\jlreq@mol}
-
-% enumerate, itemize用初期化
-\def\jlreq@init@list{%
- \setlength{\labelwidth}{2\jlreq@mol}%
- \setlength{\topsep}{0pt}%
- \setlength{\partopsep}{0pt}%
- \setlength{\itemsep}{0pt}%
- \setlength{\parsep}{0pt}%
- \setlength{\listparindent}{\parindent}%
-% itemizeは直後ベタ,enumerateは直後全角空き.
- \ifthenelse{\equal{\@currenvir}{itemize}}{
- \setlength{\labelsep}{0\jlreq@mol}%
- }{%
- \setlength{\labelsep}{1\jlreq@mol}%
- }%
- % \labelsepだけあけるのは一つ目(ラベルの直後)のみ
- \setlength{\itemindent}{\labelsep}%
-}
-
-\def\@listi{%
- \jlreq@init@list
- \setlength{\leftmargin}{\leftmargini}%
-}
-\let\@listI\@listi
-\def\@listii{%
- \jlreq@init@list
- \setlength{\leftmargin}{\leftmarginii}%
-}
-\def\@listiii{%
- \jlreq@init@list
- \setlength{\leftmargin}{\leftmarginiii}%
-}
-\def\@listiv{%
- \jlreq@init@list
- \setlength{\leftmargin}{\leftmarginiv}%
-}
-\def\@listv{%
- \jlreq@init@list
- \setlength{\leftmargin}{\leftmarginv}%
-}
-
-\if@tate
- \renewcommand{\theenumi}{\Kanji{enumi}}
- \renewcommand{\theenumii}{\rensuji{\@arabic\c@enumii}}
- \renewcommand{\theenumiii}{\rensuji{\@arabic\c@enumiii}}
- \renewcommand{\theenumiv}{\rensuji{\@arabc\c@enumiv}}
-\fi
-\newcommand{\labelenumi}{\theenumi}
-\newcommand{\labelenumii}{\theenumii}
-\newcommand{\labelenumiii}{\theenumiii}
-\newcommand{\labelenumiv}{\theenumiv}
-\renewcommand{\p@enumii}{\theenumi}
-\renewcommand{\p@enumiii}{\theenumi(\theenumii)}
-\renewcommand{\p@enumiv}{\p@enumiii\theenumiii}
-
-\newcommand{\labelitemi}{\hbox to 1\jlreq@mol{\hss\textbullet\hss}}
-%\newcommand{\labelitemi}{•}
-\if@tate
- \newcommand{\labelitemii}{○}
- \newcommand{\labelitemiii}{*}
-\else
- \newcommand{\labelitemii}{\hbox to 1\jlreq@mol{\hss\textendash\hss}}
- \newcommand{\labelitemiii}{\hbox to 1\jlreq@mol{\hss\textasteriskcentered\hss}}
-\fi
-\newcommand{\labelitemiv}{\hbox to 1\jlreq@mol{\hss ・\hss}}
-
-% 引用系.1.5em→1\zh,字下げを二文字にした.3.5.2の例.
-\newenvironment{verse}
- {\let\\\@centercr
- \list{}{\itemsep\z@ \itemindent -2\jlreq@mol%
- \listparindent\itemindent
- \labelwidth\z@
- \labelsep\z@
- \leftmargin=2\jlreq@mol
- \rightmargin\leftmargin \advance\leftmargin 2\jlreq@mol}%
- \item\relax}{\endlist}
-\newenvironment{quotation}
- {\list{}{\listparindent\parindent
- \itemindent\listparindent
- \labelwidth\z@
- \labelsep\z@
- \leftmargin=2\jlreq@mol
- \rightmargin\leftmargin
- \parsep\z@ \@plus.1\jlreq@gol}%
- \item\relax}{\endlist}
-\newenvironment{quote}
- {\list{}{%
- \rightmargin\leftmargin
- \labelwidth\z@
- \leftmargin=2\jlreq@mol
- \listparindent\z@}%
- \item\relax}{\endlist}
-
-%. 表関係 4.4
-% 表内の行間を0にする(4.4.3.f)
-\let\jlreq@original@tabular=\tabular
-\let\jlreq@original@endtabular=\endtabular
-\preto\tabular{\begingroup\appto\@arrayparboxrestore{\baselineskip=0pt\lineskip=0pt}}
-\appto\endtabular{\endgroup}
-% 4.4.3.e
-\setlength\tabcolsep{.5\jlreq@gol}
-\setlength\arraycolsep{.5\jlreq@mol}
-% 4.4.3.j
-%\RequirePackage{tabls} % plextと整合的でない
-%\setlength\extrarulesep{.25\jlreq@gol}
-%\setlength\tablinesep{.25\jlreq@gol}
-%\renewcommand{\arraystretch}{0}
-\setlength\arrayrulewidth{\jlreq@omotekeiwidth} % 4.4.3.c
-\setlength\doublerulesep{2pt}
-\setlength\tabbingsep{\labelsep}
-\skip\@mpfootins=\skip\footins
-\setlength\fboxsep{.3\jlreq@mol}
-\setlength\fboxrule{\jlreq@omotekeiwidth} % 根拠はない
-% 後で
-\renewcommand{\theequation}{\@arabic\c@equation}
-
-%. 目次
-\setcounter{tocdepth}{3}
-\newcommand{\@pnumwidth}{2\jlreq@mol}
-\newcommand{\@tocrmarg}{2.55em}
-\newcommand{\@dotsep}{2} % 狭くしてみた
-\newskip\toclineskip
-\setlength\toclineskip{0\jlreq@gol plus .02\jlreq@gol}
-% tarticleから
-\newdimen\@lnumwidth
-\def\numberline#1{\hbox to\@lnumwidth{#1\hfil}}
-\def\addcontentsline#1#2#3{%
- \protected@write\@auxout
- {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
- \if@tate
- \@temptokena{\rensuji{\thepage}}%
- \else
- \@temptokena{\thepage}%
- \fi
- }%
- {\string\@writefile{#1}%
- {\protect\contentsline{#2}{#3}{\the\@temptokena}}}%
-}
-
-\newcount\jlreq@top@contents % トップ見出しを入れる.レベルと同じ値.
-\jlreq@top@contents=-1
-\newcommand*{\jlreq@set@top@contents}[1]{%
- \ifnum\jlreq@top@contents=-1
- \jlreq@top@contents=#1\relax
- \fi
-}
-\ifthenelse{\equal{\jlreq@article@type}{article}}{
- \newcommand{\tableofcontents}{%
- \jlreq@top@contents=-1\relax
- \if@twocolumn
- \@restonecoltrue\onecolumn
- \else
- \@restonecolfalse
- \fi
- \section*{\contentsname}%
- \@mkboth{\contentsname}{\contentsname}%
- \@starttoc{toc}%
- \if@restonecol\twocolumn\fi
- }
-}{% book, article
- \newcommand{\tableofcontents}{%
- \jlreq@top@contents=-1\relax
- \if@twocolumn
- \@restonecoltrue\onecolumn
- \else
- \@restonecolfalse
- \fi
- \chapter*{\contentsname}%
- \@mkboth{\contentsname}{\contentsname}%
- \@starttoc{toc}%
- \if@restonecol\twocolumn\fi
- }
-}
-% JIS X 4051自身の目次に近づけようかと……なりきれてないけど.
-% 文字の大きさは全て同じ(\normalsize)にする.
-% 見出しのレベルがあがると1文字分ずつ字下げしていく.
-% 第三引数は,上からの幅に加え更にトップの見出しからの差による補正(プラス)が入る.
-% 補正には\jlreq@top@contentsを使う.
-% 「トップ」というか,一番最初に現れた見出しを入れる.
-% リーダーは.から・に変更しました.更に直後から出るように.
-\def\@dottedtocline#1#2#3#4#5{%
- \jlreq@set@top@contents{#1}%
- \ifnum #1>\c@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@top@contents
- \@tempdima=1\jlreq@mol
- \multiply \@tempdima by \@tempcnta
- \advance\leftskip \@lnumwidth \hbox{}\hskip -\leftskip
- \advance\leftskip\@tempdima
- {#4}\nobreak
- \leaders\hbox{$\hbox{・}\mkern \@dotsep mu \m@th \mkern \@dotsep mu$}%
- \hfill\nobreak
- \hb@xt@\@pnumwidth{\hss\normalfont\normalcolor #5}%
- \par}%
- \fi}
-
-% listoffigures
-\newcommand{\listoffigures}{%
- \jlreq@top@contents=0
- \section*{\listfigurename}%
- \@mkboth{\listfigurename}{\listfigurename}%
- \@starttoc{lof}%
-}
-\newcommand*{\l@figure}{\@dottedtocline{1}{0\jlreq@gol}{2\jlreq@gol}}
-\newcommand{\listoftables}{%
- \jlreq@top@contents=0
- \section*{\listtablename}%
- \@mkboth{\listtablename}{\listtablename}%
- \@starttoc{lot}%
-}
-\let\l@table\l@figure
-
-%. 文献,そのまま
-\newdimen\bibindent
-\setlength\bibindent{2\jlreq@mol}
-\newcommand{\newblock}{\hskip .11em\@plus.33em\@minus.07em}
-\newenvironment{thebibliography}[1]{%
- \jlreq@oldfontcommand@enable
- \section*{\refname}%
- \@mkboth{\refname}{\refname}%
- \list{\@biblabel{\@arabic\c@enumiv}}%
- {\settowidth\labelwidth{\@biblabel{#1}}%
- \leftmargin\labelwidth
- \advance\leftmargin\labelsep
- \itemindent=0pt
- \@openbib@code
- \usecounter{enumiv}%
- \let\p@enumiv\@empty
- \renewcommand\theenumiv{\@arabic\c@enumiv}}%
- \sloppy
- \clubpenalty4000
- \@clubpenalty\clubpenalty
- \widowpenalty4000%
- \sfcode`\.\@m
-}{%
- \def\@noitemerr
- {\@latex@warning{Empty `thebibliography' environment}}%
- \endlist
- \jlreq@oldfontcommand@disable
-}
-\let\@openbib@code\@empty
-
-%. 索引
-\newif\ifjlreq@resttate
-\newenvironment{theindex}{%
- \jlreq@oldfontcommand@enable
- \jlreq@iftdir{\clearpage\yoko\jlreq@resttatetrue}{\jlreq@resttatefalse}% 常に横書きにする
- \if@twocolumn\@restonecolfalse\else\@restonecoltrue\fi
- \columnseprule\z@ \columnsep 2\jlreq@mol
- \twocolumn[\section*{\indexname}]%
- \@mkboth{\indexname}{\indexname}%
- \thispagestyle{plain}%
- \parindent\z@
- \parskip\z@ \@plus .03\jlreq@gol\relax
- \let\item\@idxitem
-}{%
- \if@restonecol\onecolumn\else\clearpage\fi
- \ifjlreq@resttate\tate\fi
-}
-\newcommand{\@idxitem}{\par\hangindent 4\jlreq@mol}
-\newcommand{\subitem}{\@idxitem \hspace*{2\jlreq@mol}}
-\newcommand{\subsubitem}{\@idxitem \hspace*{3\jlreq@mol}}
-\newcommand{\indexspace}{\par \vskip 1\jlreq@gol \@plus .5\jlreq@gol \@minus .3\jlreq@gol\relax}
-
-
-%. 前付,後付,付録
-\ifthenelse{\equal{\jlreq@article@type}{book}}{
- \newif\if@mainmatter
- \@mainmattertrue
- \newcommand*\frontmatter{%
- \if@openright
- \cleardoublepage
- \else
- \clearpage
- \fi
- \@mainmatterfalse
- \let\jlreq@pagestyle@atmain\jlreq@current@pagestyle
- \ifthenelse{\equal{jlreq@article@type}{article}}{}{%book, report
- \SaveHeading{chapter}{\jlreq@heading@chapter@atmain}%
- \ModifyHeading{chapter}{label_format={}}%
- }%
- \pagestyle{plain}%
- \pagenumbering{roman}}
- \newcommand*\mainmatter{%
- \cleardoublepage
- \@mainmattertrue
- \@ifundefined{jlreq@pagestyle@atmain}{}{%
- \expandafter\pagestyle\expandafter{\jlreq@pagestyle@atmain}%
- }%
- \@ifundefined{jlreq@heading@chapter@atmain}{}{\jlreq@heading@chapter@atmain}%
- \setcounter{chapter}{0}%
- \pagenumbering{arabic}}
- \newcommand*\backmatter{%
- \if@openright
- \cleardoublepage
- \else
- \clearpage
- \fi
- \ifthenelse{\equal{jlreq@article@type}{article}}{}{%book, report
- \SaveHeading{chapter}{\jlreq@heading@chapter@atmain}%
- \ModifyHeading{chapter}{label_format={}}%
- }%
- \pagestyle{plain}%
- \@mainmatterfalse
- \setcounter{chapter}{0}}
-}{}
-\newcommand*\appendix{\par
- \setcounter{section}{0}%
-}
-
-\ifthenelse{\equal{\jlreq@article@type}{article}}{
- \appto\appendix{%
- \setcounter{subsection}{0}%
- \gdef\thesection{\@Alph\c@section}%
- \if@tate
- \def\thesection{\rensuji{\Alph{section}}}%
- \else
- \def\thesection{\Alph{section}}%
- \fi
- }
-}{%book, report
- \appto\appendix{%
- \setcounter{chapter}{0}%
- \if@tate
- \def\thechapter{\rensuji{\Alph{chapter}}}%
- \else
- \def\thechapter{\Alph{chapter}}%
- \fi
- \ModifyHeading{chapter}{label_format={付録\thechapter\quad}}%
- \ifx\jlreq@current@pagestyle\@undefined\else
- \ifthenelse{\equal{\jlreq@current@pagestyle}{headings}}{%
- \def\chaptermark#1{\markboth{付録\thechapter\quad #1}{}}%
- \ModifyPageStyle{headings}{mark_format={_chapter={付録\thechapter\quad #1}}}%
- }{}%
- \fi
- }
-}
-
-
-% 日にち
-\newif\if西暦 \西暦true
-\def\西暦{\西暦true}
-\def\和暦{\西暦false}
-\newcount\heisei \heisei\year \advance\heisei-1988\relax
-
-\def\today{{%
- \jlreq@iftdir{%
- \if西暦
- \kansuji\year 年
- \kansuji\month 月
- \kansuji\day 日
- \else
- 平成\ifnum\heisei=1 元年\else\kansuji\heisei 年\fi
- \kansuji\month 月
- \kansuji\day 日
- \fi
- }{%
- \if西暦
- \number\year~年
- \number\month~月
- \number\day~日
- \else
- 平成\ifnum\heisei=1 元年\else\number\heisei~年\fi
- \number\month~月
- \number\day~日
- \fi
- }}}
-
-%. ルビ
-\ifx l\jlreq@engine
- \RequirePackage{luatexja-ruby}
-\else
- \RequirePackage{pxrubrica}
- \let\ruby=\jruby
-\fi
-
-%. 定理環境
-\def\jlreq@theorem@abovebelowspace{1\baselineskip}%とりあえず前後に一行分のアキ
-\def\@begintheorem#1#2{\topsep=\jlreq@theorem@abovebelowspace
- \trivlist\labelsep=1\jlreq@mol
- \item[\hskip \labelsep{\headfont #1\ #2}]}
-\def\@opargbegintheorem#1#2#3{\topsep=\jlreq@theorem@abovebelowspace
- \trivlist\labelsep=1\jlreq@mol
- \item[\hskip \labelsep{\headfont #1\ #2(#3)}]}
-
-\AtEndOfPackageFile*{amsthm}{
- \newtheoremstyle{jlreq}{\jlreq@theorem@abovebelowspace}{\jlreq@theorem@abovebelowspace}{\normalfont}{}{\headfont}{}{1\jlreq@mol}{\thmname{#1}\thmnumber{\ #2}\thmnote{ (#3)}}
- \theoremstyle{jlreq}
- \let\jlreq@original@proof=\proof
- \let\jlreq@original@endproof=\endproof
- \def\proof{\@ifnextchar[{\jlreq@proof}{\jlreq@proof[\proofname]}}
- \def\jlreq@proof[#1]{\labelsep=1\jlreq@mol\jlreq@original@proof[{\normalfont\headfont #1\inhibitglue}\nopunct]}
- \renewcommand{\proofname}{証明}
-}
-
-
-% デフォルト設定
-\newcommand{\contentsname}{目 次}
-\newcommand{\refname}{参考文献}
-\newcommand{\indexname}{索 引}
-\pagestyle{plain}
-\pagenumbering{arabic}
-\if@twocolumn
- \twocolumn
- \sloppy
- \flushbottom
- \if@tate\else\RequirePackage[balance]{nidanfloat}\fi
-\else
- \onecolumn
- \raggedbottom
-\fi
-\endinput
-
-
+%% Japanese document class based on requirements for Japanese text layout +%% +%% The package is distributed under the BSD 2-Clause License +%% +%% +% (based on JLREQ 20120403 https://www.w3.org/TR/2012/NOTE-jlreq-20120403/ja/) +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{jlreq}[2017/02/17 jlreq] +\RequirePackage{xkeyval,everyhook,filehook,etoolbox,ifthen} + +%. helper1 +\newdimen\jlreq@tempdima +\newdimen\jlreq@tempdimb +\newdimen\jlreq@tempdimc +\newskip\jlreq@tempskipa +\newskip\jlreq@tempskipb +\newskip\jlreq@tempskipc +\newif\ifjlreq@tempa +\newif\ifjlreq@tempb +\newif\ifjlreq@tempc +\newbox\jlreq@tempboxa +\newbox\jlreq@tempboxb +\newbox\jlreq@tempboxc +% 計算結果を返すための変数 +\newdimen\jlreq@resultdimen +\newbox\jlreq@resultbox + +\def\jlreq@uniqtoken{\jlreq@uniqtoken} +\def\jlreq@endmark{\jlreq@endmark} +\long\def\jlreq@deleteuntileendmark#1\jlreq@endmark{} + +% \jlreq@getfirsttoken#1\jlreq@uniqtoken{}\jlreq@endmarkの形で使う +% 二回展開すると,#1の先頭を取り出す.ただし空の場合は\jlreq@uniqtoken,先頭が{の場合は\bgroupとなる +\long\def\jlreq@getfirsttoken#1#{\jlreq@getfirsttoken@#1\bgroup\jlreq@endmark} +\long\def\jlreq@getfirsttoken@#1#2\jlreq@endmark#3\jlreq@endmark{#1} +% 与えられたトークン列が空か(展開はしないでチェック) +\long\def\jlreq@ifempty#1{\expandafter\ifx\expandafter\relax\detokenize{#1}\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} +% #1が\jlreq@endmarkか +\long\def\jlreq@ifendmark#1{\expandafter\expandafter\expandafter\ifx\jlreq@getfirsttoken#1{}\jlreq@uniqtoken\jlreq@endmark\jlreq@endmark\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} + +% @removeelementの括弧があっても動くかもしれない版 +% 次の変数を使う:\jlreq@tempa:消したいやつ,\jlreq@tempb:今処理している部分. +\def\jlreq@helper@removeelement#1#2#3{% + \begingroup + \def\jlreq@tempb{}% + \def\jlreq@tempa{#1}% + \def#3{}% + \jlreq@helper@removeelement@#3#2{\jlreq@endmark}% + \edef\jlreq@do{\unexpanded{\def#3}{\expandonce{#3}}}% + \expandafter\endgroup + \jlreq@do +} +% 最初のグルーピングの前までを取得し,@@に回す.グルーピング以降は@@@で処理する +\def\jlreq@helper@removeelement@#1#2#{% + \jlreq@helper@removeelement@@{#1}{#2}% + \jlreq@helper@removeelement@@@{#1}% +} +% #1をカンマで区切り,既に得ていた\jlreq@tempbと併せて一つの部分を作る. +\def\jlreq@helper@removeelement@@#1#2{% + \jlreq@helper@dividebycomma{#2}% + \edef\jlreq@tempb{\expandonce{\jlreq@tempb}\expandonce{\jlreq@tempc}}% + \ifjlreq@tempa + \ifx\jlreq@tempa\jlreq@tempb\else + \ifx#1\@empty\edef#1{\expandonce{\jlreq@tempb}}% + \else\edef#1{\expandonce{#1},\expandonce{\jlreq@tempb}}\fi + \fi + \def\jlreq@tempb{}% + \expandafter\jlreq@helper@removeelement@@\expandafter#1\expandafter{\jlreq@tempd}% + \fi +} +% グルーピング部分を\jlreq@tempbに加え,@に戻る +\def\jlreq@helper@removeelement@@@#1#2{% + \jlreq@ifendmark{#2}{% + % 全体の解釈が終わった + \ifx\jlreq@tempa\jlreq@tempb\else + \ifx#1\@empty\edef#1{\expandonce{\jlreq@tempb}}% + \else\edef#1{\expandonce{#1},\expandonce{\jlreq@tempb}}\fi + \fi + }{% + \edef\jlreq@tempb{\expandonce{\jlreq@tempb}{#2}}% + \def\jlreq@next{\jlreq@helper@removeelement@{#1}}% + \expandafter\jlreq@next + }% +} +% カンマで区切って,その前と後ろを\jlreq@tempc,\jlreq@tempdに入れる +% もしカンマがない場合は\ifjlreq@tempaがfalseになる. +\def\jlreq@helper@dividebycomma#1{\jlreq@helper@dividebycomma@#1,\jlreq@endmark} +\def\jlreq@helper@dividebycomma@#1,#2\jlreq@endmark{% + \def\jlreq@tempc{#1}% + \def\jlreq@tempd{#2}% + \ifx\jlreq@tempd\@empty\jlreq@tempafalse\else\jlreq@tempatrue\expandafter\def\expandafter\jlreq@tempd\expandafter{\jlreq@helper@removelastcomma#2\jlreq@endmark}\fi +} +\def\jlreq@helper@removelastcomma#1,\jlreq@endmark{#1} + +% #1が#2のトークン内と\ifxで一致すれば#3を,そうでなければ#4を実行する. +% #2は\edefで展開する.{}があるとバグるかも. +\def\jlreq@ifintokenlist#1#2{% + \begingroup + \jlreq@tempafalse + \edef\@tempa{#2}% + \expandafter\jlreq@helper@ifintokenlist@\expandafter{\@tempa}{#1}% + \ifjlreq@tempa + \def\jlreq@do{\@firstoftwo}% + \else + \def\jlreq@do{\@secondoftwo}% + \fi + \expandafter\endgroup + \jlreq@do +} +\def\jlreq@helper@ifintokenlist@#1#2{% + \jlreq@helper@ifintokenlist@@{#2}#1\jlreq@endmark +} +\def\jlreq@helper@ifintokenlist@@#1#2{% + \jlreq@ifendmark{#2}{% + \def\jlreq@next{}% + }{% + \ifx#1#2\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi + {\jlreq@tempatrue\def\jlreq@next{\jlreq@deleteuntileendmark}}% + {\def\jlreq@next{\jlreq@helper@ifintokenlist@@{#1}}}% + }% + \jlreq@next +} + +% vbox #1の最後を\jlreq@resultboxに入れる +% #1の最後の行は消える +\newcommand*{\jlreq@getlastbox}[1]{% + \setbox#1=\vbox{\unvbox#1\relax + \unskip\unskip\unpenalty\global\setbox\jlreq@resultbox=\lastbox}% + \ifhbox\jlreq@resultbox + \global\setbox\jlreq@resultbox=\hbox{% + \unhbox\jlreq@resultbox\unskip\unskip\unpenalty}% + \else + \global\setbox\jlreq@resultbox=\copy\voidb@x + \fi +} + +% vbox #1の最初を\jlreq@resultboxに入れる +% #1は消える +\newcommand*{\jlreq@getfirstbox}[1]{% + \loop\ifdim\dimexpr\dp#1+\ht#1=0pt\relax\else\jlreq@getlastbox{#1}\repeat +} + +% 簡易なkeyvalのパース. +% \jlreq@parsekeyval*[family=jlreq@key]{ % *ありは\setkeys*を使う +% {key}{\def\val{#1}} +% *{key}{\def\val{#1}} % デフォルト値を空文字列にする +% {key}[choice1,choice2]{\def\valchoice{#1}} +%}{parse対象} +\def\jlreq@parsekeyval{% + \@ifstar{\jlreq@helper@parsekeyval@{*}}{\jlreq@helper@parsekeyval@{}}% +} +\def\jlreq@helper@parsekeyval@#1{% + \@ifnextchar[{\jlreq@helper@parsekeyval@@{#1}}{\jlreq@helper@parsekeyval@@{#1}[jlreq@key]}% +} +\long\def\jlreq@helper@parsekeyval@@#1[#2]#3#4{% + \begingroup + \def\jlreq@do{}% + \jlreq@helper@parsekeyval@@@{#2}#3{\jlreq@endmark}% + \setkeys#1{#2}{#4}% + \expandafter\endgroup + \jlreq@do +} +\def\jlreq@helper@parsekeyval@@@#1#2#{\jlreq@helper@parsekeyval@@@@{#1}#2\jlreq@endmark}% +\def\jlreq@helper@parsekeyval@@@@#1#2{% + \jlreq@ifendmark{#2}{% + \def\@tempa{\jlreq@helper@parsekeyval@@@@@{#1}}% + }{% + \def\@tempa{\expandafter\@tempb\jlreq@deleteuntileendmark}% + \ifx *#2% + \def\@tempb{\jlreq@helper@parsekeyval@@@definekeywithdefault{#1}}% + \else + \def\@tempb{\jlreq@helper@parsekeyval@@@@@{#1}}% + \fi + }% + \@tempa +} + +\long\def\jlreq@helper@parsekeyval@@@@@#1#2{% + \jlreq@ifendmark{#2}{% + \def\@tempa{}% + }{% + \def\@tempa{% + \@ifnextchar[{\jlreq@helper@parsekeyval@@@choicekey{#1}{#2}}{\jlreq@helper@parsekeyval@@@definekey{#1}{#2}}% + }% + }% + \@tempa +} +\long\def\jlreq@helper@parsekeyval@@@choicekey#1#2[#3]#4{% + \define@choicekey{#1}{#2}{#3}{\appto\jlreq@do{#4}}% + \jlreq@helper@parsekeyval@@@{#1}% +} +\long\def\jlreq@helper@parsekeyval@@@definekeywithdefault#1#2#3{% + \define@key{#1}{#2}[]{\appto\jlreq@do{#3}}% + \jlreq@helper@parsekeyval@@@{#1}% +} +\long\def\jlreq@helper@parsekeyval@@@definekey#1#2#3{% + \define@key{#1}{#2}{\appto\jlreq@do{#3}}% + \jlreq@helper@parsekeyval@@@{#1}% +} + +% #1のboxを今の真ん中に配置する. +\def\jlreq@box@putcenter#1{% + \begingroup + \jlreq@tempdima=\dimexpr(\ht#1 - \dp#1)/2\relax + \setbox\jlreq@tempboxa=\hbox{あ}% + \edef\jlreq@do{% + \noexpand\lower\the\dimexpr(\jlreq@tempdima - (\ht\jlreq@tempboxa - \dp\jlreq@tempboxa)/2)\relax\unexpanded{\box#1}% + }% + \expandafter\endgroup + \jlreq@do +} + +% \jlreq@switch{str}{ +% {str}{abcd} +% {str1}{xyz} +%}[default: input = #1] -> abcd +%または +% +% \jlreq@switch{str}{ +% {str}{abcd} +% {str1}{xyz} +% {default} % ここは#1を受け付けない(パラメータトークンを受け付けたい場合のため). +%} -> abcd +% 文字列比較→\edefして比較する +\long\def\jlreq@helper@switch@executeoption#1[#2]{% + \begingroup + \def\jlreq@do##1{#2}% + \expandafter\endgroup + \jlreq@do{#1}% +} +\long\def\jlreq@helper@removeoption[#1]{} +\long\def\jlreq@switch#1#2{% + \begingroup + \let\jlreq@do\@undefined + \jlreq@helper@switch@{#1}#2\jlreq@endmark + \ifx\jlreq@do\@undefined + \def\jlreq@do{\@ifnextchar[{\jlreq@helper@switch@executeoption{#1}}{}}% + \else + \edef\jlreq@do{\expandonce{\jlreq@do}\unexpanded{\@ifnextchar[{\jlreq@helper@removeoption}{}}}% + \fi + \expandafter\endgroup + \jlreq@do +} +\long\def\jlreq@helper@switch@#1#2{% + \jlreq@ifendmark{#2}{% + \def\jlreq@next{}% + }{% + \edef\jlreq@next{\unexpanded{\jlreq@helper@switch@@{#1}{#2}}}% + }% + \jlreq@next +} +\long\def\jlreq@helper@switch@@#1#2#3{% + \jlreq@ifendmark{#3}{% + \edef\jlreq@do{\unexpanded{#2}}% + \def\jlreq@next{}% + }{% + \edef\jlreq@tempa{#1}% + \edef\jlreq@tempb{#2}% + \ifx\jlreq@tempa\jlreq@tempb\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi + {% + \edef\jlreq@do{\unexpanded{#3}}% + \def\jlreq@next{\jlreq@deleteuntileendmark}% + }{% + \def\jlreq@next{\jlreq@helper@switch@{#1}}% + }% + }% + \jlreq@next +} + +% preambleにいるかのスイッチ +\newif\ifjlreq@preamble +\jlreq@preambletrue +\AtBeginDocument{\jlreq@preamblefalse} + +%. オプションの定義 +% オプション処理の際にしか使わない変数(後でそれを元に別の変数を調整する) +% ものは\jlreq@option@<key>に格納する. +% _とかは@に変換する. +\newcommand*{\jlreq@checkempty}[2]{ + \jlreq@ifempty{#2}{}{\ClassError{jlreq}{The option #1 should have no value}{\@ehc}}% +} +% 引数無しの\DeclareOptionX +\newcommand*{\jlreq@DeclareOption}[2]{% + \DeclareOptionX{#1}{\jlreq@checkempty{#1}{##1}#2} +} +% エンジン類 +\jlreq@DeclareOption{uplatex}{\let\jlreq@engine=u} +\jlreq@DeclareOption{platex}{\let\jlreq@engine=p} +\jlreq@DeclareOption{lualatex}{\let\jlreq@engine=l} + +% 文書のタイプ +\newcommand*\jlreq@article@type{article} +\define@choicekey{jlreq.cls}{article_type}{article,report,book}{\renewcommand*{\jlreq@article@type}{#1}} +\jlreq@DeclareOption{article}{\renewcommand*{\jlreq@article@type}{article}} +\jlreq@DeclareOption{report}{\renewcommand*{\jlreq@article@type}{report}} +\jlreq@DeclareOption{book}{\renewcommand*{\jlreq@article@type}{book}} + +%.. 基本版面.まずは紙サイズ. +\def\jlreq@switchpapersize{} +\newcommand*\jlreq@addpapersize[4][]{% + \jlreq@ifempty{#2}{}{ + \jlreq@DeclareOption{#2}{\setlength\paperheight{#3}\setlength\paperwidth{#4}} + \appto\jlreq@switchpapersize{{#2}{\setlength\paperheight{#3}\setlength\paperwidth{#4}}} + } + \jlreq@ifempty{#1}{}{ + \appto\jlreq@switchpapersize{{#1}{\setlength\paperheight{#3}\setlength\paperwidth{#4}}} + } +} +\DeclareOptionX{paper}{ + \edef\jlreq@do{% + \unexpanded{\jlreq@switch{#1}}{\expandonce{\jlreq@switchpapersize}}% + [\unexpanded{% + \jlreq@helper@dividebycomma{#1}% + \ifjlreq@tempa + \setlength{\paperheight}{\dimexpr\jlreq@tempc\relax}% + \setlength{\paperwidth}{\dimexpr\jlreq@tempd\relax}% + \else + \ClassError{jlreq}{The paper #1 is unknown}{\@ehc}% + \fi + }]% + }% + \jlreq@do +} +% 紙サイズ一覧.b*はJIS B. +% [paper=で指定できるようにするもの]{オプション名}{縦}{横} +\jlreq@addpapersize[a3]{a3paper}{420mm}{297mm} +\jlreq@addpapersize[a4]{a4paper}{297mm}{210mm} +\jlreq@addpapersize[a5]{a5paper}{210mm}{148mm} +\jlreq@addpapersize[a6]{a6paper}{148mm}{105mm} +\jlreq@addpapersize[b4]{b4paper}{364mm}{257mm} +\jlreq@addpapersize[b5]{b5paper}{257mm}{182mm} +\jlreq@addpapersize[b6]{b6paper}{182mm}{128mm} +\jlreq@addpapersize{a4j}{297mm}{210mm} +\jlreq@addpapersize{a5j}{210mm}{148mm} +\jlreq@addpapersize{b4j}{364mm}{257mm} +\jlreq@addpapersize{b5j}{257mm}{182mm} +\jlreq@addpapersize{a4var}{283mm}{210mm} +\jlreq@addpapersize{b5var}{230mm}{182mm} +\jlreq@addpapersize[letter]{letterpaper}{11in}{8.5in} +\jlreq@addpapersize[legal]{legalpaper}{14in}{8.5in} +\jlreq@addpapersize[executive]{executivepaper}{10.5in}{7.25in} +% 追加 +\jlreq@addpapersize[a0]{}{1189mm}{841mm} +\jlreq@addpapersize[a1]{}{841mm}{594mm} +\jlreq@addpapersize[a2]{}{420mm}{594mm} +\jlreq@addpapersize[a7]{}{74mm}{105mm} +\jlreq@addpapersize[a8]{}{52mm}{74mm} +\jlreq@addpapersize[a9]{}{37mm}{52mm} +\jlreq@addpapersize[a10]{}{26mm}{37mm} + +\jlreq@addpapersize[b0]{}{1030mm}{1456mm} +\jlreq@addpapersize[b1]{}{728mm}{1030mm} +\jlreq@addpapersize[b2]{}{515mm}{728mm} +\jlreq@addpapersize[b3]{}{364mm}{515mm} +\jlreq@addpapersize[b7]{}{91mm}{128mm} +\jlreq@addpapersize[b8]{}{64mm}{91mm} +\jlreq@addpapersize[b9]{}{45mm}{64mm} +\jlreq@addpapersize[b10]{}{32mm}{45mm} + +\jlreq@addpapersize[c2]{}{458mm}{648mm} +\jlreq@addpapersize[c3]{}{324mm}{458mm} +\jlreq@addpapersize[c4]{}{229mm}{354mm} +\jlreq@addpapersize[c5]{}{162mm}{229mm} +\jlreq@addpapersize[c6]{}{114mm}{162mm} +\jlreq@addpapersize[c7]{}{81mm}{114mm} +\jlreq@addpapersize[c8]{}{57mm}{81mm} + +%.. フォントサイズ,行長,1ページあたりの行数で基本版面のサイズを決める(2.4.1.a) +\newcommand*{\jlreq@option@fontsize}{} +\DeclareOptionX{fontsize}{\renewcommand*{\jlreq@option@fontsize}{#1}} +\jlreq@DeclareOption{10pt}{\renewcommand*{\jlreq@option@fontsize}{10pt}} +\jlreq@DeclareOption{11pt}{\renewcommand*{\jlreq@option@fontsize}{11pt}} +\jlreq@DeclareOption{12pt}{\renewcommand*{\jlreq@option@fontsize}{12pt}} + +%.. 行の長さ +\newcommand*{\jlreq@option@line@length}{} +\DeclareOptionX{line_length}{\renewcommand*{\jlreq@option@line@length}{#1}} +%.. 1ページあたりの行数 +\newcommand*{\jlreq@option@number@of@lines}{} +\DeclareOptionX{number_of_lines}{\renewcommand*{\jlreq@option@number@of@lines}{#1}} + +% 地の空き量,のどの空き量で配置位置を決める(2.4.1.b)省略されたら中央配置. +%.. 天 +\newcommand*{\jlreq@option@head@space}{} +\DeclareOptionX{head_space}{\renewcommand*{\jlreq@option@head@space}{#1}} + +%.. 地 +\newcommand*{\jlreq@option@foot@space}{} +\DeclareOptionX{foot_space}{\renewcommand*{\jlreq@option@foot@space}{#1}} +%.. のど +\newcommand*{\jlreq@option@gutter}{} +\DeclareOptionX{gutter}{\renewcommand*{\jlreq@option@gutter}{#1}} + +%.. 柱とノンブル +\newcommand*{\jlreq@option@headfoot@verticalpos}{} +\DeclareOptionX{headfoot_verticalposition}{\renewcommand*{\jlreq@option@headfoot@verticalpos}{#1}} +\newcommand*{\jlreq@headfoot@sidemargin}{0pt} +\DeclareOptionX{headfoot_sidemargin}{\renewcommand*{\jlreq@headfoot@sidemargin}{#1}} + +%.. 段間 +\newcommand*{\jlreq@option@column@gap}{2zw} +\DeclareOptionX{column_gap}{\renewcommand*{\jlreq@option@column@gap{#1}}} + +%.. 行送り,指定無しの場合は文字サイズの1.7倍とする.(1.5から2倍が好ましい:2.4.2.d 注3) +\newcommand*{\jlreq@option@baselineskip}{} +\DeclareOptionX{baselineskip}{\def\jlreq@option@baselineskip{#1}} +\DeclareOptionX{linegap}{\def\jlreq@option@baselineskip{1zw + #1}} + +%.. 組み方系 +% 行頭に括弧が来たときの配置:3.1.5 +% 段落頭指定_折り返し行頭指定 で与える. +\newcommand*{\jlreq@open@bracket@pos}{zenkaku_tentsuki} +\define@choicekey{jlreq.cls}{open_bracket_pos}{zenkaku_tentsuki,zenkakunibu_nibu,nibu_tentsuki}{\renewcommand*{\jlreq@open@bracket@pos}{#1}} +% ぶら下げ組みをするか:3.8.2 注1 +\newif\ifjlreq@burasage\jlreq@burasagefalse +\jlreq@DeclareOption{hanging_punctuation}{\jlreq@burasagetrue} + +%.. 注 +% 合印の場所(4.2.3)行間に入れるか否か +\newcommand*{\jlreq@referencemark}{inline} +\define@choicekey{jlreq.cls}{reference_mark}{inline,interlinear}{\renewcommand*{\jlreq@referencemark}{#1}} +% 脚注の字下げ,一行目を下げるならばone,二行目以降ならばtwo.ちょっと酷いので後で考える. +\newcommand*{\jlreq@footnotetext@indent}{one} +\define@choicekey{jlreq.cls}{footnotetext_indent}{one,two}{\renewcommand*{\jlreq@footnotetext@indent}{#1}} +% 後注をどこに配置するか._headings(全ての見出し),_paragraph(段落後),_で始まらないやつ(その名前の見出し).カンマ区切り +\newcommand*{\jlreq@endnote@position}{_headings} +\DeclareOptionX{endnote_position}{\renewcommand*{\jlreq@endnote@position}{#1}} +% 傍注のタイプ +\newcommand*{\jlreq@sidenote@type}{number} +\define@choicekey{jlreq.cls}{sidenote_type}{number,symbol}{\renewcommand*{\jlreq@sidenote@type}{#1}} +\newcommand*{\jlreq@option@sidenote@width}{} +\DeclareOptionX{sidenote_width}{\renewcommand*{\jlreq@option@sidenote@width}{#1}} + +\newif\if@restonecol \@restonecolfalse +\newif\if@titlepage \@titlepagefalse +\newif\ifjlreq@option@titlepage \jlreq@option@titlepagefalse % titlepageかnotitlepageかが指定された +\newif\if@landscape \@landscapefalse +\newif\if@tate \@tatefalse +\jlreq@DeclareOption{landscape}{\@landscapetrue} +\jlreq@DeclareOption{tombo}{% + \tombowtrue \tombowdatefalse + \setlength{\@tombowwidth}{.1\p@}% + \maketombowbox} +\jlreq@DeclareOption{mentuke}{% + \tombowtrue \tombowdatefalse + \setlength{\@tombowwidth}{\z@}% + \maketombowbox} +\jlreq@DeclareOption{tate}{\@tatetrue + \AtBeginDocument{\tate\message{\jlreq@tategumi@message}\adjustbaseline}% +} +\newif\ifjlreq@option@twoside\jlreq@option@twosidefalse % onesideかtwosideが指定された +\jlreq@DeclareOption{oneside}{\@twosidefalse\@mparswitchfalse\jlreq@option@twosidetrue} +\jlreq@DeclareOption{twoside}{\@twosidetrue\@mparswitchtrue\jlreq@option@twosidetrue} +\jlreq@DeclareOption{onecolumn}{\@twocolumnfalse} +\jlreq@DeclareOption{twocolumn}{\@twocolumntrue} +\jlreq@DeclareOption{titlepage}{\jlreq@option@titlepagetrue\@titlepagetrue} +\jlreq@DeclareOption{notitlepage}{\jlreq@option@titlepagetrue\@titlepagefalse} +\jlreq@DeclareOption{draft}{\setlength\overfullrule{5pt}} +\jlreq@DeclareOption{final}{\setlength\overfullrule{0pt}} +\newif\if@openright +\newif\ifjlreq@option@open \jlreq@option@openfalse % openrightかopenanyが指定された +\jlreq@DeclareOption{openright}{\@openrighttrue\jlreq@option@opentrue} +\jlreq@DeclareOption{openany}{\@openrightfalse\jlreq@option@opentrue} +\jlreq@DeclareOption{leqno}{\input{leqno.clo}} +\jlreq@DeclareOption{fleqn}{\input{fleqn.clo}} + +\newcommand*{\jlreq@warning}[1]{} +\jlreq@DeclareOption{jlreq_warnings}{\renewcommand*{\jlreq@warning}[1]{\ClassWarningNoLine{jlreq}{(JLREQ warning) ##1}}} + +\ExecuteOptionsX{article_type=article,paper=a4,fontsize=10pt,open_bracket_pos=zenkaku_tentsuki,reference_mark=inline,footnotetext_indent=one,endnote_position=headings,onecolumn,final} +% \@removeelementを一旦置き換えてから\ProcessOptionsXを実行する +\let\jlreq@original@@removeelement=\@removeelement +\let\@removeelement=\jlreq@helper@removeelement +\ProcessOptionsX*\relax +\let\@removeelement=\jlreq@original@@removeelement + +\ifjlreq@option@titlepage\else + \ifthenelse{\equal{\jlreq@article@type}{article}}{\@titlepagefalse}{\@titlepagetrue} +\fi +\ifjlreq@option@open\else + \ifthenelse{\equal{\jlreq@article@type}{book}}{\@openrighttrue}{\@openrightfalse} +\fi +% articleではopenrightは効かない. +\ifthenelse{\equal{\jlreq@article@type}{article}}{\@openrightfalse}{} +\ifjlreq@option@twoside\else + \ifthenelse{\equal{\jlreq@article@type}{book}}{\@twosidetrue}{\@twosidefalse} +\fi + +\def\jlreq@jlreqsetup@keyvallist{} +\newcommand{\jlreqsetup}[1]{% + \begingroup + \edef\jlreq@do{\unexpanded{\jlreq@parsekeyval[jlreqsetup]}{\expandonce{\jlreq@jlreqsetup@keyvallist}}}% + \expandafter\endgroup + \jlreq@do{#1}% +} +\newcommand{\jlreq@jlreqsetup@add}[2]{% + \eappto\jlreq@jlreqsetup@keyvallist{\unexpanded{{#1}{#2}}}% +} +\@onlypreamble\jlreqsetup + +% エンジンの設定 +\ifx\jlreq@engine\@undefined + \ifx\luatexversion\@undefined + \ifx\ucs\@undefined + \let\jlreq@engine=p + \else + \let\jlreq@engine=u + \fi + \else + \let\jlreq@engine=l + \fi +\fi + +\ifx l\jlreq@engine + \RequirePackage{luatexja} + \directlua{jlreq = {}} +\fi + +% (u)pLaTeXの場合ここで初めて\epTeXinputencodingが発行されるので, +% これ以前には和文は使えない. +\ifx l\jlreq@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@tate\AtEndPreamble{\par}\fi +\fi +\def\jlreq@tategumi@message{《縦組モード》} + +% \jlreq@gol(Gyo Okuri Length), \jlreq@mol (Moji Okuri Length)を定義 +\if@tate + \ifx l\jlreq@engine + \def\jlreq@gol{\zw}\def\jlreq@mol{\zh} + \else + \def\jlreq@gol{zw}\def\jlreq@mol{zh} + \fi +\else + \ifx l\jlreq@engine + \def\jlreq@gol{\zh}\def\jlreq@mol{\zw} + \else + \def\jlreq@gol{zh}\def\jlreq@mol{zw} + \fi +\fi + +%. helper2(エンジン依存系) +% 組方向を判定 +% \jlreq@if(y|t)(dir|box)を定義する. +\def\jlreq@do{% + \def\jlreq@ifydir{\ifydir\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} + \def\jlreq@iftdir{\iftdir\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} + \def\jlreq@ifybox##1{\ifybox##1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} + \def\jlreq@iftbox##1{\iftbox##1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} +} +\ifx l\jlreq@engine + \def\jlreq@ifydir{\ifnum\ltjgetparameter{direction}=4\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} + \def\jlreq@iftdir{\ifnum\numexpr\ltjgetparameter{direction}-(\ltjgetparameter{direction}/8)*8=3\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} + \def\jlreq@ifybox#1{\ifnum\ltjgetparameter{boxdir}{#1}=4\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} + \def\jlreq@iftbox#1{\ifnum\numexpr\ltjgetparameter{boxdir}{#1}-(\ltjgetparameter{boxdir}{#1}/8)*8=3\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} +\else + \jlreq@do +\fi + +% 現在行の残りを得る. +\RequirePackage[savepos]{zref} +\newcount\jlreq@rest@linewidth@count +\jlreq@rest@linewidth@count=0 + +\ifx l\jlreq@engine + % 以下のコードはおかしい. + \newcommand*{\jlreq@calc@current@linewidth}{% + \dimexpr\zposx{jlreq@rest@width.pos.\the\jlreq@rest@linewidth@count} sp - \@totalleftmargin - + \ifodd\zref@extractdefault{jlreq@rest@width.page.\the\jlreq@rest@linewidth@count}{page}{\c@page}% + \oddsidemargin + \else + \evensidemargin + \fi + - 1in - \hoffset\relax + } +\else + \newcommand*{\jlreq@calc@current@linewidth}{% + \dimexpr + \jlreq@ifydir{% + \zposx{jlreq@rest@width.pos.\the\jlreq@rest@linewidth@count} sp - \hoffset + \ifodd\zref@extractdefault{jlreq@rest@width.page.\the\jlreq@rest@linewidth@count}{page}{\c@page}% + - \oddsidemargin + \else + - \evensidemargin + \fi + }{% + \ifdim\pdfpagewidth=0pt + \paperheight + \else + \pdfpageheight + \fi + - \topmargin - \headheight - \headsep - \voffset + - \zposy{jlreq@rest@width.pos.\the\jlreq@rest@linewidth@count} sp + }% + - \@totalleftmargin - 1in + \relax + } +\fi + +\newdimen\jlreq@current@linewidth +\newdimen\jlreq@rest@linewidth +% この命令以降,次にこの命令を実行する前まで\jlreq@rest@linewidth/\jlreq@rest@linewidthで +% この場所における残り長さが取得できる. +\newcommand*{\jlreq@savepos@for@rest@linewidth}{% + \global\advance\jlreq@rest@linewidth@count by 1\relax + \zsavepos{jlreq@rest@width.pos.\the\jlreq@rest@linewidth@count}% + \zref@labelbyprops{jlreq@rest@width.page.\the\jlreq@rest@linewidth@count}{page}% + \jlreq@current@linewidth=\jlreq@calc@current@linewidth + \jlreq@rest@linewidth=\dimexpr\linewidth - \jlreq@current@linewidth\relax +} +\def\jlreq@savepos@iflabelundefined{\@ifundefined{\ZREF@RefPrefix @jlreq@rest@width.pos.\the\jlreq@rest@linewidth@count}} + +%. 基本設定 +% 和文文字,欧文文字の設定(とりあえずLuaTeX-jaのデフォルトのまま) +\ifx l\jlreq@engine + \ltjsetparameter{jacharrange={-1, +2, +3, -4, -5, +6, +7, -8}} + % kanjiskip, xkanjiskipはjfmのものを使う + \ltjsetparameter{kanjiskip=\maxdimen} + \ltjsetparameter{xkanjiskip=\maxdimen} +\else + \kanjiskip=0pt plus 0.25zw minus 0pt + \xkanjiskip=0.25zw plus 0.25zw minus 0.125zw +\fi + +% 禁則処理,表1,2に従う +% 行末 +% 初め括弧類 +\ifx l\jlreq@engine + \newcommand*{\jlreq@setpostbreakpenalty}[2]{\ltjsetparameter{postbreakpenalty={`#1,#2}}} + \newcommand*{\jlreq@setprebreakpenalty}[2]{\ltjsetparameter{prebreakpenalty={`#1,#2}}} + \newcommand*{\jlreq@setjaxspmode}[2]{\ltjsetparameter{jaxspmode={`#1,#2}}} +\else + \newcommand*{\jlreq@setpostbreakpenalty}[2]{\postbreakpenalty`#1=#2} + \newcommand*{\jlreq@setprebreakpenalty}[2]{\prebreakpenalty`#1=#2} + \newcommand*{\jlreq@setjaxspmode}[2]{% + \jlreq@switch{#2}{ + {inhibit}{\inhibitxspcode`#1=0} + {preonly}{\inhibitxspcode`#1=1} + {postonly}{\inhibitxspcode`#1=2} + {allow}{\inhibitxspcode`#1=3} + {\inhibitxspcode`#1=#2} + } + } +\fi + +\jlreq@setpostbreakpenalty{(}{10000} +\jlreq@setpostbreakpenalty{〔}{10000} +\jlreq@setpostbreakpenalty{[}{10000} +\jlreq@setpostbreakpenalty{{}{10000} +\jlreq@setpostbreakpenalty{〈}{10000} +\jlreq@setpostbreakpenalty{《}{10000} +\jlreq@setpostbreakpenalty{「}{10000} +\jlreq@setpostbreakpenalty{『}{10000} +\jlreq@setpostbreakpenalty{【}{10000} +\ifx p\jlreq@engine\else +\jlreq@setpostbreakpenalty{⦅}{10000} +\jlreq@setpostbreakpenalty{〘}{10000} +\jlreq@setpostbreakpenalty{〖}{10000} +\jlreq@setpostbreakpenalty{«}{10000} +\jlreq@setpostbreakpenalty{〝}{10000} +\fi +\jlreq@setpostbreakpenalty{‘}{10000} +\jlreq@setpostbreakpenalty{“}{10000} +% 前置省略記号 +\jlreq@setpostbreakpenalty{¥}{10000} +\jlreq@setpostbreakpenalty{$}{10000} +\jlreq@setpostbreakpenalty{£}{10000} +\jlreq@setpostbreakpenalty{#}{10000} +\ifx p\jlreq@engine\else +\jlreq@setpostbreakpenalty{€}{10000} +\jlreq@setpostbreakpenalty{№}{10000} +\fi +% 行頭 +% 終わり括弧類 +\jlreq@setprebreakpenalty{)}{10000} +\jlreq@setprebreakpenalty{〕}{10000} +\jlreq@setprebreakpenalty{]}{10000} +\jlreq@setprebreakpenalty{}}{10000} +\jlreq@setprebreakpenalty{〉}{10000} +\jlreq@setprebreakpenalty{》}{10000} +\jlreq@setprebreakpenalty{」}{10000} +\jlreq@setprebreakpenalty{』}{10000} +\jlreq@setprebreakpenalty{】}{10000} +\ifx p\jlreq@engine\else +\jlreq@setprebreakpenalty{⦆}{10000} +\jlreq@setprebreakpenalty{〙}{10000} +\jlreq@setprebreakpenalty{〗}{10000} +\jlreq@setprebreakpenalty{»}{10000} +\jlreq@setprebreakpenalty{〟}{10000} +\fi +\jlreq@setprebreakpenalty{’}{10000} +\jlreq@setprebreakpenalty{”}{10000} +% ハイフン類 +\jlreq@setprebreakpenalty{‐}{10000} +\ifx p\jlreq@engine\else +\jlreq@setprebreakpenalty{゠}{10000} +\jlreq@setprebreakpenalty{–}{10000} +\jlreq@setprebreakpenalty{〜}{10000} +\fi +% 区切り約物 +\jlreq@setprebreakpenalty{!}{10000} +\jlreq@setprebreakpenalty{?}{10000} +\ifx p\jlreq@engine\else +\jlreq@setprebreakpenalty{‼}{10000} +\jlreq@setprebreakpenalty{⁇}{10000} +\jlreq@setprebreakpenalty{⁈}{10000} +\jlreq@setprebreakpenalty{⁉}{10000} +\fi +% 中点類 +\jlreq@setprebreakpenalty{・}{10000} +\jlreq@setprebreakpenalty{:}{10000} +\jlreq@setprebreakpenalty{;}{10000} +% 句点類 +\jlreq@setprebreakpenalty{。}{10000} +\jlreq@setprebreakpenalty{.}{10000} +% 読点類 +\jlreq@setprebreakpenalty{、}{10000} +\jlreq@setprebreakpenalty{,}{10000} +% 繰返し記号 +\jlreq@setprebreakpenalty{ヽ}{10000} +\jlreq@setprebreakpenalty{ヾ}{10000} +\jlreq@setprebreakpenalty{ゝ}{10000} +\jlreq@setprebreakpenalty{ゞ}{10000} +\jlreq@setprebreakpenalty{々}{10000} +\ifx p\jlreq@engine\else +\jlreq@setprebreakpenalty{〻}{10000} +\fi +% 長音記号 +\jlreq@setprebreakpenalty{ー}{10000} +% 小書きの仮名 +\jlreq@setprebreakpenalty{ぁ}{10000} +\jlreq@setprebreakpenalty{ぃ}{10000} +\jlreq@setprebreakpenalty{ぅ}{10000} +\jlreq@setprebreakpenalty{ぇ}{10000} +\jlreq@setprebreakpenalty{ぉ}{10000} +\jlreq@setprebreakpenalty{ァ}{10000} +\jlreq@setprebreakpenalty{ィ}{10000} +\jlreq@setprebreakpenalty{ゥ}{10000} +\jlreq@setprebreakpenalty{ェ}{10000} +\jlreq@setprebreakpenalty{ォ}{10000} +\jlreq@setprebreakpenalty{っ}{10000} +\jlreq@setprebreakpenalty{ゃ}{10000} +\jlreq@setprebreakpenalty{ゅ}{10000} +\jlreq@setprebreakpenalty{ょ}{10000} +\jlreq@setprebreakpenalty{ゎ}{10000} +\ifx p\jlreq@engine\else +\jlreq@setprebreakpenalty{ゕ}{10000} +\jlreq@setprebreakpenalty{ゖ}{10000} +\fi +\jlreq@setprebreakpenalty{ッ}{10000} +\jlreq@setprebreakpenalty{ャ}{10000} +\jlreq@setprebreakpenalty{ュ}{10000} +\jlreq@setprebreakpenalty{ョ}{10000} +\jlreq@setprebreakpenalty{ヮ}{10000} +\jlreq@setprebreakpenalty{ヵ}{10000} +\jlreq@setprebreakpenalty{ヶ}{10000} +\ifx p\jlreq@engine\else +\jlreq@setprebreakpenalty{ㇰ}{10000} +\jlreq@setprebreakpenalty{ㇱ}{10000} +\jlreq@setprebreakpenalty{ㇲ}{10000} +\jlreq@setprebreakpenalty{ㇳ}{10000} +\jlreq@setprebreakpenalty{ㇴ}{10000} +\jlreq@setprebreakpenalty{ㇵ}{10000} +\jlreq@setprebreakpenalty{ㇶ}{10000} +\jlreq@setprebreakpenalty{ㇷ}{10000} +\jlreq@setprebreakpenalty{ㇸ}{10000} +\jlreq@setprebreakpenalty{ㇹ}{10000} +\jlreq@setprebreakpenalty{ㇺ}{10000} +\jlreq@setprebreakpenalty{ㇻ}{10000} +\jlreq@setprebreakpenalty{ㇼ}{10000} +\jlreq@setprebreakpenalty{ㇽ}{10000} +\jlreq@setprebreakpenalty{ㇾ}{10000} +\jlreq@setprebreakpenalty{ㇿ}{10000} +\fi + +% xkanjiskip +% 初め括弧類(二分) +\jlreq@setjaxspmode{(}{preonly} +\jlreq@setjaxspmode{〔}{preonly} +\jlreq@setjaxspmode{[}{preonly} +\jlreq@setjaxspmode{{}{preonly} +\jlreq@setjaxspmode{〈}{preonly} +\jlreq@setjaxspmode{《}{preonly} +\jlreq@setjaxspmode{「}{preonly} +\jlreq@setjaxspmode{『}{preonly} +\jlreq@setjaxspmode{【}{preonly} +\ifx p\jlreq@engine\else +\jlreq@setjaxspmode{⦅}{preonly} +\jlreq@setjaxspmode{〘}{preonly} +\jlreq@setjaxspmode{〖}{preonly} +\jlreq@setjaxspmode{«}{preonly} +\jlreq@setjaxspmode{〝}{preonly} +\fi +\jlreq@setjaxspmode{‘}{preonly} +\jlreq@setjaxspmode{“}{preonly} +% 終わり括弧類(二分) +\jlreq@setjaxspmode{)}{postonly} +\jlreq@setjaxspmode{〕}{postonly} +\jlreq@setjaxspmode{]}{postonly} +\jlreq@setjaxspmode{}}{postonly} +\jlreq@setjaxspmode{〉}{postonly} +\jlreq@setjaxspmode{》}{postonly} +\jlreq@setjaxspmode{」}{postonly} +\jlreq@setjaxspmode{』}{postonly} +\jlreq@setjaxspmode{】}{postonly} +\ifx p\jlreq@engine\else +\jlreq@setjaxspmode{⦆}{postonly} +\jlreq@setjaxspmode{〙}{postonly} +\jlreq@setjaxspmode{〗}{postonly} +\jlreq@setjaxspmode{»}{postonly} +\jlreq@setjaxspmode{〟}{postonly} +\fi +\jlreq@setjaxspmode{’}{postonly} +\jlreq@setjaxspmode{”}{postonly} +% ハイフン類(二分) +\jlreq@setjaxspmode{‐}{inhibit} +\ifx p\jlreq@engine\else +\jlreq@setjaxspmode{゠}{inhibit} +\jlreq@setjaxspmode{–}{inhibit} +\jlreq@setjaxspmode{〜}{inhibit} +\fi +% 区切り約物 +\jlreq@setjaxspmode{!}{postonly} +\jlreq@setjaxspmode{?}{postonly} +\ifx p\jlreq@engine\else +\jlreq@setjaxspmode{‼}{postonly} +\jlreq@setjaxspmode{⁇}{postonly} +\jlreq@setjaxspmode{⁈}{postonly} +\jlreq@setjaxspmode{⁉}{postonly} +\fi +% 中点類 +\jlreq@setjaxspmode{・}{postonly} +\jlreq@setjaxspmode{:}{postonly} +\jlreq@setjaxspmode{;}{postonly} +% 句点類(二分) +\jlreq@setjaxspmode{。}{postonly} +\jlreq@setjaxspmode{.}{postonly} +% 読点類(二分) +\jlreq@setjaxspmode{、}{postonly} +\jlreq@setjaxspmode{,}{postonly} +% 分離禁止文字 +\jlreq@setjaxspmode{—}{inhibit} +\jlreq@setjaxspmode{…}{inhibit} +\jlreq@setjaxspmode{‥}{inhibit} +\ifx p\jlreq@engine\else +\jlreq@setjaxspmode{〳}{inhibit} +\jlreq@setjaxspmode{〴}{inhibit} +\jlreq@setjaxspmode{〵}{inhibit} +\fi +% 前置省略記号 +\jlreq@setjaxspmode{¥}{inhibit} +\jlreq@setjaxspmode{$}{inhibit} +\jlreq@setjaxspmode{£}{inhibit} +\jlreq@setjaxspmode{#}{inhibit} +\ifx p\jlreq@engine\else +\jlreq@setjaxspmode{€}{inhibit} +\jlreq@setjaxspmode{№}{inhibit} +\fi +% 後置省略記号 +\jlreq@setjaxspmode{°}{inhibit} +\jlreq@setjaxspmode{′}{inhibit} +\jlreq@setjaxspmode{″}{inhibit} +\jlreq@setjaxspmode{℃}{inhibit} +\jlreq@setjaxspmode{¢}{inhibit} +\jlreq@setjaxspmode{%}{inhibit} +\jlreq@setjaxspmode{‰}{inhibit} +\ifx p\jlreq@engine\else +\jlreq@setjaxspmode{㏋}{inhibit} +\jlreq@setjaxspmode{ℓ}{inhibit} +\jlreq@setjaxspmode{㌃}{inhibit} +\jlreq@setjaxspmode{㌍}{inhibit} +\jlreq@setjaxspmode{㌔}{inhibit} +\jlreq@setjaxspmode{㌘}{inhibit} +\jlreq@setjaxspmode{㌢}{inhibit} +\jlreq@setjaxspmode{㌣}{inhibit} +\jlreq@setjaxspmode{㌦}{inhibit} +\jlreq@setjaxspmode{㌧}{inhibit} +\jlreq@setjaxspmode{㌫}{inhibit} +\jlreq@setjaxspmode{㌶}{inhibit} +\jlreq@setjaxspmode{㌻}{inhibit} +\jlreq@setjaxspmode{㍉}{inhibit} +\jlreq@setjaxspmode{㍊}{inhibit} +\jlreq@setjaxspmode{㍍}{inhibit} +\jlreq@setjaxspmode{㍑}{inhibit} +\jlreq@setjaxspmode{㍗}{inhibit} +\jlreq@setjaxspmode{㎎}{inhibit} +\jlreq@setjaxspmode{㎏}{inhibit} +\jlreq@setjaxspmode{㎜}{inhibit} +\jlreq@setjaxspmode{㎝}{inhibit} +\jlreq@setjaxspmode{㎞}{inhibit} +\jlreq@setjaxspmode{㎡}{inhibit} +\jlreq@setjaxspmode{㏄}{inhibit} +\fi +% 分割禁止(分離禁止文字は特定の並びで分割禁止だが,とりあえず一括で禁止しておく.) +\jlreq@setprebreakpenalty{—}{10000} +\jlreq@setprebreakpenalty{…}{10000} +\jlreq@setprebreakpenalty{‥}{10000} +% ¥100とか70%とか…… + + +%. オプション処理 +%.. フォント関連 +\newdimen\jlreq@fontsize +\ifx l\jlreq@engine + \jlreq@tempdima=0.25mm + \setlength{\jlreq@fontsize}{% + \dimexpr\directlua{ + local act = string.char(92) + local s = [[\jlreq@option@fontsize]] + s = s:gsub("Q",act .. "jlreq@tempdima") + tex.print(s) + }\relax + }% +\else + \setlength{\jlreq@fontsize}{\dimexpr\jlreq@option@fontsize\relax} +\fi + +% JFMに関連する設定 +\ifx l\jlreq@engine + % この値は後でjfm-jlreq内で読む + \directlua{jlreq.open_bracket_pos = [[\jlreq@open@bracket@pos]]} + \ifjlreq@burasage\directlua{jlreq.burasage = true} + \else\directlua{jlreq.burasage = false}\fi +\else + % 非LuaTeXの場合はJFMの入れ替えと\everyparでの処理で対処. + \def\jlreq@jfmname@prefix{} + \def\jlreq@openbreackets@list{(〔[{〈《「『【} + \ifx u\jlreq@engine\edef\jlreq@openbreackets@list{\jlreq@openbreackets@list {⦅〘〖«〝‘“}}\fi + % \jlreq@jfmnameにJFMの名前を入れる + \ifjlreq@burasage\edef\jlreq@jfmname@prefix{b\jlreq@jfmname@prefix}\fi + \ifthenelse{\equal{\jlreq@open@bracket@pos}{zenkakunibu_nibu}}{\edef\jlreq@jfmname@prefix{\jlreq@jfmname@prefix z}}{} + \ifx u\jlreq@engine\edef\jlreq@jfmname@prefix{u\jlreq@jfmname@prefix}\fi + \edef\jlreq@jfmname{\jlreq@jfmname@prefix jlreq} + \edef\jlreq@jfmnameg{\jlreq@jfmname@prefix jlreqg} + % JFM glueの伸び縮みで行頭括弧が揃わないのを防ぐために常に\inhibitglueを入れる. + \ifthenelse{\equal{\jlreq@open@bracket@pos}{nibu_tentsuki}}{ + \def\jlreq@openbracket@hook{\jlreq@ifintokenlist{\jlreq@nextchar}{\jlreq@openbreackets@list}{\hskip -.5\jlreq@mol\inhibitglue}{}} + }{% zenkakunibu_nibu,zenkaku_tentsuki + \def\jlreq@openbracket@hook{\jlreq@ifintokenlist{\jlreq@nextchar}{\jlreq@openbreackets@list}{\inhibitglue}{}} + } + \AtBeginDocument{\PushPostHook{par}{\futurelet\jlreq@nextchar\jlreq@openbracket@hook}} +\fi +% 開き括弧の幅が全角の場合は,ベタ組にするために補正が必要 +\ifthenelse{\equal{\jlreq@open@bracket@pos}{zenkakunibu_nibu}}{ + \def\jlreq@open@bracket@before@space{\hskip -.5\jlreq@mol} +}{ + \def\jlreq@open@bracket@before@space{} +} + +%. フォント +\RequirePackage{lmodern} + +% 古いフォントコマンド +\DeclareOldFontCommand{\jlreq@oldfontcommand@mc}{\normalfont\mcfamily}{\mathmc} +\DeclareOldFontCommand{\jlreq@oldfontcommand@gt}{\normalfont\gtfamily}{\mathgt} +\DeclareOldFontCommand{\jlreq@oldfontcommand@rm}{\normalfont\rmfamily}{\mathrm} +\DeclareOldFontCommand{\jlreq@oldfontcommand@sf}{\normalfont\sffamily}{\mathsf} +\DeclareOldFontCommand{\jlreq@oldfontcommand@tt}{\normalfont\ttfamily}{\mathtt} +\DeclareOldFontCommand{\jlreq@oldfontcommand@bf}{\normalfont\bfseries}{\mathbf} +\DeclareOldFontCommand{\jlreq@oldfontcommand@it}{\normalfont\itshape}{\mathit} +\DeclareOldFontCommand{\jlreq@oldfontcommand@sl}{\normalfont\slshape}{\@nomath\sl} +\DeclareOldFontCommand{\jlreq@oldfontcommand@sc}{\normalfont\scshape}{\@nomath\sc} +\newcommand*{\jlreq@oldfontcommand@enable}{% + \let\mc=\jlreq@oldfontcommand@mc + \let\gt=\jlreq@oldfontcommand@gt + \let\rm=\jlreq@oldfontcommand@rm + \let\sf=\jlreq@oldfontcommand@sf + \let\tt=\jlreq@oldfontcommand@tt + \let\bf=\jlreq@oldfontcommand@bf + \let\it=\jlreq@oldfontcommand@it + \let\sl=\jlreq@oldfontcommand@sl + \let\sc=\jlreq@oldfontcommand@sc +} +\newcommand*{\jlreq@oldfontcommand@disable}{% + \let\mc=\@undefined + \let\gt=\@undefined + \let\rm=\@undefined + \let\sf=\@undefined + \let\tt=\@undefined + \let\bf=\@undefined + \let\it=\@undefined + \let\sl=\@undefined + \let\sc=\@undefined +} + +\DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal} +\DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal} + +%.. 和文 +\ifx l\jlreq@engine + \RequirePackage{luatexja-adjust} + \ltjenableadjust[lineend=extended,priority=true] + \ltjsetparameter{stretch_priority={kanjiskip=10,xkanjiskip=-30}} + \ltjsetparameter{shrink_priority={kanjiskip=0,xkanjiskip=0}} +\fi + +\ifx u\jlreq@engine + \def\jlreq@yokokanjiencoding{JY2} + \def\jlreq@tatekanjiencoding{JT2} +\fi +\ifx p\jlreq@engine + \def\jlreq@yokokanjiencoding{JY1} + \def\jlreq@tatekanjiencoding{JT1} +\fi +\ifx l\jlreq@engine + \def\jlreq@yokokanjiencoding{JY3} + \def\jlreq@tatekanjiencoding{JT3} + \expandafter\let\csname JY3/mc/m/n/10\endcsname\relax + \expandafter\let\csname JT3/mc/m/n/10\endcsname\relax + \DeclareFontShape{JY3}{mc}{m}{n}{<->\ltj@stdmcfont:jfm=jlreq;script=latn;-kern}{} + \DeclareFontShape{JY3}{gt}{m}{n}{<->\ltj@stdgtfont:jfm=jlreq;script=latn;-kern}{} + \DeclareFontShape{JT3}{mc}{m}{n}{<->\ltj@stdmcfont:jfm=jlreqv;script=latn;-kern}{} + \DeclareFontShape{JT3}{gt}{m}{n}{<->\ltj@stdgtfont:jfm=jlreqv;script=latn;-kern}{} +\else + \expandafter\let\csname \jlreq@yokokanjiencoding/mc/m/n/10\endcsname\relax + \expandafter\let\csname \jlreq@tatekanjiencoding/mc/m/n/10\endcsname\relax + \DeclareFontShape{\jlreq@yokokanjiencoding}{mc}{m}{n}{<-> \jlreq@jfmname}{} + \DeclareFontShape{\jlreq@yokokanjiencoding}{gt}{m}{n}{<-> \jlreq@jfmnameg}{} + \DeclareFontShape{\jlreq@tatekanjiencoding}{mc}{m}{n}{<-> \jlreq@jfmname-v}{} + \DeclareFontShape{\jlreq@tatekanjiencoding}{gt}{m}{n}{<-> \jlreq@jfmnameg-v}{} +\fi +\DeclareFontShape{\jlreq@yokokanjiencoding}{mc}{bx}{n}{<->ssub*gt/m/n}{} +\DeclareFontShape{\jlreq@yokokanjiencoding}{gt}{bx}{n}{<->ssub*gt/m/n}{} +\DeclareFontShape{\jlreq@yokokanjiencoding}{mc}{m}{it}{<->ssub*mc/m/n}{} +\DeclareFontShape{\jlreq@yokokanjiencoding}{mc}{m}{sl}{<->ssub*mc/m/n}{} +\DeclareFontShape{\jlreq@yokokanjiencoding}{mc}{m}{sc}{<->ssub*mc/m/n}{} +\DeclareFontShape{\jlreq@yokokanjiencoding}{gt}{m}{it}{<->ssub*gt/m/n}{} +\DeclareFontShape{\jlreq@yokokanjiencoding}{gt}{m}{sl}{<->ssub*gt/m/n}{} +\DeclareFontShape{\jlreq@yokokanjiencoding}{mc}{bx}{it}{<->ssub*gt/m/n}{} +\DeclareFontShape{\jlreq@yokokanjiencoding}{mc}{bx}{sl}{<->ssub*gt/m/n}{} +\DeclareFontShape{\jlreq@tatekanjiencoding}{mc}{bx}{n}{<->ssub*gt/m/n}{} +\DeclareFontShape{\jlreq@tatekanjiencoding}{gt}{bx}{n}{<->ssub*gt/m/n}{} +\DeclareFontShape{\jlreq@tatekanjiencoding}{mc}{m}{it}{<->ssub*mc/m/n}{} +\DeclareFontShape{\jlreq@tatekanjiencoding}{mc}{m}{sl}{<->ssub*mc/m/n}{} +\DeclareFontShape{\jlreq@tatekanjiencoding}{mc}{m}{sc}{<->ssub*mc/m/n}{} +\DeclareFontShape{\jlreq@tatekanjiencoding}{gt}{m}{it}{<->ssub*gt/m/n}{} +\DeclareFontShape{\jlreq@tatekanjiencoding}{gt}{m}{sl}{<->ssub*gt/m/n}{} +\DeclareFontShape{\jlreq@tatekanjiencoding}{mc}{bx}{it}{<->ssub*gt/m/n}{} +\DeclareFontShape{\jlreq@tatekanjiencoding}{mc}{bx}{sl}{<->ssub*gt/m/n}{} + +% 数式フォント設定 +\ifx l\jlreq@engine\else + \DeclareSymbolFont{mincho}{\jlreq@yokokanjiencoding}{mc}{m}{n} + \DeclareSymbolFontAlphabet{\mathmc}{mincho} + \SetSymbolFont{mincho}{bold}{\jlreq@yokokanjiencoding}{gt}{m}{n} + \jfam\symmincho + \DeclareMathAlphabet{\mathgt}{\jlreq@yokokanjiencoding}{gt}{m}{n} +\fi +\AtBeginDocument{% + \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc}% + \reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt}% +} + +% \baselineskipの計算 +% いったん文字サイズを変更((u)platexの際にzh/zwをきちんとするため) +\@setfontsize\normalsize{\jlreq@fontsize}{\jlreq@fontsize}% +\newdimen\jlreq@baselineskip +\ifx\jlreq@option@baselineskip\@empty + \setlength{\jlreq@baselineskip}{\dimexpr 17\jlreq@fontsize/10\relax}% +\else + \ifx l\jlreq@engine + \jlreq@tempdima=0.25mm + \setlength{\jlreq@baselineskip}{% + \dimexpr\directlua{ + local act = string.char(92) + local s = [[\jlreq@option@baselineskip]] + s = s:gsub("Q",act .. "jlreq@tempdima"):gsub("zh",act .. "zh"):gsub("zw",act .. "zw") + tex.print(s) + }\relax + }% + \else + \setlength{\jlreq@baselineskip}{\jlreq@option@baselineskip} + \fi +\fi +\ifdim\jlreq@fontsize>\jlreq@baselineskip + \ClassError{jlreq}{The baselineskip is less than fontsize}{\@ehc}% +\fi +\ifthenelse{\lengthtest{\jlreq@baselineskip<1.5\jlreq@fontsize} \OR \lengthtest{\jlreq@baselineskip>2\jlreq@fontsize}}{ + \jlreq@warning{行間は二分以上全角以下が望ましい (2.4.2.d 注3)} +}{} + +\emergencystretch 3\jlreq@mol + +\renewcommand{\normalsize}{% + \@setfontsize\normalsize{\jlreq@fontsize}{\jlreq@baselineskip}% + \abovedisplayskip 1.1\jlreq@fontsize \@plus .3\jlreq@fontsize \@minus .4\jlreq@fontsize + \abovedisplayshortskip \z@ \@plus .3\jlreq@fontsize + \belowdisplayskip .9\jlreq@fontsize \@plus.3\jlreq@fontsize \@minus.4\jlreq@fontsize + \belowdisplayshortskip \belowdisplayskip + \let\@listi\@listI} + +\if@tate\tate\fi % ここで発行しておく +\mcfamily\selectfont\normalsize +\setbox0\hbox{ } % 全角スペース +\setlength\Cht{\ht0} +\setlength\Cdp{\dp0} +\setlength\Cwd{\wd0} +\setlength\Cvs{\baselineskip} +\setlength\Chs{\wd0} + +% 4.1.3.a +% 文字サイズを基準としているような寸法に対しては, +% \@setfontsizeが実行されるたびに追随して値を変える +% その処理は\jlreq@setfontsizehookに入れる +\let\jlreq@original@@setfontsize=\@setfontsize +\renewcommand*{\@setfontsize}[3]{% + \jlreq@original@@setfontsize{#1}{#2}{#3}% + \jlreq@setfontsizehook +} +\def\jlreq@setfontsizehook{} +\appto\jlreq@setfontsizehook{\ifdim\parindent>0pt\setlength{\parindent}{1\jlreq@mol}\fi} + +% 2.5.2 \baselineskipは一定の方がよい? +\newcommand{\footnotesize}{% + \@setfontsize\footnotesize{.8\jlreq@fontsize}{\dimexpr 115\jlreq@baselineskip/170\relax}% 脚注文字サイズの二分より少し小さい値を行間に: 4.2.5.e + \abovedisplayskip .6\jlreq@gol \@plus.2\jlreq@gol \@minus.4\jlreq@gol + \abovedisplayshortskip \z@ \@plus.1\jlreq@gol + \belowdisplayshortskip .3\jlreq@gol \@plus.1\jlreq@gol \@minus.2\jlreq@gol + \def\@listi{\leftmargin\leftmargini + \topsep .3\jlreq@gol \@plus.1\jlreq@gol \@minus.1\jlreq@gol + \parsep .2\jlreq@gol \@plus.1\jlreq@gol \@minus.1\jlreq@gol + \itemsep \parsep}% + \belowdisplayskip \abovedisplayskip} +% tsize10.cloの引数を,そのまま\jlreq@fontsize/\jlreq@baselineskipでスケーリングしているだけ. +\newcommand{\small}{% + \@setfontsize\small{.9\jlreq@fontsize}{\dimexpr 11\jlreq@baselineskip/17\relax}% + \abovedisplayskip .85\jlreq@gol \@plus.3\jlreq@gol \@minus.4\jlreq@gol + \abovedisplayshortskip \z@ \@plus.2\jlreq@gol + \belowdisplayshortskip .4\jlreq@gol \@plus.2\jlreq@gol \@minus.2\jlreq@gol + \def\@listi{\leftmargin\leftmargini + \topsep .4\jlreq@gol \@plus.2\jlreq@gol \@minus.2\jlreq@gol + \parsep .2\jlreq@gol \@plus.1\jlreq@gol \@minus.1\jlreq@gol + \itemsep \parsep}% + \belowdisplayskip \abovedisplayskip} +\newcommand{\scriptsize}{\@setfontsize\scriptsize{\dimexpr 7\jlreq@fontsize/10\relax}{\dimexpr 8\jlreq@baselineskip/17\relax}} +\newcommand{\tiny}{\@setfontsize\tiny{\dimexpr 5\jlreq@fontsize/10\relax}{\dimexpr 6\jlreq@baselineskip/17\relax}} +\newcommand{\large}{\@setfontsize\large{\dimexpr12\jlreq@fontsize/10\relax}{\jlreq@baselineskip}} +\newcommand{\Large}{\@setfontsize\Large{\dimexpr14\jlreq@fontsize/10\relax}{\dimexpr 21\jlreq@baselineskip/17\relax}} +\newcommand{\LARGE}{\@setfontsize\LARGE{\dimexpr17\jlreq@fontsize/10\relax}{\dimexpr 25\jlreq@baselineskip/17\relax}} +\newcommand{\huge}{\@setfontsize\huge{2\jlreq@fontsize}{\dimexpr 28\jlreq@baselineskip/17\relax}} +\newcommand{\Huge}{\@setfontsize\Huge{\dimexpr 25\jlreq@fontsize/10\relax}{\dimexpr 33\jlreq@baselineskip/17\relax}} + +\if@tate + \ifx l\jlreq@engine + \RequirePackage{lltjext} + \else + \RequirePackage{plext} + \fi + \renewcommand*{\@Kanji}[1]{\expandafter\kansuji\number #1\relax} % \relax追加 + \rensujiskip=0\zh plus 0.25\zh minus 0\zh +\fi + +% このあたりはtarticleと同じ +\setlength\lineskip{.1\jlreq@gol} +\setlength\normallineskip{.1\jlreq@gol} +\renewcommand{\baselinestretch}{} +\setlength\parskip{0\p@ \@plus \p@} +\setlength\parindent{1\jlreq@mol} +\@lowpenalty 51 +\@medpenalty 151 +\@highpenalty 301 + +% 変数定義(他にも散らばっているけど) +% 罫線の太さ(4.4.3.c 注1) +\newdimen\jlreq@omotekeiwidth +\jlreq@omotekeiwidth=0.12mm +\newdimen\jlreq@chuubusokeiwidth +\jlreq@chuubusokeiwidth=0.25mm +\newdimen\jlreq@urakeiwidth +\jlreq@urakeiwidth=0.4mm +% 脚注のインデント +\newdimen\jlreq@footnoteindent + +%\RequirePackage{jlreq-debug} + +%. ページレイアウト +% landscapeの場合縦横をひっくり返す +\if@landscape + \setlength\@tempdima {\paperheight} + \setlength\paperheight{\paperwidth} + \setlength\paperwidth {\@tempdima} +\fi + +% \pdfpagewidthとか設定 +\ifx l\jlreq@engine + \let\jlreq@pagewidth=\pagewidth + \let\jlreq@pageheight=\pageheight +\else + \let\jlreq@pagewidth=\pdfpagewidth + \let\jlreq@pageheight=\pdfpageheight +\fi +\setlength{\jlreq@pagewidth}{\paperwidth} +\setlength{\jlreq@pageheight}{\paperheight} +\iftombow + \addtolength{\jlreq@pagewidth}{2in} + \addtolength{\jlreq@pageheight}{2in} +\fi + + +\ifx l\jlreq@engine + \def\jlreq@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@expand@speciallength#1{#1} +\fi +\def\jlreq@speciallength#1{\dimexpr\jlreq@expand@speciallength{#1}\relax} + +% 二段組み用パラメータ +\setlength{\columnsep}{\jlreq@speciallength{\jlreq@option@column@gap}} +\setlength{\columnseprule}{0pt} + +% デフォルト値は縦横ともにが0.5倍. +%.. \textwidth:縦書きは縦,横書きは横 +% 一度\textwidthに一行の長さの文字数を入れる(段組の場合でも) +\@tempdima=1\jlreq@fontsize +\ifx\jlreq@option@line@length\@empty + \if@tate + \setlength{\textwidth}{0.75\paperheight} + \else + \setlength{\textwidth}{0.75\paperwidth} + \fi + \if@twocolumn + \setlength{\textwidth}{\dimexpr(\textwidth - \columnsep)/2\relax} + \fi + \divide\textwidth\@tempdima +\else + \setlength{\textwidth}{\jlreq@speciallength{\jlreq@option@line@length}} + \divide\textwidth\@tempdima + \if@tate + \ifnum\number\textwidth>52 + \jlreq@warning{一行の長さは52文字以下が望ましい (2.4.2.c 注2)} + \fi + \else + \ifnum\number\textwidth>40 + \jlreq@warning{一行の長さは40文字以下が望ましい (2.4.2.c 注2)} + \fi + \fi +\fi +\multiply\textwidth\@tempdima +\if@twocolumn + \setlength{\textwidth}{\dimexpr2\textwidth + \columnsep\relax} +\fi + +%.. \textheight:縦書きは横,横書きは縦 +\ifx\jlreq@option@number@of@lines\@empty + \if@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@speciallength{\jlreq@option@number@of@lines\baselineskip} - \baselineskip + \topskip\relax} +\fi + +\setlength{\topskip}{1\zw} % フォントサイズと一致させる +\ifx\jlreq@option@headfoot@verticalpos\@empty + \if@tate\def\jlreq@option@headfoot@verticalpos{1zh} + \else\def\jlreq@option@headfoot@verticalpos{2zh}\fi +\fi +\setlength{\headsep}{\jlreq@speciallength{\jlreq@option@headfoot@verticalpos}} +\ifdim\headsep<1\zw\jlreq@warning{基本版面との上下方向の最低の空き量を,基本版面の文字サイズの全角アキとする (26.1.a)}\fi +\setlength{\headheight}{1\zh} +%.. 横 +\ifx\jlreq@option@gutter\@empty + % 中央配置 + \setlength{\oddsidemargin}{\paperwidth} + \if@tate + \addtolength{\oddsidemargin}{-\textheight} + \else + \addtolength{\oddsidemargin}{-\textwidth} + \fi + \setlength{\oddsidemargin}{.5\oddsidemargin} + \addtolength{\oddsidemargin}{-1in} + \setlength{\evensidemargin}{\oddsidemargin} +\else + \setlength{\oddsidemargin}{\jlreq@speciallength{\jlreq@option@gutter}} + \setlength{\evensidemargin}{\dimexpr\paperwidth - \textheight - \oddsidemargin\relax} + \if@tate + \setlength{\jlreq@tempdima}{\oddsidemargin} + \setlength{\oddsidemargin}{\evensidemargin} + \setlength{\evensidemargin}{\jlreq@tempdima} + \fi + \addtolength{\oddsidemargin}{-1in} + \addtolength{\evensidemargin}{-1in} +\fi +%.. 縦 +\ifx\jlreq@option@head@space\@empty + \setlength{\topmargin}{\paperheight} + \if@tate + \addtolength{\topmargin}{-\textwidth} + \else + \addtolength{\topmargin}{-\textheight} + \fi + \ifx\jlreq@option@foot@space\@empty + % 中央配置 + \setlength{\topmargin}{0.5\topmargin} + \else + \addtolength{\topmargin}{-\jlreq@speciallength{\jlreq@option@foot@space}} + \fi +\else + \ifx\jlreq@option@foot@space\@empty + \setlength{\topmargin}{\jlreq@speciallength{\jlreq@option@head@space}} + \else + % 両方指定されていたら,縦書きは地を,横書きは天を使う + \if@tate + \setlength{\topmargin}{\paperheight} + \addtolength{\topmargin}{-\textwidth} + \addtolength{\topmargin}{-\jlreq@speciallength{\jlreq@option@foot@space}} + \else + \setlength{\topmargin}{\jlreq@speciallength{\jlreq@option@head@space}} + \fi + \fi +\fi + + +\addtolength{\topmargin}{-\headsep} +\addtolength{\topmargin}{-\headheight} +\addtolength{\topmargin}{-1in} +%.. 下 +% 本文から一文字分離すつもり +\setlength{\footskip}{2\zh} +% \maxdepth + \topskip = フォントサイズ×1.5 +\setlength{\maxdepth}{1.5\jlreq@fontsize} +\addtolength{\maxdepth}{-\topskip} + +%. 見出し関係 (4.1) +% 見出しの直前に実行される +\newcommand*{\jlreq@hook@beforeheadings}[1]{} +\def\jlreq@heading@allheadings{} +%.. 中/半扉見出し +% addcontentslineに渡すやつ:番号出すのと出さないの +\newcommand{\DeclareTobiraHeading}[3]{% + \appto{\jlreq@heading@allheadings}{,#1}% + \expandafter\def\csname jlreq@heading@level@#1\endcsname{#2}% + \expandafter\edef\csname jlreq@heading@setting@#1\endcsname{\unexpanded{#3}}% + \expandafter\def\csname jlreq@heading@type@#1\endcsname{\RenewTobiraHeading}% + \@ifundefined{c@#1}{\newcounter{#1}}{}% + \@ifundefined{#1mark}{\expandafter\let\csname #1mark\endcsname\@gobble}{}% + \@ifundefined{jlreq@heading@maketoc@#1}{% + % {1 = *}{2 = ラベル}{3 = running head} + \expandafter\def\csname jlreq@heading@maketoc@#1\endcsname##1##2##3{% + \ifnum0\jlreq@ifempty{##1}{}{1}\ifnum #2>\c@secnumdepth 1\fi>0\else + \csname #1mark\endcsname{##3}% + \addcontentsline{toc}{#1}{\protect\numberline{##2}##3}% + \fi + }% + }{}% + \begingroup + \let\jlreq@contents@label@format=\@undefined + \let\jlreq@format=\@undefined + \edef\jlreq@label@format{\expandonce{\csname the#1\endcsname}}% + \def\jlreq@heading@clearpage{\cleardoublepage}% + \def\jlreq@pagestyle{empty}% + \jlreq@parsekeyval[DeclareTobiraHeading]{ + {label_format}{\def\jlreq@label@format{##1}} + {format}{\def\jlreq@format####1####2{##1}} + {pagestyle}{\def\jlreq@pagestyle{##1}} + {type}[han,naka]{ + \jlreq@switch{##1}{ + {han}{\def\jlreq@heading@clearpage{\clearpage}} + {naka}{\def\jlreq@heading@clearpage{\cleardoublepage}} + } + } + }{#3}% + \ifx\jlreq@format\@undefined + \def\jlreq@format##1##2{##1##2}% + \fi + \edef\jlreq@formatwlabel{\noexpand\jlreq@format{\expandonce{\jlreq@label@format}}}% + \def\jlreq@addtodo{}% + \@ifundefined{l@#1}{% + \edef\jlreq@do{\unexpanded{\setbox\jlreq@tempboxa=\hbox}{\expandonce{\jlreq@label@format}}}% + \jlreq@do + \jlreq@tempdima=\wd\jlreq@tempboxa + \jlreq@tempdimb=1\jlreq@mol + \divide\jlreq@tempdima by \jlreq@tempdimb + \eappto\jlreq@addtodo{% + \noexpand\def\expandonce{\csname l@#1\endcsname}{\unexpanded{\@dottedtocline{#2}{0\jlreq@mol}}{\the\numexpr\jlreq@tempdima + 1\relax\noexpand\jlreq@mol}}% + }% + }{}% + \edef\jlreq@do{% + \expandonce{\jlreq@addtodo}% + \noexpand\def\expandonce{\csname jlreq@TobiraHeading@start@#1\endcsname}[####1]####2{% + \unexpanded{\ifnum#2>\c@secnumdepth\else}% + \unexpanded{\refstepcounter{#1}}% + \noexpand\fi + \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}{}{\expandonce{\jlreq@label@format}}{####1}% + \unexpanded{\ifnum#2>\c@secnumdepth\relax}% + \expandonce{\jlreq@format{}{##1}}% + \noexpand\else + \expandafter\expandonce\expandafter{\jlreq@formatwlabel{##2}}% + \noexpand\fi + \noexpand\@afterheading + \expandonce{\jlreq@heading@clearpage}% + \unexpanded{\if@restonecol\twocolumn\fi}% + }% + \noexpand\def\expandonce{\csname jlreq@TobiraHeading@start@s@#1\endcsname}####1{% + \expandonce{\jlreq@format{}{##1}}% + \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}{}{\expandonce{\jlreq@label@format}}{####1}% + \noexpand\@afterheading + \expandonce{\jlreq@heading@clearpage}% + \unexpanded{\if@restonecol\twocolumn\fi}% + }% + \noexpand\def\expandonce{\csname #1\endcsname}{% + \unexpanded{\if@twocolumn\onecolumn\@restonecoltrue\else\@restonecolfalse\fi\cleardoublepage}% + \ifx\jlreq@pagestyle\@empty\else\noexpand\thispagestyle{\expandonce{\jlreq@pagestyle}}\fi + \noexpand\secdef{\expandonce{\csname jlreq@TobiraHeading@start@#1\endcsname}}{\expandonce{\csname jlreq@TobiraHeading@start@s@#1\endcsname}}}% + }% + \expandafter\endgroup + \jlreq@do +} + +\newcommand{\NewTobiraHeading}[3]{% + \expandafter\@ifdefinable\csname #1\endcsname{\DeclareTobiraHeading{#1}{#2}{#3}}% +} +\newcommand{\RenewTobiraHeading}[3]{% + \@ifundefined{#1}{\@latex@error{\expandafter\string\csname#1\endcsname\space undefined}\@ehc}{\DeclareTobiraHeading{#1}{#2}{#3}}% +} +\newcommand{\ProvideTobiraHeading}[3]{% + \@ifundefined{#1}{\DeclareTobiraHeading{#1}{#2}{#3}}{}% +} + +%.. 別行見出し +% \jlreq@startBlockHeading{1 = 命令名}{2 = レベル}{3 = 字下げ}{4 = 前空き}{5 = 後ろ空き}{6 = トータル行数}{7 = フォーマット関連}*{見出し}[副題] +% 字下げはa:**だと追加する値(ページ行頭には入らない),s:**も追加だがページ行頭でも入る, +% r:**だとその値に強制する. +\newcommand{\jlreq@startBlockHeading}[7]{% + \edef\jlreq@startBlockHeading@format{\unexpanded{#7}}% + \jlreq@startBlockHeading@{#1}{#2}{{#3}{#4}{#5}{#6}}% +} +% {1 = 命令}{2 = レベル}{3 = スペース関連} +\newcommand{\jlreq@startBlockHeading@}[3]{% + \@ifstar{\@dblarg{\jlreq@startBlockHeading@@{#1}{#2}{#3}{*}}}{\@dblarg{\jlreq@startBlockHeading@@{#1}{#2}{#3}{}}}% +} +% {1 = 命令}{2 = レベル}{3 = スペース関連}{4 = *}[5 = running head]{6 = 見出し} +\long\def\jlreq@startBlockHeading@@#1#2#3#4[#5]#6{% + \@ifnextchar[{\jlreq@startBlockHeading@@@{#1}{#2}{#3}{#4}{#5}{#6}}{\jlreq@startBlockHeading@@@{#1}{#2}{#3}{#4}{#5}{#6}[]}% +} + +% {1 = レベル}{2 = ラベルフォーマット}{3 = 本体フォーマット}{4 = 副題フォーマット}{5 = *}{6 = 見出し}{7 = 副題} +\long\def\jlreq@startBlockHeading@setformat#1#2#3#4#5#6#7{% + % \jlreq@tempaに{ラベル}{見出し}{副題}という形のものを入れる + \ifnum0\jlreq@ifempty{#5}{}{1}\ifnum #1>\c@secnumdepth 1\fi>0 + \def\jlreq@tempa{{}{#6}}% + \else + \def\jlreq@tempa{{#2}{#6}}% + \fi + \jlreq@ifempty{#7}{% + \appto\jlreq@tempa{{}}% + }{% + \long\def\jlreq@tempb##1{#4}% + \expandafter\appto\expandafter\jlreq@tempa\expandafter{\expandafter{\jlreq@tempb{#7}}}% + }% + \long\def\jlreq@tempb##1##2##3{#3}% + \edef\jlreq@tempa{\unexpanded{\expandafter\def\expandafter\jlreq@result\expandafter}{\noexpand\jlreq@tempb\expandonce{\jlreq@tempa}}}% + \jlreq@tempa +} +% {1 = 命令}{2 = レベル}{3 = スペース関連}{4 = *}{5 = running head}{6 = 見出し}[7 = 副題] +\def\jlreq@startBlockHeading@@@#1#2#3#4#5#6[#7]{% + \ifnum0\jlreq@ifempty{#4}{}{1}\ifnum #2>\c@secnumdepth 1\fi>0\else + \refstepcounter{#1}% + \fi + % 後で呼び出す\jlreq@startBlockHeading@addtocontentslineを定義する + \long\def\jlreq@tempa##1##2##3{\def\jlreq@tempa{##1}}% + \expandafter\jlreq@tempa\jlreq@startBlockHeading@format + \edef\jlreq@startBlockHeading@addtocontentsline{% + \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}{\unexpanded{#4}}{\expandonce{\jlreq@tempa}}{\unexpanded{#5}}% + }% + \def\jlreq@do{\jlreq@startBlockHeading@setformat{#2}}% + \expandafter\jlreq@do\jlreq@startBlockHeading@format{#4}{#6}{#7}% + \def\jlreq@do{\jlreq@startBlockHeading@@@@#3}% + \expandafter\jlreq@do\expandafter{\jlreq@result}% +} +\def\jlreq@startBlockHeading@removecolumn#1:{#1} + +\def\jlreq@startBlockHeading@analyzespace#1:#2\jlreq@endmark{% + \jlreq@ifempty{#1}{% + \def\jlreq@startBlockHeading@spacetype{}% + \def\jlreq@startBlockHeading@space{}% + }{% + \let\jlreq@startBlockHeading@spacetype=#1% + \expandafter\def\expandafter\jlreq@startBlockHeading@space\expandafter{\jlreq@startBlockHeading@removecolumn#2}% + }% +} + +% {1 = 字下げ}{2 = 前空き}{3 = 後ろ空き}{4 = トータル行数}{5 = 出力} +\long\def\jlreq@startBlockHeading@@@@#1#2#3#4#5{% + \if@noskipsec\leavevmode\fi + \setbox\jlreq@tempboxa=\vbox{% + \jlreq@ifempty{#1}{}{\hsize=\dimexpr\hsize - #1\relax}% + \noindent #5}% + \par + \@afterindenttrue + % \jlreq@tempskip(a/b)に前/後ろに入れるべき値を入れる + % #2がa:ならばその値は\jlreq@tempskipaには入れず\jlreq@tempskipcに入れておく + \jlreq@tempskipc=0pt + \jlreq@startBlockHeading@analyzespace#2:\jlreq@endmark + \setbox\jlreq@tempboxb=\vbox{ }% + \jlreq@ifempty{#4}{% + \ifx\jlreq@startBlockHeading@space\@empty\else + \jlreq@tempskipa=\glueexpr\jlreq@startBlockHeading@space\relax + \fi + \jlreq@tempskipb=0pt\relax + }{% + \jlreq@tempskipb=\glueexpr(\baselineskip*(#4 + 1) - \ht\jlreq@tempboxb - \dp\jlreq@tempboxb - \ht\jlreq@tempboxa - \dp\jlreq@tempboxa)/2\relax + \ifx\jlreq@startBlockHeading@space\@empty + \jlreq@tempskipa=\jlreq@tempskipb + \else + \ifx a\jlreq@startBlockHeading@spacetype + \jlreq@tempskipa=\jlreq@tempskipb + \jlreq@tempskipc=\glueexpr\jlreq@startBlockHeading@space\relax + \fi + \ifx s\jlreq@startBlockHeading@spacetype + \jlreq@tempskipa=\glueexpr\jlreq@tempskipb + \jlreq@startBlockHeading@space\relax + \fi + \ifx r\jlreq@startBlockHeading@spacetype + \jlreq@tempskipa=\glueexpr\jlreq@startBlockHeading@space\relax% + \jlreq@tempskipb=\glueexpr(\baselineskip*(#4 + 1) - \ht\jlreq@tempboxb - \dp\jlreq@tempboxb - \ht\jlreq@tempboxa - \dp\jlreq@tempboxa) - \jlreq@startBlockHeading@space\relax + \fi + \fi + }% + \ifdim\jlreq@tempskipc=0pt\else\vspace{\jlreq@tempskipc}\fi + % \baselineskipから来るglueを引いておく + \jlreq@tempskipa=\glueexpr\jlreq@tempskipa - \baselineskip + \dp\jlreq@tempboxb\relax + \jlreq@startBlockHeading@addtocontentsline + \setbox\jlreq@tempboxa=\vbox{% + \ifdim\jlreq@tempskipa=0pt\else\vskip\jlreq@tempskipa\fi + \noindent + \jlreq@ifempty{#1}{}{\hskip #1}% + \box\jlreq@tempboxa\nopagebreak}% + \dp\jlreq@tempboxa=\dimexpr\dp\jlreq@tempboxa + \ht\jlreq@tempboxa\relax + \ht\jlreq@tempboxa=0pt + \box\jlreq@tempboxa + \par\nobreak + \prevdepth=0pt + \jlreq@startBlockHeading@analyzespace#3:\jlreq@endmark + \jlreq@tempskipb=\glueexpr\jlreq@tempskipb + \ht\jlreq@tempboxb - \baselineskip\relax + \ifx\jlreq@startBlockHeading@space\@empty\else + \ifx a\jlreq@startBlockHeading@spacetype + \jlreq@tempskipb = \glueexpr\jlreq@tempskipb + \jlreq@startBlockHeading@space\relax + \else + \jlreq@tempskipb=\glueexpr\jlreq@startBlockHeading@space + \ht\jlreq@tempboxb - \baselineskip\relax + \fi + \fi + \ifdim\jlreq@tempskipb=0pt\else\vspace{\jlreq@tempskipb}\fi + \@afterheading +} + +% \DeclareBlockHeading{命令名}{レベル}{設定} +% 行取り(4.1.6) +% a: lines=<何行取りか> +% b,d: before_lines, after_lines +% c: before_space, after_space +% f: beforeやafterを省略する +% font=<見出しフォント>, labelfont=<ラベルフォント>, subtitle_font=<副題フォント> +% indent=<全体のインデント> +% pagebreak=clearpage/cleardoublepage/newcolumn/nariyuki +% なお,これ以外に見出しの前後に記号を付ける,あるいは罫線を見出しの前後に配置する,罫線で見出しを囲むなどといったことも行われている. +% 縦組の偶数ページの場合は,ページ末に見出しを配置する. +\newcommand{\DeclareBlockHeading}[3]{% + \appto{\jlreq@heading@allheadings}{,#1}% + \expandafter\def\csname jlreq@heading@level@#1\endcsname{#2}% + \expandafter\edef\csname jlreq@heading@setting@#1\endcsname{\unexpanded{#3}}% + \expandafter\def\csname jlreq@heading@type@#1\endcsname{\RenewBlockHeading}% + \@ifundefined{c@#1}{\newcounter{#1}}{}% + \@ifundefined{#1mark}{\expandafter\let\csname #1mark\endcsname\@gobble}{}% + % 目次への出力をするマクロ.外部に切り出しておく. + \@ifundefined{jlreq@heading@maketoc@#1}{% + % {1 = *}{2 = ラベル}{3 = running head} + \expandafter\def\csname jlreq@heading@maketoc@#1\endcsname##1##2##3{% + \ifnum0\jlreq@ifempty{##1}{}{1}\ifnum #2>\c@secnumdepth 1\fi>0\else + \csname #1mark\endcsname{##3}% + \addcontentsline{toc}{#1}{\protect\numberline{##2}##3}% + \fi + }% + }{}% + \begingroup + \def\jlreq@lines{1}% + \def\jlreq@before@space{}% + \def\jlreq@after@space{}% + \def\jlreq@before@lines{}% + \def\jlreq@after@lines{}% + \def\jlreq@font{\normalsize}% + \def\jlreq@subtitle@font{\normalsize}% + \def\jlreq@indent{0}% + \let\jlreq@format=\@undefined + \def\jlreq@pagebreak{}% + \let\jlreq@label@format=\@undefined + \let\jlreq@subtitle@format=\@undefined + \def\jlreq@pagetop@space{a}% + \jlreq@parsekeyval[BlockHeading]{ + {lines}{\def\jlreq@lines{##1}} + {before_space}{\def\jlreq@before@space{##1}} + {after_space}{\def\jlreq@after@space{##1}} + {before_lines}{\def\jlreq@before@lines{##1}} + {after_lines}{\def\jlreq@after@lines{##1}} + {font}{\def\jlreq@font{##1}} + {subtitle_font}{\def\jlreq@subtitle@font{##1}} + {indent}{\def\jlreq@indent{##1}} + {format}{\edef\jlreq@format{\unexpanded{##1}}} + {label_format}{\edef\jlreq@label@format{\unexpanded{##1}}} + {subtitle_format}{\edef\jlreq@subtitle@format{\unexpanded{##1}}} + *{pagetop_space}{\def\jlreq@pagetop@space{s}}% ページ頭でもスペースを入れる + {pagebreak}[clearpage,cleardoublepage,clearcolumn,nariyuki]{ + \jlreq@switch{##1}{ + {clearpage}{\def\jlreq@pagebreak{\clearpage}} + {cleardoublepage}{\def\jlreq@pagebreak{\cleardoublepage}} + {clearcolumn}{\if@twocolumn\def\jlreq@pagebreak{\newpage}\else\def\jlreq@pagebreak{}\fi} + {nariyuki}{\def\jlreq@pagebreak{}} + } + } + }{#3}% + \ifx\jlreq@format\@undefined + \edef\jlreq@format{% + \expandonce{\jlreq@font}\unexpanded{##1}\unexpanded{##2}% + \unexpanded{##3}% + }% + \fi + \ifx\jlreq@label@format\@undefined + \def\jlreq@label@format{\@seccntformat{#1}}% + \fi + \ifx\jlreq@subtitle@format\@undefined + \edef\jlreq@subtitle@format{{\unexpanded{\nobreak\par\hspace*{4\jlreq@mol}}\expandonce{\jlreq@subtitle@font}---\unexpanded{##1}---}}% + \fi + \def\jlreq@addtodo{}% + \@ifundefined{l@#1}{ + % 長さは適当に計測する + \begingroup + % ちょっと大きめで計測しておく + \csname c@#1\endcsname=9 + \setbox\jlreq@tempboxa=\hbox{\jlreq@label@format}% + \edef\jlreq@do{\noexpand\jlreq@tempdima=\the\dimexpr\wd\jlreq@tempboxa\relax}% + \expandafter\endgroup + \jlreq@do + \jlreq@tempdimb=1\jlreq@mol + \divide\jlreq@tempdima by \jlreq@tempdimb + \eappto\jlreq@addtodo{% + \noexpand\def\expandonce{\csname l@#1\endcsname}{\unexpanded{\@dottedtocline{#2}{0\jlreq@mol}}{\the\numexpr\jlreq@tempdima + 1\relax\noexpand\jlreq@mol}}% + }% + }{}% + % before/after_lines優先 + \ifx\jlreq@before@space\@empty\else\edef\jlreq@before@space{r:\expandonce{\jlreq@before@space}}\fi + \ifx\jlreq@before@lines\@empty\else\edef\jlreq@before@space{\expandonce{\jlreq@pagetop@space}:\expandonce{\jlreq@before@lines}\baselineskip}\fi + \ifx\jlreq@after@space\@empty\else\edef\jlreq@after@space{r:\expandonce{\jlreq@after@space}}\fi + \ifx\jlreq@after@lines\@empty\else\edef\jlreq@after@space{a:\expandonce{\jlreq@after@lines}\baselineskip}\fi + \ifx\jlreq@indent\@empty\else\edef\jlreq@indent{\expandonce{\jlreq@indent}\jlreq@mol}\fi + \edef\jlreq@do{% + \expandonce{\jlreq@addtodo}% + \noexpand\edef\expandonce{\csname #1\endcsname}{\noexpand\unexpanded{% + \noexpand\jlreq@hook@beforeheadings{#1}% + \expandonce{\jlreq@pagebreak}% + \unexpanded{\jlreq@startBlockHeading{#1}{#2}}{\expandonce{\jlreq@indent}}{\expandonce{\jlreq@before@space}}{\expandonce{\jlreq@after@space}}{\expandonce{\jlreq@lines}}{{\expandonce{\jlreq@label@format}}{\expandonce{\jlreq@format}}{\expandonce{\jlreq@subtitle@format}}% + }}}% + }% + \expandafter\endgroup + \jlreq@do +} + +\newcommand{\NewBlockHeading}[3]{% + \expandafter\@ifdefinable\csname #1\endcsname{\DeclareBlockHeading{#1}{#2}{#3}}% +} +\newcommand{\RenewBlockHeading}[3]{% + \@ifundefined{#1}{\@latex@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@heading@allheadings}{,#1}% + \expandafter\def\csname jlreq@heading@level@#1\endcsname{#2}% + \expandafter\edef\csname jlreq@heading@setting@#1\endcsname{\unexpanded{#3}}% + \expandafter\def\csname jlreq@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@mol}{2\jlreq@gol}}}{}% + \begingroup + \def\jlreq@font{\normalfont\normalsize}% + \def\jlreq@indent{0}% + \def\jlreq@mark{}% + \jlreq@parsekeyval[RuninHeading]{% + {font}{\def\jlreq@font{##1}} + {indent}{\def\jlreq@indent{##1}} + {mark}{\def\jlreq@mark{##1}} + }{#3}% + % \@startsection{#1}{#2}{<indent>*fontsize}{0pt}{-fontsize}{font} + \edef\jlreq@do{% + \noexpand\def\expandonce{\csname #1\endcsname}{% + \unexpanded{\jlreq@hook@beforeheadings{#1}}% + \expandafter\jlreq@ifempty\expandafter{\jlreq@mark}{% + \noexpand\@startsection{\unexpanded{#1}}{\unexpanded{#2}}{\expandonce{\jlreq@indent}\noexpand\jlreq@mol}{0pt}{-1\jlreq@fontsize}{\expandonce{\jlreq@font}}% + }{% + \noexpand\@startsection{\unexpanded{#1}}{\unexpanded{#2}}{\expandonce{\jlreq@indent}\noexpand\jlreq@mol}{0pt}{-1\jlreq@fontsize}{\noexpand\kern\expandonce{\jlreq@indent}\noexpand\jlreq@mol\expandonce{\jlreq@mark}\noexpand\kern-\expandonce{\jlreq@indent}\noexpand\jlreq@mol\expandonce{\jlreq@font}}% + }% + }% + }% + \expandafter\endgroup + \jlreq@do +} +\newcommand*{\NewRuninHeading}[3]{% + \expandafter\@ifdefinable\csname #1\endcsname{\DeclareRuninHeading{#1}{#2}{#3}}% +} +\newcommand*{\RenewRuninHeading}[3]{% + \@ifundefined{#1}{\@latex@error{\expandafter\string\csname#1\endcsname\space undefined}\@ehc}{\DeclareRuninHeading{#1}{#2}{#3}}% +} +\newcommand*{\ProvideRuninHeading}[3]{% + \@ifundefined{#1}{\DeclareRuninHeading{#1}{#2}{#3}}{}% +} + +%.. 窓見出し +\newcount\jlreq@wraplinecount +\newdimen\jlreq@hangindent +\def\jlreq@CutinHeading@start#1#2#3#4#5#6#7{% + \ifnum0\ifnum\jlreq@wraplinecount<-1 1\fi\ifnum\jlreq@wraplinecount>1 1\fi>0 + \ClassError{jlreq}{Can not use \expandafter\string\csname#1\endcsname\space here}{\@ehc}% + \else + \jlreq@CutinHeading@@start{#2}{#3}{#4}{#5}{#6}{#7}% + \fi +} +% 1 = 書式指定,2 = インデント, 3 = 見出しと本文の間, 4 = これを越えたら二行以上,5 = これを越えたら三行以上,6 = テキスト +\def\jlreq@CutinHeading@@start#1#2#3#4#5#6{% + \par\leavevmode + % 一行で処理したときの見出し長さを計測 + \setbox\@tempboxa=\hbox{#1#6}% + \@tempdima=\wd\@tempboxa + % 何行必要かを\jlreq@CutinHeading@linecountに入れる + \ifdim\@tempdima>#5\def\jlreq@CutinHeading@linecount{3}% + \else\ifdim\@tempdima>#4\def\jlreq@CutinHeading@linecount{2}% + \else\def\jlreq@CutinHeading@linecount{1}\fi\fi + % \@tempdimaが実際の一行の長さに近い + \divide\@tempdima by \jlreq@CutinHeading@linecount + % \jlreq@resultboxに見出し部分を,\jlreq@CutinHeading@linecountに何行使うかを入れる + \ifnum\jlreq@CutinHeading@linecount=1\relax + \setbox\jlreq@resultbox=\vbox{\parindent=0pt\rightskip=0pt\leftskip=0pt\hbox{#1#6}}% + \def\jlreq@CutinHeading@linecount{2}% + \else + \jlreq@inlinenote@determinelength{#6}{#1}{}{\jlreq@CutinHeading@linecount}{\jlreq@CutinHeading@linecount}{\@tempdima}{\linewidth}% + \def\jlreq@CutinHeading@linecount{3}% + \fi + % 普通の一行の高さ/深さに合わせて見出しのボックスを出力 + \setbox\@tempboxa=\vtop to \dimexpr\numexpr\jlreq@CutinHeading@linecount - 1\relax\baselineskip + 1\jlreq@gol\relax{\vskip 0pt plus 1fill minus 1fill \box\jlreq@resultbox\vskip 0pt plus 1fill minus 1fill}% + \setbox\jlreq@tempboxa=\hbox{あ}% + \ht\@tempboxa=\ht\jlreq@tempboxa + \dp\@tempboxa=\dp\jlreq@tempboxa + \@tempdima=\wd\@tempboxa + % \hang****を設定 + \hangindent=\dimexpr#2\jlreq@mol + \@tempdima + #3\relax\hangafter=-\jlreq@CutinHeading@linecount + \jlreq@hangindent=\hangindent\jlreq@wraplinecount=\hangafter + \hspace*{#2\jlreq@mol}% + \kern-\dimexpr\@tempdima + #3 + \parindent\relax + \box\@tempboxa + \hspace*{#3}% + % 改段落が起こっても\hang****をキープするように\parを書き換えておく(終わったら元に戻す). + % \jlreq@hangindent/\jlreq@wraplinecountにそれぞれ\hangindent/\hangafterに対応する値を入れて + % \parのたびにそこから代入する. + \def\par{% + \@@par + \ifnum\jlreq@wraplinecount<-1\relax + \ifnum\jlreq@wraplinecount<-\prevgraf + \advance\jlreq@wraplinecount by \prevgraf\hangindent=\jlreq@hangindent\hangafter=\jlreq@wraplinecount + \else + \jlreq@wraplinecount=1\jlreq@hangindent=0pt\relax + \@restorepar + \fi + \else + \jlreq@wraplinecount=1\jlreq@hangindent=0pt\relax + \@restorepar + \fi + }% + \ignorespaces +} + +\newcommand*{\DeclareCutinHeading}[3]{% + \expandafter\def\csname jlreq@heading@level@#1\endcsname{#2}% + \expandafter\def\csname jlreq@heading@setting@#1\endcsname{#3}% + \expandafter\def\csname jlreq@heading@type@#1\endcsname{\RenewCutinHeading}% + \begingroup + \def\jlreq@fontcommand{\headfont}% + \def\jlreq@onelinemax{6\jlreq@fontsize}% + \def\jlreq@twolinemax{20\jlreq@fontsize}% + \def\jlreq@indent{0}% + \def\jlreq@afterindent{1\jlreq@mol}% + \jlreq@parsekeyval[CutinHeading]{ + {font}{\def\jlreq@fontcommand{##1}} + {onelinemax}{\def\jlreq@onelinemax{##1}} + {twolinemax}{\def\jlreq@twolinemax{##1}} + {indent}{\def\jlreq@indent{##1}} + {afterindent}{\def\jlreq@afterindent{##1}} + }{#3}% + \edef\jlreq@do{% + \noexpand\def\expandonce{\csname #1\endcsname}{% + \noexpand\jlreq@CutinHeading@start{#1}{\expandonce{\jlreq@fontcommand}}{\expandonce{\jlreq@indent}}{\expandonce{\jlreq@afterindent}}{\expandonce{\jlreq@onelinemax}}{\expandonce{\jlreq@twolinemax}}% + }% + }% + \expandafter\endgroup + \jlreq@do +} +\newcommand*{\NewCutinHeading}[3]{% + \expandafter\@ifdefinable\csname #1\endcsname{\DeclareCutinHeading{#1}{#2}{#3}}% +} +\newcommand*{\RenewCutinHeading}[3]{% + \@ifundefined{#1}{\@latex@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@heading@setting@#1}{\ClassError{jlreq}{Unknown heading: #1}{\@ehc}}% + \expandafter\let\expandafter\level\expandafter=\csname jlreq@heading@level@#1\endcsname + \expandafter\let\expandafter\setting\expandafter=\csname jlreq@heading@setting@#1\endcsname + \expandafter\let\expandafter\macroname\expandafter=\csname jlreq@heading@type@#1\endcsname + \edef\jlreq@do{\expandonce{\macroname}{#1}{\expandonce{\level}}{\expandonce{\setting},\unexpanded{#2}}}% + \expandafter\endgroup + \jlreq@do +} +% 見出し#1をマクロ#2に保存する +\newcommand{\SaveHeading}[2]{% + \@ifundefined{jlreq@heading@setting@#1}{\ClassError{jlreq}{Unknown heading: #1}{\@ehc}}% + \begingroup + \edef\jlreq@do{% + \unexpanded{\edef#2}{% + \noexpand\expandonce{\expandonce{\csname jlreq@heading@type@#1\endcsname}}% + \noexpand\unexpanded{\unexpanded{{#1}}}% + {\noexpand\expandonce{\expandonce{\csname jlreq@heading@level@#1\endcsname}}}% + {\noexpand\expandonce{\expandonce{\csname jlreq@heading@setting@#1\endcsname}}}% + }% + }% + \expandafter\endgroup + \jlreq@do +} + +\newcommand*{\jlreq@keepbaselineskip}[1]{% + \begingroup + \jlreq@tempdima=\baselineskip + \edef\jlreq@do{\unexpanded{#1}\noexpand\baselineskip=\the\jlreq@tempdima}% + \expandafter\endgroup + \jlreq@do +} + +\setcounter{secnumdepth}{3} +\newcounter{part} +\jlreq@switch{\jlreq@article@type}{ + {article}{\newcounter{section}} + {\newcounter{chapter}\newcounter{section}[chapter]}% book, report +} +\newcounter{subsection}[section] +\newcounter{subsubsection}[subsection] +\newcounter{paragraph}[subsubsection] +\newcounter{subparagraph}[paragraph] +\renewcommand*{\@seccntformat}[1]{\csname the#1\endcsname\hspace{1\jlreq@mol}} +\newcommand*{\headfont}{\gtfamily\sffamily} + + +\newcommand*\jlreq@HeadingType[1]{% + \expandafter\ifx\csname jlreq@heading@type@#1\endcsname\relax UndefinedHeading + \else + \jlreq@HeadingType@{#1}{\RenewTobiraHeading}{TobiraHeading}{% + \jlreq@HeadingType@{#1}{\RenewBlockHeading}{BlockHeading}{% + \jlreq@HeadingType@{#1}{\RenewRuninHeading}{RuninHeading}{% + \jlreq@HeadingType@{#1}{\RenewCutinHeading}{CutinHeading}{% + UnknownHeading}}}}% + \fi +} +\newcommand*\jlreq@HeadingType@[2]{% + \expandafter\expandafter\expandafter\ifx\csname jlreq@heading@type@#1\endcsname#2\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi +} + +%.. 各種定義 +\if@tate + \renewcommand{\thepart}{\Kanji{part}} + \ifthenelse{\equal{\jlreq@article@type}{article}}{}{\renewcommand{\thechapter}{\Kanji{chapter}}} + \renewcommand{\thesection}{\rensuji{\@arabic\c@section}} + \renewcommand{\thesubsection}{\rensuji{\@alph\c@subsection}} + \renewcommand{\thesubsubsection}{% + \rensuji{\@arabic\c@subsubsection}} + \renewcommand{\theparagraph}{% + (\rensuji{\@arabic\c@paragraph})} + \renewcommand{\thesubparagraph}{% + (\rensuji{\@arabic\c@subparagraph})} + + \ifthenelse{\equal{\jlreq@article@type}{article}}{ + \NewBlockHeading{part}{0}{font={\jlreq@keepbaselineskip{\LARGE\headfont}},indent=4,lines=4} + } + {% book, report + \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\jlreq@mol}},format={\null\vfill {\Huge\headfont \hspace*{2\jlreq@mol}#1#2}\vspace*{2\jlreq@gol}}} + \NewBlockHeading{chapter}{0}{indent=2,lines=6,label_format={第\thechapter 章\hspace*{1\jlreq@gol}},font={\huge\headfont}} + \renewcommand{\thechapter}{\Kanji{chapter}} + } + \NewBlockHeading{section}{1}{font={\jlreq@keepbaselineskip{\Large\headfont}},indent=6,lines=3} + \NewBlockHeading{subsection}{2}{font={\jlreq@keepbaselineskip{\large\headfont}},indent=8,lines=2} + \NewBlockHeading{subsubsection}{3}{font={\jlreq@keepbaselineskip{\normalsize\headfont}},indent=10,lines=1,before_lines=1} + \NewRuninHeading{paragraph}{4}{font={\jlreq@keepbaselineskip{\normalsize\headfont}}} + \NewRuninHeading{subparagraph}{5}{font={\jlreq@keepbaselineskip{\normalsize\headfont}},indent=1} +\else + \renewcommand{\thepart}{\Roman{part}} + \renewcommand{\thesubsection}{\thesection .\arabic{subsection}} + \renewcommand{\thesubsubsection}{\thesubsection .\arabic{subsubsection}} + \renewcommand{\theparagraph}{\thesubsubsection .\arabic{paragraph}} + \renewcommand{\thesubparagraph}{\theparagraph .\arabic{subparagraph}} + \ifthenelse{\equal{\jlreq@article@type}{article}}{ + \NewBlockHeading{part}{0}{font={\jlreq@keepbaselineskip{\LARGE\headfont}},label_format={第\thepart 部\hspace{1\jlreq@mol}},lines=4} + \renewcommand{\thesection}{\arabic{section}} + } + {% book, report + \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\jlreq@gol}},format={\null\vfil {\Huge\headfont #1#2}\vfil}} + \NewBlockHeading{chapter}{0}{% + format={{\jlreq@keepbaselineskip{\huge\headfont} #1#2}#3}, + label_format={第\thechapter 章\quad}, + lines=5} + \renewcommand{\thechapter}{\arabic{chapter}} + \renewcommand{\thesection}{\thechapter.\arabic{section}} + \ifthenelse{\equal{\jlreq@article@type}{book}}{ + \ModifyHeading{chapter}{pagebreak=cleardoublepage} + }{ + \ModifyHeading{chapter}{pagebreak=clearpage} + } + } + \NewBlockHeading{section}{1}{font={\jlreq@keepbaselineskip{\Large\headfont}},lines=3} + \NewBlockHeading{subsection}{2}{font={\jlreq@keepbaselineskip{\large\headfont}},lines=2} + \NewBlockHeading{subsubsection}{3}{font={\jlreq@keepbaselineskip{\normalsize\headfont}},lines=1,before_lines=1} + \NewRuninHeading{paragraph}{4}{font={\jlreq@keepbaselineskip{\normalsize\headfont}},indent=1} + \NewRuninHeading{subparagraph}{5}{font={\jlreq@keepbaselineskip{\normalsize\headfont}},indent=2} +\fi + +\ifthenelse{\equal{\jlreq@article@type}{article}}{}{% book, report + \if@openright + \ModifyHeading{part}{type=naka} + \ModifyHeading{chapter}{pagebreak=cleardoublepage} + \else + \ModifyHeading{part}{type=han} + \ModifyHeading{chapter}{pagebreak=clearpage} + \fi +} +\jlreq@switch{\jlreq@article@type}{ + {book}{% + \renewcommand{\jlreq@heading@maketoc@chapter}[3]{% + \chaptermark{#3}% + \jlreq@ifempty{#1}{% + \ifnum0\if@mainmatter\else1\fi\ifnum\jlreq@heading@level@chapter>\c@secnumdepth 1\fi>0 + \addcontentsline{toc}{chapter}{#3}% + \else + \addcontentsline{toc}{chapter}{\protect\numberline{#2}#3}% + \fi + }{}% + } + } + {report}{ + \renewcommand{\jlreq@heading@maketoc@chapter}[3]{% + \chaptermark{#3}% + \jlreq@ifempty{#1}{% + \ifnum0\ifnum\jlreq@heading@level@chapter>\c@secnumdepth 1\fi>0 + \addcontentsline{toc}{chapter}{#3}% + \else + \addcontentsline{toc}{chapter}{\protect\numberline{#2}#3}% + \fi + }{}% + } + } +} + + +%. 注 +% 合印:4.2.3 +% 文字サイズは6ポイントくらい(4.2.3.a)とりあえす\scriptsize +\newcommand*\jlreq@referencemark@format[1]{#1} +\ifthenelse{\equal{\jlreq@referencemark}{inline}}{ + \newcommand*{\jlreq@notemark}[1]{% + \jlreq@ifydir{% + \hbox{}\hbox{\@textsuperscript{\normalfont\jlreq@referencemark@format{#1}}}\hbox{}% + }{% + \setbox\@tempboxa=\hbox{\scriptsize\jlreq@referencemark@format{#1}}% + \raise\dimexpr.5\jlreq@gol - (\ht\@tempboxa + \dp\@tempboxa)/2\relax\box\@tempboxa + }% + } +}{ + \newcommand*{\jlreq@notemark}[1]{{% + \setbox\@tempboxa=\hbox{\scriptsize\jlreq@referencemark@format{#1}}% + % 行頭に来たときに頭を天にそろえる処理. + \jlreq@savepos@for@rest@linewidth + \ifdim\jlreq@current@linewidth<\wd\@tempboxa + \@tempdima=\jlreq@current@linewidth + \else + \@tempdima=\wd\@tempboxa + \fi + \setbox\jlreq@tempboxa=\hbox to\z@{\hskip-\@tempdima\raise\dimexpr.5\zw + (\ht\@tempboxa + \dp\@tempboxa)/2\relax\box\@tempboxa\hss}% + \dp\jlreq@tempboxa=0pt\ht\jlreq@tempboxa=0pt\box\jlreq@tempboxa}}% +} +% \@footnotemarkをシンプルなものにする +\def\jlreq@setdefaultnotemark#1#2{% + \def#1{% + \leavevmode + \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi + #2% + \ifhmode\spacefactor\@x@sf\fi + \relax} +} +\let\jlreq@original@@footnotemark=\@footnotemark +\jlreq@setdefaultnotemark\@footnotemark\@makefnmark +%.. 脚注 (縦書きの時は傍注,4.2.5) +{% + \footnotesize\global\setlength{\footnotesep}{.7\baselineskip} % 何でかわからん…… + % \jlreq@tempdimaに罫線と脚注との間の長さを入れる + % 脚注の行間よりやや広くする(4.2.5.f) + \global\jlreq@tempdima=1.5\dimexpr\baselineskip - 1\jlreq@gol\relax +} +% 罫線の前は行間分,最大+文字サイズ分伸びる(4.2.5.g) +\setlength{\skip\footins}{\dimexpr\baselineskip - 1\jlreq@gol \relax plus 1\jlreq@gol} +%\setlength{\skip\footins}{0pt} +% 脚注の前の罫線は表罫で,長さは行長の1/3位(4.2.5.f) +\edef\jlreq@do{ + \unexpanded{\renewcommand{\footnoterule}}{% + \unexpanded{\hrule width .333\textwidth height \jlreq@omotekeiwidth}% + \noexpand\kern\the\jlreq@tempdima + } +} +\jlreq@do + +% インデントの計算:脚注の長さが文字の整数倍になるように字下げする(4.2.5.b) +{ + \footnotesize + \jlreq@footnoteindent=1\jlreq@mol + \@tempdima=\dimexpr\textwidth - \jlreq@footnoteindent\relax + \@tempdimb=1\zw + \divide\@tempdima\@tempdimb \multiply\@tempdima\@tempdimb + \global\jlreq@footnoteindent=\dimexpr\textwidth - \@tempdima\relax +} +% 4.2.5.d +\ifthenelse{\equal{\jlreq@footnotetext@indent}{one}}{ + \newcommand\@makefntext[1]{\parindent 1\jlreq@mol + \addtolength{\leftskip}{\dimexpr\jlreq@footnoteindent + 1\jlreq@mol\relax}% 全体をインデント+1文字分下げる + \noindent\hskip -1\jlreq@mol\jlreq@referencemark@format{\@thefnmark}\hskip 1\jlreq@mol#1}% 見出し出力と一文字分の空き +}{ + \newcommand\@makefntext[1]{\parindent 1\jlreq@mol + \addtolength{\leftskip}{\jlreq@footnoteindent}% 全体をインデント + \noindent\hskip 1\jlreq@mol\jlreq@referencemark@format{\@thefnmark}\hskip 1\jlreq@mol#1}% 見出し出力と一文字分の空き +} +% 合印 +\renewcommand*{\@makefnmark}{% + \jlreq@ifydir{\jlreq@notemark{\@thefnmark}}{\hbox{\jlreq@notemark{\@thefnmark}}}% +} +% 4.2.2注3 +\if@tate + \renewcommand*{\thefootnote}{\jlreq@open@bracket@before@space\inhibitglue(\rensuji{\@arabic\c@footnote})\inhibitglue} +\else + \renewcommand*{\thefootnote}{\arabic{footnote})\inhibitglue} +\fi + +%.. 後注(4.2.4) +\def\jlreq@endnotemarkname{@thefnmark}% 合印用番号を一時的に入れるマクロ名 +\def\jlreq@endnotecounter{footnote}% 後注用のカウンタ名 +% 文字サイズは\footnotesizeを使う +\newdimen\jlreq@endnote@prepostspace +% 前の分との間は行間分空ける(4.2.4.f) +\jlreq@endnote@prepostspace=\dimexpr\baselineskip - 1\jlreq@gol\relax +\newdimen\jlreq@endnote@indent +% 現在の後注一覧を,\jlreq@endnote@textsに{{合印1}{後注1}}{{合印2}{後注2}}...の形で保持する +\def\jlreq@endnote@texts{} +\long\def\jlreq@endnote@addtext#1#2{% + \expandafter\gdef\expandafter\jlreq@endnote@texts\expandafter{\jlreq@endnote@texts{{#1}{#2}}}} +\def\endnote{\@ifnextchar[{\jlreq@endnote}{\jlreq@endnote[]}} +\def\endnotemark{\@ifnextchar[{\jlreq@endnotemark}{\jlreq@endnotemark[]}} +\def\endnotetext{\@ifnextchar[{\jlreq@endnotetext}{\jlreq@endnotetext[]}} +\long\def\jlreq@endnote[#1]#2{\jlreq@endnotemark[#1]\@endnotetext{#2}} +\def\jlreq@endnotemark[#1]{% + \jlreq@ifempty{#1}{% + \stepcounter{\jlreq@endnotecounter}% + \expandafter\protected@xdef\csname\jlreq@endnotemarkname\endcsname{\csname the\jlreq@endnotecounter\endcsname}% + }{% + \begingroup + \csname c@\jlreq@endnotecounter\endcsname #1\relax + \expandafter\unrestored@protected@xdef\csname\jlreq@endnotemarkname\endcsname{\csname \jlreq@endnotecounter\endcsname}% + \endgroup + }% + \@endnotemark +} +\jlreq@setdefaultnotemark\@endnotemark\@makeendmark +\long\def\jlreq@endnotetext[#1]#2{% + \jlreq@ifempty{#1}{% + \expandafter\protected@xdef\csname\jlreq@endnotemarkname\endcsname{\csname the\jlreq@endnotecounter\endcsname}% + }{% + \begingroup + \csname c@\jlreq@endnotecounter\endcsname #1\relax + \expandafter\unrestored@protected@xdef\csname\jlreq@endnotemarkname\endcsname{\csname \jlreq@endnotecounter\endcsname}% + \endgroup + }% + \@endnotetext{#2}% +} +\long\def\@endnotetext#1{% + \expandafter\let\expandafter\jlreq@tempa\expandafter=\csname\jlreq@endnotemarkname\endcsname + \expandafter\jlreq@endnote@addtext\expandafter{\jlreq@tempa}{#1}% +} +\long\def\jlreq@theendnotes#1{% + \jlreq@ifendmark{#1}{}{% + \jlreq@output@endnotes#1 + \jlreq@theendnotes + }% +} +\long\def\jlreq@output@endnotes#1#2{% + \expandafter\def\csname\jlreq@endnotemarkname\endcsname{#1}% + \item\@makeendtext{#2}% +} + +\newcommand*{\theendnotes}{% + \ifx\jlreq@endnote@texts\@empty\else + \let\jlreq@tempa=\jlreq@endnote@texts + \gdef\jlreq@endnote@texts{}% + \edef\jlreq@endnote@beforeafterspace{\the\dimexpr\baselineskip - 1\jlreq@gol\relax plus \the\dimexpr 1\jlreq@gol\relax}% + \begingroup + \par + \footnotesize + % 後注の長さを文字サイズの整数倍にする(4.2.4.b) + \jlreq@tempdima=\dimexpr\linewidth - \jlreq@endnote@indent - \leftskip\relax + \@tempdimb=1\jlreq@mol + \divide\jlreq@tempdima\@tempdimb\multiply\jlreq@tempdima\@tempdimb + \begin{list}{}{% + \itemsep=0pt\relax + \parsep=0pt\relax + \partopsep=0pt\relax + \topsep=0pt\relax + \leftmargin=\dimexpr\linewidth - \jlreq@tempdima\relax + \itemindent=0pt\relax + \topsep=\jlreq@endnote@beforeafterspace + }% + \expandafter\jlreq@theendnotes\jlreq@tempa\jlreq@endmark + \end{list} + \endgroup + \par + \fi +} + +\jlreq@endnote@indent=2\jlreq@mol +% 二行目以降を全角分下げる +\newcommand{\@makeendtext}[1]{\parindent 1\jlreq@mol + \hskip-1\jlreq@mol\csname\jlreq@endnotemarkname\endcsname\hskip 1\jlreq@mol#1}% 見出し出力と一文字分の空き +\def\@makeendmark{\@makefnmark} + +% \theendnoteの出力を仕込む +\jlreq@tempafalse +% \jlreq@tempcにセクション名たちを入れていく +\def\jlreq@tempc{} +\@for\jlreq@tempa:=\jlreq@endnote@position\do{ + \jlreq@switch{\jlreq@tempa}{ + {headings}{\jlreq@tempatrue} + {paragraph}{ + \jlreq@tempatrue% _paragraphの時は_headingsも有効にする + \PushPostHook{par}{% + \ifx\jlreq@endnote@texts\@empty\else + \vskip\dimexpr-\baselineskip\relax + \vskip\dimexpr0pt\relax + \theendnotes + \fi + } + } + { + \def\@tempa#1#2\jlreq@endmark{#1} + \edef\@tempa{\expandafter\@tempa\jlreq@tempa\jlreq@endmark} + \expandafter\ifx\@tempa _ + \def\@tempa#1#2\jlreq@endmark{\def\jlreq@result{#2}} + \expandafter\@tempa\jlreq@tempa\jlreq@endmark + \edef\jlreq@tempc{\jlreq@tempc,\jlreq@result} + \else + \ClassError{jlreq}{invalid value \jlreq@tempa\space in endnote_position}{\@ehc} + \fi + } + } +} + +\ifjlreq@tempa + \edef\jlreq@do{% + \unexpanded{\def\jlreq@hook@beforeheadings#1}{\expandonce{\jlreq@hook@beforeheadings{#1}}% + \noexpand\theendnotes + } + } + \jlreq@do +\else + \@for\@tempa:=\jlreq@tempc\do{ + \ifx\@tempa\@empty\else + \edef\jlreq@do{% + \unexpanded{\def\jlreq@hook@beforeheadings#1}{\expandonce{\jlreq@hook@beforeheadings{#1}}% + \unexpanded{\def\@tempa}{\@tempa}\unexpanded{\def\@tempb{#1}}% + \unexpanded{\ifx\@tempa\@tempb\theendnotes\fi}% + } + } + \jlreq@do + \fi + } +\fi +\AtEndDocument{\theendnotes} + +%.. 傍注(4.2.7) +\setlength{\marginparsep}{2\jlreq@mol} % フォントサイズ×2(4.2.7:特に問題に~e) +{% + \footnotesize + \setlength{\jlreq@tempdima}{\dimexpr \paperwidth - \textwidth - 1in - \oddsidemargin - \marginparsep\relax} + \ifx\jlreq@option@sidenote@width\@empty + \setlength{\marginparwidth}{\dimexpr\jlreq@tempdima-2\jlreq@fontsize\relax} + \else + \setlength{\marginparwidth}{\jlreq@speciallength{\jlreq@option@sidenote@width}} + \ifnum\marginparwidth>\jlreq@tempdima + \ClassWarningNoLine{jlreq}{sidenote_width is greater than the width of the margin} + \fi + \fi + \ifdim\marginparwidth>18\jlreq@mol + \global\marginparwidth=18\jlreq@mol + \else + \@tempdima=1\zw% 1\jlreq@mol + \global\divide\marginparwidth\@tempdima + \global\multiply\marginparwidth\@tempdima + \fi + \global\setlength{\marginparpush}{.5\@tempdima} % 同上:g +} + +\def\jlreq@sidenotemarkname{@thefnmark}% 合印用番号を一時的に入れるマクロ名 + +% (1) \footnoteとかと同じ形式 sidenote_type=number +% (2) 文中にマークを入れて,傍注には見出しが入る sidenote_type=symbol +% (3) 文中は強調文字列,傍注には見出しが入る sidenote_type=symbol +% (4) 文中は何も無し,傍注には見出しが入る sidenote_type=symbol + +% (1) では\sidenote[]{}を定義 +% (2) では\sidenote{見出し}{注中身}を定義 +\long\def\@sidenotetext#1{% + \marginpar{\reset@font\footnotesize + \color@begingroup + \@makesidetext{#1}% + \color@endgroup + }% +} +\jlreq@setdefaultnotemark\@sidenotemark\@makesidemark +\ifthenelse{\equal{\jlreq@sidenote@type}{number}}{ + \def\jlreq@sidenotecounter{footnote}% 傍注用のカウンタ名 + \def\sidenote{\@ifnextchar[{\jlreq@sidenote}{\jlreq@sidenote[]}} + \def\sidenotemark{\@ifnextchar[{\jlreq@sidenotemark}{\jlreq@sidenotemark[]}} + \def\sidenotetext{\@ifnextchar[{\jlreq@sidenotetext}{\jlreq@sidenotetext[]}} + \long\def\jlreq@sidenote[#1]#2{\jlreq@sidenotemark[#1]\@sidenotetext{#2}} + \def\jlreq@sidenotemark[#1]{% + \jlreq@ifempty{#1}{% + \stepcounter{\jlreq@sidenotecounter}% + \expandafter\protected@xdef\csname\jlreq@sidenotemarkname\endcsname{\csname the\jlreq@sidenotecounter\endcsname}% + }{% + \begingroup + \csname c@\jlreq@sidenotecounter\endcsname #1\relax + \expandafter\unrestored@protected@xdef\csname\jlreq@sidenotemarkname\endcsname{\csname the\jlreq@sidenotecounter\endcsname}% + \endgroup + }% + \@sidenotemark + } + \long\def\jlreq@sidenotetext[#1]#2{% + \jlreq@ifempty{#1}{% + \expandafter\protected@xdef\csname\jlreq@sidenotemarkname\endcsname{\csname the\jlreq@sidenotecounter\endcsname}% + }{% + \begingroup + \csname c@\jlreq@sidenotecounter\endcsname#1\relax + \expandafter\unrestored@protected@xdef\csname\jlreq@sidenotemarkname\endcsname{\csname the\jlreq@sidenotecounter\endcsname}% + \endgroup + }% + \@sidenotetext{#2}% + } + \def\@sidenotemark{\@makesidemark} + \ifx l\jlreq@engine + \long\def\@makesidetext#1{\csname\jlreq@sidenotemarkname\endcsname\hspace{0.5\jlreq@mol}#1} + \else + % thefootnote = \inhibitglue (...だと\inhibitglueが効かない + \long\def\@makesidetext#1{ \kern-1\zw\csname\jlreq@sidenotemarkname\endcsname\hspace{0.5\jlreq@mol}#1} + \fi + \def\@makesidemark{\@makefnmark} +}{% sidenote_type = symbol + \jlreq@jlreqsetup@add{sidenote_symbol}{\def\jlreq@sidenote@defaultmark{#1}} + \jlreq@jlreqsetup@add{sidenote_keyword_font}{\def\jlreq@sidenote@keywordfont{#1}} + \jlreqsetup{ + sidenote_symbol=*,sidenote_keyword_font={}, + } + \def\sidenote{\jlreq@sidenote} + \def\sidenotemark{\jlreq@sidenotemark} + \def\sidenotetext{\jlreq@sidenotetext} + \long\def\jlreq@sidenote#1#2{\jlreq@sidenotemark{#1}\jlreq@sidenotetext{#1}{#2}} + \def\jlreq@sidenotemark#1{% + {\reset@font\jlreq@sidenote@keywordfont #1}% + \ifx\jlreq@sidenote@defaultmark\@empty\else + \expandafter\edef\csname\jlreq@sidenotemarkname\endcsname{\jlreq@sidenote@defaultmark}% + \@sidenotemark + \fi + } + \def\@sidenotemark{\@makesidemark} + % カスタマイズできるべき? + \long\def\jlreq@sidenotetext#1#2{% + \expandafter\def\csname\jlreq@sidenotemarkname\endcsname{\inhibitglue\null{\reset@font\headfont\inhibitglue #1}}% + \@sidenotetext{#2}% + } + \long\def\@makesidetext#1{{\headfont\csname\jlreq@sidenotemarkname\endcsname}\hspace*{1\jlreq@mol}#1} + \def\@makesidemark{\@makefnmark} +} + +%.. 割注(3.4) +\def\inlinenotesize{.6\jlreq@fontsize} % 割注の文字サイズ +\let\jlreq@inlinenote@autolinebreak=\\% 計測時は\linebreakより\\の方が安定する.悩ましい……. + +\newcommand{\jlreq@inlinenote@kakkofontsize}{% + \fontsize{\dimexpr\inlinenotesize * 2\relax}{\dimexpr \inlinenotesize * 2\relax}% + \selectfont +} + +\newcommand{\jlreq@inlinenote@fontsize}{% + \fontsize{\inlinenotesize}{\inlinenotesize}% + \selectfont +} + +% 割注を入れるための命令.\inlinenote{割注}で使う. +% 改行位置は自動で計算されるが,常に正しいとは限らない. +% \inlinenote*は自動で改行されない.\\で改行位置を指定する. +\newif\ifjlreq@in@inlinenote +\jlreq@in@inlinenotefalse +\newcommand*{\inlinenote}{% + \ifjlreq@in@inlinenote\ClassError{jlreq}{\string\inlinenote\space can't be nested}{\@ehc}\fi + \jlreq@in@inlinenotetrue + \ifvmode\leavevmode\fi + \@ifstar\jlreq@inlinenote@noauto\jlreq@inlinenote@auto} +\let\warichu=\inlinenote + +\newcommand*{\jlreq@inlinenote@auto}[1]{% + % 割注初め括弧の前の場所を保存 + \jlreq@savepos@for@rest@linewidth + % \jlreq@tempdimbに,現在行の残り長さを入れる + \jlreq@tempdimb=\jlreq@rest@linewidth + % 括弧の分を引いたものが,割注の使える長さ + \setbox\@tempboxa=\hbox{\jlreq@inlinenote@kakkofontsize\inhibitglue\jlreq@open@bracket@before@space(\inhibitglue}% + \addtolength{\jlreq@tempdimb}{-\wd\@tempboxa}% + \ifdim\jlreq@tempdimb<0pt\jlreq@tempdimb=\linewidth\fi + {% + \setbox\jlreq@tempboxa=\hbox{\jlreq@inlinenote@kakkofontsize\inhibitglue \jlreq@open@bracket@before@space(}% + \jlreq@box@putcenter\jlreq@tempboxa + }% + % 「初回」時はここに強制改行を入れる.これにより現在位置の取得がより正しくなる……といいなぁ + \jlreq@savepos@iflabelundefined{\\}{}% + % 割注内の\baselineskipを保存(後で使う). + {\jlreq@inlinenote@fontsize\xdef\jlreq@inlinenote@baselineskip{\the\baselineskip}}% + % 普通に並べた長さを計測し,その半分から始める + \setbox\@tempboxa=\hbox{\jlreq@inlinenote@fontsize #1}% + \jlreq@tempdimc=\wd\@tempboxa + \divide\jlreq@tempdimc by 2\relax + % \@tempcntbに,この長さで計測した場合の行数を入れる + \ifdim\jlreq@tempdimc<\jlreq@tempdimb\@tempcntb=2\relax + \else + \jlreq@tempdima=\dimexpr\jlreq@tempdimc - \jlreq@tempdimb\relax + \divide\jlreq@tempdima\linewidth + \@tempcntb=\number\jlreq@tempdima + \multiply\@tempcntb by 2\relax + \advance\@tempcntb by 4\relax + \fi + % \jlreq@parshapeargに\parshapeに指定する書式の最後以外を入れる. + \ifnum\@tempcntb>2\relax + \edef\jlreq@parshapearg{0pt \the\jlreq@tempdimb\space 0pt \the\jlreq@tempdimb}% + \@tempcnta=4\relax + \@whilenum\@tempcnta<\@tempcntb\do{% + \edef\jlreq@parshapearg{\jlreq@parshapearg\space 0pt \the\linewidth\space 0pt \the\linewidth}% + \advance\@tempcnta by 2\relax + }% + \setlength{\jlreq@tempdimc}{\dimexpr\jlreq@tempdimc - \jlreq@tempdimb - \linewidth * \numexpr(\@tempcntb - 4)/2\relax\relax}% + \else + \def\jlreq@parshapearg{}% + \fi + % 行数を伸ばしつつ良いところを探していく + \@whilenum\@tempcntb<1001\do{% + \ifnum\@tempcntb>2\jlreq@tempdimb=\linewidth\fi + \edef\@tempb{\the\@tempcntb}% + \jlreq@inlinenote@determinelength{#1}{\jlreq@inlinenote@fontsize}{\jlreq@parshapearg}{2}{\@tempb}{\jlreq@tempdimc}{\jlreq@tempdimb}% + \@tempcntb=\@tempb + \ifnum\@tempcntb>999\relax% ループが長すぎる + \global\setbox\jlreq@resultbox=\voidb@x% + \@tempcntb=1001\relax + \fi + \ifvoid\jlreq@resultbox\else% 成功 + \edef\jlreq@inlinenote@lines{\the\@tempcntb}% 行数を保存 + \@tempcntb=1001\relax + \fi + \advance\@tempcntb by 2\relax + \edef\jlreq@parshapearg{\jlreq@parshapearg 0pt \the\jlreq@tempdimb 0pt \the\jlreq@tempdimb}% + }% + \ifvoid\jlreq@resultbox + \ClassWarning{jlreq}{\string\inlinenote\space failed, maybe a bug}% + \else + \@tempcnta=0 + \splittopskip=0pt\relax + \splitmaxdepth=\maxdimen + % 現在行の残り長さを思い出す + \jlreq@tempdimb=\jlreq@rest@linewidth + \setbox\@tempboxa=\hbox{\jlreq@inlinenote@kakkofontsize\inhibitglue\jlreq@open@bracket@before@space(\inhibitglue}% + \addtolength{\jlreq@tempdimb}{-\wd\@tempboxa}% + \setbox\@tempboxa=\box\jlreq@resultbox + \@whilenum\@tempcnta<\jlreq@inlinenote@lines\do{% + \ifnum\@tempcnta>0 \jlreq@inlinenote@autolinebreak\fi + % \jlreq@tempdimaに今の行の長さを入れる + \ifnum\@tempcnta<\numexpr\jlreq@inlinenote@lines - 2\relax + \ifnum\@tempcnta=0\jlreq@tempdima=\jlreq@tempdimb + \else\jlreq@tempdima=\linewidth\fi + \else + \jlreq@tempdima=-1pt\relax + \fi + {% + \edef\@tempa{\the\vbadness}% + \vbadness=10000 + \setbox\jlreq@tempboxa=\vsplit\@tempboxa to \dimexpr\jlreq@inlinenote@baselineskip*2\relax + \vbadness=\@tempa\relax + % \jlreq@inlinenote@autolinebreak=\\の場合には,割注の長さを計測した物に長さに強制する + \jlreq@getlastbox{\jlreq@tempboxa}% + \setbox\jlreq@tempboxb=\box\jlreq@resultbox + \jlreq@getlastbox{\jlreq@tempboxa}% + \setbox\jlreq@tempboxa=\box\jlreq@resultbox + \ifx\jlreq@inlinenote@autolinebreak\\\relax + \ifdim\jlreq@tempdima>0pt\relax + \setbox\jlreq@tempboxa=\vbox{\jlreq@inlinenote@fontsize% + \hbox to \jlreq@tempdima{\unhbox\jlreq@tempboxa}% + \hbox to \jlreq@tempdima{\unhbox\jlreq@tempboxb}}% + \else + \setbox\jlreq@tempboxa=\vbox{\jlreq@inlinenote@fontsize% + \hbox{\unhbox\jlreq@tempboxa}% + \hbox{\unhbox\jlreq@tempboxb}}% + \fi + \else + \setbox\jlreq@tempboxa=\vbox{\jlreq@inlinenote@fontsize% + \hbox to \jlreq@tempdima{\unhbox\jlreq@tempboxa}% + \hbox to \jlreq@tempdima{\unhbox\jlreq@tempboxb}}% + \fi + \jlreq@box@putcenter\jlreq@tempboxa + }% + \advance\@tempcnta by 2\relax + }% + \fi + \jlreq@inlinenote@endnote +} + +\newcommand*{\jlreq@inlinenote@noauto}[1]{% + \setbox\jlreq@tempboxa=\hbox{\jlreq@inlinenote@kakkofontsize\inhibitglue\jlreq@open@bracket@before@space(}% + \inhibitglue\jlreq@box@putcenter\jlreq@tempboxa + \jlreq@inlinenote@noauto@#1\\\jlreq@endmark\jlreq@endmark + \jlreq@inlinenote@endnote +} + +\def\jlreq@inlinenote@noauto@#1\\#2#3\jlreq@endmark{% + \jlreq@inlinenote@noauto@@#1&\jlreq@endmark\jlreq@endmark + \ifx#2\jlreq@endmark\def\jlreq@next{}\else\linebreak\def\jlreq@next{\jlreq@inlinenote@noauto@#2#3\jlreq@endmark}\fi + \jlreq@next +} + +\def\jlreq@inlinenote@noauto@@#1#3\jlreq@endmark{% + \ifx#2\jlreq@endmark + \setbox\@tempboxa=\hbox{\jlreq@inlinenote@fontsize #1}% + \jlreq@tempdimc=\wd\@tempboxa + \divide\jlreq@tempdimc by 2\relax + \jlreq@inlinenote@determinelength{#1}{\jlreq@inlinenote@fontsize}{}{2}{2}{\jlreq@tempdimc}{\maxdimen}% + \ifvoid\jlreq@resultbox\else + {% + \setbox\jlreq@tempboxa=\hbox{\jlreq@inlinenote@fontsize\box\jlreq@resultbox}% + \jlreq@box@putcenter\jlreq@tempboxa + }% + \fi + \def\jlreq@next{}% + \else + \def\jlreq@next{\jlreq@inlinenote@noauto@@@{#1}#2#3}% + \fi + \jlreq@next +} + +\def\jlreq@inlinenote@noauto@@@#1#2&\jlreq@endmark{% + {% + \setbox\@tempboxa=\hbox{\jlreq@inlinenote@fontsize\vbox{\hbox{#1}\hbox{#2}}}% + \jlreq@box@putcenter\@tempboxa + }% +} + +\newcommand{\jlreq@inlinenote@endnote}{% + \jlreq@in@inlinenotefalse + {% +% \jlreq@inlinenote@kakkofontsize +% \hbox{)}\inhibitglue + \setbox\jlreq@tempboxa=\hbox{\jlreq@inlinenote@kakkofontsize)}% + \jlreq@box@putcenter\jlreq@tempboxa + \inhibitglue + }% +} + +% \jlreq@inlinenote@determinelength{テキスト(1)}{書式指定(2)}{\parshape指定(3)}{調整に使う行数(4)}{成功行数(5)}{最小長さ(6)}{最大長さ(7)} +% \jlreq@resultboxに整形結果を返す.見つからなかったらvoid +\newcommand{\jlreq@inlinenote@determinelength}[7]{% +% \message{#1 の試行開始,行数 = #5, \the#6 から \the#7まで}% + \@tempcnta=1\relax + \def\@tempa{}% + \@whilenum\@tempcnta<#4\do{% + \expandafter\def\expandafter\@tempa\expandafter{\@tempa 0pt \the\jlreq@tempdima}% + \advance\@tempcnta by 1\relax + }% + \@tempcnta=0 + \jlreq@tempdima=#6\relax + % 最後の行を少しずつ伸ばしていく + \@whilenum\@tempcnta<1000\do{% + \ifnum\@tempcnta>999\relax% ループが長すぎる + \global\setbox\jlreq@resultbox=\voidb@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@tempdima = \the\jlreq@tempdima で試行,行数は\the\@tempcntb , 書式 #5 #3 \@tempa 0pt \the\maxdimen}% + \fi + \jlreq@getlastbox{\@tempboxa}% + \setbox\jlreq@tempboxa=\box\jlreq@resultbox + \ifnum\@tempcntb<#5\relax% 行数が達していないならOK +% \message{行数 = \the\@tempcntb により確定} + \global\setbox\jlreq@resultbox=\vbox{#2% + \unvbox\@tempboxa\hbox{\unhbox\jlreq@tempboxa\unskip\unskip\unpenalty}% + \@whilenum\@tempcntb<#5\do{\hbox{}\advance\@tempcntb by 1}}% + \@tempcnta=1001\relax + \else + % そうでない場合は最後の二行の長さを比較する + \jlreq@getlastbox{\@tempboxa}% + \setbox\jlreq@tempboxb=\box\jlreq@resultbox +% \message{最終行の長さ \the\wd\jlreq@tempboxa, その前の長さ \the\wd\jlreq@tempboxb}% + \ifdim\wd\jlreq@tempboxa>\wd\jlreq@tempboxb + \advance\jlreq@tempdima by 0.3pt\relax + \else + % 後ろが短いのでOK + \global\setbox\jlreq@resultbox=\vbox{#2\unvbox\@tempboxa\box\jlreq@tempboxb\box\jlreq@tempboxa}% + \jlreq@resultdimen=\jlreq@tempdima + \@tempcnta=1001\relax + \fi + \fi + \ifdim\jlreq@tempdima>#7\relax + \global\setbox\jlreq@resultbox=\box\voidb@x + \@tempcnta=1001\relax + \fi + \advance\@tempcnta by 1\relax + }% +} + + +%. ページスタイル. +% とりあえず脇に縦書きで配置するのは無視する. +% メモ: +% 2.6.1.cの後半が前半と整合的でないように見える…… +% 柱:両柱と片柱(2.6.3) +\@tempdima=\jlreq@speciallength{\jlreq@headfoot@sidemargin} +\ifthenelse{\lengthtest{\@tempdima=0pt} \OR \(\lengthtest{0.99\zw < \@tempdima} \AND \lengthtest{\@tempdima < 1.01\zw}\)}{}{ + \jlreq@warning{ノンブルまたは柱は,基本版面の左右にそろえるか,全角アキだけ寄せた位置に配置する (2.6.1.b)} +} + +% bottom-leftみたいなのを解釈する.入力の順番はどっちでも良いが,出力は<top/bottom><left/right>の順番 +% #1にセットする. +\def\jlreq@pagestyle@parse@position@#1-#2\jlreq@endmark{% + \def\jlreq@tempa{#1}\def\jlreq@tempb{#2}% + \jlreq@ifempty{#2}{% + \ifx\jlreq@tempb\@empty\ClassError{jlreq}{Invalid position: #1}{\@ehc}\fi + }{% + \def\@tempa##1-{\def\jlreq@tempb{##1}}% + \@tempa#2\relax + }% +} +\newcommand*\jlreq@pagestyle@parse@position@@[1]{% + \ifthenelse{\equal{#1}{top} \OR \equal{#1}{bottom}}{\def\jlreq@tempc{#1}}{% + \ifthenelse{\equal{#1}{left} \OR \equal{#1}{right} \OR \equal{#1}{center}}{\def\jlreq@tempd{#1}}{% + \ClassError{jlreq}{Invalid position: #1}{\@ehc}% + }% + }% +} +\newcommand*{\jlreq@pagestyle@parse@position}[2]{% + \begingroup + \jlreq@pagestyle@parse@position@#2-\jlreq@endmark + % \jlreq@tempcに縦方向を,\jlreq@tempdに横方向を入れる + \def\jlreq@tempc{}\def\jlreq@tempd{}% + \expandafter\jlreq@pagestyle@parse@position@@\expandafter{\jlreq@tempa}% + \expandafter\jlreq@pagestyle@parse@position@@\expandafter{\jlreq@tempb}% + \ifx\jlreq@tempc\@empty\edef\jlreq@tempc{\expandafter\@firstoftwo#1}\fi + \ifx\jlreq@tempd\@empty\edef\jlreq@tempd{\expandafter\@secondoftwo#1}\fi + \edef\jlreq@do{\unexpanded{\def#1}{{\jlreq@tempc}{\jlreq@tempd}}}% + \expandafter\endgroup + \jlreq@do +} + +% odd_running_head=_sectionのように下線から始まる場合,その値の見出し命令を柱に出すようにする. +% 要するに\ps@***に\sectionmarkを定義するように仕込む. +% 常にodd=rightmark,even=leftmarkになる. +% 場所指定は奇数ページの方.偶数ページは反対になる. +% mark_format={_chapter={第\thechapter 章\quad #1}}のような形.odd=とかeven=とかも仕込めるようにしたけど +% あまり意味がない気がしてきた.oddやevenが優先される. +\newcommand*{\DeclarePageStyle}[2]{% + \expandafter\edef\csname jlreq@pagestyle@setting@#1\endcsname{\unexpanded{#2}}% + \begingroup + \def\jlreq@nombre@position{{bottom}{center}}% + \def\jlreq@running@head@position{{top}{center}}% + \def\jlreq@nombre{\thepage}% + \def\jlreq@odd@running@head{}% + \def\jlreq@even@running@head{}% + \def\jlreq@command{}% + \def\jlreq@mark@format{}% + % 柱とノンブルの間 + \def\jlreq@gap{1.5\zw}% + \newif\ifjlreq@clearmark\jlreq@clearmarktrue + \jlreq@parsekeyval[PageStyle]{ + {nombre_position}{\jlreq@pagestyle@parse@position{\jlreq@nombre@position}{##1}} + {running_head_position}{\jlreq@pagestyle@parse@position{\jlreq@running@head@position}{##1}} + {nombre}{\def\jlreq@nombre{##1}} + {odd_running_head}{\def\jlreq@odd@running@head{##1}} + {even_running_head}{\def\jlreq@even@running@head{##1}} + {mark_format}{\edef\jlreq@mark@format{\unexpanded{##1}}} + {command}{\edef\jlreq@command{\unexpanded{##1}}} + {gap}{\def\jlreq@gap{##1}} + *{no_clear_mark}{\jlreq@clearmarkfalse} + }{#2}% + \ifthenelse{\( + \boolean{@tate} \AND \( + \equal{\expandafter\@secondoftwo\jlreq@nombre@position}{right} \OR + \equal{\expandafter\@secondoftwo\jlreq@running@head@position}{right} + \)\) \OR \( + \(\NOT \boolean{@tate}\) \AND \( + \equal{\expandafter\@secondoftwo\jlreq@nombre@position}{left} \OR + \equal{\expandafter\@secondoftwo\jlreq@running@head@position}{left} + \) + \)}{% + \if@twoside + \jlreq@warning{柱やノンブルは,左ページでは,基本版面の左端の延長線にノンブル又は柱の先頭をそろえて配置するか,基本版面の左端の延長線から基本版面の文字サイズの全角アキだけ右に寄せた位置に配置する(ページスタイル #1 内,2.6.1.b)}% + \fi + }{}% + \ifthenelse{\lengthtest{\jlreq@gap < 1.49\zw} \OR \( \lengthtest{\jlreq@gap > 1.51\zw} \AND \lengthtest{\jlreq@gap < 1.99\zw} \) \OR \lengthtest{\jlreq@gap > 2.01\zw}}{\jlreq@warning{ノンブルと柱との空き量は文字サイズの2倍又は1.5倍とする(ページスタイル #1 内,2.6.1.c)}}{}% + % 見出しを出す場合:evenに章などの高いレベルの見出しを出す(2.6.3.a) + \def\jlreq@markdefinition{}% + \def\jlreq@even@running@head@level{}% + % **markを作る + % \jlreq@makemark{odd/even}running_headの中身\jlreq@endmark + \def\jlreq@markdefinition{}% + \def\jlreq@makemark##1##2##3\jlreq@endmark{% + \ifx_##2% + \ifthenelse{\equal{##1}{even}}{% + \def\jlreq@even@running@head{\leftmark}% + }{% + \def\jlreq@odd@running@head{\rightmark}% + }% + \@ifundefined{jlreq@heading@setting@##3}{}{% + \expandafter\edef\csname jlreq@##1@running@head@level\endcsname{\csname jlreq@heading@level@##3\endcsname}% + }% + \def\jlreq@tempa####1{% + \jlreq@tempafalse + \let\jlreq@result=\@undefined + \jlreq@parsekeyval*{ + {##1}{\edef\jlreq@result{\unexpanded{########1}}\jlreq@tempatrue} + {##2##3}{\ifjlreq@tempa\else\edef\jlreq@result{\unexpanded{########1}}\fi} + }{####1}% + }% + \expandafter\jlreq@tempa\expandafter{\jlreq@mark@format}% + \ifx\jlreq@result\@undefined + \edef\jlreq@result{\expandonce{\csname the##3\endcsname}\noexpand\quad\unexpanded{####1}}% + \fi + \ifthenelse{\equal{##1}{even}}{% + \def\jlreq@markcommand{\markboth}% + \def\jlreq@markcommandafter{{}}% + }{% + \def\jlreq@markcommand{\markright}% + \def\jlreq@markcommandafter{}% + }% + \edef\jlreq@markdefinition{% + \expandonce{\jlreq@markdefinition}% + \noexpand\def\expandonce{\csname ##3mark\endcsname}\unexpanded{####1}{\expandonce{\jlreq@markcommand} + {\expandonce{\jlreq@result}}\expandonce{\jlreq@markcommandafter}}% + }% + \fi + \jlreq@ifendmark{##2}{}{\@gobble}% + }% + \def\@tempb{\jlreq@makemark{even}}% + \expandafter\@tempb\jlreq@even@running@head\jlreq@endmark\jlreq@endmark + \def\jlreq@odd@running@head@level{}% + \def\@tempb{\jlreq@makemark{odd}}% + \expandafter\@tempb\jlreq@odd@running@head\jlreq@endmark\jlreq@endmark + \ifx\jlreq@odd@running@head@level\@empty\else\ifx\jlreq@even@running@head@level\@empty\else + \ifnum\jlreq@odd@running@head@level<\jlreq@even@running@head@level + \jlreq@warning{偶数ページには奇数ページよりアウトラインレベルの高い見出しを入れる(ページスタイル #1内,2.6.3.a)}% + \fi + \fi\fi + % ##1 ##2 ##3と並んだヘッダを作る,戻り値は\jlreq@result + \def\jlreq@setheadfoot@##1##2##3{% + % -.5\zwは端にそろえるための補正 + \jlreq@ifempty{##1}{\def\jlreq@left{}}{\edef\jlreq@left{\noexpand\hspace*{\dimexpr\jlreq@expand@speciallength{\jlreq@headfoot@sidemargin}\if@tate - 0.5\zw\fi\relax}\unexpanded{##1}}}% + % +\topskip - .5\zwは\jlreq@headfoot@sidemargin = 0ptの時に本文の右に一致させるための補正. + \jlreq@ifempty{##3}{\def\jlreq@right{}}{\edef\jlreq@right{\unexpanded{##3}\noexpand\hspace*{\dimexpr\jlreq@expand@speciallength{\jlreq@headfoot@sidemargin}\if@tate + \topskip - .5\zw\fi\relax}}}% + \jlreq@ifempty{##2}{% + \edef\jlreq@result{\expandonce{\jlreq@left}\hfil\expandonce{\jlreq@right}}% + \jlreq@ifempty{##1}{\jlreq@ifempty{##3}{\def\jlreq@result{}}{}}{}% + }{% + \ifx\jlreq@left\@empty\else\edef\jlreq@left{\noexpand\hbox to 0pt{\expandonce{\jlreq@left}\hss}}\fi + \ifx\jlreq@right\@empty\else\edef\jlreq@right{\noexpand\hbox to 0pt{\hss\expandonce{\jlreq@right}}}\fi + \edef\jlreq@result{\expandonce{\jlreq@left}\hfil\unexpanded{##2}\hfil\expandonce{\jlreq@right}}% + }% + }% + % ##2を##1 = left/center/rightの場所,##4を##3の場所に置く.被った場合は##2を外側にする. + % 戻り値は\jlreq@result + \def\jlreq@setheadfoot##1##2##3##4{% + \def\jlreq@left{}\def\jlreq@center{}\def\jlreq@right{}% + % \ifjlreq@tempa = if(##1 == ##3 && ##2 != "" && ##4 != "") + \jlreq@tempatrue + \jlreq@ifempty{##2}{\jlreq@tempafalse}{}% + \jlreq@ifempty{##4}{\jlreq@tempafalse}{}% + \ifthenelse{\equal{##1}{##3}}{}{\jlreq@tempafalse}% + \ifjlreq@tempa + \ifthenelse{\equal{##1}{right}}{% + \edef\jlreq@right{\unexpanded{##4}\noexpand\hspace{\gap}\unexpanded{##2}}% + }{% + \expandafter\edef\csname jlreq@##1\endcsname{\unexpanded{##2}\noexpand\hspace{\gap}\unexpanded{##4}}% + }% + \else + \jlreq@ifempty{##2}{}{\expandafter\def\csname jlreq@##1\endcsname{##2}}% + \jlreq@ifempty{##4}{}{\expandafter\def\csname jlreq@##3\endcsname{##4}}% + \fi + \edef\jlreq@do{\noexpand\jlreq@setheadfoot@{\expandonce{\jlreq@left}}{\expandonce{\jlreq@center}}{\expandonce{\jlreq@right}}}% + \jlreq@do + }% + % \nombre@<top/bottom>を定義 + \def\jlreq@nombre@top{}\def\jlreq@nombre@bottom{}% + \expandafter\edef\csname jlreq@nombre@\expandafter\@firstoftwo\jlreq@nombre@position\endcsname{\expandonce{\jlreq@nombre}}% + % \odd@running@head@<top/bottom>を定義 + \def\jlreq@odd@running@head@top{}\def\jlreq@odd@running@head@bottom{}% + \expandafter\edef\csname jlreq@odd@running@head@\expandafter\@firstoftwo\jlreq@running@head@position\endcsname{\expandonce{\jlreq@odd@running@head}}% + % \@oddheadを定義 + \edef\jlreq@do{\unexpanded{\jlreq@setheadfoot{\expandafter\@secondoftwo\jlreq@nombre@position}}{\expandonce{\jlreq@nombre@top}}\unexpanded{{\expandafter\@secondoftwo\jlreq@running@head@position}}{\expandonce{\jlreq@odd@running@head@top}}}% + \jlreq@do\let\jlreq@oddhead=\jlreq@result + % \@oddfootを定義 + \edef\jlreq@do{\unexpanded{\jlreq@setheadfoot{\expandafter\@secondoftwo\jlreq@nombre@position}}{\expandonce{\jlreq@nombre@bottom}}\unexpanded{{\expandafter\@secondoftwo\jlreq@running@head@position}}{\expandonce{\jlreq@odd@running@head@bottom}}}% + \jlreq@do\let\jlreq@oddfoot=\jlreq@result + % ##1 = {}{}の後ろを逆にする + \def\getoppositeposition##1{% + \jlreq@switch{\expandafter\@secondoftwo##1}{ + {center}{\def\jlreq@tempe{center}} + {right}{\def\jlreq@tempe{left}} + {left}{\def\jlreq@tempe{right}} + }% + \edef##1{{\expandafter\@firstoftwo##1}{\jlreq@tempe}}% + } + \getoppositeposition\jlreq@nombre@position + \getoppositeposition\jlreq@running@head@position + % 上と同じことをする + % \nombre@<top/bottom>を定義 + \def\jlreq@nombre@top{}\def\jlreq@nombre@bottom{}% + \expandafter\edef\csname jlreq@nombre@\expandafter\@firstoftwo\jlreq@nombre@position\endcsname{\expandonce{\jlreq@nombre}}% + % \even@running@head@<top/bottom>を定義 + \def\jlreq@even@running@head@top{}\def\jlreq@even@running@head@bottom{}% + \expandafter\edef\csname jlreq@even@running@head@\expandafter\@firstoftwo\jlreq@running@head@position\endcsname{\expandonce{\jlreq@even@running@head}}% + % \@evenheadを定義 + \edef\jlreq@do{\unexpanded{\jlreq@setheadfoot{\expandafter\@secondoftwo\jlreq@nombre@position}}{\expandonce{\jlreq@nombre@top}}\unexpanded{{\expandafter\@secondoftwo\jlreq@running@head@position}}{\expandonce{\jlreq@even@running@head@top}}}% + \jlreq@do\let\jlreq@evenhead=\jlreq@result + % \@evenfootを定義 + \edef\jlreq@do{\unexpanded{\jlreq@setheadfoot{\expandafter\@secondoftwo\jlreq@nombre@position}}{\expandonce{\jlreq@nombre@bottom}}\unexpanded{{\expandafter\@secondoftwo\jlreq@running@head@position}}{\expandonce{\jlreq@even@running@head@bottom}}}% + \jlreq@do\let\jlreq@evenfoot=\jlreq@result + \edef\jlreq@do{% + \noexpand\def\expandonce{\csname ps@#1\endcsname}{% + \unexpanded{\def\jlreq@current@pagestyle{#1}}% + \ifjlreq@clearmark\noexpand\jlreq@heading@execmacro@toallheadings\noexpand\jlreq@clearheadingmarks\fi + \unexpanded{\let\@mkboth=\markboth}% + \unexpanded{\def\@oddhead}{\expandonce{\jlreq@oddhead}}% + \unexpanded{\def\@oddfoot}{\expandonce{\jlreq@oddfoot}}% + \unexpanded{\def\@evenhead}{\expandonce{\jlreq@evenhead}}% + \unexpanded{\def\@evenfoot}{\expandonce{\jlreq@evenfoot}}% + }% + \noexpand\edef\expandonce{\csname ps@#1\endcsname}{% + \noexpand\expandonce{\expandonce{\csname ps@#1\endcsname}}% + \noexpand\unexpanded{\expandonce{\jlreq@markdefinition}}% + \noexpand\unexpanded{\expandonce{\jlreq@command}}% + }% + }% + \expandafter\endgroup + \jlreq@do +} + +% 全ての見出しにマクロ#1を適用する. +\def\jlreq@heading@execmacro@toallheadings#1{% + \begingroup + \def\jlreq@do{}% + \ifx\jlreq@heading@allheadings\@undefined + \jlreq@heading@execmacro@toallheadings@{#1}{chapter,part,section,subsection,subsubsection,paragraph,subparagraph}% + \else + \def\@tempa{\jlreq@heading@execmacro@toallheadings@{#1}}% + \expandafter\@tempa\expandafter{\jlreq@heading@allheadings}% + \fi + \expandafter\endgroup + \jlreq@do +} + +\def\jlreq@heading@execmacro@toallheadings@#1#2{ + \@for\jlreq@tempa:=#2\do{% + \@ifundefined{\jlreq@tempa}{}{% + \eappto\jlreq@do{\noexpand#1{\expandonce{\jlreq@tempa}}}% + }% + }% +} +\def\jlreq@clearheadingmarks#1{% + \@ifundefined{#1mark}{}{% + \expandafter\let\csname#1mark\endcsname=\@gobble + }% +} + +\newcommand*{\NewPageStyle}[2]{% + \expandafter\@ifdefinable\csname ps@#1\endcsname{\DeclarePageStyle{#1}{#2}}% +} +\newcommand*{\RenewPageStyle}[2]{% + \@ifundefined{ps@#1}{\@latex@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@pagestyle@setting@#1}{\ClassError{jlreq}{Unknown pagestyle: #1}{\@ehc}}{}% + \expandafter\let\expandafter\setting\expandafter=\csname jlreq@pagestyle@setting@#1\endcsname + \edef\jlreq@do{\noexpand\RenewPageStyle{#1}{\expandonce{\setting},\unexpanded{#2}}}% + \expandafter\endgroup + \jlreq@do +} + +%.. 各種定義 +\RenewPageStyle{empty}{nombre={},odd_running_head={},even_running_head={}} +\ifthenelse{\equal{\jlreq@article@type}{article}}{ + \if@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@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@tate + \RenewPageStyle{plain}{nombre=\thepage,odd_running_head={},even_running_head={},no_clear_mark} + \NewPageStyle{myheadings}{nombre=\thepage,odd_running_head=\rightmark,even_running_head=\leftmark,no_clear_mark} + \if@twoside + \ModifyPageStyle{plain}{nombre_position={top-left}} + \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-left,running_head_position=top-left} + \ModifyPageStyle{myheadings}{nombre_position=bottom-left,running_head_position=top-left} + \else + \ModifyPageStyle{plain}{nombre_position={top-center}} + \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center} + \ModifyPageStyle{myheadings}{nombre_position=bottom-center,running_head_position=top-center} + \fi +\else% yoko + \RenewPageStyle{plain}{nombre=\thepage,odd_running_head={},even_running_head={},nombre_position={bottom-center},no_clear_mark} + \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center} + \NewPageStyle{myheadings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center,odd_running_head=\rightmark,even_running_head=\leftmark,no_clear_mark} +\fi + +%. フロート関連 +% 4.3.3.dの例,縦組みの時だけど横にも適用…… +\setlength{\floatsep}{1\jlreq@gol plus 1\jlreq@gol} +\setlength{\textfloatsep}{1\jlreq@gol plus \baselineskip} +\intextsep=\textfloatsep +\dblfloatsep=\floatsep +\dbltextfloatsep=\textfloatsep +% 残りはデフォルトにしておく. + +% 4.3.1 注4 +\newlength\abovecaptionskip +\newlength\belowcaptionskip +\newcommand{\@makecaption}[2]{{% + \reset@font\small + \vskip\abovecaptionskip + \sbox\@tempboxa{{\jlreq@@makecaption@label@font #1}\hskip 1\jlreq@mol{\jlreq@@makecaption@font #2}}% + \ifdim \wd\@tempboxa >\hsize + {\jlreq@@makecaption@label@font #1}\hskip1\jlreq@mol{\jlreq@@makecaption@font #2}\relax\par + \else + \global\@minipagefalse + \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} +\jlreq@jlreqsetup@add{caption_font}{\def\jlreq@@makecaption@font{#1}} +\jlreq@jlreqsetup@add{caption_label_font}{\def\jlreq@@makecaption@label@font{#1}} +\jlreqsetup{caption_font=\headfont,caption_label_font=\headfont} +% 特に根拠のない値 +\setlength\abovecaptionskip{.5\jlreq@gol} +\setlength\belowcaptionskip{0pt} + + +% \begin{figure}***\caption{???}\end{figure}を +% \begin{figure}\layoutfloat{***}\pcaption{???}\end{figure}にする. +% +%\def\jlreq@saveoriginalcs#1{ +% \expandafter\expandafter\expandafter\let\expandafter\expandafter\csname jlreq@original@#1\endcsname\csname #1\endcsname +%} +%\long\def\jlreq@replace@layoutfloat#1\caption{\layoutfloat{#1}\jlreq@caption} +%\long\def\jlreq@caption#1{\ifx#1\jlreq@endmark\else\pcaption{#1}\expandafter\jlreq@replace@layoutfloat\fi} +%\def\jlreq@modify@float#1{% +% \def\lgdef{\long\gdef} +% \jlreq@saveoriginalcs{#1} +% \@namedef{#1}{\@ifnextchar[{\@nameuse{jlreq@float@#1}}{\@nameuse{jlreq@float@@#1}}} +% \expandafter\lgdef\csname jlreq@float@#1\endcsname[##1]{% +% \expandafter\csname jlreq@original@#1\endcsname[##1] +% \csname jlreq@process@insertlayoutfloat@#1\endcsname{} +% } +% \expandafter\lgdef\csname jlreq@float@@#1\endcsname{% +% \expandafter\csname jlreq@original@#1\endcsname +% \csname \jlreq@process@insertlayoutfloat@#1\endcsname{} +% } +% \expandafter\lgdef\csname jlreq@process@insertlayoutfloat@#1\endcsname ##1##2\end{% +% \csname jlreq@checkenvname@#1\endcsname{##1##2}\end +% } +% \expandafter\lgdef\csname jlreq@checkenvname@#1\endcsname ##1\end##2{% +% \def\@tempa{##2}% +% \def\@tempb{#1}% +% \ifx\@tempa\@tempb +% \def\jlreq@next{\jlreq@replace@layoutfloat##1\caption{\jlreq@endmark}\end{##2}}% +% \else +% \def\jlreq@next{\csname jlreq@process@insertlayoutfloat@#1\endcsname{##1\end{##2}}}% +% \fi +% \jlreq@next +% } +%} + +%.. figure環境 +\newcounter{figure} +\renewcommand*{\thefigure}{\arabic{figure}} +\newcommand*{\fps@figure}{h} +\newcommand*{\ftype@figure}{1} +\newcommand*{\ext@figure}{lof} +\newcommand*{\fnum@figure}{\figurename\thefigure} +\newenvironment{figure}{\@float{figure}}{\end@float} +\newenvironment{figure*}{\@dblfloat{figure}}{\end@dblfloat} +\newcommand*{\listfigurename}{図目次} +\newcommand{\figurename}{図} +\if@tate + \DeclareLayoutCaption{figure}<y>(\floatwidth)[cr] +\fi +%\jlreq@modify@float{figure} +%\jlreq@modify@float{figure*} + +%.. table環境 +\newcounter{table} +\renewcommand*{\thetable}{\arabic{table}} +\newcommand*{\fps@table}{h} +\newcommand*{\ftype@table}{2} +\newcommand*{\ext@table}{lot} +\newcommand*{\fnum@table}{\tablename\thetable} +\newenvironment{table}{\@float{table}}{\end@float} +\newenvironment{table*}{\@dblfloat{table}}{\end@dblfloat} +\newcommand{\listtablename}{表目次} +\newcommand{\tablename}{表} +\if@tate + \DeclareLayoutCaption{table}<y>(\floatwidth)[cr] +\fi +%\jlreq@modify@float{table} +%\jlreq@modify@float{table*} + +%. タイトル周り +\newenvironment{titlepage}{% + \if@twocolumn + \@restonecoltrue\onecolumn + \else + \@restonecolfalse\newpage + \fi + \thispagestyle{empty}% + \setcounter{page}{1}% +}{% + \if@restonecol\twocolumn\else\newpage\fi + \if@twoside\else + \setcounter{page}{1}% + \fi +} + +\if@titlepage + \newcommand{\maketitle}{% + % jarticleとかからあまり変更していない + \begin{titlepage}% + \let\footnotesize\small + \let\footnoterule\relax + \let\footnote\thanks + \null\vfil + \vskip 4\baselineskip + \begin{center}% + {\LARGE \@title \par}% + \vskip\baselineskip% + {\Large + \lineskip .75em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par}% + \vskip\baselineskip + {\large\@date\par}% + \end{center}\par + \vfil{\centering\@thanks}\vfil\null + \end{titlepage}% + \jlreq@endofmaketitle + } +\else + \newcommand{\maketitle}{% + \par + \begingroup + \renewcommand{\thefootnote}{\fnsymbol{footnote}}% + \renewcommand{\@makefnmark}{\hbox{% + \jlreq@iftdir{\yoko}{}% + \rlap{\@textsuperscript{\normalfont\@thefnmark}}% + }}% + \if@twocolumn + \ifnum\col@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@endofmaketitle + } +\fi +% いろいろクリアする. +\def\jlreq@endofmaketitle{% + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\p@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@keepbaselineskip{\LARGE}\@title\par}% + \vskip\baselineskip + {\jlreq@keepbaselineskip{\large}% + \lineskip .5\jlreq@gol + \begin{tabular}[t]{c}% + \@author + \end{tabular}% + \par + }% + \vskip\baselineskip + {\jlreq@keepbaselineskip{\large}\@date}% + \end{center}% + \par + \vskip\baselineskip +% \setbox\jlreq@tempboxa=\vbox{\everypar{}\leavevmode\begin{center}あいうえお\end{center}}% +% \unvbox\jlreq@tempboxa + \ifvoid\jlreq@abstractbox\else\unvbox\jlreq@abstractbox\fi +} + +%.. abstract +\ifthenelse{\equal{\jlreq@article@type}{book}}{}{% article,report + \newbox\jlreq@abstractbox + \newcommand*{\abstractname}{概要} + \if@titlepage + % articleとかjarticleとかと同じ + \newenvironment{abstract}{% + \titlepage + \null\vfil + \@beginparpenalty\@lowpenalty + \begin{center}% + {\bfseries\gtfamily\abstractname}% + \@endparpenalty\@M + \end{center}% + \par + }{% + \par\vfil\null\endtitlepage + } + \else + \newenvironment{abstract}{% + \ifnum0\if@twocolumn\else1\fi\ifjlreq@preamble1\fi>0 + % とりあえず全部ボックスに入れる. + \global\setbox\jlreq@abstractbox=\vtop\bgroup + \ifjlreq@preamble + % preamble後っぽく振る舞う + \@noskipsecfalse + % \@nodocumentが入っているので一時的に無効化 + \everypar{} + \fi + \if@twocolumn + \parindent=0pt + \hsize=\textwidth + % 後で\@maketitleとともに呼び出されるときは\twcolumn[***]で呼び出される. + \begin{minipage}[b]{\textwidth}% + \fi + \bgroup + \small + \parindent=1\jlreq@mol + \begin{center}% + {\bfseries\abstractname}% + \end{center}% + \quotation + \else + \section*{\abstractname}% + \fi + }{% + \ifnum0\if@twocolumn\else1\fi\ifjlreq@preamble1\fi>0 + \endquotation + \egroup + \vspace{\baselineskip}% + \if@twocolumn + \end{minipage} + \fi + \egroup + \fi + \ifjlreq@preamble\else + \unvbox\jlreq@abstractbox + \fi + } + \fi +} +%. 箇条書き.cf. JISX4051 8.4 +% 用語定義型 +\newenvironment{description}{\list{}{% + \setlength{\leftmargin}{0\jlreq@mol}% 下げない + \setlength{\labelwidth}{0\jlreq@mol}% + \addtolength{\leftmargin}{\leftskip}% + \addtolength{\leftmargin}{\labelsep}% + \let\makelabel=\descriptionlabel +% 同行じゃない場合はこんな感じ? +% \let\jlreq@original@@item=\@item +% \def\@item[##1]{\jlreq@original@@item[##1]\mbox{}\par + }}{\endlist} +\newcommand{\descriptionlabel}[1]{\normalfont\headfont #1} + +% enumerateとitemize +% 見出しが一つ上のレベルからどのくらいずれているかを入れる. +% (見出しは2\zhの箱に右/下詰めで入る.) +\setlength\leftmargini{2\jlreq@mol} +\setlength\leftmarginii{1\jlreq@mol} +\setlength\leftmarginiii{1\jlreq@mol} +\setlength\leftmarginiv{1\jlreq@mol} +\setlength\leftmarginv{1\jlreq@mol} +\setlength\leftmarginvi{1\jlreq@mol} + +% enumerate, itemize用初期化 +\def\jlreq@init@list{% + \setlength{\labelwidth}{2\jlreq@mol}% + \setlength{\topsep}{0pt}% + \setlength{\partopsep}{0pt}% + \setlength{\itemsep}{0pt}% + \setlength{\parsep}{0pt}% + \setlength{\listparindent}{\parindent}% +% itemizeは直後ベタ,enumerateは直後全角空き. + \ifthenelse{\equal{\@currenvir}{itemize}}{ + \setlength{\labelsep}{0\jlreq@mol}% + }{% + \setlength{\labelsep}{1\jlreq@mol}% + }% + % \labelsepだけあけるのは一つ目(ラベルの直後)のみ + \setlength{\itemindent}{\labelsep}% +} + +\def\@listi{% + \jlreq@init@list + \setlength{\leftmargin}{\leftmargini}% +} +\let\@listI\@listi +\def\@listii{% + \jlreq@init@list + \setlength{\leftmargin}{\leftmarginii}% +} +\def\@listiii{% + \jlreq@init@list + \setlength{\leftmargin}{\leftmarginiii}% +} +\def\@listiv{% + \jlreq@init@list + \setlength{\leftmargin}{\leftmarginiv}% +} +\def\@listv{% + \jlreq@init@list + \setlength{\leftmargin}{\leftmarginv}% +} + +\if@tate + \renewcommand{\theenumi}{\Kanji{enumi}} + \renewcommand{\theenumii}{\rensuji{\@arabic\c@enumii}} + \renewcommand{\theenumiii}{\rensuji{\@arabic\c@enumiii}} + \renewcommand{\theenumiv}{\rensuji{\@arabc\c@enumiv}} +\fi +\newcommand{\labelenumi}{\theenumi} +\newcommand{\labelenumii}{\theenumii} +\newcommand{\labelenumiii}{\theenumiii} +\newcommand{\labelenumiv}{\theenumiv} +\renewcommand{\p@enumii}{\theenumi} +\renewcommand{\p@enumiii}{\theenumi(\theenumii)} +\renewcommand{\p@enumiv}{\p@enumiii\theenumiii} + +\newcommand{\labelitemi}{\hbox to 1\jlreq@mol{\hss\textbullet\hss}} +%\newcommand{\labelitemi}{•} +\if@tate + \newcommand{\labelitemii}{○} + \newcommand{\labelitemiii}{*} +\else + \newcommand{\labelitemii}{\hbox to 1\jlreq@mol{\hss\textendash\hss}} + \newcommand{\labelitemiii}{\hbox to 1\jlreq@mol{\hss\textasteriskcentered\hss}} +\fi +\newcommand{\labelitemiv}{\hbox to 1\jlreq@mol{\hss ・\hss}} + +% 引用系.1.5em→1\zh,字下げを二文字にした.3.5.2の例. +\newenvironment{verse} + {\let\\\@centercr + \list{}{\itemsep\z@ \itemindent -2\jlreq@mol% + \listparindent\itemindent + \labelwidth\z@ + \labelsep\z@ + \leftmargin=2\jlreq@mol + \rightmargin\leftmargin \advance\leftmargin 2\jlreq@mol}% + \item\relax}{\endlist} +\newenvironment{quotation} + {\list{}{\listparindent\parindent + \itemindent\listparindent + \labelwidth\z@ + \labelsep\z@ + \leftmargin=2\jlreq@mol + \rightmargin\leftmargin + \parsep\z@ \@plus.1\jlreq@gol}% + \item\relax}{\endlist} +\newenvironment{quote} + {\list{}{% + \rightmargin\leftmargin + \labelwidth\z@ + \leftmargin=2\jlreq@mol + \listparindent\z@}% + \item\relax}{\endlist} + +%. 表関係 4.4 +% 表内の行間を0にする(4.4.3.f) +\let\jlreq@original@tabular=\tabular +\let\jlreq@original@endtabular=\endtabular +\preto\tabular{\begingroup\appto\@arrayparboxrestore{\baselineskip=0pt\lineskip=0pt}} +\appto\endtabular{\endgroup} +% 4.4.3.e +\setlength\tabcolsep{.5\jlreq@gol} +\setlength\arraycolsep{.5\jlreq@mol} +% 4.4.3.j +%\RequirePackage{tabls} % plextと整合的でない +%\setlength\extrarulesep{.25\jlreq@gol} +%\setlength\tablinesep{.25\jlreq@gol} +%\renewcommand{\arraystretch}{0} +\setlength\arrayrulewidth{\jlreq@omotekeiwidth} % 4.4.3.c +\setlength\doublerulesep{2pt} +\setlength\tabbingsep{\labelsep} +\skip\@mpfootins=\skip\footins +\setlength\fboxsep{.3\jlreq@mol} +\setlength\fboxrule{\jlreq@omotekeiwidth} % 根拠はない +% 後で +\renewcommand{\theequation}{\@arabic\c@equation} + +%. 目次 +\setcounter{tocdepth}{3} +\newcommand{\@pnumwidth}{2\jlreq@mol} +\newcommand{\@tocrmarg}{2.55em} +\newcommand{\@dotsep}{2} % 狭くしてみた +\newskip\toclineskip +\setlength\toclineskip{0\jlreq@gol plus .02\jlreq@gol} +% tarticleから +\newdimen\@lnumwidth +\def\numberline#1{\hbox to\@lnumwidth{#1\hfil}} +\def\addcontentsline#1#2#3{% + \protected@write\@auxout + {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble + \if@tate + \@temptokena{\rensuji{\thepage}}% + \else + \@temptokena{\thepage}% + \fi + }% + {\string\@writefile{#1}% + {\protect\contentsline{#2}{#3}{\the\@temptokena}}}% +} + +\newcount\jlreq@top@contents % トップ見出しを入れる.レベルと同じ値. +\jlreq@top@contents=-1 +\newcommand*{\jlreq@set@top@contents}[1]{% + \ifnum\jlreq@top@contents=-1 + \jlreq@top@contents=#1\relax + \fi +} +\ifthenelse{\equal{\jlreq@article@type}{article}}{ + \newcommand{\tableofcontents}{% + \jlreq@top@contents=-1\relax + \if@twocolumn + \@restonecoltrue\onecolumn + \else + \@restonecolfalse + \fi + \section*{\contentsname}% + \@mkboth{\contentsname}{\contentsname}% + \@starttoc{toc}% + \if@restonecol\twocolumn\fi + } +}{% book, article + \newcommand{\tableofcontents}{% + \jlreq@top@contents=-1\relax + \if@twocolumn + \@restonecoltrue\onecolumn + \else + \@restonecolfalse + \fi + \chapter*{\contentsname}% + \@mkboth{\contentsname}{\contentsname}% + \@starttoc{toc}% + \if@restonecol\twocolumn\fi + } +} +% JIS X 4051自身の目次に近づけようかと……なりきれてないけど. +% 文字の大きさは全て同じ(\normalsize)にする. +% 見出しのレベルがあがると1文字分ずつ字下げしていく. +% 第三引数は,上からの幅に加え更にトップの見出しからの差による補正(プラス)が入る. +% 補正には\jlreq@top@contentsを使う. +% 「トップ」というか,一番最初に現れた見出しを入れる. +% リーダーは.から・に変更しました.更に直後から出るように. +\def\@dottedtocline#1#2#3#4#5{% + \jlreq@set@top@contents{#1}% + \ifnum #1>\c@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@top@contents + \@tempdima=1\jlreq@mol + \multiply \@tempdima by \@tempcnta + \advance\leftskip \@lnumwidth \hbox{}\hskip -\leftskip + \advance\leftskip\@tempdima + {#4}\nobreak + \leaders\hbox{$\hbox{・}\mkern \@dotsep mu \m@th \mkern \@dotsep mu$}% + \hfill\nobreak + \hb@xt@\@pnumwidth{\hss\normalfont\normalcolor #5}% + \par}% + \fi} + +% listoffigures +\newcommand{\listoffigures}{% + \jlreq@top@contents=0 + \section*{\listfigurename}% + \@mkboth{\listfigurename}{\listfigurename}% + \@starttoc{lof}% +} +\newcommand*{\l@figure}{\@dottedtocline{1}{0\jlreq@gol}{2\jlreq@gol}} +\newcommand{\listoftables}{% + \jlreq@top@contents=0 + \section*{\listtablename}% + \@mkboth{\listtablename}{\listtablename}% + \@starttoc{lot}% +} +\let\l@table\l@figure + +%. 文献,そのまま +\newdimen\bibindent +\setlength\bibindent{2\jlreq@mol} +\newcommand{\newblock}{\hskip .11em\@plus.33em\@minus.07em} +\newenvironment{thebibliography}[1]{% + \jlreq@oldfontcommand@enable + \section*{\refname}% + \@mkboth{\refname}{\refname}% + \list{\@biblabel{\@arabic\c@enumiv}}% + {\settowidth\labelwidth{\@biblabel{#1}}% + \leftmargin\labelwidth + \advance\leftmargin\labelsep + \itemindent=0pt + \@openbib@code + \usecounter{enumiv}% + \let\p@enumiv\@empty + \renewcommand\theenumiv{\@arabic\c@enumiv}}% + \sloppy + \clubpenalty4000 + \@clubpenalty\clubpenalty + \widowpenalty4000% + \sfcode`\.\@m +}{% + \def\@noitemerr + {\@latex@warning{Empty `thebibliography' environment}}% + \endlist + \jlreq@oldfontcommand@disable +} +\let\@openbib@code\@empty + +%. 索引 +\newif\ifjlreq@resttate +\newenvironment{theindex}{% + \jlreq@oldfontcommand@enable + \jlreq@iftdir{\clearpage\yoko\jlreq@resttatetrue}{\jlreq@resttatefalse}% 常に横書きにする + \if@twocolumn\@restonecolfalse\else\@restonecoltrue\fi + \columnseprule\z@ \columnsep 2\jlreq@mol + \twocolumn[\section*{\indexname}]% + \@mkboth{\indexname}{\indexname}% + \thispagestyle{plain}% + \parindent\z@ + \parskip\z@ \@plus .03\jlreq@gol\relax + \let\item\@idxitem +}{% + \if@restonecol\onecolumn\else\clearpage\fi + \ifjlreq@resttate\tate\fi +} +\newcommand{\@idxitem}{\par\hangindent 4\jlreq@mol} +\newcommand{\subitem}{\@idxitem \hspace*{2\jlreq@mol}} +\newcommand{\subsubitem}{\@idxitem \hspace*{3\jlreq@mol}} +\newcommand{\indexspace}{\par \vskip 1\jlreq@gol \@plus .5\jlreq@gol \@minus .3\jlreq@gol\relax} + + +%. 前付,後付,付録 +\ifthenelse{\equal{\jlreq@article@type}{book}}{ + \newif\if@mainmatter + \@mainmattertrue + \newcommand*\frontmatter{% + \if@openright + \cleardoublepage + \else + \clearpage + \fi + \@mainmatterfalse + \let\jlreq@pagestyle@atmain\jlreq@current@pagestyle + \ifthenelse{\equal{\jlreq@article@type}{article}}{}{%book, report + \SaveHeading{chapter}{\jlreq@heading@chapter@atmain}% + \ModifyHeading{chapter}{label_format={}}% + }% + \pagestyle{plain}% + \pagenumbering{roman}} + \newcommand*\mainmatter{% + \cleardoublepage + \@mainmattertrue + \@ifundefined{jlreq@pagestyle@atmain}{}{% + \expandafter\pagestyle\expandafter{\jlreq@pagestyle@atmain}% + }% + \@ifundefined{jlreq@heading@chapter@atmain}{}{\jlreq@heading@chapter@atmain}% + \setcounter{chapter}{0}% + \pagenumbering{arabic}} + \newcommand*\backmatter{% + \if@openright + \cleardoublepage + \else + \clearpage + \fi + \ifthenelse{\equal{\jlreq@article@type}{article}}{}{%book, report + \SaveHeading{chapter}{\jlreq@heading@chapter@atmain}% + \ModifyHeading{chapter}{label_format={}}% + }% + \pagestyle{plain}% + \@mainmatterfalse + \setcounter{chapter}{0}} +}{} +\newcommand*\appendix{\par + \setcounter{section}{0}% +} + +\ifthenelse{\equal{\jlreq@article@type}{article}}{ + \appto\appendix{% + \setcounter{subsection}{0}% + \gdef\thesection{\@Alph\c@section}% + \if@tate + \def\thesection{\rensuji{\Alph{section}}}% + \else + \def\thesection{\Alph{section}}% + \fi + } +}{%book, report + \appto\appendix{% + \setcounter{chapter}{0}% + \if@tate + \def\thechapter{\rensuji{\Alph{chapter}}}% + \else + \def\thechapter{\Alph{chapter}}% + \fi + \ModifyHeading{chapter}{label_format={付録\thechapter\quad}}% + \ifx\jlreq@current@pagestyle\@undefined\else + \ifthenelse{\equal{\jlreq@current@pagestyle}{headings}}{% + \def\chaptermark#1{\markboth{付録\thechapter\quad #1}{}}% + \ModifyPageStyle{headings}{mark_format={_chapter={付録\thechapter\quad #1}}}% + }{}% + \fi + } +} + + +% 日にち +\newif\if西暦 \西暦true +\def\西暦{\西暦true} +\def\和暦{\西暦false} +\newcount\heisei \heisei\year \advance\heisei-1988\relax + +\def\today{{% + \jlreq@iftdir{% + \if西暦 + \kansuji\year 年 + \kansuji\month 月 + \kansuji\day 日 + \else + 平成\ifnum\heisei=1 元年\else\kansuji\heisei 年\fi + \kansuji\month 月 + \kansuji\day 日 + \fi + }{% + \if西暦 + \number\year~年 + \number\month~月 + \number\day~日 + \else + 平成\ifnum\heisei=1 元年\else\number\heisei~年\fi + \number\month~月 + \number\day~日 + \fi + }}} + +%. 定理環境 +\def\jlreq@theorem@abovebelowspace{1\baselineskip}%とりあえず前後に一行分のアキ +\def\@begintheorem#1#2{\topsep=\jlreq@theorem@abovebelowspace + \trivlist\labelsep=1\jlreq@mol + \item[\hskip \labelsep{\headfont #1\ #2}]} +\def\@opargbegintheorem#1#2#3{\topsep=\jlreq@theorem@abovebelowspace + \trivlist\labelsep=1\jlreq@mol + \item[\hskip \labelsep{\headfont #1\ #2(#3)}]} + +\AtEndOfPackageFile*{amsthm}{ + \newtheoremstyle{jlreq}{\jlreq@theorem@abovebelowspace}{\jlreq@theorem@abovebelowspace}{\normalfont}{}{\headfont}{}{1\jlreq@mol}{\thmname{#1}\thmnumber{\ #2}\thmnote{ (#3)}} + \theoremstyle{jlreq} + \let\jlreq@original@proof=\proof + \let\jlreq@original@endproof=\endproof + \def\proof{\@ifnextchar[{\jlreq@proof}{\jlreq@proof[\proofname]}} + \def\jlreq@proof[#1]{\labelsep=1\jlreq@mol\jlreq@original@proof[{\normalfont\headfont #1\inhibitglue}\nopunct]} + \renewcommand{\proofname}{証明} +} + + +% デフォルト設定 +\newcommand{\contentsname}{目 次} +\newcommand{\refname}{参考文献} +\newcommand{\indexname}{索 引} +\pagestyle{plain} +\pagenumbering{arabic} +\if@twocolumn + \twocolumn + \sloppy + \flushbottom +\else + \onecolumn + \raggedbottom +\fi +\endinput + + diff --git a/Master/texmf-dist/tex/luatex/jlreq/jfm-jlreq.lua b/Master/texmf-dist/tex/luatex/jlreq/jfm-jlreq.lua index 90f39a9de70..39da0c0a9fc 100644 --- a/Master/texmf-dist/tex/luatex/jlreq/jfm-jlreq.lua +++ b/Master/texmf-dist/tex/luatex/jlreq/jfm-jlreq.lua @@ -1,1223 +1,1223 @@ ---[[
-3.1.3
-3.1.6.a
-]]
-
---[[
-優先順位は,第n段階を3 - nに対応させる.
- 段階 1, 2, 3, 4, 5, 6
-priority 2, 1, 0,-1,-2,-3
-xkanjiskipは{1,-3},kanjiskip={0,0}
-\ltjsetparameter{stretch_priority={kanjiskip=1,xkanjiskip=-3}}
-\ltjsetparameter{stretch_priority={kanjiskip=0,xkanjiskip=0}}
-]]
-
-local hyphen_glue = {
- [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0, 0},
- [9] = {0, 0, 0},
- [10] = {0, 0, 0},
- [11] = {0, 0, 0},
- [12] = {0, 0, 0},
- [13] = {0, 0, 0},
- [14] = {0, 0, 0},
- [15] = {0, 0, 0},
- [16] = {0, 0, 0},
- [0] = {0, 0, 0},
---[[
- [20] = {0, 0, 0},
- [21] = {0, 0, 0},
- [22] = {0, 0, 0},
- [23] = {0, 0, 0},
- [24] = {0, 0, 0},
- [25] = {0, 0, 0},
- [26] = {0, 0, 0},
- [27] = {0, 0, 0},
- [28] = {0, 0, 0},
- [29] = {0, 0, 0},
- [30] = {0, 0, 0},
-]]
-}
-
-
-
-local jfm = {
- dir = 'yoko',
- zw = 1.0,
- zh = 1.0,
- version = 2,
- -- 文字クラス4,9,10,11,15,16,19との間は(x)kanjiskipで調整する.
- kanjiskip = {0, 0.25, 0},
- xkanjiskip = {0.25, 0.25, 0.125},
-
- -- alignは適当
- [1] = { -- 初め括弧類
- chars = {'(', '〔', '[', '{', '〈', '《', '「', '『', '【', '⦅', '〘', '〖', '«', '〝',
- '‘', '“'},
- width = 0.5,height = 0.88,depth = 0.12,
- align = 'right',
- glue = {
- [1] = {0, 0, 0},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0, 0},
- [9] = {0, 0, 0},
- [10] = {0, 0, 0},
- [11] = {0, 0, 0},
- [12] = {0, 0, 0},
- [13] = {0, 0, 0},
- [14] = {0, 0, 0},
- [15] = {0, 0, 0},
- [16] = {0, 0, 0},
- [0] = {0, 0, 0},
- --[[
- [20] = {0, 0, 0},
- [21] = {0, 0, 0},
- [22] = {0, 0, 0},
- [23] = {0, 0, 0},
- [24] = {0, 0, 0},
- [25] = {0, 0, 0},
- [26] = {0, 0, 0},
- [27] = {0, 0, 0},
- [28] = {0, 0, 0},
- [29] = {0, 0, 0},
- [30] = {0, 0, 0},
- -- [22][23] 注1
- ]]
- },
- },
-
- [2] = { -- 終わり括弧類
- chars = { ')', '〕', ']', '}', '〉', '》', '」', '』', '】', '⦆', '〙', '〗', '»', '〟',
- '’', '”'},
- width = 0.5,height = 0.88,depth = 0.12,
- align = 'left',
- glue = {
- [1] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [301] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [302] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [4] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [9] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [10] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [11] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [12] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [13] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [14] = {0, 0, 0},
- [15] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [16] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [0] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- --[[
- [20] = {0, 0, 0},
- [21] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [22] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [23] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [24] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [25] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [26] = {0.5, 0, 0, ratio = 0, priority = {0,-2}},
- [27] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [28] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [29] = {0, 0, 0},
- [30] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- ]]
- },
- end_adjust = {0.5,0},
- },
-
- -- [3*]はハイフン類.幅が違うので分ける.
- [300] = {
- chars = {'‐'},
- width = 0.25,height = 0.88,depth = 0.12,
- align = 'middle',
- glue = hyphen_glue,-- 上の方で定義
- },
-
- [301] = {
- chars = {'゠', '–'},
- width = 0.5,height = 0.88,depth = 0.12,
- align = 'middle',
- glue = hyphen_glue,
- },
-
- [302] = {
- chars = {'〜'},
- width = 1,height = 0.88,depth = 0.12,
- align = 'middle',
- glue = hyphen_glue,
- },
-
- [4] = { -- 区切り約物
- chars = {'!', '?', '‼', '⁇', '⁈', '⁉'},
- width = 1,height = 0.88,depth = 0.12,
- align = 'middle',
- glue = {
- [1] = {0.5, 0.5, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0, 0},
- [9] = {0, 0, 0},
- [10] = {0, 0, 0},
- [11] = {0, 0, 0},
- [12] = {0, 0, 0},
- [13] = {0, 0, 0},
- [14] = {0, 0, 0},
- [15] = {0, 0, 0},
- [16] = {0, 0, 0},
--- [0] = {0, 0, 0},
- --[[
- [20] = {0, 0, 0},
- [21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空けpriority = {0,-1}段階
- [22] = {0, 0, 0},
- [23] = {0, 0, 0},
- [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空けpriority = {0,-1}段階
- [25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空けpriority = {0,-1}段階
- [26] = {0, 0, 0},
- ]]
- [27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空けpriority = {0,-1}段階
- --[[
- [28] = {0, 0, 0},
- [29] = {0, 0, 0},
- [30] = {0, 0, 0},
- ]]
- },
- },
-
- [5] = { -- 中点類
- chars = {'・', ':',
- ';'
- },
- width = 0.5,height = 0.88,depth = 0.12,
- align = 'middle',
- glue = {
- [1] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [2] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [300] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [301] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [302] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [4] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [5] = {0.5, 0, 0.5, ratio = 0.5, priority = {0,-1}},
- [6] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [7] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [8] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [9] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [10] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [11] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [12] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [13] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [14] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [15] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [16] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [0] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- --[[
- [20] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [21] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [22] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [23] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [24] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [25] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [26] = {0.25, 0, 0, ratio = 0, priority = {0,-1}},
- ]]
- [27] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- --[[
- [28] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [29] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- [30] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}},
- ]]
- },
- end_adjust = {0.25,0}, -- 0.25 -> 0は詰め,優先順位は第三段階
- },
-
- [6] = { -- 句点類
- chars = {'。',
- '.'}, -- 縦書きでは使わない
- width = 0.5,height = 0.88,depth = 0.12,
- align = 'left',
- glue = {
- [1] = {0.5, 0, 0, ratio = 0},
- [2] = {0, 0, 0},
- [300] = {0.5, 0, 0, ratio = 0},
- [301] = {0.5, 0, 0, ratio = 0},
- [302] = {0.5, 0, 0, ratio = 0},
- [4] = {0.5, 0, 0, ratio = 0},
- [5] = {0.75, 0, 0.25, ratio = 0.33333333, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0.5, 0, 0, ratio = 0},
- [9] = {0.5, 0, 0, ratio = 0},
- [10] = {0.5, 0, 0, ratio = 0},
- [11] = {0.5, 0, 0, ratio = 0},
- [12] = {0.5, 0, 0, ratio = 0},
- [13] = {0.5, 0, 0, ratio = 0},
- [14] = {0.5, 0, 0, ratio = 0},
- [15] = {0.5, 0, 0, ratio = 0},
- [16] = {0.5, 0, 0, ratio = 0},
- [0] = {0.5, 0, 0, ratio = 0},
- --[[
- [20] = {0, 0, 0},
- [21] = {0.5, 0, 0, ratio = 0},
- [22] = {0.5, 0, 0, ratio = 0},
- [23] = {0.5, 0, 0, ratio = 0},
- [24] = {0.5, 0, 0, ratio = 0},
- [25] = {0.5, 0, 0, ratio = 0},
- [26] = {0.5, 0, 0, ratio = 0},
- ]]
- [27] = {0.5, 0, 0, ratio = 0},
- --[[
- [28] = {0.5, 0, 0, ratio = 0},
- [29] = {0.5, 0, 0, ratio = 0},
- [30] = {0.5, 0, 0, ratio = 0},
- ]]
- },
- end_adjust = {0.5, 0},
- },
-
- [7] = { -- 読点類
- chars = {'、',
- ','}, -- 縦書きでは使わない
- width = 0.5,height = 0.88,depth = 0.12,
- align = 'left',
- glue = {
- [1] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [301] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [302] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [4] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [5] = {0.75, 0, 0.75, ratio = 0.33333333, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [9] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [10] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [11] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [12] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [13] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [14] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [15] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [16] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [0] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- --[[
- [20] = {0, 0, 0},
- [21] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [22] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [23] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [24] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [25] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [26] = {0.5, 0, 0, ratio = 0, priority = {0,-2}},
- ]]
- [27] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- --[[
- [28] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [29] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- [30] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}},
- ]]
- },
- end_adjust = {0.5, 0},
- },
-
- [8] = { -- 分離禁止文字
- chars = {'—', '…', '‥', '〳', '〴', '〵'},
- width = 1,height = 0.88,depth = 0.12,
- align = 'middle',
- glue = {
- [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0, 0},
- [9] = {0, 0.25, 0, priority = {0,0}},
- [10] = {0, 0.25, 0, priority = {0,0}},
- [11] = {0, 0.25, 0, priority = {0,0}},
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0.25, 0, priority = {0,0}},
- [14] = {0, 0, 0},
- [15] = {0, 0.25, 0, priority = {0,0}},
- [16] = {0, 0.25, 0, priority = {0,0}},
- [0] = {0, 0.25, 0, priority = {0,0}},
- --[[
- [20] = {0, 0, 0},
- [21] = {0, 0.25, 0, priority = {0,0}},
- [22] = {0, 0.25, 0, priority = {0,0}},
- [23] = {0, 0.25, 0, priority = {0,0}},
- [24] = {0, 0, 0},
- [25] = {0, 0, 0},
- [26] = {0, 0, 0},
- ]]
- [27] = {0, 0.25, 0, priority = {0,0}},
- --[[
- [28] = {0, 0.25, 0, priority = {0,0}},
- [29] = {0, 0, 0},
- [30] = {0, 0.25, 0, priority = {0,0}},
- ]]
- },
- },
-
- [9] = { -- 繰返し記号
- chars = {'ヽ', 'ヾ', 'ゝ', 'ゞ', '々', '〻'},
- height = 0.88,depth = 0.12,
- align = 'middle',
- glue = {
- [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0, 0},
- [9] = {0, 0.25, 0, priority = {0,0}},
- [10] = {0, 0.25, 0, priority = {0,0}},
- [11] = {0, 0.25, 0, priority = {0,0}},
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0.25, 0, priority = {0,0}},
- [14] = {0, 0, 0},
- [15] = {0, 0.25, 0, priority = {0,0}},
- [16] = {0, 0.25, 0, priority = {0,0}},
--- [0] = {0, 0.25, 0, priority = {0,0}},
- --[[
- [20] = {0, 0, 0},
- [21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- [22] = {0, 0.25, 0, priority = {0,0}},
- [23] = {0, 0.25, 0, priority = {0,0}},
- [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- [25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- [26] = {0, 0, 0},
- ]]
- [27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- --[[
- [28] = {0, 0.25, 0, priority = {0,0}},
- [29] = {0, 0, 0},
- [30] = {0, 0.25, 0, priority = {0,0}},
- ]]
- },
- },
-
- [10] = { -- 長音記号
- chars = {'ー'},
- height = 0.88,depth = 0.12,
- align = 'middle',
- glue = {
- [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0, 0},
- [9] = {0, 0.25, 0, priority = {0,0}},
- [10] = {0, 0.25, 0, priority = {0,0}},
- [11] = {0, 0.25, 0, priority = {0,0}},
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0.25, 0, priority = {0,0}},
- [14] = {0, 0, 0},
- [15] = {0, 0.25, 0, priority = {0,0}},
- [16] = {0, 0.25, 0, priority = {0,0}},
--- [0] = {0, 0.25, 0, priority = {0,0}},
- --[[
- [20] = {0, 0, 0},
- [21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- [22] = {0, 0.25, 0, priority = {0,0}},
- [23] = {0, 0.25, 0, priority = {0,0}},
- [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- [25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- [26] = {0, 0, 0},
- ]]
- [27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- --[[
- [28] = {0, 0.25, 0, priority = {0,0}},
- [29] = {0, 0, 0},
- [30] = {0, 0.25, 0, priority = {0,0}},
- ]]
- },
- },
-
- [11] = { -- 小書きの仮名
- chars = {'ぁ', 'ぃ', 'ぅ', 'ぇ', 'ぉ', 'ァ', 'ィ', 'ゥ', 'ェ', 'ォ', 'っ', 'ゃ', 'ゅ', 'ょ', 'ゎ', 'ゕ', 'ゖ', 'ッ', 'ャ', 'ュ', 'ョ', 'ヮ', 'ヵ', 'ヶ', 'ㇰ', 'ㇱ', 'ㇲ', 'ㇳ', 'ㇴ', 'ㇵ', 'ㇶ', 'ㇷ', 'ㇸ', 'ㇹ', 'ㇺ', 'ㇻ', 'ㇼ', 'ㇽ', 'ㇾ', 'ㇿ', 'ㇷ゚'},
- height = 0.88,depth = 0.12,
- align = 'middle',
- glue = {
- [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0, 0},
- [9] = {0, 0.25, 0, priority = {0,0}},
- [10] = {0, 0.25, 0, priority = {0,0}},
- [11] = {0, 0.25, 0, priority = {0,0}},
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0.25, 0, priority = {0,0}},
- [14] = {0, 0, 0},
- [15] = {0, 0.25, 0, priority = {0,0}},
- [16] = {0, 0.25, 0, priority = {0,0}},
--- [0] = {0, 0.25, 0, priority = {0,0}},
- --[[
- [20] = {0, 0, 0},
- [21] = {0.25, 0, 0.125, ratio = 0, priority = {1,-3}},
- [22] = {0, 0.25, 0, priority = {0,0}},
- [23] = {0, 0.25, 0, priority = {0,0}},
- [24] = {0.25, 0, 0.125, ratio = 0, priority = {1,-3}},
- [25] = {0.25, 0, 0.125, ratio = 0, priority = {1,-3}},
- [26] = {0, 0, 0},
- ]]
- [27] = {0.25, 0, 0.125, ratio = 0, priority = {1,-3}},
- --[[
- [28] = {0, 0.25, 0, priority = {0,0}},
- [29] = {0, 0, 0},
- [30] = {0, 0.25, 0, priority = {0,0}},
- ]]
- },
- },
-
- [12] = { -- 前置省略記号
- chars = {'¥', '$', '£', '#', '€', '№'},
- height = 0.88,depth = 0.12,
- align = 'middle',
- glue = {
- [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0.25, 0, priority = {0,0}},
- [9] = {0, 0.25, 0, priority = {0,0}},
- [10] = {0, 0.25, 0, priority = {0,0}},
- [11] = {0, 0.25, 0, priority = {0,0}},
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0.25, 0, priority = {0,0}},
- [14] = {0, 0, 0},
- [15] = {0, 0.25, 0, priority = {0,0}},
- [16] = {0, 0.25, 0, priority = {0,0}},
- [0] = {0, 0.25, 0, priority = {0,0}},
- --[[
- [20] = {0, 0, 0},
- [21] = {0, 0.25, 0, priority = {0,0}},
- [22] = {0, 0.25, 0, priority = {0,0}},
- [23] = {0, 0.25, 0, priority = {0,0}},
- [24] = {0, 0, 0},
- [25] = {0, 0.25, 0, priority = {0,0}},
- [26] = {0, 0, 0},
- ]]
- [27] = {0, 0.25, 0, priority = {0,0}},
- --[[
- [28] = {0, 0.25, 0, priority = {0,0}},
- [29] = {0, 0, 0},
- [30] = {0, 0.25, 0, priority = {0,0}},
- ]]
- },
- },
-
- [13] = { -- 後置省略記号
- chars = {'°', '′', '″', '℃', '¢', '%', '‰', '㏋', 'ℓ', '㌃', '㌍', '㌔', '㌘', '㌢', '㌣', '㌦', '㌧', '㌫', '㌶', '㌻', '㍉', '㍊', '㍍', '㍑', '㍗', '㎎', '㎏', '㎜', '㎝', '㎞', '㎡', '㏄'},
- height = 0.88,depth = 0.12,
- align = 'middle',
- glue = {
- [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0.25, 0, priority = {0,0}},
- [9] = {0, 0.25, 0, priority = {0,0}},
- [10] = {0, 0.25, 0, priority = {0,0}},
- [11] = {0, 0.25, 0, priority = {0,0}},
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0.25, 0, priority = {0,0}},
- [14] = {0, 0, 0},
- [15] = {0, 0.25, 0, priority = {0,0}},
- [16] = {0, 0.25, 0, priority = {0,0}},
- [0] = {0, 0.25, 0, priority = {0,0}},
- --[[
- [20] = {0, 0, 0},
- [21] = {0, 0.25, 0, priority = {0,0}},
- [22] = {0, 0.25, 0, priority = {0,0}},
- [23] = {0, 0.25, 0, priority = {0,0}},
- [24] = {0, 0.25, 0, priority = {0,0}},
- [25] = {0, 0.25, 0, priority = {0,0}},
- [26] = {0, 0, 0},
- ]]
- [27] = {0, 0.25, 0, priority = {0,0}},
- --[[
- [28] = {0, 0.25, 0, priority = {0,0}},
- [29] = {0, 0, 0},
- [30] = {0, 0.25, 0, priority = {0,0}},
- ]]
- },
- },
-
- [14] = { -- 和字間隔
- chars = {' '},
- align = 'middle',
- width= 1,height = 0.88,depth = 0.12,
- glue = {
- [1] = {0, 0, 0},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0, 0},
- [9] = {0, 0, 0},
- [10] = {0, 0, 0},
- [11] = {0, 0, 0},
- [12] = {0, 0, 0},
- [13] = {0, 0, 0},
- [14] = {0, 0, 0},
- [15] = {0, 0, 0},
- [16] = {0, 0, 0},
- [0] = {0, 0, 0},
- --[[
- [20] = {0, 0, 0},
- [21] = {0, 0, 0},
- [22] = {0, 0, 0},
- [23] = {0, 0, 0},
- [24] = {0, 0, 0},
- [25] = {0, 0, 0},
- [26] = {0, 0, 0},
- ]]
- [27] = {0, 0, 0},
- --[[
- [28] = {0, 0, 0},
- [29] = {0, 0, 0},
- [30] = {0, 0, 0},
- ]]
- },
- },
-
- [15] = { -- 平仮名
- chars = {'あ', 'い', 'う', 'え', 'お', 'か', 'が', 'き', 'ぎ', 'く', 'ぐ', 'け', 'げ', 'こ', 'ご', 'さ', 'ざ', 'し', 'じ', 'す', 'ず', 'せ', 'ぜ', 'そ', 'ぞ', 'た', 'だ', 'ち', 'ぢ', 'つ', 'づ', 'て', 'で', 'と', 'ど', 'な', 'に', 'ぬ', 'ね', 'の', 'は', 'ば', 'ぱ', 'ひ', 'び', 'ぴ', 'ふ', 'ぶ', 'ぷ', 'へ', 'べ', 'ぺ', 'ほ', 'ぼ', 'ぽ', 'ま', 'み', 'む', 'め', 'も', 'や', 'ゆ', 'よ', 'ら', 'り', 'る', 'れ', 'ろ', 'わ', 'ゐ', 'ゑ', 'を', 'ん', 'ゔ', 'か゚', 'き゚', 'く゚', 'け゚', 'こ゚'},
- height = 0.88,depth = 0.12,
- align = 'middle',
- glue = {
- [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0.25, 0, priority = {0,0}},
- [9] = {0, 0.25, 0, priority = {0,0}},
- [10] = {0, 0.25, 0, priority = {0,0}},
- [11] = {0, 0.25, 0, priority = {0,0}},
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0.25, 0, priority = {0,0}},
- [14] = {0, 0, 0},
- [15] = {0, 0.25, 0, priority = {0,0}},
- [16] = {0, 0.25, 0, priority = {0,0}},
--- [0] = {0, 0.25, 0, priority = {0,0}},
- --[[
- [20] = {0, 0, 0},
- [21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- [22] = {0, 0.25, 0, priority = {0,0}},
- [23] = {0, 0.25, 0, priority = {0,0}},
- [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- [25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- [26] = {0, 0, 0},
- ]]
- [27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- --[[
- [28] = {0, 0.25, 0, priority = {0,0}},
- [29] = {0, 0, 0},
- [30] = {0, 0.25, 0, priority = {0,0}},
- ]]
- },
- },
-
- [16] = { -- 片仮名
- chars = {'ア', 'イ', 'ウ', 'エ', 'オ', 'カ', 'ガ', 'キ', 'ギ', 'ク', 'グ', 'ケ', 'ゲ', 'コ', 'ゴ', 'サ', 'ザ', 'シ', 'ジ', 'ス', 'ズ', 'セ', 'ゼ', 'ソ', 'ゾ', 'タ', 'ダ', 'チ', 'ヂ', 'ツ', 'ヅ', 'テ', 'デ', 'ト', 'ド', 'ナ', 'ニ', 'ヌ', 'ネ', 'ノ', 'ハ', 'バ', 'パ', 'ヒ', 'ビ', 'ピ', 'フ', 'ブ', 'プ', 'ヘ', 'ベ', 'ペ', 'ホ', 'ボ', 'ポ', 'マ', 'ミ', 'ム', 'メ', 'モ', 'ヤ', 'ユ', 'ヨ', 'ラ', 'リ', 'ル', 'レ', 'ロ', 'ワ', 'ヰ', 'ヱ', 'ヲ', 'ン', 'ヴ', 'ヷ', 'ヸ', 'ヹ', 'ヺ', 'カ゚', 'キ゚', 'ク゚', 'ケ゚', 'コ゚', 'セ゚', 'ツ゚', 'ト゚'},
- height = 0.88,depth = 0.12,
- align = 'middle',
- glue = {
- [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0.25, 0, priority = {0,0}},
- [9] = {0, 0.25, 0, priority = {0,0}},
- [10] = {0, 0.25, 0, priority = {0,0}},
- [11] = {0, 0.25, 0, priority = {0,0}},
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0.25, 0, priority = {0,0}},
- [14] = {0, 0, 0},
- [15] = {0, 0.25, 0, priority = {0,0}},
- [16] = {0, 0.25, 0, priority = {0,0}},
--- [0] = {0, 0.25, 0, priority = {0,0}},
- --[[
- [20] = {0, 0, 0},
- [21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- [22] = {0, 0.25, 0, priority = {0,0}},
- [23] = {0, 0.25, 0, priority = {0,0}},
- [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- [25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- [26] = {0, 0, 0},
- ]]
- [27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- --[[
- [28] = {0, 0.25, 0, priority = {0,0}},
- [29] = {0, 0, 0},
- [30] = {0, 0.25, 0, priority = {0,0}},
- ]]
- },
- },
-
- --[[
- [17] = { -- 等号類
- chars = {'=', '≠', '≒', '≃', '≅', '≈', '≡', '≢', '<', '>', '≦', '≧', '≪', '≫', '≶', '≷', '⋚', '⋛', '∧', '∨', '⌅', '⌆', '⊂', '⊃', '⊄', '⊅', '⊆', '⊇', '⊊', '⊋', '∈', '∋', '∉', '∪', '∩', '∥', '∦', '⇒', '⇔', '↔', '∽', '∝', '⊥', '⊕', '⊗'},
- align = 'middle',
- width = 1,
- },
-
- [18] = { -- 演算記号
- chars = {'+', '-', '×', '÷', '±', '∓'},
- align = 'middle',
- width = 1,
- },
- ]]
-
- -- [19] -- 漢字等:「その他の和文」として[0]で扱う
- [0] = { -- = [19]
- left = 0,
- align = 'middle',
- width = 1,height = 0.88,depth = 0.12,
- glue = {
- [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0.25, 0, priority = {0,0}},
--- [9] = {0, 0.25, 0, priority = {0,0}},
--- [10] = {0, 0.25, 0, priority = {0,0}},
--- [11] = {0, 0.25, 0, priority = {0,0}},
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0.25, 0, priority = {0,0}},
- [14] = {0, 0, 0},
--- [15] = {0, 0.25, 0, priority = {0,0}},
--- [16] = {0, 0.25, 0, priority = {0,0}},
--- [0] = {0, 0.25, 0, priority = {0,0}},
- --[[
- [20] = {0, 0, 0},
- [21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- [22] = {0, 0.25, 0, priority = {0,0}},
- [23] = {0, 0.25, 0, priority = {0,0}},
- [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- [25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- [26] = {0, 0, 0},
- ]]
- [27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階
- --[[
- [28] = {0, 0.25, 0, priority = {0,0}},
- [29] = {0, 0, 0},
- [30] = {0, 0.25, 0, priority = {0,0}},
- ]]
- },
- },
-
-
- --[[
- [20] = { -- 合印中の文字
- glue = {
- [1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0.25, 0, priority = {0,0}},
- [9] = {0, 0.25, 0, priority = {0,0}},
- [10] = {0, 0.25, 0, priority = {0,0}},
- [11] = {0, 0.25, 0, priority = {0,0}},
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0.25, 0, priority = {0,0}},
- [14] = {0, 0, 0},
- [15] = {0, 0.25, 0, priority = {0,0}},
- [16] = {0, 0.25, 0, priority = {0,0}},
- [0] = {0, 0.25, 0, priority = {0,0}},
- [20] = {0, 0, 0},
- [21] = {0, 0.25, 0, priority = {0,0}},
- [22] = {0, 0.25, 0, priority = {0,0}},
- [23] = {0, 0.25, 0, priority = {0,0}},
- [24] = {0, 0.25, 0, priority = {0,0}},
- [25] = {0, 0.25, 0, priority = {0,0}},
- [26] = {0, 0, 0},
- [27] = {0, 0.25, 0, priority = {0,0}},
- [28] = {0, 0.25, 0, priority = {0,0}},
- [29] = {0, 0, 0},
- [30] = {0, 0.25, 0, priority = {0,0}},
- },
- },
-
- [21] = {-- 親文字群中の文字(添え字付き)
- glue = {
- [1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0.25, 0, priority = {0,0}},
- [9] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
- [10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
- [11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0.25, 0, priority = {0,0}},
- [14] = {0, 0, 0},
- [15] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
- [16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
- [0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
- [20] = {0, 0, 0},
- [21] = {0, 0, 0},-- 注9,空け注5
- [22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
- [23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階
- [24] = {0, 0.25, 0, priority = {0,0}},
- [25] = {0, 0.25, 0, priority = {0,0}},
- [26] = {0, 0, 0},
- [27] = {0, 0.25, 0, priority = {0,0}},
- [28] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 三段階,表6と表3が整合的でない
- [29] = {0, 0, 0},
- [30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- },
- },
-
- [22] = { -- 親文字群中の文字(熟語ルビ以外のルビ付き)
- glue = {
- [1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0.25, 0, priority = {0,0}},
- [9] = {0, 0.25, 0, priority = {0,0}},
- [10] = {0, 0.25, 0, priority = {0,0}},
- [11] = {0, 0.25, 0, priority = {0,0}},
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0.25, 0, priority = {0,0}},
- [14] = {0, 0, 0},
- [15] = {0, 0.25, 0, priority = {0,0}},
- [16] = {0, 0.25, 0, priority = {0,0}},
- [0] = {0, 0.25, 0, priority = {0,0}},
- [20] = {0, 0, 0},
- [21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
- [22] = {0, 0.25, 0, priority = {0,0}}, -- 空け注10
- [23] = {0, 0.25, 0, priority = {0,0}},
- [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
- [25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
- [26] = {0, 0, 0},
- [27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
- [28] = {0, 0.25, 0, priority = {0,0}},
- [29] = {0, 0, 0},
- [30] = {0, 0.25, 0, priority = {0,0}},
- },
- },
-
- [23] = { -- 親文字群中の文字(熟語ルビ付き)
- glue = {
- [1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0.25, 0, priority = {0,0}},
- [9] = {0, 0.25, 0, priority = {0,0}},
- [10] = {0, 0.25, 0, priority = {0,0}},
- [11] = {0, 0.25, 0, priority = {0,0}},
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0.25, 0, priority = {0,0}},
- [14] = {0, 0, 0},
- [15] = {0, 0.25, 0, priority = {0,0}},
- [16] = {0, 0.25, 0, priority = {0,0}},
- [0] = {0, 0.25, 0, priority = {0,0}},
- [20] = {0, 0, 0},
- [21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
- [22] = {0, 0.25, 0, priority = {0,0}},
- [23] = {0, 0.25, 0, priority = {0,0}},-- 空け注7
- [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
- [25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
- [26] = {0, 0, 0},
- [27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
- [28] = {0, 0.25, 0, priority = {0,0}},
- [29] = {0, 0, 0},
- [30] = {0, 0.25, 0, priority = {0,0}},
- },
- },
-
- [24] = { -- 連数字中の文字
- chars = {' ', ',', '.', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'},
- glue = {
- [1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0.25, 0, priority = {0,0}},
- [9] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0, 0},-- 空け注8
- [14] = {0, 0, 0},
- [15] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [20] = {0, 0, 0},
- [21] = {0, 0.25, 0, priority = {0,0}},
- [22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [24] = {0, 0, 0},
- [25] = {0.25, 0, 0, ratio = 0},
- [26] = {0, 0, 0},
- [27] = {0, 0, 0},-- 空け注9
- [28] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
- [29] = {0, 0, 0},
- [30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- }
- },
-
- [25] = { -- 単位記号中の文字
- chars = {' ', '(', ')', '/', '1', '2', '3', '4', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'Ω', 'μ', '℧', 'Å', '−', '・'},
- glue = {
- [1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},-- 注12
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0.25, 0, priority = {0,0}},
- [9] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0.25, 0, priority = {0,0}},
- [14] = {0, 0, 0},
- [15] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [20] = {0, 0, 0},
- [21] = {0, 0.25, 0, priority = {0,0}},
- [22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},
- [25] = {0, 0, 0},
- [26] = {0, 0, 0},
- [27] = {0, 0, 0},
- [28] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
- [29] = {0, 0, 0},
- [30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- }
- },
-
- [26] = { -- 欧文間隔
- chars = {' '},
- glue = { -- 表3の方には記述がないのは何故?
- [1] = {0.5, 0, 0.5, ratio = 1},
- [2] = {0, 0, 0},
- [300] = {0, 0, 0},
- [301] = {0, 0, 0},
- [302] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0, 0},
- [9] = {0, 0, 0},
- [10] = {0, 0, 0},
- [11] = {0, 0, 0},
- [12] = {0, 0, 0},
- [13] = {0, 0, 0},
- [14] = {0, 0, 0},
- [15] = {0, 0, 0},
- [16] = {0, 0, 0},
- [0] = {0, 0, 0},
- [21] = {0, 0, 0},
- [22] = {0, 0, 0},
- [23] = {0, 0, 0},
- [24] = {0, 0, 0},
- [25] = {0, 0, 0},
- [26] = {0, 0, 0},
- [27] = {0, 0, 0},
- [28] = {0, 0, 0},
- [29] = {0, 0, 0},-- 注13, (空け)注4
- [30] = {0, 0, 0},
- }
- },
-
- [27] = {-- 欧文
- chars = {'jcharbdd'},
- glue = {
- [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [3] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0.25, 0, priority = {0,0}},
- [9] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0.25, 0, priority = {0,0}},-- 空け注10
- [14] = {0, 0, 0},
- [15] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [20] = {0, 0, 0},
- [21] = {0, 0.25, 0, priority = {0,0}},
- [22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [24] = {0, 0, 0},
- [25] = {0.25, 0, 0.125, ratio = 0, priority = {0,-1}},
- [26] = {0, 0, 0},
- [27] = {0, 0, 0},
- [28] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
- [29] = {0, 0, 0},
- [30] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階
- }
- },
-
- [28] = { -- 割注始め括弧類
- chars = {'(', '〔', '['},
- glue = {
- [1] = {0, 0, 0},
- [2] = {0, 0, 0},
- [3] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0, 0, 0},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0, 0},
- [9] = {0, 0, 0},-- 注14
- [10] = {0, 0, 0},-- 注15
- [11] = {0, 0, 0},-- 注16
- [12] = {0, 0, 0},
- [13] = {0, 0, 0},
- [14] = {0, 0, 0},
- [15] = {0, 0, 0},
- [16] = {0, 0, 0},
- [0] = {0, 0, 0},
- [20] = {0, 0, 0},
- [21] = {0, 0, 0},
- [22] = {0, 0, 0},
- [23] = {0, 0, 0},
- [24] = {0, 0, 0},
- [25] = {0, 0, 0},
- [26] = {0, 0, 0}, -- 注13, (空け)注4
- [27] = {0, 0, 0},
- [28] = {0, 0, 0},
- [29] = {0, 0, 0},
- [30] = {0, 0, 0},
- }
- },
-
- [29] = { -- 割注終わり括弧類
- chars = {')', '〕', ']'},
- glue = {
- [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [3] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0.25, 0, priority = {0,0}},
- [9] = {0, 0.25, 0, priority = {0,0}},
- [10] = {0, 0.25, 0, priority = {0,0}},
- [11] = {0, 0.25, 0, priority = {0,0}},
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0.25, 0, priority = {0,0}},
- [14] = {0, 0, 0},
- [15] = {0, 0.25, 0, priority = {0,0}},
- [16] = {0, 0.25, 0, priority = {0,0}},
- [0] = {0, 0.25, 0, priority = {0,0}},
- [20] = {0, 0, 0},
- [21] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [22] = {0, 0.25, 0, priority = {0,0}},
- [23] = {0, 0.25, 0, priority = {0,0}},
- [24] = {0.25, 0.25, 0.125, ratio = 1}, priority = {1,-3},-- 空け priority = 二段階
- [25] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [26] = {0, 0, 0},
- [27] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [28] = {0, 0.25, 0, priority = {0,0}},
- [29] = {0, 0, 0},
- [30] = {0, 0.25, 0, priority = {0,0}},
- }
- },
-
- [30] = { -- 縦中横中の文字
- glue = {
- [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}},
- [2] = {0, 0, 0},
- [3] = {0, 0, 0},
- [4] = {0, 0, 0},
- [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},
- [6] = {0, 0, 0},
- [7] = {0, 0, 0},
- [8] = {0, 0.25, 0, priority = {0,0}},
- [9] = {0, 0.25, 0, priority = {0,0}},
- [10] = {0, 0.25, 0, priority = {0,0}},
- [11] = {0, 0.25, 0, priority = {0,0}},
- [12] = {0, 0.25, 0, priority = {0,0}},
- [13] = {0, 0.25, 0, priority = {0,0}},
- [14] = {0, 0, 0},
- [15] = {0, 0.25, 0, priority = {0,0}},
- [16] = {0, 0.25, 0, priority = {0,0}},
- [0] = {0, 0.25, 0, priority = {0,0}},
- [20] = {0, 0, 0},
- [21] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [22] = {0, 0.25, 0, priority = {0,0}},
- [23] = {0, 0.25, 0, priority = {0,0}},
- [24] = {0.25, 0.25, 0.125, ratio = 1}, priority = {1,-3},-- 空け priority = 二段階
- [25] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [26] = {0, 0, 0},
- [27] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階
- [28] = {0, 0.25, 0, priority = {0,0}},
- [29] = {0, 0, 0},
- [30] = {0, 0.25, 0, priority = {0,0}},
- }
- },
- ]]
-
- [90] = { -- 行頭
- chars = {'parbdd','boxbdd'},
- glue = {
- [1] = {0, 0, 0}, -- 行頭括弧はベタ組
- },
- },
-}
-
-for k,v in pairs(jfm) do
- if type(k) == "number" then
- for kk,vv in pairs(v.glue) do
- vv.kanjiskip_natural = 1
- vv.kanjiskip_stretch = 1
- end
- end
-end
-
-local function add_space(before,after,glueorkern,space,ratio)
- if jfm[before][glueorkern] == nil then jfm[before][glueorkern] = {} end
- if jfm[before][glueorkern][after] == nil then jfm[before][glueorkern][after] = {0} end
- local origratio = jfm[before][glueorkern][after].ratio
- if origratio == nil then origratio = 0.5 end
- jfm[before][glueorkern][after].ratio = (jfm[before][glueorkern][after][1] * origratio + space * ratio) / (jfm[before][glueorkern][after][1] + ratio)
- jfm[before][glueorkern][after][1] = jfm[before][glueorkern][after][1] + space
-end
-
-if jlreq ~= nil then
- if type(jlreq.open_bracket_pos) == "string" then
- local r = jlreq.open_bracket_pos:find("_")
- local danraku = jlreq.open_bracket_pos:sub(1,r - 1)
- local orikaeshi = jlreq.open_bracket_pos:sub(r + 1)
-
- -- 折り返し行頭の開き括弧を二分下げる……つもり
- if orikaeshi == "nibu" then
- -- widthを二分増やし,その代わりJFMグルーを二分減らす
- jfm[1].width = jfm[1].width + 0.5
- for k,v in pairs(jfm) do
- if type(k) == "number" then
- add_space(k,1,"glue",-0.5,1)
- end
- end
- end
-
- -- 段落行頭の下げ
- if danraku == "zenkakunibu" then
- add_space(90,1,"glue",0.5,1)
- elseif danraku == "nibu" then
- add_space(90,1,"glue",-0.5,1)
- end
- end
-
- -- ぶら下げ組を有効にする.
- if jlreq.burasage == true then
- for _,class in ipairs({6,7}) do
- table.insert(jfm[class].end_adjust,-0.5)
- end
- end
-end
-
-
-luatexja.jfont.define_jfm(jfm)
+--[[ +3.1.3 +3.1.6.a +]] + +--[[ +優先順位は,第n段階を3 - nに対応させる. + 段階 1, 2, 3, 4, 5, 6 +priority 2, 1, 0,-1,-2,-3 +xkanjiskipは{1,-3},kanjiskip={0,0} +\ltjsetparameter{stretch_priority={kanjiskip=1,xkanjiskip=-3}} +\ltjsetparameter{stretch_priority={kanjiskip=0,xkanjiskip=0}} +]] + +local hyphen_glue = { + [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0, 0}, + [9] = {0, 0, 0}, + [10] = {0, 0, 0}, + [11] = {0, 0, 0}, + [12] = {0, 0, 0}, + [13] = {0, 0, 0}, + [14] = {0, 0, 0}, + [15] = {0, 0, 0}, + [16] = {0, 0, 0}, + [0] = {0, 0, 0}, +--[[ + [20] = {0, 0, 0}, + [21] = {0, 0, 0}, + [22] = {0, 0, 0}, + [23] = {0, 0, 0}, + [24] = {0, 0, 0}, + [25] = {0, 0, 0}, + [26] = {0, 0, 0}, + [27] = {0, 0, 0}, + [28] = {0, 0, 0}, + [29] = {0, 0, 0}, + [30] = {0, 0, 0}, +]] +} + + + +local jfm = { + dir = 'yoko', + zw = 1.0, + zh = 1.0, + version = 2, + -- 文字クラス4,9,10,11,15,16,19との間は(x)kanjiskipで調整する. + kanjiskip = {0, 0.25, 0}, + xkanjiskip = {0.25, 0.25, 0.125}, + + -- alignは適当 + [1] = { -- 初め括弧類 + chars = {'(', '〔', '[', '{', '〈', '《', '「', '『', '【', '⦅', '〘', '〖', '«', '〝', + '‘', '“'}, + width = 0.5,height = 0.88,depth = 0.12, + align = 'right', + glue = { + [1] = {0, 0, 0}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0, 0}, + [9] = {0, 0, 0}, + [10] = {0, 0, 0}, + [11] = {0, 0, 0}, + [12] = {0, 0, 0}, + [13] = {0, 0, 0}, + [14] = {0, 0, 0}, + [15] = {0, 0, 0}, + [16] = {0, 0, 0}, + [0] = {0, 0, 0}, + --[[ + [20] = {0, 0, 0}, + [21] = {0, 0, 0}, + [22] = {0, 0, 0}, + [23] = {0, 0, 0}, + [24] = {0, 0, 0}, + [25] = {0, 0, 0}, + [26] = {0, 0, 0}, + [27] = {0, 0, 0}, + [28] = {0, 0, 0}, + [29] = {0, 0, 0}, + [30] = {0, 0, 0}, + -- [22][23] 注1 + ]] + }, + }, + + [2] = { -- 終わり括弧類 + chars = { ')', '〕', ']', '}', '〉', '》', '」', '』', '】', '⦆', '〙', '〗', '»', '〟', + '’', '”'}, + width = 0.5,height = 0.88,depth = 0.12, + align = 'left', + glue = { + [1] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [301] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [302] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [4] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [9] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [10] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [11] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [12] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [13] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [14] = {0, 0, 0}, + [15] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [16] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [0] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + --[[ + [20] = {0, 0, 0}, + [21] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [22] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [23] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [24] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [25] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [26] = {0.5, 0, 0, ratio = 0, priority = {0,-2}}, + [27] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [28] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [29] = {0, 0, 0}, + [30] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + ]] + }, + end_adjust = {0.5,0}, + }, + + -- [3*]はハイフン類.幅が違うので分ける. + [300] = { + chars = {'‐'}, + width = 0.25,height = 0.88,depth = 0.12, + align = 'middle', + glue = hyphen_glue,-- 上の方で定義 + }, + + [301] = { + chars = {'゠', '–'}, + width = 0.5,height = 0.88,depth = 0.12, + align = 'middle', + glue = hyphen_glue, + }, + + [302] = { + chars = {'〜'}, + width = 1,height = 0.88,depth = 0.12, + align = 'middle', + glue = hyphen_glue, + }, + + [4] = { -- 区切り約物 + chars = {'!', '?', '‼', '⁇', '⁈', '⁉'}, + width = 1,height = 0.88,depth = 0.12, + align = 'middle', + glue = { + [1] = {0.5, 0.5, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0, 0}, + [9] = {0, 0, 0}, + [10] = {0, 0, 0}, + [11] = {0, 0, 0}, + [12] = {0, 0, 0}, + [13] = {0, 0, 0}, + [14] = {0, 0, 0}, + [15] = {0, 0, 0}, + [16] = {0, 0, 0}, +-- [0] = {0, 0, 0}, + --[[ + [20] = {0, 0, 0}, + [21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空けpriority = {0,-1}段階 + [22] = {0, 0, 0}, + [23] = {0, 0, 0}, + [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空けpriority = {0,-1}段階 + [25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空けpriority = {0,-1}段階 + [26] = {0, 0, 0}, + ]] + [27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空けpriority = {0,-1}段階 + --[[ + [28] = {0, 0, 0}, + [29] = {0, 0, 0}, + [30] = {0, 0, 0}, + ]] + }, + }, + + [5] = { -- 中点類 + chars = {'・', ':', + ';' + }, + width = 0.5,height = 0.88,depth = 0.12, + align = 'middle', + glue = { + [1] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [2] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [300] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [301] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [302] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [4] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [5] = {0.5, 0, 0.5, ratio = 0.5, priority = {0,-1}}, + [6] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [7] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [8] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [9] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [10] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [11] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [12] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [13] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [14] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [15] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [16] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [0] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + --[[ + [20] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [21] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [22] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [23] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [24] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [25] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [26] = {0.25, 0, 0, ratio = 0, priority = {0,-1}}, + ]] + [27] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + --[[ + [28] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [29] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + [30] = {0.25, 0, 0.25, ratio = 0, priority = {0,-1}}, + ]] + }, + end_adjust = {0.25,0}, -- 0.25 -> 0は詰め,優先順位は第三段階 + }, + + [6] = { -- 句点類 + chars = {'。', + '.'}, -- 縦書きでは使わない + width = 0.5,height = 0.88,depth = 0.12, + align = 'left', + glue = { + [1] = {0.5, 0, 0, ratio = 0}, + [2] = {0, 0, 0}, + [300] = {0.5, 0, 0, ratio = 0}, + [301] = {0.5, 0, 0, ratio = 0}, + [302] = {0.5, 0, 0, ratio = 0}, + [4] = {0.5, 0, 0, ratio = 0}, + [5] = {0.75, 0, 0.25, ratio = 0.33333333, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0.5, 0, 0, ratio = 0}, + [9] = {0.5, 0, 0, ratio = 0}, + [10] = {0.5, 0, 0, ratio = 0}, + [11] = {0.5, 0, 0, ratio = 0}, + [12] = {0.5, 0, 0, ratio = 0}, + [13] = {0.5, 0, 0, ratio = 0}, + [14] = {0.5, 0, 0, ratio = 0}, + [15] = {0.5, 0, 0, ratio = 0}, + [16] = {0.5, 0, 0, ratio = 0}, + [0] = {0.5, 0, 0, ratio = 0}, + --[[ + [20] = {0, 0, 0}, + [21] = {0.5, 0, 0, ratio = 0}, + [22] = {0.5, 0, 0, ratio = 0}, + [23] = {0.5, 0, 0, ratio = 0}, + [24] = {0.5, 0, 0, ratio = 0}, + [25] = {0.5, 0, 0, ratio = 0}, + [26] = {0.5, 0, 0, ratio = 0}, + ]] + [27] = {0.5, 0, 0, ratio = 0}, + --[[ + [28] = {0.5, 0, 0, ratio = 0}, + [29] = {0.5, 0, 0, ratio = 0}, + [30] = {0.5, 0, 0, ratio = 0}, + ]] + }, + end_adjust = {0.5, 0}, + }, + + [7] = { -- 読点類 + chars = {'、', + ','}, -- 縦書きでは使わない + width = 0.5,height = 0.88,depth = 0.12, + align = 'left', + glue = { + [1] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [301] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [302] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [4] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [5] = {0.75, 0, 0.75, ratio = 0.33333333, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [9] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [10] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [11] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [12] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [13] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [14] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [15] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [16] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [0] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + --[[ + [20] = {0, 0, 0}, + [21] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [22] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [23] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [24] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [25] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [26] = {0.5, 0, 0, ratio = 0, priority = {0,-2}}, + ]] + [27] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + --[[ + [28] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [29] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + [30] = {0.5, 0, 0.5, ratio = 0, priority = {0,-2}}, + ]] + }, + end_adjust = {0.5, 0}, + }, + + [8] = { -- 分離禁止文字 + chars = {'—', '…', '‥', '〳', '〴', '〵'}, + width = 1,height = 0.88,depth = 0.12, + align = 'middle', + glue = { + [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0, 0}, + [9] = {0, 0.25, 0, priority = {0,0}}, + [10] = {0, 0.25, 0, priority = {0,0}}, + [11] = {0, 0.25, 0, priority = {0,0}}, + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0.25, 0, priority = {0,0}}, + [14] = {0, 0, 0}, + [15] = {0, 0.25, 0, priority = {0,0}}, + [16] = {0, 0.25, 0, priority = {0,0}}, + [0] = {0, 0.25, 0, priority = {0,0}}, + --[[ + [20] = {0, 0, 0}, + [21] = {0, 0.25, 0, priority = {0,0}}, + [22] = {0, 0.25, 0, priority = {0,0}}, + [23] = {0, 0.25, 0, priority = {0,0}}, + [24] = {0, 0, 0}, + [25] = {0, 0, 0}, + [26] = {0, 0, 0}, + ]] + [27] = {0, 0.25, 0, priority = {0,0}}, + --[[ + [28] = {0, 0.25, 0, priority = {0,0}}, + [29] = {0, 0, 0}, + [30] = {0, 0.25, 0, priority = {0,0}}, + ]] + }, + }, + + [9] = { -- 繰返し記号 + chars = {'ヽ', 'ヾ', 'ゝ', 'ゞ', '々', '〻'}, + height = 0.88,depth = 0.12, + align = 'middle', + glue = { + [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0, 0}, + [9] = {0, 0.25, 0, priority = {0,0}}, + [10] = {0, 0.25, 0, priority = {0,0}}, + [11] = {0, 0.25, 0, priority = {0,0}}, + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0.25, 0, priority = {0,0}}, + [14] = {0, 0, 0}, + [15] = {0, 0.25, 0, priority = {0,0}}, + [16] = {0, 0.25, 0, priority = {0,0}}, +-- [0] = {0, 0.25, 0, priority = {0,0}}, + --[[ + [20] = {0, 0, 0}, + [21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + [22] = {0, 0.25, 0, priority = {0,0}}, + [23] = {0, 0.25, 0, priority = {0,0}}, + [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + [25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + [26] = {0, 0, 0}, + ]] + [27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + --[[ + [28] = {0, 0.25, 0, priority = {0,0}}, + [29] = {0, 0, 0}, + [30] = {0, 0.25, 0, priority = {0,0}}, + ]] + }, + }, + + [10] = { -- 長音記号 + chars = {'ー'}, + height = 0.88,depth = 0.12, + align = 'middle', + glue = { + [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0, 0}, + [9] = {0, 0.25, 0, priority = {0,0}}, + [10] = {0, 0.25, 0, priority = {0,0}}, + [11] = {0, 0.25, 0, priority = {0,0}}, + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0.25, 0, priority = {0,0}}, + [14] = {0, 0, 0}, + [15] = {0, 0.25, 0, priority = {0,0}}, + [16] = {0, 0.25, 0, priority = {0,0}}, +-- [0] = {0, 0.25, 0, priority = {0,0}}, + --[[ + [20] = {0, 0, 0}, + [21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + [22] = {0, 0.25, 0, priority = {0,0}}, + [23] = {0, 0.25, 0, priority = {0,0}}, + [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + [25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + [26] = {0, 0, 0}, + ]] + [27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + --[[ + [28] = {0, 0.25, 0, priority = {0,0}}, + [29] = {0, 0, 0}, + [30] = {0, 0.25, 0, priority = {0,0}}, + ]] + }, + }, + + [11] = { -- 小書きの仮名 + chars = {'ぁ', 'ぃ', 'ぅ', 'ぇ', 'ぉ', 'ァ', 'ィ', 'ゥ', 'ェ', 'ォ', 'っ', 'ゃ', 'ゅ', 'ょ', 'ゎ', 'ゕ', 'ゖ', 'ッ', 'ャ', 'ュ', 'ョ', 'ヮ', 'ヵ', 'ヶ', 'ㇰ', 'ㇱ', 'ㇲ', 'ㇳ', 'ㇴ', 'ㇵ', 'ㇶ', 'ㇷ', 'ㇸ', 'ㇹ', 'ㇺ', 'ㇻ', 'ㇼ', 'ㇽ', 'ㇾ', 'ㇿ', 'ㇷ゚'}, + height = 0.88,depth = 0.12, + align = 'middle', + glue = { + [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0, 0}, + [9] = {0, 0.25, 0, priority = {0,0}}, + [10] = {0, 0.25, 0, priority = {0,0}}, + [11] = {0, 0.25, 0, priority = {0,0}}, + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0.25, 0, priority = {0,0}}, + [14] = {0, 0, 0}, + [15] = {0, 0.25, 0, priority = {0,0}}, + [16] = {0, 0.25, 0, priority = {0,0}}, +-- [0] = {0, 0.25, 0, priority = {0,0}}, + --[[ + [20] = {0, 0, 0}, + [21] = {0.25, 0, 0.125, ratio = 0, priority = {1,-3}}, + [22] = {0, 0.25, 0, priority = {0,0}}, + [23] = {0, 0.25, 0, priority = {0,0}}, + [24] = {0.25, 0, 0.125, ratio = 0, priority = {1,-3}}, + [25] = {0.25, 0, 0.125, ratio = 0, priority = {1,-3}}, + [26] = {0, 0, 0}, + ]] + [27] = {0.25, 0, 0.125, ratio = 0, priority = {1,-3}}, + --[[ + [28] = {0, 0.25, 0, priority = {0,0}}, + [29] = {0, 0, 0}, + [30] = {0, 0.25, 0, priority = {0,0}}, + ]] + }, + }, + + [12] = { -- 前置省略記号 + chars = {'¥', '$', '£', '#', '€', '№'}, + height = 0.88,depth = 0.12, + align = 'middle', + glue = { + [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0.25, 0, priority = {0,0}}, + [9] = {0, 0.25, 0, priority = {0,0}}, + [10] = {0, 0.25, 0, priority = {0,0}}, + [11] = {0, 0.25, 0, priority = {0,0}}, + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0.25, 0, priority = {0,0}}, + [14] = {0, 0, 0}, + [15] = {0, 0.25, 0, priority = {0,0}}, + [16] = {0, 0.25, 0, priority = {0,0}}, + [0] = {0, 0.25, 0, priority = {0,0}}, + --[[ + [20] = {0, 0, 0}, + [21] = {0, 0.25, 0, priority = {0,0}}, + [22] = {0, 0.25, 0, priority = {0,0}}, + [23] = {0, 0.25, 0, priority = {0,0}}, + [24] = {0, 0, 0}, + [25] = {0, 0.25, 0, priority = {0,0}}, + [26] = {0, 0, 0}, + ]] + [27] = {0, 0.25, 0, priority = {0,0}}, + --[[ + [28] = {0, 0.25, 0, priority = {0,0}}, + [29] = {0, 0, 0}, + [30] = {0, 0.25, 0, priority = {0,0}}, + ]] + }, + }, + + [13] = { -- 後置省略記号 + chars = {'°', '′', '″', '℃', '¢', '%', '‰', '㏋', 'ℓ', '㌃', '㌍', '㌔', '㌘', '㌢', '㌣', '㌦', '㌧', '㌫', '㌶', '㌻', '㍉', '㍊', '㍍', '㍑', '㍗', '㎎', '㎏', '㎜', '㎝', '㎞', '㎡', '㏄'}, + height = 0.88,depth = 0.12, + align = 'middle', + glue = { + [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0.25, 0, priority = {0,0}}, + [9] = {0, 0.25, 0, priority = {0,0}}, + [10] = {0, 0.25, 0, priority = {0,0}}, + [11] = {0, 0.25, 0, priority = {0,0}}, + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0.25, 0, priority = {0,0}}, + [14] = {0, 0, 0}, + [15] = {0, 0.25, 0, priority = {0,0}}, + [16] = {0, 0.25, 0, priority = {0,0}}, + [0] = {0, 0.25, 0, priority = {0,0}}, + --[[ + [20] = {0, 0, 0}, + [21] = {0, 0.25, 0, priority = {0,0}}, + [22] = {0, 0.25, 0, priority = {0,0}}, + [23] = {0, 0.25, 0, priority = {0,0}}, + [24] = {0, 0.25, 0, priority = {0,0}}, + [25] = {0, 0.25, 0, priority = {0,0}}, + [26] = {0, 0, 0}, + ]] + [27] = {0, 0.25, 0, priority = {0,0}}, + --[[ + [28] = {0, 0.25, 0, priority = {0,0}}, + [29] = {0, 0, 0}, + [30] = {0, 0.25, 0, priority = {0,0}}, + ]] + }, + }, + + [14] = { -- 和字間隔 + chars = {' '}, + align = 'middle', + width= 1,height = 0.88,depth = 0.12, + glue = { + [1] = {0, 0, 0}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0, 0}, + [9] = {0, 0, 0}, + [10] = {0, 0, 0}, + [11] = {0, 0, 0}, + [12] = {0, 0, 0}, + [13] = {0, 0, 0}, + [14] = {0, 0, 0}, + [15] = {0, 0, 0}, + [16] = {0, 0, 0}, + [0] = {0, 0, 0}, + --[[ + [20] = {0, 0, 0}, + [21] = {0, 0, 0}, + [22] = {0, 0, 0}, + [23] = {0, 0, 0}, + [24] = {0, 0, 0}, + [25] = {0, 0, 0}, + [26] = {0, 0, 0}, + ]] + [27] = {0, 0, 0}, + --[[ + [28] = {0, 0, 0}, + [29] = {0, 0, 0}, + [30] = {0, 0, 0}, + ]] + }, + }, + + [15] = { -- 平仮名 + chars = {'あ', 'い', 'う', 'え', 'お', 'か', 'が', 'き', 'ぎ', 'く', 'ぐ', 'け', 'げ', 'こ', 'ご', 'さ', 'ざ', 'し', 'じ', 'す', 'ず', 'せ', 'ぜ', 'そ', 'ぞ', 'た', 'だ', 'ち', 'ぢ', 'つ', 'づ', 'て', 'で', 'と', 'ど', 'な', 'に', 'ぬ', 'ね', 'の', 'は', 'ば', 'ぱ', 'ひ', 'び', 'ぴ', 'ふ', 'ぶ', 'ぷ', 'へ', 'べ', 'ぺ', 'ほ', 'ぼ', 'ぽ', 'ま', 'み', 'む', 'め', 'も', 'や', 'ゆ', 'よ', 'ら', 'り', 'る', 'れ', 'ろ', 'わ', 'ゐ', 'ゑ', 'を', 'ん', 'ゔ', 'か゚', 'き゚', 'く゚', 'け゚', 'こ゚'}, + height = 0.88,depth = 0.12, + align = 'middle', + glue = { + [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0.25, 0, priority = {0,0}}, + [9] = {0, 0.25, 0, priority = {0,0}}, + [10] = {0, 0.25, 0, priority = {0,0}}, + [11] = {0, 0.25, 0, priority = {0,0}}, + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0.25, 0, priority = {0,0}}, + [14] = {0, 0, 0}, + [15] = {0, 0.25, 0, priority = {0,0}}, + [16] = {0, 0.25, 0, priority = {0,0}}, +-- [0] = {0, 0.25, 0, priority = {0,0}}, + --[[ + [20] = {0, 0, 0}, + [21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + [22] = {0, 0.25, 0, priority = {0,0}}, + [23] = {0, 0.25, 0, priority = {0,0}}, + [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + [25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + [26] = {0, 0, 0}, + ]] + [27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + --[[ + [28] = {0, 0.25, 0, priority = {0,0}}, + [29] = {0, 0, 0}, + [30] = {0, 0.25, 0, priority = {0,0}}, + ]] + }, + }, + + [16] = { -- 片仮名 + chars = {'ア', 'イ', 'ウ', 'エ', 'オ', 'カ', 'ガ', 'キ', 'ギ', 'ク', 'グ', 'ケ', 'ゲ', 'コ', 'ゴ', 'サ', 'ザ', 'シ', 'ジ', 'ス', 'ズ', 'セ', 'ゼ', 'ソ', 'ゾ', 'タ', 'ダ', 'チ', 'ヂ', 'ツ', 'ヅ', 'テ', 'デ', 'ト', 'ド', 'ナ', 'ニ', 'ヌ', 'ネ', 'ノ', 'ハ', 'バ', 'パ', 'ヒ', 'ビ', 'ピ', 'フ', 'ブ', 'プ', 'ヘ', 'ベ', 'ペ', 'ホ', 'ボ', 'ポ', 'マ', 'ミ', 'ム', 'メ', 'モ', 'ヤ', 'ユ', 'ヨ', 'ラ', 'リ', 'ル', 'レ', 'ロ', 'ワ', 'ヰ', 'ヱ', 'ヲ', 'ン', 'ヴ', 'ヷ', 'ヸ', 'ヹ', 'ヺ', 'カ゚', 'キ゚', 'ク゚', 'ケ゚', 'コ゚', 'セ゚', 'ツ゚', 'ト゚'}, + height = 0.88,depth = 0.12, + align = 'middle', + glue = { + [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0.25, 0, priority = {0,0}}, + [9] = {0, 0.25, 0, priority = {0,0}}, + [10] = {0, 0.25, 0, priority = {0,0}}, + [11] = {0, 0.25, 0, priority = {0,0}}, + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0.25, 0, priority = {0,0}}, + [14] = {0, 0, 0}, + [15] = {0, 0.25, 0, priority = {0,0}}, + [16] = {0, 0.25, 0, priority = {0,0}}, +-- [0] = {0, 0.25, 0, priority = {0,0}}, + --[[ + [20] = {0, 0, 0}, + [21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + [22] = {0, 0.25, 0, priority = {0,0}}, + [23] = {0, 0.25, 0, priority = {0,0}}, + [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + [25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + [26] = {0, 0, 0}, + ]] + [27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + --[[ + [28] = {0, 0.25, 0, priority = {0,0}}, + [29] = {0, 0, 0}, + [30] = {0, 0.25, 0, priority = {0,0}}, + ]] + }, + }, + + --[[ + [17] = { -- 等号類 + chars = {'=', '≠', '≒', '≃', '≅', '≈', '≡', '≢', '<', '>', '≦', '≧', '≪', '≫', '≶', '≷', '⋚', '⋛', '∧', '∨', '⌅', '⌆', '⊂', '⊃', '⊄', '⊅', '⊆', '⊇', '⊊', '⊋', '∈', '∋', '∉', '∪', '∩', '∥', '∦', '⇒', '⇔', '↔', '∽', '∝', '⊥', '⊕', '⊗'}, + align = 'middle', + width = 1, + }, + + [18] = { -- 演算記号 + chars = {'+', '-', '×', '÷', '±', '∓'}, + align = 'middle', + width = 1, + }, + ]] + + -- [19] -- 漢字等:「その他の和文」として[0]で扱う + [0] = { -- = [19] + left = 0, + align = 'middle', + width = 1,height = 0.88,depth = 0.12, + glue = { + [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0.25, 0, priority = {0,0}}, +-- [9] = {0, 0.25, 0, priority = {0,0}}, +-- [10] = {0, 0.25, 0, priority = {0,0}}, +-- [11] = {0, 0.25, 0, priority = {0,0}}, + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0.25, 0, priority = {0,0}}, + [14] = {0, 0, 0}, +-- [15] = {0, 0.25, 0, priority = {0,0}}, +-- [16] = {0, 0.25, 0, priority = {0,0}}, +-- [0] = {0, 0.25, 0, priority = {0,0}}, + --[[ + [20] = {0, 0, 0}, + [21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + [22] = {0, 0.25, 0, priority = {0,0}}, + [23] = {0, 0.25, 0, priority = {0,0}}, + [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + [25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + [26] = {0, 0, 0}, + ]] + [27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = {0,-1}段階 + --[[ + [28] = {0, 0.25, 0, priority = {0,0}}, + [29] = {0, 0, 0}, + [30] = {0, 0.25, 0, priority = {0,0}}, + ]] + }, + }, + + + --[[ + [20] = { -- 合印中の文字 + glue = { + [1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0.25, 0, priority = {0,0}}, + [9] = {0, 0.25, 0, priority = {0,0}}, + [10] = {0, 0.25, 0, priority = {0,0}}, + [11] = {0, 0.25, 0, priority = {0,0}}, + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0.25, 0, priority = {0,0}}, + [14] = {0, 0, 0}, + [15] = {0, 0.25, 0, priority = {0,0}}, + [16] = {0, 0.25, 0, priority = {0,0}}, + [0] = {0, 0.25, 0, priority = {0,0}}, + [20] = {0, 0, 0}, + [21] = {0, 0.25, 0, priority = {0,0}}, + [22] = {0, 0.25, 0, priority = {0,0}}, + [23] = {0, 0.25, 0, priority = {0,0}}, + [24] = {0, 0.25, 0, priority = {0,0}}, + [25] = {0, 0.25, 0, priority = {0,0}}, + [26] = {0, 0, 0}, + [27] = {0, 0.25, 0, priority = {0,0}}, + [28] = {0, 0.25, 0, priority = {0,0}}, + [29] = {0, 0, 0}, + [30] = {0, 0.25, 0, priority = {0,0}}, + }, + }, + + [21] = {-- 親文字群中の文字(添え字付き) + glue = { + [1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0.25, 0, priority = {0,0}}, + [9] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階 + [10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階 + [11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階 + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0.25, 0, priority = {0,0}}, + [14] = {0, 0, 0}, + [15] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階 + [16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階 + [0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階 + [20] = {0, 0, 0}, + [21] = {0, 0, 0},-- 注9,空け注5 + [22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階 + [23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}}, -- 空け priority = 二段階 + [24] = {0, 0.25, 0, priority = {0,0}}, + [25] = {0, 0.25, 0, priority = {0,0}}, + [26] = {0, 0, 0}, + [27] = {0, 0.25, 0, priority = {0,0}}, + [28] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 三段階,表6と表3が整合的でない + [29] = {0, 0, 0}, + [30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + }, + }, + + [22] = { -- 親文字群中の文字(熟語ルビ以外のルビ付き) + glue = { + [1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0.25, 0, priority = {0,0}}, + [9] = {0, 0.25, 0, priority = {0,0}}, + [10] = {0, 0.25, 0, priority = {0,0}}, + [11] = {0, 0.25, 0, priority = {0,0}}, + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0.25, 0, priority = {0,0}}, + [14] = {0, 0, 0}, + [15] = {0, 0.25, 0, priority = {0,0}}, + [16] = {0, 0.25, 0, priority = {0,0}}, + [0] = {0, 0.25, 0, priority = {0,0}}, + [20] = {0, 0, 0}, + [21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階 + [22] = {0, 0.25, 0, priority = {0,0}}, -- 空け注10 + [23] = {0, 0.25, 0, priority = {0,0}}, + [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階 + [25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階 + [26] = {0, 0, 0}, + [27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階 + [28] = {0, 0.25, 0, priority = {0,0}}, + [29] = {0, 0, 0}, + [30] = {0, 0.25, 0, priority = {0,0}}, + }, + }, + + [23] = { -- 親文字群中の文字(熟語ルビ付き) + glue = { + [1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0.25, 0, priority = {0,0}}, + [9] = {0, 0.25, 0, priority = {0,0}}, + [10] = {0, 0.25, 0, priority = {0,0}}, + [11] = {0, 0.25, 0, priority = {0,0}}, + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0.25, 0, priority = {0,0}}, + [14] = {0, 0, 0}, + [15] = {0, 0.25, 0, priority = {0,0}}, + [16] = {0, 0.25, 0, priority = {0,0}}, + [0] = {0, 0.25, 0, priority = {0,0}}, + [20] = {0, 0, 0}, + [21] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階 + [22] = {0, 0.25, 0, priority = {0,0}}, + [23] = {0, 0.25, 0, priority = {0,0}},-- 空け注7 + [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階 + [25] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階 + [26] = {0, 0, 0}, + [27] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階 + [28] = {0, 0.25, 0, priority = {0,0}}, + [29] = {0, 0, 0}, + [30] = {0, 0.25, 0, priority = {0,0}}, + }, + }, + + [24] = { -- 連数字中の文字 + chars = {' ', ',', '.', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}, + glue = { + [1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0.25, 0, priority = {0,0}}, + [9] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0, 0},-- 空け注8 + [14] = {0, 0, 0}, + [15] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [20] = {0, 0, 0}, + [21] = {0, 0.25, 0, priority = {0,0}}, + [22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [24] = {0, 0, 0}, + [25] = {0.25, 0, 0, ratio = 0}, + [26] = {0, 0, 0}, + [27] = {0, 0, 0},-- 空け注9 + [28] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階 + [29] = {0, 0, 0}, + [30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + } + }, + + [25] = { -- 単位記号中の文字 + chars = {' ', '(', ')', '/', '1', '2', '3', '4', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'Ω', 'μ', '℧', 'Å', '−', '・'}, + glue = { + [1] = {0,5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}},-- 注12 + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0.25, 0, priority = {0,0}}, + [9] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0.25, 0, priority = {0,0}}, + [14] = {0, 0, 0}, + [15] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [20] = {0, 0, 0}, + [21] = {0, 0.25, 0, priority = {0,0}}, + [22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [24] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}}, + [25] = {0, 0, 0}, + [26] = {0, 0, 0}, + [27] = {0, 0, 0}, + [28] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階 + [29] = {0, 0, 0}, + [30] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + } + }, + + [26] = { -- 欧文間隔 + chars = {' '}, + glue = { -- 表3の方には記述がないのは何故? + [1] = {0.5, 0, 0.5, ratio = 1}, + [2] = {0, 0, 0}, + [300] = {0, 0, 0}, + [301] = {0, 0, 0}, + [302] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0, 0}, + [9] = {0, 0, 0}, + [10] = {0, 0, 0}, + [11] = {0, 0, 0}, + [12] = {0, 0, 0}, + [13] = {0, 0, 0}, + [14] = {0, 0, 0}, + [15] = {0, 0, 0}, + [16] = {0, 0, 0}, + [0] = {0, 0, 0}, + [21] = {0, 0, 0}, + [22] = {0, 0, 0}, + [23] = {0, 0, 0}, + [24] = {0, 0, 0}, + [25] = {0, 0, 0}, + [26] = {0, 0, 0}, + [27] = {0, 0, 0}, + [28] = {0, 0, 0}, + [29] = {0, 0, 0},-- 注13, (空け)注4 + [30] = {0, 0, 0}, + } + }, + + [27] = {-- 欧文 + chars = {'jcharbdd'}, + glue = { + [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [3] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0.25, 0, priority = {0,0}}, + [9] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [10] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [11] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0.25, 0, priority = {0,0}},-- 空け注10 + [14] = {0, 0, 0}, + [15] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [16] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [0] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [20] = {0, 0, 0}, + [21] = {0, 0.25, 0, priority = {0,0}}, + [22] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [23] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [24] = {0, 0, 0}, + [25] = {0.25, 0, 0.125, ratio = 0, priority = {0,-1}}, + [26] = {0, 0, 0}, + [27] = {0, 0, 0}, + [28] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階 + [29] = {0, 0, 0}, + [30] = {0.25, 0.25, 0.125, ratio = 0, priority = {1,-3}},-- 空け priority = 二段階 + } + }, + + [28] = { -- 割注始め括弧類 + chars = {'(', '〔', '['}, + glue = { + [1] = {0, 0, 0}, + [2] = {0, 0, 0}, + [3] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0, 0, 0}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0, 0}, + [9] = {0, 0, 0},-- 注14 + [10] = {0, 0, 0},-- 注15 + [11] = {0, 0, 0},-- 注16 + [12] = {0, 0, 0}, + [13] = {0, 0, 0}, + [14] = {0, 0, 0}, + [15] = {0, 0, 0}, + [16] = {0, 0, 0}, + [0] = {0, 0, 0}, + [20] = {0, 0, 0}, + [21] = {0, 0, 0}, + [22] = {0, 0, 0}, + [23] = {0, 0, 0}, + [24] = {0, 0, 0}, + [25] = {0, 0, 0}, + [26] = {0, 0, 0}, -- 注13, (空け)注4 + [27] = {0, 0, 0}, + [28] = {0, 0, 0}, + [29] = {0, 0, 0}, + [30] = {0, 0, 0}, + } + }, + + [29] = { -- 割注終わり括弧類 + chars = {')', '〕', ']'}, + glue = { + [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [3] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0.25, 0, priority = {0,0}}, + [9] = {0, 0.25, 0, priority = {0,0}}, + [10] = {0, 0.25, 0, priority = {0,0}}, + [11] = {0, 0.25, 0, priority = {0,0}}, + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0.25, 0, priority = {0,0}}, + [14] = {0, 0, 0}, + [15] = {0, 0.25, 0, priority = {0,0}}, + [16] = {0, 0.25, 0, priority = {0,0}}, + [0] = {0, 0.25, 0, priority = {0,0}}, + [20] = {0, 0, 0}, + [21] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [22] = {0, 0.25, 0, priority = {0,0}}, + [23] = {0, 0.25, 0, priority = {0,0}}, + [24] = {0.25, 0.25, 0.125, ratio = 1}, priority = {1,-3},-- 空け priority = 二段階 + [25] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [26] = {0, 0, 0}, + [27] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [28] = {0, 0.25, 0, priority = {0,0}}, + [29] = {0, 0, 0}, + [30] = {0, 0.25, 0, priority = {0,0}}, + } + }, + + [30] = { -- 縦中横中の文字 + glue = { + [1] = {0.5, 0, 0.5, ratio = 1, priority = {0,-2}}, + [2] = {0, 0, 0}, + [3] = {0, 0, 0}, + [4] = {0, 0, 0}, + [5] = {0.25, 0, 0.25, ratio = 1, priority = {0,-1}}, + [6] = {0, 0, 0}, + [7] = {0, 0, 0}, + [8] = {0, 0.25, 0, priority = {0,0}}, + [9] = {0, 0.25, 0, priority = {0,0}}, + [10] = {0, 0.25, 0, priority = {0,0}}, + [11] = {0, 0.25, 0, priority = {0,0}}, + [12] = {0, 0.25, 0, priority = {0,0}}, + [13] = {0, 0.25, 0, priority = {0,0}}, + [14] = {0, 0, 0}, + [15] = {0, 0.25, 0, priority = {0,0}}, + [16] = {0, 0.25, 0, priority = {0,0}}, + [0] = {0, 0.25, 0, priority = {0,0}}, + [20] = {0, 0, 0}, + [21] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [22] = {0, 0.25, 0, priority = {0,0}}, + [23] = {0, 0.25, 0, priority = {0,0}}, + [24] = {0.25, 0.25, 0.125, ratio = 1}, priority = {1,-3},-- 空け priority = 二段階 + [25] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [26] = {0, 0, 0}, + [27] = {0.25, 0.25, 0.125, ratio = 1, priority = {1,-3}},-- 空け priority = 二段階 + [28] = {0, 0.25, 0, priority = {0,0}}, + [29] = {0, 0, 0}, + [30] = {0, 0.25, 0, priority = {0,0}}, + } + }, + ]] + + [90] = { -- 行頭 + chars = {'parbdd','boxbdd'}, + glue = { + [1] = {0, 0, 0}, -- 行頭括弧はベタ組 + }, + }, +} + +for k,v in pairs(jfm) do + if type(k) == "number" then + for kk,vv in pairs(v.glue) do + vv.kanjiskip_natural = 1 + vv.kanjiskip_stretch = 1 + end + end +end + +local function add_space(before,after,glueorkern,space,ratio) + if jfm[before][glueorkern] == nil then jfm[before][glueorkern] = {} end + if jfm[before][glueorkern][after] == nil then jfm[before][glueorkern][after] = {0} end + local origratio = jfm[before][glueorkern][after].ratio + if origratio == nil then origratio = 0.5 end + jfm[before][glueorkern][after].ratio = (jfm[before][glueorkern][after][1] * origratio + space * ratio) / (jfm[before][glueorkern][after][1] + ratio) + jfm[before][glueorkern][after][1] = jfm[before][glueorkern][after][1] + space +end + +if jlreq ~= nil then + if type(jlreq.open_bracket_pos) == "string" then + local r = jlreq.open_bracket_pos:find("_") + local danraku = jlreq.open_bracket_pos:sub(1,r - 1) + local orikaeshi = jlreq.open_bracket_pos:sub(r + 1) + + -- 折り返し行頭の開き括弧を二分下げる……つもり + if orikaeshi == "nibu" then + -- widthを二分増やし,その代わりJFMグルーを二分減らす + jfm[1].width = jfm[1].width + 0.5 + for k,v in pairs(jfm) do + if type(k) == "number" then + add_space(k,1,"glue",-0.5,1) + end + end + end + + -- 段落行頭の下げ + if danraku == "zenkakunibu" then + add_space(90,1,"glue",0.5,1) + elseif danraku == "nibu" then + add_space(90,1,"glue",-0.5,1) + end + end + + -- ぶら下げ組を有効にする. + if jlreq.burasage == true then + for _,class in ipairs({6,7}) do + table.insert(jfm[class].end_adjust,-0.5) + end + end +end + + +luatexja.jfont.define_jfm(jfm) |