]> git.lyx.org Git - lyx.git/blob - lib/syntax.default
ANNOUNCE updates.
[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 \mintinline[,]{}
146 \multicolumn{}{}{}
147 \newline
148 \noindent
149 \normalsize
150 \noun{}    % LyX style for nouns (appears in lyx-generated files)
151 \pageref{}
152 \psfig{}
153 \ref{}
154 \rm
155 \sc
156 \sf
157 \sl
158 \t{ }
159 \textmd{}   % I had to add these (adk)
160 \textbf{}   %         :
161 \textrm{}   %         :
162 \textsf{}   %         :
163 \texttt{}   %         :
164 \textup{}   %         :
165 \textit{}   %         :
166 \textsl{}   %         :
167 \textsc{}   %         :
168 \textbar
169 \textbackslash
170 \textgreater
171 \textless
172 \scriptsize
173 \small
174 \tiny
175 \tt
176 \u{}
177 \underbar{}  % LyX generated files use underbar instead of underline
178 \underline{}
179 \v{}
180
181
182
183 % Units of measure.  These get used only within the arguments of
184 % commands that take some length quantity.
185
186 \depth
187 \fill
188 \height
189 \totalheight
190 \width
191
192 %
193 % Length variables
194 %
195
196 \abovedisplay
197 \abovedisplayshortskip
198 \arraycolsep
199 \arrayrulewidth
200 \arraystretch
201 \baselineskip
202 \baselinestretch
203 \belowdisplayskip
204 \belowdisplayshortskip
205 \bigskipamount
206 \columnsep
207 \columnseprule
208 \dblfloatsep
209 \dbltextfloatsep
210 \doublerulesep
211 \evensidemargin
212 \fboxrule
213 \fboxsep
214 \floatsep
215 \footnotesep
216 \footskip
217 \headheight
218 \headsep
219 \hoffset
220 \intextsep
221 \itemindent
222 \itemsep
223 \jot
224 \labelsep
225 \labelwidth
226 \leftmargin
227 \leftmargini
228 \leftmarginii
229 \leftmarginiii
230 \leftmarginiv
231 \leftmarginv
232 \leftmarginvi
233 \listparindent
234 \marginpush
235 \marginparsep
236 \marginparwidth
237 \mathindent
238 \medskipamount
239 \oddsidemargin
240 \paperheight
241 \paperwidth
242 \parindent
243 \parsep
244 \parskip
245 \partopsep
246 \rightmargin
247 \smallskipamount
248 \tabbingsep
249 \tabcolsep
250 \textfloatsep
251 \textheight
252 \textwidth
253 \topmargin
254 \topsep
255 \topskip
256 \unitlength
257 \voffset
258
259 %
260 % Commands that act like single characters and insert something.  This
261 % excludes the commands that place accents on characters, since they
262 % require arguments, whereas these don't.  Also excluded are commands
263 % that insert a specified amount of space [again, that requires
264 % arguments] and those that insert lists, since a list isn't a single
265 % object.
266 %
267
268 \ % A "\" followed by a space.
269 \,
270 \/
271 \AA
272 \aa
273 \AE
274 \ae
275 \bigskip
276 \copyright
277 \dag
278 \ddag
279 \DH
280 \dh
281 \DJ
282 \dj
283 \dotfill
284 \dots
285 \guillemotleft
286 \guillemotright
287 \guilsinglleft
288 \guilsinglright
289 \hrulefill
290 \lq
291 \medskip
292 \NG
293 \ng
294 \O
295 \o
296 \OE
297 \oe
298 \P
299 \pounds
300 \quad
301 \qquad
302 \quotedblbase
303 \quotesinglebase
304 \rq
305 \S
306 \SS
307 \smallskip
308 \ss
309 \textbullet
310 \textemdash
311 \textendash
312 \textexclamdown
313 \textperiodcenter
314 \textquestiondown
315 \textquotedblleft
316 \textquotedblright
317 \textquoteleft
318 \textquoteright
319 \textvisiblespace
320 \textcompwordmark
321 \textquotedbl
322 \TH
323 \th
324 \thechapter
325 \theenumi
326 \theenumii
327 \theenumiii
328 \theenumiv
329 \theequation
330 \thefigure
331 \thefootnote
332 \thempfootnote
333 \thepage
334 \theparagraph
335 \thepart
336 \thesection
337 \thesubsection
338 \thesubsubsection
339 \thesubparagraph
340 \thetable
341 \vfill
342
343
344 %
345 % The LaTeX commands.  As per Alejandro's request, I've omitted all of
346 % the math commands he appears to support in Mathed.  I'm also
347 % omitting commands used primarily for defining new class and style
348 % files. (jpw)
349 %
350 % For some reason, John didn't write {} after \" and some of the other
351 %    accent commands (adk)
352 % He also didn't include the \textsc{} equivalent to {\sc}
353 % Because any commands with arguments in parentheses (rather than braces or
354 %    brackets) appear in a picture environment, which reLyX doesn't support,
355 %    we can comment those out.
356 %
357 % These are the commands you're mostly likely to want to redefine in your own
358 % syntax files
359 %
360 % Arguments whose text is "translate" will have regular LaTeX in them (as
361 % opposed to commands with special syntax) which should be translated by
362 % tex2lyx like regular LaTeX. \mbox{} is an obvious example. LyX doesn't
363 % support it, but only the "\mbox{" and the "}" need to be in TeX mode.
364 % "translate" should be specified for as many arguments aspossible.
365 % Besides the better on-screen display of the contents (a math inset looks
366 % better than a formula in ERT), it enables LyX to apply some fixes to LaTeX
367 % limitations: For example, footnotes in section headings do not work in
368 % LaTeX, but LyX produces preamble code to fix that. Of course this works only
369 % for footnote insets and not for footnotes in ERT. Example:
370 % \section{title \texorpdfstring{\footnote{foo}}{bar}}
371 % is some code that may occur in a .tex file created by LyX. The re-import
372 % works only because the first argument of \texorpdfstring is specified as
373 % translatable in this file.
374 % If a command puts the contents of an argument inside an own group, use
375 % "group" instead of "translate". Otherwise things like font changes would
376 % survive the end of the group in LyX (bug 3036).
377
378 \abstractname
379 \Acrobatmenu{}{}         % from the hyperref package
380 \addcontentsline{}{}{translate}
381 \address{}
382 \addtime{}
383 \addtocontents{}{translate}  % one argument was missing here (JMarc)
384 \addtocounter{}{}
385 \addtolength{}{}
386 \addvspace{}
387 \Alph{}
388 \alph{}
389 \alsoname
390 \and
391 \appendix % had to add this -Ak
392 \appendixname
393 \arabic{}
394 \author{}
395 \backmatter
396 %\bezier{}(,)(,)(,)    % picture
397 \bfdefault
398 \bibliographyunit[]
399 \bibname
400 \botfigrule
401 \bottomfraction
402 \caption[]{}
403 \cc{}
404 \ce{}
405 \cf{}
406 \ccname
407 \cellcolor[]{}
408 \centering
409 \centerline{translate}
410 \chapter[]{}
411 \chapter*{}
412 \chaptername
413 \check{}
414 \CheckCommand{}[][]{}
415 \CheckCommand*{}[][]{}
416 \CheckCommandx{}[][]{} % xargs.sty
417 \CheckCommandx*{}[][]{} % xargs.sty
418 %\circle{}    % picture environment (JMarc)
419 %\circle*{}
420 \cleardoublepage
421 \clearpage
422 \closing{}
423 \color[]{}  % Two variants of this command and the next (jpw)
424 %\color{}
425 \colorspec[]{}{}
426 %\colorspec{}{}
427 \columncolor[]{}
428 %\contentsline{}{\numberline{}  }{}     % Appears only in .toc file (JMarc)
429 \contentsname
430 %\dashbox{}(,)[]{}   %picture
431 \date{}
432 \dblfigrule
433 \dblfloatpagefraction
434 \dbltopfraction
435 \DeclareRobustCommand{}[][]{}
436 \DeclareRobustCommand*{}[][]{}
437 \DeclareRobustCommandx{}[][]{} % xargs.sty
438 \DeclareRobustCommandx*{}[][]{} % xargs.sty
439 \def{}{}
440 \definecolor{}{}{}
441 \DeleteShortVerb{} % from doc.sty, argument must be verbatim
442 \DescribeMacro{}
443 \discretionary{}{}{}
444 \encl{}
445 \enclname
446 \enlargethispage{}
447 \enlargethispage*{}
448 \ensuremath{}
449 \extracolsep{}
450 \fbox{translate}
451 \fcolorbox[]{}{}{}  % Two variants of this command
452 %\fcolorbox{}{}{}
453 \figurename
454 \floatpagefraction
455 \flushbottom
456 \fnsymbol{}
457 \fontfamily{}
458 \fontseries{}
459 \fontshape{}
460 \fontsize{}{}
461 \footnotemark[]
462 \footnoterule
463 \footnotetext[]{translate}
464 % LaTeX has \frame{}, but beamer has \frame[]{}, so use the latter
465 \frame[]{translate}
466 \framebox[][]{translate} % Two variants of this command
467 %\framebox(,)[]{}    %  picture variant
468 \frenchspacing
469 \frontmatter
470 \fussy
471 \glossary{translate}
472 \glossaryentry{}{}       %only in .glo file (JMarc)
473 % \graphpaper[](,)(,)    %picture
474 \headtoname
475 \href{}{translate}       % from the hyperref package
476 \hspace{}
477 \hspace*{}
478 \hyperdef{}{}{translate} % from the hyperref package
479 \hyperlink{}{translate}  % from the hyperref package
480 \hyperref{}{}{translate} % from the hyperref package
481 \hypertarget{}{translate} % from the hyperref package
482 \hyphenation{}
483 \iflanguage{}{}{}
484 \ifthenelse
485 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
486 \indent
487 \index{translate}
488 \indexentry{}{}        % only in .idx files (JMarc)
489 \indexname
490 \indexspace
491 \invisible
492 \itdefault
493 % This variant of \item might break reLyX!
494 %  \item{}   % Only appears in unsupported theindex environment
495 \k{}
496 \kill
497 \labelnumi
498 \labelnumii
499 \labelnumiii
500 \labelnumiv
501 \labelitemi
502 \labelitemii
503 \labelitemiii
504 \labelitemiv
505 \language{}
506 % We need this because the arguments must not be interpreted
507 \let{item}{item}
508 % \line(,){}    %picture
509 \linebreak[]
510 \linethickness{}
511 \listfigurename
512 \listofalgorithms %AMStex?
513 \listoffigures
514 \listoftables
515 \listtablename
516 \location{}
517 \mainmatter
518 \makebox[][]{translate}
519 %  \makebox(,)[]{}     %picture variant
520 \makeglossary
521 \makeindex
522 \makelabel{translate}
523 \makelabels
524 \maketitle
525 \MakeShortVerb{} % from doc.sty, argument must be verbatim
526 \markboth{group}{group}
527 \markright{group}
528 \mathversion{}
529 \mbox{translate}
530 \mddefault
531 % \multiput(,)(,){}{}     %picture
532 \name{}
533 \newboolean{}
534 \newcommand{}[][]{}
535 \newcommand*{}[][]{}
536 \newcommandx{}[][]{} % xargs.sty
537 \newcommandx∗{}[][]{} % xargs.sty
538 \newcounter{}[]
539 \newenvironment{}[][]{}{}
540 \newenvironment*{}[][]{}{}
541 \newenvironmentx{}[][]{}{} % xargs.sty
542 \newenvironmentx*{}[][]{}{} % xargs.sty
543 \newfont{}{ scaled }
544 \newlength{}
545 \newpage
546 \newsavebox{}
547 \newtheorem{}[]{translate}[]
548 \nocite{}
549 \nocorr
550 \nolinebreak[]
551 \nonfrenchspacing
552 \nopagebreak[]
553 \normalcolor
554 \normalfont
555 \normalmarginpar
556 \notesname
557 \numberline{}{}
558 \onecolumn
559 \onlynotes{}
560 \onlyslides{}
561 \opening{}
562 % \oval(,)[]   %picture
563 \pagebreak[]
564 \pagecolor[]{}
565 % \pagecolor{}    % tex2lyx can first care about this when fileformat 351 is supported
566 \pagename
567 \pagenumbering{}
568 \par
569 \paragraph[]{}
570 \paragraph*{}
571 %\parbox[]{}{}            % reLyX treats next line same as this one (adk)
572 \parbox[][][]{}{translate}
573 \part[]{}
574 \part*{}
575 \partname
576 \pdfbookmark[]{}{}       % from the hyperref package
577 \pdfstringdef{}{}        % from the hyperref package
578 \poptabs
579 \prefacename
580 \printindex[]{}
581 \protect
582 \providecommand{}[][]{}
583 \providecommand*{}[][]{}
584 \providecommandx{}[][]{} % xargs.sty
585 \providecommandx*{}[][]{} % xargs.sty
586 \ps
587 \psfrag{}[][][][]{translate}
588 \psfrag*{}[][][][]{translate}
589 \pushtabs
590 % \put(,){}     %picture
591 \putbib[]
592 % \qbezier[](,)(,)(,)     %picture
593 \r{}
594 \raggedbottom
595 \raggedleft
596 \raggedright
597 \raisebox{}[][]{translate}
598 \reflectbox{translate}
599 \refname
600 \refstepcounter{}
601 \renewcommand{}[][]{}
602 \renewcommand*{}[][]{}
603 \renewcommandx{}[][]{} % xargs.sty
604 \renewcommandx∗{}[][]{} % xargs.sty
605 \renewenvironment{}[][]{}{}
606 \renewenvironment*{}[][]{}{}
607 %\renewenvironment{}[]{}{}
608 \renewenvironmentx{}[][]{}{} % xargs.sty
609 \renewenvironmentx*{}[][]{}{} % xargs.sty
610 \resizebox{}{}{translate}
611 \resizebox*{}{}{translate}
612 \reversemarginpar
613 \rmdefault
614 \Roman{}
615 \roman{}
616 \rotatebox[]{}{translate}
617 \rowcolor[]{}
618 \rule[]{}{}
619 \samepage
620 \savebox{}[][]{}
621 % \savebox{}(,)[]{}   %picture
622 \sbox{}{}
623 \scalebox{}[]{translate}
624 \scdefault
625 \section[]{}
626 \section*{}
627 \see
628 \seename
629 \selectfont
630 \selectlanguage{}
631 \setboolean{}{}
632 \setcounter{}{}
633 \setlength{}{}
634 \settime{}
635 \settodepth{}{}
636 \settoheight{}{}
637 \settowidth{}{}
638 \sfdefault
639 \shortstack[]{translate}
640 \showhyphens{}
641 \signature{}
642 \sindex[]{translate} %splitidx.sty
643 \sldefault
644 \sloppy
645 \stepcounter{}
646 \stretch{}
647 %\subitem{}   % unsupported theindex environment
648 \subcaption[translate]{translate}
649 \subcaptionbox[translate]{translate}[][]{translate} % subcaption.sty
650 \subcaptionbox*{translate}[][]{translate} % subcaption.sty
651 \subjectname
652 \subfigure[translate][translate]{translate} % obsolete subfigure.sty
653 \subparagraph[]{}  % These "sub" versions of the sectioning commands weren't
654 \subparagraph*{}   % in the original commandlist for some reason (adk)
655 \subref{} % subcaption.sty
656 \subref*{} % subcaption.sty
657 \subsection[]{}    %
658 \subsection*{}     %
659 \subsubsection[]{} %
660 \subsubsection*{}  %
661 %\subsubitem{}   % unsupported theindex environment
662 \subtable[translate][translate]{translate} % obsolete subfigure.sty
663 \suppressfloats[]
664 \symbol{}
665 \tablename
666 \tableofcontents
667 \tabularnewline[]
668 \telephone{translate}
669 \texorpdfstring{translate}{translate} % from the hyperref package
670 \textcircled{translate}
671 \textcolor[]{}{translate}
672 %\textcolor{}{}
673 \textbf{translate}     % hardcoded, but needed nevertheless for \let\xyz\textbf
674 \textnormal{translate} % hardcoded, but needed nevertheless for \let\xyz\textnormal
675 \textmd{translate}     % hardcoded, but needed nevertheless for \let\xyz\textmd
676 \textit{translate}     % hardcoded, but needed nevertheless for \let\xyz\textit
677 \textrm{translate}     % hardcoded, but needed nevertheless for \let\xyz\textrm
678 \textsc{translate}     % hardcoded, but needed nevertheless for \let\xyz\textsc
679 \textsf{translate}     % hardcoded, but needed nevertheless for \let\xyz\textsf
680 \textsl{translate}     % hardcoded, but needed nevertheless for \let\xyz\textsl
681 \texttt{translate}     % hardcoded, but needed nevertheless for \let\xyz\texttt
682 \textup{translate}     % hardcoded, but needed nevertheless for \let\xyz\textup
683 \textfraction
684 \thanks{translate}
685 \thicklines
686 \thinlines
687 \thispagestyle{}
688 \title{}
689 \today
690 \topfigrule
691 \topfraction
692 \ttdefault
693 \twocolumn[]
694 \updefault
695 \usebox{}
696 \usecounter{}
697 \usefont{}{}{}{}
698 \usepackage[]{}[]
699 \value{}
700 % \vector(,){}   %picture
701 % \verb||     % tex2lyx fails on \verb, see http://www.lyx.org/trac/ticket/4468 and http://www.lyx.org/trac/ticket/5408
702 % \verb*||
703 \visible
704 \vline
705 \vspace{}
706 \vspace*{}
707 \whiledo{}{}
708
709 % LaTeX environments.
710 % They have always one extra "argument":
711 % It contains "translate" if the contents of the environment contains normal
712 % LaTeX code that can be translated to LyX.
713 \begin{environments}
714 bibunit[]{translate}
715 listing{} % minted.sty
716 minted{} % minted.sty
717 psmatrix[]{}
718 subfigure[]{translate} % subcaption.sty
719 subtable[]{translate} % subcaption.sty
720 theorem[]{translate} % from amsthm.sty and probably others
721 thebibliography{}
722 tikzpicture[]{}
723 \end{environments}
724
725 % Environments that start math mode.
726 % $...$, $$...$$, \(...\) and \[...\] are hardcoded in tex2lyx.
727 % The arguments are currently ignored (apart from displaymath).
728 \begin{mathenvironments}
729 equation{displaymath}
730 equation*{displaymath}
731 eqnarray{displaymath}
732 eqnarray*{displaymath}
733 align{displaymath}
734 align*{displaymath}
735 gather{displaymath}
736 gather*{displaymath}
737 multline{displaymath}
738 multline*{displaymath}
739 math{}
740 displaymath{displaymath}
741 flalign{displaymath}
742 flalign*{displaymath}
743 % These require extra args
744 alignat{}{displaymath}
745 alignat*{displaymath}
746 xalignat{}{displaymath}
747 xalignat*{}{displaymath}
748 xxalignat{}{displaymath}
749 % These are not known by LyX but work nevertheless:
750 empheq[]{}{displaymath}
751 \end{mathenvironments}
752
753 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
754 % Sweave stuff
755 \Sexpr{}
756 \SweaveOpts{}
757 \SweaveInput{}
758 \SweaveSyntax{}
759 \Scoderef{}
760
761 \Rcode{}
762 \Robject{}
763 \Rcommand{}
764 \Rfunction{}
765 \Rfunarg{}
766 \Rpackage{}
767 \Rclass{}
768 \Rmethod{}