我嘗試了以下操作,嘗試使標題右側的文字與同一標題左側圖像中心的高度完全相同:
\fancyhead[L]{\includegraphics[width=7cm]{MontajeLogo}}
\rhead{\textbf{University name}}
我還嘗試使用以下表格:
\fancyhead[L]{
\begin{tabular}{ccc}
\includegraphics[width=7cm]{MontajeLogo} & & University name \\
\end{tabular}}
但這不起作用。任何想法?
答案1
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{stackengine}
\setstackEOL{\\}
\headheight=60pt
\rhead{%
\Centerstack[l]{Foo bar \\
Baz lorem \\
ipsum dolor
}
}
\chead{}
\lhead{This should be vertically aligned (middle) \raisebox{-.4\height}
{\includegraphics[scale=0.016]{DD.jpg}}}
\pagestyle{fancy}
\begin{document}
Test
\end{document}