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