]> git.lyx.org Git - lyx.git/blob - lib/reLyX/syntax.default
Treat \\tablenewline as \\newline inside tables
[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 \def{}{}
370 \definecolor{}{}{,,}
371 \discretionary{}{}{}
372 \encl{}
373 \enclname
374 \enlargethispage{}
375 \enlargethispage*{}
376 \ensuremath{}
377 \extracolsep{}
378 \fbox{translate}
379 \fcolorbox[]{,,}{,,}{}  % Two variants of this command
380 %\fcolorbox{}{}{}    %  This variant doesn't matter to reLyX (adk)
381 \figurename
382 \floatpagefraction
383 \flushbottom
384 \fnsymbol{}
385 \fontfamily{}
386 \fontseries{}
387 \fontshape{}
388 \fontsize{}{}
389 \footnotemark[]
390 \footnoterule
391 \footnotetext[]{translate}
392 \frame{translate}
393 \framebox[][]{translate} % Two variants of this command
394 %\framebox(,)[]{}    %  picture variant
395 \frenchspacing
396 \frontmatter
397 \fussy
398 \glossary{translate}
399 \glossaryentry{}{}       %only in .glo file (JMarc)
400 % \graphpaper[](,)(,)    %picture
401 \headtoname
402 \hspace{}
403 \hspace*{}
404 \hyphenation{}
405 \iflanguage{}{}{}
406 \ifthenelse
407 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
408 \indent
409 \index{}
410 \indexentry{}{}        % only in .idx files (JMarc)
411 \indexname
412 \indexspace
413 \invisible
414 \itdefault
415 % This variant of \item might break reLyX!
416 %  \item{}   % Only appears in unsupported theindex environment
417 \k{}
418 \kill
419 \labelnumi
420 \labelnumii
421 \labelnumiii
422 \labelnumiv
423 \labelitemi
424 \labelitemii
425 \labelitemiii
426 \labelitemiv
427 \language{}
428 % \line(,){}    %picture
429 \linebreak[]
430 \linethickness{}
431 \listfigurename
432 \listofalgorithms %AMStex?
433 \listoffigures
434 \listoftables
435 \listtablename
436 \location{}
437 \mainmatter
438 \makebox[][]{translate}
439 %  \makebox(,)[]{}     %picture variant
440 \makeglossary
441 \makeindex
442 \makelabel{translate}
443 \makelabels
444 \maketitle
445 \markboth{}{translate}
446 \markright{translate}
447 \mathversion{}
448 \mbox{translate}
449 \mddefault
450 % \multiput(,)(,){}{}     %picture
451 \name{}
452 \newboolean{}
453 \newcommand{}[][]{}
454 \newcommand*{}[][]{}
455 %\newcommand{}[]{}    % reLyX doesn't care about missing optarg
456 \newcounter{}[]
457 \newenvironment{}[][]{}{}
458 \newenvironment*{}[][]{}{}
459 % \newenvironment{}[]{}{}    % reLyX doesn't care about missing optarg
460 \newfont{}{ scaled }
461 \newlength{}
462 \newpage
463 \newsavebox{}
464 \newtheorem{}[]{translate}[]
465 \nocite{}
466 \nocorr
467 \nolinebreak[]
468 \nonfrenchspacing
469 \nopagebreak[]
470 \normalcolor
471 \normalfont
472 \normalmarginpar
473 \notesname
474 \numberline{}{}
475 \onecolumn
476 \onlynotes{}
477 \onlyslides{}
478 \opening{}
479 % \oval(,)[]   %picture
480 \pagebreak[]
481 \pagecolor[]{,,}
482 % \pagecolor{}    % reLyX doesn't care about this version
483 \pagename
484 \pagenumbering{}
485 \par
486 \paragraph[]{}
487 \paragraph*{}
488 %\parbox[]{}{}            % reLyX treats next line same as this one (adk)
489 \parbox[][][]{}{translate}
490 \part[]{}
491 \part*{}
492 \partname
493 \poptabs
494 \prefacename
495 \printindex
496 \protect
497 \providecommand{}[][]{}
498 \providecommand*{}[][]{}
499 \ps
500 \pushtabs
501 % \put(,){}     %picture
502 % \qbezier[](,)(,)(,)     %picture
503 \r{}
504 \raggedbottom
505 \raggedleft
506 \raggedright
507 \raisebox{}[][]{translate}
508 \reflectbox{translate}
509 \refname
510 \refstepcounter{}
511 \renewcommand{}[][]{}
512 \renewcommand*{}[][]{}
513 % \renewcommand{}[]{}   %reLyX doesn't care about variants
514 \renewenvironment{}[][]{}{}
515 \renewenvironment*{}[][]{}{}
516 % \renewenvironment{}[]{}{}
517 \resizebox{}{}{translate}
518 \resizebox*{}{}{translate}
519 \reversemarginpar
520 \rmdefault
521 \Roman{}
522 \roman{}
523 \rotatebox{}{translate}
524 \rule[]{}{}
525 \samepage
526 \savebox{}[][]{}
527 % \savebox{}(,)[]{}   %picture
528 \sbox{}{}
529 \scalebox{}[]{translate}
530 \scdefault
531 \section[]{}
532 \section*{}
533 \see
534 \seename
535 \selectfont
536 \selectlanguage{}
537 \setboolean{}{}
538 \setcounter{}{}
539 \setlength{}{}
540 \settime{}
541 \settodepth{}{}
542 \settoheight{}{}
543 \settowidth{}{}
544 \sfdefault
545 \shortstack[]{translate}
546 \showhyphens{}
547 \signature{}
548 \sldefault
549 \sloppy
550 \stepcounter{}
551 \stretch{}
552 %\subitem{}   % unsupported theindex environment
553 \subjectname
554 \subparagraph[]{}  % These "sub" versions of the sectioning commands weren't
555 \subparagraph*{}   % in the original commandlist for some reason (adk)
556 \subsection[]{}    %
557 \subsection*{}     %
558 \subsubsection[]{} %
559 \subsubsection*{}  %
560 %\subsubitem{}   % unsupported theindex environment
561 \suppressfloats[]
562 \symbol{}
563 \tablename
564 \tableofcontents
565 \tabularnewline[]
566 \telephone{translate}
567 \textcircled{translate}
568 \textcolor[]{,,}{translate}
569 %\textcolor{}{}      % reLyX doesn't care about this version
570 \textnormal{translate}
571 \textfraction
572 \thanks{}
573 \thicklines
574 \thinlines
575 \thispagestyle{}
576 \title{}
577 \today
578 \topfigrule
579 \topfraction
580 \ttdefault
581 \twocolumn[]
582 \updefault
583 \usebox{}
584 \usecounter{}
585 \usefont{}{}{}{}
586 \usepackage[]{}[]
587 \value{}
588 % \vector(,){}   %picture
589 % \verb||     % reLyX needs \verb to be hardcoded
590 % \verb*||
591 \visible
592 \vline
593 \vspace{}
594 \vspace*{}
595 \whiledo{}{}
596
597
598 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
599 % There are some environments which reLyX doesn't have an equivalent for.
600 % However, *within* that environment, simple translatable LaTeX appears.
601 % (E.g., this doesn't include something like "picture" because the TeX
602 % parser can't (yet?) understand the parentheses as being delimiters of
603 % coordinates rather than plain text.)
604 %    The environment names are placed in a "reLyXre" environment.
605 %    There aren't very many of these; the idea is that the user can add
606 % user-defined environments in personal syntax files
607
608 \begin{reLyXre}
609 % filecontents can only appear before \documentclass command, so not worth it
610 fussypar
611 sloppypar
612 % slide only appears in the slides class, but if we don't put this in, then
613 % the whole document will be copied in TeX mode!
614 slide
615 titlepage
616 \end{reLyXre}
617
618 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
619 % There are some math commands which LyX doesn't support. If there's an
620 % equivalent command that it *does* support, then we might as well
621 % translate it.
622 %    While copying things in math mode, reLyX will replace anything of the
623 % following commands with (exactly) whatever text is in braces, so, e.g.,
624 % $x\sb{a}$ will be converted to $x_{a}$ in the LyX file.
625 %    In most cases, this simply avoids "evil red text" in math mode, but
626 % in a couple cases, it actually fixes things (e.g. '\ ')
627 %    Tokens to replace should be "normal" tokens, backslash followed by a
628 % nonletter or one or more letters. (Token may also have * at the end.)
629
630 \begin{reLyXmt}
631 \sb    {_}
632 \sp    {^}
633 \|     {\Vert}
634 \vert  {|}
635 \      {\,\,}    % That's '\ ', same length (6/18 quad) as two '\,' tokens
636 \to    {\rightarrow}
637 \gets  {\leftarrow}
638 \le    {\leq}
639 \ge    {\geq}
640 \ensuremath   {}  % If it's in math mode, \ensuremath is unnec.
641 \end{reLyXmt}