]> git.lyx.org Git - lyx.git/blob - lib/syntax.default
partial fix for bug 2132
[lyx.git] / lib / syntax.default
1 % This is the default list of commands for tex conversion programs to read
2 %    It tells how many arguments each command takes, and which of them
3 % (if any) are optional.
4 %    It is taken from the list of commands written by John Weiss 970311 for reLyX
5 % plus the math commands from math_hash.C
6 %
7 % Also had to add textrm etc. commands and many size commands (like \small)
8 %
9 %    I left in things like units of measure (\depth) because reLyX will think
10 % that they're commands, and this way it will know they don't take any
11 % arguments...
12 %
13 %    There are almost certainly commands in here we don't need -- but that
14 % shouldn't matter
15 %
16 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17
18 % The first thing listed here is commands that are hard-coded into reLyX.
19 % Redefining these commands in a new syntax file will probably not help%
20 % and may break things.
21 \#
22 \$
23 \%
24 \&
25 \@
26 \_
27 \{
28 \}
29 ~
30
31 \hfill
32 \i
33 \j
34 \L
35 \l
36 \LaTeX
37 \LaTeXe
38 \LyX
39 \ldots
40 \TeX
41
42 \"{}
43 $$
44 \'{}
45 \(
46 \)
47 \-
48 \.{}
49 \={}
50 \[
51 \]
52 \\[]
53 \\*[]
54 \^{}
55 \`{}
56 \~{}
57 \b{}
58 % \begin{}[]   %reLyX will get confused if \begin is found in this file!
59 %\begin{}[]{} % All of these show the different variations of \begin (jpw)
60 %\begin{}{}   % reLyX can only handle \begin{}
61 %\begin{}{}{}
62 %\begin{}[][][]{}
63 %\begin{}(,)
64 %\begin{}(,)(,)
65 %\begin{}{}[]{}
66 \bf
67 \bibitem[]{}
68 \bibliography{}
69 \bibliographystyle{}
70 \c{}
71 \cite[]{}
72
73 % Natbib citations can usually have two optional args
74 \citet[][]{}
75 \Citet[][]{}
76 \citet*[][]{}
77 \Citet*[][]{}
78
79 \citealt[][]{}
80 \Citealt[][]{}
81 \citealt*[][]{}
82 \Citealt*[][]{}
83
84 \citep[][]{}
85 \Citep[][]{}
86 \citep*[][]{}
87 \Citep*[][]{}
88
89 \citealp[][]{}
90 \Citealp[][]{}
91 \citealp*[][]{}
92 \Citealp*[][]{}
93
94 \citeauthor[]{}
95 \Citeauthor[]{}
96 \citeauthor*[]{}
97 \Citeauthor*[]{}
98
99 \citeyear[]{}
100 \citeyearpar[][]{}
101
102 % jurabib supports some natbib commands and additionally:
103 \fullcite[][]{}
104 \footcite[][]{}
105 \footcitet[][]{}
106 \footcitealt[][]{}
107 \footcitep[][]{}
108 \footcitealp[][]{}
109 \footciteauthor[]{}
110 \footciteyear[]{}
111 \footciteyearpar[][]{}
112 \citefield[]{}
113 \citetitle[]{}
114
115 \cline{ - }
116 \d{}
117 \documentclass[]{}[]
118 \documentstyle[]{}
119 \em
120 \emph{}
121 % \end{}   %reLyX will get confused if \end is found in this file!
122 \epsf{}
123 \epsfbox{}
124 \epsffile{}
125 \epsfig{}
126 \epsfxsize
127 \epsfysize
128 \fancyhead[]{}
129 \footnote[]{}
130 \footnotesize
131 \H{}
132 \hline
133 \huge
134 \Huge
135 \include{}
136 \includegraphics[,][,]{} % btw, LyX doesn't support graphicx, just graphics
137 \input{}
138 \it
139 \item[]  % Has two variants (jpw) Other variant is unsupported (adk)
140 \label{}
141 \large
142 \Large
143 \LARGE
144 \marginpar[]{}
145 \multicolumn{}{}{}
146 \newline
147 \noindent
148 \normalsize
149 \noun{}    % LyX style for nouns (appears in lyx-generated files)
150 \pageref{}
151 \psfig{}
152 \ref{}
153 \rm
154 \sc
155 \sf
156 \sl
157 \t{ }
158 \textmd{}   % I had to add these (adk)
159 \textbf{}   %         :
160 \textrm{}   %         :
161 \textsf{}   %         :
162 \texttt{}   %         :
163 \textup{}   %         :
164 \textit{}   %         :
165 \textsl{}   %         :
166 \textsc{}   %         :
167 \textbar
168 \textbackslash
169 \textgreater
170 \textless
171 \scriptsize
172 \small
173 \tiny
174 \tt
175 \u{}
176 \underbar{}  % LyX generated files use underbar instead of underline
177 \underline{}
178 \v{}
179
180
181
182 % Units of measure.  These get used only within the arguments of
183 % commands that take some length quantity.
184
185 \depth
186 \fill
187 \height
188 \totalheight
189 \width
190
191 %
192 % Length variables
193 %
194
195 \abovedisplay
196 \abovedisplayshortskip
197 \arraycolsep
198 \arrayrulewidth
199 \arraystretch
200 \baselineskip
201 \baselinestretch
202 \belowdisplayskip
203 \belowdisplayshortskip
204 \bigskipamount
205 \columnsep
206 \columnseprule
207 \dblfloatsep
208 \dbltextfloatsep
209 \doublerulesep
210 \evensidemargin
211 \fboxrule
212 \fboxsep
213 \floatsep
214 \footnotesep
215 \footskip
216 \headheight
217 \headsep
218 \hoffset
219 \intextsep
220 \itemindent
221 \itemsep
222 \jot
223 \labelsep
224 \labelwidth
225 \leftmargin
226 \leftmargini
227 \leftmarginii
228 \leftmarginiii
229 \leftmarginiv
230 \leftmarginv
231 \leftmarginvi
232 \listparindent
233 \marginpush
234 \marginparsep
235 \marginparwidth
236 \mathindent
237 \medskipamount
238 \oddsidemargin
239 \paperheight
240 \paperwidth
241 \parindent
242 \parsep
243 \parskip
244 \partopsep
245 \rightmargin
246 \smallskipamount
247 \tabbingsep
248 \tabcolsep
249 \textfloatsep
250 \textheight
251 \textwidth
252 \topmargin
253 \topsep
254 \topskip
255 \unitlength
256 \voffset
257
258 %
259 % Commands that act like single characters and insert something.  This
260 % excludes the commands that place accents on characters, since they
261 % require arguments, whereas these don't.  Also excluded are commands
262 % that insert a specified amount of space [again, that requires
263 % arguments] and those that insert lists, since a list isn't a single
264 % object.
265 %
266 % I had to remove things that TeX.pm doesn't recognize as a token, and hardcode
267 %   those into reLyX. This included !' ?' -- --- and maybe some other things
268
269 \ % A "\" followed by a space.
270 \,
271 \/
272 \AA
273 \aa
274 \AE
275 \ae
276 \bigskip
277 \copyright
278 \dag
279 \ddag
280 \DH
281 \dh
282 \DJ
283 \dj
284 \dotfill
285 \dots
286 \guillemotleft
287 \guillemotright
288 \guilsinglleft
289 \guilsinglright
290 \hrulefill
291 \lq
292 \medskip
293 \NG
294 \ng
295 \O
296 \o
297 \OE
298 \oe
299 \P
300 \pounds
301 \quad
302 \qquad
303 \quotedblbase
304 \quotesinglebase
305 \rq
306 \S
307 \SS
308 \smallskip
309 \ss
310 \textbullet
311 \textemdash
312 \textendash
313 \textexclamdown
314 \textperiodcenter
315 \textquestiondown
316 \textquotedblleft
317 \textquotedblright
318 \textquoteleft
319 \textquoteright
320 \textvisiblespace
321 \textcompwordmark
322 \textquotedbl
323 \TH
324 \th
325 \thechapter
326 \theenumi
327 \theenumii
328 \theenumiii
329 \theenumiv
330 \theequation
331 \thefigure
332 \thefootnote
333 \thempfootnote
334 \thepage
335 \theparagraph
336 \thepart
337 \thesection
338 \thesubsection
339 \thesubsubsection
340 \thesubparagraph
341 \thetable
342 \vfill
343
344
345 %
346 % The LaTeX commands.  As per Alejandro's request, I've omitted all of
347 % the math commands he appears to support in Mathed.  I'm also
348 % omitting commands used primarily for defining new class and style
349 % files. (jpw)
350 %
351 % For some reason, John didn't write {} after \" and some of the other
352 %    accent commands (adk)
353 % He also didn't include the \textsc{} equivalent to {\sc}
354 % Because any commands with arguments in parentheses (rather than braces or
355 %    brackets) appear in a picture environment, which reLyX doesn't support,
356 %    we can comment those out.
357 %
358 % These are the commands you're mostly likely to want to redefine in your own
359 % syntax files
360 %
361 % Arguments whose text is "translate" will have regular LaTeX in them (as
362 % opposed to commands with special syntax) which should be translated by
363 % reLyX like regular LaTeX. \mbox{} is an obvious example. LyX doesn't
364 % support it, but only the "\mbox{" and the "}" need to be in TeX mode.
365
366 \abstractname
367 \Acrobatmenu{}{}         % from the hyperref package
368 \addcontentsline{}{}{translate}
369 \address{}
370 \addtime{}
371 \addtocontents{}{translate}  % one argument was missing here (JMarc)
372 \addtocounter{}{}
373 \addtolength{}{}
374 \addvspace{}
375 \Alph{}
376 \alph{}
377 \alsoname
378 \and
379 \appendix % had to add this -Ak
380 \appendixname
381 \arabic{}
382 \author{}
383 \backmatter
384 %\bezier{}(,)(,)(,)    % picture
385 \bfdefault
386 \bibliographyunit[]
387 \bibname
388 \botfigrule
389 \bottomfraction
390 \caption[]{}
391 \cc{}
392 \ccname
393 \centering
394 \centerline{translate}
395 \chapter[]{}
396 \chapter*{}
397 \chaptername
398 \check{}
399 %\circle{}    % picture environment (JMarc)
400 %\circle*{}
401 \cleardoublepage
402 \clearpage
403 \closing{}
404 \color[]{,,}  % Two variants of this command and the next (jpw)
405 % \color{}    %  This variant doesn't matter to reLyX (adk)
406 \colorspec[]{,,}{}
407 %\colorspec{}{}    %  This variant doesn't matter to reLyX (adk)
408 %\contentsline{}{\numberline{}  }{}     % Appears only in .toc file (JMarc)
409 \contentsname
410 % \dashbox{}(,)[]{}   %picture
411 \date{}
412 \dblfigrule
413 \dblfloatpagefraction
414 \dbltopfraction
415 \def{}{}
416 \definecolor{}{}{,,}
417 \DescribeMacro{}
418 \discretionary{}{}{}
419 \encl{}
420 \enclname
421 \enlargethispage{}
422 \enlargethispage*{}
423 \ensuremath{}
424 \extracolsep{}
425 \fbox{translate}
426 \fcolorbox[]{,,}{,,}{}  % Two variants of this command
427 %\fcolorbox{}{}{}    %  This variant doesn't matter to reLyX (adk)
428 \figurename
429 \floatpagefraction
430 \flushbottom
431 \fnsymbol{}
432 \fontfamily{}
433 \fontseries{}
434 \fontshape{}
435 \fontsize{}{}
436 \footnotemark[]
437 \footnoterule
438 \footnotetext[]{translate}
439 % LaTeX has \frame{}, but beamer has \frame[]{}, so use the latter
440 \frame[]{translate}
441 \framebox[][]{translate} % Two variants of this command
442 %\framebox(,)[]{}    %  picture variant
443 \frenchspacing
444 \frontmatter
445 \fussy
446 \glossary{translate}
447 \glossaryentry{}{}       %only in .glo file (JMarc)
448 % \graphpaper[](,)(,)    %picture
449 \headtoname
450 \href{}{translate}       % from the hyperref package
451 \hspace{}
452 \hspace*{}
453 \hyperdef{}{}{translate} % from the hyperref package
454 \hyperlink{}{translate}  % from the hyperref package
455 \hyperref{}{}{translate} % from the hyperref package
456 \hypertarget{}{translate} % from the hyperref package
457 \hyphenation{}
458 \iflanguage{}{}{}
459 \ifthenelse
460 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
461 \indent
462 \index{}
463 \indexentry{}{}        % only in .idx files (JMarc)
464 \indexname
465 \indexspace
466 \invisible
467 \itdefault
468 % This variant of \item might break reLyX!
469 %  \item{}   % Only appears in unsupported theindex environment
470 \k{}
471 \kill
472 \labelnumi
473 \labelnumii
474 \labelnumiii
475 \labelnumiv
476 \labelitemi
477 \labelitemii
478 \labelitemiii
479 \labelitemiv
480 \language{}
481 % We need this because the arguments must not be interpreted
482 \let{}{}
483 % \line(,){}    %picture
484 \linebreak[]
485 \linethickness{}
486 \listfigurename
487 \listofalgorithms %AMStex?
488 \listoffigures
489 \listoftables
490 \listtablename
491 \location{}
492 \mainmatter
493 \makebox[][]{translate}
494 %  \makebox(,)[]{}     %picture variant
495 \makeglossary
496 \makeindex
497 \makelabel{translate}
498 \makelabels
499 \maketitle
500 \markboth{}{translate}
501 \markright{translate}
502 \mathversion{}
503 \mbox{translate}
504 \mddefault
505 % \multiput(,)(,){}{}     %picture
506 \name{}
507 \newboolean{}
508 \newcommand{}[][]{}
509 \newcommand*{}[][]{}
510 %\newcommand{}[]{}    % reLyX doesn't care about missing optarg
511 \newcounter{}[]
512 \newenvironment{}[][]{}{}
513 \newenvironment*{}[][]{}{}
514 % \newenvironment{}[]{}{}    % reLyX doesn't care about missing optarg
515 \newfont{}{ scaled }
516 \newlength{}
517 \newpage
518 \newsavebox{}
519 \newtheorem{}[]{translate}[]
520 \nocite{}
521 \nocorr
522 \nolinebreak[]
523 \nonfrenchspacing
524 \nopagebreak[]
525 \normalcolor
526 \normalfont
527 \normalmarginpar
528 \notesname
529 \numberline{}{}
530 \onecolumn
531 \onlynotes{}
532 \onlyslides{}
533 \opening{}
534 % \oval(,)[]   %picture
535 \pagebreak[]
536 \pagecolor[]{,,}
537 % \pagecolor{}    % reLyX doesn't care about this version
538 \pagename
539 \pagenumbering{}
540 \par
541 \paragraph[]{}
542 \paragraph*{}
543 %\parbox[]{}{}            % reLyX treats next line same as this one (adk)
544 \parbox[][][]{}{translate}
545 \part[]{}
546 \part*{}
547 \partname
548 \pdfbookmark[]{}{}       % from the hyperref package
549 \pdfstringdef{}{}        % from the hyperref package
550 \poptabs
551 \prefacename
552 \printindex
553 \protect
554 \providecommand{}[][]{}
555 \providecommand*{}[][]{}
556 \ps
557 \psfrag{}[][][][]{translate}
558 \psfrag*{}[][][][]{translate}
559 \pushtabs
560 % \put(,){}     %picture
561 \putbib[]
562 % \qbezier[](,)(,)(,)     %picture
563 \r{}
564 \raggedbottom
565 \raggedleft
566 \raggedright
567 \raisebox{}[][]{translate}
568 \reflectbox{translate}
569 \refname
570 \refstepcounter{}
571 \renewcommand{}[][]{}
572 \renewcommand*{}[][]{}
573 % \renewcommand{}[]{}   %reLyX doesn't care about variants
574 \renewenvironment{}[][]{}{}
575 \renewenvironment*{}[][]{}{}
576 % \renewenvironment{}[]{}{}
577 \resizebox{}{}{translate}
578 \resizebox*{}{}{translate}
579 \reversemarginpar
580 \rmdefault
581 \Roman{}
582 \roman{}
583 \rotatebox{}{translate}
584 \rule[]{}{}
585 \samepage
586 \savebox{}[][]{}
587 % \savebox{}(,)[]{}   %picture
588 \sbox{}{}
589 \scalebox{}[]{translate}
590 \scdefault
591 \section[]{}
592 \section*{}
593 \see
594 \seename
595 \selectfont
596 \selectlanguage{}
597 \setboolean{}{}
598 \setcounter{}{}
599 \setlength{}{}
600 \settime{}
601 \settodepth{}{}
602 \settoheight{}{}
603 \settowidth{}{}
604 \sfdefault
605 \shortstack[]{translate}
606 \showhyphens{}
607 \signature{}
608 \sldefault
609 \sloppy
610 \stepcounter{}
611 \stretch{}
612 %\subitem{}   % unsupported theindex environment
613 \subjectname
614 \subfigure[]{translate}
615 \subparagraph[]{}  % These "sub" versions of the sectioning commands weren't
616 \subparagraph*{}   % in the original commandlist for some reason (adk)
617 \subsection[]{}    %
618 \subsection*{}     %
619 \subsubsection[]{} %
620 \subsubsection*{}  %
621 %\subsubitem{}   % unsupported theindex environment
622 \suppressfloats[]
623 \symbol{}
624 \tablename
625 \tableofcontents
626 \tabularnewline[]
627 \telephone{translate}
628 \texorpdfstring{}{}      % from the hyperref package
629 \textcircled{translate}
630 \textcolor[]{,,}{translate}
631 %\textcolor{}{}      % reLyX doesn't care about this version
632 \textnormal{translate}
633 \textfraction
634 \thanks{translate}
635 \thicklines
636 \thinlines
637 \thispagestyle{}
638 \title{}
639 \today
640 \topfigrule
641 \topfraction
642 \ttdefault
643 \twocolumn[]
644 \updefault
645 \usebox{}
646 \usecounter{}
647 \usefont{}{}{}{}
648 \usepackage[]{}[]
649 \value{}
650 % \vector(,){}   %picture
651 % \verb||     % reLyX needs \verb to be hardcoded
652 % \verb*||
653 \visible
654 \vline
655 \vspace{}
656 \vspace*{}
657 \whiledo{}{}
658
659
660 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
661 % There are some environments which reLyX doesn't have an equivalent for.
662 % However, *within* that environment, simple translatable LaTeX appears.
663 % (E.g., this doesn't include something like "picture" because the TeX
664 % parser can't (yet?) understand the parentheses as being delimiters of
665 % coordinates rather than plain text.)
666 %    The environment names are placed in a "reLyXre" environment.
667 %    There aren't very many of these; the idea is that the user can add
668 % user-defined environments in personal syntax files
669
670 \begin{reLyXre}
671 % filecontents can only appear before \documentclass command, so not worth it
672 fussypar
673 sloppypar
674 % slide only appears in the slides class, but if we don't put this in, then
675 % the whole document will be copied in TeX mode!
676 slide
677 titlepage
678 \end{reLyXre}
679
680 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
681 % Keep bugging AndrĂ© until he adds 'support' for these in mathed,
682 % meaning that they can be removed from here.
683
684 \begin{reLyXmt}
685 \sb    {_}
686 \sp    {^}
687 \ensuremath   {}  % If it's in math mode, \ensuremath is unnec.
688 \end{reLyXmt}
689
690
691 % LaTeX environments.
692 % They have always one extra "argument":
693 % It contains "translate" if the contents of the environment contains normal
694 % LaTeX code that can be translated to LyX.
695 \begin{environments}
696 bibunit[]{translate}
697 psmatrix[]{}
698 thebibliography{}
699 \end{environments}
700
701 % Environments that start math mode.
702 % $...$, $$...$$, \(...\) and \[...\] are hardcoded in tex2lyx.
703 % The arguments are currently ignored.
704 \begin{mathenvironments}
705 equation
706 equation*
707 eqnarray
708 eqnarray*
709 align
710 align*
711 gather
712 gather*
713 multline
714 multline*
715 math
716 displaymath
717 flalign
718 flalign
719 % These require extra args
720 alignat
721 alignat*
722 xalignat
723 xalignat*
724 xxalignat
725 % These are not known by LyX but work nevertheless:
726 empheq
727 \end{mathenvironments}