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
426 \fcolorbox[]{,,}{,,}{} % Two variants of this command
427 %\fcolorbox{}{}{} % This variant doesn't matter to reLyX (adk)
438 \footnotetext[]{translate}
439 % LaTeX has \frame{}, but beamer has \frame[]{}, so use the latter
441 \framebox[][]{translate} % Two variants of this command
442 %\framebox(,)[]{} % picture variant
447 \glossaryentry{}{} %only in .glo file (JMarc)
448 % \graphpaper[](,)(,) %picture
450 \href{}{translate} % from the hyperref package
453 \hyperdef{}{}{translate} % from the hyperref package
454 \hyperlink{}{translate} % from the hyperref package
455 \hyperref{}{}{translate} % from the hyperref package
456 \hypertarget{}{translate} % from the hyperref package
460 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
463 \indexentry{}{} % only in .idx files (JMarc)
468 % This variant of \item might break reLyX!
469 % \item{} % Only appears in unsupported theindex environment
481 % We need this because the arguments must not be interpreted
483 % \line(,){} %picture
487 \listofalgorithms %AMStex?
493 \makebox[][]{translate}
494 % \makebox(,)[]{} %picture variant
497 \makelabel{translate}
500 \markboth{}{translate}
501 \markright{translate}
505 % \multiput(,)(,){}{} %picture
510 %\newcommand{}[]{} % reLyX doesn't care about missing optarg
512 \newenvironment{}[][]{}{}
513 \newenvironment*{}[][]{}{}
514 % \newenvironment{}[]{}{} % reLyX doesn't care about missing optarg
519 \newtheorem{}[]{translate}[]
534 % \oval(,)[] %picture
537 % \pagecolor{} % reLyX doesn't care about this version
543 %\parbox[]{}{} % reLyX treats next line same as this one (adk)
544 \parbox[][][]{}{translate}
548 \pdfbookmark[]{}{} % from the hyperref package
549 \pdfstringdef{}{} % from the hyperref package
554 \providecommand{}[][]{}
555 \providecommand*{}[][]{}
557 \psfrag{}[][][][]{translate}
558 \psfrag*{}[][][][]{translate}
562 % \qbezier[](,)(,)(,) %picture
567 \raisebox{}[][]{translate}
568 \reflectbox{translate}
571 \renewcommand{}[][]{}
572 \renewcommand*{}[][]{}
573 % \renewcommand{}[]{} %reLyX doesn't care about variants
574 \renewenvironment{}[][]{}{}
575 \renewenvironment*{}[][]{}{}
576 % \renewenvironment{}[]{}{}
577 \resizebox{}{}{translate}
578 \resizebox*{}{}{translate}
583 \rotatebox{}{translate}
587 % \savebox{}(,)[]{} %picture
589 \scalebox{}[]{translate}
605 \shortstack[]{translate}
612 %\subitem{} % unsupported theindex environment
614 \subfigure[]{translate}
615 \subparagraph[]{} % These "sub" versions of the sectioning commands weren't
616 \subparagraph*{} % in the original commandlist for some reason (adk)
621 %\subsubitem{} % unsupported theindex environment
627 \telephone{translate}
628 \texorpdfstring{}{} % from the hyperref package
629 \textcircled{translate}
630 \textcolor[]{,,}{translate}
631 %\textcolor{}{} % reLyX doesn't care about this version
632 \textnormal{translate}
650 % \vector(,){} %picture
651 % \verb|| % reLyX needs \verb to be hardcoded
660 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
661 % There are some environments which reLyX doesn't have an equivalent for.
662 % However, *within* that environment, simple translatable LaTeX appears.
663 % (E.g., this doesn't include something like "picture" because the TeX
664 % parser can't (yet?) understand the parentheses as being delimiters of
665 % coordinates rather than plain text.)
666 % The environment names are placed in a "reLyXre" environment.
667 % There aren't very many of these; the idea is that the user can add
668 % user-defined environments in personal syntax files
671 % filecontents can only appear before \documentclass command, so not worth it
674 % slide only appears in the slides class, but if we don't put this in, then
675 % the whole document will be copied in TeX mode!
680 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
681 % Keep bugging André until he adds 'support' for these in mathed,
682 % meaning that they can be removed from here.
687 \ensuremath {} % If it's in math mode, \ensuremath is unnec.
691 % LaTeX environments.
692 % They have always one extra "argument":
693 % It contains "translate" if the contents of the environment contains normal
694 % LaTeX code that can be translated to LyX.
701 % Environments that start math mode.
702 % $...$, $$...$$, \(...\) and \[...\] are hardcoded in tex2lyx.
703 % The arguments are currently ignored.
704 \begin{mathenvironments}
719 % These require extra args
725 % These are not known by LyX but work nevertheless:
727 \end{mathenvironments}