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
7 % Also had to add textrm etc. commands and many size commands (like \small)
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
13 % There are almost certainly commands in here we don't need -- but that
16 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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.
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)
73 % Natbib citations can usually have two optional args
102 % jurabib supports some natbib commands and additionally:
111 \footciteyearpar[][]{}
121 %\end{} %tex2lyx will get confused if \end is found in this file!
136 \includegraphics[,][,]{} % btw, LyX doesn't support graphicx, just graphics
139 \item[] % Has two variants (jpw) Other variant is unsupported (adk)
149 \noun{} % LyX style for nouns (appears in lyx-generated files)
158 \textmd{} % I had to add these (adk)
176 \underbar{} % LyX generated files use underbar instead of underline
182 % Units of measure. These get used only within the arguments of
183 % commands that take some length quantity.
196 \abovedisplayshortskip
203 \belowdisplayshortskip
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
267 \ % A "\" followed by a space.
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
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.
356 % These are the commands you're mostly likely to want to redefine in your own
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).
378 \Acrobatmenu{}{} % from the hyperref package
379 \addcontentsline{}{}{translate}
382 \addtocontents{}{translate} % one argument was missing here (JMarc)
390 \appendix % had to add this -Ak
395 %\bezier{}(,)(,)(,) % picture
407 \centerline{translate}
412 \CheckCommand{}[][]{}
413 \CheckCommand*{}[][]{}
414 \CheckCommandx{}[][]{} % xargs.sty
415 \CheckCommandx*{}[][]{} % xargs.sty
416 %\circle{} % picture environment (JMarc)
421 \color[]{,,} % Two variants of this command and the next (jpw)
425 %\contentsline{}{\numberline{} }{} % Appears only in .toc file (JMarc)
427 %\dashbox{}(,)[]{} %picture
430 \dblfloatpagefraction
432 \DeclareRobustCommand{}[][]{}
433 \DeclareRobustCommand*{}[][]{}
434 \DeclareRobustCommandx{}[][]{} % xargs.sty
435 \DeclareRobustCommandx*{}[][]{} % xargs.sty
438 \DeleteShortVerb{} % from doc.sty, argument must be verbatim
448 \fcolorbox[]{,,}{,,}{} % Two variants of this command
460 \footnotetext[]{translate}
461 % LaTeX has \frame{}, but beamer has \frame[]{}, so use the latter
463 \framebox[][]{translate} % Two variants of this command
464 %\framebox(,)[]{} % picture variant
469 \glossaryentry{}{} %only in .glo file (JMarc)
470 % \graphpaper[](,)(,) %picture
472 \href{}{translate} % from the hyperref package
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
482 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
485 \indexentry{}{} % only in .idx files (JMarc)
490 % This variant of \item might break reLyX!
491 % \item{} % Only appears in unsupported theindex environment
503 % We need this because the arguments must not be interpreted
505 % \line(,){} %picture
509 \listofalgorithms %AMStex?
515 \makebox[][]{translate}
516 % \makebox(,)[]{} %picture variant
519 \makelabel{translate}
522 \MakeShortVerb{} % from doc.sty, argument must be verbatim
523 \markboth{group}{group}
528 % \multiput(,)(,){}{} %picture
533 \newcommandx{}[][]{} % xargs.sty
534 \newcommandx∗{}[][]{} % xargs.sty
536 \newenvironment{}[][]{}{}
537 \newenvironment*{}[][]{}{}
538 \newenvironmentx{}[][]{}{} % xargs.sty
539 \newenvironmentx*{}[][]{}{} % xargs.sty
544 \newtheorem{}[]{translate}[]
559 % \oval(,)[] %picture
562 % \pagecolor{} % tex2lyx can first care about this when fileformat 351 is supported
568 %\parbox[]{}{} % reLyX treats next line same as this one (adk)
569 \parbox[][][]{}{translate}
573 \pdfbookmark[]{}{} % from the hyperref package
574 \pdfstringdef{}{} % from the hyperref package
579 \providecommand{}[][]{}
580 \providecommand*{}[][]{}
581 \providecommandx{}[][]{} % xargs.sty
582 \providecommandx*{}[][]{} % xargs.sty
584 \psfrag{}[][][][]{translate}
585 \psfrag*{}[][][][]{translate}
589 % \qbezier[](,)(,)(,) %picture
594 \raisebox{}[][]{translate}
595 \reflectbox{translate}
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}
613 \rotatebox{}{translate}
617 % \savebox{}(,)[]{} %picture
619 \scalebox{}[]{translate}
635 \shortstack[]{translate}
638 \sindex[]{translate} %splitidx.sty
643 %\subitem{} % unsupported theindex environment
644 \subcaption[translate]{translate}
645 \subcaptionbox[translate]{translate}[][]{translate} % subcaption.sty
646 \subcaptionbox*{translate}[][]{translate} % subcaption.sty
648 \subfigure[translate][translate]{translate} % obsolete subfigure.sty
649 \subparagraph[]{} % These "sub" versions of the sectioning commands weren't
650 \subparagraph*{} % in the original commandlist for some reason (adk)
651 \subref{} % subcaption.sty
652 \subref*{} % subcaption.sty
657 %\subsubitem{} % unsupported theindex environment
658 \subtable[translate][translate]{translate} % obsolete subfigure.sty
664 \telephone{translate}
665 \texorpdfstring{translate}{translate} % from the hyperref package
666 \textcircled{translate}
667 \textcolor[]{,,}{translate}
669 \textbf{translate} % hardcoded, but needed nevertheless for \let\xyz\textbf
670 \textnormal{translate} % hardcoded, but needed nevertheless for \let\xyz\textnormal
671 \textmd{translate} % hardcoded, but needed nevertheless for \let\xyz\textmd
672 \textit{translate} % hardcoded, but needed nevertheless for \let\xyz\textit
673 \textrm{translate} % hardcoded, but needed nevertheless for \let\xyz\textrm
674 \textsc{translate} % hardcoded, but needed nevertheless for \let\xyz\textsc
675 \textsf{translate} % hardcoded, but needed nevertheless for \let\xyz\textsf
676 \textsl{translate} % hardcoded, but needed nevertheless for \let\xyz\textsl
677 \texttt{translate} % hardcoded, but needed nevertheless for \let\xyz\texttt
678 \textup{translate} % hardcoded, but needed nevertheless for \let\xyz\textup
696 % \vector(,){} %picture
697 % \verb|| % tex2lyx fails on \verb, see http://www.lyx.org/trac/ticket/4468 and http://www.lyx.org/trac/ticket/5408
704 \xymatrix{} % this is basically an array => the contents would be parsed badly (bug 8396)
706 % LaTeX environments.
707 % They have always one extra "argument":
708 % It contains "translate" if the contents of the environment contains normal
709 % LaTeX code that can be translated to LyX.
713 subfigure[]{translate} % subcaption.sty
714 subtable[]{translate} % subcaption.sty
715 theorem[]{translate} % from amsthm.sty and probably others
720 % Environments that start math mode.
721 % $...$, $$...$$, \(...\) and \[...\] are hardcoded in tex2lyx.
722 % The arguments are currently ignored (apart from displaymath).
723 \begin{mathenvironments}
724 equation{displaymath}
725 equation*{displaymath}
726 eqnarray{displaymath}
727 eqnarray*{displaymath}
732 multline{displaymath}
733 multline*{displaymath}
735 displaymath{displaymath}
738 % These require extra args
739 alignat{}{displaymath}
740 alignat*{displaymath}
741 xalignat{}{displaymath}
742 xalignat*{}{displaymath}
743 xxalignat{}{displaymath}
744 % These are not known by LyX but work nevertheless:
745 empheq[]{}{displaymath}
746 \end{mathenvironments}
748 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%