]> git.saurik.com Git - wxWidgets.git/blame - utils/tex2rtf/src/tex2any.h
Cleaned up some comments, reorganized some code
[wxWidgets.git] / utils / tex2rtf / src / tex2any.h
CommitLineData
9a29912f
JS
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>
9a29912f
JS
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
1e33e2f3
GT
36
37#ifdef __WXMSW__
dda2e4fd 38 const unsigned long MAX_LINE_BUFFER_SIZE = 600;
1e33e2f3 39#else
dda2e4fd 40 const unsigned long MAX_LINE_BUFFER_SIZE = 11000;
1e33e2f3
GT
41#endif
42
9a29912f
JS
43class TexMacroDef: public wxObject
44{
45 public:
46 int no_args;
47 char *name;
48 bool ignore;
49 int forbidden;
50 int macroId;
51
4538b3f1 52 TexMacroDef(int the_id, const char *the_name, int n, bool ig, bool forbidLevel = FORBID_OK);
9a29912f
JS
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
66Example (\toplevel is implicit but made explicit here):
67
68AddMacroDef(ltMYMAT, "mymat", 2);
69
70\toplevel{The cat sat on the \mymat{very coarse and {\it cheap}}{mat}}.
71
72Parsed as:
73
74TexChunk: 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
102class 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.
123class 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};
137extern wxHashTable TopicTable;
138void AddKeyWordForTopic(char *topic, char *entry, char *filename = NULL);
139void ClearKeyWordTable(void);
140
aed3314d 141extern char wxTex2RTFBuffer[];
9a29912f
JS
142extern TexChunk *TopLevel;
143extern wxHashTable MacroDefs;
144extern wxStringList IgnorableInputFiles; // Ignorable \input files, e.g. psbox.tex
145
146bool read_a_line(char *buf);
147bool TexLoadFile(char *filename);
148int ParseArg(TexChunk *thisArg, wxList& children, char *buffer, int pos,
149 char *environment = NULL, bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL);
bbd08c6a 150int ParseMacroBody(const char *macro_name, TexChunk *parent, int no_args,
9a29912f
JS
151 char *buffer, int pos, char *environment = NULL, bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL);
152void TraverseDocument(void);
153void TraverseFromChunk(TexChunk *chunk, wxNode *thisNode = NULL, bool childrenOnly = FALSE);
154#define TraverseChildrenFromChunk(arg) TraverseFromChunk(arg, NULL, TRUE)
155void SetCurrentOutput(FILE *fd);
156void SetCurrentOutputs(FILE *fd1, FILE *fd2);
157extern FILE *CurrentOutput1;
158extern FILE *CurrentOutput2;
4538b3f1 159void AddMacroDef(int the_id, const char *name, int n, bool ignore = FALSE, bool forbidden = FALSE);
9a29912f
JS
160void TexInitialize(int bufSize);
161void TexCleanUp(void);
e4a22366 162void TexOutput(const char *s, bool ordinaryText = FALSE);
9a29912f
JS
163char *GetArgData(TexChunk *chunk);
164char *GetArgData(void); // Get the string for the current argument
165int GetNoArgs(void); // Get the number of arguments for the current macro
166TexChunk *GetArgChunk(void); // Get the chunk for the current argument
167TexChunk *GetTopLevelChunk(void); // Get the chunk for the top level
168TexChunk *GetNextChunk(void); // Look ahead to the next chunk
169bool IsArgOptional(void); // Is this argument an optional argument?
170void DefineDefaultMacros(void); // Optional set of default macros
171int GetCurrentColumn(void); // number of characters on current line
172char *ConvertCase(char *s); // Convert case, according to upperCaseNames setting.
173extern wxPathList TexPathList; // Path list, can be used for file searching.
174
2b5f62a0
VZ
175#if !WXWIN_COMPATIBILITY_2
176extern bool StringMatch(const wxChar *one, const wxChar *two, bool subString = TRUE, bool exact = FALSE);
177#endif
178
9a29912f
JS
179// Define a variable value from the .ini file
180char *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
189extern TexChunk *DocumentTitle;
190extern TexChunk *DocumentAuthor;
191extern TexChunk *DocumentDate;
192extern int DocumentStyle;
193extern int MinorDocumentStyle;
194extern char *BibliographyStyleString;
195extern char *DocumentStyleString;
196extern char *MinorDocumentStyleString;
197
198extern int normalFont;
199extern int smallFont;
200extern int tinyFont;
201extern int largeFont1;
202extern int LargeFont2;
203extern int LARGEFont3;
204extern int hugeFont1;
205extern int HugeFont2;
206extern int HUGEFont3;
207
208/*
209 * USER-ADJUSTABLE SETTINGS
210 *
211 */
212
213// Section font sizes
214extern int chapterFont;
215extern int sectionFont;
216extern int subsectionFont;
217extern int titleFont;
218extern int authorFont;
219extern bool winHelp; // Output in Windows Help format if TRUE, linear otherwise
220extern bool isInteractive;
221extern bool runTwice;
222extern int convertMode;
fad535ee
GT
223extern bool checkCurleyBraces;
224extern bool checkSyntax;
9a29912f
JS
225extern bool stopRunning;
226extern int mirrorMargins;
227extern bool headerRule;
228extern bool footerRule;
229extern int labelIndentTab; // From left indent to item label (points)
230extern int itemIndentTab; // From left indent to item (points)
231extern bool useUpButton;
232extern int htmlBrowseButtons;
233extern bool useHeadingStyles; // Insert \s1, s2 etc.
234extern bool useWord; // Insert Word table of contents, etc. etc.
235extern bool indexSubsections; // put subsections in index
236extern bool compatibilityMode;
237extern bool generateHPJ; // Generate WinHelp HPJ file
238extern char *winHelpTitle; // Title for Windows Help file
239extern int defaultTableColumnWidth;
240extern char *bitmapMethod;
241extern bool truncateFilenames; // Truncate for DOS
242extern int winHelpVersion; // Version e.g. 4 for Win95
243extern bool winHelpContents; // Generate .cnt file
244extern bool htmlIndex; // Generate .htx HTML index file
245extern bool htmlFrameContents; // Use frames for HTML contents page
6d8b260c 246extern char *htmlStylesheet; // Use this CSS stylesheet for HTML pages
9a29912f
JS
247extern int contentsDepth; // Depth of contents for linear RTF files
248extern bool upperCaseNames; // Filenames; default is lower case
249extern char *backgroundImageString; // HTML background image
250extern char *backgroundColourString; // HTML background colour
251extern char *textColourString; // HTML text colour
252extern char *linkColourString; // HTML link colour
253extern char *followedLinkColourString; // HTML followed link colour
254extern bool combineSubSections; // Stop splitting files below section
14204c7a 255extern bool htmlWorkshopFiles; // generate HTML Help Workshop project files
bf16085d 256extern bool ignoreBadRefs; // Don't insert (REF NOT FOUND)
d7d17624 257extern char *htmlFaceName; // HTML face name
9a29912f
JS
258
259// Names to help with internationalisation
260extern char *ContentsNameString;
261extern char *AbstractNameString;
262extern char *GlossaryNameString;
263extern char *ReferencesNameString;
264extern char *FiguresNameString;
265extern char *TablesNameString;
266extern char *FigureNameString;
267extern char *TableNameString;
268extern char *IndexNameString;
269extern char *ChapterNameString;
270extern char *SectionNameString;
271extern char *SubsectionNameString;
272extern char *SubsubsectionNameString;
273extern 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
290extern int chapterNo;
291extern int sectionNo;
292extern int subsectionNo;
293extern int subsubsectionNo;
294extern int figureNo;
295extern int tableNo;
296
297extern int ParSkip;
298extern int ParIndent;
299
300extern bool isSync;
301
302// Set by client and by Tex2Any
303extern TexChunk *currentSection;
304
305// Header/footers/pagestyle
306extern TexChunk * LeftHeaderOdd;
307extern TexChunk * LeftFooterOdd;
308extern TexChunk * CentreHeaderOdd;
309extern TexChunk * CentreFooterOdd;
310extern TexChunk * RightHeaderOdd;
311extern TexChunk * RightFooterOdd;
312extern TexChunk * LeftHeaderEven;
313extern TexChunk * LeftFooterEven;
314extern TexChunk * CentreHeaderEven;
315extern TexChunk * CentreFooterEven;
316extern TexChunk * RightHeaderEven;
317extern TexChunk * RightFooterEven;
318extern char * PageStyle;
319
320// Repeat the currentSection, either real (Chapter) or simulated (References)
321extern void OutputCurrentSection(void);
322extern void OutputCurrentSectionToString(char *buf);
323extern void OutputChunkToString(TexChunk *chunk, char *buf);
324
325extern char *fakeCurrentSection;
326
327// Called by Tex2Any to simulate a section
328extern void FakeCurrentSection(char *fakeSection, bool addToContents = TRUE);
329
330/*
331 * Local to Tex2Any library
332 *
333 */
334
335extern char *currentArgData;
336extern bool haveArgData; // If TRUE, we're simulating the data.
337void StartSimulateArgument(char *data);
338void EndSimulateArgument(void);
339
340/*
341 * Client-defined
342 *
343 */
344
345// Called on start/end of macro examination
346void 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.
351bool OnArgument(int macroId, int arg_no, bool start);
352
353// Default: library-defined
354void DefaultOnMacro(int macroId, int no_args, bool start);
355
356// Default: library-defined
357bool DefaultOnArgument(int macroId, int arg_no, bool start);
358
359// Called on error
4538b3f1 360void OnError(const char *msg);
9a29912f
JS
361
362// Called for information
4538b3f1 363void OnInform(const char *msg);
9a29912f
JS
364
365// Special yield wrapper
366void 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.
375char *FindTopicName(TexChunk *chunk);
376// Force the current topic to be this (e.g. force 'references' label).
bbd08c6a 377void ForceTopicName(const char *name);
9a29912f
JS
378void ResetTopicCounter(void);
379
380// Parse unit eg. 14, 12pt, 34cm and return value in points.
381int ParseUnitArgument(char *unitArg);
382
383// Set small, large, normal etc. point sizes for reference size
384void 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
392void StripExtension(char *buffer);
393
394/*
395 * Reference structure
396 *
397 */
398
399class 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'
bbd08c6a 406 TexRef(const char *label, const char *file, const char *section, const char *sectionN = NULL);
3924dd22 407 ~TexRef(void);
9a29912f
JS
408};
409
9a29912f
JS
410/*
411 * Add a reference
412 *
413 */
414
415void 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 */
422void WriteTexReferences(char *filename);
423void ReadTexReferences(char *filename);
424
425/*
426 * Bibliography stuff
427 *
428 */
429
430class 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
484extern wxList BibList;
485extern wxStringList CitationList;
486
487bool ReadBib(char *filename);
488void OutputBib(void);
489void ResolveBibReferences(void);
490void AddCitation(char *citeKey);
491TexRef *FindReference(char *key);
492
493/*
494 * Ability to customize, or at least suppress unknown macro errors
495 *
496 */
497
498extern wxList CustomMacroList;
499
500#define CUSTOM_MACRO_IGNORE 0
501#define CUSTOM_MACRO_OUTPUT 1
502#define CUSTOM_MACRO_MARK 2
503
504class 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;
ea172e69 513 macroName = strcpy(new char[strlen(name) + 1], name);
9a29912f 514 if (body)
ea172e69 515 macroBody = strcpy(new char[strlen(body) + 1], body);
9a29912f
JS
516 else
517 macroBody = NULL;
518 }
3924dd22 519 ~CustomMacro();
9a29912f
JS
520};
521
522bool ReadCustomMacros(char *filename);
523void ShowCustomMacros(void);
524CustomMacro *FindCustomMacro(char *name);
525char *ParseMultifieldString(char *s, int *pos);
526
527/*
528 * Colour table stuff
529 *
530 */
531
532class ColourTableEntry: public wxObject
533{
534 public:
535 char *name;
536 unsigned int red;
537 unsigned int green;
538 unsigned int blue;
539
bbd08c6a 540 ColourTableEntry(const char *theName, unsigned int r, unsigned int g, unsigned int b);
9a29912f
JS
541 ~ColourTableEntry(void);
542};
543
544extern wxList ColourTable;
bbd08c6a 545extern void AddColour(const char *theName, unsigned int r, unsigned int g, unsigned int b);
9a29912f
JS
546extern int FindColourPosition(char *theName);
547// Converts e.g. "red" -> "#FF0000"
548extern bool FindColourHTMLString(char *theName, char *buf);
549extern 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