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 \Acrobatmenu{}{} % from the hyperref package
368 \addcontentsline{}{}{translate}
371 \addtocontents{}{translate} % one argument was missing here (JMarc)
379 \appendix % had to add this -Ak
384 %\bezier{}(,)(,)(,) % picture
394 \centerline{translate}
399 %\circle{} % picture environment (JMarc)
404 \color[]{,,} % Two variants of this command and the next (jpw)
405 % \color{} % This variant doesn't matter to reLyX (adk)
407 %\colorspec{}{} % This variant doesn't matter to reLyX (adk)
408 %\contentsline{}{\numberline{} }{} % Appears only in .toc file (JMarc)
410 % \dashbox{}(,)[]{} %picture
413 \dblfloatpagefraction
427 \fcolorbox[]{,,}{,,}{} % Two variants of this command
428 %\fcolorbox{}{}{} % This variant doesn't matter to reLyX (adk)
439 \footnotetext[]{translate}
440 % LaTeX has \frame{}, but beamer has \frame[]{}, so use the latter
442 \framebox[][]{translate} % Two variants of this command
443 %\framebox(,)[]{} % picture variant
448 \glossaryentry{}{} %only in .glo file (JMarc)
449 % \graphpaper[](,)(,) %picture
452 \href{}{translate} % from the hyperref package
455 \hyperdef{}{}{translate} % from the hyperref package
456 \hyperlink{}{translate} % from the hyperref package
457 \hyperref{}{}{translate} % from the hyperref package
458 \hypertarget{}{translate} % from the hyperref package
462 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
465 \indexentry{}{} % only in .idx files (JMarc)
470 % This variant of \item might break reLyX!
471 % \item{} % Only appears in unsupported theindex environment
483 % We need this because the arguments must not be interpreted
485 % \line(,){} %picture
489 \listofalgorithms %AMStex?
495 \makebox[][]{translate}
496 % \makebox(,)[]{} %picture variant
499 \makelabel{translate}
502 \markboth{}{translate}
503 \markright{translate}
507 % \multiput(,)(,){}{} %picture
512 %\newcommand{}[]{} % reLyX doesn't care about missing optarg
514 \newenvironment{}[][]{}{}
515 \newenvironment*{}[][]{}{}
516 % \newenvironment{}[]{}{} % reLyX doesn't care about missing optarg
521 \newtheorem{}[]{translate}[]
536 % \oval(,)[] %picture
539 % \pagecolor{} % reLyX doesn't care about this version
545 %\parbox[]{}{} % reLyX treats next line same as this one (adk)
546 \parbox[][][]{}{translate}
550 \pdfbookmark[]{}{} % from the hyperref package
551 \pdfstringdef{}{} % from the hyperref package
556 \providecommand{}[][]{}
557 \providecommand*{}[][]{}
559 \psfrag{}[][][][]{translate}
560 \psfrag*{}[][][][]{translate}
564 % \qbezier[](,)(,)(,) %picture
569 \raisebox{}[][]{translate}
570 \reflectbox{translate}
573 \renewcommand{}[][]{}
574 \renewcommand*{}[][]{}
575 % \renewcommand{}[]{} %reLyX doesn't care about variants
576 \renewenvironment{}[][]{}{}
577 \renewenvironment*{}[][]{}{}
578 % \renewenvironment{}[]{}{}
579 \resizebox{}{}{translate}
580 \resizebox*{}{}{translate}
585 \rotatebox{}{translate}
589 % \savebox{}(,)[]{} %picture
591 \scalebox{}[]{translate}
607 \shortstack[]{translate}
614 %\subitem{} % unsupported theindex environment
616 \subfigure[]{translate}
617 \subparagraph[]{} % These "sub" versions of the sectioning commands weren't
618 \subparagraph*{} % in the original commandlist for some reason (adk)
623 %\subsubitem{} % unsupported theindex environment
629 \telephone{translate}
630 \texorpdfstring{}{} % from the hyperref package
631 \textcircled{translate}
632 \textcolor[]{,,}{translate}
633 %\textcolor{}{} % reLyX doesn't care about this version
634 \textnormal{translate}
652 % \vector(,){} %picture
653 % \verb|| % reLyX needs \verb to be hardcoded
662 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
663 % There are some environments which reLyX doesn't have an equivalent for.
664 % However, *within* that environment, simple translatable LaTeX appears.
665 % (E.g., this doesn't include something like "picture" because the TeX
666 % parser can't (yet?) understand the parentheses as being delimiters of
667 % coordinates rather than plain text.)
668 % The environment names are placed in a "reLyXre" environment.
669 % There aren't very many of these; the idea is that the user can add
670 % user-defined environments in personal syntax files
673 % filecontents can only appear before \documentclass command, so not worth it
676 % slide only appears in the slides class, but if we don't put this in, then
677 % the whole document will be copied in TeX mode!
682 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
683 % Keep bugging André until he adds 'support' for these in mathed,
684 % meaning that they can be removed from here.
689 \ensuremath {} % If it's in math mode, \ensuremath is unnec.
693 % LaTeX environments.
694 % They have always one extra "argument":
695 % It contains "translate" if the contents of the environment contains normal
696 % LaTeX code that can be translated to LyX.
703 % Environments that start math mode.
704 % $...$, $$...$$, \(...\) and \[...\] are hardcoded in tex2lyx.
705 % The arguments are currently ignored.
706 \begin{mathenvironments}
721 % These require extra args
727 % These are not known by LyX but work nevertheless:
729 \end{mathenvironments}
731 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%