如何将文本对齐到标题的中心和日期,在水平线下方,
\documentclass{letter}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{geometry}
\usepackage{lipsum}
\geometry{headheight = 35pt}
\fancypagestyle{firstpage}{\fancyhf{}\fancyhead[C]{\includegraphics[scale=0.35]{pecemblem}}\textsc{Pondicherry Engineering College\\ \textsc{Pillaichavady}\\ \textsc{Puducherry-605014}}}
%\fancypagestyle{plain}{\fancyhf{}\fancyhead[C]{\includegraphics[height=0.5in]{pecemblem}}}
\pagestyle{plain}
\begin{document}%
\begin{letter}{}%
\opening{Dear Some Name,}
\lipsum[1-10]
\end{letter}%
\end{document}%
答案1
再次调整headheight
和top
、 和的值scale
。
此外,所有带有的行都\textsc
必须放在括号内\fancyhead
平均能量损失
\documentclass{letter}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{geometry}
\usepackage{lipsum}
\geometry{headheight=6cm,top=8cm}
\fancypagestyle{firstpage}{\fancyhf{}\fancyhead[C]{\includegraphics[scale=1.2]{pecemblem}\\
\textsc{Pondicherry Engineering College}\\ \textsc{Pillaichavady}\\ \textsc{Puducherry-605014}}}
%\fancypagestyle{plain}{\fancyhf{}\fancyhead[C]{\includegraphics[height=0.5in]{pecemblem}}}
\pagestyle{plain}
\begin{document}%
\begin{letter}{}%
\opening{Dear Some Name,}
\lipsum[1-10]
\end{letter}%
\end{document}%
输出
无论如何,我会选择一个不涉及标题的解决方案,如下所示:
\documentclass{letter}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{geometry}
\usepackage{lipsum}
\fancypagestyle{plain}{\fancyhf{}\fancyhead[C]{\includegraphics[height=0.5in]{pecemblem}}}
\pagestyle{plain}
\begin{document}%
\begin{letter}{}%
\begin{center}
\includegraphics[scale=1.2]{pecemblem}\\
\textsc{Pondicherry Engineering College}\\
\textsc{Pillaichavady}\\
\textsc{Puducherry-605014}\\
\hrulefill
\end{center}
\opening{Dear Some Name,}
\lipsum[1-10]
\end{letter}%
\end{document}%
输出