]> git.lyx.org Git - lyx.git/blob - lib/syntax.default
The roundtrip of the math manual produces a compilable document now:
[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
374 \abstractname
375 \Acrobatmenu{}{}         % from the hyperref package
376 \addcontentsline{}{}{translate}
377 \address{}
378 \addtime{}
379 \addtocontents{}{translate}  % one argument was missing here (JMarc)
380 \addtocounter{}{}
381 \addtolength{}{}
382 \addvspace{}
383 \Alph{}
384 \alph{}
385 \alsoname
386 \and
387 \appendix % had to add this -Ak
388 \appendixname
389 \arabic{}
390 \author{}
391 \backmatter
392 %\bezier{}(,)(,)(,)    % picture
393 \bfdefault
394 \bibliographyunit[]
395 \bibname
396 \botfigrule
397 \bottomfraction
398 \caption[]{}
399 \cc{}
400 \ccname
401 \centering
402 \centerline{translate}
403 \chapter[]{}
404 \chapter*{}
405 \chaptername
406 \check{}
407 \CheckCommand{}[][]{}
408 \CheckCommand*{}[][]{}
409 \CheckCommandx{}[][]{} % xargs.sty
410 \CheckCommandx*{}[][]{} % xargs.sty
411 %\circle{}    % picture environment (JMarc)
412 %\circle*{}
413 \cleardoublepage
414 \clearpage
415 \closing{}
416 \color[]{,,}  % Two variants of this command and the next (jpw)
417 %\color{}
418 \colorspec[]{,,}{}
419 %\colorspec{}{}
420 %\contentsline{}{\numberline{}  }{}     % Appears only in .toc file (JMarc)
421 \contentsname
422 %\dashbox{}(,)[]{}   %picture
423 \date{}
424 \dblfigrule
425 \dblfloatpagefraction
426 \dbltopfraction
427 \DeclareRobustCommand{}[][]{}
428 \DeclareRobustCommand*{}[][]{}
429 \DeclareRobustCommandx{}[][]{} % xargs.sty
430 \DeclareRobustCommandx*{}[][]{} % xargs.sty
431 \def{}{}
432 \definecolor{}{}{,,}
433 \DeleteShortVerb{} % from doc.sty, argument must be verbatim
434 \DescribeMacro{}
435 \discretionary{}{}{}
436 \encl{}
437 \enclname
438 \enlargethispage{}
439 \enlargethispage*{}
440 \ensuremath{}
441 \extracolsep{}
442 \fbox{translate}
443 \fcolorbox[]{,,}{,,}{}  % Two variants of this command
444 %\fcolorbox{}{}{}
445 \figurename
446 \floatpagefraction
447 \flushbottom
448 \fnsymbol{}
449 \fontfamily{}
450 \fontseries{}
451 \fontshape{}
452 \fontsize{}{}
453 \footnotemark[]
454 \footnoterule
455 \footnotetext[]{translate}
456 % LaTeX has \frame{}, but beamer has \frame[]{}, so use the latter
457 \frame[]{translate}
458 \framebox[][]{translate} % Two variants of this command
459 %\framebox(,)[]{}    %  picture variant
460 \frenchspacing
461 \frontmatter
462 \fussy
463 \glossary{translate}
464 \glossaryentry{}{}       %only in .glo file (JMarc)
465 % \graphpaper[](,)(,)    %picture
466 \headtoname
467 \href{}{translate}       % from the hyperref package
468 \hspace{}
469 \hspace*{}
470 \hyperdef{}{}{translate} % from the hyperref package
471 \hyperlink{}{translate}  % from the hyperref package
472 \hyperref{}{}{translate} % from the hyperref package
473 \hypertarget{}{translate} % from the hyperref package
474 \hyphenation{}
475 \iflanguage{}{}{}
476 \ifthenelse
477 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
478 \indent
479 \index{}
480 \indexentry{}{}        % only in .idx files (JMarc)
481 \indexname
482 \indexspace
483 \invisible
484 \itdefault
485 % This variant of \item might break reLyX!
486 %  \item{}   % Only appears in unsupported theindex environment
487 \k{}
488 \kill
489 \labelnumi
490 \labelnumii
491 \labelnumiii
492 \labelnumiv
493 \labelitemi
494 \labelitemii
495 \labelitemiii
496 \labelitemiv
497 \language{}
498 % We need this because the arguments must not be interpreted
499 \let{item}{item}
500 % \line(,){}    %picture
501 \linebreak[]
502 \linethickness{}
503 \listfigurename
504 \listofalgorithms %AMStex?
505 \listoffigures
506 \listoftables
507 \listtablename
508 \location{}
509 \mainmatter
510 \makebox[][]{translate}
511 %  \makebox(,)[]{}     %picture variant
512 \makeglossary
513 \makeindex
514 \makelabel{translate}
515 \makelabels
516 \maketitle
517 \MakeShortVerb{} % from doc.sty, argument must be verbatim
518 \markboth{}{translate}
519 \markright{translate}
520 \mathversion{}
521 \mbox{translate}
522 \mddefault
523 % \multiput(,)(,){}{}     %picture
524 \name{}
525 \newboolean{}
526 \newcommand{}[][]{}
527 \newcommand*{}[][]{}
528 \newcommandx{}[][]{} % xargs.sty
529 \newcommandx∗{}[][]{} % xargs.sty
530 \newcounter{}[]
531 \newenvironment{}[][]{}{}
532 \newenvironment*{}[][]{}{}
533 \newenvironmentx{}[][]{}{} % xargs.sty
534 \newenvironmentx*{}[][]{}{} % xargs.sty
535 \newfont{}{ scaled }
536 \newlength{}
537 \newpage
538 \newsavebox{}
539 \newtheorem{}[]{translate}[]
540 \nocite{}
541 \nocorr
542 \nolinebreak[]
543 \nonfrenchspacing
544 \nopagebreak[]
545 \normalcolor
546 \normalfont
547 \normalmarginpar
548 \notesname
549 \numberline{}{}
550 \onecolumn
551 \onlynotes{}
552 \onlyslides{}
553 \opening{}
554 % \oval(,)[]   %picture
555 \pagebreak[]
556 \pagecolor[]{,,}
557 % \pagecolor{}    % tex2lyx can first care about this when fileformat 351 is supported
558 \pagename
559 \pagenumbering{}
560 \par
561 \paragraph[]{}
562 \paragraph*{}
563 %\parbox[]{}{}            % reLyX treats next line same as this one (adk)
564 \parbox[][][]{}{translate}
565 \part[]{}
566 \part*{}
567 \partname
568 \pdfbookmark[]{}{}       % from the hyperref package
569 \pdfstringdef{}{}        % from the hyperref package
570 \poptabs
571 \prefacename
572 \printindex
573 \protect
574 \providecommand{}[][]{}
575 \providecommand*{}[][]{}
576 \providecommandx{}[][]{} % xargs.sty
577 \providecommandx*{}[][]{} % xargs.sty
578 \ps
579 \psfrag{}[][][][]{translate}
580 \psfrag*{}[][][][]{translate}
581 \pushtabs
582 % \put(,){}     %picture
583 \putbib[]
584 % \qbezier[](,)(,)(,)     %picture
585 \r{}
586 \raggedbottom
587 \raggedleft
588 \raggedright
589 \raisebox{}[][]{translate}
590 \reflectbox{translate}
591 \refname
592 \refstepcounter{}
593 \renewcommand{}[][]{}
594 \renewcommand*{}[][]{}
595 \renewcommandx{}[][]{} % xargs.sty
596 \renewcommandx∗{}[][]{} % xargs.sty
597 \renewenvironment{}[][]{}{}
598 \renewenvironment*{}[][]{}{}
599 %\renewenvironment{}[]{}{}
600 \renewenvironmentx{}[][]{}{} % xargs.sty
601 \renewenvironmentx*{}[][]{}{} % xargs.sty
602 \resizebox{}{}{translate}
603 \resizebox*{}{}{translate}
604 \reversemarginpar
605 \rmdefault
606 \Roman{}
607 \roman{}
608 \rotatebox{}{translate}
609 \rule[]{}{}
610 \samepage
611 \savebox{}[][]{}
612 % \savebox{}(,)[]{}   %picture
613 \sbox{}{}
614 \scalebox{}[]{translate}
615 \scdefault
616 \section[]{}
617 \section*{}
618 \see
619 \seename
620 \selectfont
621 \selectlanguage{}
622 \setboolean{}{}
623 \setcounter{}{}
624 \setlength{}{}
625 \settime{}
626 \settodepth{}{}
627 \settoheight{}{}
628 \settowidth{}{}
629 \sfdefault
630 \shortstack[]{translate}
631 \showhyphens{}
632 \signature{}
633 \sldefault
634 \sloppy
635 \stepcounter{}
636 \stretch{}
637 %\subitem{}   % unsupported theindex environment
638 \subjectname
639 \subfigure[]{translate}
640 \subparagraph[]{}  % These "sub" versions of the sectioning commands weren't
641 \subparagraph*{}   % in the original commandlist for some reason (adk)
642 \subsection[]{}    %
643 \subsection*{}     %
644 \subsubsection[]{} %
645 \subsubsection*{}  %
646 %\subsubitem{}   % unsupported theindex environment
647 \suppressfloats[]
648 \symbol{}
649 \tablename
650 \tableofcontents
651 \tabularnewline[]
652 \telephone{translate}
653 \texorpdfstring{translate}{translate} % from the hyperref package
654 \textcircled{translate}
655 \textcolor[]{,,}{translate}
656 %\textcolor{}{}
657 \textbf{translate}     % hardcoded, but needed nevertheless for \let\xyz\textbf
658 \textnormal{translate} % hardcoded, but needed nevertheless for \let\xyz\textnormal
659 \textmd{translate}     % hardcoded, but needed nevertheless for \let\xyz\textmd
660 \textit{translate}     % hardcoded, but needed nevertheless for \let\xyz\textit
661 \textrm{translate}     % hardcoded, but needed nevertheless for \let\xyz\textrm
662 \textsc{translate}     % hardcoded, but needed nevertheless for \let\xyz\textsc
663 \textsf{translate}     % hardcoded, but needed nevertheless for \let\xyz\textsf
664 \textsl{translate}     % hardcoded, but needed nevertheless for \let\xyz\textsl
665 \texttt{translate}     % hardcoded, but needed nevertheless for \let\xyz\texttt
666 \textup{translate}     % hardcoded, but needed nevertheless for \let\xyz\textup
667 \textfraction
668 \thanks{translate}
669 \thicklines
670 \thinlines
671 \thispagestyle{}
672 \title{}
673 \today
674 \topfigrule
675 \topfraction
676 \ttdefault
677 \twocolumn[]
678 \updefault
679 \usebox{}
680 \usecounter{}
681 \usefont{}{}{}{}
682 \usepackage[]{}[]
683 \value{}
684 % \vector(,){}   %picture
685 % \verb||     % tex2lyx fails on \verb, see http://www.lyx.org/trac/ticket/4468 and http://www.lyx.org/trac/ticket/5408
686 % \verb*||
687 \visible
688 \vline
689 \vspace{}
690 \vspace*{}
691 \whiledo{}{}
692
693 % LaTeX environments.
694 % They have always one extra "argument":
695 % It contains "translate" if the contents of the environment contains normal
696 % LaTeX code that can be translated to LyX.
697 \begin{environments}
698 bibunit[]{translate}
699 psmatrix[]{}
700 thebibliography{}
701 \end{environments}
702
703 % Environments that start math mode.
704 % $...$, $$...$$, \(...\) and \[...\] are hardcoded in tex2lyx.
705 % The arguments are currently ignored.
706 \begin{mathenvironments}
707 equation
708 equation*
709 eqnarray
710 eqnarray*
711 align
712 align*
713 gather
714 gather*
715 multline
716 multline*
717 math
718 displaymath
719 flalign
720 flalign
721 % These require extra args
722 alignat
723 alignat*
724 xalignat
725 xalignat*
726 xxalignat
727 % These are not known by LyX but work nevertheless:
728 empheq
729 \end{mathenvironments}
730
731 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
732 % Sweave stuff
733 \Sexpr{}
734 \SweaveOpts{}
735 \SweaveInput{}
736 \SweaveSyntax{}
737 \Scoderef{}
738
739 \Rcode{}
740 \Robject{}
741 \Rcommand{}
742 \Rfunction{}
743 \Rfunarg{}
744 \Rpackage{}
745 \Rclass{}
746 \Rmethod{}