]> git.lyx.org Git - features.git/blob - lib/syntax.default
Improve tex2lyx roundtrip of test-insets.tex:
[features.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 % reLyX 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
364 \abstractname
365 \Acrobatmenu{}{}         % from the hyperref package
366 \addcontentsline{}{}{translate}
367 \address{}
368 \addtime{}
369 \addtocontents{}{translate}  % one argument was missing here (JMarc)
370 \addtocounter{}{}
371 \addtolength{}{}
372 \addvspace{}
373 \Alph{}
374 \alph{}
375 \alsoname
376 \and
377 \appendix % had to add this -Ak
378 \appendixname
379 \arabic{}
380 \author{}
381 \backmatter
382 %\bezier{}(,)(,)(,)    % picture
383 \bfdefault
384 \bibliographyunit[]
385 \bibname
386 \botfigrule
387 \bottomfraction
388 \caption[]{}
389 \cc{}
390 \ccname
391 \centering
392 \centerline{translate}
393 \chapter[]{}
394 \chapter*{}
395 \chaptername
396 \check{}
397 %\circle{}    % picture environment (JMarc)
398 %\circle*{}
399 \cleardoublepage
400 \clearpage
401 \closing{}
402 \color[]{,,}  % Two variants of this command and the next (jpw)
403 %\color{}
404 \colorspec[]{,,}{}
405 %\colorspec{}{}
406 %\contentsline{}{\numberline{}  }{}     % Appears only in .toc file (JMarc)
407 \contentsname
408 %\dashbox{}(,)[]{}   %picture
409 \date{}
410 \dblfigrule
411 \dblfloatpagefraction
412 \dbltopfraction
413 \def{}{}
414 \definecolor{}{}{,,}
415 \DeleteShortVerb{} % from doc.sty, argument must be verbatim
416 \DescribeMacro{}
417 \discretionary{}{}{}
418 \encl{}
419 \enclname
420 \enlargethispage{}
421 \enlargethispage*{}
422 \ensuremath{}
423 \extracolsep{}
424 \fbox{translate}
425 \fcolorbox[]{,,}{,,}{}  % Two variants of this command
426 %\fcolorbox{}{}{}
427 \figurename
428 \floatpagefraction
429 \flushbottom
430 \fnsymbol{}
431 \fontfamily{}
432 \fontseries{}
433 \fontshape{}
434 \fontsize{}{}
435 \footnotemark[]
436 \footnoterule
437 \footnotetext[]{translate}
438 % LaTeX has \frame{}, but beamer has \frame[]{}, so use the latter
439 \frame[]{translate}
440 \framebox[][]{translate} % Two variants of this command
441 %\framebox(,)[]{}    %  picture variant
442 \frenchspacing
443 \frontmatter
444 \fussy
445 \glossary{translate}
446 \glossaryentry{}{}       %only in .glo file (JMarc)
447 % \graphpaper[](,)(,)    %picture
448 \headtoname
449 \href{}{translate}       % from the hyperref package
450 \hspace{}
451 \hspace*{}
452 \hyperdef{}{}{translate} % from the hyperref package
453 \hyperlink{}{translate}  % from the hyperref package
454 \hyperref{}{}{translate} % from the hyperref package
455 \hypertarget{}{translate} % from the hyperref package
456 \hyphenation{}
457 \iflanguage{}{}{}
458 \ifthenelse
459 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
460 \indent
461 \index{}
462 \indexentry{}{}        % only in .idx files (JMarc)
463 \indexname
464 \indexspace
465 \invisible
466 \itdefault
467 % This variant of \item might break reLyX!
468 %  \item{}   % Only appears in unsupported theindex environment
469 \k{}
470 \kill
471 \labelnumi
472 \labelnumii
473 \labelnumiii
474 \labelnumiv
475 \labelitemi
476 \labelitemii
477 \labelitemiii
478 \labelitemiv
479 \language{}
480 % We need this because the arguments must not be interpreted
481 \let{item}{item}
482 % \line(,){}    %picture
483 \linebreak[]
484 \linethickness{}
485 \listfigurename
486 \listofalgorithms %AMStex?
487 \listoffigures
488 \listoftables
489 \listtablename
490 \location{}
491 \mainmatter
492 \makebox[][]{translate}
493 %  \makebox(,)[]{}     %picture variant
494 \makeglossary
495 \makeindex
496 \makelabel{translate}
497 \makelabels
498 \maketitle
499 \MakeShortVerb{} % from doc.sty, argument must be verbatim
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{}[]{}    % tex2lyx can support this when the file format is the one of LyX 1.6.x
511 \newcounter{}[]
512 \newenvironment{}[][]{}{}
513 \newenvironment*{}[][]{}{}
514 %\newenvironment{}[]{}{}    % tex2lyx can support this when the file format is the one of LyX 1.6.x
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{}    % tex2lyx can first care about this when fileformat 351 is supported
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{}[]{}   % tex2lyx can support this when the file format is the one of LyX 1.6.x
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{}{}
632 \textbf{translate}     % hardcoded, but needed nevertheless for \let\xyz\textbf
633 \textnormal{translate} % hardcoded, but needed nevertheless for \let\xyz\textnormal
634 \textmd{translate}     % hardcoded, but needed nevertheless for \let\xyz\textmd
635 \textit{translate}     % hardcoded, but needed nevertheless for \let\xyz\textit
636 \textrm{translate}     % hardcoded, but needed nevertheless for \let\xyz\textrm
637 \textsc{translate}     % hardcoded, but needed nevertheless for \let\xyz\textsc
638 \textsf{translate}     % hardcoded, but needed nevertheless for \let\xyz\textsf
639 \textsl{translate}     % hardcoded, but needed nevertheless for \let\xyz\textsl
640 \texttt{translate}     % hardcoded, but needed nevertheless for \let\xyz\texttt
641 \textup{translate}     % hardcoded, but needed nevertheless for \let\xyz\textup
642 \textfraction
643 \thanks{translate}
644 \thicklines
645 \thinlines
646 \thispagestyle{}
647 \title{}
648 \today
649 \topfigrule
650 \topfraction
651 \ttdefault
652 \twocolumn[]
653 \updefault
654 \usebox{}
655 \usecounter{}
656 \usefont{}{}{}{}
657 \usepackage[]{}[]
658 \value{}
659 % \vector(,){}   %picture
660 % \verb||     % tex2lyx fails on \verb, see http://www.lyx.org/trac/ticket/4468 and http://www.lyx.org/trac/ticket/5408
661 % \verb*||
662 \visible
663 \vline
664 \vspace{}
665 \vspace*{}
666 \whiledo{}{}
667
668 % LaTeX environments.
669 % They have always one extra "argument":
670 % It contains "translate" if the contents of the environment contains normal
671 % LaTeX code that can be translated to LyX.
672 \begin{environments}
673 bibunit[]{translate}
674 psmatrix[]{}
675 thebibliography{}
676 \end{environments}
677
678 % Environments that start math mode.
679 % $...$, $$...$$, \(...\) and \[...\] are hardcoded in tex2lyx.
680 % The arguments are currently ignored.
681 \begin{mathenvironments}
682 equation
683 equation*
684 eqnarray
685 eqnarray*
686 align
687 align*
688 gather
689 gather*
690 multline
691 multline*
692 math
693 displaymath
694 flalign
695 flalign
696 % These require extra args
697 alignat
698 alignat*
699 xalignat
700 xalignat*
701 xxalignat
702 % These are not known by LyX but work nevertheless:
703 empheq
704 \end{mathenvironments}
705
706 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
707 % Sweave stuff
708 \Sexpr{}
709 \SweaveOpts{}
710 \SweaveInput{}
711 \SweaveSyntax{}
712 \Scoderef{}
713
714 \Rcode{}
715 \Robject{}
716 \Rcommand{}
717 \Rfunction{}
718 \Rfunarg{}
719 \Rpackage{}
720 \Rclass{}
721 \Rmethod{}