[Rprotobuf-commits] r681 - pkg/vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Dec 31 22:51:25 CET 2013


Author: edd
Date: 2013-12-31 22:51:25 +0100 (Tue, 31 Dec 2013)
New Revision: 681

Modified:
   pkg/vignettes/RProtoBuf-intro.Rnw
Log:
define consistent color use for hyperref


Modified: pkg/vignettes/RProtoBuf-intro.Rnw
===================================================================
--- pkg/vignettes/RProtoBuf-intro.Rnw	2013-12-31 20:13:55 UTC (rev 680)
+++ pkg/vignettes/RProtoBuf-intro.Rnw	2013-12-31 21:51:25 UTC (rev 681)
@@ -6,6 +6,14 @@
 
 \usepackage{url}
 \usepackage[colorlinks]{hyperref}
+\definecolor{link}{rgb}{0,0,0.3}
+\hypersetup{
+    colorlinks,%
+    citecolor=link,%
+    filecolor=link,%
+    linkcolor=link,%
+    urlcolor=link
+}
 \setlength{\oddsidemargin}{0pt}
 \setlength{\textwidth}{17cm} % uh-oh, I use letter :)
 \setcounter{tocdepth}{2}
@@ -1247,7 +1255,7 @@
 <<>>=
 fileDescriptor(tutorial.Person$id)
 tutorial.Person$id$fileDescriptor()
-@ 
+@
 
 \subsubsection{containing\_type}
 \label{fielddescriptor-method-containingtype}
@@ -1522,7 +1530,7 @@
 <<>>=
 fileDescriptor(tutorial.Person$PhoneType)
 tutorial.Person$PhoneType$fileDescriptor()
-@ 
+@
 
 \subsubsection{containing\_type}
 \label{enumdescriptor-method-containingtype}
@@ -1532,7 +1540,7 @@
 
 <<>>=
 tutorial.Person$PhoneType$containing_type()
-@ 
+@
 
 \subsubsection{length}
 \label{enumdescriptor-method-length}
@@ -1542,7 +1550,7 @@
 <<>>=
 length(tutorial.Person$PhoneType)
 tutorial.Person$PhoneType$length()
-@ 
+@
 
 \subsubsection{has}
 \label{enumdescriptor-method-has}
@@ -1553,7 +1561,7 @@
 <<>>=
 tutorial.Person$PhoneType$has("WORK")
 tutorial.Person$PhoneType$has("nonexistant")
-@ 
+@
 
 \subsubsection{value\_count}
 \label{enumdescriptor-method-valuecount}
@@ -1564,7 +1572,7 @@
 <<>>=
 value_count(tutorial.Person$PhoneType)
 tutorial.Person$PhoneType$value_count()
-@ 
+@
 
 \subsubsection{value}
 \label{enumdescriptor-method-value}
@@ -1577,7 +1585,7 @@
 tutorial.Person$PhoneType$value(1)
 tutorial.Person$PhoneType$value(name="HOME")
 tutorial.Person$PhoneType$value(number=1)
-@ 
+@
 
 \subsection{enum value descriptors}
 \label{subsec-EnumValueDescriptor}
@@ -1728,7 +1736,7 @@
 f <- tutorial.Person$fileDescriptor()
 f
 f$Person
-@ 
+@
 \begin{table}[h]
 \centering
 \begin{small}
@@ -1957,7 +1965,7 @@
 \texttt{addressbook.proto} is the following line :
 
 \begin{verbatim}
-  extensions 100 to 199;  
+  extensions 100 to 199;
 \end{verbatim}
 
 This specifies that other users in other .proto files can use tag
@@ -1973,11 +1981,11 @@
                "package tutorial;",
                paste0("extend Person {\n  optional string nationality = 100;\n}")),
              extend.proto)
-@ 
+@
 
 <<echo=FALSE>>=
-writeLines(readLines(extend.proto))  
-@ 
+writeLines(readLines(extend.proto))
+@
 
 After importing this new \texttt{.proto} file with an extension
 defined, we can get or set the value of this extension in Messages of
@@ -1985,13 +1993,13 @@
 
 <<>>=
 library(RProtoBuf)
-readProtoFiles(extend.proto)     
+readProtoFiles(extend.proto)
 person <- new(tutorial.Person, id=1, name="Murray")
 person
 person$setExtension(P("tutorial.nationality"), "USA")
 cat(as.character(person))
 person$getExtension(P("tutorial.nationality"))
-@ 
+@
 
 The character output of this message places the extension type in
 brackets to differentiate it from other fields in the message, and so



More information about the Rprotobuf-commits mailing list