]> git.lyx.org Git - lyx.git/blob - lib/syntax.default
fd6a3d8078601220212a631afd3e09bf9cea2800
[lyx.git] / lib / syntax.default
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
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
73 % Natbib citations can usually have two optional args
74 \citet[][]{}
75 \Citet[][]{}
76 \citet*[][]{}
77 \Citet*[][]{}
78
79 \citealt[][]{}
80 \Citealt[][]{}
81 \citealt*[][]{}
82 \Citealt*[][]{}
83
84 \citep[][]{}
85 \Citep[][]{}
86 \citep*[][]{}
87 \Citep*[][]{}
88
89 \citealp[][]{}
90 \Citealp[][]{}
91 \citealp*[][]{}
92 \Citealp*[][]{}
93
94 \citeauthor[]{}
95 \Citeauthor[]{}
96 \citeauthor*[]{}
97 \Citeauthor*[]{}
98
99 \citeyear[]{}
100 \citeyearpar[][]{}
101
102 % jurabib supports some natbib commands and additionally:
103 \fullcite[][]{}
104 \footcite[][]{}
105 \footcitet[][]{}
106 \footcitealt[][]{}
107 \footcitep[][]{}
108 \footcitealp[][]{}
109 \footciteauthor[]{}
110 \footciteyear[]{}
111 \footciteyearpar[][]{}
112 \citefield[]{}
113 \citetitle[]{}
114
115 \cline{ - }
116 \d{}
117 \documentclass[]{}[]
118 \documentstyle[]{}
119 \em
120 \emph{}
121 % \end{}   %reLyX will get confused if \end is found in this file!
122 \epsf{}
123 \epsfbox{}
124 \epsffile{}
125 \epsfig{}
126 \epsfxsize
127 \epsfysize
128 \fancyhead[]{}
129 \footnote[]{}
130 \footnotesize
131 \H{}
132 \hline
133 \huge
134 \Huge
135 \include{}
136 \includegraphics[,][,]{} % btw, LyX doesn't support graphicx, just graphics
137 \input{}
138 \it
139 \item[]  % Has two variants (jpw) Other variant is unsupported (adk)
140 \label{}
141 \large
142 \Large
143 \LARGE
144 \marginpar[]{}
145 \multicolumn{}{}{}
146 \newline
147 \noindent
148 \normalsize
149 \noun{}    % LyX style for nouns (appears in lyx-generated files)
150 \pageref{}
151 \psfig{}
152 \ref{}
153 \rm
154 \sc
155 \sf
156 \sl
157 \t{ }
158 \textmd{}   % I had to add these (adk)
159 \textbf{}   %         :
160 \textrm{}   %         :
161 \textsf{}   %         :
162 \texttt{}   %         :
163 \textup{}   %         :
164 \textit{}   %         :
165 \textsl{}   %         :
166 \textsc{}   %         :
167 \textbar
168 \textbackslash
169 \textgreater
170 \textless
171 \scriptsize
172 \small
173 \tiny
174 \tt
175 \u{}
176 \underbar{}  % LyX generated files use underbar instead of underline
177 \underline{}
178 \v{}
179
180
181
182 % Units of measure.  These get used only within the arguments of
183 % commands that take some length quantity.
184
185 \depth
186 \fill
187 \height
188 \totalheight
189 \width
190
191 %
192 % Length variables
193 %
194
195 \abovedisplay
196 \abovedisplayshortskip
197 \arraycolsep
198 \arrayrulewidth
199 \arraystretch
200 \baselineskip
201 \baselinestretch
202 \belowdisplayskip
203 \belowdisplayshortskip
204 \bigskipamount
205 \columnsep
206 \columnseprule
207 \dblfloatsep
208 \dbltextfloatsep
209 \doublerulesep
210 \evensidemargin
211 \fboxrule
212 \fboxsep
213 \floatsep
214 \footnotesep
215 \footskip
216 \headheight
217 \headsep
218 \hoffset
219 \intextsep
220 \itemindent
221 \itemsep
222 \jot
223 \labelsep
224 \labelwidth
225 \leftmargin
226 \leftmargini
227 \leftmarginii
228 \leftmarginiii
229 \leftmarginiv
230 \leftmarginv
231 \leftmarginvi
232 \listparindent
233 \marginpush
234 \marginparsep
235 \marginparwidth
236 \mathindent
237 \medskipamount
238 \oddsidemargin
239 \paperheight
240 \paperwidth
241 \parindent
242 \parsep
243 \parskip
244 \partopsep
245 \rightmargin
246 \smallskipamount
247 \tabbingsep
248 \tabcolsep
249 \textfloatsep
250 \textheight
251 \textwidth
252 \topmargin
253 \topsep
254 \topskip
255 \unitlength
256 \voffset
257
258 %
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
264 % object.
265 %
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
268
269 \ % A "\" followed by a space.
270 \,
271 \/
272 \AA
273 \aa
274 \AE
275 \ae
276 \bigskip
277 \copyright
278 \dag
279 \ddag
280 \DH
281 \dh
282 \DJ
283 \dj
284 \dotfill
285 \dots
286 \guillemotleft
287 \guillemotright
288 \guilsinglleft
289 \guilsinglright
290 \hrulefill
291 \lq
292 \medskip
293 \NG
294 \ng
295 \O
296 \o
297 \OE
298 \oe
299 \P
300 \pounds
301 \quad
302 \qquad
303 \quotedblbase
304 \quotesinglebase
305 \rq
306 \S
307 \SS
308 \smallskip
309 \ss
310 \textbullet
311 \textemdash
312 \textendash
313 \textexclamdown
314 \textperiodcenter
315 \textquestiondown
316 \textquotedblleft
317 \textquotedblright
318 \textquoteleft
319 \textquoteright
320 \textvisiblespace
321 \textcompwordmark
322 \textquotedbl
323 \TH
324 \th
325 \thechapter
326 \theenumi
327 \theenumii
328 \theenumiii
329 \theenumiv
330 \theequation
331 \thefigure
332 \thefootnote
333 \thempfootnote
334 \thepage
335 \theparagraph
336 \thepart
337 \thesection
338 \thesubsection
339 \thesubsubsection
340 \thesubparagraph
341 \thetable
342 \vfill
343
344
345 %
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
349 % files. (jpw)
350 %
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.
357 %
358 % These are the commands you're mostly likely to want to redefine in your own
359 % syntax files
360 %
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.
365
366 \abstractname
367 \addcontentsline{}{}{translate}
368 \address{}
369 \addtime{}
370 \addtocontents{}{translate}  % one argument was missing here (JMarc)
371 \addtocounter{}{}
372 \addtolength{}{}
373 \addvspace{}
374 \Alph{}
375 \alph{}
376 \alsoname
377 \and
378 \appendix % had to add this -Ak
379 \appendixname
380 \arabic{}
381 \author{}
382 \backmatter
383 %\bezier{}(,)(,)(,)    % picture
384 \bfdefault
385 \bibliographyunit[]
386 \bibname
387 \botfigrule
388 \bottomfraction
389 \caption[]{}
390 \cc{}
391 \ccname
392 \centering
393 \centerline{translate}
394 \chapter[]{}
395 \chapter*{}
396 \chaptername
397 \check{}
398 %\circle{}    % picture environment (JMarc)
399 %\circle*{}
400 \cleardoublepage
401 \clearpage
402 \closing{}
403 \color[]{,,}  % Two variants of this command and the next (jpw)
404 % \color{}    %  This variant doesn't matter to reLyX (adk)
405 \colorspec[]{,,}{}
406 %\colorspec{}{}    %  This variant doesn't matter to reLyX (adk)
407 %\contentsline{}{\numberline{}  }{}     % Appears only in .toc file (JMarc)
408 \contentsname
409 % \dashbox{}(,)[]{}   %picture
410 \date{}
411 \dblfigrule
412 \dblfloatpagefraction
413 \dbltopfraction
414 \def{}{}
415 \definecolor{}{}{,,}
416 \DescribeMacro{}
417 \discretionary{}{}{}
418 \encl{}
419 \enclname
420 \enlargethispage{}
421 \enlargethispage*{}
422 \ensuremath{}
423 \extracolsep{}
424 \fbox{translate}
425 \fcolorbox[]{,,}{,,}{}  % Two variants of this command
426 %\fcolorbox{}{}{}    %  This variant doesn't matter to reLyX (adk)
427 \figurename
428 \floatpagefraction
429 \flushbottom
430 \fnsymbol{}
431 \fontfamily{}
432 \fontseries{}
433 \fontshape{}
434 \fontsize{}{}
435 \footnotemark[]
436 \footnoterule
437 \footnotetext[]{translate}
438 % LaTeX has \frame{}, but beamer has \frame[]{}, so use the latter
439 \frame[]{translate}
440 \framebox[][]{translate} % Two variants of this command
441 %\framebox(,)[]{}    %  picture variant
442 \frenchspacing
443 \frontmatter
444 \fussy
445 \glossary{translate}
446 \glossaryentry{}{}       %only in .glo file (JMarc)
447 % \graphpaper[](,)(,)    %picture
448 \headtoname
449 \href{}{translate}       % from the hyperref package
450 \hspace{}
451 \hspace*{}
452 \hyphenation{}
453 \iflanguage{}{}{}
454 \ifthenelse
455 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
456 \indent
457 \index{}
458 \indexentry{}{}        % only in .idx files (JMarc)
459 \indexname
460 \indexspace
461 \invisible
462 \itdefault
463 % This variant of \item might break reLyX!
464 %  \item{}   % Only appears in unsupported theindex environment
465 \k{}
466 \kill
467 \labelnumi
468 \labelnumii
469 \labelnumiii
470 \labelnumiv
471 \labelitemi
472 \labelitemii
473 \labelitemiii
474 \labelitemiv
475 \language{}
476 % We need this because the arguments must not be interpreted
477 \let{}{}
478 % \line(,){}    %picture
479 \linebreak[]
480 \linethickness{}
481 \listfigurename
482 \listofalgorithms %AMStex?
483 \listoffigures
484 \listoftables
485 \listtablename
486 \location{}
487 \mainmatter
488 \makebox[][]{translate}
489 %  \makebox(,)[]{}     %picture variant
490 \makeglossary
491 \makeindex
492 \makelabel{translate}
493 \makelabels
494 \maketitle
495 \markboth{}{translate}
496 \markright{translate}
497 \mathversion{}
498 \mbox{translate}
499 \mddefault
500 % \multiput(,)(,){}{}     %picture
501 \name{}
502 \newboolean{}
503 \newcommand{}[][]{}
504 \newcommand*{}[][]{}
505 %\newcommand{}[]{}    % reLyX doesn't care about missing optarg
506 \newcounter{}[]
507 \newenvironment{}[][]{}{}
508 \newenvironment*{}[][]{}{}
509 % \newenvironment{}[]{}{}    % reLyX doesn't care about missing optarg
510 \newfont{}{ scaled }
511 \newlength{}
512 \newpage
513 \newsavebox{}
514 \newtheorem{}[]{translate}[]
515 \nocite{}
516 \nocorr
517 \nolinebreak[]
518 \nonfrenchspacing
519 \nopagebreak[]
520 \normalcolor
521 \normalfont
522 \normalmarginpar
523 \notesname
524 \numberline{}{}
525 \onecolumn
526 \onlynotes{}
527 \onlyslides{}
528 \opening{}
529 % \oval(,)[]   %picture
530 \pagebreak[]
531 \pagecolor[]{,,}
532 % \pagecolor{}    % reLyX doesn't care about this version
533 \pagename
534 \pagenumbering{}
535 \par
536 \paragraph[]{}
537 \paragraph*{}
538 %\parbox[]{}{}            % reLyX treats next line same as this one (adk)
539 \parbox[][][]{}{translate}
540 \part[]{}
541 \part*{}
542 \partname
543 \poptabs
544 \prefacename
545 \printindex
546 \protect
547 \providecommand{}[][]{}
548 \providecommand*{}[][]{}
549 \ps
550 \psfrag{}[][][][]{translate}
551 \psfrag*{}[][][][]{translate}
552 \pushtabs
553 % \put(,){}     %picture
554 \putbib[]
555 % \qbezier[](,)(,)(,)     %picture
556 \r{}
557 \raggedbottom
558 \raggedleft
559 \raggedright
560 \raisebox{}[][]{translate}
561 \reflectbox{translate}
562 \refname
563 \refstepcounter{}
564 \renewcommand{}[][]{}
565 \renewcommand*{}[][]{}
566 % \renewcommand{}[]{}   %reLyX doesn't care about variants
567 \renewenvironment{}[][]{}{}
568 \renewenvironment*{}[][]{}{}
569 % \renewenvironment{}[]{}{}
570 \resizebox{}{}{translate}
571 \resizebox*{}{}{translate}
572 \reversemarginpar
573 \rmdefault
574 \Roman{}
575 \roman{}
576 \rotatebox{}{translate}
577 \rule[]{}{}
578 \samepage
579 \savebox{}[][]{}
580 % \savebox{}(,)[]{}   %picture
581 \sbox{}{}
582 \scalebox{}[]{translate}
583 \scdefault
584 \section[]{}
585 \section*{}
586 \see
587 \seename
588 \selectfont
589 \selectlanguage{}
590 \setboolean{}{}
591 \setcounter{}{}
592 \setlength{}{}
593 \settime{}
594 \settodepth{}{}
595 \settoheight{}{}
596 \settowidth{}{}
597 \sfdefault
598 \shortstack[]{translate}
599 \showhyphens{}
600 \signature{}
601 \sldefault
602 \sloppy
603 \stepcounter{}
604 \stretch{}
605 %\subitem{}   % unsupported theindex environment
606 \subjectname
607 \subfigure[]{translate}
608 \subparagraph[]{}  % These "sub" versions of the sectioning commands weren't
609 \subparagraph*{}   % in the original commandlist for some reason (adk)
610 \subsection[]{}    %
611 \subsection*{}     %
612 \subsubsection[]{} %
613 \subsubsection*{}  %
614 %\subsubitem{}   % unsupported theindex environment
615 \suppressfloats[]
616 \symbol{}
617 \tablename
618 \tableofcontents
619 \tabularnewline[]
620 \telephone{translate}
621 \textcircled{translate}
622 \textcolor[]{,,}{translate}
623 %\textcolor{}{}      % reLyX doesn't care about this version
624 \textnormal{translate}
625 \textfraction
626 \thanks{translate}
627 \thicklines
628 \thinlines
629 \thispagestyle{}
630 \title{}
631 \today
632 \topfigrule
633 \topfraction
634 \ttdefault
635 \twocolumn[]
636 \updefault
637 \usebox{}
638 \usecounter{}
639 \usefont{}{}{}{}
640 \usepackage[]{}[]
641 \value{}
642 % \vector(,){}   %picture
643 % \verb||     % reLyX needs \verb to be hardcoded
644 % \verb*||
645 \visible
646 \vline
647 \vspace{}
648 \vspace*{}
649 \whiledo{}{}
650
651
652 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
653 % There are some environments which reLyX doesn't have an equivalent for.
654 % However, *within* that environment, simple translatable LaTeX appears.
655 % (E.g., this doesn't include something like "picture" because the TeX
656 % parser can't (yet?) understand the parentheses as being delimiters of
657 % coordinates rather than plain text.)
658 %    The environment names are placed in a "reLyXre" environment.
659 %    There aren't very many of these; the idea is that the user can add
660 % user-defined environments in personal syntax files
661
662 \begin{reLyXre}
663 % filecontents can only appear before \documentclass command, so not worth it
664 fussypar
665 sloppypar
666 % slide only appears in the slides class, but if we don't put this in, then
667 % the whole document will be copied in TeX mode!
668 slide
669 titlepage
670 \end{reLyXre}
671
672 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
673 % Keep bugging AndrĂ© until he adds 'support' for these in mathed,
674 % meaning that they can be removed from here.
675
676 \begin{reLyXmt}
677 \sb    {_}
678 \sp    {^}
679 \ensuremath   {}  % If it's in math mode, \ensuremath is unnec.
680 \end{reLyXmt}
681
682
683 % LaTeX environments.
684 % They have always one extra "argument":
685 % It contains "translate" if the contents of the environment contains normal
686 % LaTeX code that can be translated to LyX.
687 \begin{environments}
688 bibunit[]{translate}
689 psmatrix[]{}
690 \end{environments}
691
692 % Environments that start math mode.
693 % $...$, $$...$$, \(...\) and \[...\] are hardcoded in tex2lyx.
694 % The arguments are currently ignored.
695 \begin{mathenvironments}
696 equation
697 equation*
698 eqnarray
699 eqnarray*
700 align
701 align*
702 gather
703 gather*
704 multline
705 multline*
706 math
707 displaymath
708 flalign
709 flalign
710 % These require extra args
711 alignat
712 alignat*
713 xalignat
714 xalignat*
715 xxalignat
716 % These are not known by LyX but work nevertheless:
717 empheq
718 \end{mathenvironments}