How to change fonts in a ray view using sweave?

When I include \usepackage{Sweave} in the ray presentation preamble, the ray ignores font changes, such as \usepackage{helvet} .

Here is a minimal example:

 \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} 

The text is installed on the computer modern, not helvetica. If you comment out \usepackage{Sweave} then the text will be set to helvetica.

So my question is: is there a way to change fonts in ray presentations containing Sweave content?

I understand that my example here does not contain any real "Sweable" R code, but it does not seem to matter because the unwanted font switching behavior seems to come from Sweave.sty. My main goal is to use pgfSweave with the beam, but I have the same problem. I think I tracked it to \usepackage{Sweave} .

+4
source share
2 answers

From the R-help mailing list, Roger Pan offers

 \usepackage[noae]{Sweave} 

See http://tolstoy.newcastle.edu.au/R/e2/help/06/11/4803.html

Also see http://www.theresearchkitchen.com/blog/archives/118

+5
source

A shot in the dark, here, but did you get the same result if you put \usepackage{helvet} after \usepackage{Sweave} ? Sometimes the order of package declarations matters in LaTeX.

You can also find a more knowledgeable audience on the TeX-LaTeX Stack Exchange .

0
source

Source: https://habr.com/ru/post/1347299/


All Articles