我想修改article
类的标题部分,使其看起来像附图中所示。基本上,我想要的是一种带有刷新文本(标题、作者、所属机构)的徽标。
我尝试了一下minipage
,wrapfigure
但没有成功。你能推荐一种方法吗?
答案1
您无需重新定义\maketitle
命令,而是可以使用\parbox
es 来生成所需的布局;如下所示:
\documentclass{article}
\usepackage[demo]{graphicx}
\begin{document}
\noindent\parbox[c]{.3\textwidth}{\includegraphics[width=.3\textwidth]{logo}}\hfill
\parbox[c]{.6\textwidth}{\raggedright%
\sffamily {\LARGE Latest Developments in Evolutionary Biology--A New Perspective\par\bigskip}
{John Doe\par\smallskip}
{\footnotesize Theoretical Science Department, Nice University\par}
}
\end{document}
选项demo
只是graphicx
用黑色矩形替换实际图形;不是在实际文档中使用该选项。
而且,只是为了好玩,可以使用 TikZ 复制徽标:
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{tikz}
\definecolor{bgcolor}{RGB}{247,242,222}
\definecolor{myred}{RGB}{152,31,32}
\newcommand\logo{%
\begin{tikzpicture}
\node[draw=gray,line width=4pt,fill=bgcolor,rounded corners=3pt,minimum width=0.34\textwidth,align=center,inner sep=0pt,minimum height=3.3cm] (rect)
{ \sffamily
\parbox{.34\linewidth}{\color{myred}\footnotesize LECTURE \\ NOTES IN}%
\parbox{.4\linewidth}{\color{myred}\Large\bfseries Science}
};
\draw[gray,line width=1pt] ([xshift=-8pt,yshift=-1.2cm]rect.north) -- +(0,-30pt);
\end{tikzpicture}%
}
\begin{document}
\noindent\parbox[c]{.38\textwidth}{\logo}\hfill
\parbox[c]{.6\textwidth}{\raggedright%
\sffamily {\LARGE Latest Developments in Evolutionary Biology--A New Perspective\par\bigskip}
{John Doe\par\smallskip}
{\footnotesize Theoretical Science Department, Nice University\par}
}
\end{document}