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{}
78 % \end{} %reLyX will get confused if \end is found in this file!
92 \includegraphics[,][,]{} % btw, LyX doesn't support graphicx, just graphics
95 \item[] % Has two variants (jpw) Other variant is unsupported (adk)
105 \noun{} % LyX style for nouns (appears in lyx-generated files)
114 \textmd{} % I had to add these (adk)
132 \underbar{} % LyX generated files use underbar instead of underline
138 % Units of measure. These get used only within the arguments of
139 % commands that take some length quantity.
152 \abovedisplayshortskip
159 \belowdisplayshortskip
215 % Commands that act like single characters and insert something. This
216 % excludes the commands that place accents on characters, since they
217 % require arguments, whereas these don't. Also excluded are commands
218 % that insert a specified amount of space [again, that requires
219 % arguments] and those that insert lists, since a list isn't a single
222 % I had to remove things that TeX.pm doesn't recognize as a token, and hardcode
223 % those into reLyX. This included !' ?' -- --- and maybe some other things
225 \ % A "\" followed by a space.
302 % The LaTeX commands. As per Alejandro's request, I've omitted all of
303 % the math commands he appears to support in Mathed. I'm also
304 % omitting commands used primarily for defining new class and style
307 % For some reason, John didn't write {} after \" and some of the other
308 % accent commands (adk)
309 % He also didn't include the \textsc{} equivalent to {\sc}
310 % Because any commands with arguments in parentheses (rather than braces or
311 % brackets) appear in a picture environment, which reLyX doesn't support,
312 % we can comment those out.
314 % These are the commands you're mostly likely to want to redefine in your own
317 % Arguments whose text is "translate" will have regular LaTeX in them (as
318 % opposed to commands with special syntax) which should be translated by
319 % reLyX like regular LaTeX. \mbox{} is an obvious example. LyX doesn't
320 % support it, but only the "\mbox{" and the "}" need to be in TeX mode.
323 \addcontentsline{}{}{translate}
326 \addtocontents{}{translate} % one argument was missing here (JMarc)
334 \appendix % had to add this -Ak
339 %\bezier{}(,)(,)(,) % picture
348 \centerline{translate}
353 %\circle{} % picture environment (JMarc)
358 \color[]{,,} % Two variants of this command and the next (jpw)
359 % \color{} % This variant doesn't matter to reLyX (adk)
361 %\colorspec{}{} % This variant doesn't matter to reLyX (adk)
362 %\contentsline{}{\numberline{} }{} % Appears only in .toc file (JMarc)
364 % \dashbox{}(,)[]{} %picture
367 \dblfloatpagefraction
379 \fcolorbox[]{,,}{,,}{} % Two variants of this command
380 %\fcolorbox{}{}{} % This variant doesn't matter to reLyX (adk)
391 \footnotetext[]{translate}
393 \framebox[][]{translate} % Two variants of this command
394 %\framebox(,)[]{} % picture variant
399 \glossaryentry{}{} %only in .glo file (JMarc)
400 % \graphpaper[](,)(,) %picture
407 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
410 \indexentry{}{} % only in .idx files (JMarc)
415 % This variant of \item might break reLyX!
416 % \item{} % Only appears in unsupported theindex environment
428 % \line(,){} %picture
432 \listofalgorithms %AMStex?
438 \makebox[][]{translate}
439 % \makebox(,)[]{} %picture variant
442 \makelabel{translate}
445 \markboth{}{translate}
446 \markright{translate}
450 % \multiput(,)(,){}{} %picture
455 %\newcommand{}[]{} % reLyX doesn't care about missing optarg
457 \newenvironment{}[][]{}{}
458 \newenvironment*{}[][]{}{}
459 % \newenvironment{}[]{}{} % reLyX doesn't care about missing optarg
464 \newtheorem{}[]{translate}[]
479 % \oval(,)[] %picture
482 % \pagecolor{} % reLyX doesn't care about this version
488 %\parbox[]{}{} % reLyX treats next line same as this one (adk)
489 \parbox[][][]{}{translate}
497 \providecommand{}[][]{}
498 \providecommand*{}[][]{}
502 % \qbezier[](,)(,)(,) %picture
507 \raisebox{}[][]{translate}
508 \reflectbox{translate}
511 \renewcommand{}[][]{}
512 \renewcommand*{}[][]{}
513 % \renewcommand{}[]{} %reLyX doesn't care about variants
514 \renewenvironment{}[][]{}{}
515 \renewenvironment*{}[][]{}{}
516 % \renewenvironment{}[]{}{}
517 \resizebox{}{}{translate}
518 \resizebox*{}{}{translate}
523 \rotatebox{}{translate}
527 % \savebox{}(,)[]{} %picture
529 \scalebox{}[]{translate}
545 \shortstack[]{translate}
552 %\subitem{} % unsupported theindex environment
554 \subparagraph[]{} % These "sub" versions of the sectioning commands weren't
555 \subparagraph*{} % in the original commandlist for some reason (adk)
560 %\subsubitem{} % unsupported theindex environment
566 \telephone{translate}
567 \textcircled{translate}
568 \textcolor[]{,,}{translate}
569 %\textcolor{}{} % reLyX doesn't care about this version
570 \textnormal{translate}
588 % \vector(,){} %picture
589 % \verb|| % reLyX needs \verb to be hardcoded
597 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
599 % This includes some AMSmath commands
601 % characters (not in math_hash.C)
606 % Math space (not in math_hash.C)
632 % \varrho isn't supported
657 %\ldots % already in non-math
661 %\label % already in non-math
670 \left % kind of takes an argument...
697 % \underline % already in non-Math list
751 \sb{} % equivalent to _
752 \sp{} % equivalent to ^
771 % \textrm % already in nonmath
806 % \end % already exist in non-Math part -Ak
835 % \begin % already in non-Math list
841 % \newcommand % already in non-Math list
882 \boldmath % This command's actually given in text mode
883 \unboldmath % This command's actually given in text mode
887 \mathnormal{} %not in lamport, but it should be safe
894 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
895 % There are some environments which reLyX doesn't have an equivalent for.
896 % However, *within* that environment, simple translatable LaTeX appears.
897 % (E.g., this doesn't include something like "picture" because the TeX
898 % parser can't (yet?) understand the parentheses as being delimiters of
899 % coordinates rather than plain text.)
900 % The environment names are placed in a "reLyXre" environment.
901 % There aren't very many of these; the idea is that the user can add
902 % user-defined environments in personal syntax files
905 % filecontents can only appear before \documentclass command, so not worth it
908 % slide only appears in the slides class, but if we don't put this in, then
909 % the whole document will be copied in TeX mode!
914 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
915 % There are some math commands which LyX doesn't support. If there's an
916 % equivalent command that it *does* support, then we might as well
918 % While copying things in math mode, reLyX will replace anything of the
919 % following commands with (exactly) whatever text is in braces, so, e.g.,
920 % $x\sb{a}$ will be converted to $x_{a}$ in the LyX file.
921 % In most cases, this simply avoids "evil red text" in math mode, but
922 % in a couple cases, it actually fixes things (e.g. '\ ')
923 % Tokens to replace should be "normal" tokens, backslash followed by a
924 % nonletter or one or more letters. (Token may also have * at the end.)
931 \ {\,\,} % That's '\ ', same length (6/18 quad) as two '\,' tokens
936 \ensuremath {} % If it's in math mode, \ensuremath is unnec.