如何在使用Sweave的投影仪演示中更改字体? [英] How can I change fonts in a beamer presentation that uses Sweave?

查看:210
本文介绍了如何在使用Sweave的投影仪演示中更改字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的投影仪演示文稿的序言中加入\usepackage{Sweave}时,投影仪将忽略字体更改,例如\usepackage{helvet}.

When I include \usepackage{Sweave} in the preamble of a beamer presentation, beamer ignores changes to font, e.g., \usepackage{helvet}.

这是一个最小的示例:

\documentclass[professionalfonts]{beamer}

\usepackage[T1]{fontenc}
\usepackage{helvet}

\usepackage{Sweave}

\begin{document}

\begin{frame}
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
    sed do eiusmod tempor incididunt ut labore et dolore magna
    aliqua. Ut enim ad minim veniam, quis nostrud exercitation
    ullamco laboris nisi ut aliquip ex ea commodo consequat. 
\end{frame}

\end{document}

文本设置为现代计算机,而不是helvetica.如果您注释掉\usepackage{Sweave},则将文本设置为helvetica.

The text is set in computer modern, rather than helvetica. If you comment out \usepackage{Sweave}, then the text is set in helvetica.

因此,我的问题是:是否可以更改包含Sweave内容的投影仪演示文稿中的字体?

我意识到这里的示例不包含任何实际的"Sweable" R代码,但这似乎无关紧要,因为不必要的字体切换行为似乎是由Sweave.sty引起的.我更大的目标是将pgfSweave与Beamer一起使用,但是我在这里也遇到了同样的问题.我想我已将其追踪到\usepackage{Sweave}.

I realize that my example here does not include any actual, "Sweable" R code, but it seems to not matter, because the unwanted font-switching behavior appears to result from Sweave.sty. My bigger goal is to use pgfSweave with beamer, but I'm having the same problem there. I think I have tracked it down to \usepackage{Sweave}.

推荐答案

在R-help邮件列表中,Roger Peng建议

From the R-help mailing list, Roger Peng suggests

\usepackage[noae]{Sweave}

请参见 http://tolstoy.newcastle.edu.au/R/e2/help/06/11/4803.html

另请参见 http://www.theresearchkitchen.com/blog/archives/118

这篇关于如何在使用Sweave的投影仪演示中更改字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