Latex 使用Markdown、Pandoc和Beamer自定义正文和图像以创建PDF幻灯片
我有一系列的降价文件,我正在使用Pandoc和Beamer模板将它们转换成幻灯片。我正在创建自己的自定义Beamer模板,以便格式化这些幻灯片Latex 使用Markdown、Pandoc和Beamer自定义正文和图像以创建PDF幻灯片,latex,markdown,pandoc,beamer,Latex,Markdown,Pandoc,Beamer,我有一系列的降价文件,我正在使用Pandoc和Beamer模板将它们转换成幻灯片。我正在创建自己的自定义Beamer模板,以便格式化这些幻灯片 pandoc --slide-level 2 -fmarkdown-implicit_figures -t beamer --template mytemplate.beamer -o test.pdf *.md 我正在努力使某些元素看起来像我希望的那样 我的简化降价如下所示: ## Header Normal Body Text ![Image]
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
选项,则图像正确居中,但包含我不想要的字幕。添加该标志可以消除标题,但也可以消除居中
同时,我希望正常的正文文本也居中。因此,在上面的示例中,我希望文本normalbody 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
我找到了一种将图像居中的方法。这可能不是最好的选择,但似乎是可行的:
\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