Commit | Line | Data |
---|---|---|
6855525e JL |
1 | <?php |
2 | ||
3 | class Text_Wiki_Render_Latex_Heading extends Text_Wiki_Render { | |
4 | ||
5 | function token($options) | |
6 | { | |
7 | // get nice variable names (type, level) | |
8 | extract($options); | |
9 | ||
10 | if ($type == 'start') { | |
11 | switch ($level) | |
12 | { | |
13 | case '1': | |
14 | return '\part{'; | |
15 | case '2': | |
16 | return '\section{'; | |
17 | case '3': | |
18 | return '\subsection{'; | |
19 | case '4': | |
20 | return '\subsubsection{'; | |
21 | case '5': | |
22 | return '\paragraph{'; | |
23 | case '6': | |
24 | return '\subparagraph{'; | |
25 | } | |
26 | } | |
27 | ||
28 | if ($type == 'end') { | |
29 | return "}\n"; | |
30 | } | |
31 | } | |
32 | } | |
33 | ?> |