在标题和作者之间插入文本

在标题和作者之间插入文本

我正在写书评,并尝试遵循样式模板,之后,我正在评论的书的书目详细信息将位于标题(即“评论”)和作者详细信息之间。我正在自定义\maktetitletitling软件包文档不容易阅读,所以我可能做错了)。

我该怎么做才能在标题和作者详细信息之间添加一些内容?

\documentclass{article}
\usepackage{titling}
    \pretitle{\begin{flushleft}\LARGE\textbf}
    \posttitle{\vskip .25ex\hrule\par\end{flushleft}}
    \preauthor{\begin{flushleft}\large}
    \postauthor{\par\end{flushleft}}
    \predate{\begin{flushleft}}
    \postdate{\par\end{flushleft}}
\begin{document}

\title{Review}
% The bibliographic details about the book I'm reviewing go between the title and my author details.
\author{\textbf{Paul McCartney}\\ University of Liverpool}
\date{\today}
\maketitle
\noindent Here my review begins
\end{document}

答案1

随意个性化:

\documentclass{article}
\usepackage{titling}
\pretitle{\begin{flushleft}\LARGE\textbf}
\posttitle{\vskip .25ex\hrule\end{flushleft}}
\preauthor{\begin{flushleft}\large}
\postauthor{\end{flushleft}}
\predate{\begin{flushleft}}
\postdate{\end{flushleft}}
\renewcommand\maketitlehookb{%
  \begin{quote}
  \thebookdata
  \end{quote}
  }
\newcommand{\thebookdata}{Missing book data} % default value
\newcommand{\bookdata}[2]{%
  \renewcommand\thebookdata{{\large{#1}\par}#2}%
}
\begin{document}

\title{Review}
\author{\textbf{Paul McCartney}\\ University of Liverpool}
\date{\today}

\bookdata{Book title}{by A. Uthor}

\maketitle
\noindent Here my review begins
\end{document}

在此处输入图片描述

答案2

在撰写此类评论时,我会放弃使用标题。你可以创建类似的布局而不使用任何标题它在布局方面为您提供了更多的自由:

在此处输入图片描述

\documentclass{article}
\usepackage{titling,lipsum}% http://ctan.org/pkg/{titling,lipsum}
    \pretitle{\begin{flushleft}\LARGE\textbf}
    \posttitle{\vskip .25ex\hrule\par\end{flushleft}}
    \preauthor{\begin{flushleft}\large}
    \postauthor{\par\end{flushleft}}
    \predate{\begin{flushleft}}
    \postdate{\par\end{flushleft}}
\begin{document}

%%%% Old definition of Review

\title{Review}
% The bibliographic details about the book I'm reviewing go between the title and my author details.
\author{\textbf{Paul McCartney}\\ University of Liverpool}
\date{\today}
\maketitle
\noindent Here my review begins

\clearpage

%%%% New definition of Review

\raggedright

\textbf{\LARGE Review}

\hrulefill
\medskip\par

\lipsum[1]

\bigskip

{\large\textbf{Paul McCartney}\par
University of Liverpool\par}

\medskip

\today

\bigskip

Here my review begins

\end{document}

单独的结构/内容方法将包括如下内容:

在此处输入图片描述

\documentclass{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\makeatletter
\newcommand{\reviewtitle}[1]{\def\@reviewtitle{#1}}
\newcommand{\reviewtitleformat}[1]{\def\@reviewtitleformat{#1}}
\newcommand{\bookauthor}[1]{\def\@bookauthor{#1}}
\newcommand{\bookauthorformat}[1]{\def\@bookauthorformat{#1}}
\newcommand{\booktitle}[1]{\def\@booktitle{#1}}
\newcommand{\booktitleformat}[1]{\def\@booktitleformat{#1}}
\newcommand{\reviewauthor}[1]{\def\@reviewauthor{#1}}
\newcommand{\reviewauthorformat}[1]{\def\@reviewauthorformat{#1}}
\newcommand{\reviewauthorsub}[1]{\def\@reviewauthorsub{#1}}
\newcommand{\reviewauthorsubformat}[1]{\def\@reviewauthorsubformat{#1}}
\newcommand{\reviewdate}[1]{\def\@reviewdate{#1}}
\newcommand{\reviewdateformat}[1]{\def\@reviewdateformat{#1}}

\renewcommand{\maketitle}{%
  {\@reviewtitleformat\@reviewtitle}

  \hrulefill
  \medskip\par

  {\@booktitleformat\@booktitle\par}
  {\@bookauthorformat\@bookauthor\par}

  \bigskip

  {\@reviewauthorformat\@reviewauthor\par}
  {\@reviewauthorsubformat\@reviewauthorsub\par}

  \medskip

  {\@reviewdateformat\@reviewdate\par}

  \bigskip
}
\makeatother

\reviewtitle{Review}
\reviewtitleformat{\bfseries\LARGE}
\reviewauthor{Paul McCartney}
\reviewauthorformat{\bfseries\large}
\reviewauthorsub{University of Liverpool}
\reviewauthorsubformat{\large}
\booktitle{Book title \\ \lipsum[2]}
\booktitleformat{\itshape}
\bookauthor{Some Author}
\bookauthorformat{\bfseries}
\reviewdate{\today}
\reviewdateformat{\normalfont}

\begin{document}

\raggedright

\maketitle

Here my review begins

\end{document}

相关内容