]> git.lyx.org Git - lyx.git/blobdiff - lib/syntax.default
ANNOUNCE updates.
[lyx.git] / lib / syntax.default
index 15ea23ce33341ffb121f0931eecf8c18c1fda06f..175558e1096962aada50e30247d1de3a40b10224 100644 (file)
@@ -1,8 +1,8 @@
 % This is the default list of commands for tex conversion programs to read
 %    It tells how many arguments each command takes, and which of them
 % (if any) are optional.
-%    It is taken from the list of commands origianlly written by John Weiss 970311
-% for reLyX plus the math commands from math_hash.C
+%    It is taken from the list of commands originally written by John Weiss
+% 1997-03-11 for reLyX plus the math commands from math_hash.C
 %
 % Also had to add textrm etc. commands and many size commands (like \small)
 %
@@ -142,6 +142,7 @@ $$
 \Large
 \LARGE
 \marginpar[]{}
+\mintinline[,]{}
 \multicolumn{}{}{}
 \newline
 \noindent
@@ -358,8 +359,21 @@ $$
 %
 % Arguments whose text is "translate" will have regular LaTeX in them (as
 % opposed to commands with special syntax) which should be translated by
-% reLyX like regular LaTeX. \mbox{} is an obvious example. LyX doesn't
+% tex2lyx like regular LaTeX. \mbox{} is an obvious example. LyX doesn't
 % support it, but only the "\mbox{" and the "}" need to be in TeX mode.
+% "translate" should be specified for as many arguments aspossible.
+% Besides the better on-screen display of the contents (a math inset looks
+% better than a formula in ERT), it enables LyX to apply some fixes to LaTeX
+% limitations: For example, footnotes in section headings do not work in
+% LaTeX, but LyX produces preamble code to fix that. Of course this works only
+% for footnote insets and not for footnotes in ERT. Example:
+% \section{title \texorpdfstring{\footnote{foo}}{bar}}
+% is some code that may occur in a .tex file created by LyX. The re-import
+% works only because the first argument of \texorpdfstring is specified as
+% translatable in this file.
+% If a command puts the contents of an argument inside an own group, use
+% "group" instead of "translate". Otherwise things like font changes would
+% survive the end of the group in LyX (bug 3036).
 
 \abstractname
 \Acrobatmenu{}{}         % from the hyperref package
@@ -387,22 +401,30 @@ $$
 \bottomfraction
 \caption[]{}
 \cc{}
+\ce{}
+\cf{}
 \ccname
+\cellcolor[]{}
 \centering
 \centerline{translate}
 \chapter[]{}
 \chapter*{}
 \chaptername
 \check{}
+\CheckCommand{}[][]{}
+\CheckCommand*{}[][]{}
+\CheckCommandx{}[][]{} % xargs.sty
+\CheckCommandx*{}[][]{} % xargs.sty
 %\circle{}    % picture environment (JMarc)
 %\circle*{}
 \cleardoublepage
 \clearpage
 \closing{}
-\color[]{,,}  % Two variants of this command and the next (jpw)
+\color[]{}  % Two variants of this command and the next (jpw)
 %\color{}
-\colorspec[]{,,}{}
+\colorspec[]{}{}
 %\colorspec{}{}
+\columncolor[]{}
 %\contentsline{}{\numberline{}  }{}     % Appears only in .toc file (JMarc)
 \contentsname
 %\dashbox{}(,)[]{}   %picture
@@ -410,8 +432,13 @@ $$
 \dblfigrule
 \dblfloatpagefraction
 \dbltopfraction
+\DeclareRobustCommand{}[][]{}
+\DeclareRobustCommand*{}[][]{}
+\DeclareRobustCommandx{}[][]{} % xargs.sty
+\DeclareRobustCommandx*{}[][]{} % xargs.sty
 \def{}{}
-\definecolor{}{}{,,}
+\definecolor{}{}{}
+\DeleteShortVerb{} % from doc.sty, argument must be verbatim
 \DescribeMacro{}
 \discretionary{}{}{}
 \encl{}
