w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

commands.c
Go to the documentation of this file.
1 /* commands.c - Defines subroutines to translate LaTeX commands to RTF
2 
3 Copyright (C) 1995-2002 The Free Software Foundation
4 
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 
19 This file is available from http://sourceforge.net/projects/latex2rtf/
20 
21 Authors:
22  1995-1997 Ralf Schlatterbeck
23  1998-2000 Georg Lehner
24  2001-2002 Scott Prahl
25 */
26 
27 #include <stdlib.h>
28 #include <string.h>
29 #include "cfg.h"
30 #include "main.h"
31 #include "convert.h"
32 #include "chars.h"
33 #include "l2r_fonts.h"
34 #include "preamble.h"
35 #include "funct1.h"
36 #include "tables.h"
37 #include "equation.h"
38 #include "letterformat.h"
39 #include "commands.h"
40 #include "parser.h"
41 #include "xref.h"
42 #include "ignore.h"
43 #include "lengths.h"
44 #include "definitions.h"
45 #include "graphics.h"
46 
47 typedef struct commandtag {
48  char *cpCommand; /* LaTeX command name without \ */
49  void (*func) (int); /* function to convert LaTeX to RTF */
50  int param; /* used in various ways */
52 
53 static int iEnvCount = 0; /* number of active environments */
54 static CommandArray *Environments[100]; /* list of active environments */
55 static int g_par_indent_array[100];
56 static int g_left_indent_array[100];
57 static int g_right_indent_array[100];
58 
59 static CommandArray commands[] = {
60  {"begin", CmdBeginEnd, CMD_BEGIN},
61  {"end", CmdBeginEnd, CMD_END},
62  {"today", CmdToday, 0},
63  {"footnote", CmdFootNote, FOOTNOTE},
64 
65  {"rmfamily", CmdFontFamily, F_FAMILY_ROMAN },
67  {"mathrm", CmdFontFamily, F_FAMILY_ROMAN_2},
68  {"textrm", CmdFontFamily, F_FAMILY_ROMAN_2},
69 
70  {"sffamily", CmdFontFamily, F_FAMILY_SANSSERIF },
74 
75  {"ttfamily", CmdFontFamily, F_FAMILY_TYPEWRITER},
79 
82 
83  {"bfseries", CmdFontSeries, F_SERIES_BOLD },
85  {"textbf", CmdFontSeries, F_SERIES_BOLD_2},
86  {"mathbf", CmdFontSeries, F_SERIES_BOLD_2},
87 
88  {"mdseries", CmdFontSeries, F_SERIES_MEDIUM },
89  {"textmd", CmdFontSeries, F_SERIES_MEDIUM_2},
90  {"mathmd", CmdFontSeries, F_SERIES_MEDIUM_2},
91 
92  {"itshape", CmdFontShape, F_SHAPE_ITALIC },
95  {"textit", CmdFontShape, F_SHAPE_ITALIC_2},
96  {"mathit", CmdFontShape, F_SHAPE_ITALIC_2},
97 
98  {"upshape", CmdFontShape, F_SHAPE_UPRIGHT },
99  {"textup", CmdFontShape, F_SHAPE_UPRIGHT_2},
100  {"mathup", CmdFontShape, F_SHAPE_UPRIGHT_2},
101 
102  {"scfamily", CmdFontShape, F_SHAPE_CAPS },
103  {"scshape", CmdFontShape, F_SHAPE_CAPS },
104  {"sc", CmdFontShape, F_SHAPE_CAPS_1},
105  {"textsc", CmdFontShape, F_SHAPE_CAPS_2},
106  {"mathsc", CmdFontShape, F_SHAPE_CAPS_2},
107 
108  {"slshape", CmdFontShape, F_SHAPE_SLANTED },
110  {"textsl", CmdFontShape, F_SHAPE_SLANTED_2},
111  {"mathsl", CmdFontShape, F_SHAPE_SLANTED_2},
112 
113  {"tiny", CmdFontSize, 10},
114  {"ssmall", CmdFontSize, 12}, /* from moresize.sty */
115  {"scriptsize", CmdFontSize, 14},
116  {"footnotesize", CmdFontSize, 16},
117  {"small", CmdFontSize, 18},
118  {"normalsize", CmdFontSize, 20},
119  {"large", CmdFontSize, 24},
120  {"Large", CmdFontSize, 28},
121  {"LARGE", CmdFontSize, 34},
122  {"huge", CmdFontSize, 40},
123  {"Huge", CmdFontSize, 50},
124  {"HUGE", CmdFontSize, 60}, /* from moresize.sty */
125 
126  /* ---------- OTHER FONT STUFF ------------------- */
127  {"em", CmdEmphasize, F_EMPHASIZE_1},
128  {"emph", CmdEmphasize, F_EMPHASIZE_2},
129  {"underline", CmdUnderline, 0},
130  {"textnormal", CmdTextNormal, F_TEXT_NORMAL_2},
131  {"normalfont", CmdTextNormal, F_TEXT_NORMAL_2},
132  {"mathnormal", CmdTextNormal, F_TEXT_NORMAL_3},
133 
134  {"raggedright", CmdAlign, PAR_RAGGEDRIGHT},
135  {"centerline", CmdAlign, PAR_CENTERLINE},
136  {"vcenter", CmdAlign, PAR_VCENTER},
137 
138  /* ---------- LOGOS ------------------- */
139  {"LaTeX", CmdLogo, CMD_LATEX},
140  {"LaTeXe", CmdLogo, CMD_LATEXE},
141  {"TeX", CmdLogo, CMD_TEX},
142  {"SLiTeX", CmdLogo, CMD_SLITEX},
143  {"BibTeX", CmdLogo, CMD_BIBTEX},
144  {"AmSTeX", CmdLogo, CMD_AMSTEX},
145  {"AmSLaTeX", CmdLogo, CMD_AMSLATEX},
146  {"LyX", CmdLogo, CMD_LYX},
147 
148  /* ---------- SPECIAL CHARACTERS ------------------- */
149  {"hat", CmdHatChar, 0},
150  {"check", CmdHacekChar, 0},
151  {"breve", CmdBreveChar, 0},
152  {"acute", CmdRApostrophChar, 0},
153  {"grave", CmdLApostrophChar, 0},
154  {"tilde", CmdTildeChar, 0},
155  {"bar", CmdMacronChar, 0},
156  {"vec", CmdVecChar, 0},
157  {"dot", CmdDotChar, 0},
158  {"ddot", CmdUmlauteChar, 0},
159  {"u", CmdBreveChar, 0},
160  {"d", CmdUnderdotChar, 0},
161  {"v", CmdHacekChar, 0},
162  {"r", CmdOaccentChar, 0},
163  {"b", CmdUnderbarChar, 0},
164  {"c", CmdCedillaChar, 0},
165  {"i", CmdDotlessChar, 0},
166  {"j", CmdDotlessChar, 1},
167 
168 /* sectioning commands */
169  {"part", CmdSection, SECT_PART},
170  {"part*", CmdSection, SECT_PART_STAR},
171  {"chapter", CmdSection, SECT_CHAPTER},
172  {"chapter*", CmdSection, SECT_CHAPTER_STAR},
173  {"section", CmdSection, SECT_NORM},
174  {"section*", CmdSection, SECT_NORM_STAR},
175  {"subsection", CmdSection, SECT_SUB},
176  {"subsection*", CmdSection, SECT_SUB_STAR},
177  {"subsubsection", CmdSection, SECT_SUBSUB},
178  {"subsubsection*", CmdSection, SECT_SUBSUB_STAR},
179  {"paragraph", CmdSection, SECT_SUBSUBSUB},
180  {"paragraph*", CmdSection, SECT_SUBSUBSUB_STAR},
181  {"subparagraph", CmdSection, SECT_SUBSUBSUBSUB},
182  {"subparagraph*", CmdSection, SECT_SUBSUBSUBSUB_STAR},
183 
184  {"ldots", CmdLdots, 0},
185  {"maketitle", CmdMakeTitle, 0},
186  {"par", CmdEndParagraph, 0},
187  {"noindent", CmdIndent, INDENT_NONE},
188  {"indent", CmdIndent, INDENT_USUAL},
189  {"caption", CmdCaption, 0},
190  {"appendix", CmdIgnore, 0},
191  {"protect", CmdIgnore, 0},
192  {"clearpage", CmdNewPage, NewPage},
193  {"cleardoublepage", CmdNewPage, NewPage},
194  {"newpage", CmdNewPage, NewColumn},
195  {"pagebreak", CmdNewPage, NewPage},
196  {"mbox", CmdBox, BOX_MBOX},
197  {"hbox", CmdBox, BOX_HBOX},
198  {"vbox", CmdBox, BOX_VBOX},
199  {"fbox", CmdBox, BOX_FBOX},
200  {"parbox", CmdBox, BOX_PARBOX},
201  {"frenchspacing", CmdIgnore, 0},
202  {"nonfrenchspacing", CmdIgnore, 0},
203  {"include", CmdIgnoreParameter, No_Opt_One_NormParam}, /* should not happen*/
204  {"input", CmdIgnoreParameter, No_Opt_One_NormParam}, /* should not happen*/
205  {"verb", CmdVerb, VERB_VERB},
206  {"verb*", CmdVerb, VERB_STAR},
207  {"url", CmdVerb, VERB_URL},
208  {"onecolumn", CmdColumn, One_Column},
209  {"twocolumn", CmdColumn, Two_Column},
210  {"includegraphics", CmdGraphics, 0},
211  {"epsffile", CmdGraphics, 1},
212  {"epsfbox", CmdGraphics, 2},
213  {"BoxedEPSF", CmdGraphics, 3},
214  {"psfig", CmdGraphics, 4},
215  {"includegraphics*", CmdGraphics, 0},
216  {"moveleft", CmdLength, 0},
217  {"moveright", CmdLength, 0},
218  {"hsize", CmdLength, 0},
219  {"letterspace", CmdLength, 0},
220  {"footnotemark", CmdIgnoreParameter, One_Opt_No_NormParam},
221  {"label", CmdLabel, LABEL_LABEL},
222  {"ref", CmdLabel, LABEL_REF},
223  {"pageref", CmdLabel, LABEL_PAGEREF},
224  {"cite", CmdCite, CITE_CITE},
225  {"bibliography", CmdBibliography, 0},
226  {"bibliographystyle", CmdBibliographyStyle, 0},
227  {"bibitem", CmdBibitem, 0},
228  {"newblock", CmdNewblock, 0},
229  {"newsavebox", CmdIgnoreParameter, No_Opt_One_NormParam},
231 /* {"fbox", CmdIgnoreParameter, No_Opt_One_NormParam}, */
232  {"quad", CmdQuad, 1},
233  {"qquad", CmdQuad, 2},
234  {"textsuperscript", CmdSuperscript, 1},
235  {"textsubscript", CmdSubscript, 1},
238  {"vspace", CmdVspace, 0},
239  {"vspace*", CmdVspace, 0},
240  {"vskip", CmdVspace, -1},
241  {"smallskip", CmdVspace, 1},
242  {"medskip", CmdVspace, 2},
243  {"bigskip", CmdVspace, 3},
245  {"addcontentsline", CmdIgnoreParameter, No_Opt_Three_NormParam},
246  {"addcontents", CmdIgnoreParameter, No_Opt_Two_NormParam},
247  {"numberline", CmdIgnoreParameter, No_Opt_Two_NormParam},
250  {"index", CmdIndex, 0},
251  {"printindex",CmdPrintIndex, 0},
252  {"indexentry", CmdIgnoreParameter, No_Opt_Two_NormParam},
254  {"glossaryentry", CmdIgnoreParameter, No_Opt_Two_NormParam},
257  {"includeonly", CmdIgnoreParameter, No_Opt_One_NormParam},
258  {"nocite", CmdNoCite, No_Opt_One_NormParam},
259  {"stepcounter", CmdIgnoreParameter, No_Opt_One_NormParam},
260  {"refstepcounter", CmdIgnoreParameter, No_Opt_One_NormParam},
267  {"newcount", CmdIgnoreDef, 0},
268  {"output", CmdIgnoreDef, 0},
269  {"value", CmdCounter, COUNTER_VALUE},
277  {"settowidth", CmdIgnoreParameter, No_Opt_Two_NormParam},
278  {"nopagebreak", CmdIgnoreParameter, One_Opt_No_NormParam},
279  {"samepage", CmdIgnore, 0},
281  {"nolinebreak", CmdIgnoreParameter, One_Opt_No_NormParam},
284  {"baselineskip", Cmd_OptParam_Without_braces, 0},
286  {"lineskip", Cmd_OptParam_Without_braces, 0},
287  {"vsize", Cmd_OptParam_Without_braces, 0},
288  {"setbox", Cmd_OptParam_Without_braces, 0},
289  {"thanks", CmdFootNote, FOOTNOTE_THANKS},
290  {"bibliographystyle", CmdIgnoreParameter, No_Opt_One_NormParam},
291  {"let", CmdIgnoreLet, 0},
292  {"multicolumn", CmdMultiCol, 0},
293  {"frac", CmdFraction, 0},
294  {"dfrac", CmdFraction, 0},
295  {"Frac", CmdFraction, 0},
296  {"sqrt", CmdRoot, 0},
297  {"lim", CmdLim, 0},
298  {"limsup", CmdLim, 1},
299  {"liminf", CmdLim, 2},
300  {"int", CmdIntegral, 0},
301  {"iint", CmdIntegral, 3},
302  {"iiint", CmdIntegral, 4},
303  {"sum", CmdIntegral, 1},
304  {"prod", CmdIntegral, 2},
305  {"left", CmdLeftRight, 0},
306  {"right", CmdLeftRight, 1},
307  {"stackrel", CmdStackrel, 0},
308  {"matrix", CmdMatrix, 0},
309  {"leftrightarrows", CmdArrows, LEFT_RIGHT},
310  {"leftleftarrows", CmdArrows, LEFT_LEFT},
311  {"rightrightarrows", CmdArrows, RIGHT_RIGHT},
312  {"rightleftarrows", CmdArrows, RIGHT_LEFT},
313  {"longleftrightarrows", CmdArrows, LONG_LEFTRIGHT},
314  {"longrightleftarrows", CmdArrows, LONG_RIGHTLEFT},
315  {"nonumber",CmdNonumber, EQN_NO_NUMBER},
316  {"char",CmdChar,0},
317  {"htmladdnormallink",CmdHtml,LABEL_HTMLADDNORMALREF},
318  {"htmlref",CmdHtml, LABEL_HTMLREF},
319  {"nobreakspace", CmdNonBreakSpace, 0},
320  {"abstract", CmdAbstract, 1},
321  {"endinput", CmdEndInput, 0},
322  {"textcolor", CmdTextColor, 0},
323  {"citename", CmdCiteName, 0},
324  {"shortcite", CmdCite, CITE_SHORT},
325 
326  {"", NULL, 0}
327 };
328 
329 /********************************************************************
330  commands found in the preamble of the LaTeX file
331  ********************************************************************/
333  {"documentclass", CmdDocumentStyle, 0},
334  {"documentstyle", CmdDocumentStyle, 0},
335  {"usepackage", CmdUsepackage, 0},
336  {"begin", CmdPreambleBeginEnd, CMD_BEGIN},
337  {"title", CmdTitle, TITLE_TITLE},
338  {"author", CmdTitle, TITLE_AUTHOR},
339  {"date", CmdTitle, TITLE_DATE},
340  {"flushbottom", CmdBottom, 0},
341  {"raggedbottom", CmdBottom, 0},
342  {"addtolength", CmdLength, LENGTH_ADD},
343  {"setlength", CmdLength, LENGTH_SET},
344  {"newlength", CmdLength, LENGTH_NEW},
345  {"newcounter", CmdCounter, COUNTER_NEW},
346  {"setcounter", CmdCounter, COUNTER_SET},
347  {"addtocounter", CmdCounter, COUNTER_ADD},
348  {"cfoot", CmdHeadFoot, CFOOT},
349  {"rfoot", CmdHeadFoot, RFOOT},
350  {"lfoot", CmdHeadFoot, LFOOT},
351  {"chead", CmdHeadFoot, CHEAD},
352  {"rhead", CmdHeadFoot, RHEAD},
353  {"lhead", CmdHeadFoot, LHEAD},
354  {"thepage", CmdThePage, 0},
355  {"hyphenation", CmdHyphenation, 0},
356  {"def", CmdNewDef, DEF_DEF},
357  {"newcommand", CmdNewDef, DEF_NEW},
358  {"providecommand", CmdNewDef, DEF_NEW},
359  {"DeclareRobustCommand", CmdNewDef, DEF_NEW},
360  {"DeclareRobustCommand*", CmdNewDef, DEF_NEW},
361  {"renewcommand", CmdNewDef, DEF_RENEW},
362  {"newenvironment", CmdNewEnvironment, DEF_NEW},
363  {"renewenvironment", CmdNewEnvironment, DEF_RENEW},
364  {"newtheorem", CmdNewTheorem, 0},
365  {"renewtheorem", CmdIgnoreParameter, One_Opt_Two_NormParam},
367  {"thispagestyle", CmdIgnoreParameter, No_Opt_One_NormParam},
368  {"pagenumbering", CmdIgnoreParameter, No_Opt_One_NormParam},
371  {"makeindex",CmdIgnoreParameter,0},
372  {"makeglossary",CmdIgnoreParameter,0},
373  {"listoffiles",CmdIgnoreParameter,0},
374  {"nofiles",CmdIgnoreParameter,0},
375  {"makelabels",CmdIgnoreParameter,0},
376  {"verbositylevel",CmdVerbosityLevel,0},
377  {"hoffset",CmdSetTexLength, SL_HOFFSET},
378  {"voffset",CmdSetTexLength, SL_VOFFSET},
379  {"parindent",CmdSetTexLength, SL_PARINDENT},
380  {"parskip",CmdSetTexLength, SL_PARSKIP},
381  {"baselineskip",CmdSetTexLength, SL_BASELINESKIP},
382  {"topmargin",CmdSetTexLength, SL_TOPMARGIN},
383  {"textheight",CmdSetTexLength, SL_TEXTHEIGHT},
384  {"headheight",CmdSetTexLength, SL_HEADHEIGHT},
385  {"headsep",CmdSetTexLength, SL_HEADSEP},
386  {"textwidth",CmdSetTexLength, SL_TEXTWIDTH},
387  {"oddsidemargin",CmdSetTexLength, SL_ODDSIDEMARGIN},
388  {"evensidemargin",CmdSetTexLength, SL_EVENSIDEMARGIN},
389  {"footnotetext", CmdFootNote, FOOTNOTE_TEXT},
390  {"include", CmdInclude, 0},
391  {"input", CmdInclude, 0},
392  {"htmladdnormallink",CmdHtml, LABEL_HTMLADDNORMALREF},
393  {"htmlref",CmdHtml, LABEL_HTMLREF},
394  {"nobreakspace", CmdNonBreakSpace, 0},
395  {"signature", CmdSignature, 0},
396  {"hline", CmdHline, 0},
397  {"cline", CmdHline, 1},
398  {"ifx", CmdIf, 0},
399  {"", NULL, 0}
400 }; /* end of list */
401 
403  {"item", CmdItem, ITEMIZE},
404  {"", NULL, 0}
405 };
406 
408  {"item", CmdItem, DESCRIPTION},
409  {"", NULL, 0}
410 };
411 
413  {"item", CmdItem, ENUMERATE},
414  {"", NULL, 0}
415 };
416 
418  {"caption", CmdCaption, 0},
419  {"center", CmdAlign, PAR_CENTER},
420  {"", NULL, 0}
421 };
422 
424  {"opening", CmdOpening, 0},
425  {"closing", CmdClosing, 0},
426  {"address", CmdAddress, 0},
427  {"signature", CmdSignature, 0},
428  {"ps", CmdPs, LETTER_PS},
429  {"cc", CmdPs, LETTER_CC},
430  {"encl", CmdPs, LETTER_ENCL},
431  {"", NULL, 0}
432 };
433 
435  {"ck", GermanPrint, GP_CK},
436  {"glqq", GermanPrint, GP_LDBL},
437  {"glq", GermanPrint, GP_L},
438  {"grq", GermanPrint, GP_R},
439  {"grqq", GermanPrint, GP_RDBL},
440  {"", NULL, 0}
441 };
442 
444  {"uv", CmdCzechAbbrev, 0},
445  {"", NULL, 0}
446 };
447 
449 /* {"degree", CmdFrenchAbbrev, DEGREE}, */
450  {"ier", CmdFrenchAbbrev, IERF},
451  {"iere", CmdFrenchAbbrev, IEREF},
452  {"iers", CmdFrenchAbbrev, IERSF},
453  {"ieres", CmdFrenchAbbrev, IERESF},
454  {"ieme", CmdFrenchAbbrev, IEMEF},
455  {"iemes", CmdFrenchAbbrev, IEMESF},
456  {"numero", CmdFrenchAbbrev, NUMERO},
457  {"numeros", CmdFrenchAbbrev, NUMEROS},
458  {"Numero", CmdFrenchAbbrev, CNUMERO},
459  {"Numeros", CmdFrenchAbbrev, CNUMEROS},
460 /* {"degres", CmdFrenchAbbrev, DEGREE}, */
461 /* {"textdegree", CmdFrenchAbbrev, DEGREE}, */
462  {"primo", CmdFrenchAbbrev, PRIMO},
463  {"secundo", CmdFrenchAbbrev, SECUNDO},
464  {"tertio", CmdFrenchAbbrev, TERTIO},
465  {"quarto", CmdFrenchAbbrev, QUARTO},
466  {"inferieura", CmdFrenchAbbrev, INFERIEURA},
467  {"superieura", CmdFrenchAbbrev, SUPERIEURA},
468  {"lq", CmdFrenchAbbrev, FRENCH_LQ},
469  {"rq", CmdFrenchAbbrev, FRENCH_RQ},
470  {"lqq", CmdFrenchAbbrev, FRENCH_LQQ},
471  {"rqq", CmdFrenchAbbrev, FRENCH_RQQ},
472  {"pointvirgule", CmdFrenchAbbrev, POINT_VIRGULE},
473  {"pointexclamation", CmdFrenchAbbrev, POINT_EXCLAMATION},
474  {"pointinterrogation", CmdFrenchAbbrev, POINT_INTERROGATION},
475  {"dittomark", CmdFrenchAbbrev, DITTO_MARK},
476  {"deuxpoints", CmdFrenchAbbrev, DEUX_POINTS},
477  {"fup", CmdFrenchAbbrev, FUP},
478  {"up", CmdFrenchAbbrev, FUP},
479  {"LCS", CmdFrenchAbbrev, LCS},
480  {"FCS", CmdFrenchAbbrev, FCS},
481  {"", NULL, 0}
482 };
483 
484 /********************************************************************/
485 /* commands for Russian Mode */
486 /********************************************************************/
488  { "CYRA" , CmdCyrillicChar , 0xC0 },
489  { "CYRB" , CmdCyrillicChar , 0xC1},
490  { "CYRV" , CmdCyrillicChar , 0xC2},
491  { "CYRG" , CmdCyrillicChar , 0xC3},
492  { "CYRD" , CmdCyrillicChar , 0xC4},
493  { "CYRE" , CmdCyrillicChar , 0xC5},
494  { "CYRZH" , CmdCyrillicChar , 0xC6},
495  { "CYRZ" , CmdCyrillicChar , 0xC7},
496  { "CYRI" , CmdCyrillicChar , 0xC8},
497  { "CYRISHRT" , CmdCyrillicChar , 0xC9},
498  { "CYRK" , CmdCyrillicChar , 0xCA},
499  { "CYRL" , CmdCyrillicChar , 0xCB},
500  { "CYRM" , CmdCyrillicChar , 0xCC},
501  { "CYRN" , CmdCyrillicChar , 0xCD},
502  { "CYRO" , CmdCyrillicChar , 0xCE},
503  { "CYRP" , CmdCyrillicChar , 0xCF},
504  { "CYRR" , CmdCyrillicChar , 0xD0},
505  { "CYRS" , CmdCyrillicChar , 0xD1},
506  { "CYRT" , CmdCyrillicChar , 0xD2},
507  { "CYRU" , CmdCyrillicChar , 0xD3},
508  { "CYRF" , CmdCyrillicChar , 0xD4},
509  { "CYRH" , CmdCyrillicChar , 0xD5},
510  { "CYRC" , CmdCyrillicChar , 0xD6},
511  { "CYRCH" , CmdCyrillicChar , 0xD7},
512  { "CYRSH" , CmdCyrillicChar , 0xD8},
513  { "CYRCHSH" , CmdCyrillicChar , 0xD9},
514  { "CYRHRDSN" , CmdCyrillicChar , 0xDA},
515  { "CYRERY" , CmdCyrillicChar , 0xDB},
516  { "CYRSFTSN" , CmdCyrillicChar , 0xDC},
517  { "CYREREV" , CmdCyrillicChar , 0xDD},
518  { "CYRYU" , CmdCyrillicChar , 0xDE},
519  { "CYRYA" , CmdCyrillicChar , 0xDF},
520  { "cyra" , CmdCyrillicChar , 0xE0 },
521  { "cyrb" , CmdCyrillicChar , 0xE1},
522  { "cyrv" , CmdCyrillicChar , 0xE2},
523  { "cyrg" , CmdCyrillicChar , 0xE3},
524  { "cyrd" , CmdCyrillicChar , 0xE4},
525  { "cyre" , CmdCyrillicChar , 0xE5},
526  { "cyrzh" , CmdCyrillicChar , 0xE6},
527  { "cyrz" , CmdCyrillicChar , 0xE7},
528  { "cyri" , CmdCyrillicChar , 0xE8},
529  { "cyrishrt" , CmdCyrillicChar , 0xE9},
530  { "cyrk" , CmdCyrillicChar , 0xEA},
531  { "cyrl" , CmdCyrillicChar , 0xEB},
532  { "cyrm" , CmdCyrillicChar , 0xEC},
533  { "cyrn" , CmdCyrillicChar , 0xED},
534  { "cyro" , CmdCyrillicChar , 0xEE},
535  { "cyrp" , CmdCyrillicChar , 0xEF},
536  { "cyrr" , CmdCyrillicChar , 0xF0},
537  { "cyrs" , CmdCyrillicChar , 0xF1},
538  { "cyrt" , CmdCyrillicChar , 0xF2},
539  { "cyru" , CmdCyrillicChar , 0xF3},
540  { "cyrf" , CmdCyrillicChar , 0xF4},
541  { "cyrh" , CmdCyrillicChar , 0xF5},
542  { "cyrc" , CmdCyrillicChar , 0xF6},
543  { "cyrch" , CmdCyrillicChar , 0xF7},
544  { "cyrsh" , CmdCyrillicChar , 0xF8},
545  { "cyrchsh" , CmdCyrillicChar , 0xF9},
546  { "cyrhrdsn" , CmdCyrillicChar , 0xFA},
547  { "cyrery" , CmdCyrillicChar , 0xFB},
548  { "cyrsftsn" , CmdCyrillicChar , 0xFC},
549  { "cyrerev" , CmdCyrillicChar , 0xFD},
550  { "cyryu" , CmdCyrillicChar , 0xFE},
551  { "cyrya" , CmdCyrillicChar , 0xFF},
552  { "", NULL, 0 }
553 };
554 
555 /********************************************************************/
556 /* commands for begin-end environments */
557 /* only strings used in the form \begin{text} or \end{text} */
558 /********************************************************************/
559 static CommandArray params[] = {
560  {"center", CmdAlign, PAR_CENTER},
561  {"flushright", CmdAlign, PAR_RIGHT},
562  {"flushleft", CmdAlign, PAR_LEFT},
563  {"document", Environment, DOCUMENT},
564  {"tabbing", CmdTabbing, TABBING},
565  {"figure", CmdFigure, FIGURE},
566  {"figure*", CmdFigure, FIGURE_1},
567  {"picture", CmdPicture, 0},
568  {"minipage", CmdMinipage, 0},
569  {"music", CmdMusic, 0},
570 
571  {"quote", CmdQuote, QUOTE},
572  {"quotation", CmdQuote, QUOTATION},
573  {"enumerate", CmdList, ENUMERATE},
574  {"list", CmdList, ITEMIZE},
575  {"itemize", CmdList, ITEMIZE},
576  {"description", CmdList, DESCRIPTION},
577  {"verbatim", CmdVerbatim, VERBATIM_1},
578  {"comment", CmdVerbatim, VERBATIM_4},
579  {"verse", CmdVerse, 0},
580  {"tabular", CmdTabular, TABULAR},
581  {"tabular*", CmdTabular, TABULAR_STAR},
582  {"longtable", CmdTabular, TABULAR_LONG},
583  {"longtable*", CmdTabular, TABULAR_LONG_STAR},
584  {"array", CmdArray, 1},
585 
586  {"displaymath", CmdEquation, EQN_DISPLAYMATH},
587  {"equation", CmdEquation, EQN_EQUATION},
588  {"equation*", CmdEquation, EQN_EQUATION_STAR},
589  {"eqnarray*", CmdEquation, EQN_ARRAY_STAR},
590  {"eqnarray", CmdEquation, EQN_ARRAY},
591  {"math", CmdEquation, EQN_MATH},
592 
593  {"multicolumn", CmdMultiCol, 0},
594  {"letter", CmdLetter, 0},
595  {"table", CmdTable, TABLE},
596  {"table*", CmdTable, TABLE_1},
597  {"thebibliography", CmdThebibliography, 0},
598  {"abstract", CmdAbstract, 0},
599  {"titlepage", CmdTitlepage, 0},
600 
601  {"em", CmdEmphasize, F_EMPHASIZE_3},
602  {"rmfamily", CmdFontFamily, F_FAMILY_ROMAN_3},
603  {"sffamily", CmdFontFamily, F_FAMILY_SANSSERIF_3},
604  {"ttfamily", CmdFontFamily, F_FAMILY_TYPEWRITER_3},
605  {"bfseries", CmdFontSeries, F_SERIES_BOLD_3},
606  {"mdseries", CmdFontSeries, F_SERIES_MEDIUM_3},
607  {"itshape", CmdFontShape, F_SHAPE_ITALIC_3},
608  {"scshape", CmdFontShape, F_SHAPE_CAPS_3},
609  {"slshape", CmdFontShape, F_SHAPE_SLANTED_3},
611  {"sc", CmdFontShape, F_SHAPE_CAPS_4},
613  {"bf", CmdFontShape, F_SERIES_BOLD_4},
617  {"Verbatim", CmdVerbatim, VERBATIM_2},
618  {"alltt", CmdVerbatim, VERBATIM_3},
619  {"latexonly", CmdIgnore, 0},
620  {"htmlonly",CmdIgnoreEnviron,IGNORE_HTMLONLY},
621  {"rawhtml",CmdIgnoreEnviron,IGNORE_RAWHTML},
622  {"theindex",CmdIgnoreEnviron,0},
623  {"", NULL, 0}
624 }; /* end of list */
625 
626 
627 /********************************************************************
628 purpose: commands for hyperlatex package
629 ********************************************************************/
631  {"link", CmdLink, 0},
632  {"xlink", CmdLink, 0},
633  {"Cite", CmdLabel, LABEL_HYPERCITE},
634  {"Ref", CmdLabel, LABEL_HYPERREF},
635  {"Pageref", CmdLabel, LABEL_HYPERPAGEREF},
636  {"S", CmdColsep, 0},
637  {"", NULL, 0}
638 }; /* end of list */
639 
640 /********************************************************************
641 purpose: commands for apacite package
642 ********************************************************************/
644  { "BBOP", CmdApaCite, 0}, /* Open parenthesis Default is "(" */
645  { "BBAA", CmdApaCite, 1}, /* Last ``and'' Default is "\&" */
646  { "BBAB", CmdApaCite, 2}, /* Last ``and'' Default is "and" */
647  { "BBAY", CmdApaCite, 3}, /* Punctuation Default is ", " */
648  { "BBC", CmdApaCite, 4}, /* Punctuation Default is "; " */
649  { "BBN", CmdApaCite, 5}, /* Punctuation Default is ", " */
650  { "BBCP", CmdApaCite, 6}, /* Closing parenthesis, Default is ")" */
651  { "BBOQ", CmdApaCite, 7}, /* Opening quote Default is the empty string */
652  { "BBCQ", CmdApaCite, 8}, /* Closing quote Default is the empty string */
653  { "BCBT", CmdApaCite, 9}, /* Comma Default is "," */
654  { "BCBL", CmdApaCite, 10}, /* Comma Default is "," */
655  { "BOthers",CmdApaCite, 11}, /* Used for ``others'' Default is "et~al." */
656  { "BIP", CmdApaCite, 12}, /* ``In press'', Default is "in press" */
657  { "BAnd", CmdApaCite, 13}, /* Used as ``and'' Default is "and" */
658  { "BED", CmdApaCite, 14}, /* Editor Default is "Ed." */
659  { "BEDS", CmdApaCite, 15}, /* Editors Default is "Eds." */
660  { "BTRANS", CmdApaCite, 16}, /* Translator. Default is "Trans." */
661  { "BTRANSS",CmdApaCite, 17}, /* Translators. Default is "Trans." */
662  { "BCHAIR", CmdApaCite, 18}, /* Chair Default is "Chair" */
663  { "BCHAIRS",CmdApaCite, 19}, /* Chairs. Default is "Chairs" */
664  { "BVOL", CmdApaCite, 20}, /* Volume, Default is "Vol." */
665  { "BVOLS", CmdApaCite, 21}, /* Volumes, Default is "Vols." */
666  { "BNUM", CmdApaCite, 22}, /* Number, Default is "No." */
667  { "BNUMS", CmdApaCite, 23}, /* Numbers, Default is "Nos." */
668  { "BEd", CmdApaCite, 24}, /* Edition, Default is "ed." */
669  { "BPG", CmdApaCite, 25}, /* Page, default is "p." */
670  { "BPGS", CmdApaCite, 26}, /* Pages, default is "pp." */
671  { "BTR", CmdApaCite, 27}, /* technical report Default is "Tech.\ Rep." */
672  { "BPhD", CmdApaCite, 28}, /* Default is "Doctoral dissertation" */
673  { "BUPhD", CmdApaCite, 29}, /* Unpublished PhD Default is "Unpublished doctoral dissertation" */
674  { "BMTh", CmdApaCite, 30}, /* MS thesis Default is "Master's thesis" */
675  { "BUMTh", CmdApaCite, 31}, /* unpublished MS Default is "Unpublished master's thesis" */
676  { "BOWP", CmdApaCite, 32}, /* default is "Original work published " */
677  { "BREPR", CmdApaCite, 33}, /* default is "Reprinted from " */
678  { "BCnt", CmdApaCite, 34}, /* convert number to letter */
679  { "BCntIP", CmdApaCite, 34}, /* convert number to letter */
680  { "BBA", CmdApaCite, 35}, /* "&" in paren, "and" otherwise */
681  { "AX", CmdApaCite, 36}, /* index name */
682  { "Bem", CmdEmphasize, F_EMPHASIZE_2},
683  { "BCAY", CmdBCAY, 0},
684  {"fullcite", CmdCite, CITE_FULL},
685  {"shortcite", CmdCite, CITE_SHORT},
686  {"citeNP", CmdCite, CITE_CITE_NP},
687  {"fullciteNP", CmdCite, CITE_FULL_NP},
688  {"shortciteNP", CmdCite, CITE_SHORT_NP},
689  {"citeA", CmdCite, CITE_CITE_A},
690  {"fullciteA", CmdCite, CITE_FULL_A},
691  {"shortciteA", CmdCite, CITE_SHORT_A},
692  {"citeauthor", CmdCite, CITE_CITE_AUTHOR},
693  {"fullciteauthor", CmdCite, CITE_FULL_AUTHOR},
694  {"shortciteauthor", CmdCite, CITE_SHORT_AUTHOR},
695  {"citeyear", CmdCite, CITE_YEAR},
696  {"citeyearNP", CmdCite, CITE_YEAR_NP},
697  {"", NULL, 0}
698 };
699 
700 /********************************************************************
701 purpose: commands for apacite package
702 ********************************************************************/
704  {"citet", CmdCite, CITE_T},
705  {"citet*", CmdCite, CITE_T_STAR},
706  {"citep", CmdCite, CITE_P},
707  {"citep*", CmdCite, CITE_P_STAR},
708  {"citealt", CmdCite, CITE_ALT},
709  {"citealp", CmdCite, CITE_ALP},
710  {"citealt*", CmdCite, CITE_ALT_STAR},
711  {"citealp*", CmdCite, CITE_ALP_STAR},
712  {"citetext", CmdCite, CITE_TEXT},
713  {"citeauthor", CmdCite, CITE_AUTHOR},
714  {"citeauthor*", CmdCite, CITE_AUTHOR_STAR},
715  {"citeyear", CmdCite, CITE_YEAR},
716  {"citeyearpar", CmdCite, CITE_YEAR_P},
717  {"Citet", CmdCite, CITE_T},
718  {"Citep", CmdCite, CITE_P},
719  {"Citealt", CmdCite, CITE_ALT},
720  {"Citealp", CmdCite, CITE_ALP},
721  {"Citeauthor", CmdCite, CITE_AUTHOR},
722  {"", NULL, 0}
723 };
724 
725 bool
726 CallCommandFunc(char *cCommand)
727 /****************************************************************************
728 purpose: Tries to call the command-function for the commandname
729 params: string with command name
730 returns: success or failure
731 globals: command-functions have side effects or recursive calls
732  ****************************************************************************/
733 {
734  int i, j;
735  char * macro_string;
736 
737  diagnostics(5,"CallCommandFunc <%s>, iEnvCount = %d",cCommand,iEnvCount);
738 
739  i=existsDefinition(cCommand);
740  if (i>-1) {
741  macro_string=expandDefinition(i);
742  diagnostics(3,"CallCommandFunc <%s> expanded to <%s>", cCommand, macro_string);
743  ConvertString(macro_string);
744  free(macro_string);
745  return TRUE;
746  }
747 
748  for (j = iEnvCount - 1; j >= 0; j--) {
749  i = 0;
750  while (strcmp(Environments[j][i].cpCommand, "") != 0) {
751 
752  /* diagnostics(5,"CallCommandFunc Trying %s",Environments[j][i].cpCommand); */
753 
754  if (strcmp(Environments[j][i].cpCommand, cCommand) == 0) {
755  if (Environments[j][i].func == NULL)
756  return FALSE;
757  if (*Environments[j][i].func == CmdIgnoreParameter) {
758  diagnostics(WARNING__, "Command \\%s ignored", cCommand);
759  }
760 
761  diagnostics(5,"CallCommandFunc Found %s iEnvCount=%d number=%d",Environments[j][i].cpCommand, j, i);
762  (*Environments[j][i].func) ((Environments[j][i].param));
763  return TRUE; /* Command Function found */
764  }
765  ++i;
766  }
767  }
768  return FALSE;
769 }
770 
771 
772 void
773 CallParamFunc(char *cCommand, int AddParam)
774 /****************************************************************************
775 purpose: Try to call the environment-function for the commandname
776 params: cCommand - string with command name
777  AddParam - param "ORed"(||) to the int param of command-funct
778 returns: sucess or not
779 globals: command-functions have side effects or recursive calls
780  ****************************************************************************/
781 {
782  int i = 0;
783  char unknown_environment[100];
784 
785  while (strcmp(params[i].cpCommand, "") != 0) {
786  if (strcmp(params[i].cpCommand, cCommand) == 0) {
787  assert(params[i].func != NULL);
788  (*params[i].func) ((params[i].param) | AddParam);
789  return; /* command function found */
790  }
791  ++i;
792  }
793 
794  /* unknown environment must be ignored */
795  if (AddParam == ON) {
796  snprintf(unknown_environment, 100, "\\%s%s%s", "end{", cCommand, "}");
797  Ignore_Environment(cCommand);
798  diagnostics(WARNING__, "Environment <%s> ignored. Not defined in commands.c", cCommand);
799  }
800 }
801 
802 int
804 /****************************************************************************
805 purpose: to eliminate the iEnvCount global variable
806 ****************************************************************************/
807 {
808  return iEnvCount;
809 }
810 
811 void
813 /****************************************************************************
814 purpose: adds the command list for a specific environment to the list
815  of commands searched through.
816 params: constant identifying the environment
817 globals: changes Environment - array of active environments
818  iEnvCount - counter of active environments
819  ****************************************************************************/
820 {
821  char *diag = "";
822 
823  g_par_indent_array[iEnvCount] = getLength("parindent");
826 
827  switch (code) {
828  case PREAMBLE:
830  diag = "preamble";
831  break;
832  case DOCUMENT:
834  diag = "document";
835  break;
836  case ITEMIZE:
838  diag = "itemize";
839  break;
840  case ENUMERATE:
842  diag = "enumerate";
843  break;
844  case LETTER:
846  diag = "letter";
847  break;
848  case DESCRIPTION:
850  diag = "description";
851  break;
852  case GERMAN_MODE:
854  diag = "german";
855  break;
856  case FRENCH_MODE:
858  diag = "french";
859  break;
860  case RUSSIAN_MODE:
862  diag = "french";
863  break;
864  case CZECH_MODE:
866  diag = "french";
867  break;
868  case FIGURE_ENV:
870  diag = "figure";
871  break;
872  case IGN_ENV_CMD:
874  diag = "*latex2rtf ignored*";
875  break;
876  case HYPERLATEX:
878  diag = "hyperlatex";
879  break;
880  case APACITE_MODE:
882  diag = "apacite";
883  break;
884  case NATBIB_MODE:
886  diag = "natbib";
887  break;
888  case GENERIC_ENV:
890  diag = "Generic Environment";
891  break;
892 
893  default:
894  diagnostics(ERROR,"assertion failed at function PushEnvironment");
895  }
896 
897  iEnvCount++;
898  diagnostics(3, "Entered %s environment, iEnvCount now = %d", diag, iEnvCount);
899 }
900 
901 
902 void
904 /****************************************************************************
905 purpose: removes the environment-commands list added by last PushEnvironment;
906 globals: changes Environment - array of active environments
907  iEnvCount - counter of active environments
908  ****************************************************************************/
909 {
910  --iEnvCount;
912 
913  setLength("parindent",g_par_indent_array[iEnvCount]);
916 
917  /*
918  * overlapping environments are not allowed !!! example:
919  * \begin{verse}\begin{enumerate}\end{verse}\end{enumerate} ==>
920  * undefined result extension possible
921  */
922 
923  diagnostics(3, "Exited environment, iEnvCount now = %d", iEnvCount);
924  return;
925 }
926 
927 
928 void
930 /****************************************************************************
931 purpose: removes all environment-commands lists
932 globals: changes Environment - array of active environments
933  iEnvCount - counter of active environments
934  ****************************************************************************/
935 {
936  Environments[0] = NULL;
937  iEnvCount = 0;
938  return;
939 }
#define QUOTE
Definition: Resource.h:34
#define param(a, b)
void CmdCedillaChar(int code)
Definition: chars.c:400
void CmdRApostrophChar(int code)
Definition: chars.c:165
void CmdTildeChar(int code)
Definition: chars.c:356
void CmdVecChar(int code)
Definition: chars.c:434
void CmdOaccentChar(int code)
Definition: chars.c:314
void CmdHatChar(int code)
Definition: chars.c:252
void CmdLApostrophChar(int code)
Definition: chars.c:104
void CmdUnderdotChar(int code)
Definition: chars.c:517
void CmdUmlauteChar(int code)
Definition: chars.c:41
void CmdMacronChar(int code)
Definition: chars.c:231
void CmdHacekChar(int code)
Definition: chars.c:541
void CmdBreveChar(int code)
Definition: chars.c:486
#define CMD_AMSTEX
Definition: chars.h:6
#define CMD_LYX
Definition: chars.h:8
#define IEMESF
Definition: chars.h:40
#define DEUX_POINTS
Definition: chars.h:62
#define QUARTO
Definition: chars.h:49
#define IERESF
Definition: chars.h:38
#define DITTO_MARK
Definition: chars.h:61
#define CMD_LATEX
Definition: chars.h:2
#define CNUMERO
Definition: chars.h:44
#define CMD_SLITEX
Definition: chars.h:3
#define POINT_INTERROGATION
Definition: chars.h:60
#define FUP
Definition: chars.h:50
#define IERF
Definition: chars.h:35
#define SUPERIEURA
Definition: chars.h:53
#define PRIMO
Definition: chars.h:46
#define IEMEF
Definition: chars.h:39
#define NUMERO
Definition: chars.h:42
#define FRENCH_RQ
Definition: chars.h:55
#define POINT_VIRGULE
Definition: chars.h:58
#define FRENCH_LQQ
Definition: chars.h:56
#define CMD_BIBTEX
Definition: chars.h:4
#define NUMEROS
Definition: chars.h:43
void CmdCzechAbbrev(int code)
#define POINT_EXCLAMATION
Definition: chars.h:59
void CmdFrenchAbbrev(int code)
void CmdLogo(int code)
#define CNUMEROS
Definition: chars.h:45
#define FRENCH_LQ
Definition: chars.h:54
#define FCS
Definition: chars.h:64
void CmdChar(int code)
#define FRENCH_RQQ
Definition: chars.h:57
void CmdCyrillicChar(int code)
#define CMD_LATEXE
Definition: chars.h:5
#define CMD_TEX
Definition: chars.h:1
#define CMD_AMSLATEX
Definition: chars.h:7
void CmdDotChar(int code)
#define LCS
Definition: chars.h:63
void CmdUnderbarChar(int code)
#define IEREF
Definition: chars.h:36
#define TERTIO
Definition: chars.h:48
void CmdDotlessChar(int code)
#define IERSF
Definition: chars.h:37
#define INFERIEURA
Definition: chars.h:52
#define SECUNDO
Definition: chars.h:47
@ FALSE
Definition: dd.h:101
@ TRUE
Definition: dd.h:102
#define PREAMBLE
Definition: dd.h:231
#define free(a)
Definition: decNumber.cpp:310
int existsDefinition(char *s)
Definition: definitions.c:205
char * expandDefinition(int thedef)
Definition: definitions.c:313
char * CmdTable[256]
Definition: dt2dv.c:130
int strcmp()
Definition: coll.cpp:143
void CmdFraction(int code)
Definition: equation.c:750
void CmdArray(int code)
Definition: equation.c:1169
void CmdSubscript(int code)
Definition: equation.c:1072
void CmdMatrix(int code)
Definition: equation.c:1201
void CmdRoot(int code)
Definition: equation.c:714
void CmdSuperscript(int code)
Definition: equation.c:1049
void CmdLeftRight(int code)
Definition: equation.c:1095
void CmdNonumber(int code)
Definition: equation.c:59
void CmdStackrel(int code)
Definition: equation.c:1215
void CmdEquation(int code)
Definition: equation.c:640
void CmdLim(int code)
Definition: equation.c:837
void CmdIntegral(int code)
Definition: equation.c:884
void CmdArrows(int code)
Definition: equation.c:787
#define EQN_EQUATION
Definition: equation.h:8
#define EQN_DISPLAYMATH
Definition: equation.h:11
#define LEFT_RIGHT
Definition: equation.h:15
#define LEFT_LEFT
Definition: equation.h:19
#define EQN_ARRAY_STAR
Definition: equation.h:7
#define RIGHT_LEFT
Definition: equation.h:16
#define EQN_NO_NUMBER
Definition: equation.h:13
#define EQN_MATH
Definition: equation.h:10
#define LONG_RIGHTLEFT
Definition: equation.h:18
#define EQN_ARRAY
Definition: equation.h:6
#define LONG_LEFTRIGHT
Definition: equation.h:17
#define EQN_EQUATION_STAR
Definition: equation.h:9
#define RIGHT_RIGHT
Definition: equation.h:20
static void
Definition: fpif.c:118
int g_left_margin_indent
Definition: funct1.c:53
void CmdIgnore(int code)
Definition: funct1.c:604
void CmdColsep(int code)
Definition: funct1.c:1875
void CmdBottom(int code)
Definition: funct1.c:1795
void CmdIndent(int code)
Definition: funct1.c:339
void CmdLength(int code)
Definition: funct1.c:1018
void CmdColumn(int code)
Definition: funct1.c:1722
void CmdFigure(int code)
Definition: funct1.c:1560
void CmdQuote(int code)
Definition: funct1.c:1072
void CmdVerbosityLevel(int code)
Definition: funct1.c:1899
void CmdIf(int code)
Definition: funct1.c:2000
int g_right_margin_indent
Definition: funct1.c:52
void CmdVspace(int code)
Definition: funct1.c:169
void CmdNonBreakSpace(int code)
Definition: funct1.c:1957
void GermanPrint(int code)
Definition: funct1.c:1500
void CmdIgnoreLet(int code)
Definition: funct1.c:1521
void CmdInclude(int code)
Definition: funct1.c:1965
void CmdSection(int code)
Definition: funct1.c:712
void CmdAlign(int code)
Definition: funct1.c:514
void CmdCounter(int code)
Definition: funct1.c:975
void CmdEndInput(int code)
Definition: funct1.c:2010
void CmdBox(int code)
Definition: funct1.c:1250
void CmdVerb(int code)
Definition: funct1.c:1289
void CmdTitlepage(int code)
Definition: funct1.c:1836
void CmdList(int code)
Definition: funct1.c:1111
void CmdNewPage(int code)
Definition: funct1.c:1742
void CmdVerbatim(int code)
Definition: funct1.c:1339
void CmdBeginEnd(int code)
Definition: funct1.c:446
void CmdLdots(int code)
Definition: funct1.c:612
void CmdEndParagraph(int code)
Definition: funct1.c:146
void CmdAbstract(int code)
Definition: funct1.c:1807
void CmdMinipage(int code)
Definition: funct1.c:1855
void CmdNewEnvironment(int code)
Definition: funct1.c:272
void CmdVerse(int code)
Definition: funct1.c:1407
void CmdQuad(int kk)
Definition: funct1.c:1539
void CmdIgnoreDef(int code)
Definition: funct1.c:1431
void CmdItem(int code)
Definition: funct1.c:1166
void CmdNewTheorem(int code)
Definition: funct1.c:313
void CmdToday(int code)
Definition: funct1.c:593
void CmdTextColor(int code)
Definition: funct1.c:1650
void CmdCaption(int code)
Definition: funct1.c:907
void CmdLink(int code)
Definition: funct1.c:1697
void CmdIgnoreEnviron(int code)
Definition: funct1.c:1602
void Cmd_OptParam_Without_braces(int code)
Definition: funct1.c:1765
#define SECT_SUBSUB
Definition: funct1.h:87
#define SECT_NORM_STAR
Definition: funct1.h:93
#define SECT_CHAPTER
Definition: funct1.h:84
#define One_Opt_One_NormParam
Definition: funct1.h:153
#define COUNTER_NEW
Definition: funct1.h:110
#define FIGURE
Definition: funct1.h:141
#define VERB_VERB
Definition: funct1.h:53
#define PAR_LEFT
Definition: funct1.h:29
#define SECT_SUB
Definition: funct1.h:86
#define LENGTH_SET
Definition: funct1.h:118
#define NewPage
Definition: funct1.h:164
#define VERBATIM_1
Definition: funct1.h:48
#define SECT_SUBSUBSUBSUB
Definition: funct1.h:89
#define SECT_SUBSUBSUBSUB_STAR
Definition: funct1.h:97
#define IGNORE_RAWHTML
Definition: funct1.h:147
#define SECT_SUBSUBSUB
Definition: funct1.h:88
#define SECT_PART_STAR
Definition: funct1.h:91
#define IGNORE_HTMLONLY
Definition: funct1.h:144
#define BOX_FBOX
Definition: funct1.h:37
#define SECT_NORM
Definition: funct1.h:85
#define SECT_PART
Definition: funct1.h:83
#define One_Column
Definition: funct1.h:161
#define QUOTATION
Definition: funct1.h:103
#define GP_LDBL
Definition: funct1.h:131
#define SECT_SUB_STAR
Definition: funct1.h:94
#define PAR_VCENTER
Definition: funct1.h:31
#define COUNTER_SET
Definition: funct1.h:111
#define SECT_SUBSUBSUB_STAR
Definition: funct1.h:96
#define VERB_URL
Definition: funct1.h:55
#define Two_Opt_One_NormParam
Definition: funct1.h:157
#define BOX_VBOX
Definition: funct1.h:35
#define GP_CK
Definition: funct1.h:130
#define One_Opt_No_NormParam
Definition: funct1.h:152
#define VERBATIM_4
Definition: funct1.h:51
#define No_Opt_Three_NormParam
Definition: funct1.h:151
#define No_Opt_Two_NormParam
Definition: funct1.h:150
#define SECT_SUBSUB_STAR
Definition: funct1.h:95
#define VERB_STAR
Definition: funct1.h:54
#define DEF_RENEW
Definition: funct1.h:71
#define BOX_HBOX
Definition: funct1.h:34
#define VERBATIM_2
Definition: funct1.h:49
#define INDENT_NONE
Definition: funct1.h:44
#define NewColumn
Definition: funct1.h:165
#define CMD_BEGIN
Definition: funct1.h:24
#define SECT_CHAPTER_STAR
Definition: funct1.h:92
#define PAR_RAGGEDRIGHT
Definition: funct1.h:32
#define GP_RDBL
Definition: funct1.h:134
#define DEF_NEW
Definition: funct1.h:70
#define PAR_CENTERLINE
Definition: funct1.h:30
#define GP_R
Definition: funct1.h:133
#define BOX_PARBOX
Definition: funct1.h:38
#define LENGTH_ADD
Definition: funct1.h:119
#define DEF_DEF
Definition: funct1.h:72
#define Two_Opt_Two_NormParam
Definition: funct1.h:158
#define VERBATIM_3
Definition: funct1.h:50
#define One_Opt_Two_NormParam
Definition: funct1.h:154
#define COUNTER_VALUE
Definition: funct1.h:113
#define LENGTH_NEW
Definition: funct1.h:117
#define PAR_CENTER
Definition: funct1.h:27
#define GP_L
Definition: funct1.h:132
#define CMD_END
Definition: funct1.h:25
#define INDENT_USUAL
Definition: funct1.h:46
void CmdNewDef(int code)
#define FIGURE_1
Definition: funct1.h:142
#define Two_Column
Definition: funct1.h:162
#define COUNTER_ADD
Definition: funct1.h:112
#define PAR_RIGHT
Definition: funct1.h:28
#define No_Opt_One_NormParam
Definition: funct1.h:149
#define BOX_MBOX
Definition: funct1.h:36
void Ignore_Environment(char *cCommand)
Definition: ignore.c:136
assert(pcxLoadImage24((char *)((void *) 0), fp, pinfo, hdr))
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p scientific i
Definition: afcover.h:80
#define ERROR(string)
Definition: error.h:36
static CommandArray params[]
Definition: commands.c:559
static CommandArray CzechModeCommands[]
Definition: commands.c:443
int CurrentEnvironmentCount(void)
Definition: commands.c:803
static int g_left_indent_array[100]
Definition: commands.c:56
static CommandArray FrenchModeCommands[]
Definition: commands.c:448
static CommandArray hyperlatex[]
Definition: commands.c:630
static CommandArray EnumerateCommands[]
Definition: commands.c:412
static CommandArray FigureCommands[]
Definition: commands.c:417
static CommandArray DescriptionCommands[]
Definition: commands.c:407
static int g_par_indent_array[100]
Definition: commands.c:55
static CommandArray natbibCommands[]
Definition: commands.c:703
static CommandArray commands[]
Definition: commands.c:59
struct commandtag CommandArray
static CommandArray GermanModeCommands[]
Definition: commands.c:434
static CommandArray PreambleCommands[]
Definition: commands.c:332
void CallParamFunc(char *cCommand, int AddParam)
Definition: commands.c:773
static int g_right_indent_array[100]
Definition: commands.c:57
static int iEnvCount
Definition: commands.c:53
static CommandArray RussianModeCommands[]
Definition: commands.c:487
static CommandArray * Environments[100]
Definition: commands.c:54
static CommandArray apaciteCommands[]
Definition: commands.c:643
void PushEnvironment(int code)
Definition: commands.c:812
static CommandArray LetterCommands[]
Definition: commands.c:423
static CommandArray ItemizeCommands[]
Definition: commands.c:402
bool CallCommandFunc(char *cCommand)
Definition: commands.c:726
void ClearEnvironment()
Definition: commands.c:929
void PopEnvironment()
Definition: commands.c:903
#define FRENCH_MODE
Definition: commands.h:13
#define ITEMIZE
Definition: commands.h:5
#define DOCUMENT
Definition: commands.h:4
#define FIGURE_ENV
Definition: commands.h:11
#define CZECH_MODE
Definition: commands.h:16
#define ENUMERATE
Definition: commands.h:6
#define IGN_ENV_CMD
Definition: commands.h:9
#define GENERIC_ENV
Definition: commands.h:15
#define DESCRIPTION
Definition: commands.h:7
#define GERMAN_MODE
Definition: commands.h:12
#define HYPERLATEX
Definition: commands.h:10
#define RUSSIAN_MODE
Definition: commands.h:14
#define NATBIB_MODE
Definition: commands.h:18
#define APACITE_MODE
Definition: commands.h:17
#define LETTER
Definition: commands.h:8
void ConvertString(char *string)
Definition: convert.c:103
void diagnostics(int level, char *format,...)
Definition: main.c:469
#define WARNING__
Definition: main.h:32
#define TABBING
Definition: tables.h:3
#define TABULAR
Definition: tables.h:4
#define TABULAR_LONG_STAR
Definition: tables.h:7
#define TABLE_1
Definition: tables.h:10
#define TABULAR_STAR
Definition: tables.h:5
#define TABULAR_LONG
Definition: tables.h:6
static psfont * Environment
Definition: type1.c:155
#define snprintf
Definition: snprintf.c:41
void CmdUnderline(int code)
Definition: l2r_fonts.c:452
void CmdFontSize(int code)
Definition: l2r_fonts.c:375
void CmdFontSeries(int code)
Definition: l2r_fonts.c:309
void CmdTextNormal(int code)
Definition: l2r_fonts.c:469
void CmdEmphasize(int code)
Definition: l2r_fonts.c:403
void CmdFontShape(int code)
Definition: l2r_fonts.c:233
void CmdFontFamily(int code)
Definition: l2r_fonts.c:133
#define F_FAMILY_TYPEWRITER_4
Definition: l2r_fonts.h:17
#define F_SHAPE_CAPS_4
Definition: l2r_fonts.h:37
#define F_SHAPE_SLANTED_3
Definition: l2r_fonts.h:26
#define F_FAMILY_ROMAN_1
Definition: l2r_fonts.h:4
#define F_SERIES_MEDIUM
Definition: l2r_fonts.h:43
#define F_SERIES_MEDIUM_3
Definition: l2r_fonts.h:46
#define F_SERIES_BOLD
Definition: l2r_fonts.h:47
#define F_FAMILY_ROMAN_2
Definition: l2r_fonts.h:5
#define F_SHAPE_SLANTED_1
Definition: l2r_fonts.h:24
#define F_SHAPE_ITALIC
Definition: l2r_fonts.h:28
#define F_EMPHASIZE_2
Definition: l2r_fonts.h:59
#define F_SERIES_BOLD_4
Definition: l2r_fonts.h:51
#define F_FAMILY_SANSSERIF_4
Definition: l2r_fonts.h:12
#define F_TEXT_NORMAL_2
Definition: l2r_fonts.h:55
#define F_FAMILY_CALLIGRAPHIC_2
Definition: l2r_fonts.h:20
#define F_FAMILY_ROMAN
Definition: l2r_fonts.h:3
#define F_SHAPE_CAPS_3
Definition: l2r_fonts.h:36
#define F_FAMILY_TYPEWRITER
Definition: l2r_fonts.h:13
#define F_SHAPE_ITALIC_4
Definition: l2r_fonts.h:32
#define F_FAMILY_TYPEWRITER_1
Definition: l2r_fonts.h:14
#define F_FAMILY_SANSSERIF_1
Definition: l2r_fonts.h:9
#define F_FAMILY_SANSSERIF_3
Definition: l2r_fonts.h:11
#define F_SHAPE_UPRIGHT
Definition: l2r_fonts.h:38
#define F_FAMILY_ROMAN_3
Definition: l2r_fonts.h:6
#define F_EMPHASIZE_1
Definition: l2r_fonts.h:58
#define F_SHAPE_ITALIC_2
Definition: l2r_fonts.h:30
#define F_SERIES_BOLD_1
Definition: l2r_fonts.h:48
#define F_FAMILY_TYPEWRITER_2
Definition: l2r_fonts.h:15
#define F_SHAPE_CAPS
Definition: l2r_fonts.h:33
#define F_SHAPE_CAPS_1
Definition: l2r_fonts.h:34
#define F_SHAPE_ITALIC_1
Definition: l2r_fonts.h:29
#define F_FAMILY_CALLIGRAPHIC_1
Definition: l2r_fonts.h:19
#define F_FAMILY_ROMAN_4
Definition: l2r_fonts.h:7
#define F_SHAPE_UPRIGHT_2
Definition: l2r_fonts.h:40
#define F_TEXT_NORMAL_3
Definition: l2r_fonts.h:56
#define F_SHAPE_SLANTED
Definition: l2r_fonts.h:23
#define F_SHAPE_CAPS_2
Definition: l2r_fonts.h:35
#define F_SHAPE_SLANTED_2
Definition: l2r_fonts.h:25
#define F_EMPHASIZE_3
Definition: l2r_fonts.h:60
#define F_FAMILY_SANSSERIF
Definition: l2r_fonts.h:8
#define F_FAMILY_SANSSERIF_2
Definition: l2r_fonts.h:10
#define F_SHAPE_ITALIC_3
Definition: l2r_fonts.h:31
#define F_SERIES_BOLD_2
Definition: l2r_fonts.h:49
#define F_SERIES_BOLD_3
Definition: l2r_fonts.h:50
#define F_SERIES_MEDIUM_2
Definition: l2r_fonts.h:45
#define F_SHAPE_SLANTED_4
Definition: l2r_fonts.h:27
#define F_FAMILY_TYPEWRITER_3
Definition: l2r_fonts.h:16
void CmdIgnoreParameter(int)
void CmdSetTexLength(int code)
Definition: lengths.c:116
int getLength(char *s)
Definition: lengths.c:99
void setLength(char *s, int d)
Definition: lengths.c:84
#define SL_VOFFSET
Definition: lengths.h:2
#define SL_EVENSIDEMARGIN
Definition: lengths.h:12
#define SL_HEADHEIGHT
Definition: lengths.h:8
#define SL_PARINDENT
Definition: lengths.h:3
#define SL_TEXTWIDTH
Definition: lengths.h:10
#define SL_PARSKIP
Definition: lengths.h:4
#define SL_HOFFSET
Definition: lengths.h:1
#define SL_TOPMARGIN
Definition: lengths.h:6
#define SL_BASELINESKIP
Definition: lengths.h:5
#define SL_TEXTHEIGHT
Definition: lengths.h:7
#define SL_HEADSEP
Definition: lengths.h:9
#define SL_ODDSIDEMARGIN
Definition: lengths.h:11
void CmdLetter(int code)
Definition: letterformat.c:66
void CmdPs(int code)
Definition: letterformat.c:154
void CmdAddress(int code)
Definition: letterformat.c:54
void CmdSignature(int code)
Definition: letterformat.c:42
void CmdOpening(int code)
Definition: letterformat.c:83
void CmdClosing(int code)
Definition: letterformat.c:120
#define LETTER_ENCL
Definition: letterformat.h:3
#define LETTER_PS
Definition: letterformat.h:1
#define LETTER_CC
Definition: letterformat.h:2
static luaL_Reg func[]
Definition: except.c:32
Definition: inftrees.h:24
int param
Definition: commands.c:50
char * cpCommand
Definition: commands.c:48
void(* func)(int)
Definition: commands.c:49
int j
Definition: t4ht.c:1589
void CmdTabbing(int code)
Definition: tables.c:943
void CmdHline(int code)
Definition: tables.c:1072
void CmdTabular(int code)
Definition: tables.c:607
void CmdMultiCol(int code)
Definition: tables.c:1040
return() int(((double) *(font_tbl[cur_fnt].wtbl+(int)(*(font_tbl[cur_fnt].char_wi+(int)(ch - font_tbl[cur_fnt].char_f)% 256)))/(double)(1L<< 20)) *(double) font_tbl[cur_fnt].scale)
void CmdGraphics(int code)
Definition: graphics.c:1270
void CmdMusic(int code)
Definition: graphics.c:1415
void CmdPicture(int code)
Definition: graphics.c:1394
void CmdPreambleBeginEnd(int code)
Definition: preamble.c:655
void CmdHyphenation(int code)
Definition: preamble.c:797
void CmdThePage(int code)
Definition: preamble.c:753
void CmdHeadFoot(int code)
Definition: preamble.c:986
void CmdMakeTitle(int code)
Definition: preamble.c:615
void CmdDocumentStyle(int code)
Definition: preamble.c:464
void CmdUsepackage(int code)
Definition: preamble.c:527
void CmdTitle(int code)
Definition: preamble.c:587
#define TITLE_AUTHOR
Definition: preamble.h:8
#define CHEAD
Definition: preamble.h:16
#define TITLE_TITLE
Definition: preamble.h:7
#define CFOOT
Definition: preamble.h:12
#define TITLE_DATE
Definition: preamble.h:9
#define RHEAD
Definition: preamble.h:17
#define LHEAD
Definition: preamble.h:15
#define LFOOT
Definition: preamble.h:13
#define RFOOT
Definition: preamble.h:14
@ ON
Definition: ubidiimp.h:55
void CmdBibliography(int code)
Definition: xref.c:205
void CmdNoCite(int code)
Definition: xref.c:189
void CmdCiteName(int code)
Definition: xref.c:898
void CmdHtml(int code)
Definition: xref.c:728
void CmdIndex(int code)
Definition: xref.c:306
void CmdApaCite(int code)
Definition: xref.c:839
void CmdNewblock(int code)
Definition: xref.c:299
void CmdFootNote(int code)
Definition: xref.c:143
void CmdBibliographyStyle(int code)
Definition: xref.c:198
void CmdPrintIndex(int code)
Definition: xref.c:340
void CmdBCAY(int code)
Definition: xref.c:762
void CmdCite(int code)
Definition: xref.c:586
void CmdThebibliography(int code)
Definition: xref.c:225
void CmdLabel(int code)
Definition: xref.c:398
void CmdBibitem(int code)
Definition: xref.c:258
#define LABEL_HYPERCITE
Definition: xref.h:8
#define CITE_T
Definition: xref.h:36
#define CITE_T_STAR
Definition: xref.h:37
#define LABEL_HTMLADDNORMALREF
Definition: xref.h:12
#define CITE_TEXT
Definition: xref.h:44
#define CITE_SHORT_NP
Definition: xref.h:26
#define FOOTNOTE_TEXT
Definition: xref.h:2
#define CITE_ALP
Definition: xref.h:41
#define CITE_AUTHOR_STAR
Definition: xref.h:46
#define CITE_CITE
Definition: xref.h:21
#define CITE_FULL_A
Definition: xref.h:28
#define LABEL_PAGEREF
Definition: xref.h:11
#define CITE_CITE_A
Definition: xref.h:27
#define CITE_P_STAR
Definition: xref.h:39
#define CITE_P
Definition: xref.h:38
#define CITE_SHORT
Definition: xref.h:23
#define CITE_FULL_NP
Definition: xref.h:25
#define LABEL_REF
Definition: xref.h:7
#define CITE_CITE_AUTHOR
Definition: xref.h:30
#define CITE_FULL
Definition: xref.h:22
#define LABEL_HYPERPAGEREF
Definition: xref.h:10
#define CITE_ALT
Definition: xref.h:40
#define CITE_SHORT_AUTHOR
Definition: xref.h:32
#define LABEL_LABEL
Definition: xref.h:5
#define LABEL_HTMLREF
Definition: xref.h:13
#define CITE_ALP_STAR
Definition: xref.h:43
#define CITE_YEAR_NP
Definition: xref.h:34
#define CITE_ALT_STAR
Definition: xref.h:42
#define CITE_YEAR_P
Definition: xref.h:47
#define CITE_YEAR
Definition: xref.h:33
#define FOOTNOTE_THANKS
Definition: xref.h:3
#define CITE_SHORT_A
Definition: xref.h:29
#define CITE_CITE_NP
Definition: xref.h:24
#define CITE_FULL_AUTHOR
Definition: xref.h:31
#define FOOTNOTE
Definition: xref.h:1
#define CITE_AUTHOR
Definition: xref.h:45
#define LABEL_HYPERREF
Definition: xref.h:6