如何生成与圣路易斯联邦储备银行评论期刊。我已链接该期刊的最新论文。
答案1
这是一个使用 mdframed 的相当简单的解决方案。
\documentclass{scrbook}
\usepackage{fontspec}
\setmainfont{Minion Pro}
\setsansfont{Myriad Pro}
\usepackage[dvipsnames]{xcolor}
\usepackage[framemethod=tikz]{mdframed}
\begin{document}
\begin{addmargin}[-2.1cm]{0pt}
\begin{mdframed}[backgroundcolor=blue!10,linecolor=none]
\flushright
\textsf{\LARGE Monetary Policy Normalization in the United States}
\vskip36pt
\textit{Stephen Williamson}
\end{mdframed}
\end{addmargin}
\end{document}
还有一个使用 tikz 的解决方案:
\newcommand{\mytitle}[1]{%
\leftskip-2cm
\begin{tikzpicture}
\node [rectangle,fill=blue!15,inner xsep=12pt, inner ysep=6pt, outer ysep=10pt]{%
\begin{minipage}{1.0\linewidth}#1\end{minipage}};
\end{tikzpicture}}
并插入标题:
\mytitle{
\flushright
\textsf{\LARGE Monetary Policy Normalization in the United States}
\vskip36pt
\textit{Stephen Williamson}}
答案2
我倾向于使用tcolorbox
并将其挂接到\@maketitle
声明中。在article
课堂上,你可以这样做:
\documentclass[12pt, oneside]{article}
\usepackage[T1]{fontenc}
% Just for this example
\usepackage[showframe]{geometry}
\usepackage{xcolor}
% Define some colour for the background
\definecolor{titlecol}{cmyk}{0.30,0.15,0.00,0.10}
\usepackage{tcolorbox}
% fake text for this example
\usepackage{lipsum}
% Set up some lengths
\newlength\titleoffset
\setlength\titleoffset{\dimexpr(\paperwidth-\textwidth)/2 + 1in\relax}
\newlength\titlestretch
\setlength\titlestretch{\dimexpr \textwidth + \titleoffset \relax}
% The tcolorbox macro for use in `\@maketitle`
\newtcolorbox{titlebox}{
% colours
colback=titlecol, colframe=titlecol,
% general
sharp corners, width=\titlestretch, enlarge left by=-\titleoffset,
height=3cm,
% upper box
fontupper=\Large\sffamily\bfseries, flushright upper,
% lower box
fontlower=\itshape, flushright lower, valign lower=bottom
}
% the \@maketitle macro
\makeatletter
\def\@maketitle{%
\newpage
\null
\begin{titlebox}%
\let \footnote \thanks
\@title
\tcblower
\@author
\vskip 1em%
\@date
\end{titlebox}%
\par
\vskip 1.5em}
\makeatother
% Your standard "metadata"
\title{Monetary Policy Normalization in the United States}
\author{Stephen D. Williamson%
\thanks{Thanks to Thomas F. Sturm for
\texttt{tcolorbox}!}}
\date{\today}
\begin{document}
\maketitle
% Compare this
\noindent
\begin{titlebox}
Monetary Policy Normalization in the United States
\tcblower
Stephen D. Williamson
\end{titlebox}
\lipsum[1]
\end{document}
别忘了,你可以把所有相关内容打包到你自己的.sty
文件中,并用标准的 加载它\usepackage{<filename>}
。在这种情况下,你可以省去\makeatletter
和\makeatother
命令。