我有一系列的markdown文件,它们正在使用Pandoc和Beamer模板转换为幻灯片。我正在创建自己的自定义Beamer模板,以格式化这些幻灯片。
pandoc --slide-level 2 -fmarkdown-implicit_figures -t beamer --template mytemplate.beamer -o test.pdf *.md
我正在努力使某些元素看起来像我希望的那样。
我的简化降价看起来像这样:
## Header
Normal Body Text
![Image](images/Image1.png "Image")
具体来说,我的图像左对齐。我不知道如何让他们居中。如果我删除该-fmarkdown-implicit_figures
选项,则图像将正确居中,但包含不需要的标题。添加该标志可以消除字幕,但也可以消除居中。
同时,我希望正常的正文文本也居中。因此,在上面的示例中,我希望文本Normal Body Text
居中。同样,我不知道该怎么做。我设法使其他元素(例如标题)居中,但是我找不到代表普通正文的元素的适当名称。
谁能提供解决这些问题的方法?
我找到了一种使图像居中的方法。它可能不是最佳选择,但这似乎可行:
\usepackage{letltxmacro}
% Save the meaning of \includegraphics
\LetLtxMacro\latexincludegraphics\includegraphics
% Update the include graphics command to include centering
\renewcommand{\includegraphics}[2][]{%
\centering
\latexincludegraphics[#1]{#2}}
为了确保正常文本居中,我使用了以下内容,但我不确定这是否是最佳方法:
% Center Text By Default
\usepackage{ragged2e}
\centering
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句