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