]> git.saurik.com Git - wxWidgets.git/blob - utils/tex2rtf/src/tex2any.h
Applied TRUE/FALSE fix here too.
[wxWidgets.git] / utils / tex2rtf / src / tex2any.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: tex2any.h
3 // Purpose: Latex conversion header
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 7.9.93
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #include <stdio.h>
13 #include "wx/wx.h"
14 #include "wx/utils.h"
15 #include "wx/list.h"
16 #include "wx/hash.h"
17 #include "wxhlpblk.h"
18
19 /*
20 * Conversion modes
21 *
22 */
23
24 #define TEX_RTF 1
25 #define TEX_XLP 2
26 #define TEX_HTML 3
27
28 /*
29 * We have a list of macro definitions which we must define
30 * in advance to enable the parsing to recognize macros.
31 */
32
33 #define FORBID_OK 0
34 #define FORBID_WARN 1
35 #define FORBID_ABSOLUTELY 2
36
37
38 #ifdef __WXMSW__
39 const int MAX_LINE_BUFFER_SIZE = 600;
40 #else
41 const int MAX_LINE_BUFFER_SIZE = 11000;
42 #endif
43
44 class TexMacroDef: public wxObject
45 {
46 public:
47 int no_args;
48 char *name;
49 bool ignore;
50 int forbidden;
51 int macroId;
52
53 TexMacroDef(int the_id, const char *the_name, int n, bool ig, bool forbidLevel = FORBID_OK);
54 ~TexMacroDef(void);
55 };
56
57 #define CHUNK_TYPE_MACRO 1
58 #define CHUNK_TYPE_ARG 2
59 #define CHUNK_TYPE_STRING 3
60
61 /*
62 We have nested lists to represent the Tex document.
63 Each element of a list of chunks can be one of:
64 - a plain string
65 - a macro with/without arguments. Arguments are lists of TexChunks.
66
67 Example (\toplevel is implicit but made explicit here):
68
69 AddMacroDef(ltMYMAT, "mymat", 2);
70
71 \toplevel{The cat sat on the \mymat{very coarse and {\it cheap}}{mat}}.
72
73 Parsed as:
74
75 TexChunk: type = macro, name = toplevel, no_args = 1
76 Children:
77
78 TexChunk: type = argument
79
80 Children:
81 TexChunk: type = string, value = "The cat sat on the "
82 TexChunk: type = macro, name = mymat, no_args = 2
83
84 Children:
85 TexChunk: type = argument
86
87 Children:
88 TexChunk: type = string, value = "very coarse and "
89 TexChunk: type = macro, name = it, no_args = 1
90
91 Children:
92 TexChunk: type = argument
93
94 Children:
95 TexChunk: type = string, value = "cheap"
96
97 TexChunk: type = argument
98
99 Children:
100 TexChunk: type = string, value = mat
101 */
102
103 class TexChunk
104 {
105 public:
106 int type;
107 // char *name;
108 TexMacroDef *def;
109 char *value;
110 int macroId;
111 int no_args;
112 int argn;
113 bool optional; // Is an optional argument
114
115 wxList children;
116 TexChunk(int the_type, TexMacroDef *the_def = NULL);
117 TexChunk(TexChunk& toCopy);
118 virtual ~TexChunk(void);
119 };
120
121 // Represents a topic, used for generating a table of contents file (.cnt).
122 // Also for storing keywords found in a topic, a list of which is then inserted
123 // into the topic in the next pass.
124 class TexTopic: public wxObject
125 {
126 public:
127 // This flag is set to indicate that the topic has children.
128 // If this is the case, we know to insert a 'book' icon at this level,
129 // not just a 'page' icon. We don't want to have to open a book only
130 // to find there's only one page in it. We might force a book to be used if
131 // a top-level topic has no children (?)
132 bool hasChildren;
133 char *filename;
134 wxStringList *keywords;
135 TexTopic(char *f = NULL);
136 ~TexTopic(void);
137 };
138 extern wxHashTable TopicTable;
139 void AddKeyWordForTopic(char *topic, char *entry, char *filename = NULL);
140 void ClearKeyWordTable(void);
141
142 extern char wxTex2RTFBuffer[];
143 extern TexChunk *TopLevel;
144 extern wxHashTable MacroDefs;
145 extern wxStringList IgnorableInputFiles; // Ignorable \input files, e.g. psbox.tex
146
147 bool read_a_line(char *buf);
148 bool TexLoadFile(char *filename);
149 int ParseArg(TexChunk *thisArg, wxList& children, char *buffer, int pos,
150 char *environment = NULL, bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL);
151 int ParseMacroBody(const char *macro_name, TexChunk *parent, int no_args,
152 char *buffer, int pos, char *environment = NULL, bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL);
153 void TraverseDocument(void);
154 void TraverseFromChunk(TexChunk *chunk, wxNode *thisNode = NULL, bool childrenOnly = FALSE);
155 #define TraverseChildrenFromChunk(arg) TraverseFromChunk(arg, NULL, TRUE)
156 void SetCurrentOutput(FILE *fd);
157 void SetCurrentOutputs(FILE *fd1, FILE *fd2);
158 extern FILE *CurrentOutput1;
159 extern FILE *CurrentOutput2;
160 void AddMacroDef(int the_id, const char *name, int n, bool ignore = FALSE, bool forbidden = FALSE);
161 void TexInitialize(int bufSize);
162 void TexCleanUp(void);
163 void TexOutput(const char *s, bool ordinaryText = FALSE);
164 char *GetArgData(TexChunk *chunk);
165 char *GetArgData(void); // Get the string for the current argument
166 int GetNoArgs(void); // Get the number of arguments for the current macro
167 TexChunk *GetArgChunk(void); // Get the chunk for the current argument
168 TexChunk *GetTopLevelChunk(void); // Get the chunk for the top level
169 TexChunk *GetNextChunk(void); // Look ahead to the next chunk
170 bool IsArgOptional(void); // Is this argument an optional argument?
171 void DefineDefaultMacros(void); // Optional set of default macros
172 int GetCurrentColumn(void); // number of characters on current line
173 char *ConvertCase(char *s); // Convert case, according to upperCaseNames setting.
174 extern wxPathList TexPathList; // Path list, can be used for file searching.
175
176 // Define a variable value from the .ini file
177 char *RegisterSetting(char *settingName, char *settingValue, bool interactive = TRUE);
178
179 // Major document styles
180 #define LATEX_REPORT 1
181 #define LATEX_ARTICLE 2
182 #define LATEX_LETTER 3
183 #define LATEX_BOOK 4
184 #define LATEX_SLIDES 5
185
186 extern TexChunk *DocumentTitle;
187 extern TexChunk *DocumentAuthor;
188 extern TexChunk *DocumentDate;
189 extern int DocumentStyle;
190 extern int MinorDocumentStyle;
191 extern char *BibliographyStyleString;
192 extern char *DocumentStyleString;
193 extern char *MinorDocumentStyleString;
194
195 extern int normalFont;
196 extern int smallFont;
197 extern int tinyFont;
198 extern int largeFont1;
199 extern int LargeFont2;
200 extern int LARGEFont3;
201 extern int hugeFont1;
202 extern int HugeFont2;
203 extern int HUGEFont3;
204
205 /*
206 * USER-ADJUSTABLE SETTINGS
207 *
208 */
209
210 // Section font sizes
211 extern int chapterFont;
212 extern int sectionFont;
213 extern int subsectionFont;
214 extern int titleFont;
215 extern int authorFont;
216 extern bool winHelp; // Output in Windows Help format if TRUE, linear otherwise
217 extern bool isInteractive;
218 extern bool runTwice;
219 extern int convertMode;
220 extern bool checkCurleyBraces;
221 extern bool checkSyntax;
222 extern bool stopRunning;
223 extern int mirrorMargins;
224 extern bool headerRule;
225 extern bool footerRule;
226 extern int labelIndentTab; // From left indent to item label (points)
227 extern int itemIndentTab; // From left indent to item (points)
228 extern bool useUpButton;
229 extern int htmlBrowseButtons;
230 extern bool useHeadingStyles; // Insert \s1, s2 etc.
231 extern bool useWord; // Insert Word table of contents, etc. etc.
232 extern bool indexSubsections; // put subsections in index
233 extern bool compatibilityMode;
234 extern bool generateHPJ; // Generate WinHelp HPJ file
235 extern char *winHelpTitle; // Title for Windows Help file
236 extern int defaultTableColumnWidth;
237 extern char *bitmapMethod;
238 extern bool truncateFilenames; // Truncate for DOS
239 extern int winHelpVersion; // Version e.g. 4 for Win95
240 extern bool winHelpContents; // Generate .cnt file
241 extern bool htmlIndex; // Generate .htx HTML index file
242 extern bool htmlFrameContents; // Use frames for HTML contents page
243 extern int contentsDepth; // Depth of contents for linear RTF files
244 extern bool upperCaseNames; // Filenames; default is lower case
245 extern char *backgroundImageString; // HTML background image
246 extern char *backgroundColourString; // HTML background colour
247 extern char *textColourString; // HTML text colour
248 extern char *linkColourString; // HTML link colour
249 extern char *followedLinkColourString; // HTML followed link colour
250 extern bool combineSubSections; // Stop splitting files below section
251 extern bool htmlWorkshopFiles; // generate HTML Help Workshop project files
252 extern bool ignoreBadRefs; // Don't insert (REF NOT FOUND)
253 extern char *htmlFaceName; // HTML face name
254
255 // Names to help with internationalisation
256 extern char *ContentsNameString;
257 extern char *AbstractNameString;
258 extern char *GlossaryNameString;
259 extern char *ReferencesNameString;
260 extern char *FiguresNameString;
261 extern char *TablesNameString;
262 extern char *FigureNameString;
263 extern char *TableNameString;
264 extern char *IndexNameString;
265 extern char *ChapterNameString;
266 extern char *SectionNameString;
267 extern char *SubsectionNameString;
268 extern char *SubsubsectionNameString;
269 extern char *UpNameString;
270
271 /*
272 * HTML button identifiers: what kind of browse buttons
273 * are placed in HTML files, if any.
274 *
275 */
276
277 #define HTML_BUTTONS_NONE 0
278 #define HTML_BUTTONS_BITMAP 1
279 #define HTML_BUTTONS_TEXT 2
280
281 /*
282 * Section numbering
283 *
284 */
285
286 extern int chapterNo;
287 extern int sectionNo;
288 extern int subsectionNo;
289 extern int subsubsectionNo;
290 extern int figureNo;
291 extern int tableNo;
292
293 extern int ParSkip;
294 extern int ParIndent;
295
296 extern bool isSync;
297
298 // Set by client and by Tex2Any
299 extern TexChunk *currentSection;
300
301 // Header/footers/pagestyle
302 extern TexChunk * LeftHeaderOdd;
303 extern TexChunk * LeftFooterOdd;
304 extern TexChunk * CentreHeaderOdd;
305 extern TexChunk * CentreFooterOdd;
306 extern TexChunk * RightHeaderOdd;
307 extern TexChunk * RightFooterOdd;
308 extern TexChunk * LeftHeaderEven;
309 extern TexChunk * LeftFooterEven;
310 extern TexChunk * CentreHeaderEven;
311 extern TexChunk * CentreFooterEven;
312 extern TexChunk * RightHeaderEven;
313 extern TexChunk * RightFooterEven;
314 extern char * PageStyle;
315
316 // Repeat the currentSection, either real (Chapter) or simulated (References)
317 extern void OutputCurrentSection(void);
318 extern void OutputCurrentSectionToString(char *buf);
319 extern void OutputChunkToString(TexChunk *chunk, char *buf);
320
321 extern char *fakeCurrentSection;
322
323 // Called by Tex2Any to simulate a section
324 extern void FakeCurrentSection(char *fakeSection, bool addToContents = TRUE);
325
326 /*
327 * Local to Tex2Any library
328 *
329 */
330
331 extern char *currentArgData;
332 extern bool haveArgData; // If TRUE, we're simulating the data.
333 void StartSimulateArgument(char *data);
334 void EndSimulateArgument(void);
335
336 /*
337 * Client-defined
338 *
339 */
340
341 // Called on start/end of macro examination
342 void OnMacro(int macroId, int no_args, bool start);
343
344 // Called on start/end of argument examination.
345 // Return TRUE at the start of an argument to traverse
346 // (output) the argument.
347 bool OnArgument(int macroId, int arg_no, bool start);
348
349 // Default: library-defined
350 void DefaultOnMacro(int macroId, int no_args, bool start);
351
352 // Default: library-defined
353 bool DefaultOnArgument(int macroId, int arg_no, bool start);
354
355 // Called on error
356 void OnError(const char *msg);
357
358 // Called for information
359 void OnInform(const char *msg);
360
361 // Special yield wrapper
362 void Tex2RTFYield(bool force = FALSE);
363
364 /*
365 * Useful utilities
366 *
367 */
368
369 // Look for \label macro, use this ref name if found or
370 // make up a topic name otherwise.
371 char *FindTopicName(TexChunk *chunk);
372 // Force the current topic to be this (e.g. force 'references' label).
373 void ForceTopicName(const char *name);
374 void ResetTopicCounter(void);
375
376 // Parse unit eg. 14, 12pt, 34cm and return value in points.
377 int ParseUnitArgument(char *unitArg);
378
379 // Set small, large, normal etc. point sizes for reference size
380 void SetFontSizes(int pointSize);
381
382 /*
383 * Strip off any extension (dot something) from end of file,
384 * IF one exists. Inserts zero into buffer.
385 *
386 */
387
388 void StripExtension(char *buffer);
389
390 /*
391 * Reference structure
392 *
393 */
394
395 class TexRef: public wxObject
396 {
397 public:
398 char *refLabel; // Reference label
399 char *refFile; // Reference filename (can be NULL)
400 char *sectionNumber; // Section or figure number (as a string)
401 char *sectionName; // name e.g. 'section'
402 TexRef(const char *label, const char *file, const char *section, const char *sectionN = NULL);
403 ~TexRef(void);
404 };
405
406 /*
407 * Add a reference
408 *
409 */
410
411 void AddTexRef(char *name, char *file = NULL, char *sectionName = NULL,
412 int chapter = 0, int section = 0, int subsection = 0, int subsubsection = 0);
413
414 /*
415 * Read and write reference file (.ref), to resolve refs for second pass.
416 *
417 */
418 void WriteTexReferences(char *filename);
419 void ReadTexReferences(char *filename);
420
421 /*
422 * Bibliography stuff
423 *
424 */
425
426 class BibEntry: public wxObject
427 {
428 public:
429 char *key;
430
431 /*
432 * book, inbook, article, phdthesis, inproceedings, techreport
433 */
434 char *type;
435
436 /*
437 * Possible fields
438 *
439 */
440 char *editor;
441 char *title;
442 char *booktitle;
443 char *author;
444 char *journal;
445 char *volume;
446 char *number;
447 char *year;
448 char *month;
449 char *pages;
450 char *chapter;
451 char *publisher;
452 char *address;
453 char *institution;
454 char *organization;
455 char *comment;
456
457 inline BibEntry(void)
458 {
459 key = NULL;
460 type = NULL;
461 editor = NULL;
462 title = NULL;
463 booktitle = NULL;
464 author = NULL;
465 journal = NULL;
466 volume = NULL;
467 number = NULL;
468 chapter = NULL;
469 year = NULL;
470 month = NULL;
471 pages = NULL;
472 publisher = NULL;
473 address = NULL;
474 institution = NULL;
475 organization = NULL;
476 comment = NULL;
477 }
478 };
479
480 extern wxList BibList;
481 extern wxStringList CitationList;
482
483 bool ReadBib(char *filename);
484 void OutputBib(void);
485 void ResolveBibReferences(void);
486 void AddCitation(char *citeKey);
487 TexRef *FindReference(char *key);
488
489 /*
490 * Ability to customize, or at least suppress unknown macro errors
491 *
492 */
493
494 extern wxList CustomMacroList;
495
496 #define CUSTOM_MACRO_IGNORE 0
497 #define CUSTOM_MACRO_OUTPUT 1
498 #define CUSTOM_MACRO_MARK 2
499
500 class CustomMacro: public wxObject
501 {
502 public:
503 char *macroName;
504 char *macroBody;
505 int noArgs;
506 inline CustomMacro(char *name, int args, char *body)
507 {
508 noArgs = args;
509 macroName = copystring(name);
510 if (body)
511 macroBody = copystring(body);
512 else
513 macroBody = NULL;
514 }
515 ~CustomMacro();
516 };
517
518 bool ReadCustomMacros(char *filename);
519 void ShowCustomMacros(void);
520 CustomMacro *FindCustomMacro(char *name);
521 char *ParseMultifieldString(char *s, int *pos);
522
523 /*
524 * Colour table stuff
525 *
526 */
527
528 class ColourTableEntry: public wxObject
529 {
530 public:
531 char *name;
532 unsigned int red;
533 unsigned int green;
534 unsigned int blue;
535
536 ColourTableEntry(const char *theName, unsigned int r, unsigned int g, unsigned int b);
537 ~ColourTableEntry(void);
538 };
539
540 extern wxList ColourTable;
541 extern void AddColour(const char *theName, unsigned int r, unsigned int g, unsigned int b);
542 extern int FindColourPosition(char *theName);
543 // Converts e.g. "red" -> "#FF0000"
544 extern bool FindColourHTMLString(char *theName, char *buf);
545 extern void InitialiseColourTable(void);
546
547 #define ltABSTRACT 1
548 #define ltADDCONTENTSLINE 2
549 #define ltADDTOCOUNTER 3
550 #define ltALPH1 4
551 #define ltALPH2 5
552 #define ltAPPENDIX 6
553 #define ltARABIC 7
554 #define ltARRAY 8
555 #define ltAUTHOR 9
556
557 #define ltBACKSLASH 30
558 #define ltBASELINESKIP 31
559 #define ltBF 32
560 #define ltBIBITEM 33
561 #define ltBIBLIOGRAPHYSTYLE 34
562 #define ltBIBLIOGRAPHY 35
563 #define ltBOXIT 36
564 #define ltBACKSLASHRAW 37
565 #define ltBACKGROUND 38
566 #define ltBACKGROUNDCOLOUR 39
567 #define ltBACKGROUNDIMAGE 40
568 #define ltBRCLEAR 41
569
570 #define ltCAPTIONSTAR 50
571 #define ltCAPTION 51
572 #define ltCDOTS 52
573 #define ltCENTERLINE 53
574 #define ltCENTERING 54
575 #define ltCENTER 55
576 #define ltCEXTRACT 56
577 #define ltCHAPTERHEADING 57
578 #define ltCHAPTERSTAR 58
579 #define ltCHAPTER 59
580 #define ltCINSERT 60
581 #define ltCITE 61
582 #define ltCLASS 62
583 #define ltCLEARDOUBLEPAGE 63
584 #define ltCLEARPAGE 64
585 #define ltCLINE 65
586 #define ltCLIPSFUNC 66
587 #define ltCOLUMNSEP 67
588 #define ltCOMMENT 68
589 #define ltCOPYRIGHT 69
590 #define ltCPARAM 70
591
592 #define ltCHEAD 71
593 #define ltCFOOT 72
594
595 #define ltCHAPTERHEADINGSTAR 73
596
597 #define ltDATE 90
598 #define ltDESCRIPTION 91
599 #define ltDESTRUCT 92
600 #define ltDOCUMENTSTYLE 93
601 #define ltDOCUMENT 94
602 #define ltDOUBLESPACE 95
603 #define ltDEFINECOLOUR 96
604 #define ltDEFINECOLOR 97
605
606 #define ltEM 120
607 #define ltENUMERATE 121
608 #define ltEQUATION 122
609 #define ltEVENSIDEMARGIN 123
610
611 #define ltFBOX 150
612 #define ltFIGURE 151
613 #define ltFLUSHLEFT 152
614 #define ltFLUSHRIGHT 153
615 #define ltFOOTHEIGHT 154
616 #define ltFOOTNOTE 155
617 #define ltFOOTSKIP 156
618 #define ltFRAMEBOX 157
619 #define ltFUNCTIONSECTION 158
620 #define ltFUNC 159
621 #define ltFIGURESTAR 160
622 #define ltFOOTNOTESIZE 161
623 #define ltFOOTNOTEPOPUP 162
624 #define ltFANCYPLAIN 163
625 #define ltFCOL 164
626 #define ltBCOL 165
627 #define ltFOLLOWEDLINKCOLOUR 166
628
629 #define ltGLOSSARY 180
630 #define ltGLOSS 181
631
632 #define ltHEADHEIGHT 200
633 #define ltHELPGLOSSARY 201
634 #define ltHELPIGNORE 202
635 #define ltHELPONLY 203
636 #define ltHELPINPUT 204
637 #define ltHELPFONTFAMILY 205
638 #define ltHELPFONTSIZE 206
639 #define ltHELPREFN 207
640 #define ltHELPREF 208
641 #define ltHFILL 209
642 #define ltHLINE 210
643 #define ltHRULE 211
644 #define ltHSPACESTAR 212
645 #define ltHSPACE 213
646 #define ltHSKIPSTAR 214
647 #define ltHSKIP 215
648 #define lthuge 216
649 #define ltHuge 217
650 #define ltHUGE 218
651 #define ltHTMLIGNORE 219
652 #define ltHTMLONLY 220
653
654 #define ltINCLUDEONLY 240
655 #define ltINCLUDE 241
656 #define ltINDEX 242
657 #define ltINPUT 243
658 #define ltITEMIZE 244
659 #define ltITEM 245
660 #define ltIMAGE 246
661 #define ltIT 247
662 #define ltITEMSEP 248
663 #define ltINDENTED 249
664 #define ltIMAGEMAP 250
665 #define ltIMAGER 251
666 #define ltIMAGEL 252
667 #define ltINSERTATLEVEL 253
668
669 #define ltKILL 260
670
671 #define ltLABEL 280
672 #define ltlarge 281
673 #define ltLarge 282
674 #define ltLARGE 283
675 #define ltLATEX 284
676 #define ltLBOX 285
677 #define ltLDOTS 286
678 #define ltLINEBREAK 287
679 #define ltLISTOFFIGURES 288
680 #define ltLISTOFTABLES 289
681 #define ltLHEAD 290
682 #define ltLFOOT 291
683 #define ltLATEXIGNORE 292
684 #define ltLATEXONLY 293
685 #define ltLOWERCASE 294
686 #define ltLBRACERAW 295
687 #define ltLINKCOLOUR 296
688
689 #define ltMAKEGLOSSARY 300
690 #define ltMAKEINDEX 301
691 #define ltMAKETITLE 302
692 #define ltMARKRIGHT 303
693 #define ltMARKBOTH 304
694 #define ltMARGINPARWIDTH 305
695 #define ltMARGINPAR 306
696 #define ltMARGINPARODD 307
697 #define ltMARGINPAREVEN 308
698 #define ltMBOX 309
699 #define ltMEMBERSECTION 310
700 #define ltMEMBER 311
701 #define ltMULTICOLUMN 312
702 #define ltMARGINPARSEP 313
703
704 #define ltNEWCOUNTER 330
705 #define ltNEWLINE 331
706 #define ltNEWPAGE 332
707 #define ltNOCITE 333
708 #define ltNOINDENT 334
709 #define ltNOLINEBREAK 335
710 #define ltNOPAGEBREAK 336
711 #define ltNORMALSIZE 337
712 #define ltNORMALBOX 338
713 #define ltNORMALBOXD 339
714 #define ltNUMBEREDBIBITEM 340
715
716 #define ltONECOLUMN 360
717 #define ltODDSIDEMARGIN 361
718
719 #define ltPAGEBREAK 380
720 #define ltPAGEREF 381
721 #define ltPAGESTYLE 382
722 #define ltPAGENUMBERING 383
723 #define ltPARAGRAPHSTAR 384
724 #define ltPARAGRAPH 385
725 #define ltPARAM 386
726 #define ltPARINDENT 387
727 #define ltPARSKIP 388
728 #define ltPARTSTAR 389
729 #define ltPART 390
730 #define ltPAR 391
731 #define ltPFUNC 392
732 #define ltPICTURE 393
733 #define ltPOPREF 394
734 #define ltPOUNDS 395
735 #define ltPRINTINDEX 396
736 #define ltPSBOXTO 397
737 #define ltPSBOX 398
738 #define ltPOPREFONLY 399
739
740 #define ltQUOTE 420
741 #define ltQUOTATION 421
742
743 #define ltRAGGEDBOTTOM 440
744 #define ltRAGGEDLEFT 441
745 #define ltRAGGEDRIGHT 442
746 #define ltREF 443
747 #define ltRM 444
748 #define ltROMAN 445
749 #define ltROMAN2 446
750 #define ltRTFSP 447
751 #define ltRULE 448
752 #define ltRULEDROW 449
753 #define ltDRULED 450
754 #define ltRHEAD 451
755 #define ltRFOOT 452
756 #define ltROW 453
757 #define ltRTFIGNORE 454
758 #define ltRTFONLY 455
759 #define ltRBRACERAW 456
760 #define ltREGISTERED 457
761
762 #define ltSC 470
763 #define ltSECTIONHEADING 471
764 #define ltSECTIONSTAR 472
765 #define ltSECTION 473
766 #define ltSETCOUNTER 474
767 #define ltSF 475
768 #define ltSHORTCITE 476
769 #define ltSINGLESPACE 477
770 #define ltSLOPPYPAR 478
771 #define ltSLOPPY 479
772 #define ltSL 480
773 #define ltSMALL 481
774 #define ltSUBITEM 482
775 #define ltSUBPARAGRAPHSTAR 483
776 #define ltSUBPARAGRAPH 484
777 #define ltSPECIAL 485
778 #define ltSUBSECTIONSTAR 486
779 #define ltSUBSECTION 487
780 #define ltSUBSUBSECTIONSTAR 488
781 #define ltSUBSUBSECTION 489
782 #define ltSCRIPTSIZE 490
783 #define ltSETHEADER 491
784 #define ltSETFOOTER 492
785 #define ltSIZEDBOX 493
786 #define ltSIZEDBOXD 494
787 #define ltSECTIONHEADINGSTAR 495
788 #define ltSS 496
789 #define ltSETHOTSPOTCOLOUR 497
790 #define ltSETHOTSPOTCOLOR 498
791 #define ltSETHOTSPOTUNDERLINE 499
792 #define ltSETTRANSPARENCY 500
793
794 #define ltTABBING 510
795 #define ltTABLEOFCONTENTS 511
796 #define ltTABLE 512
797 #define ltTABULAR 513
798 #define ltTAB 514
799 #define ltTEX 515
800 #define ltTEXTWIDTH 516
801 #define ltTEXTHEIGHT 517
802 #define ltTHEBIBLIOGRAPHY 518
803 #define ltTITLEPAGE 519
804 #define ltTITLE 520
805 #define ltTINY 521
806 #define ltTODAY 522
807 #define ltTOPMARGIN 523
808 #define ltTOPSKIP 524
809 #define ltTT 525
810 #define ltTYPEIN 526
811 #define ltTYPEOUT 527
812 #define ltTWOCOLUMN 528
813 #define ltTHEPAGE 529
814 #define ltTHECHAPTER 530
815 #define ltTHESECTION 531
816 #define ltTHISPAGESTYLE 532
817
818 #define ltTWOCOLWIDTHA 533
819 #define ltTWOCOLWIDTHB 534
820 #define ltTWOCOLSPACING 535
821 #define ltTWOCOLITEM 536
822 #define ltTWOCOLITEMRULED 537
823 #define ltTWOCOLLIST 538
824 #define ltTEXTCOLOUR 539
825
826 #define ltUNDERLINE 550
827 #define ltURLREF 551
828 #define ltUPPERCASE 552
829 #define ltUSEPACKAGE 553
830
831 #define ltVDOTS 570
832 #define ltVERBATIMINPUT 571
833 #define ltVERBATIM 572
834 #define ltVERB 573
835 #define ltVERSE 574
836 #define ltVFILL 575
837 #define ltVLINE 576
838 #define ltVOID 577
839 #define ltVRULE 578
840 #define ltVSPACESTAR 579
841 #define ltVSKIPSTAR 580
842 #define ltVSPACE 581
843 #define ltVSKIP 582
844 #define ltVERBSTAR 583
845
846 #define ltWXCLIPS 600
847 #define ltWINHELPIGNORE 601
848 #define ltWINHELPONLY 602
849
850 #define ltXLPIGNORE 603
851 #define ltXLPONLY 604
852
853 #define ltSPACE 620
854 #define ltBACKSLASHCHAR 621
855 #define ltPIPE 622
856 #define ltFORWARDSLASH 623
857 #define ltUNDERSCORE 624
858 #define ltAMPERSAND 625
859 #define ltPERCENT 626
860 #define ltDOLLAR 627
861 #define ltHASH 628
862 #define ltLPARENTH 629
863 #define ltRPARENTH 630
864 #define ltLBRACE 631
865 #define ltRBRACE 632
866 #define ltEQUALS 633
867 #define ltRANGLEBRA 634
868 #define ltLANGLEBRA 635
869 #define ltPLUS 636
870 #define ltDASH 637
871 #define ltSINGLEQUOTE 638
872 #define ltBACKQUOTE 639
873 #define ltTILDE 640
874 #define ltAT_SYMBOL 641
875
876 // Characters, not macros but with special Latex significance
877 #define ltSPECIALDOLLAR 660
878 #define ltSPECIALDOUBLEDOLLAR 661
879 #define ltSPECIALTILDE 662
880 #define ltSPECIALHASH 663
881 #define ltSPECIALAMPERSAND 664
882 #define ltSUPERTABULAR 665
883
884 // Accents
885 #define ltACCENT_GRAVE 700
886 #define ltACCENT_ACUTE 701
887 #define ltACCENT_CARET 702
888 #define ltACCENT_UMLAUT 703
889 #define ltACCENT_TILDE 704
890 #define ltACCENT_DOT 705
891 #define ltACCENT_CADILLA 706
892
893 // Symbols
894 #define ltALPHA 800
895 #define ltBETA 801
896 #define ltGAMMA 802
897 #define ltDELTA 803
898 #define ltEPSILON 804
899 #define ltVAREPSILON 805
900 #define ltZETA 806
901 #define ltETA 807
902 #define ltTHETA 808
903 #define ltVARTHETA 809
904 #define ltIOTA 810
905 #define ltKAPPA 811
906 #define ltLAMBDA 812
907 #define ltMU 813
908 #define ltNU 814
909 #define ltXI 815
910 #define ltPI 816
911 #define ltVARPI 817
912 #define ltRHO 818
913 #define ltVARRHO 819
914 #define ltSIGMA 820
915 #define ltVARSIGMA 821
916 #define ltTAU 822
917 #define ltUPSILON 823
918 #define ltPHI 824
919 #define ltVARPHI 825
920 #define ltCHI 826
921 #define ltPSI 827
922 #define ltOMEGA 828
923
924 #define ltCAP_GAMMA 830
925 #define ltCAP_DELTA 831
926 #define ltCAP_THETA 832
927 #define ltCAP_LAMBDA 833
928 #define ltCAP_XI 834
929 #define ltCAP_PI 835
930 #define ltCAP_SIGMA 836
931 #define ltCAP_UPSILON 837
932 #define ltCAP_PHI 838
933 #define ltCAP_PSI 839
934 #define ltCAP_OMEGA 840
935
936 // Binary operation symbols
937 #define ltLE 850
938 #define ltLEQ 851
939 #define ltLL 852
940 #define ltSUBSET 853
941 #define ltSUBSETEQ 854
942 #define ltSQSUBSET 855
943 #define ltSQSUBSETEQ 856
944 #define ltIN 857
945 #define ltVDASH 858
946 #define ltMODELS 859
947 #define ltGE 860
948 #define ltGEQ 861
949 #define ltGG 862
950 #define ltSUPSET 863
951 #define ltSUPSETEQ 864
952 #define ltSQSUPSET 865
953 #define ltSQSUPSETEQ 866
954 #define ltNI 867
955 #define ltDASHV 868
956 #define ltPERP 869
957 #define ltNEQ 870
958 #define ltDOTEQ 871
959 #define ltAPPROX 872
960 #define ltCONG 873
961 #define ltEQUIV 874
962 #define ltPROPTO 875
963 #define ltPREC 876
964 #define ltPRECEQ 877
965 #define ltPARALLEL 878
966 #define ltSIM 879
967 #define ltSIMEQ 880
968 #define ltASYMP 881
969 #define ltSMILE 882
970 #define ltFROWN 883
971 #define ltBOWTIE 884
972 #define ltSUCC 885
973 #define ltSUCCEQ 886
974 #define ltMID 887
975
976 // Negated relation symbols (selected)
977 #define ltNOTEQ 890
978 #define ltNOTIN 891
979 #define ltNOTSUBSET 892
980
981 // Arrows
982 #define ltLEFTARROW 900
983 #define ltLEFTARROW2 901
984 #define ltRIGHTARROW 902
985 #define ltRIGHTARROW2 903
986 #define ltLEFTRIGHTARROW 904
987 #define ltLEFTRIGHTARROW2 905
988 #define ltUPARROW 906
989 #define ltUPARROW2 907
990 #define ltDOWNARROW 908
991 #define ltDOWNARROW2 909
992
993 // Miscellaneous symbols
994 #define ltALEPH 1000
995 #define ltWP 1001
996 #define ltRE 1002
997 #define ltIM 1003
998 #define ltEMPTYSET 1004
999 #define ltNABLA 1005
1000 #define ltSURD 1006
1001 #define ltPARTIAL 1007
1002 #define ltBOT 1008
1003 #define ltFORALL 1009
1004 #define ltEXISTS 1010
1005 #define ltNEG 1011
1006 #define ltSHARP 1012
1007 #define ltANGLE 1013
1008 #define ltTRIANGLE 1014
1009 #define ltCLUBSUIT 1015
1010 #define ltDIAMONDSUIT 1016
1011 #define ltHEARTSUIT 1017
1012 #define ltSPADESUIT 1018
1013 #define ltINFTY 1019
1014
1015 // Binary operation symbols
1016 #define ltPM 1030
1017 #define ltMP 1031
1018 #define ltTIMES 1032
1019 #define ltDIV 1033
1020 #define ltCDOT 1034
1021 #define ltAST 1035
1022 #define ltSTAR 1036
1023 #define ltCAP 1037
1024 #define ltCUP 1038
1025 #define ltVEE 1039
1026 #define ltWEDGE 1040
1027 #define ltCIRC 1041
1028 #define ltBULLET 1042
1029 #define ltDIAMOND 1043
1030 #define ltOSLASH 1044
1031 #define ltBOX 1045
1032 #define ltDIAMOND2 1046
1033 #define ltBIGTRIANGLEDOWN 1047
1034 #define ltOPLUS 1048
1035 #define ltOTIMES 1049
1036
1037 // Latex2e commands
1038 #define ltRMFAMILY 1200
1039 #define ltSFFAMILY 1201
1040 #define ltTTFAMILY 1202
1041 #define ltBFSERIES 1203
1042 #define ltITSHAPE 1204
1043 #define ltSLSHAPE 1205
1044 #define ltSCSHAPE 1206
1045
1046 #define ltMDSERIES 1207
1047 #define ltUPSHAPE 1208
1048
1049 #define ltTEXTRM 1209
1050 #define ltTEXTSF 1210
1051 #define ltTEXTTT 1211
1052 #define ltTEXTBF 1212
1053 #define ltTEXTIT 1213
1054 #define ltTEXTSL 1214
1055 #define ltTEXTSC 1215
1056 #define ltEMPH 1216
1057
1058 #define ltDOCUMENTCLASS 1217
1059
1060 // Space macros
1061 #define ltSMALLSPACE1 1250
1062 #define ltSMALLSPACE2 1251
1063
1064 // Pseudo-macros
1065 #define ltTOPLEVEL 15000
1066 #define ltCUSTOM_MACRO 15001
1067 #define ltSOLO_BLOCK 15002
1068
1069
1070