作者旁边的日期

作者旁边的日期

我使用 创建了自己的标题格式titling。我希望日期和作者在同一行,用逗号分隔。可以吗?

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{geometry}
\geometry{
  left=3cm,
  right=3cm,
  top=2cm,
  bottom=4cm
}
\usepackage{titling}
\pretitle{\begin{center}\LARGE\scshape\bfseries}
\posttitle{\par\end{center}\vskip 0.5em}
\preauthor{\begin{center}\large\scshape\lineskip 0.5em\begin{tabular}[t]{c}}
\postauthor{\end{tabular}\par\end{center}}
\predate{\begin{center}\large\scshape}
\postdate{\par\end{center}\vskip 0.5em}
\title{Some title}
\author{Some author}

\begin{document}
\maketitle
\end{document}

答案1

我将\end{tabular}从 移到\postauthor并使\postdate表格有两列。

在此处输入图片描述

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{geometry}
\geometry{
  left=3cm,
  right=3cm,
  top=2cm,
  bottom=4cm
}
\usepackage{titling}
\pretitle{\begin{center}\LARGE\scshape\bfseries}
\posttitle{\par\end{center}\vskip 0.5em}
\preauthor{\begin{center}\large\scshape\lineskip 0.5em\begin{tabular}[t]{l r}}
\postauthor{&}
\predate{\large\scshape}
\postdate{\end{tabular}\par\end{center}\vskip 0.5em}
\title{Some title}
\author{Some author}

\begin{document}
\maketitle
\end{document}

相关内容