templates/latex/review-jlreq/review-base.sty in review-3.2.0 vs templates/latex/review-jlreq/review-base.sty in review-4.0.0
- old
+ new
@@ -1,41 +1,48 @@
% jlreq用基本設定
-\newcommand*\PDFDocumentInformation[1]{%
- \AtBeginShipoutFirst{\special{pdf:docinfo <<#1>>}}}
-\@onlypreamble\PDFDocumentInformation
+\def\recls@tmp{luatex}\ifx\recls@tmp\recls@driver
+ \hypersetup{
+ pdftitle={\review@booktitlename},
+ pdfauthor={\review@autnames},
+ pdfcreator={Re:VIEW \review@reviewversion, with LaTeX}
+ }
+\else
+ \newcommand*\PDFDocumentInformation[1]{%
+ \AtBeginShipoutFirst{\special{pdf:docinfo <<#1>>}}}
+ \@onlypreamble\PDFDocumentInformation
+ \PDFDocumentInformation{
+ /Title (\review@booktitlename)
+ /Author (\review@autnames)
+ % /Subject ()
+ % /Keywords (,,)
+ /Creator (Re:VIEW \review@reviewversion, with LaTeX)
+ }
+\fi
-\PDFDocumentInformation{
- /Title (\review@booktitlename)
- /Author (\review@autnames)
- % /Subject ()
- % /Keywords (,,)
- /Creator (Re:VIEW \review@reviewversion, with LaTeX)
-}
-
\RequirePackage{pxrubrica}
\@ifpackagelater{pxrubrica}{2017/04/20}{% true
\rubysetup{J}}{% false
\rubysetup{g}}
\long\def\review@ifempty#1{\expandafter\ifx\expandafter\relax\detokenize{#1}\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
% コードリスト装飾のデフォルト
\newenvironment{reviewemlist}{%
- \begin{tcolorbox}[skin=enhanced jigsaw,breakable,colback=black!10,colframe=black!10,boxrule=0mm,arc=0mm]\begin{alltt}}%
+ \begin{tcolorbox}[skin=enhanced jigsaw,breakable,colback=black!10,colframe=black!10,boxrule=0mm,arc=0mm]\ifdefined\reviewlistxkanjiskip\xkanjiskip=\reviewlistxkanjiskip\fi\begin{alltt}}%
{\end{alltt}\end{tcolorbox}}
\newenvironment{reviewlist}{%
- \begin{tcolorbox}[skin=enhanced jigsaw,breakable,colback=white,colframe=black,boxrule=0.15mm,arc=0mm]\begin{alltt}}%
+ \begin{tcolorbox}[skin=enhanced jigsaw,breakable,colback=white,colframe=black,boxrule=0.15mm,arc=0mm]\ifdefined\reviewlistxkanjiskip\xkanjiskip=\reviewlistxkanjiskip\fi\begin{alltt}}%
{\end{alltt}\end{tcolorbox}}
\newenvironment{reviewsource}{%
- \begin{tcolorbox}[skin=enhanced jigsaw,breakable,colback=white,colframe=black,boxrule=0.15mm,arc=0mm]\begin{alltt}}%
+ \begin{tcolorbox}[skin=enhanced jigsaw,breakable,colback=white,colframe=black,boxrule=0.15mm,arc=0mm]\ifdefined\reviewlistxkanjiskip\xkanjiskip=\reviewlistxkanjiskip\fi\begin{alltt}}%
{\end{alltt}\end{tcolorbox}}
\newenvironment{reviewcmd}{%
- \begin{tcolorbox}[skin=enhanced jigsaw,breakable,colback=black!99,colframe=black!99,boxrule=0mm,arc=0mm]\begin{alltt}\begingroup\color{white}\ignorespaces}%
- {\endgroup\end{alltt}\end{tcolorbox}}
+ \begin{tcolorbox}[skin=enhanced jigsaw,breakable,colback=black!99,coltext=white,colframe=black!99,boxrule=0mm,arc=0mm]\ifdefined\reviewlistxkanjiskip\xkanjiskip=\reviewlistxkanjiskip\fi\begin{alltt}}%
+ {\end{alltt}\end{tcolorbox}}
% 図
\newenvironment{reviewimage}{%
\begin{figure}\begin{center}}{\end{center}\end{figure}}
@@ -75,11 +82,11 @@
% 古いjlreq.clsへの互換(当面のad-hoc対応)
\ifdefined\jlreq@@makecaption@font@setting
\else
\let\jlreq@@makecaption@font@setting\jlreq@@makecaption@font
\fi
-\ifdefined\jlreq@@makecaption@label@@font@setting
+\ifdefined\jlreq@@makecaption@label@font@setting
\else
\let\jlreq@@makecaption@label@font@setting\jlreq@@makecaption@label@font
\fi
\renewcommand{\@makecaption}[2]{{% %本当はl,c,rを[]で指定したい
@@ -113,11 +120,11 @@
\newcommand{\reviewimageref}[2]{\review@intn@image #1}
\newcommand{\reviewtableref}[2]{\review@intn@table #1}
\newcommand{\reviewlistref}[1]{\review@intn@list #1}
\newcommand{\reviewequationref}[1]{\review@intn@equation #1}
\newcommand{\reviewbibref}[2]{#1}
-\newcommand{\reviewcolumnref}[2]{\review@intn@columnname #1}
+\newcommand{\reviewcolumnref}[2]{#1}
\newcommand{\reviewsecref}[2]{#1}
\renewcommand{\contentsname}{\review@toctitle}
\newenvironment{reviewpart}{%
@@ -165,14 +172,62 @@
\DeclareRobustCommand{\reviewem}[1]{\textbf{#1}}
\DeclareRobustCommand{\reviewstrong}[1]{\textbf{#1}}
\DeclareRobustCommand{\reviewunderline}[1]{\underline{#1}}% ulemかjumolineで上書き。デフォルトはulemにしている
\DeclareRobustCommand{\reviewit}[1]{\textit{#1}}
\DeclareRobustCommand{\reviewbold}[1]{\textbf{#1}}
-\DeclareRobustCommand{\reviewcode}[1]{\texttt{#1}}
-\DeclareRobustCommand{\reviewtt}[1]{\texttt{#1}}
-\DeclareRobustCommand{\reviewtti}[1]{\texttt{\textit{#1}}}
-\DeclareRobustCommand{\reviewttb}[1]{\texttt{\textbf{#1}}}
+
+% allow break line in tt
+% contributed by @zr_tex8r
+\newif\ifreview@ba@break
+\def\review@ba@end{\review@ba@end@}
+\DeclareRobustCommand{\reviewbreakall}[1]{%
+ \begingroup
+ \review@ba@breakfalse
+ \review@break@all@a#1\review@ba@end
+ \endgroup
+}
+\def\review@break@all@a{%
+ \futurelet\review@ba@tok\review@break@all@b
+}
+\def\review@break@all@b{%
+ \ifx\review@ba@tok\review@ba@end
+ \let\next\@gobble
+ \else\ifx\review@ba@tok\@sptoken
+ \let\next\review@break@all@c
+ \else\ifx\review@ba@tok~%
+ \let\next\review@break@all@d
+ \else\ifx\review@ba@tok\bgroup
+ \let\next\review@break@all@e
+ \else
+ \let\next\review@break@all@f
+ \fi\fi\fi\fi
+ \next
+}
+\expandafter\def\expandafter\review@break@all@c\space{%
+ \space
+ \review@ba@breakfalse
+ \review@break@all@a
+}
+\def\review@break@all@d#1{%
+ \review@break@all@f{\mbox{\space}}%
+}
+\def\review@break@all@e#1{%
+ \review@break@all@f{{#1}}%
+}
+\def\review@break@all@f#1{%
+ \ifreview@ba@break
+ \hskip0pt plus 0.02em\relax
+ \fi
+ #1%
+ \review@ba@breaktrue
+ \review@break@all@a
+}
+\DeclareRobustCommand{\reviewtt}[1]{{\ttfamily\reviewbreakall{#1}}}
+\DeclareRobustCommand{\reviewcode}[1]{{\ttfamily\reviewbreakall{#1}}}
+\DeclareRobustCommand{\reviewtti}[1]{{\ttfamily\itshape\reviewbreakall{#1}}}
+\DeclareRobustCommand{\reviewttb}[1]{{\ttfamily\bfseries\reviewbreakall{#1}}}
+
\DeclareRobustCommand{\reviewbou}[1]{\kenten{#1}}
%% @<del> is ignored in LaTeX with default style
%% \DeclareRobustCommand{\reviewstrike}[1]{#1}
%%%% for ulem.sty:
@@ -249,19 +304,26 @@
\def\reviewbackmatterhook{%
\backmatter
}
% cover
+\newcommand*\covermatter{%
+ \ifdefined\review@usecovernombre%
+ \pagenumbering{coverpagezero}
+ \setcounter{page}{0}% force to even page, to avoid empty page
+ \fi
+}
+
\if@reclscover
-\ifdefined\review@coverimage
- \def\reviewcoverpagecont{%
- \expandafter\includefullpagegraphics\expandafter[\review@coverimageoption]{\review@coverimage}
- \cleardoublepage
- }
-\fi
-\ifdefined\review@coverfile
- \def\reviewcoverpagecont{\review@coverfile}
-\fi
+ \ifdefined\review@coverimage
+ \def\reviewcoverpagecont{%
+ \expandafter\includefullpagegraphics\expandafter[\review@coverimageoption]{\review@coverimage}
+ \cleardoublepage
+ }
+ \fi
+ \ifdefined\review@coverfile
+ \def\reviewcoverpagecont{\review@coverfile}
+ \fi
\fi
% titlepage
\ifdefined\review@titlepage
\ifthenelse{\isundefined{\review@titlefile}}{%