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)
150 \noun{} % LyX style for nouns (appears in lyx-generated files)
159 \textmd{} % I had to add these (adk)
177 \underbar{} % LyX generated files use underbar instead of underline
183 % Units of measure. These get used only within the arguments of
184 % commands that take some length quantity.
197 \abovedisplayshortskip
204 \belowdisplayshortskip
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
268 \ % A "\" followed by a space.
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
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.
357 % These are the commands you're mostly likely to want to redefine in your own
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).
379 \Acrobatmenu{}{} % from the hyperref package
380 \addcontentsline{}{}{translate}
383 \addtocontents{}{translate} % one argument was missing here (JMarc)
391 \appendix % had to add this -Ak
396 %\bezier{}(,)(,)(,) % picture
409 \centerline{translate}
414 \CheckCommand{}[][]{}
415 \CheckCommand*{}[][]{}
416 \CheckCommandx{}[][]{} % xargs.sty
417 \CheckCommandx*{}[][]{} % xargs.sty
418 %\circle{} % picture environment (JMarc)
423 \color[]{} % Two variants of this command and the next (jpw)
428 %\contentsline{}{\numberline{} }{} % Appears only in .toc file (JMarc)
430 %\dashbox{}(,)[]{} %picture
433 \dblfloatpagefraction
435 \DeclareRobustCommand{}[][]{}
436 \DeclareRobustCommand*{}[][]{}
437 \DeclareRobustCommandx{}[][]{} % xargs.sty
438 \DeclareRobustCommandx*{}[][]{} % xargs.sty
441 \DeleteShortVerb{} % from doc.sty, argument must be verbatim
451 \fcolorbox[]{}{}{} % Two variants of this command
463 \footnotetext[]{translate}
464 % LaTeX has \frame{}, but beamer has \frame[]{}, so use the latter
466 \framebox[][]{translate} % Two variants of this command
467 %\framebox(,)[]{} % picture variant
472 \glossaryentry{}{} %only in .glo file (JMarc)
473 % \graphpaper[](,)(,) %picture
475 \href{}{translate} % from the hyperref package
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
485 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
488 \indexentry{}{} % only in .idx files (JMarc)
493 % This variant of \item might break reLyX!
494 % \item{} % Only appears in unsupported theindex environment
506 % We need this because the arguments must not be interpreted
508 % \line(,){} %picture
512 \listofalgorithms %AMStex?
518 \makebox[][]{translate}
519 % \makebox(,)[]{} %picture variant
522 \makelabel{translate}
525 \MakeShortVerb{} % from doc.sty, argument must be verbatim
526 \markboth{group}{group}
531 % \multiput(,)(,){}{} %picture
536 \newcommandx{}[][]{} % xargs.sty
537 \newcommandx∗{}[][]{} % xargs.sty
539 \newenvironment{}[][]{}{}
540 \newenvironment*{}[][]{}{}
541 \newenvironmentx{}[][]{}{} % xargs.sty
542 \newenvironmentx*{}[][]{}{} % xargs.sty
547 \newtheorem{}[]{translate}[]
562 % \oval(,)[] %picture
565 % \pagecolor{} % tex2lyx can first care about this when fileformat 351 is supported
571 %\parbox[]{}{} % reLyX treats next line same as this one (adk)
572 \parbox[][][]{}{translate}
576 \pdfbookmark[]{}{} % from the hyperref package
577 \pdfstringdef{}{} % from the hyperref package
582 \providecommand{}[][]{}
583 \providecommand*{}[][]{}
584 \providecommandx{}[][]{} % xargs.sty
585 \providecommandx*{}[][]{} % xargs.sty
587 \psfrag{}[][][][]{translate}
588 \psfrag*{}[][][][]{translate}
592 % \qbezier[](,)(,)(,) %picture
597 \raisebox{}[][]{translate}
598 \reflectbox{translate}
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}
616 \rotatebox[]{}{translate}
621 % \savebox{}(,)[]{} %picture
623 \scalebox{}[]{translate}
639 \shortstack[]{translate}
642 \sindex[]{translate} %splitidx.sty
647 %\subitem{} % unsupported theindex environment
648 \subcaption[translate]{translate}
649 \subcaptionbox[translate]{translate}[][]{translate} % subcaption.sty
650 \subcaptionbox*{translate}[][]{translate} % subcaption.sty
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
661 %\subsubitem{} % unsupported theindex environment
662 \subtable[translate][translate]{translate} % obsolete subfigure.sty
668 \telephone{translate}
669 \texorpdfstring{translate}{translate} % from the hyperref package
670 \textcircled{translate}
671 \textcolor[]{}{translate}
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
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
708 \xymatrix{} % this is basically an array => the contents would be parsed badly (bug 8396)
710 % LaTeX environments.
711 % They have always one extra "argument":
712 % It contains "translate" if the contents of the environment contains normal
713 % LaTeX code that can be translated to LyX.
716 listing{} % minted.sty
717 minted{} % minted.sty
719 subfigure[]{translate} % subcaption.sty
720 subtable[]{translate} % subcaption.sty
721 theorem[]{translate} % from amsthm.sty and probably others
726 % Environments that start math mode.
727 % $...$, $$...$$, \(...\) and \[...\] are hardcoded in tex2lyx.
728 % The arguments are currently ignored (apart from displaymath).
729 \begin{mathenvironments}
730 equation{displaymath}
731 equation*{displaymath}
732 eqnarray{displaymath}
733 eqnarray*{displaymath}
738 multline{displaymath}
739 multline*{displaymath}
741 displaymath{displaymath}
744 % These require extra args
745 alignat{}{displaymath}
746 alignat*{displaymath}
747 xalignat{}{displaymath}
748 xalignat*{}{displaymath}
749 xxalignat{}{displaymath}
750 % These are not known by LyX but work nevertheless:
751 empheq[]{}{displaymath}
752 \end{mathenvironments}
754 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%