1

I want to maintain the even space in front matter attributes using if then else condition.

Kindly advice.

MWE:

 \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:corad@uniroma2.it}
\presentaddressoverride{Pres author,\break pres address pres
addresspres addresspres addresspres addresspres address\break e-mail:
presauth@uniroma2.it}

    \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}

My problems and my required output below mentioned:

enter image description here

1

The vertical spaces you don't like are created by the commands

\vskip 3.5pt

in your template. To get evenly spaced lines simply remove these commands.

Sample output

\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:corad@uniroma2.it}
\presentaddressoverride{Pres author,\break pres address pres
addresspres addresspres addresspres addresspres address\break e-mail:
presauth@uniroma2.it}

    \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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.