1 % This is the default list of commands for reLyX to read
2 % It tells reLyX 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
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, but LyX currently
109 % \end{} %reLyX will get confused if \end is found in this file!
123 \includegraphics[,][,]{} % btw, LyX doesn't support graphicx, just graphics
126 \item[] % Has two variants (jpw) Other variant is unsupported (adk)
136 \noun{} % LyX style for nouns (appears in lyx-generated files)
145 \textmd{} % I had to add these (adk)
163 \underbar{} % LyX generated files use underbar instead of underline
169 % Units of measure. These get used only within the arguments of
170 % commands that take some length quantity.
183 \abovedisplayshortskip
190 \belowdisplayshortskip
246 % Commands that act like single characters and insert something. This
247 % excludes the commands that place accents on characters, since they
248 % require arguments, whereas these don't. Also excluded are commands
249 % that insert a specified amount of space [again, that requires
250 % arguments] and those that insert lists, since a list isn't a single
253 % I had to remove things that TeX.pm doesn't recognize as a token, and hardcode
254 % those into reLyX. This included !' ?' -- --- and maybe some other things
256 \ % A "\" followed by a space.
333 % The LaTeX commands. As per Alejandro's request, I've omitted all of
334 % the math commands he appears to support in Mathed. I'm also
335 % omitting commands used primarily for defining new class and style
338 % For some reason, John didn't write {} after \" and some of the other
339 % accent commands (adk)
340 % He also didn't include the \textsc{} equivalent to {\sc}
341 % Because any commands with arguments in parentheses (rather than braces or
342 % brackets) appear in a picture environment, which reLyX doesn't support,
343 % we can comment those out.
345 % These are the commands you're mostly likely to want to redefine in your own
348 % Arguments whose text is "translate" will have regular LaTeX in them (as
349 % opposed to commands with special syntax) which should be translated by
350 % reLyX like regular LaTeX. \mbox{} is an obvious example. LyX doesn't
351 % support it, but only the "\mbox{" and the "}" need to be in TeX mode.
354 \addcontentsline{}{}{translate}
357 \addtocontents{}{translate} % one argument was missing here (JMarc)
365 \appendix % had to add this -Ak
370 %\bezier{}(,)(,)(,) % picture
379 \centerline{translate}
384 %\circle{} % picture environment (JMarc)
389 \color[]{,,} % Two variants of this command and the next (jpw)
390 % \color{} % This variant doesn't matter to reLyX (adk)
392 %\colorspec{}{} % This variant doesn't matter to reLyX (adk)
393 %\contentsline{}{\numberline{} }{} % Appears only in .toc file (JMarc)
395 % \dashbox{}(,)[]{} %picture
398 \dblfloatpagefraction
410 \fcolorbox[]{,,}{,,}{} % Two variants of this command
411 %\fcolorbox{}{}{} % This variant doesn't matter to reLyX (adk)
422 \footnotetext[]{translate}
424 \framebox[][]{translate} % Two variants of this command
425 %\framebox(,)[]{} % picture variant
430 \glossaryentry{}{} %only in .glo file (JMarc)
431 % \graphpaper[](,)(,) %picture
438 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
441 \indexentry{}{} % only in .idx files (JMarc)
446 % This variant of \item might break reLyX!
447 % \item{} % Only appears in unsupported theindex environment
459 % \line(,){} %picture
463 \listofalgorithms %AMStex?
469 \makebox[][]{translate}
470 % \makebox(,)[]{} %picture variant
473 \makelabel{translate}
476 \markboth{}{translate}
477 \markright{translate}
481 % \multiput(,)(,){}{} %picture
486 %\newcommand{}[]{} % reLyX doesn't care about missing optarg
488 \newenvironment{}[][]{}{}
489 \newenvironment*{}[][]{}{}
490 % \newenvironment{}[]{}{} % reLyX doesn't care about missing optarg
495 \newtheorem{}[]{translate}[]
510 % \oval(,)[] %picture
513 % \pagecolor{} % reLyX doesn't care about this version
519 %\parbox[]{}{} % reLyX treats next line same as this one (adk)
520 \parbox[][][]{}{translate}
528 \providecommand{}[][]{}
529 \providecommand*{}[][]{}
533 % \qbezier[](,)(,)(,) %picture
538 \raisebox{}[][]{translate}
539 \reflectbox{translate}
542 \renewcommand{}[][]{}
543 \renewcommand*{}[][]{}
544 % \renewcommand{}[]{} %reLyX doesn't care about variants
545 \renewenvironment{}[][]{}{}
546 \renewenvironment*{}[][]{}{}
547 % \renewenvironment{}[]{}{}
548 \resizebox{}{}{translate}
549 \resizebox*{}{}{translate}
554 \rotatebox{}{translate}
558 % \savebox{}(,)[]{} %picture
560 \scalebox{}[]{translate}
576 \shortstack[]{translate}
583 %\subitem{} % unsupported theindex environment
585 \subparagraph[]{} % These "sub" versions of the sectioning commands weren't
586 \subparagraph*{} % in the original commandlist for some reason (adk)
591 %\subsubitem{} % unsupported theindex environment
597 \telephone{translate}
598 \textcircled{translate}
599 \textcolor[]{,,}{translate}
600 %\textcolor{}{} % reLyX doesn't care about this version
601 \textnormal{translate}
619 % \vector(,){} %picture
620 % \verb|| % reLyX needs \verb to be hardcoded
629 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
630 % There are some environments which reLyX doesn't have an equivalent for.
631 % However, *within* that environment, simple translatable LaTeX appears.
632 % (E.g., this doesn't include something like "picture" because the TeX
633 % parser can't (yet?) understand the parentheses as being delimiters of
634 % coordinates rather than plain text.)
635 % The environment names are placed in a "reLyXre" environment.
636 % There aren't very many of these; the idea is that the user can add
637 % user-defined environments in personal syntax files
640 % filecontents can only appear before \documentclass command, so not worth it
643 % slide only appears in the slides class, but if we don't put this in, then
644 % the whole document will be copied in TeX mode!
649 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
650 % There are some math commands which LyX doesn't support. If there's an
651 % equivalent command that it *does* support, then we might as well
653 % While copying things in math mode, reLyX will replace anything of the
654 % following commands with (exactly) whatever text is in braces, so, e.g.,
655 % $x\sb{a}$ will be converted to $x_{a}$ in the LyX file.
656 % In most cases, this simply avoids "evil red text" in math mode, but
657 % in a couple cases, it actually fixes things (e.g. '\ ')
658 % Tokens to replace should be "normal" tokens, backslash followed by a
659 % nonletter or one or more letters. (Token may also have * at the end.)
666 \ {\,\,} % That's '\ ', same length (6/18 quad) as two '\,' tokens
671 \ensuremath {} % If it's in math mode, \ensuremath is unnec.