我尝试了以下操作,试图使标题右侧的文本与同一标题左侧图像的中心高度完全相同:
\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}