]> git.lyx.org Git - lyx.git/blob - lib/reLyX/syntax.default
Improvements in the installation process; still not perfect.
[lyx.git] / lib / reLyX / syntax.default
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
6 %
7 % Also had to add textrm etc. commands and many size commands (like \small)
8 %
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
11 % arguments...
12 %
13 %    There are almost certainly commands in here we don't need -- but that
14 % shouldn't matter
15 %
16 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17
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. 
21 \#
22 \$
23 \%
24 \&
25 \@
26 \_
27 \{
28 \}
29 ~
30
31 \hfill
32 \i
33 \j
34 \L
35 \l
36 \LaTeX
37 \LaTeXe
38 \LyX
39 \ldots
40 \TeX
41
42 \"{}
43 $$
44 \'{}
45 \(
46 \)
47 \-
48 \.{}
49 \={}
50 \[
51 \]
52 \\[]
53 \\*[]
54 \^{}
55 \`{}
56 \~{}
57 \b{}
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{}
61 %\begin{}{}{}
62 %\begin{}[][][]{}
63 %\begin{}(,)
64 %\begin{}(,)(,)
65 %\begin{}{}[]{}
66 \bf
67 \bibitem[]{}
68 \bibliography{}
69 \bibliographystyle{}
70 \c{}
71 \cite[]{}
72 \cline{ - }
73 \d{}
74 \documentclass[]{}[]
75 \documentstyle[]{}
76 \em
77 \emph{}
78 % \end{}   %reLyX will get confused if \end is found in this file!
79 \epsf{}
80 \epsfbox{}
81 \epsffile{}
82 \epsfig{}
83 \epsfxsize
84 \epsfysize
85 \footnote[]{}
86 \footnotesize
87 \H{}
88 \hline
89 \huge
90 \Huge
91 \include{}
92 \includegraphics[,][,]{} % btw, LyX doesn't support graphicx, just graphics
93 \input{}
94 \it
95 \item[]  % Has two variants (jpw) Other variant is unsupported (adk)
96 \label{}
97 \large
98 \Large
99 \LARGE
100 \marginpar[]{}
101 \multicolumn{}{}{}
102 \newline
103 \noindent
104 \normalsize
105 \noun{}    % LyX style for nouns (appears in lyx-generated files)
106 \pageref{}
107 \psfig{}
108 \ref{}
109 \rm
110 \sc
111 \sf
112 \sl
113 \t{ }
114 \textmd{}   % I had to add these (adk)
115 \textbf{}   %         :
116 \textrm{}   %         :
117 \textsf{}   %         :
118 \texttt{}   %         :
119 \textup{}   %         :
120 \textit{}   %         :
121 \textsl{}   %         :
122 \textsc{}   %         :
123 \textbar
124 \textbackslash
125 \textgreater
126 \textless
127 \scriptsize
128 \small
129 \tiny
130 \tt
131 \u{}
132 \underbar{}  % LyX generated files use underbar instead of underline
133 \underline{}
134 \v{}
135
136
137
138 % Units of measure.  These get used only within the arguments of
139 % commands that take some length quantity.
140
141 \depth
142 \fill
143 \height
144 \totalheight
145 \width
146
147 %
148 % Length variables
149 %
150
151 \abovedisplay
152 \abovedisplayshortskip
153 \arraycolsep
154 \arrayrulewidth
155 \arraystretch
156 \baselineskip
157 \baselinestretch
158 \belowdisplayskip
159 \belowdisplayshortskip
160 \bigskipamount
161 \columnsep
162 \columnseprule
163 \dblfloatsep
164 \dbltextfloatsep
165 \doublerulesep
166 \evensidemargin
167 \fboxrule
168 \fboxsep
169 \floatsep
170 \footnotesep
171 \footskip
172 \headheight
173 \headsep
174 \hoffset
175 \intextsep
176 \itemindent
177 \itemsep
178 \jot
179 \labelsep
180 \labelwidth
181 \leftmargin
182 \leftmargini
183 \leftmarginii
184 \leftmarginiii
185 \leftmarginiv
186 \leftmarginv
187 \leftmarginvi
188 \listparindent
189 \marginpush
190 \marginparsep
191 \marginparwidth
192 \mathindent
193 \medskipamount
194 \oddsidemargin
195 \paperheight
196 \paperwidth
197 \parindent
198 \parsep
199 \parskip
200 \partopsep
201 \rightmargin
202 \smallskipamount
203 \tabbingsep
204 \tabcolsep
205 \textfloatsep
206 \textheight
207 \textwidth
208 \topmargin
209 \topsep
210 \topskip
211 \unitlength
212 \voffset
213
214 %
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
220 % object.
221 %
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
224
225 \ % A "\" followed by a space.
226 \,
227 \/
228 \AA
229 \aa
230 \AE
231 \ae
232 \bigskip
233 \copyright
234 \dag
235 \ddag
236 \DH
237 \dh
238 \DJ
239 \dj
240 \dotfill
241 \dots
242 \guillemotleft
243 \guillemotright
244 \guilsinglleft
245 \guilsinglright
246 \hrulefill
247 \lq
248 \medskip
249 \NG
250 \ng
251 \O
252 \o
253 \OE
254 \oe
255 \P
256 \pounds
257 \quad
258 \qquad
259 \quotedblbase
260 \quotesinglebase
261 \rq
262 \S
263 \SS
264 \smallskip
265 \ss
266 \textbullet
267 \textemdash
268 \textendash
269 \textexclamdown
270 \textperiodcenter
271 \textquestiondown
272 \textquotedblleft
273 \textquotedblright
274 \textquoteleft
275 \textquoteright
276 \textvisiblespace
277 \textcompwordmark
278 \textquotedbl
279 \TH
280 \th
281 \thechapter
282 \theenumi
283 \theenumii
284 \theenumiii
285 \theenumiv
286 \theequation
287 \thefigure
288 \thefootnote
289 \thempfootnote
290 \thepage
291 \theparagraph
292 \thepart
293 \thesection
294 \thesubsection
295 \thesubsubsection
296 \thesubparagraph
297 \thetable
298 \vfill
299
300
301 %
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
305 % files. (jpw)
306 %
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.
313 %
314 % These are the commands you're mostly likely to want to redefine in your own
315 % syntax files
316 %
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.
321
322 \abstractname
323 \addcontentsline{}{}{translate}
324 \address{}
325 \addtime{}
326 \addtocontents{}{translate}  % one argument was missing here (JMarc)
327 \addtocounter{}{}
328 \addtolength{}{}
329 \addvspace{}
330 \Alph{}
331 \alph{}
332 \alsoname
333 \and
334 \appendix % had to add this -Ak
335 \appendixname
336 \arabic{}
337 \author{}
338 \backmatter
339 %\bezier{}(,)(,)(,)    % picture
340 \bfdefault
341 \bibname
342 \botfigrule
343 \bottomfraction
344 \caption[]{}
345 \cc{}
346 \ccname
347 \centering
348 \centerline{translate}
349 \chapter[]{}
350 \chapter*{}
351 \chaptername
352 \check{}
353 %\circle{}    % picture environment (JMarc)
354 %\circle*{}
355 \cleardoublepage
356 \clearpage
357 \closing{}
358 \color[]{,,}  % Two variants of this command and the next (jpw)
359 % \color{}    %  This variant doesn't matter to reLyX (adk)
360 \colorspec[]{,,}{}
361 %\colorspec{}{}    %  This variant doesn't matter to reLyX (adk)
362 %\contentsline{}{\numberline{}  }{}     % Appears only in .toc file (JMarc)
363 \contentsname
364 % \dashbox{}(,)[]{}   %picture
365 \date{}
366 \dblfigrule
367 \dblfloatpagefraction
368 \dbltopfraction
369 \definecolor{}{}{,,}
370 \discretionary{}{}{}
371 \encl{}
372 \enclname
373 \enlargethispage{}
374 \enlargethispage*{}
375 \ensuremath{}
376 \extracolsep{}
377 \fbox{translate}
378 \fcolorbox[]{,,}{,,}{}  % Two variants of this command
379 %\fcolorbox{}{}{}    %  This variant doesn't matter to reLyX (adk)
380 \figurename
381 \floatpagefraction
382 \flushbottom
383 \fnsymbol{}
384 \fontfamily{}
385 \fontseries{}
386 \fontshape{}
387 \fontsize{}{}
388 \footnotemark[]
389 \footnoterule
390 \footnotetext[]{translate}
391 \frame{translate}
392 \framebox[][]{translate} % Two variants of this command
393 %\framebox(,)[]{}    %  picture variant
394 \frenchspacing
395 \frontmatter
396 \fussy
397 \glossary{translate}
398 \glossaryentry{}{}       %only in .glo file (JMarc)
399 % \graphpaper[](,)(,)    %picture
400 \headtoname
401 \hspace{}
402 \hspace*{}
403 \hyphenation{}
404 \iflanguage{}{}{}
405 \ifthenelse
406 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
407 \indent
408 \index{}
409 \indexentry{}{}        % only in .idx files (JMarc)
410 \indexname
411 \indexspace
412 \invisible
413 \itdefault
414 % This variant of \item might break reLyX!
415 %  \item{}   % Only appears in unsupported theindex environment
416 \k{}
417 \kill
418 \labelnumi
419 \labelnumii
420 \labelnumiii
421 \labelnumiv
422 \labelitemi
423 \labelitemii
424 \labelitemiii
425 \labelitemiv
426 \language{}
427 % \line(,){}    %picture
428 \linebreak[]
429 \linethickness{}
430 \listfigurename
431 \listofalgorithms %AMStex?
432 \listoffigures
433 \listoftables
434 \listtablename
435 \location{}
436 \mainmatter
437 \makebox[][]{translate}
438 %  \makebox(,)[]{}     %picture variant
439 \makeglossary
440 \makeindex
441 \makelabel{translate}
442 \makelabels
443 \maketitle
444 \markboth{}{translate}
445 \markright{translate}
446 \mathversion{}
447 \mbox{translate}
448 \mddefault
449 % \multiput(,)(,){}{}     %picture
450 \name{}
451 \newboolean{}
452 \newcommand{}[][]{}
453 \newcommand*{}[][]{}
454 %\newcommand{}[]{}    % reLyX doesn't care about missing optarg
455 \newcounter{}[]
456 \newenvironment{}[][]{}{}
457 \newenvironment*{}[][]{}{}
458 % \newenvironment{}[]{}{}    % reLyX doesn't care about missing optarg
459 \newfont{}{ scaled }
460 \newlength{}
461 \newpage
462 \newsavebox{}
463 \newtheorem{}[]{translate}[]
464 \nocite{}
465 \nocorr
466 \nolinebreak[]
467 \nonfrenchspacing
468 \nopagebreak[]
469 \normalcolor
470 \normalfont
471 \normalmarginpar
472 \notesname
473 \numberline{}{}
474 \onecolumn
475 \onlynotes{}
476 \onlyslides{}
477 \opening{}
478 % \oval(,)[]   %picture
479 \pagebreak[]
480 \pagecolor[]{,,}
481 % \pagecolor{}    % reLyX doesn't care about this version
482 \pagename
483 \pagenumbering{}
484 \par
485 \paragraph[]{}
486 \paragraph*{}
487 %\parbox[]{}{}            % reLyX treats next line same as this one (adk)
488 \parbox[][][]{}{translate}
489 \part[]{}
490 \part*{}
491 \partname
492 \poptabs
493 \prefacename
494 \printindex
495 \protect
496 \providecommand{}[][]{}
497 \providecommand*{}[][]{}
498 \ps
499 \pushtabs
500 % \put(,){}     %picture
501 % \qbezier[](,)(,)(,)     %picture
502 \r{}
503 \raggedbottom
504 \raggedleft
505 \raggedright
506 \raisebox{}[][]{translate}
507 \reflectbox{translate}
508 \refname
509 \refstepcounter{}
510 \renewcommand{}[][]{}
511 \renewcommand*{}[][]{}
512 % \renewcommand{}[]{}   %reLyX doesn't care about variants
513 \renewenvironment{}[][]{}{}
514 \renewenvironment*{}[][]{}{}
515 % \renewenvironment{}[]{}{}
516 \resizebox{}{}{translate}
517 \resizebox*{}{}{translate}
518 \reversemarginpar
519 \rmdefault
520 \Roman{}
521 \roman{}
522 \rotatebox{}{translate}
523 \rule[]{}{}
524 \samepage
525 \savebox{}[][]{}
526 % \savebox{}(,)[]{}   %picture
527 \sbox{}{}
528 \scalebox{}[]{translate}
529 \scdefault
530 \section[]{}
531 \section*{}
532 \see
533 \seename
534 \selectfont
535 \selectlanguage{}
536 \setboolean{}{}
537 \setcounter{}{}
538 \setlength{}{}
539 \settime{}
540 \settodepth{}{}
541 \settoheight{}{}
542 \settowidth{}{}
543 \sfdefault
544 \shortstack[]{translate}
545 \showhyphens{}
546 \signature{}
547 \sldefault
548 \sloppy
549 \stepcounter{}
550 \stretch{}
551 %\subitem{}   % unsupported theindex environment
552 \subjectname
553 \subparagraph[]{}  % These "sub" versions of the sectioning commands weren't
554 \subparagraph*{}   % in the original commandlist for some reason (adk)
555 \subsection[]{}    %
556 \subsection*{}     %
557 \subsubsection[]{} %
558 \subsubsection*{}  %
559 %\subsubitem{}   % unsupported theindex environment
560 \suppressfloats[]
561 \symbol{}
562 \tablename
563 \tableofcontents
564 \tabularnewline[]
565 \telephone{translate}
566 \textcircled{translate}
567 \textcolor[]{,,}{translate}
568 %\textcolor{}{}      % reLyX doesn't care about this version
569 \textnormal{translate}
570 \textfraction
571 \thanks{}
572 \thicklines
573 \thinlines
574 \thispagestyle{}
575 \title{}
576 \today
577 \topfigrule
578 \topfraction
579 \ttdefault
580 \twocolumn[]
581 \updefault
582 \usebox{}
583 \usecounter{}
584 \usefont{}{}{}{}
585 \usepackage[]{}[]
586 \value{}
587 % \vector(,){}   %picture
588 % \verb||     % reLyX needs \verb to be hardcoded
589 % \verb*||
590 \visible
591 \vline
592 \vspace{}
593 \vspace*{}
594 \whiledo{}{}
595
596 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
597 % MATH COMMANDS
598 % This includes some AMSmath commands
599
600 % characters (not in math_hash.C)
601 ^{}
602 _{}
603 &
604
605 % Math space (not in math_hash.C)
606 \:
607 \;
608 \!
609
610 % Greek letters
611
612 \alpha
613 \beta
614 \gamma
615 \delta
616 \epsilon
617 \varepsilon
618 \zeta
619 \eta
620 \theta
621 \vartheta
622 \iota
623 \kappa
624 \lambda
625 \mu
626 \nu
627 \xi
628 \pi
629 \varpi
630 \rho
631 % \varrho isn't supported
632 \sigma
633 \varsigma
634 \tau
635 \upsilon
636 \phi
637 \varphi
638 \chi
639 \psi
640 \omega
641
642 \Delta
643 \Omega
644 \Upsilon
645 \Theta
646 \Lambda
647 \Sigma
648 \Gamma
649 \Pi
650 \Phi
651 \Psi
652 \Xi
653
654 % Other stuff
655 %\setminus
656 %\ldots    % already in non-math
657 \limits
658 \stackrel{}{}
659 %\ll
660 %\label  % already in non-math
661 \lceil
662 \aleph
663 \sqrt[]{}
664 \times
665 \subset
666 \supset
667 \spadesuit
668 \Re
669 \left   % kind of takes an argument...
670 \smile
671 \exists
672 \Vert
673 \uplus
674 \ell
675 \langle
676 \arccos
677 \sup
678 \sharp
679 \sqcup
680 \sqcap
681 \approx
682 \triangleleft
683 \triangleright
684 \tilde{}
685 \emptyset
686 \triangle
687 \limsup
688 \partial
689 \parallel
690 \infty
691 \leftharpoonup
692 \searrow
693 \swarrow
694 \top
695 \Rightarrow
696 % \underline   % already in non-Math list
697 \underbrace{}
698 \acute{}
699 \angle
700 \exp
701 \leftarrow
702 \prime
703 \int
704 \longleftarrow
705 \leftrightarrow
706 \longrightarrow
707 \longleftrightarrow
708 \widehat{}
709 \sin
710 \asymp
711 \nolimits
712 \perp
713 \wedge
714 \ln
715 \widetilde{}
716 \natural
717 \uparrow
718 \updownarrow
719 \star
720 \leftharpoondown
721 \wp
722 \not
723 \tan
724 \rceil
725 \lfloor
726 \rightleftharpoons
727 \cos
728 \sec
729 \succ
730 \cdots
731 \ker
732 \forall
733 \liminf
734 \Uparrow
735 \right
736 \Updownarrow
737 \Pr
738 \nabla
739 \arcsin
740 \arctan
741 \flat
742 \check{}
743 \rangle
744 \cot
745 \cdot
746 \clubsuit
747 \in
748 \ni
749 \Downarrow
750 \sb{}   % equivalent to _
751 \sp{}   % equivalent to ^
752 \sim
753 \sum
754 \models
755 \nearrow
756 \nwarrow
757 \max
758 \Im
759 \lim
760 \rightharpoonup
761 \cap
762 \cup
763 \prec
764 \wr
765 \inf
766 \bigoplus
767 \biguplus
768 \bigotimes
769 \rightarrow
770 % \textrm    % already in nonmath
771 \simeq
772 \succeq
773 \notin
774 \subseteq
775 \supseteq
776 \sqsubseteq
777 \sqsupseteq
778 \leq
779 \surd
780 \ddots
781 \bot
782 \bullet
783 \bigodot
784 \sinh
785 \jmath
786 \mp
787 \pm
788 \nonumber
789 \breve{}
790 \bigvee
791 \bowtie
792 \bigwedge
793 \frown
794 \rightharpoondown
795 \det
796 \dot{}
797 \ddot{}
798 \lg
799 \log
800 \oplus
801 \ominus
802 \otimes
803 \diamondsuit
804 \rfloor
805 % \end  % already exist in non-Math part -Ak
806 \hat{}
807 \tanh
808 \vdots
809 \bigcap
810 \bigcup
811 \bigsqcup
812 \heartsuit
813 \longmapsto
814 \bigtriangleup
815 \preceq
816 \odot
817 \oint
818 \grave{}
819 \pmod{}
820 \prod
821 \frac{}{}
822 \csc
823 \circ
824 \min
825 \overline{}
826 \arg
827 \overbrace{}
828 \amalg
829 \vee
830 \equiv
831 \downarrow
832 \imath
833 \propto
834 % \begin      % already in non-Math list
835 \neq
836 \hookleftarrow
837 \hookrightarrow
838 \bigtriangledown
839 \bar{}
840 % \newcommand   % already in non-Math list
841 \overleftarrow
842 \overrightarrow
843 \Leftarrow
844 \Longleftarrow
845 \Leftrightarrow
846 \Longrightarrow
847 \neg
848 \bigcirc
849 \Longleftrightarrow
850 \dagger
851 \ddagger
852 \hbar
853 \coprod
854 \cosh
855 \coth
856 \cong
857 \vec{}
858 \dim
859 \mid
860 \hom
861 \bmod
862 \quad
863 \doteq
864 \qquad
865 \mapsto
866 \backslash
867 \diamond
868 \geq
869 \deg
870 \gcd
871 \gg
872 \div
873 \dashv
874 \oslash
875 \vdash
876
877 % Font changes
878 \mathbf{}
879 \mathsf{}
880 \mathcal{}
881 \boldmath     % This command's actually given in text mode
882 \unboldmath   % This command's actually given in text mode
883 \mathrm{}
884 \mathtt{}
885 \mathit{}
886 \mathnormal{}  %not in lamport, but it should be safe
887 \scriptstyle
888 \scriptscriptstyle
889 \textstyle
890 \displaystyle
891
892
893 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
894 % There are some environments which reLyX doesn't have an equivalent for.
895 % However, *within* that environment, simple translatable LaTeX appears.
896 % (E.g., this doesn't include something like "picture" because the TeX
897 % parser can't (yet?) understand the parentheses as being delimiters of
898 % coordinates rather than plain text.)
899 %    The environment names are placed in a "reLyXre" environment.
900 %    There aren't very many of these; the idea is that the user can add
901 % user-defined environments in personal syntax files
902
903 \begin{reLyXre}
904 % filecontents can only appear before \documentclass command, so not worth it
905 fussypar
906 sloppypar
907 % slide only appears in the slides class, but if we don't put this in, then
908 % the whole document will be copied in TeX mode!
909 slide
910 titlepage
911 \end{reLyXre}
912
913 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
914 % There are some math commands which LyX doesn't support. If there's an
915 % equivalent command that it *does* support, then we might as well
916 % translate it.
917 %    While copying things in math mode, reLyX will replace anything of the
918 % following commands with (exactly) whatever text is in braces, so, e.g.,
919 % $x\sb{a}$ will be converted to $x_{a}$ in the LyX file.
920 %    In most cases, this simply avoids "evil red text" in math mode, but
921 % in a couple cases, it actually fixes things (e.g. '\ ')
922 %    Tokens to replace should be "normal" tokens, backslash followed by a
923 % nonletter or one or more letters. (Token may also have * at the end.)
924
925 \begin{reLyXmt}
926 \sb    {_}
927 \sp    {^}
928 \|     {\Vert}
929 \vert  {|}
930 \      {\,\,}    % That's '\ ', same length (6/18 quad) as two '\,' tokens
931 \to    {\rightarrow}
932 \gets  {\leftarrow}
933 \le    {\leq}
934 \ge    {\geq}
935 \ensuremath   {}  % If it's in math mode, \ensuremath is unnec.
936 \end{reLyXmt}