帶有非線性頁碼的乳膠雙面格式

帶有非線性頁碼的乳膠雙面格式

我有以下問題:

我需要製作一個乳膠文檔,其中第一部分用羅馬數字編號,第二部分用阿拉伯數字編號。阿拉伯數字應再次從 1 開始。此外,我必須添加一些空白頁面,這些頁面不會添加到其間的頁面計數中。所有這些都擾亂了我的設定利潤twoside

這是一個例子:

\documentclass[11pt, bibliography=totoc, twoside]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{abstract}
\usepackage{graphicx}
\graphicspath{{images/}{../images/}}
\usepackage{enumitem}
\usepackage{natbib}
\usepackage[onehalfspacing]{setspace}

\usepackage{subfiles}
\usepackage{siunitx}
\sisetup{per-mode=fraction}
\usepackage{amsmath}
\usepackage[many]{tcolorbox}

\usepackage{float}
\usepackage{acronym}
\usepackage{geometry}
\usepackage{hyperref}
\hypersetup{colorlinks,linkcolor=black,urlcolor=blue,citecolor=blue}
\usepackage{fancyhdr}

\usepackage{blindtext}
\usepackage{xcolor}
\usepackage{booktabs}
\usepackage{listings}
\usepackage{tabularx}
\usepackage{ltablex}
\usepackage{caption} 

\makeatletter
\g@addto@macro\@floatboxreset\centering
\makeatother

\definecolor{TU_blue}{RGB}{0, 102, 153}

\fancyhf{}
\fancyhead[LO]{left}
\fancyhead[RE]{right}
\fancyfoot[C]{\thepage}
\setlength{\headheight}{14pt}
\pagestyle{fancy}

\title{dummy}
\author{my name}
\date{December 2019}

\begin{document}

\maketitle
\newpage\null\thispagestyle{empty}\addtocounter{page}{-1}\newpage

\pagestyle{fancy}
\pagenumbering{Roman} 

\addcontentsline{toc}{section}{Acknowledgements}
\section*{Acknowledgements}
\blindtext
\newpage\null\thispagestyle{empty}\addtocounter{page}{-1}\newpage


\addcontentsline{toc}{section}{Abstract}
\section*{Abstract}
\blindtext
\newpage\null\thispagestyle{empty}\addtocounter{page}{-1}\newpage

\addcontentsline{toc}{section}{Abstract German}
\section*{Abstract German}
\blindtext
\newpage\null\thispagestyle{empty}\addtocounter{page}{-1}\newpage

\tableofcontents 
\newpage


\section*{List of Abbreviations}
\addcontentsline{toc}{section}{List of Abbreviations}
\markboth{List of Abbreviations}{LIST OF ABBREVIATIONS}
\begin{acronym}\itemsep0pt
\acro{ABC}{Alphabet}
\end{acronym}
\newpage

\listoffigures
\addcontentsline{toc}{section}{\listfigurename}
\newpage

\listoftables
\addcontentsline{toc}{section}{\listtablename}
\newpage


\pagenumbering{arabic} 
\section{Introduction}
\blindtext
\newpage

\section{Section 2}
\blindtext[4]
\subsection{subsection 2.1}
\blindtext[4]
\subsection{subsection 2.2}
\blindtext[4]
\subsection{subsection 2.3}
\blindtext[4]
\subsection{subsection 2.4}
\blindtext[4]
\newpage

\blindtext
\newpage


\end{document}

扉頁、致謝、摘要、摘要德文都應位於右側。但是,它們應該被編號,沒有空白頁。

從「內容」開始,文字應出現在兩側。 “表格列表”和“簡介”兩面均採用左頁格式。

另外一個小問題,因為我現在很困惑:第一頁應該是正確的頁面,對嗎?

答案1

你的 MWE 應該更簡約。您的範例中不需要很多包。

請:問問自己,什麼文件類型準備。這是一個不同的問題您的文件應該是什麼樣子

在您的 MWE 中,您定義了一個具有雙面佈局的文件。雙面佈局是像book.

無論班級(articlebook),您都應該準備一份文件,該文件是明確的。關於這一點再怎麼強調也不為過。如果您準備雙面佈局的文檔,則每頁都必須有連續的頁碼!您可以決定不列印該數字,但該數字仍然存在,因此下一頁是下一個更高的數字。

引用你的問題:

扉頁、致謝、摘要、摘要德文都應位於右側。

這讓我做出這樣的假設: anarticle不是正確的選擇。相反,您應該選擇一個report甚至一個book類別。標準 LaTeX 類別以及 KOMA-Script 的替代品在右側開始一個新章節,當然也可以透過其奇數頁碼來識別。

但你是什麼意思

但是,它們應該被編號,沒有空白頁。

如上所述,您可以禁止在空白頁面上列印頁碼。 KOMA-Script 預設情況下會這樣做。

或者您的意思是,空白頁面不應該數過的?這將導致頁碼可能是偶數,即使對於右手頁也是如此。你確定你會打破所有傳統嗎?我強烈建議不要這樣做!

再引用你的問題:

從「內容」開始,文字應出現在兩側。 “表格列表”和“簡介”兩面均採用左頁格式。

我不知道你的意思。你描述一下你的 LaTeX 程式碼的結果嗎?如果是這樣,你同意嗎?

