Help text style guide: Difference between revisions

→‎Formatting: change subsections by what a user may want and not by existing evironments. Also explain how to add TeX mathematical formulas
(→‎Special inserts: how to mention matlab)
(→‎Formatting: change subsections by what a user may want and not by existing evironments. Also explain how to add TeX mathematical formulas)
Line 41: Line 41:


== Formatting ==
== Formatting ==
=== Verbatim ===
 
Use this to include literal text. Special useful to insert formulas.
=== Formulas ===
Do not use the example environment to insert formulas, consider using {{Codeline|@verbatim}} instead.
 
{{Code||<pre>
@verbatim
          E[Z(i,k) ]
IRL(k) =  ------------
              V(i)
@end verbatim
</pre>}}
 
However, this will never print as a nice looking mathematical formula that TeX is known for. It is possible to have Tex formulas but then they won't be displayed on HTML or Info (Octave help) so the following can be done:


{{Code||<pre>
{{Code||<pre>
@tex
\def\frac#1#2{{\begingroup#1\endgroup\over#2}}
$$ IRL(k) = \frac{E[Z(i,k)]}{V(i)} $$
@end tex
@ifnottex
@verbatim
@verbatim
           E[Z(i,k) ]
           E[Z(i,k) ]
Line 50: Line 66:
               V(i)
               V(i)
@end verbatim
@end verbatim
@end ifnottex
</pre>}}
</pre>}}


=== Plain-tex missing macros ===
When compared to LaTeX, plain TeX is missing some very useful macros for including mathematical notation. The following is a list of their definitions which can be added on a as needed basis:


=== Examples ===
* frac
Do not use the example environment to insert formulas, consider using {{Codeline|@verbatim}} instead
<pre>\def\frac#1#2{{\begingroup#1\endgroup\over#2}}</pre>


== Special inserts ==
== Special inserts ==