[Dplr-commits] r785 - pkg/dplR/vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Apr 8 14:43:36 CEST 2014


Author: mvkorpel
Date: 2014-04-08 14:43:36 +0200 (Tue, 08 Apr 2014)
New Revision: 785

Modified:
   pkg/dplR/vignettes/dplR.sty
   pkg/dplR/vignettes/intro-dplR.Rnw
Log:
* Set input encoding in vignette file, not in style file.  Required
  for Sweave to recognize the encoding setting.
* Instead of \usepackage[utf8x]{inputenc}, use
  \usepackage[utf8]{inputenx} and \input{ix-utf8enc.dfu}. The latter
  is the way to go according to vignette("Sweave"). The former command
  would also automatically load the ucs package (see the next point).
* Don't load the ucs package. I don't see a compelling reason why it
  should be loaded. On the other hand, there are claims about
  incompatibilities with other packages. See the following thread:
  https://groups.google.com/forum/#!topic/comp.text.tex/4LC-xODb-LU
* Don't use fancy quotes in the output of the R code in the
  vignette. It seems that these are not present in the default fixed
  width font, resulting in black squares instead of quotes.
* Set the environment variable LANGUAGE to "en" (English) before
  running any R code that produces output. This should override
  automatic translations to languages other than English. In other
  words, the locale used when the vignette is compiled should not
  change the output language anymore.
* Don't use the pdflang option in \hypersetup (PDF
  metadata). Apparently the language is already picked up from the
  language setting of the babel package.


Modified: pkg/dplR/vignettes/dplR.sty
===================================================================
--- pkg/dplR/vignettes/dplR.sty	2014-04-08 04:03:36 UTC (rev 784)
+++ pkg/dplR/vignettes/dplR.sty	2014-04-08 12:43:36 UTC (rev 785)
@@ -1,7 +1,5 @@
 \usepackage{amsmath}
 \usepackage{amssymb}
-\usepackage{ucs}
-\usepackage[utf8x]{inputenc}
 \usepackage[T1]{fontenc}
 \usepackage[english]{babel}
 \usepackage{booktabs}
@@ -14,6 +12,5 @@
     pdftitle = {\@title},
     pdfsubject = {Dendrochronology Program Library in R},
     pdfkeywords = {dendrochronology, dplR, R},
-    pdflang = {en}
   }
 }

Modified: pkg/dplR/vignettes/intro-dplR.Rnw
===================================================================
--- pkg/dplR/vignettes/intro-dplR.Rnw	2014-04-08 04:03:36 UTC (rev 784)
+++ pkg/dplR/vignettes/intro-dplR.Rnw	2014-04-08 12:43:36 UTC (rev 785)
@@ -2,7 +2,8 @@
 %\VignetteIndexEntry{An introduction to dplR}
 \documentclass[a4paper,11pt]{article}
 \usepackage{dplR} % dplR settings - needs some work
-
+\usepackage[utf8]{inputenx} % R CMD build wants this here, not in dplR.sty
+\input{ix-utf8enc.dfu} % more characters supported
 \title{An introduction to dplR} 
 \author{Andy Bunn \and Mikko Korpela}
 \hypersetup{
@@ -21,6 +22,8 @@
 \SweaveOpts{include=FALSE}
 <<echo=false>>=
 options(width=62) # width of paper (number of characters)
+options(useFancyQuotes=FALSE) # fancy quotes not included in fixed-width font?
+Sys.setenv(LANGUAGE="en") # no translations to languages other than English
 @ 
 
 \maketitle



More information about the Dplr-commits mailing list