templates/latex/review-jlreq/review-jlreq.cls in review-4.2.0 vs templates/latex/review-jlreq/review-jlreq.cls in review-5.0.0
- old
+ new
@@ -1,7 +1,7 @@
%#!ptex2pdf -l -u -ot '-synctex=1' test-rejlreqbk
-% Copyright (c) 2018-2019 Kenshi Muto.
+% Copyright (c) 2018-2020 Kenshi Muto.
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the "Software"), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@@ -18,12 +18,11 @@
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
% THE SOFTWARE.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{review-jlreq}[2019/11/11 Re:VIEW pLaTeX class modified for jlreq.
-cls]
+\ProvidesClass{review-jlreq}[2020/08/16 Re:VIEW 5.0 upLaTeX/LuaLaTeX class modified for jlreq.cls]
%% hook at end of reviewmacro
\let\@endofreviewmacrohook\@empty
\def\AtEndOfReVIEWMacro{%
\g@addto@macro\@endofreviewmacrohook}
@@ -63,60 +62,45 @@
\def\recls@set@hiddenfolio#1{\ifx#1\@empty\else
\@ifundefined{@makehiddenfolio@#1}{%
\recls@error{Not define such hiddenfolio: #1}}\relax
%% set hiddenfolio preset
\expandafter\let\expandafter\@makehiddenfolio\csname @makehiddenfolio@#1\endcsname
- %% redefine to output \@makehiddenfolio for every page
- %% TODO: would better to use \jlreqtrimmarkssetup
- \@bannertoken{\hskip-5mm\smash{\hiddenfolio@font\@makehiddenfolio}}%
- \def\jlreq@trimmarks@banner@even@yoko@top@left{\hskip-5mm\smash{\hiddenfolio@font\@makehiddenfolio}}%
- \AddEverypageHook{\maketombowbox}%
+ \@makehiddenfolio
\fi}
\def\hiddenfolio@font{\reset@font
\scriptsize\sffamily\baselineskip.8\baselineskip}
%% hiddenfolio=default
\@namedef{@makehiddenfolio@default}{%
- \ifodd\c@page
- \llap{\thepage\hspace{\dimexpr\recls@tombobleed}}%
- \else
- \rlap{\hspace{\dimexpr\paperwidth+\recls@tombobleed}\thepage}%
- \fi}
+ \jlreqtrimmarkssetup{banner = { top-gutter = { \hiddenfolio@font\selectfont \thepage} } } }
%% hiddenfolio=marusho-ink
\@namedef{@makehiddenfolio@marusho-ink}{%
- \gdef\recls@tombobleed{5mm}%
+ \gdef\recls@tombobleed{5mm}% XXX: won't work. should set via bleed_margin
\@nameuse{@makehiddenfolio@nikko-pc}}
%% hiddenfolio=nikko-pc
\@namedef{@makehiddenfolio@nikko-pc}{%
- \def\recls@hiddfolio{%
- \edef\recls@tmp{\thepage}%
- \lower\dimexpr4pt+\recls@tombobleed+.5\paperheight+5\p@\hbox{%
- \vbox{\expandafter\@tfor\expandafter\recls@x\expandafter:\expandafter=\recls@tmp\do{%
- \hbox to 1\zw{\hss\recls@x\hss}}}}}%
- \ifodd\c@page
- \rlap{\recls@hiddfolio}%
- \else
- \llap{\recls@hiddfolio\hspace{-\paperwidth}}%
- \fi}
+ \jlreqtrimmarkssetup{banner = { center-gutter = { in = {\hiddenfolio@font\selectfont \thepage} } } } }
%% hiddenfolio=shippo
\@namedef{@makehiddenfolio@shippo}{%
\@nameuse{@makehiddenfolio@nikko-pc}}
%% media=print,ebook,preview
\newif\if@cameraready \@camerareadyfalse
\newif\if@pdfhyperlink \@pdfhyperlinkfalse
\newif\if@pdftombo \@pdftombofalse
\newif\if@reclscover \@reclscovertrue
+\newif\ifrecls@coverfitpage \recls@coverfitpagefalse
\newif\ifrecls@serialpage \recls@serialpagefalse
\DeclareOptionX{cameraready}[print]{\gdef\recls@cameraready{#1}}
\DeclareOptionX{media}[print]{\gdef\recls@cameraready{#1}}
\DeclareOptionX{tombopaper}[a4]{\gdef\recls@tombopaper{#1}}
\DeclareOptionX{bleed_margin}[3mm]{\gdef\recls@tombobleed{#1}}
\DeclareOptionX{cover}[\@empty]{\gdef\recls@forcecover{#1}}
+\DeclareOptionX{cover_fit_page}[false]{\csname recls@coverfitpage#1\endcsname}
\DeclareOptionX{startpage}[1]{\gdef\recls@startpage{\numexpr #1\relax}}
\DeclareOptionX{serial_pagination}[false]{\csname recls@serialpage#1\endcsname}
%% 隠しノンブルプリセット
\DeclareOptionX{hiddenfolio}{\gdef\recls@hiddenfolio{#1}}%%default: (none)