@@ -421,7 +448,7 @@ $$
 \ensuremath{}
 \extracolsep{}
 \fbox{translate}
-\fcolorbox[]{,,}{,,}{}  % Two variants of this command
+\fcolorbox[]{}{}{}  % Two variants of this command
 %\fcolorbox{}{}{}
 \figurename
 \floatpagefraction
@@ -457,7 +484,7 @@ $$
 \ifthenelse
 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
 \indent
-\index{}
+\index{translate}
 \indexentry{}{}        % only in .idx files (JMarc)
 \indexname
 \indexspace
@@ -477,7 +504,7 @@ $$
 \labelitemiv
 \language{}
 % We need this because the arguments must not be interpreted
-\let{}{}
+\let{item}{item}
 % \line(,){}    %picture
 \linebreak[]
 \linethickness{}
@@ -495,8 +522,9 @@ $$
 \makelabel{translate}
 \makelabels
 \maketitle
-\markboth{}{translate}
-\markright{translate}
+\MakeShortVerb{} % from doc.sty, argument must be verbatim
+\markboth{group}{group}
+\markright{group}
 \mathversion{}
 \mbox{translate}
 \mddefault
@@ -505,11 +533,13 @@ $$
 \newboolean{}
 \newcommand{}[][]{}
 \newcommand*{}[][]{}
-%\newcommand{}[]{}    % tex2lyx can support this when the file format is the one of LyX 1.6.x
+\newcommandx{}[][]{} % xargs.sty
+\newcommandx∗{}[][]{} % xargs.sty
 \newcounter{}[]
 \newenvironment{}[][]{}{}
 \newenvironment*{}[][]{}{}
-%\newenvironment{}[]{}{}    % tex2lyx can support this when the file format is the one of LyX 1.6.x
+\newenvironmentx{}[][]{}{} % xargs.sty
+\newenvironmentx*{}[][]{}{} % xargs.sty
 \newfont{}{ scaled }
 \newlength{}
 \newpage
@@ -531,7 +561,7 @@ $$
 \opening{}
 % \oval(,)[]   %picture
 \pagebreak[]
-\pagecolor[]{,,}
+\pagecolor[]{}
 % \pagecolor{}    % tex2lyx can first care about this when fileformat 351 is supported
 \pagename
 \pagenumbering{}
@@ -547,10 +577,12 @@ $$
 \pdfstringdef{}{}        % from the hyperref package
 \poptabs
 \prefacename
-\printindex
+\printindex[]{}
 \protect
 \providecommand{}[][]{}
 \providecommand*{}[][]{}
+\providecommandx{}[][]{} % xargs.sty
+\providecommandx*{}[][]{} % xargs.sty
 \ps
 \psfrag{}[][][][]{translate}
 \psfrag*{}[][][][]{translate}
@@ -568,17 +600,21 @@ $$
 \refstepcounter{}
 \renewcommand{}[][]{}
 \renewcommand*{}[][]{}
-%\renewcommand{}[]{}   % tex2lyx can support this when the file format is the one of LyX 1.6.x
+\renewcommandx{}[][]{} % xargs.sty
+\renewcommandx∗{}[][]{} % xargs.sty
 \renewenvironment{}[][]{}{}
 \renewenvironment*{}[][]{}{}
 %\renewenvironment{}[]{}{}
+\renewenvironmentx{}[][]{}{} % xargs.sty
+\renewenvironmentx*{}[][]{}{} % xargs.sty
 \resizebox{}{}{translate}
 \resizebox*{}{}{translate}
 \reversemarginpar
 \rmdefault
 \Roman{}
 \roman{}
-\rotatebox{}{translate}
+\rotatebox[]{}{translate}
+\rowcolor[]{}
 \rule[]{}{}
 \samepage
 \savebox{}[][]{}
@@ -603,31 +639,47 @@ $$
 \shortstack[]{translate}
 \showhyphens{}
 \signature{}
