我想使用 if then else 条件来维持前置属性中的均匀空间。
友善的建议。
梅威瑟:
\documentclass[twocolumn]{article}
\usepackage[noblocks]{authblk}
\usepackage[%showframe,%
a4paper,%
paperwidth=8.27in,%
paperheight=10.83in,%
textwidth=7.018in,%
textheight=9.08in,%
twocolumn,%
columnsep=13.7pt,%
top=2.06cm,%
bottom=2.35cm,%
left=45.28pt,%
right=45.28pt,%
headheight=10.63pt,%
headsep=26.25pt,%
footskip=21pt,%
]{geometry}
\makeatletter
\newcommand\reviewerhead{\hfill\bf Reviewed by:}
\newcommand\editedhead{\hfill\bf Edited by:}
\let\@editor\@empty
\newcommand{\editor}[1]{\protected@edef\@editor{\@editor #1\par}}
\let\@reviewer\@empty
\newcommand{\reviewer}[1]{\protected@edef\@reviewer{{\@reviewer
#1}\par}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\@metanote{}
\def\metanote#1{%
\gdef\@metanote{\hfill #1}}
\newcommand\corhead{{\hfill\bf *Correspondence:}}
\def\@correspauthoroverride{}
\def\correspauthoroverride#1{%
\gdef\@correspauthoroverride{\corhead\newline%
#1}}
\def\@presentaddressoverride{}
\def\presentaddressoverride#1{%
\gdef\@presentaddressoverride{{{\hfill\bf Present address:}}\newline%
#1}}
\def\@abstract{}
\def\abstract#1{%
\gdef\@abstract{ #1}}
\def\@keywords{}
\def\keywords#1{%
\gdef\@keywords{\bf Keywords: #1}}
\def\@firstpara{}
\def\firstpara#1{%
\gdef\@firstpara{#1}}
\def\@maketitle{%
\newpage
\null
\vbox to \textheight{
\vbox to 656pt{\vfill%
\hbox to 114.45pt{\hfill%
\begin{minipage}[b]{114.45pt}%
\begin{flushright}%
\vspace{9.5pt}%
{\editedhead\par}
{\hfill\@editor\par}%
\vskip 3.5pt%
{\reviewerhead\par}
{\hfill\@reviewer\par}%
\vskip 3.5pt%
{\@correspauthoroverride\par}%
\vskip 3.5\p@%
{\@presentaddressoverride\par}%
\vskip 3.5\p@%
{\@metanote\par}%
\end{flushright}
\end{minipage}}}
\hspace*{10.8pc}
\vbox to \textheight{\vspace*{-48.5pc}%
\hbox to 375.49pt{\hfill%
\begin{minipage}[b]{375.49pt}
\let \footnote \thanks
{\raggedright\fontsize{15}{17}\selectfont\@title\par}%
\vskip 0.5em%
{\large
\lineskip .36em%
\begin{tabular}[t]{l}%
\@author%
\end{tabular}\par}%
\vskip 0.45em%
{\@abstract\par}
\vskip 1em%
{\@keywords\par}
\vskip 1em%
{\@firstpara\par}
\end{minipage}}}}%
\par
\vskip 8.5em}
\makeatother
\begin{document}
%\renewcommand{\reviewerhead}{\relax}
\title{Title}
\author[1]{Auth A\/}
\author[1]{Auth B\/}
\author[1,2]{Auth C\/}
\author[1,2]{Auth D\/}
\author[3]{Auth e\/}
\author[2]{Auth F\/}
\affil{Sample Address Sample AddressSample AddressSample}
\affil{Sample AddressSample AddressSample AddressSample }
\affil{Sample AddressSample AddressSample AddressSample Address}
\editor{Auth A, editor addresss editor addressseditor addressseditor addressseditor addresss}
\reviewer{Auth B, Review addresss Review addresss Review addresss Review addresss }
\reviewer{Auth C, Review addresss Review addresss Review addresss Review addresss }
\reviewer{Auth D, Review addresss Review addresss Review addresss Review addresss }
\correspauthoroverride{Cor author,\break cor address cor addresscor
addresscor addresscor address\break e-mail:[email protected]}
\presentaddressoverride{Pres author,\break pres address pres
addresspres addresspres addresspres addresspres address\break e-mail:
[email protected]}
\abstract{Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text }
\keywords{Sample Keyword text Sample Keyword text Sample Keyword text Sample Keyword text Sample Keyword text Sample Keyword text Sample Keyword text \vspace*{5pt}}
\metanote{Emanuela Sgreccia and Hongying Hou have contributed equally to this work.}
\firstpara{\section{Sec a}\label{sec1:001}
Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para \hfill\break
\hspace*{12pt}Sample ParaSample ParaSample ParaSample ParaSample
ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample Para Sample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample Para\parfillskip0pt}
\maketitle
\noindent Sample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample Para.
Sample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample Para
\end{document}
下面提到了我的问题和我所需的输出:
答案1
您不喜欢的垂直空间是由命令创建的
\vskip 3.5pt
在您的模板中。要获得等距的行,只需删除这些命令即可。
\documentclass[twocolumn]{article}
\usepackage[noblocks]{authblk}
\usepackage[%showframe,%
a4paper,%
paperwidth=8.27in,%
paperheight=10.83in,%
textwidth=7.018in,%
textheight=9.08in,%
twocolumn,%
columnsep=13.7pt,%
top=2.06cm,%
bottom=2.35cm,%
left=45.28pt,%
right=45.28pt,%
headheight=10.63pt,%
headsep=26.25pt,%
footskip=21pt,%
]{geometry}
\makeatletter
\newcommand\reviewerhead{\hfill\bf Reviewed by:}
\newcommand\editedhead{\hfill\bf Edited by:}
\let\@editor\@empty
\newcommand{\editor}[1]{\protected@edef\@editor{\@editor #1\par}}
\let\@reviewer\@empty
\newcommand{\reviewer}[1]{\protected@edef\@reviewer{{\@reviewer
#1}\par}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\@metanote{}
\def\metanote#1{%
\gdef\@metanote{\hfill #1}}
\newcommand\corhead{{\hfill\bf *Correspondence:}}
\def\@correspauthoroverride{}
\def\correspauthoroverride#1{%
\gdef\@correspauthoroverride{\corhead\newline%
#1}}
\def\@presentaddressoverride{}
\def\presentaddressoverride#1{%
\gdef\@presentaddressoverride{{{\hfill\bf Present address:}}\newline%
#1}}
\def\@abstract{}
\def\abstract#1{%
\gdef\@abstract{ #1}}
\def\@keywords{}
\def\keywords#1{%
\gdef\@keywords{\bf Keywords: #1}}
\def\@firstpara{}
\def\firstpara#1{%
\gdef\@firstpara{#1}}
\def\@maketitle{%
\newpage
\null
\vbox to \textheight{
\vbox to 656pt{\vfill%
\hbox to 114.45pt{\hfill%
\begin{minipage}[b]{114.45pt}%
\begin{flushright}%
\vspace{9.5pt}%
{\editedhead\par}
{\hfill\@editor\par}%
{\reviewerhead\par}
{\hfill\@reviewer\par}%
{\@correspauthoroverride\par}%
{\@presentaddressoverride\par}%
{\@metanote\par}%
\end{flushright}
\end{minipage}}}
\hspace*{10.8pc}
\vbox to \textheight{\vspace*{-48.5pc}%
\hbox to 375.49pt{\hfill%
\begin{minipage}[b]{375.49pt}
\let \footnote \thanks
{\raggedright\fontsize{15}{17}\selectfont\@title\par}%
\vskip 0.5em%
{\large
\lineskip .36em%
\begin{tabular}[t]{l}%
\@author%
\end{tabular}\par}%
\vskip 0.45em%
{\@abstract\par}
\vskip 1em%
{\@keywords\par}
\vskip 1em%
{\@firstpara\par}
\end{minipage}}}}%
\par
\vskip 8.5em}
\makeatother
\begin{document}
%\renewcommand{\reviewerhead}{\relax}
\title{Title}
\author[1]{Auth A\/}
\author[1]{Auth B\/}
\author[1,2]{Auth C\/}
\author[1,2]{Auth D\/}
\author[3]{Auth e\/}
\author[2]{Auth F\/}
\affil{Sample Address Sample AddressSample AddressSample}
\affil{Sample AddressSample AddressSample AddressSample }
\affil{Sample AddressSample AddressSample AddressSample Address}
\editor{Auth A, editor addresss editor addressseditor addressseditor addressseditor addresss}
\reviewer{Auth B, Review addresss Review addresss Review addresss Review addresss }
\reviewer{Auth C, Review addresss Review addresss Review addresss Review addresss }
\reviewer{Auth D, Review addresss Review addresss Review addresss Review addresss }
\correspauthoroverride{Cor author,\break cor address cor addresscor
addresscor addresscor address\break e-mail:[email protected]}
\presentaddressoverride{Pres author,\break pres address pres
addresspres addresspres addresspres addresspres address\break e-mail:
[email protected]}
\abstract{Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text Sample abstract text }
\keywords{Sample Keyword text Sample Keyword text Sample Keyword text Sample Keyword text Sample Keyword text Sample Keyword text Sample Keyword text \vspace*{5pt}}
\metanote{Emanuela Sgreccia and Hongying Hou have contributed equally to this work.}
\firstpara{\section{Sec a}\label{sec1:001}
Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para Sample Para \hfill\break
\hspace*{12pt}Sample ParaSample ParaSample ParaSample ParaSample
ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample Para Sample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample Para\parfillskip0pt}
\maketitle
\noindent Sample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample Para.
Sample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample ParaSample Para
\end{document}