home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wxos2233.zip / wxOS2-2_3_3.zip / wxWindows-2.3.3 / utils / tex2rtf / src / tex2any.h < prev    next >
C/C++ Source or Header  |  2002-07-19  |  31KB  |  1,072 lines

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