summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/jlreq
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/jlreq')
-rw-r--r--Master/texmf-dist/tex/latex/jlreq/jlreq-helpers.sty40
-rw-r--r--Master/texmf-dist/tex/latex/jlreq/jlreq-trimmarks.sty329
-rw-r--r--Master/texmf-dist/tex/latex/jlreq/jlreq.cls1021
3 files changed, 835 insertions, 555 deletions
diff --git a/Master/texmf-dist/tex/latex/jlreq/jlreq-helpers.sty b/Master/texmf-dist/tex/latex/jlreq/jlreq-helpers.sty
index f08dd817098..2d4039951bb 100644
--- a/Master/texmf-dist/tex/latex/jlreq/jlreq-helpers.sty
+++ b/Master/texmf-dist/tex/latex/jlreq/jlreq-helpers.sty
@@ -246,12 +246,17 @@
% \jlreq@parsekeyval@nokey{<action>}{<parse対象>}
% action内では#1=key, #2=val
% \ifjlreq@parsekeyval@nokey@novalue{<true code>}{<false code>}でvalueがないか判定できる.
-% <parse対象>は一回だけ展開される.
-\newcommand{\jlreq@parsekeyval@nokey}[2]{%
+% *つきは<parse対象>を一回だけ展開する.
+\def\jlreq@parsekeyval@nokey{\@ifstar{\jlreq@parsekeyval@nokey@{*}}{\jlreq@parsekeyval@nokey@{}}}
+\newcommand{\jlreq@parsekeyval@nokey@}[3]{%
\begingroup
\long\def\jlreq@do{}%
- \long\def\jlreq@parsekeyval@nokey@execute##1##2{#1}%
- \expandafter\jlreq@parsekeyval@nokey@i@wuniq\expandafter\jlreq@uniqtoken#2,\jlreq@endmark,%
+ \long\def\jlreq@parsekeyval@nokey@execute##1##2{#2}%
+ \jlreq@ifempty{#1}{%
+ \jlreq@parsekeyval@nokey@i@wuniq\jlreq@uniqtoken#3,\jlreq@endmark,%
+ }{%
+ \expandafter\jlreq@parsekeyval@nokey@i@wuniq\expandafter\jlreq@uniqtoken#3,\jlreq@endmark,%
+ }%
\expandafter\endgroup
\jlreq@do
}
@@ -285,9 +290,9 @@
\long\def\jlreq@parsekeyval@nokey@removeequal#1{\jlreq@parsekeyval@nokey@removeequal@\jlreq@uniqtoken#1\jlreq@endmark}
\long\def\jlreq@parsekeyval@nokey@removeequal@#1=\jlreq@endmark{\expandafter\unexpanded\expandafter{\@gobble#1}}
-% #1の先頭のスペースを削除し,#2に入れる.ただし#1={ X}の時は" X"が入る.
+% #1の先頭のスペースを削除し,#2に入れる.
+\long\def\jlreq@helper@trim#1#2{\edef#2{\jlreq@helper@trim@i{#1}}}
\def\jlreq@do#1{% #1 = " "として後で実行
- \long\def\jlreq@helper@trim##1##2{\edef##2{\jlreq@helper@trim@i{##1}}}
\long\def\jlreq@helper@trim@i##1{%
\jlreq@iffirsttoken{##1}{#1}%
% 先頭スペースの除去.{}を外さないために\jlreq@uniqtokenを前後にいったん挟む.
@@ -370,19 +375,24 @@
}%
}
+% オレオレラベル……
+% \jlreq@reference@ref{ラベル名}{デフォルト値}
+\def\jlreq@reference@ref#1{\expandafter\ifx\csname jlreq@reference@#1\endcsname\relax\expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi{\csname jlreq@reference@#1\endcsname}}
+% \jlreq@reference@label{ラベル名}{値}
+\def\jlreq@reference@label#1#2{\protected@write\@auxout{}{\string\@newl@bel{jlreq@reference}{#1}{#2}}}%
+\def\jlreq@reference@immediate@write#1#2{\immediate\write\@auxout{\string\@newl@bel{jlreq@reference}{#1}{#2}}}%
+\def\jlreq@reference@ifexist#1{\expandafter\ifx\csname jlreq@reference@#1\endcsname\relax\expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi}
+
+% 自動生成されるラベル用の番号
+\newcount\jlreq@reference@count
+\jlreq@reference@count=0
-\RequirePackage[savepos]{zref}
-\newcount\jlreq@zref@reference@count
-\jlreq@zref@reference@count=0
% 現在のページを得る
-\zref@newprop*{jlreq@page}[0]{\number\c@page}
-\zref@addprop{main}{jlreq@page}
\newcount\jlreq@currentpage
-% \jlreq@setcurrentpageをすると,\jlreq@currentpageにこの場所のページ数が入る
\newcommand*{\jlreq@setcurrentpage}{%
- \global\advance\jlreq@zref@reference@count by 1
- \zref@labelbyprops{jlreq@currentpage.\the\jlreq@zref@reference@count}{jlreq@page}%
- \global\jlreq@currentpage=\zref@extractdefault{jlreq@currentpage.\the\jlreq@zref@reference@count}{jlreq@page}{\c@page}\relax
+ \global\advance\jlreq@reference@count by 1
+ \jlreq@reference@label{jlreq@currentpage.\the\jlreq@reference@count}{\noexpand\arabic{page}}%
+ \global\jlreq@currentpage=\jlreq@reference@ref{jlreq@currentpage.\the\jlreq@reference@count}{\the\c@page}\relax
}
% 先頭にあるマクロを展開しまくった結果の先頭を#2に入れる.
diff --git a/Master/texmf-dist/tex/latex/jlreq/jlreq-trimmarks.sty b/Master/texmf-dist/tex/latex/jlreq/jlreq-trimmarks.sty
index 19ced9a2072..6ba910a240b 100644
--- a/Master/texmf-dist/tex/latex/jlreq/jlreq-trimmarks.sty
+++ b/Master/texmf-dist/tex/latex/jlreq/jlreq-trimmarks.sty
@@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{jlreq-trimmarks}[2018/12/10 jlreq-trimmarks]
+\ProvidesPackage{jlreq-trimmarks}[2019/04/01 jlreq-trimmarks]
\RequirePackage{xkeyval,etoolbox}
\RequirePackage{jlreq-helpers}
@@ -33,6 +33,19 @@
\@ifclassloaded{jlreq}{\let\ifjlreq@trimmarks@jlreqloaded=\@firstoftwo}{\let\ifjlreq@trimmarks@jlreqloaded=\@secondoftwo}
+\def\ifjlreq@trimmarks@tate@{%
+ \if@tate\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
+}
+% \@firstoftwo when \if@tate is defined and \if@tate=\iftrue
+\def\ifjlreq@trimmarks@tate{%
+ \ifnum0\ifx\if@tate\@undefined 1\fi\ifx\if@tate\relax 1\fi>0
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\ifjlreq@trimmarks@tate@
+ \fi
+}
+
+
% dvipdfmx=f,dvips=s,dviout = o, lualatex = l
\jlreq@trimmarks@DeclareOption{dvipdfmx}{\let\jlreq@trimmarks@driver=f}
\jlreq@trimmarks@DeclareOption{dvips}{\let\jlreq@trimmarks@driver=s}
@@ -144,9 +157,32 @@
}
}
}
-\def\jlreq@trimmarks@bleed{3mm}
-\DeclareOptionX{bleed_margin}{\def\jlreq@trimmarks@bleed{#1}}
-
+\@for\jlreq@tempa:=top,bottom,gutter,fore-edge\do{%
+ \expandafter\def\csname jlreq@trimmarks@bleed@\jlreq@tempa\endcsname{3mm}
+}
+\DeclareOptionX{bleed_margin}{%
+ \begingroup
+ \def\jlreq@do{}%
+ \jlreq@parsekeyval@nokey{
+ \ifjlreq@parsekeyval@nokey@novalue{%
+ \@for\jlreq@tempa:=top,bottom,gutter,fore-edge\do{%
+ \epreto\jlreq@do{%
+ \noexpand\def\expandonce{\csname jlreq@trimmarks@bleed@\jlreq@tempa\endcsname}{##1}%
+ }%
+ }%
+ }{%
+ \ifthenelse{\equal{##1}{top} \OR \equal{##1}{bottom} \OR \equal{##1}{gutter} \OR \equal{##1}{fore-edge}}{%
+ \eappto\jlreq@do{%
+ \noexpand\def\expandonce{\csname jlreq@trimmarks@bleed@##1\endcsname}{##2}%
+ }%
+ }{%
+ \PackageError{jlreq-trimmarks}{Unknown position `##1' in bleed_margin}{\@ehc}
+ }%
+ }%
+ }{#1}%
+ \expandafter\endgroup
+ \jlreq@do
+}
\newif\ifjlreq@trimmarks@landscape \jlreq@trimmarks@landscapefalse
\jlreq@trimmarks@DeclareOption{landscape}{\jlreq@trimmarks@landscapetrue}
@@ -202,67 +238,68 @@
\fi
\fi
-\long\def\jlreq@trimmarks@setbanner#1#2{%
+\long\def\jlreq@trimmarks@setbanner#1#2#3{%
\begingroup
\def\jlreq@do{}%
\jlreq@parsekeyval@nokey{%
\ifjlreq@parsekeyval@nokey@novalue{}{%
\jlreq@switch{##1}{
- {yoko}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{yoko@#1}{##2}}}
- {horizontal}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{yoko@#1}{##2}}}
- {tate}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{tate@#1}{##2}}}
- {vertial}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{tate@#1}{##2}}}
- {corner}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{corner@#1}{##2}}}
- {in-yoko}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{inyoko@#1}{##2}}}
- {in-horizontal}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{inyoko@#1}{##2}}}
- {in-tate}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{intate@#1}{##2}}}
- {in-vertial}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{intate@#1}{##2}}}
+ {yoko}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{yoko@#1}{yoko@#2}{##2}}}
+ {horizontal}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{yoko@#1}{yoko@#2}{##2}}}
+ {tate}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{tate@#1}{tate@#2}{##2}}}
+ {vertial}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{tate@#1}{tate@#2}{##2}}}
+ {corner}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{corner@#1}{corner@#2}{##2}}}
+ {in-yoko}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{inyoko@#1}{inyoko@#2}{##2}}}
+ {in-horizontal}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{inyoko@#1}{inyoko@#2}{##2}}}
+ {in-tate}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{intate@#1}{intate@#2}{##2}}}
+ {in-vertial}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{intate@#1}{intate@#2}{##2}}}
}%
}%
- }{#2}%
+ }{#3}%
\ifx\jlreq@do\@empty
- \appto\jlreq@do{\jlreq@trimmarks@setbanner@@{yoko@#1}{#2}}%
+ \appto\jlreq@do{\jlreq@trimmarks@setbanner@@{yoko@#1}{yoko@#2}{#3}}%
\fi
\expandafter\endgroup
\jlreq@do
}
-\long\def\jlreq@trimmarks@setbanner@#1#2{%
+\long\def\jlreq@trimmarks@setbanner@#1#2#3{%
\begingroup
\def\jlreq@do{}%
\jlreq@parsekeyval@nokey{%
\ifjlreq@parsekeyval@nokey@novalue{}{%
\jlreq@switch*{##1}{
- {left}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{before@#1}{##2}}}
- {right}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{after@#1}{##2}}}
- {above}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{before@#1}{##2}}}
- {below}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{after@#1}{##2}}}
- {in}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{in@#1}{##2}}}
+ {left}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{before@#1}{before@#2}{##2}}}
+ {right}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{after@#1}{after@#2}{##2}}}
+ {above}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{before@#1}{before@#2}{##2}}}
+ {below}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{after@#1}{after@#2}{##2}}}
+ {in}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@@{in@#1}{in@#2}{##2}}}
}%
}%
- }{#2}%
+ }{#3}%
\ifx\jlreq@do\@empty
- \appto\jlreq@do{\jlreq@trimmarks@setbanner@@{before@#1}{#2}}%
+ \appto\jlreq@do{\jlreq@trimmarks@setbanner@@{before@#1}{before@#2}{#3}}%
\fi
\expandafter\endgroup
\jlreq@do
}
-\long\def\jlreq@trimmarks@setbanner@@#1#2{%
+% #1 = odd, #2 = even
+\long\def\jlreq@trimmarks@setbanner@@#1#2#3{%
\begingroup
\def\jlreq@do{}%
\jlreq@parsekeyval@nokey{%
\ifjlreq@parsekeyval@nokey@novalue{}{%
\jlreq@switch*{##1}{
{odd}{\appto\jlreq@do{\expandafter\edef\csname jlreq@trimmarks@banner@odd@#1\endcsname{\unexpanded{##2}}}}
- {even}{\appto\jlreq@do{\expandafter\edef\csname jlreq@trimmarks@banner@even@#1\endcsname{\unexpanded{##2}}}}
+ {even}{\appto\jlreq@do{\expandafter\edef\csname jlreq@trimmarks@banner@even@#2\endcsname{\unexpanded{##2}}}}
}%
}%
- }{#2}%
+ }{#3}%
\ifx\jlreq@do\@empty
\appto\jlreq@do{%
- \expandafter\edef\csname jlreq@trimmarks@banner@odd@#1\endcsname{\unexpanded{#2}}%
- \expandafter\edef\csname jlreq@trimmarks@banner@even@#1\endcsname{\unexpanded{#2}}%
+ \expandafter\edef\csname jlreq@trimmarks@banner@odd@#1\endcsname{\unexpanded{#3}}%
+ \expandafter\edef\csname jlreq@trimmarks@banner@even@#2\endcsname{\unexpanded{#3}}%
}%
\fi
\expandafter\endgroup
@@ -294,23 +331,41 @@
\jlreq@parsekeyval@nokey{%
\ifjlreq@parsekeyval@nokey@novalue{}{%
\jlreq@tempafalse
+ \edef\jlreq@gutterodd{\ifjlreq@trimmarks@tate{right}{left}}%
+ \if@twoside
+ \edef\jlreq@guttereven{\ifjlreq@trimmarks@tate{left}{right}}%
+ \else
+ \let\jlreq@guttereven\jlreq@gutterodd
+ \fi
\jlreq@switch*{####1}{
- {top-left}{\jlreq@tempatrue\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@left}{####2}}}
- {left-top}{\jlreq@tempatrue\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@left}{####2}}}
- {top-right}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@right}{####2}}}
- {right-top}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@right}{####2}}}
- {bottom-left}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@left}{####2}}}
- {left-bottom}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@left}{####2}}}
- {bottom-right}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@right}{####2}}}
- {right-bottom}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@right}{####2}}}
- {top-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{top@center}{####2}}}
- {center-top}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{top@center}{####2}}}
- {bottom-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{bottom@center}{####2}}}
- {center-bottom}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{bottom@center}{####2}}}
- {center-right}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@right}{####2}}}
- {right-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@right}{####2}}}
- {center-left}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@left}{####2}}}
- {left-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@left}{####2}}}
+ {top-left}{\jlreq@tempatrue\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@left}{top@left}{####2}}}
+ {left-top}{\jlreq@tempatrue\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@left}{top@left}{####2}}}
+ {top-right}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@right}{top@right}{####2}}}
+ {right-top}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@right}{top@right}{####2}}}
+ {top-gutter}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@\jlreq@gutterodd}{top@\jlreq@guttereven}{####2}}}
+ {gutter-top}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@\jlreq@gutterodd}{top@\jlreq@guttereven}{####2}}}
+ {top-fore-edge}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@\jlreq@guttereven}{top@\jlreq@gutterodd}{####2}}}
+ {fore-edge-top}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{top@\jlreq@guttereven}{top@\jlreq@gutterodd}{####2}}}
+ {bottom-left}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@left}{bottom@left}{####2}}}
+ {left-bottom}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@left}{bottom@left}{####2}}}
+ {bottom-right}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@right}{bottom@right}{####2}}}
+ {right-bottom}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@right}{bottom@right}{####2}}}
+ {bottom-gutter}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@\jlreq@gutterodd}{bottom@\jlreq@guttereven}{####2}}}
+ {gutter-bottom}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@\jlreq@gutterodd}{bottom@\jlreq@guttereven}{####2}}}
+ {bottom-fore-edge}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@\jlreq@guttereven}{bottom@\jlreq@gutterodd}{####2}}}
+ {fore-edge-bottom}{\appto\jlreq@do{\jlreq@trimmarks@setbanner{bottom@\jlreq@guttereven}{bottom@\jlreq@gutterodd}{####2}}}
+ {top-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{top@center}{top@center}{####2}}}
+ {center-top}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{top@center}{top@center}{####2}}}
+ {bottom-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{bottom@center}{bottom@center}{####2}}}
+ {center-bottom}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{bottom@center}{bottom@center}{####2}}}
+ {center-right}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@right}{center@right}{####2}}}
+ {right-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@right}{center@right}{####2}}}
+ {center-left}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@left}{center@left}{####2}}}
+ {left-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@left}{center@left}{####2}}}
+ {center-gutter}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@\jlreq@gutterodd}{center@\jlreq@guttereven}{####2}}}
+ {gutter-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@\jlreq@gutterodd}{center@\jlreq@guttereven}{####2}}}
+ {center-fore-edge}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@\jlreq@guttereven}{center@\jlreq@gutterodd}{####2}}}
+ {fore-edge-center}{\appto\jlreq@do{\jlreq@trimmarks@setbanner@{center@\jlreq@guttereven}{center@\jlreq@gutterodd}{####2}}}
}%
\ifjlreq@tempa
\appto\jlreq@do{\expandafter\@bannertoken\expandafter{\jlreq@trimmarks@banner@odd@yoko@top@left}}%
@@ -437,18 +492,29 @@
\fi
\fi
}
+\def\jlreq@trimmarks@bleed{3mm}
+% left=gutter?
+\def\ifjlreq@trimmarks@leftisgutter{%
+ \ifjlreq@trimmarks@tate{%
+ \ifnum 0\ifodd\c@page 1\fi\if@twoside\else 1\fi>0 \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi
+ }{%
+ \ifnum 0\ifodd\c@page 1\fi\if@twoside\else 1\fi>0 \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
+ }%
+}
+\def\jlreq@trimmarks@bleed@left{\ifjlreq@trimmarks@leftisgutter{\jlreq@trimmarks@bleed@gutter}{\expandafter\csname jlreq@trimmarks@bleed@fore-edge\endcsname}}
+\def\jlreq@trimmarks@bleed@right{\ifjlreq@trimmarks@leftisgutter{\expandafter\csname jlreq@trimmarks@bleed@fore-edge\endcsname}{\jlreq@trimmarks@bleed@gutter}}
\def\jlreq@trimmarks@outputtombow{%
\vbox to\z@{%
- \kern-\dimexpr 10mm + \jlreq@trimmarks@bleed\relax
+ \kern-\dimexpr 10mm + \jlreq@trimmarks@bleed@top\relax
\boxmaxdepth\maxdimen
- \moveleft\jlreq@trimmarks@bleed\vbox to\@@paperheight{%
+ \moveleft\jlreq@trimmarks@bleed@left\vbox to\@@paperheight{%
\color@begingroup\jlreq@trimmarks@color
\hbox to\@@paperwidth{%
- \hskip\jlreq@trimmarks@bleed\relax
+ \hskip\jlreq@trimmarks@bleed@left\relax
\setbox\jlreq@tempboxa=\hbox to\z@{% \@TL
\yoko\hss
- \vrule width\dimexpr 10mm + \jlreq@trimmarks@bleed\relax height\@tombowwidth depth\z@
+ \vrule width\dimexpr 10mm + \jlreq@trimmarks@bleed@left\relax height\@tombowwidth depth\z@
\vrule height10mm width\@tombowwidth depth\z@
\iftombowdate
\setbox\jlreq@tempboxa=\hbox to\z@{\hskip5mm\@bannerfont\jlreq@trimmarks@bannerfont
@@ -459,7 +525,7 @@
\fi
\jlreq@trimmarks@outputbanner{inyoko@top@left}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\@bannerfont\jlreq@trimmarks@bannerfont##1\hss}%
- \jlreq@tempdima=\dimexpr\ht\jlreq@tempboxa + \jlreq@trimmarks@bleed\relax
+ \jlreq@tempdima=\dimexpr\ht\jlreq@tempboxa + \jlreq@trimmarks@bleed@top\relax
\ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt
\raise-\jlreq@tempdima\box\jlreq@tempboxa
}%
@@ -477,7 +543,7 @@
}%
\jlreq@trimmarks@outputbanner{in@top@center}{%
\setbox\jlreq@tempboxa=\hbox{\@bannerfont\jlreq@trimmarks@bannerfont##1}%
- \jlreq@tempdima=\dimexpr\ht\jlreq@tempboxa + \jlreq@trimmarks@bleed\relax
+ \jlreq@tempdima=\dimexpr\ht\jlreq@tempboxa + \jlreq@trimmarks@bleed@top\relax
\jlreq@tempdimb=0.5\wd\jlreq@tempboxa
\ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt
\kern-\jlreq@tempdimb\raise-\jlreq@tempdima\box\jlreq@tempboxa\kern\jlreq@tempdimb
@@ -502,21 +568,21 @@
}%
\jlreq@trimmarks@outputbanner{inyoko@top@right}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\yoko\hss\@bannerfont\jlreq@trimmarks@bannerfont##1}%
- \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \ht\jlreq@tempboxa\relax
+ \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@top + \ht\jlreq@tempboxa\relax
\ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt
\raise-\jlreq@tempdima\box\jlreq@tempboxa
}%
\vrule height10mm width\@tombowwidth depth\z@
\jlreq@trimmarks@outputbanner{corner@top@right}{%
- \setbox\jlreq@tempboxa=\hbox to 0pt{\hskip\dimexpr\jlreq@trimmarks@bleed + 4pt\relax\@bannerfont\jlreq@trimmarks@bannerfont##1\hss}%
+ \setbox\jlreq@tempboxa=\hbox to 0pt{\hskip\dimexpr\jlreq@trimmarks@bleed@right + 4pt\relax\@bannerfont\jlreq@trimmarks@bannerfont##1\hss}%
\ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt
\raise 4pt\box\jlreq@tempboxa
}%
- \vrule width\dimexpr 10mm + \jlreq@trimmarks@bleed\relax height\@tombowwidth depth\z@\hss
+ \vrule width\dimexpr 10mm + \jlreq@trimmarks@bleed@right\relax height\@tombowwidth depth\z@\hss
}%
\dp\jlreq@tempboxa=0pt
\box\jlreq@tempboxa
- \hskip\jlreq@trimmarks@bleed
+ \hskip\jlreq@trimmarks@bleed@right
}%
\kern-10mm
\hbox to\@@paperwidth{%
@@ -526,9 +592,9 @@
\jlreq@trimmarks@outputbanner{corner@top@left}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\hss\@bannerfont\jlreq@trimmarks@bannerfont##1\hskip 4pt}%
\dp\jlreq@tempboxa=0pt \ht\jlreq@tempboxa=0pt
- \raise\dimexpr \jlreq@trimmarks@bleed + 4pt\relax\box\jlreq@tempboxa
+ \raise\dimexpr \jlreq@trimmarks@bleed@top + 4pt\relax\box\jlreq@tempboxa
}%
- \vrule height\dimexpr 10mm + \jlreq@trimmarks@bleed\relax width\@tombowwidth depth\z@
+ \vrule height\dimexpr 10mm + \jlreq@trimmarks@bleed@top\relax width\@tombowwidth depth\z@
\jlreq@trimmarks@outputbanner{tate@top@left}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\tate\adjustbaseline\@bannerfont\jlreq@trimmarks@bannerfont##1\hss}%
\ifx l\jlreq@trimmarks@engine
@@ -541,7 +607,7 @@
}%
\jlreq@trimmarks@outputbanner{intate@top@left}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\tate\adjustbaseline\@bannerfont\jlreq@trimmarks@bannerfont##1\hss}%
- \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed \ifx l\jlreq@trimmarks@engine + \ht\jlreq@tempboxa\fi\relax
+ \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@left \ifx l\jlreq@trimmarks@engine + \ht\jlreq@tempboxa\fi\relax
\wd\jlreq@tempboxa=0pt \ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt
\kern\jlreq@tempdima\box\jlreq@tempboxa\kern-\jlreq@tempdima
}%
@@ -558,14 +624,14 @@
\jlreq@trimmarks@outputbanner{intate@top@right}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\tate\adjustbaseline\@bannerfont\jlreq@trimmarks@bannerfont##1\hss}%
\ifx l\jlreq@trimmarks@engine
- \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \ht\jlreq@tempboxa\relax
+ \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@top + \ht\jlreq@tempboxa\relax
\else
- \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \wd\jlreq@tempboxa\relax
+ \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@top + \wd\jlreq@tempboxa\relax
\fi
\ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt
\kern-\jlreq@tempdima\box\jlreq@tempboxa\kern\jlreq@tempdima
}%
- \vrule height\dimexpr 10mm + \jlreq@trimmarks@bleed\relax width\@tombowwidth depth\z@
+ \vrule height\dimexpr 10mm + \jlreq@trimmarks@bleed@top\relax width\@tombowwidth depth\z@
\vrule width10mm height\@tombowwidth depth\z@
\hss
}%
@@ -599,10 +665,10 @@
\jlreq@trimmarks@outputbanner{in@center@left}{%
\setbox\jlreq@tempboxa=\hbox{\tate\adjustbaseline\@bannerfont\jlreq@trimmarks@bannerfont##1}%
\ifx l\jlreq@trimmarks@engine
- \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \ht\jlreq@tempboxa\relax
+ \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@left + \ht\jlreq@tempboxa\relax
\jlreq@tempdimb=.5\wd\jlreq@tempboxa
\else
- \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed\relax
+ \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@left\relax
\jlreq@tempdimb=.5\dimexpr\ht\jlreq@tempboxa + \dp\jlreq@tempboxa\relax
\fi
\dp\jlreq@tempboxa=0pt \ht\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt
@@ -615,10 +681,10 @@
\jlreq@trimmarks@outputbanner{in@center@right}{%
\setbox\jlreq@tempboxa=\hbox{\tate\adjustbaseline\@bannerfont\jlreq@trimmarks@bannerfont##1}%
\ifx l\jlreq@trimmarks@engine
- \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \ht\jlreq@tempboxa\relax
+ \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@right + \ht\jlreq@tempboxa\relax
\jlreq@tempdimb=0.5\wd\jlreq@tempboxa
\else
- \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \wd\jlreq@tempboxa\relax
+ \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@right + \wd\jlreq@tempboxa\relax
\jlreq@tempdimb=0.5\dimexpr\ht\jlreq@tempboxa + \dp\jlreq@tempboxa\relax
\fi
\dp\jlreq@tempboxa=0pt \ht\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt
@@ -645,7 +711,7 @@
\hbox to\z@{% \@Bl
\yoko\hss
\vrule width10mm depth\@tombowwidth height\z@
- \vrule depth\dimexpr 10mm + \jlreq@trimmarks@bleed\relax width\@tombowwidth height\z@
+ \vrule depth\dimexpr 10mm + \jlreq@trimmarks@bleed@bottom\relax width\@tombowwidth height\z@
\jlreq@trimmarks@outputbanner{tate@bottom@left}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\tate\adjustbaseline\hss\@bannerfont\jlreq@trimmarks@bannerfont##1}%
\ifx l\jlreq@trimmarks@engine
@@ -658,7 +724,7 @@
}%
\jlreq@trimmarks@outputbanner{intate@bottom@left}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\tate\adjustbaseline\hss\@bannerfont\jlreq@trimmarks@bannerfont##1}%
- \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed \ifx l\jlreq@trimmarks@engine + \ht\jlreq@tempboxa\fi\relax
+ \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@left \ifx l\jlreq@trimmarks@engine + \ht\jlreq@tempboxa\fi\relax
\wd\jlreq@tempboxa=0pt \ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt
\kern\jlreq@tempdima\box\jlreq@tempboxa\kern-\jlreq@tempdima
}%
@@ -675,17 +741,17 @@
\jlreq@trimmarks@outputbanner{intate@bottom@right}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\tate\adjustbaseline\hss\@bannerfont\jlreq@trimmarks@bannerfont##1}%
\ifx l\jlreq@trimmarks@engine
- \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \ht\jlreq@tempboxa\relax
+ \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@right + \ht\jlreq@tempboxa\relax
\else
- \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \wd\jlreq@tempboxa\relax
+ \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@right + \wd\jlreq@tempboxa\relax
\fi
\ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt
\kern-\jlreq@tempdima\box\jlreq@tempboxa\kern\jlreq@tempdima
}%
- \vrule depth\dimexpr 10mm + \jlreq@trimmarks@bleed\relax width\@tombowwidth height\z@
+ \vrule depth\dimexpr 10mm + \jlreq@trimmarks@bleed@bottom\relax width\@tombowwidth height\z@
\jlreq@trimmarks@outputbanner{corner@bottom@right}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\hskip 4pt\relax\@bannerfont\jlreq@trimmarks@bannerfont##1\hss}%
- \jlreq@tempdima=\dimexpr\ht\jlreq@tempboxa + \jlreq@trimmarks@bleed + 4pt\relax
+ \jlreq@tempdima=\dimexpr\ht\jlreq@tempboxa + \jlreq@trimmarks@bleed@bottom + 4pt\relax
\ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt
\raise-\jlreq@tempdima\box\jlreq@tempboxa
}%
@@ -694,12 +760,12 @@
}%
\kern-10mm
\hbox to\@@paperwidth{%
- \hskip\jlreq@trimmarks@bleed\relax
+ \hskip\jlreq@trimmarks@bleed@left\relax
\setbox\jlreq@tempboxa=\hbox to\z@{% \@BL
\yoko\hss
- \vrule width\dimexpr 10mm + \jlreq@trimmarks@bleed\relax depth\@tombowwidth height\z@
+ \vrule width\dimexpr 10mm + \jlreq@trimmarks@bleed@left\relax depth\@tombowwidth height\z@
\jlreq@trimmarks@outputbanner{corner@bottom@left}{%
- \setbox\jlreq@tempboxa=\hbox to 0pt{\hss\@bannerfont\jlreq@trimmarks@bannerfont##1\hskip\dimexpr\jlreq@trimmarks@bleed + 4pt\relax}%
+ \setbox\jlreq@tempboxa=\hbox to 0pt{\hss\@bannerfont\jlreq@trimmarks@bannerfont##1\hskip\dimexpr\jlreq@trimmarks@bleed@left + 4pt\relax}%
\jlreq@tempdima=\dimexpr\ht\jlreq@tempboxa + 4pt\relax
\ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt
\raise-\jlreq@tempdima\box\jlreq@tempboxa
@@ -713,7 +779,7 @@
}%
\jlreq@trimmarks@outputbanner{inyoko@bottom@left}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\yoko\@bannerfont\jlreq@trimmarks@bannerfont##1\hss}%
- \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed + \dp\jlreq@tempboxa\relax
+ \jlreq@tempdima=\dimexpr\jlreq@trimmarks@bleed@bottom + \dp\jlreq@tempboxa\relax
\ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt
\raise\jlreq@tempdima\box\jlreq@tempboxa
}%
@@ -732,7 +798,7 @@
}%
\jlreq@trimmarks@outputbanner{in@bottom@center}{%
\setbox\jlreq@tempboxa=\hbox{\@bannerfont\jlreq@trimmarks@bannerfont##1}%
- \jlreq@tempdima=\dimexpr\dp\jlreq@tempboxa + \jlreq@trimmarks@bleed\relax
+ \jlreq@tempdima=\dimexpr\dp\jlreq@tempboxa + \jlreq@trimmarks@bleed@bottom\relax
\jlreq@tempdimb=.5\wd\jlreq@tempboxa
\ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt \wd\jlreq@tempboxa=0pt
\kern-\jlreq@tempdimb\raise\jlreq@tempdima\box\jlreq@tempboxa\kern\jlreq@tempdimb
@@ -759,24 +825,24 @@
}%
\jlreq@trimmarks@outputbanner{inyoko@bottom@right}{%
\setbox\jlreq@tempboxa=\hbox to 0pt{\yoko\hss\@bannerfont\jlreq@trimmarks@bannerfont##1}%
- \jlreq@tempdima=\dimexpr\dp\jlreq@tempboxa + \jlreq@trimmarks@bleed\relax
+ \jlreq@tempdima=\dimexpr\dp\jlreq@tempboxa + \jlreq@trimmarks@bleed@bottom\relax
\ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt
\raise\jlreq@tempdima\box\jlreq@tempboxa
}%
\vrule depth10mm width\@tombowwidth height\z@
- \vrule width\dimexpr 10mm + \jlreq@trimmarks@bleed\relax depth\@tombowwidth height\z@\hss
+ \vrule width\dimexpr 10mm + \jlreq@trimmarks@bleed@right\relax depth\@tombowwidth height\z@\hss
}%
\ht\jlreq@tempboxa=0pt \dp\jlreq@tempboxa=0pt
\box\jlreq@tempboxa
- \hskip\jlreq@trimmarks@bleed
+ \hskip\jlreq@trimmarks@bleed@right
}%
\color@endgroup}\vss
}%
}
\def\@outputtombow{%
% 6mm = \@tombowbleed: from plcore
- \@@paperwidth=\dimexpr\@@paperwidth - 6mm + 2\dimexpr\jlreq@trimmarks@bleed\relax\relax
- \@@paperheight=\dimexpr\@@paperheight - 6mm + 2\dimexpr\jlreq@trimmarks@bleed\relax\relax
+ \@@paperwidth=\dimexpr\@@paperwidth - 6mm + \dimexpr\jlreq@trimmarks@bleed@left + \jlreq@trimmarks@bleed@right\relax\relax
+ \@@paperheight=\dimexpr\@@paperheight - 6mm + \dimexpr\jlreq@trimmarks@bleed@top + \jlreq@trimmarks@bleed@bottom\relax\relax
\ifjlreq@trimmarks@show\expandafter\jlreq@trimmarks@outputtombow\fi
}
@@ -796,39 +862,92 @@
\jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperheight + \paperheight)/2}%
]
}
- \edef\jlreq@trimmarks@bleedboxsize{%
+ \jlreq@tempcnta=\c@page
+ \def\@tempa{%
[%
- \jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperwidth - \paperwidth)/2 - \jlreq@trimmarks@bleed}
- \jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperheight - \paperheight)/2 - \jlreq@trimmarks@bleed}
- \jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperwidth + \paperwidth)/2 + \jlreq@trimmarks@bleed}
- \jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperheight + \paperheight)/2 + \jlreq@trimmarks@bleed}%
+ \jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperwidth - \paperwidth)/2 - \jlreq@trimmarks@bleed@left}
+ \jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperheight - \paperheight)/2 - \jlreq@trimmarks@bleed@bottom}
+ \jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperwidth + \paperwidth)/2 + \jlreq@trimmarks@bleed@right}
+ \jlreq@trimmarks@pttobp{(\jlreq@trimmarks@paperheight + \paperheight)/2 + \jlreq@trimmarks@bleed@top}%
]
}
- \edef\jlreq@trimmarks@pdfattribute{%
+ \c@page=1
+ \edef\jlreq@trimmarks@bleedboxsize@odd{\@tempa}
+ \c@page=2
+ \edef\jlreq@trimmarks@bleedboxsize@even{\@tempa}%
+ \c@page=\jlreq@tempcnta
+ \edef\jlreq@trimmarks@pdfattribute@odd{%
+ /TrimBox \jlreq@trimmarks@trimboxsize
+ \ifjlreq@trimmarks@show@artbox /ArtBox \jlreq@trimmarks@trimboxsize\fi
+ /BleedBox \jlreq@trimmarks@bleedboxsize@odd
+ }
+ \edef\jlreq@trimmarks@pdfattribute@even{%
/TrimBox \jlreq@trimmarks@trimboxsize
\ifjlreq@trimmarks@show@artbox /ArtBox \jlreq@trimmarks@trimboxsize\fi
- /BleedBox \jlreq@trimmarks@bleedboxsize
+ /BleedBox \jlreq@trimmarks@bleedboxsize@even
}
\jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@pttobp}
\jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@trimboxsize}
- \jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@bleedboxsize}
- \jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@pdfattribute}
+ \jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@bleedboxsize@odd}
+ \jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@bleedboxsize@even}
+ \jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@pdfattribute@odd}
+ \jlreq@trimmarks@afterpkg@addtodeletecs{\jlreq@trimmarks@pdfattribute@even}
- \ifx l\jlreq@trimmarks@driver
- \edef\@tempa{\noexpand\pdfvariable pageattr{\jlreq@trimmarks@pdfattribute}}
- \@tempa
- \fi
- \ifx f\jlreq@trimmarks@driver
- \edef\@outputtombow{\noexpand\special{pdf: put @thispage <<\jlreq@trimmarks@pdfattribute>>}\expandonce{\@outputtombow}}
- \fi
- \ifx s\jlreq@trimmarks@driver
- \edef\@tempa{\noexpand\special{ps:SDict begin
- [ /TrimBox \jlreq@trimmarks@trimboxsize /PAGE pdfmark
- \ifjlreq@trimmarks@show@artbox [ /ArtBox \jlreq@trimmarks@trimboxsize /PAGE pdfmark \fi
- [ /BleedBox \jlreq@trimmarks@bleedboxsize /PAGE pdfmark
- end}}%
- \@tempa
- \fi
+ \begingroup
+ \c@page=1
+ \jlreq@tempdima=\jlreq@trimmarks@bleed@left
+ \c@page=2
+ \ifdim\jlreq@trimmarks@bleed@left=\jlreq@tempdima
+ \global\let\jlreq@tempa\@firstoftwo
+ \else
+ \global\let\jlreq@tempa\@secondoftwo
+ \fi
+ \endgroup
+ \jlreq@tempa{
+ % no difference between odd pages and even pages
+ \ifx l\jlreq@trimmarks@driver
+ \edef\@tempa{\noexpand\pdfvariable pageattr{\jlreq@trimmarks@pdfattribute@odd}}
+ \@tempa
+ \fi
+ \ifx f\jlreq@trimmarks@driver
+ \epreto\@outputtombow{\noexpand\special{pdf: put @thispage <<\jlreq@trimmarks@pdfattribute@odd>>}}
+ \fi
+ \ifx s\jlreq@trimmarks@driver
+ \edef\@tempa{\noexpand\special{ps:SDict begin
+ [ /TrimBox \jlreq@trimmarks@trimboxsize /PAGE pdfmark
+ \ifjlreq@trimmarks@show@artbox [ /ArtBox \jlreq@trimmarks@trimboxsize /PAGE pdfmark \fi
+ [ /BleedBox \jlreq@trimmarks@bleedboxsize@odd /PAGE pdfmark
+ end}}%
+ \@tempa
+ \fi
+ }{
+ \ifx l\jlreq@trimmarks@driver
+ % in \@outputtombow, it's too late
+ \epreto\@outputpage{%
+ \unexpanded{\ifodd\c@page\pdfvariable} pageattr{\jlreq@trimmarks@pdfattribute@odd}%
+ \unexpanded{\else\pdfvariable} pageattr{\jlreq@trimmarks@pdfattribute@even}\noexpand\fi
+ }
+ \fi
+ \ifx f\jlreq@trimmarks@driver
+ \epreto\@outputtombow{%
+ \unexpanded{\ifodd\c@page\special}{pdf: put @thispage <<\jlreq@trimmarks@pdfattribute@odd>>}%
+ \unexpanded{\else\special}{pdf: put @thispage <<\jlreq@trimmarks@pdfattribute@even>>}\noexpand\fi
+ }
+ \fi
+ \ifx s\jlreq@trimmarks@driver
+ \epreto\@outputtombow{%
+ \unexpanded{\ifodd\c@page\special}{ps:SDict begin
+ [ /TrimBox \jlreq@trimmarks@trimboxsize /PAGE pdfmark
+ \ifjlreq@trimmarks@show@artbox [ /ArtBox \jlreq@trimmarks@trimboxsize /PAGE pdfmark \fi
+ [ /BleedBox \jlreq@trimmarks@bleedboxsize@odd /PAGE pdfmark
+ end}\unexpanded{\else\special}{ps:SDict begin
+ [ /TrimBox \jlreq@trimmarks@trimboxsize /PAGE pdfmark
+ \ifjlreq@trimmarks@show@artbox [ /ArtBox \jlreq@trimmarks@trimboxsize /PAGE pdfmark \fi
+ [ /BleedBox \jlreq@trimmarks@bleedboxsize@even /PAGE pdfmark
+ end}\noexpand\fi
+ }
+ \fi
+ }
\fi
% always true
diff --git a/Master/texmf-dist/tex/latex/jlreq/jlreq.cls b/Master/texmf-dist/tex/latex/jlreq/jlreq.cls
index e4084da4c1b..44f29847a8d 100644
--- a/Master/texmf-dist/tex/latex/jlreq/jlreq.cls
+++ b/Master/texmf-dist/tex/latex/jlreq/jlreq.cls
@@ -5,7 +5,7 @@
%%
% (based on JLReq 20120403 https://www.w3.org/TR/2012/NOTE-jlreq-20120403/ja/)
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{jlreq}[2019/01/15 jlreq]
+\ProvidesClass{jlreq}[2019/04/01 jlreq]
\RequirePackage{xkeyval,everyhook,filehook,etoolbox,ifthen}
\RequirePackage{jlreq-helpers}
@@ -188,7 +188,7 @@
%.. 小口
\newcommand*{\jlreq@option@fore@edge}{}
\jlreq@aftercls@addtodeletecs{\jlreq@option@fore@edge}
-\DeclareOptionX{fore_edge}{\renewcommand*{\jlreq@option@fore@edge}{#1}}
+\DeclareOptionX{fore_edge}{\renewcommand*{\jlreq@option@fore@edge}{#1}}% 昔にこっちにしていたので残している
\DeclareOptionX{fore-edge}{\renewcommand*{\jlreq@option@fore@edge}{#1}}
%.. 柱とノンブル
@@ -226,12 +226,19 @@
\jlreq@aftercls@addtodeletecs{\jlreq@option@sidenote@length}
\DeclareOptionX{sidenote_length}{\renewcommand*{\jlreq@option@sidenote@length}{#1}}
+%.. 逆ノンブル
+\newif\ifjlreq@option@use@reverse@pagination
+\jlreq@aftercls@addtodeleteif{\ifjlreq@option@use@reverse@pagination}
+\jlreq@option@use@reverse@paginationfalse
+\jlreq@DeclareOption{use_reverse_pagination}{\jlreq@option@use@reverse@paginationtrue}
+
%.. もろもろ
\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
+\newif\ifjlreq@option@titlepage \jlreq@option@titlepagefalse % titlepageかnotitlepageかが指定された
+\jlreq@aftercls@addtodeleteif{\ifjlreq@option@titlepage}
\jlreq@DeclareOption{landscape}{\@landscapetrue}
\jlreq@DeclareOption{tombo}{\ClassWarningNoLine{jlreq}{The option `tombo' is not supported by jlreq class. Please use the jlreq-trimmarks package}}
\jlreq@DeclareOption{tombow}{\ClassWarningNoLine{jlreq}{The option `tombow' is not supported by jlreq class. Please use the jlreq-trimmarks package}}
@@ -418,7 +425,7 @@
% https://ja.osdn.net/projects/luatex-ja/ticket/36489
\newcommand*{\jlreq@calc@current@linewidth@onecolumn}{%
\dimexpr
- \zposx{jlreq@rest@width.pos.\the\jlreq@zref@reference@count} sp - \@totalleftmargin -
+ \jlreq@reference@ref{jlreq@rest@width.pos.X.\the\jlreq@reference@count}{0} sp - \@totalleftmargin -
\ifodd\jlreq@currentpage
\oddsidemargin
\else
@@ -439,7 +446,7 @@
\newcommand*{\jlreq@calc@current@linewidth@onecolumn}{%
\dimexpr
\jlreq@ifydir{%
- \zposx{jlreq@rest@width.pos.\the\jlreq@zref@reference@count} sp - \hoffset
+ \jlreq@reference@ref{jlreq@rest@width.pos.X.\the\jlreq@reference@count}{0} sp - \hoffset
\ifodd\jlreq@currentpage
- \oddsidemargin
\else
@@ -452,7 +459,7 @@
\pdfpageheight
\fi
- \topmargin - \headheight - \headsep - \voffset
- - \zposy{jlreq@rest@width.pos.\the\jlreq@zref@reference@count} sp
+ - \jlreq@reference@ref{jlreq@rest@width.pos.Y.\the\jlreq@reference@count}{0} sp
}%
\jlreq@tombow@adjust
- \@totalleftmargin - 1in
@@ -473,13 +480,29 @@
\newdimen\jlreq@rest@linewidth
% この命令以降,次にこの命令を実行する前まで\jlreq@current@linewidth/\jlreq@rest@linewidthで
% この行の行頭からの長さ/残りの長さが取得できる
-\newcommand*{\jlreq@savepos@for@rest@linewidth}{%
+\jlreq@ifprimitive{\pdfsavepos}{\jlreq@tempatrue}{\jlreq@tempafalse}
+\edef\jlreq@savepos@for@rest@linewidth{\unexpanded{%
\jlreq@setcurrentpage
- \global\advance\jlreq@zref@reference@count by 1\relax
- \zsavepos{jlreq@rest@width.pos.\the\jlreq@zref@reference@count}%
+ \global\advance\jlreq@reference@count by 1
+ }%
+ \ifjlreq@tempa
+ \unexpanded{%
+ \pdfsavepos
+ \jlreq@reference@label{jlreq@rest@width.pos.X.\the\jlreq@reference@count}{\noexpand\the\noexpand\pdflastxpos}%
+ \jlreq@reference@label{jlreq@rest@width.pos.Y.\the\jlreq@reference@count}{\noexpand\the\noexpand\pdflastypos}%
+ }%
+ \else
+ \unexpanded{%
+ \savepos
+ \jlreq@reference@label{jlreq@rest@width.pos.X.\the\jlreq@reference@count}{\noexpand\the\noexpand\lastxpos}%
+ \jlreq@reference@label{jlreq@rest@width.pos.Y.\the\jlreq@reference@count}{\noexpand\the\noexpand\lastypos}%
+ }%
+ \fi
+ \unexpanded{%
\global\jlreq@current@linewidth=\jlreq@calc@current@linewidth
\global\jlreq@rest@linewidth=\dimexpr\linewidth - \jlreq@current@linewidth\relax
- \edef\jlreq@savepos@iflabelundefined{\noexpand\zref@ifrefundefined{jlreq@rest@width.pos.\the\jlreq@zref@reference@count}}%
+ \edef\jlreq@savepos@iflabelundefined{\jlreq@reference@ifexist{jlreq@rest@width.pos.X.\the\jlreq@reference@count}{\noexpand\@secondoftwo}{\noexpand\@firstoftwo}}%
+ }%
}
\ifx l\jlreq@engine
@@ -848,6 +871,8 @@
\def\@ptsize{0}
% JFMに関連する設定
\ifx l\jlreq@engine
+ \def\ltj@stdyokojfm{jlreq}
+ \def\ltj@stdtatejfm{jlreqv}
% この値は後でjfm-jlreq内で読む
\directlua{jlreq.open_bracket_pos = [[\jlreq@open@bracket@pos]]}
\ifjlreq@burasage\directlua{jlreq.burasage = true}\else\directlua{jlreq.burasage = false}\fi
@@ -1241,7 +1266,7 @@
\else\def\jlreq@option@headfoot@verticalpos{2zw}\fi
\fi
\setlength{\headsep}{\jlreq@speciallength{\jlreq@option@headfoot@verticalpos}}
-\ifdim\headsep<1\zw\relax\jlreq@note{基本版面との上下方向の最低の空き量を,基本版面の文字サイズの全角アキとする (26.1.a).}\fi
+\if@tate\ifdim\headsep<1\zw\relax\jlreq@note{基本版面との上下方向の最低の空き量を,基本版面の文字サイズの全角アキとする (26.1.a).}\fi\fi
\if@tate
\if@twocolumn
\addtolength{\headsep}{\dimexpr\marginparwidth + \marginparsep\relax}
@@ -1468,6 +1493,14 @@
% \maxdepth + \topskip = フォントサイズ×1.5(だってさ)
\setlength{\maxdepth}{\dimexpr1.5\zw - \topskip\relax}
+%. システム設定
+%.. 逆ノンブル
+\ifjlreq@option@use@reverse@pagination
+ \AtEndDocument{\clearpage\jlreq@reference@immediate@write{lastpage}{\noexpand\arabic{page}}}%
+ \def\c@jlreqreversepage{\numexpr\jlreq@reference@ref{lastpage}{0} - \c@page + 1\relax}
+ \def\thejlreqreversepage{\arabic{jlreqreversepage}}
+\fi
+
%. 見出し関係 (4.1)
% \clear***page
\newcommand*{\cleartooddpage}[1][]{%
@@ -1550,6 +1583,7 @@
}%
}{}%
}
+
%.. 中/半扉見出し
% addcontentslineに渡すやつ:番号出すのと出さないの
\newcommand{\DeclareTobiraHeading}[3]{%
@@ -1596,23 +1630,23 @@
\unexpanded{\refstepcounter{#1}}%
\noexpand\fi
\fi
- \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}{\ifjlreq@number\else -\fi}{\expandonce{\jlreq@label@format}}{####1}%
\unexpanded{\jlreq@ifempty{##2}%
{\long\gdef\jlreqHeadingText####1{}}%
{\long\gdef\jlreqHeadingText####1{####1}}%
}%
\ifjlreq@number
- \unexpanded{\ifnum#2>\c@secnumdepth\relax}%
+ \unexpanded{\ifnum#2>\c@secnumdepth\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}{%
\unexpanded{\long\gdef\jlreqHeadingLabel####1{}}%
\expandonce{\jlreq@format{}{##1}}%
- \noexpand\else
+ }{%
\unexpanded{\long\gdef\jlreqHeadingLabel####1{####1}}%
\expandafter\expandonce\expandafter{\jlreq@formatwlabel{##2}}%
- \noexpand\fi
+ }%
\else
\unexpanded{\long\gdef\jlreqHeadingLabel####1{}}%
\expandonce{\jlreq@format{}{##1}}%
\fi
+ \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}{\ifjlreq@number\else -\fi}{\expandonce{\jlreq@label@format}}{####1}%
\noexpand\@afterheading
\expandonce{\jlreq@heading@clearpage}%
\unexpanded{\if@restonecol\twocolumn\fi}%
@@ -1682,7 +1716,6 @@
% {1 = 命令}{2 = レベル}{3 = スペース関連}{4 = *}{5 = running head}{6 = 見出し}[7 = 副題]
\long\def\jlreq@BlockHeading@start@@@#1#2#3#4#5#6[#7]{%
-
\edef\jlreq@do{\unexpanded{\jlreq@BlockHeading@start@@@@{#1}{#2}{#3}}{\expandonce{\jlreq@BlockHeading@start@totalformat}}}%
\jlreq@do{#4}{#5}{#6}{#7}%
}
@@ -1702,13 +1735,20 @@
\expandafter\xdef\csname jlreq@BlockHeading@spaces@current@space@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
\expandonce{\jlreq@tempb}%
}%
- \expandafter\xdef\csname jlreq@BlockHeading@spaces@current@format@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
- \unexpanded{#4}%
- }%
+ \def\@tempa##1##2##3{##1}%
\expandafter\xdef\csname jlreq@BlockHeading@spaces@current@before@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
+ \expandonce{\@tempa#4}%
\expandonce{\jlreq@resulta}%
}%
- \expandafter\xdef\csname jlreq@BlockHeading@spaces@current@after@\the\jlreq@BlockHeading@spaces@current@count\endcsname{}%
+ \def\@tempa##1##2##3{##2}%
+ \expandafter\xdef\csname jlreq@BlockHeading@spaces@current@format@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
+ \expandonce{\@tempa#4}%
+ }%
+ \def\@tempa##1##2##3{##3}%
+ \expandafter\xdef\csname jlreq@BlockHeading@spaces@current@after@\the\jlreq@BlockHeading@spaces@current@count\endcsname{%
+ \expandonce{\jlreq@resultc}%
+ \expandonce{\@tempa#4}%
+ }%
\ifx\jlreq@BlockHeading@spaces@headingslist\@empty
\expandafter\jlreq@BlockHeading@spaces@outputwospace
\expandafter\ignorespaces
@@ -1773,7 +1813,7 @@
% 特別扱いしたいマクロを並べる
\def\jlreq@BlockHeading@HeadingSpaces@ignoretokens{\label}
-% \jlreq@resultaにaux吐き出しとかを入れて,\jlreq@resultbに出力を入れる(縦方向調整なし)
+% \jlreq@resulta -> before, \jlreq@resultb -> 本体,\jlreq@resultc -> after
% {1 = 命令}{2 = レベル}{3 = スペース関連(横方向のみ)}{4 = フォーマット群}{5 = まとめたフォーマット群}{6 = *}{7 = running head}{8 = 見出し}{9 = 副題}
\long\def\jlreq@BlockHeading@start@makeoutput#1#2#3#4#5#6#7#8#9{%
\begingroup
@@ -1805,11 +1845,13 @@
\jlreq@ifempty{#9}%
{\unexpanded{\long\gdef\jlreqHeadingSubtitle####1{}}}%
{\unexpanded{\long\gdef\jlreqHeadingSubtitle####1{####1}}}%
- \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}{\unexpanded{#6}}{\expandonce{\jlreq@tempa}}{\unexpanded{#7}}%
}%
\unexpanded{\def\jlreq@resultb}{%
\expandonce{\jlreq@result}%
}%
+ \unexpanded{\def\jlreq@resultc}{%
+ \expandonce{\csname jlreq@heading@maketoc@#1\endcsname}{\unexpanded{#6}}{\expandonce{\jlreq@tempa}}{\unexpanded{#7}}%
+ }%
}%
\expandafter\endgroup
\jlreq@do
@@ -2241,7 +2283,8 @@
\eappto\jlreq@do{\expandonce{\jlreq@result}}%
\jlreq@BlockHeading@gyodori@parsekeyval*[BlockHeading:#1]{#3}{}{}{1}%
\let\jlreq@spaceset=\jlreq@result
- \edef\jlreq@totalformat{\unexpanded{##1}\expandonce{\jlreq@afterindent}\noexpand\@afterheading}%
+ \edef\jlreq@totalformat{\unexpanded{##1}}%
+ \edef\jlreq@totalformat@after{\expandonce{\jlreq@afterindent}\noexpand\@afterheading}%
\if@twocolumn
\ifthenelse{\equal{\jlreq@column@spanning}{true}}{%
\def\@tempa##1##2##3{%
@@ -2261,7 +2304,9 @@
}%
}%
\expandafter\@tempa\jlreq@spaceset
- }{}%
+ \def\jlreq@totalformat@after{}%
+ }{%
+ }%
\fi
\edef\jlreq@do{%
\expandonce{\jlreq@do}%
@@ -2283,7 +2328,7 @@
{}{}%
}%
}%
- {\expandonce{\jlreq@totalformat}}%
+ {{}{\expandonce{\jlreq@totalformat}}{\expandonce{\jlreq@totalformat@after}}}%
}}%
\noexpand\def\expandonce{\csname #1\endcsname}{\expandonce{\csname jlreq@headingcs@#1\endcsname}}%
}%
@@ -2617,7 +2662,6 @@
\def\jlreq@font{\normalfont\normalsize}%
\def\jlreq@indent{0\zw}%
\def\jlreq@after@label@space{1\zw}%
- \def\jlreq@mark{}%
\def\jlreq@label@font{}%
\def\jlreq@label@format{\@seccntformat{#1}}%
\def\jlreq@after@space{1\zw}%
@@ -2625,11 +2669,10 @@
\jlreq@parsekeyval[RuninHeading:#1]{%
{font}{\def\jlreq@font{##1}}
{indent}{\def\jlreq@indent{##1}}
- {mark}{\def\jlreq@mark{##1}}
{label_format}{\def\jlreq@label@format{##1}}
- {after_label_space}{
+ {after_label_space}{%
\ifdim\dimexpr##1\relax<0pt \ClassWarning{jlreq}{after_label_space in Runin Heading #1 should be not negative}\fi
- \def\jlreq@after@label@space{##1}
+ \def\jlreq@after@label@space{##1}%
}
{after_space}{%
\ifdim\dimexpr##1\relax<0pt \ClassWarning{jlreq}{after_space in Runin Heading #1 should be not negative}\fi
@@ -2790,7 +2833,7 @@
}
\newcommand{\ModifyHeading}[2]{%
- \@ifundefined{jlreq@heading@setting@#1}{\ClassError{jlreq}{Unknown heading: #1}{\@ehc}}%
+ \@ifundefined{jlreq@heading@setting@#1}{\ClassError{jlreq}{Unknown heading: #1}{\@ehc}}{}%
\edef\jlreq@do{\csexpandonce{jlreq@heading@type@#1}{#1}{\csexpandonce{jlreq@heading@level@#1}}{\csexpandonce{jlreq@heading@setting@#1},\unexpanded{#2}}}%
\jlreq@do
}
@@ -2851,7 +2894,7 @@
}%
}
-%.. 各種定義
+%.. カウンターの定義(見出し本体はこのファイルの末尾で)
\setcounter{secnumdepth}{3}
\newcounter{part}
\jlreq@switch{\jlreq@article@type}{
@@ -2864,73 +2907,6 @@
\newcounter{subparagraph}[paragraph]
\renewcommand*{\@seccntformat}[1]{\csname the#1\endcsname}
-\if@tate
- \renewcommand{\thepart}{\jlreq@Kanji{part}}
- \ifthenelse{\equal{\jlreq@article@type}{article}}{}{\renewcommand{\thechapter}{\jlreq@Kanji{chapter}}}
- \renewcommand{\thesection}{\jlreq@rensuji{\@arabic\c@section}}
- \renewcommand{\thesubsection}{\jlreq@rensuji{\@alph\c@subsection}}
- \renewcommand{\thesubsubsection}{\jlreq@rensuji{\@arabic\c@subsubsection}}
- \renewcommand{\theparagraph}{(\jlreq@rensuji{\@arabic\c@paragraph})}
- \renewcommand{\thesubparagraph}{(\jlreq@rensuji{\@arabic\c@subparagraph})}
-
- \ifthenelse{\equal{\jlreq@article@type}{article}}{
- \NewBlockHeading{part}{0}{font={\jlreq@keepbaselineskip{\LARGE}},indent=4\zw,lines=4,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\large}}}
- \if@twoside\ModifyHeading{part}{allowbreak_if_evenpage=true}\fi
- }
- {% book, report
- \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\zw}},format={\null\vfill {\Huge\hspace*{2\zw}#1#2}\vspace*{2\jlreq@gol}}}
- \NewBlockHeading{chapter}{0}{indent=2\zw,lines=6,label_format={第\thechapter 章},font={\huge},after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\Large}}}
- \if@twoside\ModifyHeading{chapter}{allowbreak_if_evenpage=true}\fi
- \renewcommand{\thechapter}{\jlreq@Kanji{chapter}}
- }
- \NewBlockHeading{section}{1}{font={\jlreq@keepbaselineskip{\Large}},indent=6\zw,lines=3,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\normalsize}}}
- \if@twoside\ModifyHeading{section}{allowbreak_if_evenpage=true}\fi
- \NewBlockHeading{subsection}{2}{font={\jlreq@keepbaselineskip{\large}},indent=8\zw,lines=2,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\small}}}
- \if@twoside\ModifyHeading{subsection}{allowbreak_if_evenpage=true}\fi
- \NewBlockHeading{subsubsection}{3}{font={\jlreq@keepbaselineskip{\normalsize}},indent=10\zw,lines=1,before_lines=1,subtitle_break=false,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},,subtitle_font={\jlreq@keepbaselineskip{\scriptsize}}}
- \if@twoside\ModifyHeading{subsubsection}{allowbreak_if_evenpage=true}\fi
- \NewRuninHeading{paragraph}{4}{font={\jlreq@keepbaselineskip{\normalsize}}}
- \NewRuninHeading{subparagraph}{5}{font={\jlreq@keepbaselineskip{\normalsize}},indent=1\zw}
-\else% yoko
- \renewcommand{\thepart}{\Roman{part}}
- \renewcommand{\thesubsection}{\thesection .\arabic{subsection}}
- \renewcommand{\thesubsubsection}{\thesubsection .\arabic{subsubsection}}
- \renewcommand{\theparagraph}{\thesubsubsection .\arabic{paragraph}}
- \renewcommand{\thesubparagraph}{\theparagraph .\arabic{subparagraph}}
- \ifthenelse{\equal{\jlreq@article@type}{article}}{
- \NewBlockHeading{part}{0}{font={\jlreq@keepbaselineskip{\LARGE\sffamily\bfseries}},label_format={第\thepart 部},lines=4,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\large}}}
- \renewcommand{\thesection}{\arabic{section}}
- }
- {% book, report
- \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\jlreq@gol}},format={\null\vfil {\Huge\sffamily\bfseries #1#2}\vfil}}
- \NewBlockHeading{chapter}{0}{%
- font={\jlreq@keepbaselineskip{\huge\sffamily\bfseries}},
- label_format={第\thechapter 章},
- lines=5,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},
- subtitle_font={\jlreq@keepbaselineskip{\Large}}}
- \renewcommand{\thechapter}{\arabic{chapter}}
- \renewcommand{\thesection}{\thechapter.\arabic{section}}
- }
- \NewBlockHeading{section}{1}{font={\jlreq@keepbaselineskip{\Large\sffamily\bfseries}},lines=3,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\normalsize}}}
- \NewBlockHeading{subsection}{2}{font={\jlreq@keepbaselineskip{\large\sffamily\bfseries}},lines=2,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\small}}}
- \NewBlockHeading{subsubsection}{3}{font={\jlreq@keepbaselineskip{\normalsize\sffamily\bfseries}},lines=1,before_lines=1,subtitle_break=false,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\scriptsize}}}
- \NewRuninHeading{paragraph}{4}{font={\jlreq@keepbaselineskip{\normalsize\sffamily\bfseries}},indent=1\zw}
- \NewRuninHeading{subparagraph}{5}{font={\jlreq@keepbaselineskip{\normalsize\sffamily\bfseries}},indent=2\zw}
-\fi
-
-\ifthenelse{\equal{\jlreq@article@type}{article}}{}{% book, report
- \if@openright
- \ModifyHeading{part}{type=naka}
- \if@tate
- \ModifyHeading{chapter}{pagebreak=begin_with_even_page}
- \else
- \ModifyHeading{chapter}{pagebreak=begin_with_odd_page}
- \fi
- \else
- \ModifyHeading{part}{type=han}
- \ModifyHeading{chapter}{pagebreak=clearpage}
- \fi
-}
%. 注
% 文字サイズは6ポイントくらい(4.2.3.a)とりあえす\scriptsize
@@ -2981,7 +2957,6 @@
\def\jlreq@hook@postnote{\jlreq@fixjfm}
}
}
-\jlreqsetup{reference_mark=inline}
% \@footnotemarkをシンプルなものにする
\def\jlreq@setdefaultnotemark#1#2{%
\def#1{%
@@ -3016,7 +2991,7 @@
% インデントの計算:脚注の長さが文字の整数倍になるように字下げする(4.2.5.b)
\jlreq@jlreqsetup@add{footnote_indent}{%
\if@tate\else
- \ifdim\dimexpr#1\relax=0pt\else\jlreq@note{脚注は,一般にその前に区切りのための罫線を挿入するので,字下げは行わなくてよい(4.2.5.b).}\fi
+ \ifdim\dimexpr#1\relax=0pt \else\jlreq@note{脚注は,一般にその前に区切りのための罫線を挿入するので,字下げは行わなくてよい(4.2.5.b).}\fi
\fi
\begingroup
\footnotesize
@@ -3028,11 +3003,6 @@
\expandafter\endgroup
\jlreq@do
}
-\if@tate
- \jlreqsetup{footnote_indent=1\zw}% 根拠なし
-\else
- \jlreqsetup{footnote_indent=0pt}% (4.2.5.b)
-\fi
\newcommand{\@makefntext}[1]{\jlreq@makefntext{#1}}
\jlreq@jlreqsetup@add{footnote_second_indent}{%
@@ -3058,7 +3028,6 @@
}##1%
}
}
-\jlreqsetup{footnote_second_indent=1\zw}
\jlreq@jlreqsetup@add{footnotetext_indent}{
\ClassWarningNoLine{jlreq}{footnotetext_indent was removed}
@@ -3079,23 +3048,32 @@
\jlreq@hook@prenote
\@ifnextchar[{\jlreq@footnotemark@impl@woption}{\jlreq@footnotemark@impl@wooption}%
}
-\if@tate
+\ifthenelse{\boolean{@tate} \AND \(\boolean{@twoside} \OR \boolean{@twocolumn}\)}{
% 縦組の傍注は,その見開き内に付いている合印に対応する注を,奇数ページの左端にそろえて配置する.多段組では最下段の左端にそろえて配置する.(4.2.6.a)
% 必要ならば\footnoteを\footnotemarkと\footnotetextにわけ,\footnotetextをアウトプット時まで遅延することで実現する.
\def\jlreq@footnote@delayfootnoteslist{}
- \preto\@opcol{%
+ \def\jlreq@hook@@opcol{%
\expandafter\gdef\expandafter\jlreq@footnote@delayfootnoteslist\expandafter{\expandafter}%
\jlreq@footnote@delayfootnoteslist
}
+ \preto\@opcol{\jlreq@hook@@opcol}
% \jlreq@footnote@delayfootnote@delay#1#2#3:#1ページ目に\footnotetext[#2]{#3}を出す
% \jlreq@footnote@delayfootnote@page:何ページ目に\footnotetextを入れるかを\jlreq@resultcntに入れる.その場での場合は-1.
\if@twocolumn
- \def\jlreq@footnote@delayfootnote@page{%
- \jlreq@setcurrentpage
- \jlreq@resultcnt=\numexpr\jlreq@currentpage\ifodd\jlreq@currentpage\else + 1\fi\relax
- % このページに表示&上の段処理済みだと\output内では間に合わない
- \ifnum\jlreq@resultcnt=\value{page}\if@firstcolumn\else\jlreq@resultcnt=-1 \fi\fi
- }
+ \if@twoside
+ \def\jlreq@footnote@delayfootnote@page{%
+ \jlreq@setcurrentpage
+ \jlreq@resultcnt=\numexpr\jlreq@currentpage\ifodd\jlreq@currentpage\else + 1\fi\relax
+ % このページに表示&上の段処理済みだと\output内では間に合わない
+ \ifnum\jlreq@resultcnt=\value{page}\if@firstcolumn\else\jlreq@resultcnt=-1 \fi\fi
+ }
+ \else
+ \def\jlreq@footnote@delayfootnote@page{%
+ \jlreq@setcurrentpage
+ \jlreq@resultcnt=\numexpr\jlreq@currentpage\relax
+ \ifnum\jlreq@resultcnt=\value{page}\if@firstcolumn\else\jlreq@resultcnt=-1 \fi\fi
+ }
+ \fi
\long\def\jlreq@footnote@delayfootnote@delay#1#2#3{%
% 二段組みの場合は上段を組んだ直後に\footnotetextを挿入(そのページの下段に入る)
\ifnum 0\if@firstcolumn\else 1\fi\ifnum#1>\value{page}1\fi>0
@@ -3161,7 +3139,7 @@
\fi
\jlreq@hook@postnote
}
-\else
+}{
\long\def\jlreq@footnote@impl@woption[#1]#2{%
\jlreq@useoriginalcs{\footnote}[#1]{#2}%
\jlreq@hook@postnote
@@ -3170,7 +3148,7 @@
\jlreq@useoriginalcs{\footnote}{#1}%
\jlreq@hook@postnote
}
-\fi
+}
\long\def\jlreq@footnotemark@impl@woption[#1]{%
\jlreq@useoriginalcs{\footnotemark}[#1]%
\jlreq@hook@postnote
@@ -3286,7 +3264,6 @@
\( \lengthtest{1.99\zw < #1} \AND \lengthtest{#1 < 2.01\zw} \)
}{}{\jlreq@note{後注が2行以上となった場合,後注の2行目以下の字下げは,1行目より,後注の文字サイズの2倍又は全角とする (4.2.4.d).}}
}
-\jlreqsetup{endnote_second_indent=2\zw}
\newcommand{\@makeendtext}[1]{%
\csname\jlreq@endnotemarkname\endcsname
\hskip\glueexpr1\zw\relax% 見出し出力と一文字分の空き(4.2.4.c)
@@ -3343,7 +3320,6 @@
}
\fi
}
-\jlreqsetup{endnote_position=headings}
\AtEndDocument{\theendnotes}
@@ -3368,7 +3344,7 @@
\jlreq@setdefaultnotemark\@sidenotemark\@makesidemark
\def\jlreq@sidenotecounter{footnote}% 傍注用のカウンタ名
\jlreq@jlreqsetup@add{sidenote_type}[number,symbol]{\def\jlreq@sidenote@type{#1}}
- \jlreqsetup{sidenote_type=number}
+ \def\jlreq@sidenote@type{number}
\jlreq@jlreqsetup@addtofinally{
\ifthenelse{\equal{\jlreq@sidenote@type}{number}}{
\def\sidenote{\jlreq@hook@prenote\@ifnextchar[{\jlreq@sidenote}{\jlreq@sidenote[]}}
@@ -3434,7 +3410,6 @@
}
\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={}}
}
%.. 割注(3.4)
@@ -3462,8 +3437,8 @@
\ifvmode\leavevmode\fi
\@ifstar\jlreq@inlinenote@noauto\jlreq@inlinenote@auto
}
-\newcommand*{\inlinenote}{\jlreq@inlinenote@{\inlinenote}}
-\newcommand*{\warichu}{\jlreq@inlinenote@{\warichu}}
+\DeclareRobustCommand*{\inlinenote}{\jlreq@inlinenote@{\inlinenote}}
+\DeclareRobustCommand*{\warichu}{\jlreq@inlinenote@{\warichu}}
\newcommand*{\jlreq@inlinenote@auto}[1]{%
% 割注初め括弧の前の場所を保存
@@ -4591,43 +4566,6 @@
\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={},clear_markcommand=false}
- \NewPageStyle{myheadings}{nombre=\thepage,odd_running_head=\rightmark,even_running_head=\leftmark,clear_markcommand=false}
- \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},clear_markcommand=false}
- \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center}
- \NewPageStyle{myheadings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center,odd_running_head=\rightmark,even_running_head=\leftmark,clear_markcommand=false}
-\fi
-\ModifyPageStyle{plain}{font=\small}
-\ModifyPageStyle{headings}{font=\small}
-\ModifyPageStyle{myheadings}{font=\small}
-
%. フロート関連
% 4.3.3.dの例,縦組みの時だけど横にも適用……
\setlength{\floatsep}{1\jlreq@gol plus 1\jlreq@gol}
@@ -4637,15 +4575,47 @@
\dbltextfloatsep=\textfloatsep
% 残りはデフォルトにしておく.
-% 4.3.1 注4
-\newlength\abovecaptionskip
-\newlength\belowcaptionskip
+%. 環境も引数にとる可能性のある\jlreqsetup用マクロ.
+% #3={<設定1>,<環境名>=<設定2>}のようなものを受け付ける.
+% #2に<設定1>が,#2@<環境名>に<設定2>が入る.#1には#2@<環境名>が定義されている<環境名>をカンマ区切りで入れる.
+% \jlreqsetup{X,env=B}の後に\jlreqsetup{Y}を指定すると,env環境に対する設定はYになるようにする.
+% ただし\jlreqsetup{env=C,Y}とした場合はenv環境に対してはC.
+\long\def\jlreq@jlreqsetup@withenv#1#2#3{%
+ \@ifundefined{#1}{\expandafter\def\csname #1\endcsname{}}{}%
+ \begingroup
+ \def\jlreq@do{}%
+ \jlreq@parsekeyval@nokey{%
+ \ifjlreq@parsekeyval@nokey@novalue{%
+ \epreto\jlreq@do{%
+ \noexpand\edef\expandonce{\csname #2\endcsname}{\unexpanded{\unexpanded{##1}}}
+ \noexpand\def\expandonce{\csname #1\endcsname}{}%
+ }%
+ \expandafter\@for\expandafter\jlreq@tempa\expandafter:\expandafter=\csname #1\endcsname\do{%
+ \epreto\jlreq@do{\noexpand\let\expandonce{\csname #2@\jlreq@tempa\endcsname}\noexpand\@undefined}%
+ }%
+ }{%
+ \eappto\jlreq@do{%
+ \noexpand\edef\expandonce{\csname #2@##1\endcsname}{\unexpanded{\unexpanded{##2}}}%
+ \unexpanded{\def\jlreq@tempa{\jlreq@helper@removeelement{##1}}}%
+ \unexpanded{\expandafter\jlreq@tempa\expandafter}{\expandonce{\csname #1\endcsname}}{\expandonce{\csname #1\endcsname}}%
+ \unexpanded{\csappto{#1}{,##1}}%
+ }%
+ }%
+ }{#3}%
+ \expandafter\endgroup
+ \jlreq@do
+}
+
% #1@#2が定義されていれば\#1@#2の中身に,そうでなければ\#1の中身に展開される.
% 展開は\unexpandedで抑制される.
-\def\jlreq@@makecaption@nameuse#1#2{%
+\def\jlreq@jlreqsetup@withenv@nameuse#1#2{%
\expandafter\ifx\csname #1@#2\endcsname\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi{\csexpandonce{#1}}{\csexpandonce{#1@#2}}%
}
+% 4.3.1 注4
+\newlength\abovecaptionskip
+\newlength\belowcaptionskip
+%. 図表
\newcommand{\@makecaption}[2]{{%
% \jlreq@tempbに現在の環境を入れる.
\@ifundefined{@currenvir}{%
@@ -4655,20 +4625,20 @@
}{\let\jlreq@tempb=\@currenvir}%
\reset@font\small
\vskip\abovecaptionskip
- \edef\jlreq@do{\unexpanded{\def\jlreq@tempa##1}{\jlreq@@makecaption@nameuse{jlreq@@makecaption@label@format}{\jlreq@tempb}}}%
+ \edef\jlreq@do{\unexpanded{\def\jlreq@tempa##1}{\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@label@format@setting}{\jlreq@tempb}}}%
\jlreq@do
- \setbox\jlreq@tempboxa=\hbox{\jlreq@@makecaption@nameuse{jlreq@@makecaption@label@font}{\jlreq@tempb}#1}%
+ \setbox\jlreq@tempboxa=\hbox{\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@label@font@setting}{\jlreq@tempb}#1}%
\ifdim\wd\jlreq@tempboxa=0pt
- \edef\jlreq@tempa{{\jlreq@@makecaption@nameuse{jlreq@@makecaption@font}{\jlreq@tempb}\unexpanded{#2}}}%
+ \edef\jlreq@tempa{{\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@font@setting}{\jlreq@tempb}\unexpanded{#2}}}%
\else
\edef\jlreq@tempa{%
- {\jlreq@@makecaption@nameuse{jlreq@@makecaption@label@font}{\jlreq@tempb}\expandonce{\jlreq@tempa{#1}}}%
- \unexpanded{\hskip\glueexpr}\jlreq@@makecaption@nameuse{jlreq@@makecaption@after@label@space}{\jlreq@tempb}\noexpand\relax
- {\jlreq@@makecaption@nameuse{jlreq@@makecaption@font}{\jlreq@tempb}\unexpanded{#2}}%
+ {\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@label@font@setting}{\jlreq@tempb}\expandonce{\jlreq@tempa{#1}}}%
+ \unexpanded{\hskip\glueexpr}\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@after@label@space@setting}{\jlreq@tempb}\noexpand\relax
+ {\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@font@setting}{\jlreq@tempb}\unexpanded{#2}}%
}%
\fi
\setbox\@tempboxa=\hbox{\jlreq@tempa}%
- \edef\jlreq@tempc{\jlreq@@makecaption@nameuse{jlreq@@makecaption@align}{\jlreq@tempb}}%
+ \edef\jlreq@tempc{\jlreq@jlreqsetup@withenv@nameuse{jlreq@@makecaption@align@setting}{\jlreq@tempb}}%
\expandafter\let\expandafter\jlreq@align\jlreq@tempc
\ifdim\wd\@tempboxa>\hsize\relax
{%
@@ -4686,44 +4656,55 @@
\fi
\vskip\belowcaptionskip}}
-% #2={figure=X}ならば\#1@figureにXを入れる.そうでなければ\#1に入れる.
-\def\jlreq@caption@jlreqsetup#1#2{%
- \jlreq@parsekeyval@nokey{%
- \ifjlreq@parsekeyval@nokey@novalue{%
- \expandafter\edef\csname #1\endcsname{\unexpanded{##1}}%
- }{%
- \expandafter\edef\csname #1@##1\endcsname{\unexpanded{##2}}%
- }%
- }{#2}%
-}
-\jlreq@jlreqsetup@add{caption_font}{\jlreq@caption@jlreqsetup{jlreq@@makecaption@font}{#1}}
-\jlreq@jlreqsetup@add{caption_label_font}{\jlreq@caption@jlreqsetup{jlreq@@makecaption@label@font}{#1}}
-\jlreq@jlreqsetup@add{caption_label_format}{\jlreq@caption@jlreqsetup{jlreq@@makecaption@label@format}{#1}}
-\jlreq@jlreqsetup@add{caption_after_label_space}{\jlreq@caption@jlreqsetup{jlreq@@makecaption@after@label@space}{#1}}
-\def\jlreq@caption@setalign#1#2{%
- \jlreq@switch{#2}{
- {center}{\let#1=c}
- {left}{\let#1=l}
- {right}{\let#1=r}
- {top}{\let#1=l}
- {bottom}{\let#1=r}
+\jlreq@jlreqsetup@add{caption_font}{\jlreq@jlreqsetup@withenv{jlreq@@makecaption@font@envlist}{jlreq@@makecaption@font@setting}{#1}}
+\jlreq@jlreqsetup@add{caption_label_font}{\jlreq@jlreqsetup@withenv{jlreq@@makecaption@label@font@envlist}{jlreq@@makecaption@label@font@setting}{#1}}
+\jlreq@jlreqsetup@add{caption_label_format}{\jlreq@jlreqsetup@withenv{jlreq@@makecaption@label@format@envlist}{jlreq@@makecaption@label@format@setting}{#1}}
+\jlreq@jlreqsetup@add{caption_after_label_space}{\jlreq@jlreqsetup@withenv{jlreq@@makecaption@after@label@space@envlist}{jlreq@@makecaption@after@label@space@setting}{#1}}
+
+\def\jlreq@@makecaption@align@clearandsetalign#1{%
+ \@for\jlreq@tempa:=\jlreq@@makecaption@align@envlist\do{%
+ \ifx\jlreq@tempa\@empty\else
+ \eappto\jlreq@generalset{\noexpand\let\expandonce{\csname jlreq@@makecaption@align@setting@\jlreq@tempa\endcsname}=\noexpand\@undefined}%
+ \fi
+ }%
+ \appto\jlreq@generalset{%
+ \def\jlreq@@makecaption@align@envlist{}%
+ \let\jlreq@@makecaption@align@setting=#1%
}%
}
\jlreq@jlreqsetup@add{caption_align}{%
- \jlreq@parsekeyval@nokey{%
- \jlreq@ifempty{##1}{}{%
- \jlreq@switch{##1}{%
- {center}{\let\jlreq@@makecaption@align=c}
- {left}{\let\jlreq@@makecaption@align=l}
- {right}{\let\jlreq@@makecaption@align=r}
- {top}{\let\jlreq@@makecaption@align=l}
- {bottom}{\let\jlreq@@makecaption@align=r}
- {\expandafter\jlreq@caption@setalign\csname jlreq@@makecaption@align@##1\endcsname{##2}}
+ \@ifundefined{jlreq@@makecaption@align@envlist}{\def\jlreq@@makecaption@align@envlist{}}{}%
+ \begingroup
+ \def\jlreq@generalset{}\def\jlreq@envset{}%
+ \jlreq@parsekeyval@nokey{%
+ \jlreq@ifempty{##1}{}{%
+ \jlreq@switch{##1}{%
+ {center}{\jlreq@@makecaption@align@clearandsetalign{c}}
+ {left}{\jlreq@@makecaption@align@clearandsetalign{l}}
+ {right}{\jlreq@@makecaption@align@clearandsetalign{r}}
+ {top}{\jlreq@@makecaption@align@clearandsetalign{l}}
+ {bottom}{\jlreq@@makecaption@align@clearandsetalign{r}}
+ {%
+ \jlreq@switch{##2}{%
+ {center}{\eappto\jlreq@envset{\noexpand\let\expandonce{\csname jlreq@@makecaption@align@setting@##1\endcsname}=c}}%
+ {left}{\eappto\jlreq@envset{\noexpand\let\expandonce{\csname jlreq@@makecaption@align@setting@##1\endcsname}=l}}%
+ {right}{\eappto\jlreq@envset{\noexpand\let\expandonce{\csname jlreq@@makecaption@align@setting@##1\endcsname}=r}}%
+ {top}{\eappto\jlreq@envset{\noexpand\let\expandonce{\csname jlreq@@makecaption@align@setting@##1\endcsname}=l}}%
+ {bottom}{\eappto\jlreq@envset{\noexpand\let\expandonce{\csname jlreq@@makecaption@align@setting@##1\endcsname}=r}}%
+ }%
+ \appto\jlreq@envset{%
+ \def\jlreq@tempa{\jlreq@helper@removeelement{##1}}%
+ \expandafter\jlreq@tempa\expandafter{\jlreq@@makecaption@align@envlist}{\jlreq@@makecaption@align@envlist}%
+ \appto\jlreq@@makecaption@align@envlist{,##1}%
+ }%
+ }%
+ }%
}%
- }%
- }{#1}%
+ }{#1}%
+ \edef\jlreq@do{\expandonce{\jlreq@generalset}\expandonce{\jlreq@envset}}%
+ \expandafter\endgroup
+ \jlreq@do
}
-\jlreqsetup{caption_font={\sffamily\bfseries},caption_label_font={\sffamily\bfseries},caption_after_label_space=1\zw,caption_label_format={#1},caption_align=center}
% 特に根拠のない値
\setlength\abovecaptionskip{.5\jlreq@gol}
\setlength\belowcaptionskip{0pt}
@@ -4742,8 +4723,6 @@
\newcommand*{\fnum@figure}{\figurename\thefigure}
\newenvironment{figure}{\@float{figure}}{\end@float}
\newenvironment{figure*}{\@dblfloat{figure}}{\end@dblfloat}
-\newcommand*{\listfigurename}{図目次}
-\newcommand{\figurename}{図}
%.. table環境
\newcounter{table}
@@ -4759,8 +4738,6 @@
\newcommand*{\fnum@table}{\tablename\thetable}
\newenvironment{table}{\@float{table}}{\end@float}
\newenvironment{table*}{\@dblfloat{table}}{\end@dblfloat}
-\newcommand{\listtablename}{表目次}
-\newcommand{\tablename}{表}
%. タイトル周り
\newenvironment{titlepage}{%
@@ -4969,7 +4946,7 @@
}
\fi
}
-%. 箇条書き.cf. JISX4051 8.4
+%. 箇条書き. cf. JISX4051 8.4
% 用語定義型
\newenvironment{description}{\list{}{%
\setlength{\leftmargin}{0\zw}% 下げない
@@ -4984,136 +4961,98 @@
}}{\endlist}
\newcommand{\descriptionlabel}[1]{\normalfont\sffamily\bfseries #1}
-% enumerateとitemize
-% 見出しが一つ上のレベルからどのくらいずれているかを入れる.
-% (見出しは2\zwの箱に右/下詰めで入る.)
-\setlength\leftmargini{2\zw}
-\setlength\leftmarginii{1\zw}
-\setlength\leftmarginiii{1\zw}
-\setlength\leftmarginiv{1\zw}
-\setlength\leftmarginv{1\zw}
-\setlength\leftmarginvi{1\zw}
-
%.. 箇条書き
-\jlreq@jlreqsetup@add{itemization_beforeafter_space}{
+% #3={<設定1>,i=<設定2>,<環境名>={<設定3>,ii=<設定4>}}のような設定を解釈する.
+% <設定2>は#2@iに,<設定4>は#2@ii@<環境名>に格納される.
+% <設定1>の指定はi=<設定1>,..,vi=<設定1>と等価.<設定3>も同様.
+% #1には現在何か値が定義されている環境名をカンマ区切りで入れる.
+\long\def\jlreq@jlreqsetup@itemization#1#2#3{
+ \@ifundefined{#1}{\expandafter\def\csname #1\endcsname{}}{}%
\begingroup
- \def\jlreq@do{}%
- \def\jlreq@keyvallist{}%
- \@for\@tempa:=#1\do{%
- \expandafter\jlreq@helper@trim\expandafter{\@tempa}{\@tempa}%
- \expandafter\jlreq@ifcontains\expandafter{\@tempa}{=}{%
- \expandafter\appto\expandafter\jlreq@keyvallist\expandafter{\@tempa,}%
+ \def\jlreq@generalset{}%
+ \def\jlreq@levelset{}%
+ \def\jlreq@envset{}%
+ \jlreq@parsekeyval@nokey{%
+ \ifjlreq@parsekeyval@nokey@novalue{%
+ % 生の値.環境に対するものをクリアし,全ての<i-iv>に同じ値を設定
+ % 環境一覧リストもクリア.
+ \@for\jlreq@tempa:=i,ii,iii,iv,v,vi\do{%
+ \expandafter\@for\expandafter\jlreq@tempb\expandafter:\expandafter=\csname #1\endcsname\do{%
+ \ifx\jlreq@tempb\@empty\else
+ \eappto\jlreq@generalset{\noexpand\let\expandonce{\csname #2@\jlreq@tempa @\jlreq@tempb\endcsname}\noexpand\@undefined}%
+ \fi
+ }%
+ \eappto\jlreq@generalset{%
+ \noexpand\edef\expandonce{\csname #2@\jlreq@tempa\endcsname}{\unexpanded{\unexpanded{##1}}}%
+ }%
+ }%
+ \appto\jlreq@generalset{\expandafter\def\csname #1\endcsname{}}%
}{%
- \@for\@tempb:=i,ii,iii,iv,v,vi\do{%
- \eappto\jlreq@do{\noexpand\def\expandonce{\csname jlreq@itemization@beforeafter@space@\@tempb\endcsname}{\expandonce{\@tempa}}}%
+ \ifthenelse{\equal{##1}{i} \OR \equal{##1}{ii} \OR \equal{##1}{iii} \OR \equal{##1}{iv} \OR \equal{##1}{v} \OR \equal{##1}{vi}}{%
+ % i=とかの時,環境に対応するものをクリアし,\#2@##1に値を入れる
+ \expandafter\@for\expandafter\jlreq@tempa\expandafter:\expandafter=\csname #1\endcsname\do{
+ \ifx\jlreq@tempa\@empty\else
+ \epreto\jlreq@envset{\noexpand\let\expandonce{\csname #2@##1@\jlreq@tempa\endcsname}\noexpand\@undefined}%
+ \fi
+ }%
+ \eappto\jlreq@envset{\noexpand\edef\expandonce{\csname #2@##1\endcsname}{\unexpanded{\unexpanded{##2}}}}%
+ }{%
+ % そうでないとき,環境.##1 = 環境名
+ \jlreq@parsekeyval@nokey{%
+ \ifjlreq@parsekeyval@nokey@novalue{%
+ % i - viまでに全てセットする.
+ \@for\jlreq@tempa:=i,ii,iii,iv,v,vi\do{%
+ \epreto\jlreq@envset{\noexpand\edef\expandonce{\csname #2@\jlreq@tempa @##1\endcsname}{\unexpanded{\unexpanded{####1}}}}%
+ }%
+ }{%
+ % ピンポイント代入
+ \eappto\jlreq@envset{\noexpand\edef\expandonce{\csname #2@####1@##1\endcsname}{\unexpanded{\unexpanded{####2}}}}%
+ }%
+ }{##2}%
+ \eappto\jlreq@envset{%
+ \unexpanded{\def\jlreq@tempa{\jlreq@helper@removeelement{##1}}}%
+ \unexpanded{\expandafter\jlreq@tempa\expandafter}{\expandonce{\csname #1\endcsname}}{\expandonce{\csname #1\endcsname}}%
+ \noexpand\appto\expandonce{\csname #1\endcsname}{\unexpanded{,##1}}%
+ }%
}%
}%
- }%
- \def\jlreq@tempa{%
- \jlreq@parsekeyval[jlreqsetup: itemization_beforeafter_space]{%
- {i}{\appto\jlreq@do{\def\jlreq@itemization@beforeafter@space@i{####1}}}
- {ii}{\appto\jlreq@do{\def\jlreq@itemization@beforeafter@space@ii{####1}}}
- {iii}{\appto\jlreq@do{\def\jlreq@itemization@beforeafter@space@iii{####1}}}
- {iv}{\appto\jlreq@do{\def\jlreq@itemization@beforeafter@space@iv{####1}}}
- {v}{\appto\jlreq@do{\def\jlreq@itemization@beforeafter@space@v{####1}}}
- {vi}{\appto\jlreq@do{\def\jlreq@itemization@beforeafter@space@vi{####1}}}
- }%
- }%
- \expandafter\jlreq@tempa\expandafter{\jlreq@keyvallist}%
+ }{#3}%
+ \edef\jlreq@do{\expandonce{\jlreq@generalset}\expandonce{\jlreq@levelset}\expandonce{\jlreq@envset}}%
\expandafter\endgroup
\jlreq@do
}
-\jlreq@jlreqsetup@add{itemization_itemsep}{\def\jlreq@itemization@itemsep{#1}}
-\jlreqsetup{itemization_beforeafter_space={0pt,i=.5\baselineskip},itemization_itemsep=0pt}
-% enumerate, itemize用初期化
-\def\jlreq@init@list{%
- \setlength{\labelwidth}{2\zw}%
+
+\def\jlreq@itemization@beforeafter@space@envlist{}
+\jlreq@jlreqsetup@add{itemization_beforeafter_space}{\jlreq@jlreqsetup@itemization{jlreq@itemization@beforeafter@space@envlist}{jlreq@itemization@beforeafter@space@setting}{#1}}
+\jlreq@jlreqsetup@add{itemization_itemsep}{\jlreq@jlreqsetup@withenv{jlreq@itemization@itemsep@envlist}{jlreq@itemization@itemsep@setting}{#1}}
+\jlreq@jlreqsetup@add{itemization_labelsep}{\jlreq@jlreqsetup@withenv{jlreq@itemization@labelsep@envlist}{jlreq@itemization@labelsep@setting}{#1}}
+\jlreq@jlreqsetup@add{itemization_label_length}{\jlreq@jlreqsetup@itemization{jlreq@itemization@label@length@envlist}{jlreq@itemization@label@length@setting}{#1}}
+% enumerate, itemize用初期化,#1 = i,ii,...
+\def\jlreq@init@list#1{%
\setlength{\partopsep}{0pt}%
- \setlength{\itemsep}{\dimexpr\jlreq@itemization@itemsep\relax}%
+ \setlength{\itemsep}{\dimexpr\jlreq@jlreqsetup@withenv@nameuse{jlreq@itemization@itemsep@setting}{\@currenvir}}%
\setlength{\parsep}{0pt}%
\setlength{\listparindent}{\parindent}%
-% itemizeは直後ベタ,enumerateは直後全角空き.
- \ifthenelse{\equal{\@currenvir}{itemize}}{%
- \setlength{\labelsep}{0\zw}%
- }{%
- \setlength{\labelsep}{1\zw}%
- }%
- % \labelsepだけあけるのは一つ目(ラベルの直後)のみ
- \setlength{\itemindent}{\labelsep}%
+ \setlength{\labelsep}{\dimexpr\jlreq@jlreqsetup@withenv@nameuse{jlreq@itemization@labelsep@setting}{\@currenvir}\relax}%
+ \setlength{\labelwidth}{\dimexpr\jlreq@jlreqsetup@withenv@nameuse{jlreq@itemization@label@length@setting@#1}{\@currenvir}\relax}%
+ \setlength{\topsep}{\dimexpr\jlreq@jlreqsetup@withenv@nameuse{jlreq@itemization@beforeafter@space@setting@#1}{\@currenvir}\relax}%
+ \setlength{\leftmargin}{\dimexpr\csname leftmargin#1\endcsname}%
+ \setlength{\itemindent}{\dimexpr\jlreq@jlreqsetup@withenv@nameuse{jlreq@itemization@label@length@setting@#1}{\@currenvir} + \labelsep - \leftmargin\relax}%
}
-\def\@listi{%
- \jlreq@init@list
- \setlength{\topsep}{\dimexpr\jlreq@itemization@beforeafter@space@i\relax}%
- \setlength{\leftmargin}{\leftmargini}%
-}
+\def\@listi{\jlreq@init@list{i}}%
\let\@listI\@listi
-\def\@listii{%
- \jlreq@init@list
- \setlength{\topsep}{\dimexpr\jlreq@itemization@beforeafter@space@ii\relax}%
- \setlength{\leftmargin}{\leftmarginii}%
-}
-\def\@listiii{%
- \jlreq@init@list
- \setlength{\topsep}{\dimexpr\jlreq@itemization@beforeafter@space@iii\relax}%
- \setlength{\leftmargin}{\leftmarginiii}%
-}
-\def\@listiv{%
- \jlreq@init@list
- \setlength{\topsep}{\dimexpr\jlreq@itemization@beforeafter@space@iv\relax}%
- \setlength{\leftmargin}{\leftmarginiv}%
-}
-\def\@listv{%
- \jlreq@init@list
- \setlength{\topsep}{\dimexpr\jlreq@itemization@beforeafter@space@v\relax}%
- \setlength{\leftmargin}{\leftmarginv}%
-}
-\def\@listvi{%
- \jlreq@init@list
- \setlength{\topsep}{\dimexpr\jlreq@itemization@beforeafter@space@vi\relax}%
- \setlength{\leftmargin}{\leftmarginvi}%
-}
-
-\if@tate
- \renewcommand{\theenumi}{\jlreq@Kanji{enumi}}
- \renewcommand{\theenumii}{\jlreq@rensuji{\@arabic\c@enumii}}
- \renewcommand{\theenumiii}{\jlreq@rensuji{\@arabic\c@enumiii}}
- \renewcommand{\theenumiv}{\jlreq@rensuji{\@arabic\c@enumiv}}
- \newcommand{\labelenumi}{\theenumi}
- \newcommand{\labelenumii}{\theenumii}
- \newcommand{\labelenumiii}{\theenumiii}
- \newcommand{\labelenumiv}{\theenumiv}
-\else
- \renewcommand{\theenumi}{\@arabic\c@enumi}
- \renewcommand{\theenumii}{\@alph\c@enumii}
- \renewcommand{\theenumiii}{\@roman\c@enumiii}
- \renewcommand{\theenumiv}{\@Alph\c@enumiv}
- \newcommand{\labelenumi}{\theenumi.}
- \newcommand{\labelenumii}{(\theenumii)}
- \newcommand{\labelenumiii}{\theenumiii.}
- \newcommand{\labelenumiv}{\theenumiv.}
-\fi
-\renewcommand{\p@enumii}{\theenumi}
-\renewcommand{\p@enumiii}{\theenumi(\theenumii)}
-\renewcommand{\p@enumiv}{\p@enumiii\theenumiii}
-
-\newcommand{\labelitemi}{\hbox to 1\zw{\hss\textbullet\hss}}
-%\newcommand{\labelitemi}{•}
-\if@tate
- \newcommand{\labelitemii}{○}
- \newcommand{\labelitemiii}{*}
-\else
- \newcommand{\labelitemii}{\hbox to 1\zw{\hss\textendash\hss}}
- \newcommand{\labelitemiii}{\hbox to 1\zw{\hss\textasteriskcentered\hss}}
-\fi
-\newcommand{\labelitemiv}{\hbox to 1\zw{\hss ・\hss}}
+\def\@listii{\jlreq@init@list{ii}}
+\def\@listiii{\jlreq@init@list{iii}}
+\def\@listiv{\jlreq@init@list{iv}}
+\def\@listv{\jlreq@init@list{v}}
+\def\@listvi{\jlreq@init@list{vi}}
% 引用系.3.5.2の例.
\jlreq@jlreqsetup@add{quote_indent}{\def\jlreq@quote@indent{#1}}
\jlreq@jlreqsetup@add{quote_end_indent}{\def\jlreq@quote@end@indent{#1}}
\jlreq@jlreqsetup@add{quote_fontsize}[normalsize,small,footnotesize,scriptsize,tiny,]{\jlreq@ifempty{#1}{\def\jlreq@quote@fontsize{}}{\edef\jlreq@quote@fontsize{\expandonce{\csname #1\endcsname}}}}
\jlreq@jlreqsetup@add{quote_beforeafter_space}{\def\jlreq@quote@beforeafter@space{#1}}
-\jlreqsetup{quote_indent=2\zw,quote_end_indent=0pt,quote_fontsize=,quote_beforeafter_space=0pt}
\newenvironment{verse}
{\let\\\@centercr
@@ -5299,6 +5238,7 @@
\@mkboth{\refname}{\refname}%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
+ \labelsep=1\zw
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\itemindent=0pt
@@ -5331,11 +5271,13 @@
\columnseprule\z@ \columnsep 2\jlreq@mol
\twocolumn[\section*{\indexname}]%
\@mkboth{\indexname}{\indexname}%
- \thispagestyle{plain}%
+ \jlreq@theindex@pagestyle
\parindent\z@
\parskip\z@ \@plus .03\jlreq@gol\relax
\let\item\@idxitem
}{%
+ \ifx\jlreq@theindex@savedpagestyle\@undefined\else\expandafter\pagestyle\expandafter{\jlreq@theindex@savedpagestyle}\fi
+ \let\jlreq@theindex@savedpagestyle\@undefined
\if@restonecol\onecolumn\else\clearpage\fi
\ifjlreq@resttate\tate\fi
\jlreq@oldfontcommand@disable
@@ -5344,9 +5286,25 @@
\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}
+\def\jlreq@theindex@pagestyle{}
+\jlreq@jlreqsetup@add{theindex_pagestyle}{
+ \def\jlreq@tempa{}% ページスタイル名
+ \def\jlreq@theindex@pagestyle{}%
+ \jlreq@tempafalse % restore
+ \jlreq@parsekeyval@nokey{%
+ \ifjlreq@parsekeyval@nokey@novalue{\def\jlreq@tempa{##1}}{%
+ \jlreq@switch{##1}{%
+ {restore}{\csname jlreq@tempa##2\endcsname}%
+ }%
+ }%
+ }{#1}%
+ \eappto\jlreq@theindex@pagestyle{\unexpanded{\let\jlreq@theindex@savedpagestyle}\ifjlreq@tempa\noexpand\jlreq@current@pagestyle\else\noexpand\@undefined\fi}%
+ \ifx\jlreq@tempa\@empty\else
+ \eappto\jlreq@theindex@pagestyle{\noexpand\pagestyle{\expandonce{\jlreq@tempa}}}%
+ \fi
+}
%. 前付,後付,付録
-
% \jlreq@matter@heading[restoreする見出し一覧を入れる制御綴]{#2@<見出し命令名>に今の見出しの中身を入れる}{生成する制御綴の名前}{設定}
\def\jlreq@matter@heading{\@ifnextchar[{\jlreq@matter@heading@}{\jlreq@matter@heading@[]{}}}
\def\jlreq@matter@heading@[#1]#2#3#4{%
@@ -5395,21 +5353,19 @@
\fi
}%
% \jlreq@declareに\ModifyHeadingか\Renew***Headingを入れる
- \ifx\jlreq@\@empty\else
- \edef\jlreq@declare{\expandonce{\csname\jlreq@declaretype Heading\endcsname}{##1}}%
- \ifthenelse{\NOT \equal{\jlreq@declaretype}{Modify}}{%
- \ifx\jlreq@level\@empty
- % \frontmatter時でのレベルを引用する.
- \edef\jlreq@declare{%
- \unexpanded{\edef\jlreq@tempa}{\noexpand\unexpanded{\expandonce{\jlreq@declare}}{\noexpand\expandonce{\expandonce{\csname jlreq@heading@level@##1\endcsname}}}}%
- \noexpand\jlreq@tempa
- }%
- \else
- \eappto\jlreq@declare{{\expandonce{\jlreq@level}}}%
- \fi
- }{}%
- \eappto\jlreq@headingscmds{\expandonce{\jlreq@declare}{\expandonce{\jlreq@headingsettings}}}%
- \fi
+ \edef\jlreq@declare{\expandonce{\csname\jlreq@declaretype Heading\endcsname}{##1}}%
+ \ifthenelse{\NOT \equal{\jlreq@declaretype}{Modify}}{%
+ \ifx\jlreq@level\@empty
+ % \frontmatter時でのレベルを引用する.
+ \edef\jlreq@declare{%
+ \unexpanded{\edef\jlreq@tempa}{\noexpand\unexpanded{\expandonce{\jlreq@declare}}{\noexpand\expandonce{\expandonce{\csname jlreq@heading@level@##1\endcsname}}}}%
+ \noexpand\jlreq@tempa
+ }%
+ \else
+ \eappto\jlreq@declare{{\expandonce{\jlreq@level}}}%
+ \fi
+ }{}%
+ \eappto\jlreq@headingscmds{\expandonce{\jlreq@declare}{\expandonce{\jlreq@headingsettings}}}%
}{#4}%
\edef\jlreq@do{%
\unexpanded{\def#3}{%
@@ -5424,7 +5380,7 @@
\def\jlreq@matter@counter@norestore#1#2{%
\def#1{}%
\jlreq@parsekeyval@nokey{%
- \jlreq@parsekeyval{
+ \jlreq@parsekeyval*{
{value}{\appto#1{\setcounter{##1}{####1}}}
{the}{\eappto#1{\noexpand\def\expandonce{\csname the##1\endcsname}{\unexpanded{####1}}}}
}{##2}%
@@ -5432,7 +5388,6 @@
}
\ifthenelse{\equal{\jlreq@article@type}{book}}{
-% \tracingmacros=1
\newif\if@mainmatter
\@mainmattertrue
\jlreq@jlreqsetup@add{frontmatter_pagebreak}{%
@@ -5485,6 +5440,7 @@
\def\jlreq@pagination@frontmatterstyle{arabic}%
\let\jlreq@pagination@mainmatterpagecommand=\pagenumbering
\@for\jlreq@tempa:=#1\do{%
+ \expandafter\jlreq@helper@trim\expandafter{\jlreq@tempa}{\jlreq@tempa}%
\jlreq@switch{\jlreq@tempa}{
{continuous}{%
\def\jlreq@pagination@mainmatterpagecommand##1{\gdef\thepage{\csname @##1\endcsname\c@page}}%
@@ -5557,6 +5513,7 @@
\let\jlreq@pagination@backmatterpagecommand=\pagenumbering
\def\jlreq@pagination@backmatterstyle{arabic}%
\@for\jlreq@tempa:=#1\do{%
+ \expandafter\jlreq@helper@trim\expandafter{\jlreq@tempa}{\jlreq@tempa}%
\jlreq@switch{\jlreq@tempa}{
{continuous}{%
\def\jlreq@pagination@backmatterpagecommand##1{\gdef\thepage{\csname @##1\endcsname\c@page}}%
@@ -5576,48 +5533,6 @@
\expandafter\jlreq@pagination@backmatterpagecommand\expandafter{\jlreq@pagination@backmatterstyle}%
\jlreq@backmatter@postcode
}
- \jlreqsetup{
- frontmatter_pagebreak = cleardoublepage,
- frontmatter_pagestyle = {plain,restore = true},
- frontmatter_heading = {chapter={number=false, restore = true}},
- frontmatter_counter = {
- figure = {the = \arabic{figure},restore = true},
- table = {the = \arabic{table},restore = true},
- },
- frontmatter_precode = {},
- frontmatter_postcode = {},
- }
- \jlreqsetup{
- mainmatter_pagebreak = cleardoublepage,
- mainmatter_counter = {
- chapter = {value = 0},
- },
- mainmatter_pagestyle = {},
- mainmatter_heading = {},
- mainmatter_precode = {},
- mainmatter_postcode = {},
- }
- \if@openright
- \jlreqsetup{backmatter_pagebreak=cleardoublepage}
- \else
- \jlreqsetup{backmatter_pagebreak=clearpage}
- \fi
- \jlreqsetup{
- backmatter_pagestyle = plain,
- backmatter_counter = {
- chapter={value = 0, the = {}},
- figure = {value = 0, the = {\arabic{figure}}},
- table = {value = 0, the = {\arabic{table}}}
- },
- backmatter_heading = {chapter = {number = false}},
- backmatter_precode = {},
- backmatter_postcode = {}
- }
- \jlreqsetup{
- frontmatter_pagination = {independent,roman},
- mainmatter_pagination = {arabic},
- backmatter_pagination = {continuous,arabic},
- }
}{}
\jlreq@jlreqsetup@add{appendix_counter}{\jlreq@matter@counter@norestore{\jlreq@appendix@counter}{#1}}
@@ -5632,51 +5547,6 @@
\jlreq@appendix@postcode
}
-\ifthenelse{\equal{\jlreq@article@type}{article}}{
- \if@tate
- \jlreqsetup{
- appendix_counter = {
- section = {value = 0, the = {\jlreq@rensuji{\Alph{section}}}},
- subsection = {value = 0},
- }
- }
- \else
- \jlreqsetup{
- appendix_counter = {
- section = {value = 0, the = {\Alph{chapter}}},
- subsection = {value = 0},
- }
- }
- \fi
- \jlreqsetup{appendix_heading = {},appendix_precode = {},appendix_postcode = {}}
-}{%book, report
- \if@tate
- \jlreqsetup{
- appendix_counter = {
- chapter = {value = 0, the = {\jlreq@rensuji{\Alph{chapter}}}},
- }
- }
- \else
- \jlreqsetup{
- appendix_counter = {
- chapter = {value = 0, the = {\Alph{chapter}}},
- }
- }
- \fi
- \jlreqsetup{
- appendix_heading = {
- chapter = {label_format = {付録\thechapter}}
- },
- appendix_postcode = {%
- \ifthenelse{\equal{\jlreq@current@pagestyle}{headings}}{%
- \def\chaptermark#1{\markboth{付録\thechapter\quad #1}{}}%
- \ModifyPageStyle{headings}{mark_format={_chapter={付録\thechapter\quad #1}}}%
- }{}%
- },
- appendix_precode = {}
- }
-}
-
%. その他諸々
%.. 縦中横
\edef\@tempa{%
@@ -5731,14 +5601,14 @@
}
\def\jlreq@warekiyear#1#2#3#4{%
% 昭和:1989年1月7日まで
- \ifnum0\ifnum#1<1988 1\fi\ifnum#1=1989 \ifnum#2=1 \ifnum#3<8 1\fi\fi\fi>0
+ \ifnum0\ifnum#1<1989 1\fi\ifnum#1=1989 \ifnum#2=1 \ifnum#3<8 1\fi\fi\fi>0
昭和\jlreq@warekiyear@{#1}{1926}{#4}%
% 平成:2019年4月末日まで
- \else%\ifnum0\ifnum#1<2019 1\fi\ifnum#1=1989 \ifnum#2<5 1\fi\fi>0
+ \else\ifnum0\ifnum#1<2019 1\fi\ifnum#1=2019 \ifnum#2<5 1\fi\fi>0
平成\jlreq@warekiyear@{#1}{1989}{#4}%
-% \else
-% 新元号\jlreq@warekiyear@{#1}{2019}{#4}%
- \fi%\fi
+ \else
+ 令和\jlreq@warekiyear@{#1}{2019}{#4}%
+ \fi\fi
}
\def\jlreq@warekiyear@#1#2#3{\ifnum#1=#2 元年\else #3\numexpr#1-#2+1\relax 年\fi}
\def\today{%
@@ -5766,11 +5636,6 @@
{wareki}{\西暦false}
}
}
-\if@tate
- \jlreqsetup{year_style=wareki}
-\else
- \jlreqsetup{year_style=seireki}
-\fi
% 時刻
\hour=\time \divide\hour by 60
@@ -5813,15 +5678,301 @@
\def\jlreq@theorem@indent{#1}
\@ifpackageloaded{amsthm}{\jlreq@setupamsthm}{}
}
+
+
+%. デフォルト設定
+%.. 見出し
+\if@tate
+ \renewcommand{\thepart}{\jlreq@Kanji{part}}
+ \ifthenelse{\equal{\jlreq@article@type}{article}}{}{\renewcommand{\thechapter}{\jlreq@Kanji{chapter}}}
+ \renewcommand{\thesection}{\jlreq@rensuji{\@arabic\c@section}}
+ \renewcommand{\thesubsection}{\jlreq@rensuji{\@alph\c@subsection}}
+ \renewcommand{\thesubsubsection}{\jlreq@rensuji{\@arabic\c@subsubsection}}
+ \renewcommand{\theparagraph}{(\jlreq@rensuji{\@arabic\c@paragraph})}
+ \renewcommand{\thesubparagraph}{(\jlreq@rensuji{\@arabic\c@subparagraph})}
+
+ \ifthenelse{\equal{\jlreq@article@type}{article}}{
+ \NewBlockHeading{part}{0}{font={\jlreq@keepbaselineskip{\LARGE}},indent=4\zw,lines=4,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\large}}}
+ \if@twoside\ModifyHeading{part}{allowbreak_if_evenpage=true}\fi
+ }
+ {% book, report
+ \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\zw}},format={\null\vfill {\Huge\hspace*{2\zw}#1#2}\vspace*{2\jlreq@gol}}}
+ \NewBlockHeading{chapter}{0}{indent=2\zw,lines=6,label_format={第\thechapter 章},font={\huge},after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\Large}}}
+ \if@twoside\ModifyHeading{chapter}{allowbreak_if_evenpage=true}\fi
+ \renewcommand{\thechapter}{\jlreq@Kanji{chapter}}
+ }
+ \NewBlockHeading{section}{1}{font={\jlreq@keepbaselineskip{\Large}},indent=6\zw,lines=3,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\normalsize}}}
+ \if@twoside\ModifyHeading{section}{allowbreak_if_evenpage=true}\fi
+ \NewBlockHeading{subsection}{2}{font={\jlreq@keepbaselineskip{\large}},indent=8\zw,lines=2,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\small}}}
+ \if@twoside\ModifyHeading{subsection}{allowbreak_if_evenpage=true}\fi
+ \NewBlockHeading{subsubsection}{3}{font={\jlreq@keepbaselineskip{\normalsize}},indent=10\zw,lines=1,before_lines=1,subtitle_break=false,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},,subtitle_font={\jlreq@keepbaselineskip{\scriptsize}}}
+ \if@twoside\ModifyHeading{subsubsection}{allowbreak_if_evenpage=true}\fi
+ \NewRuninHeading{paragraph}{4}{font={\jlreq@keepbaselineskip{\normalsize}}}
+ \NewRuninHeading{subparagraph}{5}{font={\jlreq@keepbaselineskip{\normalsize}},indent=1\zw}
+\else% yoko
+ \renewcommand{\thepart}{\Roman{part}}
+ \renewcommand{\thesubsection}{\thesection .\arabic{subsection}}
+ \renewcommand{\thesubsubsection}{\thesubsection .\arabic{subsubsection}}
+ \renewcommand{\theparagraph}{\thesubsubsection .\arabic{paragraph}}
+ \renewcommand{\thesubparagraph}{\theparagraph .\arabic{subparagraph}}
+ \ifthenelse{\equal{\jlreq@article@type}{article}}{
+ \NewBlockHeading{part}{0}{font={\jlreq@keepbaselineskip{\LARGE\sffamily\bfseries}},label_format={第\thepart 部},lines=4,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\large}}}
+ \renewcommand{\thesection}{\arabic{section}}
+ }
+ {% book, report
+ \NewTobiraHeading{part}{-1}{label_format={第\thepart 部\hspace*{1\jlreq@gol}},format={\null\vfil {\Huge\sffamily\bfseries #1#2}\vfil}}
+ \NewBlockHeading{chapter}{0}{%
+ font={\jlreq@keepbaselineskip{\huge\sffamily\bfseries}},
+ label_format={第\thechapter 章},
+ lines=5,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},
+ subtitle_font={\jlreq@keepbaselineskip{\Large}}}
+ \renewcommand{\thechapter}{\arabic{chapter}}
+ \renewcommand{\thesection}{\thechapter.\arabic{section}}
+ }
+ \NewBlockHeading{section}{1}{font={\jlreq@keepbaselineskip{\Large\sffamily\bfseries}},lines=3,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\normalsize}}}
+ \NewBlockHeading{subsection}{2}{font={\jlreq@keepbaselineskip{\large\sffamily\bfseries}},lines=2,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\small}}}
+ \NewBlockHeading{subsubsection}{3}{font={\jlreq@keepbaselineskip{\normalsize\sffamily\bfseries}},lines=1,before_lines=1,subtitle_break=false,after_label_space=1\zw,second_heading_text_indent={-1\zw,1\zw},subtitle_font={\jlreq@keepbaselineskip{\scriptsize}}}
+ \NewRuninHeading{paragraph}{4}{font={\jlreq@keepbaselineskip{\normalsize\sffamily\bfseries}},indent=1\zw}
+ \NewRuninHeading{subparagraph}{5}{font={\jlreq@keepbaselineskip{\normalsize\sffamily\bfseries}},indent=2\zw}
+\fi
+
+\ifthenelse{\equal{\jlreq@article@type}{article}}{}{% book, report
+ \if@openright
+ \ModifyHeading{part}{type=naka}
+ \if@tate
+ \ModifyHeading{chapter}{pagebreak=begin_with_even_page}
+ \else
+ \ModifyHeading{chapter}{pagebreak=begin_with_odd_page}
+ \fi
+ \else
+ \ModifyHeading{part}{type=han}
+ \ModifyHeading{chapter}{pagebreak=clearpage}
+ \fi
+}
+
+%.. ページスタイル
+\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={},clear_markcommand=false}
+ \NewPageStyle{myheadings}{nombre=\thepage,odd_running_head=\rightmark,even_running_head=\leftmark,clear_markcommand=false}
+ \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},clear_markcommand=false}
+ \ModifyPageStyle{headings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center}
+ \NewPageStyle{myheadings}{nombre=\thepage,nombre_position=bottom-center,running_head_position=top-center,odd_running_head=\rightmark,even_running_head=\leftmark,clear_markcommand=false}
+\fi
+\ModifyPageStyle{plain}{font=\small}
+\ModifyPageStyle{headings}{font=\small}
+\ModifyPageStyle{myheadings}{font=\small}
+
+%.. 注
+\jlreqsetup{reference_mark=inline}
+\if@tate
+ \jlreqsetup{footnote_indent=1\zw}% 根拠なし
+\else
+ \jlreqsetup{footnote_indent=0pt}% (4.2.5.b)
+\fi
+\jlreqsetup{footnote_second_indent=1\zw}
+\jlreqsetup{endnote_second_indent=2\zw}
+\jlreqsetup{endnote_position=headings}
+\ifdim\marginparwidth>0pt
+ \jlreqsetup{sidenote_type=number}
+ \jlreqsetup{sidenote_symbol=*,sidenote_keyword_font={}}
+\fi
+
+%.. キャプション
+\jlreqsetup{
+ caption_font={\sffamily\bfseries},
+ caption_label_font={\sffamily\bfseries},
+ caption_after_label_space=1\zw,
+ caption_label_format={#1},
+ caption_align=center
+}
+
+%.. 箇条書き
+\if@tate
+ \renewcommand{\theenumi}{\jlreq@Kanji{enumi}}
+ \renewcommand{\theenumii}{\jlreq@rensuji{\@arabic\c@enumii}}
+ \renewcommand{\theenumiii}{\jlreq@rensuji{\@arabic\c@enumiii}}
+ \renewcommand{\theenumiv}{\jlreq@rensuji{\@arabic\c@enumiv}}
+ \newcommand{\labelenumi}{\theenumi}
+ \newcommand{\labelenumii}{\theenumii}
+ \newcommand{\labelenumiii}{\theenumiii}
+ \newcommand{\labelenumiv}{\theenumiv}
+\else
+ \renewcommand{\theenumi}{\@arabic\c@enumi}
+ \renewcommand{\theenumii}{\@alph\c@enumii}
+ \renewcommand{\theenumiii}{\@roman\c@enumiii}
+ \renewcommand{\theenumiv}{\@Alph\c@enumiv}
+ \newcommand{\labelenumi}{\theenumi.\hspace{.5\zw}}
+ \newcommand{\labelenumii}{(\theenumii)\hspace{.5\zw}}
+ \newcommand{\labelenumiii}{\theenumiii.\hspace{.5\zw}}
+ \newcommand{\labelenumiv}{\theenumiv.\hspace{.5\zw}}
+\fi
+\renewcommand{\p@enumii}{\theenumi}
+\renewcommand{\p@enumiii}{\theenumi(\theenumii)}
+\renewcommand{\p@enumiv}{\p@enumiii\theenumiii}
+
+\newcommand{\labelitemi}{\hbox to 1\zw{\hss\textbullet\hss}}
+%\newcommand{\labelitemi}{•}
+\if@tate
+ \newcommand{\labelitemii}{○}
+ \newcommand{\labelitemiii}{*}
+\else
+ \newcommand{\labelitemii}{\hbox to 1\zw{\hss\textendash\hss}}
+ \newcommand{\labelitemiii}{\hbox to 1\zw{\hss\textasteriskcentered\hss}}
+\fi
+\newcommand{\labelitemiv}{\hbox to 1\zw{\hss ・\hss}}
+
+% 見出しが一つ上のレベルからどのくらいずれているかを入れる.
+\setlength\leftmargini{2\zw}
+\setlength\leftmarginii{2\zw}
+\setlength\leftmarginiii{1\zw}
+\setlength\leftmarginiv{1\zw}
+\setlength\leftmarginv{1\zw}
+\setlength\leftmarginvi{1\zw}
+\jlreqsetup{
+ itemization_beforeafter_space={0pt,i=.5\baselineskip},
+ itemization_itemsep=0pt,
+ itemization_labelsep={0pt},
+ itemization_label_length={1\zw,i=2\zw,ii=2\zw}
+}
+
+%.. 引用
+\jlreqsetup{
+ quote_indent=2\zw,
+ quote_end_indent=0pt,
+ quote_fontsize=,
+ quote_beforeafter_space=0pt
+}
+
+%.. その他
+\ifthenelse{\equal{\jlreq@article@type}{book}}{
+ \jlreqsetup{
+ frontmatter_pagebreak = cleardoublepage,
+ frontmatter_pagestyle = {plain,restore = true},
+ frontmatter_heading = {chapter={number=false, restore = true}},
+ frontmatter_counter = {
+ figure = {the = \arabic{figure},restore = true},
+ table = {the = \arabic{table},restore = true},
+ },
+ frontmatter_precode = {},
+ frontmatter_postcode = {},
+ }
+ \jlreqsetup{
+ mainmatter_pagebreak = cleardoublepage,
+ mainmatter_counter = {
+ chapter = {value = 0},
+ },
+ mainmatter_pagestyle = {},
+ mainmatter_heading = {},
+ mainmatter_precode = {},
+ mainmatter_postcode = {},
+ }
+ \if@openright
+ \jlreqsetup{backmatter_pagebreak=cleardoublepage}
+ \else
+ \jlreqsetup{backmatter_pagebreak=clearpage}
+ \fi
+ \jlreqsetup{
+ backmatter_pagestyle = plain,
+ backmatter_counter = {
+ chapter={value = 0, the = {}},
+ figure = {value = 0, the = {\arabic{figure}}},
+ table = {value = 0, the = {\arabic{table}}}
+ },
+ backmatter_heading = {chapter = {number = false}},
+ backmatter_precode = {},
+ backmatter_postcode = {}
+ }
+ \jlreqsetup{
+ frontmatter_pagination = {independent,roman},
+ mainmatter_pagination = {arabic},
+ backmatter_pagination = {continuous,arabic},
+ }
+}{}
+\ifthenelse{\equal{\jlreq@article@type}{article}}{
+ \if@tate
+ \jlreqsetup{
+ appendix_counter = {
+ section = {value = 0, the = {\jlreq@rensuji{\Alph{section}}}},
+ subsection = {value = 0},
+ }
+ }
+ \else
+ \jlreqsetup{
+ appendix_counter = {
+ section = {value = 0, the = {\Alph{chapter}}},
+ subsection = {value = 0},
+ }
+ }
+ \fi
+ \jlreqsetup{appendix_heading = {},appendix_precode = {},appendix_postcode = {}}
+}{%book, report
+ \if@tate
+ \jlreqsetup{
+ appendix_counter = {
+ chapter = {value = 0, the = {\jlreq@rensuji{\Alph{chapter}}}},
+ }
+ }
+ \else
+ \jlreqsetup{
+ appendix_counter = {
+ chapter = {value = 0, the = {\Alph{chapter}}},
+ }
+ }
+ \fi
+ \jlreqsetup{
+ appendix_heading = {
+ chapter = {label_format = {付録\thechapter}}
+ },
+ appendix_postcode = {%
+ \ifthenelse{\equal{\jlreq@current@pagestyle}{headings}}{%
+ \def\chaptermark#1{\markboth{付録\thechapter\quad #1}{}}%
+ \ModifyPageStyle{headings}{mark_format={_chapter={付録\thechapter\quad #1}}}%
+ }{}%
+ },
+ appendix_precode = {}
+ }
+}
+\jlreqsetup{theindex_pagestyle=plain}
+\jlreqsetup{year_style=seireki}
\jlreqsetup{theorem_beforeafter_space=1\baselineskip,theorem_indent=0pt}
-% デフォルト設定
\newcommand{\contentsname}{目次}
\newcommand{\refname}{参考文献}
\newcommand{\indexname}{索引}
+\newcommand{\listfigurename}{図目次}
+\newcommand{\figurename}{図}
+\newcommand{\listtablename}{表目次}
+\newcommand{\tablename}{表}
\pagestyle{plain}
\pagenumbering{arabic}
+
+%. 最終処理
\if@twocolumn
\twocolumn
\sloppy