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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Apr 21 19:48:31 CEST 2014


Author: mvkorpel
Date: 2014-04-21 19:48:30 +0200 (Mon, 21 Apr 2014)
New Revision: 827

Modified:
   pkg/dplR/vignettes/dplR.sty
Log:
Made \code robust so that it works inside \caption


Modified: pkg/dplR/vignettes/dplR.sty
===================================================================
--- pkg/dplR/vignettes/dplR.sty	2014-04-21 12:25:13 UTC (rev 826)
+++ pkg/dplR/vignettes/dplR.sty	2014-04-21 17:48:30 UTC (rev 827)
@@ -21,7 +21,10 @@
   }
 }
 
+% Dummy definition for checking that \code has not been defined
+\newcommand*{\code}[1]{Dummy}
 % \hyphenrules requires the babel package (>= 3.7e, 2000/01/28)
-\newcommand*{\code}[1]{\texttt{\hyphenrules{nohyphenation}#1}}
+% \hyphenrules is fragile, needs protection
+\DeclareRobustCommand*{\code}[1]{\texttt{\hyphenrules{nohyphenation}#1}}
 
 \endinput



More information about the Dplr-commits mailing list