summaryrefslogtreecommitdiffstats
path: root/doc/formulas.doc
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2019-08-27 14:55:47 (GMT)
committeralbert-github <albert.tests@gmail.com>2019-08-27 14:55:47 (GMT)
commitfd3b60caa8bb99bec81b74d74f394c6043091c76 (patch)
tree1558814875abeb800fbf4bb92cfa146680460a9a /doc/formulas.doc
parent3d4eb56c5fc8135129e7dd748e2df7a4757195a7 (diff)
downloadDoxygen-fd3b60caa8bb99bec81b74d74f394c6043091c76.zip
Doxygen-fd3b60caa8bb99bec81b74d74f394c6043091c76.tar.gz
Doxygen-fd3b60caa8bb99bec81b74d74f394c6043091c76.tar.bz2
Create possibility to define LaTeX commands for formulas
To be able to have building bocks for formulas one can create a `\newcommand` (or when one wants to change a command `\renewcommand`). Due to the different handling of LaTeX commands in pure LaTeX code (latex output and formulas converted to images) and MathJax it is necessary to transform LaTeX commands to the MathJax equivalent. This is done in a transparent way by providing the new commands in a file and add this verbatim to the pure LaTeX code and to translate the `\newcommand` and `\renewcomamnd` to MathJax macros.
Diffstat (limited to 'doc/formulas.doc')
-rw-r--r--doc/formulas.doc20
1 files changed, 19 insertions, 1 deletions
diff --git a/doc/formulas.doc b/doc/formulas.doc
index 520f089..88a8725 100644
--- a/doc/formulas.doc
+++ b/doc/formulas.doc
@@ -100,9 +100,27 @@ the section should contain valid command for the specific environment.
\warning Currently, doxygen is not very fault tolerant in recovering
from typos in formulas. It may be necessary to remove the
-files <code>formula.repository</code> that are written to the html and rtf directories to
+files <code>formula.repository</code> that are written to the html, rtf etc. directories to
get rid of an incorrect formula as well as the <code>form_*</code> files.
+To have the possibility to define your own \LaTeX commands, for e.g. formula building blocks
+or consistent writing of certain words, the configuration option \ref cfg_formula_macrofile "FORMULA_MACROFILE"
+can be used. to supply a file with \LaTeX commands.
+This file can contain \LaTeX `\newcommand` and \`renewcommand` commands and they are included
+formulas (image version and MathJax version) as well as in the generated \LaTeX output (for PDF generation).<br>
+The `\newcommand` (and `\renewcommand`) are restricted to a version without optional
+parameters so only the following types are supported:
+```
+\newcommand{\cmd}{replacement}
+ and
+\newcommand{\cmd}[nr]{replacement}
+```
+e.g.
+```
+\newcommand{\E}{\mathrm{E}}
+\newcommand{\ccSum}[3]{\sum_{#1}^{#2}{#3}}
+```
+
\htmlonly
Go to the <a href="tables.html">next</a> section or return to the
<a href="index.html">index</a>.