File: functions.tex

package info (click to toggle)
latexml 0.8.8-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,920 kB
  • sloc: xml: 109,048; perl: 30,224; sh: 179; javascript: 28; makefile: 13
file content (67 lines) | stat: -rw-r--r-- 1,444 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
\documentclass{article}
\usepackage{latexml}
\lxDeclare[role=ID]{$a$}%
\lxDeclare[role=ID]{$b$}%
\lxDeclare[role=ID]{$c$}%
\lxDeclare[role=ID]{$d$}%
\lxDeclare[role=ID]{$e$}%
\lxDeclare[role=ID]{$x$}%
\lxDeclare[role=ID]{$y$}%
\lxDeclare[role=FUNCTION]{$f$}%
\lxDeclare[role=FUNCTION]{$p$}%
\lxDeclare[role=FUNCTION]{$g$}%
\lxDeclare[role=FUNCTION]{$h$}%
\lxDeclare[role=OPFUNCTION]{$F$}%
\lxDeclare[role=OPFUNCTION]{$G$}%
\lxDeclare[role=OPFUNCTION]{$H$}%

\makeatletter
\def\apply{\iflatexml\@APPLYFUNCTION\fi}
\makeatother
\begin{document}
\section{Basic Functions}
\[ g(a) = g(b) \]
\[ f(a) = g(h(c)) \]
\[ h(c) = \sin a^2 \]
\[ \sin f(a) \]

\section{Trigonometric functions}
\[ \sin a + \tan b \]
\[ \sin a \cos b \neq \sin(a\cos b)\]
% Parses wrong ? but how to clarify?
\[ \sin 2\pi \neq \log 2x^2 \]
\[ \log \sin x \]
\[ \sin \log x \]
\[ \nabla \log x \]

\section{Probability functions}
\[ p (x,y|\Theta) \]
\[ p (y |x,\Theta) \]
\[ f \left( a \middle| b \right) \]

\section{Missing arguments}
% Presumably these are products
\[ f g h \]
\[ f g h a \]
\section{Operator-like functions}
% But these are applied!
\[ F G H \]
\[ F G H a \]

\[ f'(a) = a^2 \]
\[ f^2(a) = g^b(2) \]

\[ f  \apply g x \]
\[ f \apply (x) \]

\section{Scripts}
\[ \ln a = \log_e a = \ln_{+} b\]

\section{Advanced argument patterns}
\[ f ( a < b )  \]
\[ f ( a : b )  \]
\[ f ( a \leftrightarrow b )  \]
\[ f( \rightarrow , \leftarrow) \]


\end{document}