Skip to content

Instantly share code, notes, and snippets.

@takahashim
Last active November 3, 2018 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takahashim/44cc5d6dcc17b35acc0a263adaec42b6 to your computer and use it in GitHub Desktop.
Save takahashim/44cc5d6dcc17b35acc0a263adaec42b6 to your computer and use it in GitHub Desktop.
\begin{document}
\reviewmainfont
+\frontmatter
+\pagenumbering{arabic}
+
<%- if @config["titlepage"] -%>
<%- if @custom_titlepage -%>
<%= @custom_titlepage %>
@@ -271,19 +238,16 @@
\begin{titlepage}
<%- if @config["coverimage"] -%>
\begin{center}
- \includegraphics[<%= @coverimageoption%>]{./<%= @config["imagedir"] %>/<%= @config["coverimage"] %>}
+ \includegraphics[<%= @coverimageoption%>]{./images/<%= @config["coverimage"] %>}
\end{center}
\clearpage
<%- end -%>
-\thispagestyle{empty}
+\thispagestyle{plainhead}
+\setcounter{page}{1}
\begin{center}%
\mbox{} \vskip5zw
\reviewtitlefont%
@@ -315,12 +276,21 @@
<%= @input_files["PREDEF"] %>
<%- if @config["toc"] -%>
\setcounter{tocdepth}{<%= @config["toclevel"] %>}
\tableofcontents
<%- end -%>
-\renewcommand{\chaptermark}[1]{\markboth{\prechaptername\thechapter\postchaptername~#1}{}}
+\begingroup
+ \cleardoublepage
+ \edef\continuenumber{\endgroup
+ \noexpand\mainmatter
+ \setcounter{page}{\the\value{page}}%
+ }
+
\mainmatter
+\continuenumber
+
+\renewcommand{\chaptermark}[1]{\markboth{\prechaptername\thechapter\postchaptername~#1}{}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment