[Rprotobuf-commits] r348 - papers/user2010
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Jul 22 19:50:25 CEST 2010
Author: romain
Date: 2010-07-22 19:50:25 +0200 (Thu, 22 Jul 2010)
New Revision: 348
Modified:
papers/user2010/build.R
papers/user2010/slides.Rnw
Log:
tiny boxes
Modified: papers/user2010/build.R
===================================================================
--- papers/user2010/build.R 2010-07-22 17:44:47 UTC (rev 347)
+++ papers/user2010/build.R 2010-07-22 17:50:25 UTC (rev 348)
@@ -23,6 +23,14 @@
sub( "\\\\\\\\$", "", tex[ endboxes - 1 ] ) )
tex[ endboxes ] <- ""
+start <- grep( "<TINY>", tex )
+end <- grep( "</TINY>", tex )
+for( i in seq_along( start ) ){
+ lines <- tex[ seq( start[i], end[i] ) ]
+ lines <- gsub( "\\usebox{\\hlbox", "\\usebox{\\tinyhlbox", 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:44:47 UTC (rev 347)
+++ papers/user2010/slides.Rnw 2010-07-22 17:50:25 UTC (rev 348)
@@ -28,6 +28,39 @@
National Institute of Standards and Technology (NIST)\\
Gaithersburg, Maryland, USA}
+\newsavebox{\tinyhlboxclosebrace}%
+\newsavebox{\tinyhlboxopenbrace}%
+\newsavebox{\tinyhlboxbackslash}%
+\newsavebox{\tinyhlboxlessthan}%
+\newsavebox{\tinyhlboxgreaterthan}%
+\newsavebox{\tinyhlboxdollar}%
+\newsavebox{\tinyhlboxunderscore}%
+\newsavebox{\tinyhlboxand}%
+\newsavebox{\tinyhlboxhash}%
+\newsavebox{\tinyhlboxat}%
+\newsavebox{\tinyhlboxpercent}%
+\newsavebox{\tinyhlboxhat}%
+\newsavebox{\tinyhlboxsinglequote}%
+\newsavebox{\tinyhlboxbacktick}%
+
+\setbox\tinyhlboxopenbrace=\hbox{\begin{tiny}\verb.{.\end{tiny}}%
+\setbox\tinyhlboxclosebrace=\hbox{\begin{tiny}\verb.}.\end{tiny}}%
+\setbox\tinyhlboxlessthan=\hbox{\begin{tiny}\verb.<.\end{tiny}}%
+\setbox\tinyhlboxdollar=\hbox{\begin{tiny}\verb.$.\end{tiny}}%
+\setbox\tinyhlboxunderscore=\hbox{\begin{tiny}\verb._.\end{tiny}}%
+\setbox\tinyhlboxand=\hbox{\begin{tiny}\verb.&.\end{tiny}}%
+\setbox\tinyhlboxhash=\hbox{\begin{tiny}\verb.#.\end{tiny}}%
+\setbox\tinyhlboxat=\hbox{\begin{tiny}\verb. at .\end{tiny}}%
+\setbox\tinyhlboxbackslash=\hbox{\begin{tiny}\verb.\.\end{tiny}}%
+\setbox\tinyhlboxgreaterthan=\hbox{\begin{tiny}\verb.>.\end{tiny}}%
+\setbox\tinyhlboxpercent=\hbox{\begin{tiny}\verb.%.\end{tiny}}%
+\setbox\tinyhlboxhat=\hbox{\begin{tiny}\verb.^.\end{tiny}}%
+\setbox\tinyhlboxsinglequote=\hbox{\begin{tiny}\verb.'.\end{tiny}}%
+\setbox\tinyhlboxbacktick=\hbox{\begin{tiny}\verb.`.\end{tiny}}%
+\setbox\tinyhlboxhat=\hbox{\begin{tiny}\verb.^.\end{tiny}}%
+% \def\urltilda{\kern -.15em\lower .7ex\hbox{\~{}}\kern .04em}%
+
+
\begin{document}
\begin{frame}
@@ -82,7 +115,7 @@
\end{frame}
-
+
\subsection{Example}
\begin{frame}
@@ -314,7 +347,8 @@
% // compatible with the version of the headers we compiled against.
% GOOGLE_PROTOBUF_VERIFY_VERSION;
- \begin{tiny}
+%%% <TINY>
+\begin{tiny}
<<lang=cpp>>=
int main(int argc, char **argv) {
const char* pbfile = "trades.pb";
@@ -344,6 +378,8 @@
@
\end{tiny}
+%%% </TINY>
+
\tiny See \texttt{inst/examples/HighFrequencyFinance/protoCreate.cpp}
\end{frame}
@@ -442,7 +478,9 @@
\begin{frame}
\frametitle{Example R reader: C++ support}
- \begin{tiny}
+
+%%% <TINY>
+\begin{tiny}
<<lang=C++>>=
extern "C" SEXP pbload(SEXP b) {
std::string pbfile = Rcpp::as<std::string>(b);
@@ -469,8 +507,10 @@
Rcpp::Named("price") = tprice,
Rcpp::Named("size") = tsize);
}
-@
+@
\end{tiny}
+%%% </TINY>
+
\tiny See \texttt{inst/examples/HighFrequencyFinance/protoModule.cpp}
\end{frame}
More information about the Rprotobuf-commits
mailing list