summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/uplatex/base/ujbook.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/uplatex/base/ujbook.cls')
-rw-r--r--Master/texmf-dist/tex/uplatex/base/ujbook.cls96
1 files changed, 73 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/uplatex/base/ujbook.cls b/Master/texmf-dist/tex/uplatex/base/ujbook.cls
index ec010d418d2..8d7a5963259 100644
--- a/Master/texmf-dist/tex/uplatex/base/ujbook.cls
+++ b/Master/texmf-dist/tex/uplatex/base/ujbook.cls
@@ -16,7 +16,7 @@
%% File: ujclasses.dtx
\NeedsTeXFormat{pLaTeX2e}
\ProvidesClass{ujbook}
- [2016/11/22 v1.7b-u00
+ [2017/03/05 v1.7e-u00
Standard upLaTeX class]
\newcounter{@paper}
\newif\if@landscape \@landscapefalse
@@ -25,6 +25,7 @@
\newif\if@titlepage
\@titlepagetrue
\newif\if@openright
+\newif\if@openleft
\newif\if@mainmatter \@mainmattertrue
\hour\time \divide\hour by 60\relax
\@tempcnta\hour \multiply\@tempcnta 60\relax
@@ -83,8 +84,8 @@
\tombowtrue \tombowdatetrue
\setlength{\@tombowwidth}{.1\p@}%
\@bannertoken{%
- \jobname\space:\space\number\year/\number\month/\number\day
- (\number\hour:\number\minute)}
+ \jobname\space(\number\year-\two@digits\month-\two@digits\day
+ \space\two@digits\hour:\two@digits\minute)}%
\maketombowbox}
\DeclareOption{tombo}{%
\tombowtrue \tombowdatefalse
@@ -107,8 +108,9 @@
\if@compatibility
\@openrighttrue
\else
-\DeclareOption{openright}{\@openrighttrue}
-\DeclareOption{openany}{\@openrightfalse}
+\DeclareOption{openright}{\@openrighttrue\@openleftfalse}
+\DeclareOption{openleft}{\@openlefttrue\@openrightfalse}
+\DeclareOption{openany}{\@openrightfalse\@openleftfalse}
\fi
\DeclareOption{leqno}{\input{leqno.clo}}
\DeclareOption{fleqn}{\input{fleqn.clo}}
@@ -156,6 +158,45 @@
\renewcommand{\floatpagefraction}{.5}
\renewcommand{\dbltopfraction}{.7}
\renewcommand{\dblfloatpagefraction}{.5}
+\def\pltx@cleartorightpage{\clearpage\if@twoside
+ \ifodd\c@page
+ \iftdir
+ \hbox{}\thispagestyle{empty}\newpage
+ \if@twocolumn\hbox{}\newpage\fi
+ \fi
+ \else
+ \ifydir
+ \hbox{}\thispagestyle{empty}\newpage
+ \if@twocolumn\hbox{}\newpage\fi
+ \fi
+ \fi\fi}
+\def\pltx@cleartoleftpage{\clearpage\if@twoside
+ \ifodd\c@page
+ \ifydir
+ \hbox{}\thispagestyle{empty}\newpage
+ \if@twocolumn\hbox{}\newpage\fi
+ \fi
+ \else
+ \iftdir
+ \hbox{}\thispagestyle{empty}\newpage
+ \if@twocolumn\hbox{}\newpage\fi
+ \fi
+ \fi\fi}
+\def\pltx@cleartooddpage{\clearpage\if@twoside
+ \ifodd\c@page\else
+ \hbox{}\thispagestyle{empty}\newpage
+ \if@twocolumn\hbox{}\newpage\fi
+ \fi\fi}
+\def\pltx@cleartoevenpage{\clearpage\if@twoside
+ \ifodd\c@page
+ \hbox{}\thispagestyle{empty}\newpage
+ \if@twocolumn\hbox{}\newpage\fi
+ \fi\fi}
+\if@openleft
+ \let\cleardoublepage\pltx@cleartoleftpage
+\else\if@openright
+ \let\cleardoublepage\pltx@cleartorightpage
+\fi\fi
\def\ps@plain{\let\@mkboth\@gobbletwo
\let\ps@jpl@in\ps@plain
\let\@oddhead\@empty
@@ -181,9 +222,9 @@
\let\@mkboth\markboth
\def\chaptermark##1{\markboth{%
\ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
+ \if@mainmatter
\@chapapp\thechapter\@chappos\hskip1zw
- \fi
+ \fi
\fi
##1}{}}%
\def\sectionmark##1{\markright{%
@@ -197,9 +238,9 @@
\let\@mkboth\markboth
\def\chaptermark##1{\markright{%
\ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
+ \if@mainmatter
\@chapapp\thechapter\@chappos\hskip1zw
- \fi
+ \fi
\fi
##1}}%
}
@@ -213,9 +254,9 @@
\let\@mkboth\markboth
\def\chaptermark##1{\markboth{%
\ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
+ \if@mainmatter
\@chapapp\thechapter\@chappos\hskip1zw
- \fi
+ \fi
\fi
##1}{}}%
\def\sectionmark##1{\markright{%
@@ -229,9 +270,9 @@
\let\@mkboth\markboth
\def\chaptermark##1{\markright{%
\ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
+ \if@mainmatter
\@chapapp\thechapter\@chappos\hskip1zw
- \fi
+ \fi
\fi
##1}}%
}
@@ -247,7 +288,7 @@
\if@compatibility
\newenvironment{titlepage}
{%
- \cleardoublepage
+ \cleardoublepage
\if@twocolumn\@restonecoltrue\onecolumn
\else\@restonecolfalse\newpage\fi
\thispagestyle{empty}%
@@ -258,14 +299,14 @@
\else
\newenvironment{titlepage}
{%
- \cleardoublepage
+ \pltx@cleartooddpage %% 2017/02/15
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse\newpage
\fi
\thispagestyle{empty}%
- \setcounter{page}\@ne
+ \ifodd\c@page\setcounter{page}\@ne\else\setcounter{page}\z@\fi %% 2017/02/15
}%
{\if@restonecol\twocolumn \else \newpage \fi
\if@twoside\else
@@ -275,7 +316,7 @@
\fi
\def\p@thanks#1{\footnotemark
\protected@xdef\@thanks{\@thanks
- \protect{\noindent$\m@th^\thefootnote$~#1\protect\par}}}
+ \protect{\noindent\hbox{\yoko$\m@th^\thefootnote$}#1\protect\par}}}
\if@titlepage
\newcommand{\maketitle}{\begin{titlepage}%
\let\footnotesize\small
@@ -381,16 +422,18 @@
\newcommand{\@chapapp}{\prechaptername}
\newcommand{\@chappos}{\postchaptername}
\newcommand{\frontmatter}{%
- \if@openright \cleardoublepage \else \clearpage \fi
+ \pltx@cleartooddpage
\@mainmatterfalse\pagenumbering{roman}}
\newcommand{\mainmatter}{%
- \if@openright \cleardoublepage \else \clearpage \fi
+ \pltx@cleartooddpage
\@mainmattertrue\pagenumbering{arabic}}
\newcommand{\backmatter}{%
- \if@openright \cleardoublepage \else \clearpage \fi
+ \if@openleft \cleardoublepage \else
+ \if@openright \cleardoublepage \else \clearpage \fi \fi
\@mainmatterfalse}
\newcommand{\part}{%
- \if@openright \cleardoublepage \else \clearpage \fi
+ \if@openleft \cleardoublepage \else
+ \if@openright \cleardoublepage \else \clearpage \fi \fi
\thispagestyle{empty}%
\if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi
\null\vfil
@@ -418,10 +461,17 @@
\Huge\bfseries#1\par}%
\@endpart}
\def\@endpart{\vfil\newpage
- \if@twoside\null\thispagestyle{empty}\newpage\fi
+ \if@twoside
+ \if@openleft %% \if@openleft added (2017/02/15)
+ \null\thispagestyle{empty}\newpage
+ \else\if@openright %% \if@openright added (2016/12/18)
+ \null\thispagestyle{empty}\newpage
+ \fi\fi %% added (2016/12/18, 2017/02/15)
+ \fi
\if@tempswa\twocolumn\fi}
\newcommand{\chapter}{%
- \if@openright\cleardoublepage\else\clearpage\fi
+ \if@openleft \cleardoublepage \else
+ \if@openright \cleardoublepage \else \clearpage \fi \fi
\thispagestyle{jpl@in}%
\global\@topnum\z@
\@afterindenttrue