我正在尝试将徽标放在标题页的右上角。我尝试使用 titlepage 环境,但它总是将图像居中。有没有办法 1) 将图像放在右上角,2) 能够根据需要垂直调整文本间距?即使图像居中,尝试垂直移动文本也是徒劳的。
下面是一个示例:
\documentclass{article}
\usepackage[demo]{graphicx}
\begin{document}
\begin{titlepage}
\includegraphics[width=0.3\linewidth]{logo}
\centering
\vfill
{\bfseries\Large
\vspace{3cm}
Performance Report
Blah blah blah
\vskip2cm
First Last
}
\vfill
\vfill
\vfill
\end{titlepage}
\end{document}
先感谢您。
答案1
我只需\hfill
在\includegraphics
\documentclass{article}
\usepackage[demo]{graphicx}
\begin{document}
\begin{titlepage}
\hfill \includegraphics[width=0.3\linewidth]{example-image-a}
\centering
\vfill
{\bfseries\Large
\vspace{3cm}
Performance Report
Blah blah blah
\vskip2cm
First Last
}
\vfill
\vfill
\vfill
\end{titlepage}
\end{document}
答案2
像这样吗?
绝对是矫枉过正:
\documentclass{article}
\usepackage{tikz,tikzpagenodes}
\begin{document}
\begin{titlepage}
\tikz[overlay, remember picture]{%
\node [anchor=north east, inner sep=0pt] at (current page text area.north east) {\includegraphics[width=0.3\linewidth]{example-image-a}};
}%
\centering
\vfill
{\bfseries\Large
\vspace{3cm}
Performance Report
Blah blah blah
\vskip2cm
First Last
}
\vfill
\vfill
\vfill
\end{titlepage}
\end{document}