--- loncom/html/adm/help/tex/Variables_in_the_Text_Block.tex 2002/07/05 16:12:31 1.1 +++ loncom/html/adm/help/tex/Variables_in_the_Text_Block.tex 2013/07/05 18:30:40 1.5 @@ -1,11 +1,12 @@ +\label{Variables_in_the_Text_Block} -Once you've defined variables in the \textbf{Script}, you can use them in +\index{variables in text block} +Once you've defined variables in the \textbf{Script}, you can display them in the \textbf{Text Block}. For example, using the previous three-line script we've created so far, you can place the following in the \textbf{Text Block}: \begin{lyxcode} -See~the~3:~\$variable - +See~the~3:~\$variable\\ See~the~string:~\$stringVar \end{lyxcode} % @@ -20,3 +21,8 @@ If you save that and hit \textbf{View}, was turned into a 3, and the {}``\$stringVar'' was turned into {}``I have a variable with the value 3.'' +If you a generating numbers by a formula by division, you will want to format your output. +For example, if \$variable=1/3, it will display with too many digits. You can adjust the format +using the \texttt{num} output tag \index{num output tag} \index{format numbers in text block} +described in the section \ref{Authoring_Output_Tags} +