为什么在列模式下底部边距设置不会改变?

为什么在列模式下底部边距设置不会改变?

我使用 article.cls 作为我的 latex 模板。我在标题页的底部边缘添加了一个日期信息框,并按照以下说明设置了文本高度https://tex.stackexchange.com/a/670037/120857。当我使用双列模式时,一切都正常。

双列输出

双列输出

脚注和页码仍然保留在原处。但是当我切换到单列模式时,脚注和页码会错位,如下所示。

单列输出

单列输出

虽然页面布局绘制正确,为什么这个设置会错误地改变?我想感谢所有为解决方案做出哪怕最小贡献的朋友。

我的 MWE 如下:

\documentclass[11pt, a4paper, twocolumn]{article}   %<----- two column mode
%\documentclass[11pt, a4paper, onecolumn]{article}   %<----- one column mode
\usepackage{lipsum}
\usepackage{newtxtext,newtxmath}

% Any configuration that should be done before the end of the preamble:
\usepackage[super,comma,sort&compress]{natbib}

\usepackage{hyperref}
\hypersetup{colorlinks=true, urlcolor=blue, linkcolor=blue, citecolor=blue}

\usepackage{geometry}
\geometry{top=1cm,bottom=1.5cm,left=2cm,right=2cm,footskip=1cm,includehead,includefoot,columnsep=6mm,showframe}

\usepackage[absolute]{textpos}
\setlength{\TPHorizModule}{1mm}
\setlength{\TPVertModule}{1mm}

\makeatletter
\usepackage{abstract}
\renewcommand{\abstractnamefont}{\normalfont\bfseries}
\renewcommand{\abstracttextfont}{\normalfont\small}

\newcommand{\maketitleandabstract}{%
    \twocolumn[    %< -------  in one column mode, this line is commented out
    \begin{@twocolumnfalse}
        \maketitle
        \begin{abstract}
            \abstractText
            \newline
            \newline
        \end{abstract}
    \end{@twocolumnfalse}
    ]  %< -------  in one column mode, this line is commented out

    \begin{textblock}{185}(20,263)
        \noindent\rule{17cm}{0.4mm}\vspace*{0.5mm}
        
        \noindent\fbox{%
            \parbox{0.9\textwidth}{%
                \vspace*{1mm}%
                {\footnotesize%
                    \textbf{E-mail:\,}\@email\\
                    \textbf{Submitted:\,}\@submitted
                    \,\(\bullet\)\,\textbf{Revision Received:\,}\@revisionreceived
                    \,\(\bullet\)\,\textbf{Accepted:\,}\@accepted}
            }
        }
    \end{textblock} 
}

\usepackage{afterpage}
\newcommand{\shrinkthepage}{%
\addtolength{\textheight}{-10mm}%
\addtolength{\footskip}{10mm}%
}     
\newcommand{\enlargethepage}{%
    \addtolength{\textheight}{10mm}%
    \addtolength{\footskip}{-10mm}%
}
\newcommand{\restorethepage}{\afterpage{\aftergroup\enlargethepage}}
% hook to shrink text area at start of document
\AtBeginDocument{\shrinkthepage}
% hook to expand text area on page following end of keywords env
\AddToHook{env/abstract/after}{\afterpage{\aftergroup\restorethepage}}

\newcommand*{\email}[1]{\gdef\@email{#1}}
\newcommand*{\submitted}[1]{\gdef\@submitted{#1}}
\newcommand*{\revisionreceived}[1]{\gdef\@revisionreceived{#1}}
\newcommand*{\accepted}[1]{\gdef\@accepted{#1}}
\makeatother

%%%%%%%%%%%%%%%%%
% Configuration %
%%%%%%%%%%%%%%%%%
\title{Article Title}

\author{An Author}

\email{[email protected]}
\submitted{00.00.0000}
\revisionreceived{00.00.0000}
\accepted{00.00.0000}

\newcommand{\abstractText}{\noindent\lipsum[4]}

\renewcommand{\thefootnote}{\alph{footnote}}

\begin{document}
    %%%%%%%%%%%%
    % Abstract %
    %%%%%%%%%%%%
    
    \maketitleandabstract
    
    %%%%%%%%%%%
    % Article %
    %%%%%%%%%%%
    
    \section{Section Title 1}
    
    This is the first sentence\cite{ref1}.
    
    \section{Section Title 2}
    
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque\footnote{First footnote}. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat\cite{ref2}. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus\cite{ref3}. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum\footnote{Second footnote}.
    
    \section{Section Title 3}
    
    \lipsum[2]
    
    \subsection{Section Title 3.1}
    
    \lipsum[3]
    \nocite{*}
    
    %%%%%%%%%%%%%%
    % References %
    %%%%%%%%%%%%%%
    
    \begin{thebibliography}{99}
        \bibitem[Ref1, (2003)]{ref1} Ref1 journal, 2003
        \bibitem[Ref2, (2006)]{ref2} Ref2 journal, 2006
        \bibitem[Ref3, (2009)]{ref3} Ref3 journal, 2009
    \end{thebibliography}   
\end{document}

答案1

经过几次尝试,我找到了单列模式的解决方案。考虑到@DavidCarlisle 关于的描述afterpage,我使用了

\AtBeginDocument{\enlargethispage{-10mm}}

仅命令,而不是

\usepackage{afterpage}
\newcommand{\shrinkthepage}{%
\addtolength{\textheight}{-10mm}%
\addtolength{\footskip}{10mm}%
}     
\newcommand{\enlargethepage}{%
    \addtolength{\textheight}{10mm}%
    \addtolength{\footskip}{-10mm}%
}
\newcommand{\restorethepage}{\afterpage{\aftergroup\enlargethepage}}
% hook to shrink text area at start of document
\AtBeginDocument{\shrinkthepage}
% hook to expand text area on page following end of keywords env
\AddToHook{env/abstract/after}{\afterpage{\aftergroup\restorethepage}}

对于一列模式,我得到了我想要的。

单列模式的结果

但不幸的是,同样的技术不适用于双列模式

我希望有人能找到解决这个问题的方法。

相关内容