如何在 maketitle 中打印摘要

如何在 maketitle 中打印摘要

问题 1:我想在命令\begin{abstract} abstract text here \end{abstract}中使用编码 \maketitle。但摘要文本打印在单独的页面上。如何避免?

问题2: 我正在使用该\firstpara{}命令并得到此输出。我手动给出了\hfill\break \hspace*{12pt}命令。我将尽量避免这种手动工作。我想使用环境代码,就像\begin{firstpara} text \end{firstpara}没有手动命令一样。我不知道如何在\maketitle命令中实现环境。请提供建议。

如果您运行 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:[email protected]}
\presentaddressoverride{Pres author,\break pres address pres
addresspres addresspres addresspres addresspres address\break e-mail:
[email protected]}
\begin{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 
\end{abstract}
    \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

这至少让它出现在一页上,但实际上只能这么说:它需要做很多工作。我摆脱了一些坏盒子,但还有很多。你应该读一下控制台输出:geometry不满意。

至少一页

\documentclass[twocolumn]{article}
\usepackage{calc}
\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\bfseries Reviewed by:}
\newcommand\editedhead{\hfill\bfseries 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{}
\newcommand\metanote[1]{%
  \gdef\@metanote{\hfill #1}}

\newcommand\corhead{{\hfill\bfseries *Correspondence:}}

\def\@correspauthoroverride{}
\newcommand\correspauthoroverride[1]{%
  \gdef\@correspauthoroverride{\corhead\newline%
    #1}}

\def\@presentaddressoverride{}
\newcommand\presentaddressoverride[1]{%
  \gdef\@presentaddressoverride{{{\hfill\bfseries Present address:}}\newline%
    #1}}

\def\@abstract{}
\renewcommand\abstract[1]{%
  \gdef\@abstract{ #1}}

\def\@keywords{}
\newcommand\keywords[1]{%
  \gdef\@keywords{\bfseries Keywords: #1}}

\def\@firstpara{}
\newcommand\firstpara[1]{%
  \gdef\@firstpara{#1}}

\def\@maketitle{%
  \newpage
  \null
      \begin{minipage}[b]{114pt}%
        \vspace*{\fill}
          \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}
  \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}
          \vfill
        \end{minipage}%
  \par
  \vskip 8.5em
\clearpage}

\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,\par cor address cor addresscor
    addresscor addresscor address\par e-mail:[email protected]}
  \presentaddressoverride{Pres author,\par pres address pres
    addresspres addresspres addresspres addresspres address\par e-mail:
    [email protected]}
  \metanote{Emanuela Sgreccia and Hongying Hou have contributed equally to this work.}
  \keywords{Sample Keyword text Sample Keyword text Sample Keyword text Sample Keyword text Sample Keyword text Sample Keyword text Sample Keyword text \vspace*{5pt}}
  \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}
  \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

    \setlength{\parindent}{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

  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

}
  \maketitle



\end{document}

相关内容