LaTeX 奇怪的页面布局从第二页开始

LaTeX 奇怪的页面布局从第二页开始

我目前正在写一篇论文,到目前为止一切顺利。

我不知怎么弄乱了布局,第二页上的文本向下移动并延伸到页面末尾,请参阅附件示例。这是我的 LaTeX 代码的一个功能示例。

附言:我正在使用皇家化学学会模板,因为我计划将我的论文提交给他们的其中一个期刊。

   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   %This is the LaTeX ARTICLE template for RSC journals
   %Copyright The Royal Society of Chemistry 2016
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

   \documentclass[twoside,twocolumn,9pt]{article}
   \usepackage{extsizes}
   \usepackage[super,sort&compress,comma]{natbib} 
   \usepackage[version=3]{mhchem}
   \usepackage[left=1.5cm, right=1.5cm, top=1.785cm, bottom=2.0cm]{geometry}
   \usepackage{balance}
   \usepackage{times,mathptmx}
   \usepackage{sectsty}
   \usepackage{graphicx} 
   \usepackage[lofdepth,lotdepth]{subfig}
   \usepackage{wasysym} % to use \textperthousand                                                     
   \usepackage[separate-uncertainty=false,per-mode = symbol]{siunitx}  
   \usepackage{lastpage}
   \usepackage[format=plain,justification=justified,singlelinecheck=false,font={stretch=1.125,small,sf},labelfont=bf,labelsep=space]{caption}
   %strech caption line spacing for Sprachendienst
   %\captionsetup[table]{font={stretch=2.5}}     %% change 1.2 as you like
   %\captionsetup[figure]{font={stretch=2.5}}
   \usepackage{float}
   \usepackage{cuted}
   \usepackage{mathtools}
   \usepackage{fancyhdr}
   \usepackage{nicefrac}
   \usepackage[style=british]{csquotes}
   \usepackage{fnpos}
   \usepackage{placeins}
   \usepackage{booktabs}
   \usepackage{tabularx}
   \usepackage{multirow}
   \usepackage{amsmath}
   \usepackage{rotating}
   \usepackage{pdflscape}
   \usepackage[english]{babel}
   \addto{\captionsenglish}{%
    \renewcommand{\refname}{Notes and references}
   }
   \usepackage{array}
   \usepackage{droidsans}
   \usepackage{charter}
   \usepackage[T1]{fontenc}
   \usepackage[usenames,dvipsnames]{xcolor}
   \usepackage{lipsum}
   \usepackage[compact]{titlesec}
   \usepackage{hyperref}
   \raggedbottom
   \definecolor{cream}{RGB}{222,217,201}
   %%%Please don't disable any packages in the preamble, as this may cause the template to display incorrectly.%%%
   \usepackage{epstopdf}%This line makes .eps figures into .pdf - please comment out if not required.

   \usepackage{setspace}



   \begin{document}


    \pagestyle{fancy}
    \thispagestyle{plain}
    \fancypagestyle{plain}{

        %%%HEADER%%%
        \fancyhead[C]{\includegraphics[width=18.5cm]{head_foot/header_bar}}
        \fancyhead[L]{\hspace{0cm}\vspace{1.5cm}\includegraphics[height=30pt]{head_foot/journal_name}}
        \fancyhead[R]{\hspace{0cm}\vspace{1.7cm}\includegraphics[height=55pt]{head_foot/RSC_LOGO_CMYK}}
        \renewcommand{\headrulewidth}{0pt}
    }
    %%%END OF HEADER%%%

    %%%PAGE SETUP - Please do not change any commands within this section%%%
    \makeFNbottom
    \makeatletter
    \renewcommand\LARGE{\@setfontsize\LARGE{15pt}{17}}
    \renewcommand\Large{\@setfontsize\Large{12pt}{14}}
    \renewcommand\large{\@setfontsize\large{10pt}{12}}
    \renewcommand\footnotesize{\@setfontsize\footnotesize{7pt}{10}}
    \makeatother

    \renewcommand{\thefootnote}{\fnsymbol{footnote}}
    \renewcommand\footnoterule{\vspace*{1pt}% 
        \color{cream}\hrule width 3.5in height 0.4pt \color{black}\vspace*{5pt}} 
    \setcounter{secnumdepth}{5}

    \makeatletter 
    \renewcommand\@biblabel[1]{#1}            
    \renewcommand\@makefntext[1]% 
    {\noindent\makebox[0pt][r]{\@thefnmark\,}#1}
    \makeatother 
    \renewcommand{\figurename}{\small{Fig.}~}
    \sectionfont{\sffamily\Large}
    \subsectionfont{\normalsize}
    \subsubsectionfont{\bf}
    \setstretch{1.125} %In particular, please do not alter this line.
    \setlength{\skip\footins}{0.8cm}
    \setlength{\footnotesep}{0.25cm}
    \setlength{\jot}{10pt}
    \titlespacing*{\section}{0pt}{4pt}{4pt}
    \titlespacing*{\subsection}{0pt}{15pt}{1pt}
    %%%END OF PAGE SETUP%%%

    %%%FOOTER%%%
    \fancyfoot{}
    \fancyfoot[LO,RE]{\vspace{-7.1pt}\includegraphics[height=9pt]{head_foot/LF}}
    \fancyfoot[CO]{\vspace{-7.1pt}\hspace{13.2cm}\includegraphics{head_foot/RF}}
    \fancyfoot[CE]{\vspace{-7.2pt}\hspace{-14.2cm}\includegraphics{head_foot/RF}}
    \fancyfoot[RO]{\footnotesize{\sffamily{1--\pageref{LastPage} ~\textbar  \hspace{2pt}\thepage}}}
    \fancyfoot[LE]{\footnotesize{\sffamily{\thepage~\textbar\hspace{3.45cm} 1--\pageref{LastPage}}}}
    \fancyhead{}
    \renewcommand{\headrulewidth}{0pt} 
    \renewcommand{\footrulewidth}{0pt}
    \setlength{\arrayrulewidth}{1pt}
    \setlength{\columnsep}{6.5mm}
    \setlength\bibsep{1pt}
    %%%END OF FOOTER%%%

    %%%FIGURE SETUP - please do not change any commands within this section%%%
    \makeatletter 
    \newlength{\figrulesep} 
    \setlength{\figrulesep}{0.5\textfloatsep} 

    \newcommand{\topfigrule}{\vspace*{-1pt}% 
        \noindent{\color{cream}\rule[-\figrulesep]{\columnwidth}{1.5pt}} }

    \newcommand{\botfigrule}{\vspace*{-2pt}% 
        \noindent{\color{cream}\rule[\figrulesep]{\columnwidth}{1.5pt}} }

    \newcommand{\dblfigrule}{\vspace*{-1pt}% 
        \noindent{\color{cream}\rule[-\figrulesep]{\textwidth}{1.5pt}} }

    \makeatother
    %%%END OF FIGURE SETUP%%%
    %%%TITLE, AUTHORS AND ABSTRACT%%%
    \twocolumn[
    \begin{@twocolumnfalse}
        \vspace{3cm}
        \sffamily
        \begin{tabular}{m{4.5cm} p{13.5cm} }
            \includegraphics{head_foot/DOI} & \noindent\LARGE{\textbf{Why is the layout messed up?$^\dag$}} \\%Article title goes here instead of the text "This is the title"
            \vspace{0.3cm} & \vspace{0.3cm} \\

            & \noindent\large{First Author,\textit{$^{a}$} Second Author$^{\ast}$\textit{$^{a}$}  } \\%Author names go here instead of "Full name", etc.
            \setstretch{2.5}
            \includegraphics{head_foot/dates} & \noindent\normalsize{  \lipsum[1][15] } \\%The abstrast goes here instead of the text "The abstract should be..."

        \end{tabular}

    \end{@twocolumnfalse} \vspace{0.6cm}

    ]
    %%%END OF TITLE, AUTHORS AND ABSTRACT%%%

    %%%FONT SETUP - please do not change any commands within this section
    \renewcommand*\rmdefault{bch}\normalfont\upshape
    \rmfamily
    \section*{}
    \vspace{-1cm}


    %%%FOOTNOTES%%%

    \footnotetext{\textit{$^{a}$~Address, Affiliation, Affiliation Street 100, 122345 Affiliation twon, Affiliation land. Fax: XX XXXX XXXX; Tel: XX XXXX XXXX; E-mail: [email protected]}}
    \footnotetext{\textit{$^{b}$~Address, Address, Town, Country. }}


    \footnotetext{\dag~Electronic Supplementary Information (ESI) available: [details of any supplementary information available should be included here]. See DOI: 00.0000/00000000.}



    %%%END OF FOOTNOTES%%%
    \textsl{}
    %%%MAIN TEXT%%%%



\section{Introduction}
\lipsum[1-20]





%%%REFERENCES%%%
%\FloatBarrier
%\balance
%\bibliography{rsc} %You need to replace "rsc" on this line with the name of your .bib file
%\bibliographystyle{rsc} %the RSC's .bst file

\end{document}

答案1

您会收到警告

Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 63.96962pt.
We now make it that large for the rest of the document.
This may cause the page layout to be inconsistent, however.

添加headheight=64pt选项geometry

\usepackage[left=1.5cm, right=1.5cm, top=1.785cm, bottom=2.0cm,headheight=64pt]{geometry}

一切都会好起来。

笔记。为标题保留的空间量可能因无法测试的图形元素而异。查看日志文件将显示要使用的确切空间量。

相关内容