Textpos没有显示任何内容

Textpos没有显示任何内容

我正在尝试用 LaTeX 创建名片。因此,我想使用textpos绝对定位各个元素。

由于某种原因,textpos 没有显示任何内容。我想要的是它显示我放置物品的位置。有什么建议可以解决这个问题吗?

在有人问之前,是的,该\includegraphics命令在块外工作得很好textpos。无论我是否有 M,行为都没有区别textpos——这只是为了检查边距是否符合预期(即无)

我在 Windows 上使用 MikTeX。

我的 LaTeX 下面是。

\documentclass{beamer}

\usepackage{fontspec}
\usepackage[absolute,showboxes,verbose]{textpos}
\usepackage{geometry}
\geometry{paperwidth=90mm, paperheight=45mm, layoutwidth=90mm, layoutheight=45mm, left=0mm, top=0mm, right=0mm, bottom=0mm}

\usetheme{}
\setbeamertemplate{navigation symbols}{} 

\begin{document}
%\fontspec[Ligatures=Rare,Contextuals=Swash,Contextuals=Alternate,StylisticSet=1,Style=TitlingCaps,Style=Alternate,Style=Swash,Contextuals=Swash]{Breathe Pro}\fontsize{12pt}{12pt}\selectfont
\fontspec{Palatino Linotype}\fontsize{12pt}{12pt}\selectfont
M

\begin{textblock*}{49mm}(10mm,10mm)\includegraphics[width=49mm]{tustinlogo01.png}\end{textblock*}

\end{document}

答案1

显然textpos不能很好地配合使用beamer(请参阅文档第 8 页textpos)。考虑到您正在做的事情,特定的文档类似乎不太可能重要:使用类似的东西article,这似乎可以按预期工作。

答案2

您需要使用overlaytextpos 选项:

\documentclass{beamer}

\usepackage{fontspec}
\usepackage[absolute,showboxes,verbose,overlay]{textpos}
\usepackage{geometry}
\geometry{paperwidth=90mm, paperheight=45mm, layoutwidth=90mm, layoutheight=45mm, left=0mm, top=0mm, right=0mm, bottom=0mm}

\usetheme{}
\setbeamertemplate{navigation symbols}{} 

\begin{document}
%\fontspec[Ligatures=Rare,Contextuals=Swash,Contextuals=Alternate,StylisticSet=1,Style=TitlingCaps,Style=Alternate,Style=Swash,Contextuals=Swash]{Breathe Pro}\fontsize{12pt}{12pt}\selectfont
\fontspec{Palatino Linotype}\fontsize{12pt}{12pt}\selectfont
M

\begin{textblock*}{49mm}(10mm,10mm)\includegraphics[width=49mm]{tustinlogo01.png}\end{textblock*}

\end{document}

查看beamer手册(第 20 页):

beamer自动在所有内容后面安装白色背景,除非您安装不同的背景模板。因此,overlay在使用时必须使用 选项 textpos,以便它将方框放置在所有内容前面。或者,您可以安装一个空的背景模板,但这可能会导致 Acrobat Reader 的旧版本在某些情况下显示不正确。

相关内容