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