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