+\sindex[]{translate} %splitidx.sty
 \sldefault
 \sloppy
 \stepcounter{}
 \stretch{}
 %\subitem{}   % unsupported theindex environment
+\subcaption[translate]{translate}
+\subcaptionbox[translate]{translate}[][]{translate} % subcaption.sty
+\subcaptionbox*{translate}[][]{translate} % subcaption.sty
 \subjectname
-\subfigure[]{translate}
+\subfigure[translate][translate]{translate} % obsolete subfigure.sty
 \subparagraph[]{}  % These "sub" versions of the sectioning commands weren't
 \subparagraph*{}   % in the original commandlist for some reason (adk)
+\subref{} % subcaption.sty
+\subref*{} % subcaption.sty
 \subsection[]{}    %
 \subsection*{}     %
 \subsubsection[]{} %
 \subsubsection*{}  %
 %\subsubitem{}   % unsupported theindex environment
+\subtable[translate][translate]{translate} % obsolete subfigure.sty
 \suppressfloats[]
 \symbol{}
 \tablename
 \tableofcontents
 \tabularnewline[]
 \telephone{translate}
-\texorpdfstring{}{}      % from the hyperref package
+\texorpdfstring{translate}{translate} % from the hyperref package
 \textcircled{translate}
-\textcolor[]{,,}{translate}
+\textcolor[]{}{translate}
 %\textcolor{}{}
-\textnormal{translate}
+\textbf{translate}     % hardcoded, but needed nevertheless for \let\xyz\textbf
+\textnormal{translate} % hardcoded, but needed nevertheless for \let\xyz\textnormal
+\textmd{translate}     % hardcoded, but needed nevertheless for \let\xyz\textmd
+\textit{translate}     % hardcoded, but needed nevertheless for \let\xyz\textit
+\textrm{translate}     % hardcoded, but needed nevertheless for \let\xyz\textrm
+\textsc{translate}     % hardcoded, but needed nevertheless for \let\xyz\textsc
+\textsf{translate}     % hardcoded, but needed nevertheless for \let\xyz\textsf
+\textsl{translate}     % hardcoded, but needed nevertheless for \let\xyz\textsl
+\texttt{translate}     % hardcoded, but needed nevertheless for \let\xyz\texttt
+\textup{translate}     % hardcoded, but needed nevertheless for \let\xyz\textup
 \textfraction
 \thanks{translate}
 \thicklines
@@ -660,36 +712,42 @@ $$
 % LaTeX code that can be translated to LyX.
 \begin{environments}
 bibunit[]{translate}
+listing{} % minted.sty
+minted{} % minted.sty
 psmatrix[]{}
+subfigure[]{translate} % subcaption.sty
+subtable[]{translate} % subcaption.sty
+theorem[]{translate} % from amsthm.sty and probably others
 thebibliography{}
+tikzpicture[]{}
 \end{environments}
 
 % Environments that start math mode.
 % $...$, $$...$$, \(...\) and \[...\] are hardcoded in tex2lyx.
-% The arguments are currently ignored.
+% The arguments are currently ignored (apart from displaymath).
 \begin{mathenvironments}
-equation
-equation*
-eqnarray
-eqnarray*
-align
-align*
-gather
-gather*
-multline
-multline*
-math
-displaymath
-flalign
-flalign
+equation{displaymath}
+equation*{displaymath}
+eqnarray{displaymath}
+eqnarray*{displaymath}
+align{displaymath}
+align*{displaymath}
+gather{displaymath}
+gather*{displaymath}
+multline{displaymath}
+multline*{displaymath}
+math{}
+displaymath{displaymath}
+flalign{displaymath}
+flalign*{displaymath}
 % These require extra args
-alignat
-alignat*
-xalignat
-xalignat*
-xxalignat
+alignat{}{displaymath}
+alignat*{displaymath}
+xalignat{}{displaymath}
+xalignat*{}{displaymath}
+xxalignat{}{displaymath}
 % These are not known by LyX but work nevertheless:
-empheq
+empheq[]{}{displaymath}
 \end{mathenvironments}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%