templates/latex/review-jsbook/review-base.sty in review-3.2.0 vs templates/latex/review-jsbook/review-base.sty in review-4.0.0
- old
+ new
@@ -130,27 +130,27 @@
\newenvironment{reviewequationblock}{\needspace{2\Cvs}}{}
\newenvironment{reviewlistblock}{\needspace{2\Cvs}}{}
\newenvironment{reviewemlist}{%
- \medskip\small\begin{shaded}\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
+ \medskip\small\begin{shaded}\ifdefined\reviewlistxkanjiskip\xkanjiskip=\reviewlistxkanjiskip\fi\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
\end{alltt}\end{shaded}}
\newenvironment{reviewlist}{%
- \begin{shaded}\small\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
+ \begin{shaded}\small\ifdefined\reviewlistxkanjiskip\xkanjiskip=\reviewlistxkanjiskip\fi\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
\end{alltt}\end{shaded}\par\vspace*{0.5zw}}
\newenvironment{reviewsource}{%
- \begin{shaded}\small\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
+ \begin{shaded}\small\ifdefined\reviewlistxkanjiskip\xkanjiskip=\reviewlistxkanjiskip\fi\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
\end{alltt}\end{shaded}\par\vspace*{0.5zw}}
\newenvironment{reviewcmd}{%
- \color{white}\medskip\small\begin{shadedb}\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
+ \color{white}\medskip\small\ifdefined\reviewlistxkanjiskip\xkanjiskip=\reviewlistxkanjiskip\fi\begin{shadedb}\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
\end{alltt}\end{shadedb}}
\newenvironment{reviewbox}{%
- \medskip\small\begin{framed}\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
+ \medskip\small\begin{framed}\ifdefined\reviewlistxkanjiskip\xkanjiskip=\reviewlistxkanjiskip\fi\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
\end{alltt}\end{framed}}
\newenvironment{reviewtable}[1]{%
\begin{center}\small\setlength{\baselineskip}{1.2zw}
\begin{tabular}{#1}}{%
@@ -203,11 +203,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}
\newenvironment{reviewpart}{%
\setcounter{section}{0}%
\renewcommand{\thesection}{\thepart.\@arabic\c@section}%
@@ -262,14 +262,62 @@
\DeclareRobustCommand{\reviewstrong}[1]{\textbf{#1}}
\DeclareRobustCommand{\reviewballoon}[1]{←{#1}}
\DeclareRobustCommand{\reviewunderline}[1]{\Underline{#1}}
\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}
@@ -348,9 +396,16 @@
\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