
我想用 LaTeX 製作一個首頁,就像我在 OpenOffice 中製作的那樣(附後),也就是應該有大學標題、論文標題和右上角放置小圖片的標題。我可以看一些關於如何最輕鬆地實現這一目標的範例嗎?
附圖僅顯示首頁的上半部分,其餘部分為空白。
答案1
使用包fancyhdr
。最小的例子如下。
\documentclass{article}
\usepackage{fancyhdr}
\usepackage{graphicx}
\renewcommand{\headrulewidth}{0pt} % this is the line thickness under the header - 0pt for no line
\renewcommand{\footrulewidth}{0pt} % and above the footer
\pagestyle{fancy} % to apply your fancy header and footer
\lhead{University of X\\ {\small Faculty of X}}
\rhead{\includegraphics[height=35pt,keepaspectratio]{noimage}}
\setlength\headheight{40pt} % you might want to modify this number so it does not show overfull boxes, if you have bigger image or more text in the header
\begin{document}
\section*{This is the title of the thesis}
\subsection*{A study on how to make front pages with \LaTeX}
\end{document}
你會得到: