659
edits
Carandraug (talk | contribs) (→Special inserts: how to mention matlab) |
Carandraug (talk | contribs) (→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 == | ||
=== | |||
=== 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: | |||
* frac | |||
<pre>\def\frac#1#2{{\begingroup#1\endgroup\over#2}}</pre> | |||
== Special inserts == | == Special inserts == |