]> git.lyx.org Git - lyx.git/blob - lib/syntax.default
Merge remote-tracking branch 'origin/master' into features/latexargs
[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 originally written by John Weiss
5 % 1997-03-11 for reLyX 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{}[]   %tex2lyx will get confused if \begin is found in this file!
59 %\begin{}[]{} % All of these show the different variations of \begin (jpw)
60 %\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{}   %tex2lyx 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
267 \ % A "\" followed by a space.
268 \,
269 \/
270 \AA
271 \aa
272 \AE
273 \ae
274 \bigskip
275 \copyright
276 \dag
277 \ddag
278 \DH
279 \dh
280 \DJ
281 \dj
282 \dotfill
283 \dots
284 \guillemotleft
285 \guillemotright
286 \guilsinglleft
287 \guilsinglright
288 \hrulefill
289 \lq
290 \medskip
291 \NG
292 \ng
293 \O
294 \o
295 \OE
296 \oe
297 \P
298 \pounds
299 \quad
300 \qquad
301 \quotedblbase
302 \quotesinglebase
303 \rq
304 \S
305 \SS
306 \smallskip
307 \ss
308 \textbullet
309 \textemdash
310 \textendash
311 \textexclamdown
312 \textperiodcenter
313 \textquestiondown
314 \textquotedblleft
315 \textquotedblright
316 \textquoteleft
317 \textquoteright
318 \textvisiblespace
319 \textcompwordmark
320 \textquotedbl
321 \TH
322 \th
323 \thechapter
324 \theenumi
325 \theenumii
326 \theenumiii
327 \theenumiv
328 \theequation
329 \thefigure
330 \thefootnote
331 \thempfootnote
332 \thepage
333 \theparagraph
334 \thepart
335 \thesection
336 \thesubsection
337 \thesubsubsection
338 \thesubparagraph
339 \thetable
340 \vfill
341
342
343 %
344 % The LaTeX commands.  As per Alejandro's request, I've omitted all of
345 % the math commands he appears to support in Mathed.  I'm also
346 % omitting commands used primarily for defining new class and style
347 % files. (jpw)
348 %
349 % For some reason, John didn't write {} after \" and some of the other
350 %    accent commands (adk)
351 % He also didn't include the \textsc{} equivalent to {\sc}
352 % Because any commands with arguments in parentheses (rather than braces or
353 %    brackets) appear in a picture environment, which reLyX doesn't support,
354 %    we can comment those out.
355 %
356 % These are the commands you're mostly likely to want to redefine in your own
357 % syntax files
358 %
359 % Arguments whose text is "translate" will have regular LaTeX in them (as
360 % opposed to commands with special syntax) which should be translated by
361 % tex2lyx like regular LaTeX. \mbox{} is an obvious example. LyX doesn't
362 % support it, but only the "\mbox{" and the "}" need to be in TeX mode.
363 % "translate" should be specified for as many arguments aspossible.
364 % Besides the better on-screen display of the contents (a math inset looks
365 % better than a formula in ERT), it enables LyX to apply some fixes to LaTeX
366 % limitations: For example, footnotes in section headings do not work in
367 % LaTeX, but LyX produces preamble code to fix that. Of course this works only
368 % for footnote insets and not for footnotes in ERT. Example:
369 % \section{title \texorpdfstring{\footnote{foo}}{bar}}
370 % is some code that may occur in a .tex file created by LyX. The re-import
371 % works only because the first argument of \texorpdfstring is specified as
372 % translatable in this file.
373 % If a command puts the contents of an argument inside an own group, use
374 % "group" instead of "translate". Otherwise things like font changes would
375 % survive the end of the group in LyX (bug 3036).
376
377 \abstractname
378 \Acrobatmenu{}{}         % from the hyperref package
379 \addcontentsline{}{}{translate}
380 \address{}
381 \addtime{}
382 \addtocontents{}{translate}  % one argument was missing here (JMarc)
383 \addtocounter{}{}
384 \addtolength{}{}
385 \addvspace{}
386 \Alph{}
387 \alph{}
388 \alsoname
389 \and
390 \appendix % had to add this -Ak
391 \appendixname
392 \arabic{}
393 \author{}
394 \backmatter
395 %\bezier{}(,)(,)(,)    % picture
396 \bfdefault
397 \bibliographyunit[]
398 \bibname
399 \botfigrule
400 \bottomfraction
401 \caption[]{}
402 \cc{}
403 \ce{}
404 \cf{}
405 \ccname
406 \centering
407 \centerline{translate}
408 \chapter[]{}
409 \chapter*{}
410 \chaptername
411 \check{}
412 \CheckCommand{}[][]{}
413 \CheckCommand*{}[][]{}
414 \CheckCommandx{}[][]{} % xargs.sty
415 \CheckCommandx*{}[][]{} % xargs.sty
416 %\circle{}    % picture environment (JMarc)
417 %\circle*{}
418 \cleardoublepage
419 \clearpage
420 \closing{}
421 \color[]{,,}  % Two variants of this command and the next (jpw)
422 %\color{}
423 \colorspec[]{,,}{}
424 %\colorspec{}{}
425 %\contentsline{}{\numberline{}  }{}     % Appears only in .toc file (JMarc)
426 \contentsname
427 %\dashbox{}(,)[]{}   %picture
428 \date{}
429 \dblfigrule
430 \dblfloatpagefraction
431 \dbltopfraction
432 \DeclareRobustCommand{}[][]{}
433 \DeclareRobustCommand*{}[][]{}
434 \DeclareRobustCommandx{}[][]{} % xargs.sty
435 \DeclareRobustCommandx*{}[][]{} % xargs.sty
436 \def{}{}
437 \definecolor{}{}{,,}
438 \DeleteShortVerb{} % from doc.sty, argument must be verbatim
439 \DescribeMacro{}
440 \discretionary{}{}{}
441 \encl{}
442 \enclname
443 \enlargethispage{}
444 \enlargethispage*{}
445 \ensuremath{}
446 \extracolsep{}
447 \fbox{translate}
448 \fcolorbox[]{,,}{,,}{}  % Two variants of this command
449 %\fcolorbox{}{}{}
450 \figurename
451 \floatpagefraction
452 \flushbottom
453 \fnsymbol{}
454 \fontfamily{}
455 \fontseries{}
456 \fontshape{}
457 \fontsize{}{}
458 \footnotemark[]
459 \footnoterule
460 \footnotetext[]{translate}
461 % LaTeX has \frame{}, but beamer has \frame[]{}, so use the latter
462 \frame[]{translate}
463 \framebox[][]{translate} % Two variants of this command
464 %\framebox(,)[]{}    %  picture variant
465 \frenchspacing
466 \frontmatter
467 \fussy
468 \glossary{translate}
469 \glossaryentry{}{}       %only in .glo file (JMarc)
470 % \graphpaper[](,)(,)    %picture
471 \headtoname
472 \href{}{translate}       % from the hyperref package
473 \hspace{}
474 \hspace*{}
475 \hyperdef{}{}{translate} % from the hyperref package
476 \hyperlink{}{translate}  % from the hyperref package
477 \hyperref{}{}{translate} % from the hyperref package
478 \hypertarget{}{translate} % from the hyperref package
479 \hyphenation{}
480 \iflanguage{}{}{}
481 \ifthenelse
482 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
483 \indent
484 \index{translate}
485 \indexentry{}{}        % only in .idx files (JMarc)
486 \indexname
487 \indexspace
488 \invisible
489 \itdefault
490 % This variant of \item might break reLyX!
491 %  \item{}   % Only appears in unsupported theindex environment
492 \k{}
493 \kill
494 \labelnumi
495 \labelnumii
496 \labelnumiii
497 \labelnumiv
498 \labelitemi
499 \labelitemii
500 \labelitemiii
501 \labelitemiv
502 \language{}
503 % We need this because the arguments must not be interpreted
504 \let{item}{item}
505 % \line(,){}    %picture
506 \linebreak[]
507 \linethickness{}
508 \listfigurename
509 \listofalgorithms %AMStex?
510 \listoffigures
511 \listoftables
512 \listtablename
513 \location{}
514 \mainmatter
515 \makebox[][]{translate}
516 %  \makebox(,)[]{}     %picture variant
517 \makeglossary
518 \makeindex
519 \makelabel{translate}
520 \makelabels
521 \maketitle
522 \MakeShortVerb{} % from doc.sty, argument must be verbatim
523 \markboth{group}{group}
524 \markright{group}
525 \mathversion{}
526 \mbox{translate}
527 \mddefault
528 % \multiput(,)(,){}{}     %picture
529 \name{}
530 \newboolean{}
531 \newcommand{}[][]{}
532 \newcommand*{}[][]{}
533 \newcommandx{}[][]{} % xargs.sty
534 \newcommandx∗{}[][]{} % xargs.sty
535 \newcounter{}[]
536 \newenvironment{}[][]{}{}
537 \newenvironment*{}[][]{}{}
538 \newenvironmentx{}[][]{}{} % xargs.sty
539 \newenvironmentx*{}[][]{}{} % xargs.sty
540 \newfont{}{ scaled }
541 \newlength{}
542 \newpage
543 \newsavebox{}
544 \newtheorem{}[]{translate}[]
545 \nocite{}
546 \nocorr
547 \nolinebreak[]
548 \nonfrenchspacing
549 \nopagebreak[]
550 \normalcolor
551 \normalfont
552 \normalmarginpar
553 \notesname
554 \numberline{}{}
555 \onecolumn
556 \onlynotes{}
557 \onlyslides{}
558 \opening{}
559 % \oval(,)[]   %picture
560 \pagebreak[]
561 \pagecolor[]{,,}
562 % \pagecolor{}    % tex2lyx can first care about this when fileformat 351 is supported
563 \pagename
564 \pagenumbering{}
565 \par
566 \paragraph[]{}
567 \paragraph*{}
568 %\parbox[]{}{}            % reLyX treats next line same as this one (adk)
569 \parbox[][][]{}{translate}
570 \part[]{}
571 \part*{}
572 \partname
573 \pdfbookmark[]{}{}       % from the hyperref package
574 \pdfstringdef{}{}        % from the hyperref package
575 \poptabs
576 \prefacename
577 \printindex[]{}
578 \protect
579 \providecommand{}[][]{}
580 \providecommand*{}[][]{}
581 \providecommandx{}[][]{} % xargs.sty
582 \providecommandx*{}[][]{} % xargs.sty
583 \ps
584 \psfrag{}[][][][]{translate}
585 \psfrag*{}[][][][]{translate}
586 \pushtabs
587 % \put(,){}     %picture
588 \putbib[]
589 % \qbezier[](,)(,)(,)     %picture
590 \r{}
591 \raggedbottom
592 \raggedleft
593 \raggedright
594 \raisebox{}[][]{translate}
595 \reflectbox{translate}
596 \refname
597 \refstepcounter{}
598 \renewcommand{}[][]{}
599 \renewcommand*{}[][]{}
600 \renewcommandx{}[][]{} % xargs.sty
601 \renewcommandx∗{}[][]{} % xargs.sty
602 \renewenvironment{}[][]{}{}
603 \renewenvironment*{}[][]{}{}
604 %\renewenvironment{}[]{}{}
605 \renewenvironmentx{}[][]{}{} % xargs.sty
606 \renewenvironmentx*{}[][]{}{} % xargs.sty
607 \resizebox{}{}{translate}
608 \resizebox*{}{}{translate}
609 \reversemarginpar
610 \rmdefault
611 \Roman{}
612 \roman{}
613 \rotatebox{}{translate}
614 \rule[]{}{}
615 \samepage
616 \savebox{}[][]{}
617 % \savebox{}(,)[]{}   %picture
618 \sbox{}{}
619 \scalebox{}[]{translate}
620 \scdefault
621 \section[]{}
622 \section*{}
623 \see
624 \seename
625 \selectfont
626 \selectlanguage{}
627 \setboolean{}{}
628 \setcounter{}{}
629 \setlength{}{}
630 \settime{}
631 \settodepth{}{}
632 \settoheight{}{}
633 \settowidth{}{}
634 \sfdefault
635 \shortstack[]{translate}
636 \showhyphens{}
637 \signature{}
638 \sindex[]{translate} %splitidx.sty
639 \sldefault
640 \sloppy
641 \stepcounter{}
642 \stretch{}
643 %\subitem{}   % unsupported theindex environment
644 \subjectname
645 \subfigure[]{translate}
646 \subparagraph[]{}  % These "sub" versions of the sectioning commands weren't
647 \subparagraph*{}   % in the original commandlist for some reason (adk)
648 \subsection[]{}    %
649 \subsection*{}     %
650 \subsubsection[]{} %
651 \subsubsection*{}  %
652 %\subsubitem{}   % unsupported theindex environment
653 \suppressfloats[]
654 \symbol{}
655 \tablename
656 \tableofcontents
657 \tabularnewline[]
658 \telephone{translate}
659 \texorpdfstring{translate}{translate} % from the hyperref package
660 \textcircled{translate}
661 \textcolor[]{,,}{translate}
662 %\textcolor{}{}
663 \textbf{translate}     % hardcoded, but needed nevertheless for \let\xyz\textbf
664 \textnormal{translate} % hardcoded, but needed nevertheless for \let\xyz\textnormal
665 \textmd{translate}     % hardcoded, but needed nevertheless for \let\xyz\textmd
666 \textit{translate}     % hardcoded, but needed nevertheless for \let\xyz\textit
667 \textrm{translate}     % hardcoded, but needed nevertheless for \let\xyz\textrm
668 \textsc{translate}     % hardcoded, but needed nevertheless for \let\xyz\textsc
669 \textsf{translate}     % hardcoded, but needed nevertheless for \let\xyz\textsf
670 \textsl{translate}     % hardcoded, but needed nevertheless for \let\xyz\textsl
671 \texttt{translate}     % hardcoded, but needed nevertheless for \let\xyz\texttt
672 \textup{translate}     % hardcoded, but needed nevertheless for \let\xyz\textup
673 \textfraction
674 \thanks{translate}
675 \thicklines
676 \thinlines
677 \thispagestyle{}
678 \title{}
679 \today
680 \topfigrule
681 \topfraction
682 \ttdefault
683 \twocolumn[]
684 \updefault
685 \usebox{}
686 \usecounter{}
687 \usefont{}{}{}{}
688 \usepackage[]{}[]
689 \value{}
690 % \vector(,){}   %picture
691 % \verb||     % tex2lyx fails on \verb, see http://www.lyx.org/trac/ticket/4468 and http://www.lyx.org/trac/ticket/5408
692 % \verb*||
693 \visible
694 \vline
695 \vspace{}
696 \vspace*{}
697 \whiledo{}{}
698 \xymatrix{} % this is basically an array => the contents would be parsed badly (bug 8396)
699
700 % LaTeX environments.
701 % They have always one extra "argument":
702 % It contains "translate" if the contents of the environment contains normal
703 % LaTeX code that can be translated to LyX.
704 \begin{environments}
705 bibunit[]{translate}
706 psmatrix[]{}
707 theorem[]{translate} % from amsthm.sty and probably others
708 thebibliography{}
709 \end{environments}
710
711 % Environments that start math mode.
712 % $...$, $$...$$, \(...\) and \[...\] are hardcoded in tex2lyx.
713 % The arguments are currently ignored (apart from displaymath).
714 \begin{mathenvironments}
715 equation{displaymath}
716 equation*{displaymath}
717 eqnarray{displaymath}
718 eqnarray*{displaymath}
719 align{displaymath}
720 align*{displaymath}
721 gather{displaymath}
722 gather*{displaymath}
723 multline{displaymath}
724 multline*{displaymath}
725 math{}
726 displaymath{displaymath}
727 flalign{displaymath}
728 flalign{displaymath}
729 % These require extra args
730 alignat{}{displaymath}
731 alignat*{displaymath}
732 xalignat{}{displaymath}
733 xalignat*{}{displaymath}
734 xxalignat{}{displaymath}
735 % These are not known by LyX but work nevertheless:
736 empheq[]{}{displaymath}
737 \end{mathenvironments}
738
739 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
740 % Sweave stuff
741 \Sexpr{}
742 \SweaveOpts{}
743 \SweaveInput{}
744 \SweaveSyntax{}
745 \Scoderef{}
746
747 \Rcode{}
748 \Robject{}
749 \Rcommand{}
750 \Rfunction{}
751 \Rfunarg{}
752 \Rpackage{}
753 \Rclass{}
754 \Rmethod{}