[Rprotobuf-commits] r349 - papers/user2010

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jul 22 19:55:49 CEST 2010


Author: romain
Date: 2010-07-22 19:55:48 +0200 (Thu, 22 Jul 2010)
New Revision: 349

Modified:
   papers/user2010/build.R
   papers/user2010/slides.Rnw
Log:
footnotesize boxes

Modified: papers/user2010/build.R
===================================================================
--- papers/user2010/build.R	2010-07-22 17:50:25 UTC (rev 348)
+++ papers/user2010/build.R	2010-07-22 17:55:48 UTC (rev 349)
@@ -31,6 +31,16 @@
 	tex[ seq( start[i], end[i] ) ] <- lines
 }
 
+start <- grep( "<FOOT>", tex )
+end <- grep( "</FOOT>", tex )
+
+for( i in seq_along( start ) ){
+	lines <- tex[ seq( start[i], end[i] ) ]
+	lines <- gsub( "\\usebox{\\hlbox", "\\usebox{\\foothlbox", lines, fixed = TRUE )
+	tex[ seq( start[i], end[i] ) ] <- lines
+}
+
+
 writeLines( tex, texfile )
 tools::texi2dvi( texfile, pdf = TRUE, clean = TRUE )
 

Modified: papers/user2010/slides.Rnw
===================================================================
--- papers/user2010/slides.Rnw	2010-07-22 17:50:25 UTC (rev 348)
+++ papers/user2010/slides.Rnw	2010-07-22 17:55:48 UTC (rev 349)
@@ -60,6 +60,36 @@
 \setbox\tinyhlboxhat=\hbox{\begin{tiny}\verb.^.\end{tiny}}%
 % \def\urltilda{\kern -.15em\lower .7ex\hbox{\~{}}\kern .04em}%
   
+\newsavebox{\foothlboxclosebrace}%
+\newsavebox{\foothlboxopenbrace}%
+\newsavebox{\foothlboxbackslash}%
+\newsavebox{\foothlboxlessthan}%
+\newsavebox{\foothlboxgreaterthan}%
+\newsavebox{\foothlboxdollar}%
+\newsavebox{\foothlboxunderscore}%
+\newsavebox{\foothlboxand}%
+\newsavebox{\foothlboxhash}%
+\newsavebox{\foothlboxat}%
+\newsavebox{\foothlboxpercent}% 
+\newsavebox{\foothlboxhat}%
+\newsavebox{\foothlboxsinglequote}%
+\newsavebox{\foothlboxbacktick}%
+
+\setbox\foothlboxopenbrace=\hbox{\begin{footnotesize}\verb.{.\end{footnotesize}}%
+\setbox\foothlboxclosebrace=\hbox{\begin{footnotesize}\verb.}.\end{footnotesize}}%
+\setbox\foothlboxlessthan=\hbox{\begin{footnotesize}\verb.<.\end{footnotesize}}%
+\setbox\foothlboxdollar=\hbox{\begin{footnotesize}\verb.$.\end{footnotesize}}%
+\setbox\foothlboxunderscore=\hbox{\begin{footnotesize}\verb._.\end{footnotesize}}%
+\setbox\foothlboxand=\hbox{\begin{footnotesize}\verb.&.\end{footnotesize}}%
+\setbox\foothlboxhash=\hbox{\begin{footnotesize}\verb.#.\end{footnotesize}}%
+\setbox\foothlboxat=\hbox{\begin{footnotesize}\verb. at .\end{footnotesize}}%
+\setbox\foothlboxbackslash=\hbox{\begin{footnotesize}\verb.\.\end{footnotesize}}%
+\setbox\foothlboxgreaterthan=\hbox{\begin{footnotesize}\verb.>.\end{footnotesize}}%
+\setbox\foothlboxpercent=\hbox{\begin{footnotesize}\verb.%.\end{footnotesize}}%
+\setbox\foothlboxhat=\hbox{\begin{footnotesize}\verb.^.\end{footnotesize}}%
+\setbox\foothlboxsinglequote=\hbox{\begin{footnotesize}\verb.'.\end{footnotesize}}%
+\setbox\foothlboxbacktick=\hbox{\begin{footnotesize}\verb.`.\end{footnotesize}}%
+\setbox\foothlboxhat=\hbox{\begin{footnotesize}\verb.^.\end{footnotesize}}%
   
 \begin{document}
 
@@ -122,7 +152,8 @@
   \frametitle{Example \texttt{proto} file from Tutorial}
   %\framesubtitle{FIXME ?}
 
-  \begin{footnotesize}
+% <FOOT>
+\begin{footnotesize}
 <<lang=cpp>>=
 package tutorial;
 message Person {
@@ -144,12 +175,14 @@
 }
 @
 \end{footnotesize}
+% </FOOT>
 \end{frame}
 
 \begin{frame}
   \frametitle{Example C++ usage}
 
-  \begin{footnotesize}
+% <FOOT>
+\begin{footnotesize}
 <<lang=cpp>>=
 #include "addressbook.pb.h"
 using namespace std;
@@ -169,12 +202,14 @@
     }
 @
 \end{footnotesize}
+% </FOOT>
 \end{frame}
 
 \begin{frame}
   \frametitle{Example C++ usage (cont.)}
 
-  \begin{footnotesize}
+% <FOOT>
+\begin{footnotesize}
 <<lang=cpp>>=
     for (int j = 0; j < person.phone_size(); j++) {
       const tutorial::Person::PhoneNumber
@@ -197,6 +232,7 @@
 }
 @
 \end{footnotesize}
+% </FOOT>
 
 \end{frame}
 
@@ -415,7 +451,8 @@
 
 \begin{frame}
   \frametitle{Example R reader: Simple}
-  \begin{footnotesize}
+% <FOOT>
+\begin{footnotesize}
 <<lang=R>>=
 basicUse <- function(verbose=TRUE) {
   readProtoFiles("TradeData.proto")
@@ -431,12 +468,14 @@
 }
 @
 \end{footnotesize}
+% </FOOT>
 \tiny See \texttt{inst/examples/HighFrequencyFinance/loadInR.r}
 \end{frame}
 
 \begin{frame}
   \frametitle{Example R reader: Smarter}
-  \begin{footnotesize}
+% <FOOT>
+\begin{footnotesize}
 <<lang=R>>=
 betterUse <- function(verbose=TRUE, file = "trades.pb") {
   readProtoFiles("TradeData.proto")
@@ -454,12 +493,14 @@
 }
 @
 \end{footnotesize}
+% </FOOT>
 \tiny See \texttt{inst/examples/HighFrequencyFinance/loadInR.r}
 \end{frame}
 
 \begin{frame}
   \frametitle{Example R reader: Manual via Rcpp}
-  \begin{footnotesize}
+% <FOOT>
+\begin{footnotesize}
 <<lang=R>>=
 compiled <- function(verbose=FALSE, file="trades.pb") {
 
@@ -473,6 +514,7 @@
 }
 @
 \end{footnotesize}
+% </FOOT>
 \tiny See \texttt{inst/examples/HighFrequencyFinance/loadInR.r}
 \end{frame}
 



More information about the Rprotobuf-commits mailing list