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