![如何使用 authblk 和 geometry 控制作者块周围的空白尺寸?](https://linux22.com/image/394748/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%20authblk%20%E5%92%8C%20geometry%20%E6%8E%A7%E5%88%B6%E4%BD%9C%E8%80%85%E5%9D%97%E5%91%A8%E5%9B%B4%E7%9A%84%E7%A9%BA%E7%99%BD%E5%B0%BA%E5%AF%B8%EF%BC%9F.png)
我正在尝试使用 authblk 和几何图形来控制作者块周围的空白尺寸。我如何控制上边距和标题、标题和作者列表、作者和所属机构以及所属机构和正文之间的距离?我在下图中用注释(红色)标出了我感兴趣的尺寸。
我的文档的 MWE 在此处:
% arara: pdflatex
\documentclass[10pt,twocolumn]{article}
\usepackage[margin=0.5in,showframe]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{authblk}
\usepackage{setspace}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{helvet}
\usepackage{lipsum}
\makeatletter
\def\@maketitle{
\newpage
\null
\vskip 2em
\begin{center}
\let \footnote \thanks
{\LARGE \@title \par}
\vskip 1.5em
{\large
\lineskip .5em
\begin{tabular}[t]{c}
\baselineskip=12pt
\@author
\end{tabular}\par}
\vskip 1em
{\large \@date}
\end{center}
\par
\vskip 1.5em}
\makeatother
\begin{document}
\large
\title{Title}
\scriptsize
\setstretch{0.1}
\author[1]{Author 1}
\author[2]{Author 2}
\author[3]{Author 3}
\author[4]{Author 4}
\author[5]{Author 5}
\author[1]{Author 6}
\author[1]{Author 7}
\author[1]{Author 8}
\author[1]{Author 9}
\author[1]{Author 10}
\author[1]{Author 11}
\author[1]{Author 12}
\author[1]{Author 13}
\author[1]{Author 14}
\author[1]{Author 15}
\author[1]{Author 16}
\author[1]{Author 17}
\author[1]{Author 18}
\author[1]{Author 19}
\author[1]{Author 20}
\author[1]{Author 21}
\author[1]{Author 22}
\author[1]{Author 23}
\author[1]{Author 24}
\author[1]{Author 25}
\author[1]{Author 26}
\author[1]{Author 27}
\author[1]{Author 28}
\author[1]{Author 29}
\affil[1]{Affiliation 1}
\affil[2]{Affiliation 2}
\affil[3]{Affiliation 3}
\affil[4]{Affiliation 4}
\affil[5]{Affiliation 5}
\date{}
{\let\clearpage\relax
\maketitle }
\lipsum[1-10]
\end{document}
谢谢!
答案1
好了,最后你可以用 来控制红色注释geometry
,authblk
以及 的给定重新定义代码\maketitle
:
请参阅以下 MWE 中标有<===== space X)
您可以控制命名空间的位置。请注意,我添加了日期,因此在隶属关系和日期之间存在一个新空间 e')。请注意,生成的空间可以是两个命令的总和,例如\par
(新行)和\vspace{}
...
- a)、b)、g)、h) 由 定义
geometry
,例如 更改。请阅读包含以下margin=1in
内容的包的文档...geometry
texdoc geometry
- c) 标题前的空格
- d) 标题后、作者前的空格
\setlength{\affilsep}{5em}
e)作者之后、所属机构之前的空间,用...控制/更改- e') 隶属关系和日期之间的空格(如果您的代码 e' 中没有日期)是结果空格 f) 的一部分...
- f) 日期后的空格
这里是带有注释的地方的 MWE,空格来自这里:
\documentclass[10pt,twocolumn]{article}
\usepackage[%
margin=1in, % 0.5in <============================ space a), b), g), h)
showframe
]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{authblk}
\usepackage{setspace}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{helvet}
\usepackage{lipsum}
\setlength{\affilsep}{5em} % <================================= space e)
\makeatletter
\def\@maketitle{%
\newpage%
\null%
%\vskip 2em % <================================================ space c)
\begin{center}%
\let\footnote\thanks %
{\LARGE \@title %
\par % <================================================= space d)
}
% \vskip 1.5em % <=========================================== space d)
{\large
\lineskip .5em
\begin{tabular}[t]{c}
\baselineskip=12pt
\@author
\end{tabular}
\par% <=================================================== space e')
}
% \vskip 1em % <============================================= space e')
{\large \@date}
\end{center}
\par % <======================================================= space f)
\vskip 1.5em} % <============================================== space f)
\makeatother
\begin{document}
\large
\title{Title}
\scriptsize
\setstretch{0.1}
\author[1]{Author 1}
\author[2]{Author 2}
\author[3]{Author 3}
\author[4]{Author 4}
\author[5]{Author 5}
\author[1]{Author 6}
\author[1]{Author 7}
\author[1]{Author 8}
\author[1]{Author 9}
\author[1]{Author 10}
\author[1]{Author 11}
\author[1]{Author 12}
\author[1]{Author 13}
\author[1]{Author 14}
\author[1]{Author 15}
\author[1]{Author 16}
\author[1]{Author 17}
\author[1]{Author 18}
\author[1]{Author 19}
\author[1]{Author 20}
\author[1]{Author 21}
\author[1]{Author 22}
\author[1]{Author 23}
\author[1]{Author 24}
\author[1]{Author 25}
\author[1]{Author 26}
\author[1]{Author 27}
\author[1]{Author 28}
\author[1]{Author 29}
\affil[1]{Affiliation 1}
\affil[2]{Affiliation 2}
\affil[3]{Affiliation 3}
\affil[4]{Affiliation 4}
\affil[5]{Affiliation 5}
\date{\today} % <===================================================
{\let\clearpage\relax
\maketitle }
\lipsum[1-10]
\end{document}
及其生成的pdf: