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