我正在尝试在块的标题中包含一个徽标(该文档是使用伯克利主题的演示文稿):
\begin{block} { \includegraphics[width=16pt,height=16pt]{blender.png} Blender }
Free open source 3D cross-platform software under GNU Public License, used for creating 3D models, animations, particle systems...
\end{block}
结果如下:
就像您看到的一样,徽标对齐得很糟糕。它应该与标题文本的高度相同,并且还应该有一个右边距。如何修复它?
答案1
尝试移动图像框。例如
\raisebox{-.5\height}{\includegraphics[width=16pt,height=16pt]{example-image-a}} \raisebox{-0.5\height}{\hbox{Blender}}
将使两个框的高度居中。
完成 MWE:
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics[width=16pt,height=16pt]{example-image-a} Blender
\bigskip
\raisebox{-.5\height}{\includegraphics[width=16pt,height=16pt]{example-image-a}} \raisebox{-0.5\height}{\hbox{Blender}}
\bigskip
\raisebox{-.25\height}{\includegraphics[width=16pt,height=16pt]{example-image-a}} Blender
\bigskip
\raisebox{-\height}{\includegraphics[width=16pt,height=16pt]{example-image-a}} Blender
\end{document}