[LON-CAPA-cvs] cvs: loncom /html/adm/help/tex Variables_in_Scripts.tex

raeburn raeburn at source.lon-capa.org
Mon Sep 2 19:23:43 EDT 2013


raeburn		Mon Sep  2 23:23:43 2013 EDT

  Modified files:              
    /loncom/html/adm/help/tex	Variables_in_Scripts.tex 
  Log:
  - perl code previously included within lyxcode begin/end within verbatim 
    begin/end instead.
  
  
Index: loncom/html/adm/help/tex/Variables_in_Scripts.tex
diff -u loncom/html/adm/help/tex/Variables_in_Scripts.tex:1.4 loncom/html/adm/help/tex/Variables_in_Scripts.tex:1.5
--- loncom/html/adm/help/tex/Variables_in_Scripts.tex:1.4	Fri Oct 12 13:26:55 2012
+++ loncom/html/adm/help/tex/Variables_in_Scripts.tex	Mon Sep  2 23:23:42 2013
@@ -3,7 +3,9 @@
 Variables can be used later in the same script. For instance, we can add
 another line below the \texttt{\$variable} line as such:
 
-\$variable2~=~\$variable~+~2;
+\begin{verbatim}
+$variable2 = $variable+2;
+\end{verbatim}
 
 Now there is a variable called \texttt{\$variable2} with the the number {}``5''
 as its value. 
@@ -14,7 +16,9 @@
 common way is to use normal double-quotes and just spell out the name of
 the variable you want to use in the string, like this:
 
-\$stringVar~=~{}``I~have~a~variable~with~the~value~\$variable.'';
+\begin{verbatim}
+$stringVar = "I have a variable with the value $variable.";
+\end{verbatim}
 
 This will put the string {}``I have a variable with the value 3.'' into
 the variable named {}``stringVar''.




More information about the LON-CAPA-cvs mailing list