早上好,我的新问题很简单,但我不知道如何解决它。我有一个
\section{Name of my section}
之后,我补充道
\subsection{name of my new subsection}
最后,我补充道
\subsubsection{name of my new subsubsection}
当我写完我的小节时,它似乎在下一页继续,但这一页应该是空的。
在这种情况下,如果我剪切子部分,就会恢复正常。我在文本的另一个部分遇到了同样的问题,但这与子部分无关。我可以修复此类问题吗?这是我的文档的结构:
\documentclass[12pt,a4paper,openright,twoside]{report}
\usepackage[ansinew,latin1,utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}
\usepackage[table]{xcolor}
\usepackage{array}
\usepackage{float}
\usepackage{booktabs}
\oddsidemargin=30pt \evensidemargin=20pt%impostano i margini
\hyphenation{sil-la-ba-zio-ne pa-ren-te-si}
\pagestyle{fancy}\addtolength{\headwidth}{20pt}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter.\ \#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection \ \#1}{}}
\rhead[\fancyplain{}{\bfseries\leftmark}]{\fancyplain{}{\bfseries\thepage}}
\cfoot{}
\linespread{1.3}
\begin{document}
\begin{titlepage}
\thispagestyle{empty} %elimina il numero della pagina
\topmargin=6.5cm
\raggedleft %incolonna la scrittura a destra
\large %aumenta la grandezza del carattere
% a 14pt
\em %emfatizza (corsivo) il carattere
\clearpage{\pagestyle{empty}\cleardoublepage}
\end{titlepage}
\pagenumbering{roman} %serve per mettere i numeri romani
\input{introduzione}
\clearpage{\pagestyle{empty}\cleardoublepage}
\tableofcontents
\rhead[\fancyplain{}{\bfseries\leftmark}]{\fancyplain{}{\bfseries\thepage}}
\lhead[\fancyplain{}{\bfseries\thepage}]{\fancyplain{}{\bfseries
INDICE}}
\clearpage{\pagestyle{empty}\cleardoublepage}
\clearpage{\pagestyle{empty}\cleardoublepage}
\rhead[\fancyplain{}{\bfseries\leftmark}]{\fancyplain{}{\bfseries\thepage}}
\lhead[\fancyplain{}{\bfseries\thepage}]{\fancyplain{}{\bfseries\rightmark}}
\pagenumbering{arabic}
\clearpage{\pagestyle{empty}\cleardoublepage}
\listoffigures
\clearpage{\pagestyle{empty}\cleardoublepage}
\listoftables %crea l'elenco delle tabelle
\clearpage{\pagestyle{empty}\cleardoublepage}
\definecolor{mediumblue}{rgb}{0.0, 0.0, 0.8}
\input{primocapitolo}
\input{secondocapitolo}
\input{terzocapitolo}
\input{quartocapitolo}
\input{quintocapitolo}
\chapter*{Conclusioni}
\rhead[\fancyplain{}{\bfseries
CONCLUSIONI}]{\fancyplain{}{\bfseries\thepage}}
\lhead[\fancyplain{}{\bfseries\thepage}]{\fancyplain{}{\bfseries
CONCLUSIONI}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%aggiunge la voce Conclusioni
% nell'indice
\addcontentsline{toc}{chapter}{Conclusioni} Queste sono le
conclusioni.\\
Conclusioni.
\renewcommand{\chaptermark}[1]{\markright{\thechapter \ \#1}{}}
\lhead[\fancyplain{}{\bfseries\thepage}]{\fancyplain{}{\bfseries\rightmark}}
\appendix %imposta le appendici
\chapter{Prima Appendice} %crea l'appendice
In questa Appendice non si \`e utilizzato il comando:\\
\verb'\clearpage{\pagestyle{empty}\cleardoublepage}', ed infatti
l'ultima pagina 8 ha l'intestazione con il numero di pagina in
alto.
\rhead[\fancyplain{}{\bfseries \thechapter \:Prima Appendice}]
{\fancyplain{}{\bfseries\thepage}}
\chapter{Seconda Appendice}
\rhead[\fancyplain{}{\bfseries \thechapter \:Seconda Appendice}]
{\fancyplain{}{\bfseries\thepage}}
\begin{thebibliography}{90} %crea l'ambiente bibliografia
\rhead[\fancyplain{}{\bfseries \leftmark}]{\fancyplain{}{\bfseries
\thepage}}
\addcontentsline{toc}{chapter}{Bibliografia}
\bibitem{K1} Lei Deng; Gao, J.;Vuppalapati, C., Building a Big Data Analytics Service Framework for Mobile Advertising and Marketing, in 'Big Data Computing Service and Applications (BigDataService), 2015 IEEE First International Conference on', marzo 2015.
\end{thebibliography}
\clearpage{\pagestyle{empty}\cleardoublepage}
\chapter*{Ringraziamenti}
\thispagestyle{empty}
Ringraziamenti
\end{document}
答案1
这实际上不是一个答案,而是一个更详细的评论。我试图清理你的 MWE(抱歉,这个词太刺耳了:糟糕透顶)。阅读评论,你会看到,(在我看来)你的文档设计有什么问题,以及如何修复主要弱点。
\documentclass[12pt,
a4paper,
openright,% <-- by this you request,
% that chapters begin on odd (right) pages
% consequently if text before end on odd page,
% the empty even page is introduced
twoside]{report}
\usepackage[ansinew,latin1,utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}
\usepackage{array,booktabs}
\usepackage[table]{xcolor}
\usepackage{float}
\oddsidemargin=30pt % <-- instead this is better to use geometry packages
\evensidemargin=20pt% for example \usepackage[inner=30pt,outer=20pt,
% top=20pt,bottom=20pt,
% includehead,includefoot]{geometry}
\hyphenation{sil-la-ba-zio-ne pa-ren-te-si}
\usepackage{fancyhdr}% <-- is missing
\pagestyle{fancy}
\addtolength{\headwidth}{20pt}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter.\ \#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection \ \#1}{}}
\rhead[\fancyplain{}{\bfseries\leftmark}]{\fancyplain{}{\bfseries\thepage}}
\cfoot{}
\linespread{1.3}
\begin{document}
\begin{titlepage}
\pagestyle{empty} % elimina il numero della pagina
\topmargin=6.5cm % <-- wrong use, better is \vspace*{6.5cm}
\raggedleft % incolonna la scrittura a destra
\large % aumenta la grandezza del carattere a 14pt
\em % obsolete, correct is \itshape
% emfatizza (corsivo) il carattere
%\clearpage{\pagestyle{empty}\cleardoublepage}% <-- wrong place,
\end{titlepage}
\cleardoublepage % <-- correct
\pagestyle{fancy}
%\pagenumbering{roman} %serve per mettere i numeri romani
\input{introduzione}
%\clearpage{\pagestyle{empty}\cleardoublepage}
\cleardoublepage % <-- correct
\tableofcontents
\cleardoublepage % <-- correct
% definitions below should be part of \pagestyle{fancy}
%\rhead[\fancyplain{}{\bfseries\leftmark}]{\fancyplain{}{\bfseries\thepage}}
%\lhead[\fancyplain{}{\bfseries\thepage}]{\fancyplain{}{\bfseries INDICE}}
%\clearpage{\pagestyle{empty}\cleardoublepage}
%\clearpage{\pagestyle{empty}\cleardoublepage}
%\rhead[\fancyplain{}{\bfseries\leftmark}]{\fancyplain{}{\bfseries\thepage}}
%\lhead[\fancyplain{}{\bfseries\thepage}]{\fancyplain{}{\bfseries\rightmark}}
%\pagenumbering{arabic}
%\clearpage{\pagestyle{empty}\cleardoublepage}
\listoffigures
\cleardoublepage % <-- correct
%\clearpage{\pagestyle{empty}\cleardoublepage}
\listoftables %crea l'elenco delle tabelle
\cleardoublepage % <-- correct
%\clearpage{\pagestyle{empty}\cleardoublepage}
\definecolor{mediumblue}{rgb}{0.0, 0.0, 0.8}% wrong place, move to preamble
% are the following files chapters? if it so,than is better to use \include
\input{primocapitolo}
\input{secondocapitolo}
\input{terzocapitolo}
\input{quartocapitolo}
\input{quintocapitolo}
\chapter*{Conclusioni}
\addcontentsline{toc}{chapter}{Conclusioni}
% this should be defined in \pagestyle{fancy}
%\rhead[\fancyplain{}{\bfseries CONCLUSIONI}]{\fancyplain{}{\bfseries\thepage}}
% \lhead[\fancyplain{}{\bfseries\thepage}]{\fancyplain{}{\bfseries CONCLUSIONI}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%aggiunge la voce Conclusioni
% nell'indice
Queste sono le conclusioni.
Conclusioni.
% this should be defined in \pagestyle{fancy}
%\renewcommand{\chaptermark}[1]{\markright{\thechapter \ \#1}{}}
%\lhead[\fancyplain{}{\bfseries\thepage}]{\fancyplain{}{\bfseries\rightmark}}
\appendix %imposta le appendici
\chapter{Prima Appendice} %crea l'appendice
In questa Appendice non si \`e utilizzato il comando:\\
\verb'\clearpage{\pagestyle{empty}\cleardoublepage}', ed infatti
l'ultima pagina 8 ha l'intestazione con il numero di pagina in
alto.
%\rhead[\fancyplain{}{\bfseries \thechapter \:Prima Appendice}]
%{\fancyplain{}{\bfseries\thepage}}
\chapter{Seconda Appendice}
%\rhead[\fancyplain{}{\bfseries \thechapter \:Seconda Appendice}]
%{\fancyplain{}{\bfseries\thepage}}
\begin{thebibliography}{90} %crea l'ambiente bibliografia
\addcontentsline{toc}{chapter}{Bibliografia}
%\rhead[\fancyplain{}{\bfseries \leftmark}]{\fancyplain{}{\bfseries \thepage}}
\bibitem{K1} Lei Deng; Gao, J.;Vuppalapati, C., Building a Big Data Analytics Service Framework for Mobile Advertising and Marketing, in 'Big Data Computing Service and Applications (BigDataService), 2015 IEEE First International Conference on', marzo 2015.
\end{thebibliography}
%\clearpage{\pagestyle{empty}\cleardoublepage}
\cleardoublepage
\chapter*{Ringraziamenti}
\thispagestyle{empty}
Ringraziamenti
\end{document}
如果你不喜欢从奇数页开始章节,那么你需要为文档类写类似这样的内容:
\documentclass[12pt,
a4paper,
openany,% <-- by this you request,
% that chapters begin on any pages
twoside]{report}
希望这能对你有所帮助。祝你论文顺利完成。
附录:建议你看一下Nicola Talbot的一本书:《如何写博士论文》(http://www.dickimaw-books.com/latex/thesis/index.html)
答案2
[已解决] 我替换这个:
\documentclass[12pt,a4paper,openright,twoside]{report}
有了这个
\documentclass[12pt,a4paper,openright,oneside]{report}
如果我想要一张空白页,我会添加:
clearpage{\pagestyle{empty}\cleardoublepage}
谢谢大家,再见