1<?php
2
3class TexCommand {
4
5	public $command;
6
7	/**
8	 * Class constructor.
9	 * @param decorator The next decorator layer.
10	 */
11	function __construct($command) {
12		$this->command = $command;
13	}
14}
15
16class CommandHeader extends TexCommand {
17	public $text;
18	public $level;
19	public $pos;
20
21	function __construct($text, $level, $pos) {
22		parent::__construct("listu_open");
23		$this->text = $text;
24		$this->level = $level;
25		$this->pos = $pos;
26	}
27}
28
29class CommandListOOpen extends TexCommand {
30	function __construct() {
31		parent::__construct("listo_open");
32	}
33}
34
35class CommandListUOpen extends TexCommand {
36	function __construct() {
37		parent::__construct("listu_open");
38	}
39}
40
41class CommandListItemOpen extends TexCommand {
42
43	public $level;
44
45	function __construct($level) {
46		parent::__construct("listitem_open");
47		$this->level = $level;
48	}
49}
50
51class CommandCData extends TexCommand {
52	public $text;
53
54	function __construct($text) {
55		parent::__construct("cdata");
56		$this->text = $text;
57	}
58}
59
60class CommandPOpen extends TexCommand {
61	function __construct() {
62		parent::__construct("p_open");
63	}
64}
65
66class CommandPClose extends TexCommand {
67	function __construct() {
68		parent::__construct("p_close");
69	}
70}
71
72class CommandLinebreak extends TexCommand {
73	function __construct() {
74		parent::__construct("linebreak");
75	}
76}
77
78class CommandInternalLink extends TexCommand {
79	public $link;
80	public $text;
81
82	function __construct($link, $title) {
83		parent::__construct("listcontent_open");
84	}
85}
86
87class CommandFootnoteOpen extends TexCommand {
88	function __construct() {
89		parent::__construct("footnote_open");
90	}
91}
92
93class CommandFootnoteClose extends TexCommand {
94	function __construct() {
95		parent::__construct("footnote_close");
96	}
97}
98
99class CommandListContentOpen extends TexCommand {
100	function __construct() {
101		parent::__construct("listcontent_open");
102	}
103}
104
105class CommandListContentClose extends TexCommand {
106	function __construct() {
107		parent::__construct("listcontent_close");
108	}
109}
110
111class CommandListItemClose extends TexCommand {
112	function __construct() {
113		parent::__construct("listitem_close");
114	}
115}
116
117class CommandListUClose extends TexCommand {
118	function __construct() {
119		parent::__construct("listu_close");
120	}
121}
122class CommandListOClose extends TexCommand {
123	function __construct() {
124		parent::__construct("listo_close");
125	}
126}
127class CommandMathjaxContent extends TexCommand {
128	public $formula;
129
130	function __construct($formula) {
131		parent::__construct("mathjax_content");
132		$this->formula = $formula;
133	}
134}
135class CommandAppendCommand extends TexCommand {
136	public $command;
137	public $scope;
138	public $argument;
139
140	function __construct($command, $scope, $argument = '') {
141		parent::__construct("appendCommand");
142		$this->command = $command;
143		$this->scope = $scope;
144		$this->argument = $argument;
145	}
146}
147
148class CommandTableOpen extends TexCommand {
149	private $maxcols = null;
150	private $numrows = null;
151	private $pos = null;
152
153	function __construct($maxcols = null, $numrows = null, $pos = null) {
154		parent::__construct("table_open");
155		$this->maxcols = $maxcols;
156		$this->numrows = $numrows;
157		$this->pos = $pos;
158	}
159}
160
161class CommandTableClose extends TexCommand {
162	private $pos = null;
163
164	function __construct($pos = null) {
165		parent::__construct("table_close");
166		$this->pos = $pos;
167	}
168}
169
170class CommandTableHeadOpen extends TexCommand {
171	function __construct() {
172		parent::__construct("tablethead_open");
173	}
174}
175
176class CommandTableHeadClose extends TexCommand {
177	function __construct() {
178		parent::__construct("tablethead_close");
179	}
180}
181
182class CommandTableBodyOpen extends TexCommand {
183	function __construct() {
184		parent::__construct("tabletbody_open");
185	}
186}
187
188class CommandTableBodyClose extends TexCommand {
189	function __construct() {
190		parent::__construct("tabletbody_close");
191	}
192}
193
194class CommandTableFootOpen extends TexCommand {
195	function __construct() {
196		parent::__construct("tabletfoot_open");
197	}
198}
199
200class CommandTableFootClose extends TexCommand {
201	function __construct() {
202		parent::__construct("tabletfoot_close");
203	}
204}
205
206class CommandTableRowOpen extends TexCommand {
207	function __construct() {
208		parent::__construct("tablerow_open");
209	}
210}
211
212class CommandTableRowClose extends TexCommand {
213	function __construct() {
214		parent::__construct("tablerow_close");
215	}
216}
217
218class CommandTableHeaderOpen extends TexCommand {
219	private $colspan;
220	private $align;
221	private $rowspan;
222
223	function __construct($colspan = 1, $align = null, $rowspan = 1) {
224		parent::__construct("tableheader_open");
225		$this->colspan = $colspan;
226		$this->align = $align;
227		$this->rowspan = $rowspan;
228	}
229}
230
231class CommandTableHeaderClose extends TexCommand {
232	function __construct() {
233		parent::__construct("tableheader_close");
234	}
235}
236
237class CommandTableCellOpen extends TexCommand {
238	private $colspan = 1;
239	private $align = null;
240	private $rowspan = 1;
241
242	function __construct($colspan = 1, $align = null, $rowspan = 1) {
243		parent::__construct("tablecell_open");
244		$this->colspan = $colspan;
245		$this->align = $align;
246		$this->rowspan = $rowspan;
247	}
248}
249
250class CommandTableCellClose extends TexCommand {
251	function __construct() {
252		parent::__construct("tablecell_close");
253	}
254}
255
256class CommandTableCline extends TexCommand {
257	private $start;
258	private $end;
259
260	function __construct($start, $end) {
261		parent::__construct("table_cline");
262		$this->start = $start;
263		$this->end = $end;
264	}
265}
266
267class CommandInternalMedia extends TexCommand {
268	private $src;
269	private $title;
270	private $align;
271	private $width;
272	private $height;
273	private $positionInGroup;
274	private $totalInGroup;
275
276	function __construct($src, $title, $align, $width, $height, $positionInGroup, $totalInGroup) {
277		parent::__construct("internalmedia");
278		$this->src = $src;
279		$this->title = $title;
280		$this->align = $align;
281		$this->width = $width;
282		$this->height = $height;
283		$this->positionInGroup = $positionInGroup;
284		$this->totalInGroup = $totalInGroup;
285	}
286
287}
288
289?>