我制作了一个memoir
如下所示的页脚。问题是我想将图像相对于页脚中的其他文本垂直居中(我相信页眉中的问题相同)。如何做到这一点?
\documentclass{memoir}
\usepackage{graphicx}
% Header and footer
\makepagestyle{myStyle} % initialize style
\makeevenhead{myStyle}{}{}{}
\makeevenfoot{myStyle}{}{}{}
\makeoddhead{myStyle}{}{}{}
\makeoddfoot{myStyle}{\includegraphics[width=0.2\textwidth]{example-image}}{exampleText}{Page \thepage{} of \thelastpage}
\pagestyle{myStyle} % activate style
\begin{document}
content
\end{document}
答案1
\adjincludegraphics[valign=M,...]
从包中使用adjustbox
。当省略其他参数(例如)时,此命令\adjincludegraphics
还可用作常规命令的直接替代品。\includegraphics
valign
\documentclass{memoir}
\usepackage{adjustbox}
% Header and footer
\makepagestyle{myStyle} % initialize style
\makeevenhead{myStyle}{}{}{}
\makeevenfoot{myStyle}{}{}{}
\makeoddhead{myStyle}{}{}{}
\makeoddfoot{myStyle}{\adjincludegraphics[width=0.2\textwidth,valign=M]{example-image}}{exampleText}{Page \thepage{} of \thelastpage}
\pagestyle{myStyle} % activate style
\begin{document}
content
\end{document}