summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ncclatex/ncctitlepage.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/ncclatex/ncctitlepage.sty
Initial commit
Diffstat (limited to 'macros/latex/contrib/ncclatex/ncctitlepage.sty')
-rw-r--r--macros/latex/contrib/ncclatex/ncctitlepage.sty44
1 files changed, 44 insertions, 0 deletions
diff --git a/macros/latex/contrib/ncclatex/ncctitlepage.sty b/macros/latex/contrib/ncclatex/ncctitlepage.sty
new file mode 100644
index 0000000000..bbcfb0a8b0
--- /dev/null
+++ b/macros/latex/contrib/ncclatex/ncctitlepage.sty
@@ -0,0 +1,44 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{ncctitlepage}
+ [2005/12/26 v1.00 The titlepage environment (NCC)]
+%
+% \changes{v1.00}{2005/12/26}{This version is uploaded to CTAN}
+%
+\RequirePackage{textarea}
+\@ifundefined{if@restonecol}{\newif\if@restonecol}
+%
+% The titlepage environment. Sets the empty page style at the top-level
+% title page. We suppose that a title page can contain many pages and many
+% title pages inside. The page counter is restored to its
+% original value after leaving a top-level title page.
+%
+\newif\ifNCC@intitle \NCC@intitlefalse
+\def\titlepage{%
+ \clearpage
+ \if@twocolumn \@restonecoltrue \onecolumn \else \@restonecolfalse \fi
+ \ifNCC@intitle
+ \let\NCC@restorepagecount\@empty
+ \else
+ \pagestyle{empty}
+ \edef\NCC@restorepagecount{%
+ \noexpand\global\noexpand\c@page \@arabic\c@page\relax}%
+ \setcounter{page}\z@
+ \c@footnote\z@ \def\thefootnote{\@fnsymbol\c@footnote}%
+ \NCC@intitletrue
+ \fi
+ \let\NCC@restoretextarea\@empty
+}
+\def\endtitlepage{%
+ \clearpage
+ \NCC@restoretextarea
+ \if@restonecol\twocolumn \fi
+ \NCC@restorepagecount
+}
+%
+% The star-form of the titlepage environment works as an inner one,
+% i.e. it does not change the page counter.
+\newenvironment{titlepage*}{\NCC@intitletrue
+ \clearpage\pagestyle{empty}\titlepage
+}{\endtitlepage}
+
+\endinput \ No newline at end of file