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 written by John Weiss 970311 for reLyX
5 % 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{}[] %reLyX will get confused if \begin is found in this file!
59 %\begin{}[]{} % All of these show the different variations of \begin (jpw)
60 %\begin{}{} % reLyX can only handle \begin{}
73 % Natbib citations can usually have two optional args
102 % jurabib supports some natbib commands and additionally:
111 \footciteyearpar[][]{}
121 % \end{} %reLyX 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
266 % I had to remove things that TeX.pm doesn't recognize as a token, and hardcode
267 % those into reLyX. This included !' ?' -- --- and maybe some other things
269 \ % A "\" followed by a space.
346 % The LaTeX commands. As per Alejandro's request, I've omitted all of
347 % the math commands he appears to support in Mathed. I'm also
348 % omitting commands used primarily for defining new class and style
351 % For some reason, John didn't write {} after \" and some of the other
352 % accent commands (adk)
353 % He also didn't include the \textsc{} equivalent to {\sc}
354 % Because any commands with arguments in parentheses (rather than braces or
355 % brackets) appear in a picture environment, which reLyX doesn't support,
356 % we can comment those out.
358 % These are the commands you're mostly likely to want to redefine in your own
361 % Arguments whose text is "translate" will have regular LaTeX in them (as
362 % opposed to commands with special syntax) which should be translated by
363 % reLyX like regular LaTeX. \mbox{} is an obvious example. LyX doesn't
364 % support it, but only the "\mbox{" and the "}" need to be in TeX mode.
367 \addcontentsline{}{}{translate}
370 \addtocontents{}{translate} % one argument was missing here (JMarc)
378 \appendix % had to add this -Ak
383 %\bezier{}(,)(,)(,) % picture
393 \centerline{translate}
398 %\circle{} % picture environment (JMarc)
403 \color[]{,,} % Two variants of this command and the next (jpw)
404 % \color{} % This variant doesn't matter to reLyX (adk)
406 %\colorspec{}{} % This variant doesn't matter to reLyX (adk)
407 %\contentsline{}{\numberline{} }{} % Appears only in .toc file (JMarc)
409 % \dashbox{}(,)[]{} %picture
412 \dblfloatpagefraction
425 \fcolorbox[]{,,}{,,}{} % Two variants of this command
426 %\fcolorbox{}{}{} % This variant doesn't matter to reLyX (adk)
437 \footnotetext[]{translate}
438 % LaTeX has \frame{}, but beamer has \frame[]{}, so use the latter
440 \framebox[][]{translate} % Two variants of this command
441 %\framebox(,)[]{} % picture variant
446 \glossaryentry{}{} %only in .glo file (JMarc)
447 % \graphpaper[](,)(,) %picture
449 \href{}{translate} % from the hyperref package
455 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
458 \indexentry{}{} % only in .idx files (JMarc)
463 % This variant of \item might break reLyX!
464 % \item{} % Only appears in unsupported theindex environment
476 % We need this because the arguments must not be interpreted
478 % \line(,){} %picture
482 \listofalgorithms %AMStex?
488 \makebox[][]{translate}
489 % \makebox(,)[]{} %picture variant
492 \makelabel{translate}
495 \markboth{}{translate}
496 \markright{translate}
500 % \multiput(,)(,){}{} %picture
505 %\newcommand{}[]{} % reLyX doesn't care about missing optarg
507 \newenvironment{}[][]{}{}
508 \newenvironment*{}[][]{}{}
509 % \newenvironment{}[]{}{} % reLyX doesn't care about missing optarg
514 \newtheorem{}[]{translate}[]
529 % \oval(,)[] %picture
532 % \pagecolor{} % reLyX doesn't care about this version
538 %\parbox[]{}{} % reLyX treats next line same as this one (adk)
539 \parbox[][][]{}{translate}
547 \providecommand{}[][]{}
548 \providecommand*{}[][]{}
550 \psfrag{}[][][][]{translate}
551 \psfrag*{}[][][][]{translate}
555 % \qbezier[](,)(,)(,) %picture
560 \raisebox{}[][]{translate}
561 \reflectbox{translate}
564 \renewcommand{}[][]{}
565 \renewcommand*{}[][]{}
566 % \renewcommand{}[]{} %reLyX doesn't care about variants
567 \renewenvironment{}[][]{}{}
568 \renewenvironment*{}[][]{}{}
569 % \renewenvironment{}[]{}{}
570 \resizebox{}{}{translate}
571 \resizebox*{}{}{translate}
576 \rotatebox{}{translate}
580 % \savebox{}(,)[]{} %picture
582 \scalebox{}[]{translate}
598 \shortstack[]{translate}
605 %\subitem{} % unsupported theindex environment
607 \subfigure[]{translate}
608 \subparagraph[]{} % These "sub" versions of the sectioning commands weren't
609 \subparagraph*{} % in the original commandlist for some reason (adk)
614 %\subsubitem{} % unsupported theindex environment
620 \telephone{translate}
621 \textcircled{translate}
622 \textcolor[]{,,}{translate}
623 %\textcolor{}{} % reLyX doesn't care about this version
624 \textnormal{translate}
642 % \vector(,){} %picture
643 % \verb|| % reLyX needs \verb to be hardcoded
652 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
653 % There are some environments which reLyX doesn't have an equivalent for.
654 % However, *within* that environment, simple translatable LaTeX appears.
655 % (E.g., this doesn't include something like "picture" because the TeX
656 % parser can't (yet?) understand the parentheses as being delimiters of
657 % coordinates rather than plain text.)
658 % The environment names are placed in a "reLyXre" environment.
659 % There aren't very many of these; the idea is that the user can add
660 % user-defined environments in personal syntax files
663 % filecontents can only appear before \documentclass command, so not worth it
666 % slide only appears in the slides class, but if we don't put this in, then
667 % the whole document will be copied in TeX mode!
672 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
673 % Keep bugging André until he adds 'support' for these in mathed,
674 % meaning that they can be removed from here.
679 \ensuremath {} % If it's in math mode, \ensuremath is unnec.
683 % LaTeX environments.
684 % They have always one extra "argument":
685 % It contains "translate" if the contents of the environment contains normal
686 % LaTeX code that can be translated to LyX.
692 % Environments that start math mode.
693 % $...$, $$...$$, \(...\) and \[...\] are hardcoded in tex2lyx.
694 % The arguments are currently ignored.
695 \begin{mathenvironments}
710 % These require extra args
716 % These are not known by LyX but work nevertheless:
718 \end{mathenvironments}