briatte / srqm

An introductory statistics course for social scientists, using Stata
https://f.briatte.org/teaching/quanti/
49 stars 17 forks source link

Using Linux Libertine in the math appendix #6

Open briatte opened 11 years ago

briatte commented 11 years ago

The math appendix uses knitr, ggplot2 and gridExtra to produce plots with math notation in the document. If you try to add extrafont to the R script, the plots will fail to generate:

Warning in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y,  :
  font family 'LinLibertine' not found in PostScript font database
Quitting from lines 154-194 (A_math.Rnw) 
Error in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y,  : 
  invalid font type

I'll leave the code in a FALSE condition in case someone finds a fix.