如果前一章恰好在右側頁面結束,則標準 LaTeX 類別(reportbook)以及 KOMA 替代品都能夠在左側開啟新章節。只需openany在命令中插入類別選項即可\documentclassreportscrreprtbook和的預設設定scrbook是在右手(奇數)頁面上開啟新章節。因此,預設選項是openright

同樣,您選擇的任何一個選項都將以相同的方式處理整個文件中的每一章,它處理文件中的先前章節。也就是說,不會有任何例外!同樣的規則(openany 或 openright)將適用。這是一個很好的決定。

另外一個小問題,因為我現在很困惑:第一頁應該是正確的頁面,對嗎?

是的,你是。 1 恰好是奇數。傳統規則說,在書籍印刷中,任何奇數都是右手頁。


我透過刪除所有不需要的套件來修改你的 MWE。我添加了一個參考書目資料庫,其中包含一本書,並\cite在文本中添加了一個命令。更重要的是,我從KOMA-Script 類別切換article到了非常強大的類別。scrbook

由於“您的”文件現在是書籍類型,因此我將切片命令升級到更高一級:\section更改為\chapter等等。

我添加了\frontmatter\mainmatter命令,以自動在羅馬和阿拉伯頁碼之間切換,並刪除了您的類似嘗試。 \frontmatter並且\mainmatter對於書籍類別來說是特殊的,它們在文章或報告類別中不可用(LaTeX 或 KOMA-Script)。但使用\frontmatter也會改變 \chapter 的編號:它們不會得到編號,但會合併到目錄中。十分簡單。 :-)

請仔細閱讀縮寫手冊以了解其可能性。您可以在 makeindex 的幫助下自動取得縮寫清單...

在文件的末尾,我添加了\appendix命令來結束正常文件並啟動附錄。正如您所看到的,此命令再次將切片命令的處理方式更改為\chapter.這次,章節不會有數字,而是字母。

我還添加了參考書目\printbibliography。假設您正在使用 BibLaTeX 和biber二進位。 KOMA-Script 類別選項liststotocbibtotoc確保您的圖形清單和表格清單以及參考書目將在目錄中列出。再次簡單易行。 :-)

我希望,您可以接受我的假設和基於它們的修改。這是我的「改進的」MWE。如果我給你建議:“保持簡單,保持簡單”,我不會表現得粗魯。開始寫你的文檔。不要太擔心佈局(至少在過程開始時)。請放心,LaTeX 將產生高品質的文件(從排版的角度來看)。

享受寫作的樂趣!剩下的就一步一步來吧。我相信。


\documentclass[11pt, openright, liststotoc, twoside]{scrbook}
% \documentclass[11pt, openright, twoside]{book}
% \documentclass[11pt, openany, twoside]{book}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{acronym}
\usepackage{blindtext}

%% Needed for the bibliography
\usepackage[backend=biber,style=numeric]{biblatex}
\begin{filecontents}{\jobname.bib}
@Manual{class:scrguide,
  title =    {{KOMA-Script}},
  author =   {Kohm, Markus},
  month =    May,
  year =     2016,
  url =      {http://www.komascript.de/~mkohm/scrguide.pdf},
  langid =   {ngerman},
  note =     {Bestandteil der Online-Dokumentation von \LaTeX,
                  Datei \texttt{scr\-guide.pdf}},
  keywords =     {manual},
}
\end{filecontents}
\bibliography{\jobname}

%% Maybe you don't need this in KOMA any more?
% \usepackage{fancyhdr}
% \fancyhf{}
% \fancyhead[LO]{left}
% \fancyhead[RE]{right}
% \fancyfoot[OL]{\thepage}
% \fancyfoot[ER]{\thepage}
% \pagestyle{fancy}

\title{dummy}
\author{my name}
\date{December 2019}

\begin{document}

%% Frontmatter starts the preliminaries and uses roman pagenumbers
\frontmatter

\maketitle

\chapter{Acknowledgements}
\blindtext

\chapter{Abstract}
\section*{German}
\blindtext[4]
\section*{English}
\blindtext[7]

%% Start the table of contents and further lists here
\tableofcontents
\listoffigures
%% only needed in book.cls.  KOMA class option "liststotoc" add these
%% entries automagically
% \addcontentsline{toc}{chapter}{\listfigurename}
\listoftables
%% only needed in book.cls.  KOMA class option "liststotoc" add these
%% entries automagically
% \addcontentsline{toc}{chapter}{\listtablename}

%% New: print the nomenclature/abbreviations here.  See package
%% acroynm handbook (texdoc acronym)!
% \printnomenclature

\chapter{List of Abbreviations}
\begin{acronym}\itemsep0pt
\acro{ABC}{Alphabet}
\end{acronym}


%% Here ends the preliminaries and the normal document starts.  The
%% \mainmatter command switches the page numbers to be arabic.
\mainmatter
\chapter{Introduction}
\blindtext

\chapter{Section 2}
\blindtext[4]
\section{subsection 2.1}
\blindtext[4]
\section{subsection 2.2}
\blindtext[4]
\section{subsection 2.3}
\blindtext[4]
\cite{class:scrguide}
\blindtext[3][2]

\section{subsection 2.4}
\blindtext[4]

%% What should this command be good for?
% \newpage

%% End of the document.  Start the appendencies
\appendix

\chapter{Some Appendix}
\blindtext[6]

\chapter{Next Appendix}

\section{First Subappendix}
\blindtext[4]

\section{Another Subappendix}
\blindtext[7]

%% Finally the bibliography
\printbibliography{}


%% Same as above!
% \newpage


\end{document}

相關內容