페이지 번호 매기기를 다시 시작하지 않고 책의 제목 페이지 두 개

페이지 번호 매기기를 다시 시작하지 않고 책의 제목 페이지 두 개
\documentclass[11pt,twoside]{book}
\input{Brillpreamble}
\begin{document}
\frontmatter
\include{titleBrill}
\include{abbrevBrill}
\include{prefaceandintroBrill}
\mainmatter
\input{./title1.tex}
\include{text1}
\input{./title2.tex}
\include{text2}
\backmatter
\printindex[nominum]
\printindex[rerum]
\pagestyle{myheadings}
\include{Biblio}
\end{document}

이것은 내 서문Brill 코드입니다.

% XeLaTeX can use any Mac OS X font. See the setromanfont command below.
% Input to XeLaTeX is full Unicode, so Unicode characters can be typed directly into the source.

% The next lines tell TeXShop to typeset with xelatex, and to open and save the source with Unicode encoding.

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\usepackage{booktabs}
\usepackage{ledmac}
\linenummargin{inner}
\sidenotemargin{outer}
\usepackage{fancyhdr}
\usepackage{adforn}
\usepackage{amsmath}
\usepackage{lmodern}
\pagestyle{myheadings}
\usepackage{hanging}
\usepackage{pdfpages}
\textheight = 180.5 mm
\textwidth = 108.5 mm
\pagenumbering{arabic}
\usepackage[hang]{footmisc}
\setlength{\footnotemargin}{12pt}
\makeatletter
\renewcommand\@makefntext[1]{%
  \noindent\makebox[1em][r]{\@makefnmark}#1}
\makeatother
\usepackage{imakeidx} 
\makeindex[name=nominum, title=Index nominum, columns=2]
\makeindex[name=rerum, title=Index rerum, columns=2]
\pretolerance=100
\usepackage{microtype}
\makeatletter
% And in the paragraphed footnotes, I'd like no colon too:
\def\parafootfmt#1#2#3{%
  \normal@pars
  \parindent=0pt \parfillskip=0pt plus 1fil
  {\bf\printlines#1|}%
  {\select@lemmafont#1|#2}~%
  #3\penalty-10 }
\makeatother
\let\Afootfmt\parafootfmt

%\newcommand{\rhet}[2]{\edtext{#1}{\Afootnote{#2}}}
\newcommand{\rhet}[2]{\edtext{ #1}{\Afootnote{] #2}}}
\newcommand{\oed}[2]{\edtext{ #1}{\Bfootnote{] #2}}}
\footparagraph{A}
\footparagraph{B}

%%%%%%%%%%%%%%%%
\raggedbottom


\newcommand*{\LeftWidth}{3.0cm}%
\newcommand*{\RightWidth}{\dimexpr\linewidth-\LeftWidth-2em\relax}%
\newcommand{\AlignedBrace}[2]{%
    \medskip\par\noindent%
    \parbox{\LeftWidth}{\raggedleft\textbf{#1}\strut~}%
    $\left\{~\parbox{\RightWidth}{\strut\textit{#2}\strut}\right.$%
}%


%\usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.
%\geometry{a4paper}                   % ... or a4paper or a5paper or ... 
%\geometry{landscape}                % Activate for for rotated page geometry
%\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}

\usepackage{amssymb}
%\renewcommand %These two commands are for double-spacing
%\baselinestretch{2}

% Will Robertson's fontspec.sty can be used to simplify font choices.
% To experiment, open /Applications/Font Book to examine the fonts provided on Mac OS X,
% and change "Hoefler Text" to any of these choices.

\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont[Mapping=tex-text]{Brill}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Gill Sans}
\setmonofont[Scale=MatchLowercase]{Andale Mono}
\frenchspacing

\newfontfamily{\H}[Scale=0.9]{Lucida Grande}
\usepackage{caption}
\captionsetup{aboveskip=5pt}

\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist

답변1

문제는 를 \maketitle사용하여 호출한 후 자체적으로 비활성화되는 명령이라는 것입니다 ( 등 \global\let\maketitle\relax의 경우에도 마찬가지) \title.\author

이는 관련 코드를 재정의하거나 \maketitle사용 및 제거하여 비활성화할 수 있습니다 .\xpatch

이렇게 하면 페이지 번호 매기기가 다시 시작되지 않습니다.

다음 범인은 암시적으로 book사용하는 것입니다 titlepage. 이 옵션을 사용하면 maketitle이 \begin{titlepage}...\end{titlepage}자동으로 페이지 번호를 재설정하는 기능을 사용합니다.

나는 notitlepage지금 당장 여기에 버전을 제공하고 titlepage나중에 짐승을 얻으려고 노력합니다.

\documentclass[notitlepage]{book}



\usepackage{xpatch}

\newcounter{titlescntr}

\makeatletter

\xpatchcmd{\maketitle}{\par
}{%
  \par%
  \stepcounter{titlescntr}
  \ifnum\value{titlescntr} > 0 
  \cleardoublepage
  \fi
}{}{}

\xpatchcmd{\maketitle}{%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}{%
  \clearpage
}{\typeout{Patched!}}{\typeout{Patching failed!}}

\makeatother

\title{Two treatises} 
\author{Guillaume Coatalen} 
\date{} 

\usepackage{blindtext}

\begin{document}

\maketitle 

\title{Theory of Brontosaurs}
\author{Ann Elk}
\maketitle

\blindtext


\end{document}

titlepage업데이트됨: 사용된 경우 페이지 번호 재설정 제거

\documentclass[titlepage]{book}
\usepackage{xpatch}
\newcounter{titlescntr}

\makeatletter

\if@titlepage
\xpatchcmd{\maketitle}{%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}{%
}{\typeout{patched maketitle for titlepage}}{}

\xpatchcmd{\titlepage}{%
  \setcounter{page}\@ne
}{%
}{\typeout{patched titlepage}}{}

\xpatchcmd{\endtitlepage}{%
  \setcounter{page}\@ne
}{%
}{\typeout{patched endtitlepage}}{}

\else

\xpatchcmd{\maketitle}{\par
}{%
  \par% 
  \stepcounter{titlescntr}
  \ifnum\value{titlescntr} > 0 % Make a new page for the next title
  \cleardoublepage
  \fi
}{}{}

\xpatchcmd{\maketitle}{%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}{%
  \clearpage
}{\typeout{Patched!}}{\typeout{Patching failed!}}
\fi

\makeatother

\title{Two treatises} 
\author{Guillaume Coatalen} 
\date{} 

\usepackage{blindtext}

\begin{document}

\maketitle 

\title{Theory of Brontosaurs}
\author{Ann Elk}
\maketitle

\blindtext


\end{document}

답변2

내가 게으른. 다른 사람이 이미 작업을 수행했고 내가 그 작업을 사용할 수 있다면, 그들이 '바퀴'라고 부르는 새로운 발명품에 대한 다양한 디자인을 검토하는 데 시간을 소비할 필요가 없다고 생각합니다.


나는 사용할 것이다etoolbox기본적으로 타이틀에 사용되는 titlepage환경을 패치하고book제목나머지는 하세요.

\usepackage{etoolbox,titling}
\makeatletter
\patchcmd{\titlepage}{\setcounter{page}\@ne}{}{\message {Successfully patched titlepage.}}{\message {Failed to patch titlepage.}}
\makeatother

titlepage패치는 by 사용을 중지하여 \maketitle번호 매기기 체계를 다시 시작합니다. 그러나 주요 문제에서 처음으로 아라비아 숫자로 전환하면 \mainmatter자동으로 처리되므로 1부터 번호를 매깁니다 .

로드 중제목문서에서 원하는 만큼 일반 \title, \author, \date, 명령을 사용할 수 있습니다.\maketitle

\title{Title 1}
\author{Author 1}
\date{Date 1}
\maketitle

\title{Title 2}
\author{Author 2}
\date{Date 2}
\maketitle

\maketitle[ 분명히 오해하면 원하지 않는 결과를 초래할 수 있고 불행하게도 이름이 붙여졌을 수도 있지만 나는 의 사용에 반대하지 않습니다 . 어쨌든 사용하기 쉽고 여기에 내 코드를 단순하게 유지하기 때문에 다른 맥락에서 말의 가치에 대해 일반적으로 의심이 있더라도 선물용 말을 입에서 볼 이유가 없습니다.]

이미 \frontmatterand 를 사용하고 있기 때문에 수업에서는 기본적으로 머리글에는 소문자 로마숫자를 사용하고 본문에는 아라비아 숫자를 사용하므로 \mainmatter페이지 번호 매기기 종류 설정에 대해 걱정할 필요가 없습니다 .book

\frontmatter

1부터 시작하는 소문자 로마 숫자로 전환됩니다.

\mainmatter

그런 다음 아라비아 숫자로 전환하여 1부터 다시 계산합니다.

두 개의 제목 페이지, 소문자 로마자 및 연속 아랍어 번호 매기기

전체 코드:

\documentclass[11pt]{book}
\usepackage{etoolbox,titling}
\makeatletter
\patchcmd{\titlepage}{\setcounter{page}\@ne}{}{\message {Successfully patched titlepage.}}{\message {Failed to patch titlepage.}}
\makeatother
\pagestyle{myheadings}
\usepackage{kantlipsum}
\begin{document}
\frontmatter
\kant[1-5]
\mainmatter
\title{Title 1}
\author{Author 1}
\date{Date 1}
\maketitle
\kant[6-10]
\title{Title 2}
\author{Author 2}
\date{Date 2}
\maketitle
\kant[11-15]
\backmatter
\kant[16-20]
\end{document}

관련 정보