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)
67 \bibbysection[] % biblatex
71 \addbibresource{} % biblatex
75 % Natbib citations can usually have two optional args
104 % jurabib supports some natbib commands and additionally:
113 \footciteyearpar[][]{}
143 %\end{} %tex2lyx will get confused if \end is found in this file!
158 \includegraphics[,][,]{} % btw, LyX doesn't support graphicx, just graphics
161 \item[] % Has two variants (jpw) Other variant is unsupported (adk)
172 \noun{} % LyX style for nouns (appears in lyx-generated files)
181 \textmd{} % I had to add these (adk)
199 \underbar{} % LyX generated files use underbar instead of underline
205 % Units of measure. These get used only within the arguments of
206 % commands that take some length quantity.
219 \abovedisplayshortskip
226 \belowdisplayshortskip
282 % Commands that act like single characters and insert something. This
283 % excludes the commands that place accents on characters, since they
284 % require arguments, whereas these don't. Also excluded are commands
285 % that insert a specified amount of space [again, that requires
286 % arguments] and those that insert lists, since a list isn't a single
290 \ % A "\" followed by a space.
367 % The LaTeX commands. As per Alejandro's request, I've omitted all of
368 % the math commands he appears to support in Mathed. I'm also
369 % omitting commands used primarily for defining new class and style
372 % For some reason, John didn't write {} after \" and some of the other
373 % accent commands (adk)
374 % He also didn't include the \textsc{} equivalent to {\sc}
375 % Because any commands with arguments in parentheses (rather than braces or
376 % brackets) appear in a picture environment, which reLyX doesn't support,
377 % we can comment those out.
379 % These are the commands you're mostly likely to want to redefine in your own
382 % Arguments whose text is "translate" will have regular LaTeX in them (as
383 % opposed to commands with special syntax) which should be translated by
384 % tex2lyx like regular LaTeX. \mbox{} is an obvious example. LyX doesn't
385 % support it, but only the "\mbox{" and the "}" need to be in TeX mode.
386 % "translate" should be specified for as many arguments aspossible.
387 % Besides the better on-screen display of the contents (a math inset looks
388 % better than a formula in ERT), it enables LyX to apply some fixes to LaTeX
389 % limitations: For example, footnotes in section headings do not work in
390 % LaTeX, but LyX produces preamble code to fix that. Of course this works only
391 % for footnote insets and not for footnotes in ERT. Example:
392 % \section{title \texorpdfstring{\footnote{foo}}{bar}}
393 % is some code that may occur in a .tex file created by LyX. The re-import
394 % works only because the first argument of \texorpdfstring is specified as
395 % translatable in this file.
396 % If a command puts the contents of an argument inside an own group, use
397 % "group" instead of "translate". Otherwise things like font changes would
398 % survive the end of the group in LyX (bug 3036).
401 \Acrobatmenu{}{} % from the hyperref package
402 \addcontentsline{}{}{translate}
405 \addtocontents{}{translate} % one argument was missing here (JMarc)
413 \appendix % had to add this -Ak
418 %\bezier{}(,)(,)(,) % picture
431 \centerline{translate}
436 \CheckCommand{}[][]{}
437 \CheckCommand*{}[][]{}
438 \CheckCommandx{}[][]{} % xargs.sty
439 \CheckCommandx*{}[][]{} % xargs.sty
440 %\circle{} % picture environment (JMarc)
445 \color[]{} % Two variants of this command and the next (jpw)
450 %\contentsline{}{\numberline{} }{} % Appears only in .toc file (JMarc)
452 %\dashbox{}(,)[]{} %picture
455 \dblfloatpagefraction
457 \DeclareRobustCommand{}[][]{}
458 \DeclareRobustCommand*{}[][]{}
459 \DeclareRobustCommandx{}[][]{} % xargs.sty
460 \DeclareRobustCommandx*{}[][]{} % xargs.sty
463 \DeleteShortVerb{} % from doc.sty, argument must be verbatim
473 \fcolorbox[]{}{}{} % Two variants of this command
485 \footnotetext[]{translate}
486 % LaTeX has \frame{}, but beamer has \frame[]{}, so use the latter
488 \framebox[][]{translate} % Two variants of this command
489 %\framebox(,)[]{} % picture variant
494 \glossaryentry{}{} %only in .glo file (JMarc)
495 % \graphpaper[](,)(,) %picture
497 \href{}{translate} % from the hyperref package
500 \hyperdef{}{}{translate} % from the hyperref package
501 \hyperlink{}{translate} % from the hyperref package
502 \hyperref{}{}{translate} % from the hyperref package
503 \hypertarget{}{translate} % from the hyperref package
507 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
510 \indexentry{}{} % only in .idx files (JMarc)
515 % This variant of \item might break reLyX!
516 % \item{} % Only appears in unsupported theindex environment
528 % We need this because the arguments must not be interpreted
530 % \line(,){} %picture
534 \listofalgorithms %AMStex?
540 \makebox[][]{translate}
541 % \makebox(,)[]{} %picture variant
544 \makelabel{translate}
547 \MakeShortVerb{} % from doc.sty, argument must be verbatim
548 \markboth{group}{group}
553 % \multiput(,)(,){}{} %picture
558 \newcommandx{}[][]{} % xargs.sty
559 \newcommandx∗{}[][]{} % xargs.sty
561 \newenvironment{}[][]{}{}
562 \newenvironment*{}[][]{}{}
563 \newenvironmentx{}[][]{}{} % xargs.sty
564 \newenvironmentx*{}[][]{}{} % xargs.sty
569 \newtheorem{}[]{translate}[]
584 % \oval(,)[] %picture
587 % \pagecolor{} % tex2lyx can first care about this when fileformat 351 is supported
593 %\parbox[]{}{} % reLyX treats next line same as this one (adk)
594 \parbox[][][]{}{translate}
598 \pdfbookmark[]{}{} % from the hyperref package
599 \pdfstringdef{}{} % from the hyperref package
602 \printbibliography[] % biblatex
605 \providecommand{}[][]{}
606 \providecommand*{}[][]{}
607 \providecommandx{}[][]{} % xargs.sty
608 \providecommandx*{}[][]{} % xargs.sty
610 \psfrag{}[][][][]{translate}
611 \psfrag*{}[][][][]{translate}
615 % \qbezier[](,)(,)(,) %picture
620 \raisebox{}[][]{translate}
621 \reflectbox{translate}
624 \renewcommand{}[][]{}
625 \renewcommand*{}[][]{}
626 \renewcommandx{}[][]{} % xargs.sty
627 \renewcommandx∗{}[][]{} % xargs.sty
628 \renewenvironment{}[][]{}{}
629 \renewenvironment*{}[][]{}{}
630 %\renewenvironment{}[]{}{}
631 \renewenvironmentx{}[][]{}{} % xargs.sty
632 \renewenvironmentx*{}[][]{}{} % xargs.sty
633 \resizebox{}{}{translate}
634 \resizebox*{}{}{translate}
639 \rotatebox[]{}{translate}
644 % \savebox{}(,)[]{} %picture
646 \scalebox{}[]{translate}
662 \shortstack[]{translate}
665 \sindex[]{translate} %splitidx.sty
670 %\subitem{} % unsupported theindex environment
671 \subcaption[translate]{translate}
672 \subcaptionbox[translate]{translate}[][]{translate} % subcaption.sty
673 \subcaptionbox*{translate}[][]{translate} % subcaption.sty
676 \subfigure[translate][translate]{translate} % obsolete subfigure.sty
677 \subparagraph[]{} % These "sub" versions of the sectioning commands weren't
678 \subparagraph*{} % in the original commandlist for some reason (adk)
679 \subref{} % subcaption.sty
680 \subref*{} % subcaption.sty
685 %\subsubitem{} % unsupported theindex environment
686 \subtable[translate][translate]{translate} % obsolete subfigure.sty
692 \telephone{translate}
693 \texorpdfstring{translate}{translate} % from the hyperref package
694 \textcircled{translate}
695 \textcolor[]{}{translate}
697 \textbf{translate} % hardcoded, but needed nevertheless for \let\xyz\textbf
698 \textnormal{translate} % hardcoded, but needed nevertheless for \let\xyz\textnormal
699 \textmd{translate} % hardcoded, but needed nevertheless for \let\xyz\textmd
700 \textit{translate} % hardcoded, but needed nevertheless for \let\xyz\textit
701 \textrm{translate} % hardcoded, but needed nevertheless for \let\xyz\textrm
702 \textsc{translate} % hardcoded, but needed nevertheless for \let\xyz\textsc
703 \textsf{translate} % hardcoded, but needed nevertheless for \let\xyz\textsf
704 \textsl{translate} % hardcoded, but needed nevertheless for \let\xyz\textsl
705 \texttt{translate} % hardcoded, but needed nevertheless for \let\xyz\texttt
706 \textup{translate} % hardcoded, but needed nevertheless for \let\xyz\textup
724 % \vector(,){} %picture
725 % \verb|| % tex2lyx fails on \verb, see http://www.lyx.org/trac/ticket/4468 and http://www.lyx.org/trac/ticket/5408
733 % LaTeX environments.
734 % They have always one extra "argument":
735 % It contains "translate" if the contents of the environment contains normal
736 % LaTeX code that can be translated to LyX.
739 listing{} % minted.sty
740 minted{} % minted.sty
742 subfigure[]{translate} % subcaption.sty
743 subtable[]{translate} % subcaption.sty
744 theorem[]{translate} % from amsthm.sty and probably others
749 % Environments that start math mode.
750 % $...$, $$...$$, \(...\) and \[...\] are hardcoded in tex2lyx.
751 % The arguments are currently ignored (apart from displaymath).
752 \begin{mathenvironments}
753 equation{displaymath}
754 equation*{displaymath}
755 eqnarray{displaymath}
756 eqnarray*{displaymath}
761 multline{displaymath}
762 multline*{displaymath}
764 displaymath{displaymath}
766 flalign*{displaymath}
767 % These require extra args
768 alignat{}{displaymath}
769 alignat*{displaymath}
770 xalignat{}{displaymath}
771 xalignat*{}{displaymath}
772 xxalignat{}{displaymath}
773 % These are not known by LyX but work nevertheless:
774 empheq[]{}{displaymath}
775 \end{mathenvironments}
777 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%