TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I usually embed numerous R plots in my TeX documents. knitr is very handy in helping me producing plots using the same font family of the TeX document. But a different problem of consistency is given by the font size: still I haven't found a way to maintain the same font size independently from the size of the containing box. For instance I might have a plot that extends horizontally over 90 percent of the paper width and then another that will only extends over 45 percent; usually this will result in plots with different font sizes. I can of course go back to the R script and tweak the size values until I get the right size but I wonder if there's a smarter solution to set the font size of the plots for the whole document without modifying the plots' source scripts.

share|improve this question
You might want to take a look at [r-forge.r-project.org/projects/tikzdevice/](tikzdevice). – Andreas Oct 30 '13 at 8:06
The original maintainer of tikzDevice is no longer actively maintaining this package, so we are trying to take it over: github.com/yihui/tikzDevice (You can install from rforge.net/tikzDevice) knitr has built-in support for tikzDevice; see example 059 for an example: github.com/yihui/knitr-examples For more: yihui.name/knitr/demo/graphics – Yihui Nov 3 '13 at 17:49
Great news you are taking the package over. Communities of users usually don't say thanks, but I do. – Francesco Nov 3 '13 at 23:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.