]> git.lyx.org Git - lyx.git/blob - lib/syntax.default
Fix LyX paste from system clipboard when the file format does not match
[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 \Acrobatmenu{}{}         % from the hyperref package
368 \addcontentsline{}{}{translate}
369 \address{}
370 \addtime{}
371 \addtocontents{}{translate}  % one argument was missing here (JMarc)
372 \addtocounter{}{}
373 \addtolength{}{}
374 \addvspace{}
375 \Alph{}
376 \alph{}
377 \alsoname
378 \and
379 \appendix % had to add this -Ak
380 \appendixname
381 \arabic{}
382 \author{}
383 \backmatter
384 %\bezier{}(,)(,)(,)    % picture
385 \bfdefault
386 \bibliographyunit[]
387 \bibname
388 \botfigrule
389 \bottomfraction
390 \caption[]{}
391 \cc{}
392 \ccname
393 \centering
394 \centerline{translate}
395 \chapter[]{}
396 \chapter*{}
397 \chaptername
398 \check{}
399 %\circle{}    % picture environment (JMarc)
400 %\circle*{}
401 \cleardoublepage
402 \clearpage
403 \closing{}
404 \color[]{,,}  % Two variants of this command and the next (jpw)
405 % \color{}    %  This variant doesn't matter to reLyX (adk)
406 \colorspec[]{,,}{}
407 %\colorspec{}{}    %  This variant doesn't matter to reLyX (adk)
408 %\contentsline{}{\numberline{}  }{}     % Appears only in .toc file (JMarc)
409 \contentsname
410 % \dashbox{}(,)[]{}   %picture
411 \date{}
412 \dblfigrule
413 \dblfloatpagefraction
414 \dbltopfraction
415 \def{}{}
416 \definecolor{}{}{,,}
417 \DescribeMacro{}
418 \discretionary{}{}{}
419 \email[]{}
420 \encl{}
421 \enclname
422 \enlargethispage{}
423 \enlargethispage*{}
424 \ensuremath{}
425 \extracolsep{}
426 \fbox{translate}
427 \fcolorbox[]{,,}{,,}{}  % Two variants of this command
428 %\fcolorbox{}{}{}    %  This variant doesn't matter to reLyX (adk)
429 \figurename
430 \floatpagefraction
431 \flushbottom
432 \fnsymbol{}
433 \fontfamily{}
434 \fontseries{}
435 \fontshape{}
436 \fontsize{}{}
437 \footnotemark[]
438 \footnoterule
439 \footnotetext[]{translate}
440 % LaTeX has \frame{}, but beamer has \frame[]{}, so use the latter
441 \frame[]{translate}
442 \framebox[][]{translate} % Two variants of this command
443 %\framebox(,)[]{}    %  picture variant
444 \frenchspacing
445 \frontmatter
446 \fussy
447 \glossary{translate}
448 \glossaryentry{}{}       %only in .glo file (JMarc)
449 % \graphpaper[](,)(,)    %picture
450 \headtoname
451 \homepage[]{}
452 \href{}{translate}       % from the hyperref package
453 \hspace{}
454 \hspace*{}
455 \hyperdef{}{}{translate} % from the hyperref package
456 \hyperlink{}{translate}  % from the hyperref package
457 \hyperref{}{}{translate} % from the hyperref package
458 \hypertarget{}{translate} % from the hyperref package
459 \hyphenation{}
460 \iflanguage{}{}{}
461 \ifthenelse
462 \includegraphics*[,][,]{} % LyX 1.0 doesn't support clipping figures
463 \indent
464 \index{}
465 \indexentry{}{}        % only in .idx files (JMarc)
466 \indexname
467 \indexspace
468 \invisible
469 \itdefault
470 % This variant of \item might break reLyX!
471 %  \item{}   % Only appears in unsupported theindex environment
472 \k{}
473 \kill
474 \labelnumi
475 \labelnumii
476 \labelnumiii
477 \labelnumiv
478 \labelitemi
479 \labelitemii
480 \labelitemiii
481 \labelitemiv
482 \language{}
483 % We need this because the arguments must not be interpreted
484 \let{}{}
485 % \line(,){}    %picture
486 \linebreak[]
487 \linethickness{}
488 \listfigurename
489 \listofalgorithms %AMStex?
490 \listoffigures
491 \listoftables
492 \listtablename
493 \location{}
494 \mainmatter
495 \makebox[][]{translate}
496 %  \makebox(,)[]{}     %picture variant
497 \makeglossary
498 \makeindex
499 \makelabel{translate}
500 \makelabels
501 \maketitle
502 \markboth{}{translate}
503 \markright{translate}
504 \mathversion{}
505 \mbox{translate}
506 \mddefault
507 % \multiput(,)(,){}{}     %picture
508 \name{}
509 \newboolean{}
510 \newcommand{}[][]{}
511 \newcommand*{}[][]{}
512 %\newcommand{}[]{}    % reLyX doesn't care about missing optarg
513 \newcounter{}[]
514 \newenvironment{}[][]{}{}
515 \newenvironment*{}[][]{}{}
516 % \newenvironment{}[]{}{}    % reLyX doesn't care about missing optarg
517 \newfont{}{ scaled }
518 \newlength{}
519 \newpage
520 \newsavebox{}
521 \newtheorem{}[]{translate}[]
522 \nocite{}
523 \nocorr
524 \nolinebreak[]
525 \nonfrenchspacing
526 \nopagebreak[]
527 \normalcolor
528 \normalfont
529 \normalmarginpar
530 \notesname
531 \numberline{}{}
532 \onecolumn
533 \onlynotes{}
534 \onlyslides{}
535 \opening{}
536 % \oval(,)[]   %picture
537 \pagebreak[]
538 \pagecolor[]{,,}
539 % \pagecolor{}    % reLyX doesn't care about this version
540 \pagename
541 \pagenumbering{}
542 \par
543 \paragraph[]{}
544 \paragraph*{}
545 %\parbox[]{}{}            % reLyX treats next line same as this one (adk)
546 \parbox[][][]{}{translate}
547 \part[]{}
548 \part*{}
549 \partname
550 \pdfbookmark[]{}{}       % from the hyperref package
551 \pdfstringdef{}{}        % from the hyperref package
552 \poptabs
553 \prefacename
554 \printindex
555 \protect
556 \providecommand{}[][]{}
557 \providecommand*{}[][]{}
558 \ps
559 \psfrag{}[][][][]{translate}
560 \psfrag*{}[][][][]{translate}
561 \pushtabs
562 % \put(,){}     %picture
563 \putbib[]
564 % \qbezier[](,)(,)(,)     %picture
565 \r{}
566 \raggedbottom
567 \raggedleft
568 \raggedright
569 \raisebox{}[][]{translate}
570 \reflectbox{translate}
571 \refname
572 \refstepcounter{}
573 \renewcommand{}[][]{}
574 \renewcommand*{}[][]{}
575 % \renewcommand{}[]{}   %reLyX doesn't care about variants
576 \renewenvironment{}[][]{}{}
577 \renewenvironment*{}[][]{}{}
578 % \renewenvironment{}[]{}{}
579 \resizebox{}{}{translate}
580 \resizebox*{}{}{translate}
581 \reversemarginpar
582 \rmdefault
583 \Roman{}
584 \roman{}
585 \rotatebox{}{translate}
586 \rule[]{}{}
587 \samepage
588 \savebox{}[][]{}
589 % \savebox{}(,)[]{}   %picture
590 \sbox{}{}
591 \scalebox{}[]{translate}
592 \scdefault
593 \section[]{}
594 \section*{}
595 \see
596 \seename
597 \selectfont
598 \selectlanguage{}
599 \setboolean{}{}
600 \setcounter{}{}
601 \setlength{}{}
602 \settime{}
603 \settodepth{}{}
604 \settoheight{}{}
605 \settowidth{}{}
606 \sfdefault
607 \shortstack[]{translate}
608 \showhyphens{}
609 \signature{}
610 \sldefault
611 \sloppy
612 \stepcounter{}
613 \stretch{}
614 %\subitem{}   % unsupported theindex environment
615 \subjectname
616 \subfigure[]{translate}
617 \subparagraph[]{}  % These "sub" versions of the sectioning commands weren't
618 \subparagraph*{}   % in the original commandlist for some reason (adk)
619 \subsection[]{}    %
620 \subsection*{}     %
621 \subsubsection[]{} %
622 \subsubsection*{}  %
623 %\subsubitem{}   % unsupported theindex environment
624 \suppressfloats[]
625 \symbol{}
626 \tablename
627 \tableofcontents
628 \tabularnewline[]
629 \telephone{translate}
630 \texorpdfstring{}{}      % from the hyperref package
631 \textcircled{translate}
632 \textcolor[]{,,}{translate}
633 %\textcolor{}{}      % reLyX doesn't care about this version
634 \textnormal{translate}
635 \textfraction
636 \thanks{translate}
637 \thicklines
638 \thinlines
639 \thispagestyle{}
640 \title{}
641 \today
642 \topfigrule
643 \topfraction
644 \ttdefault
645 \twocolumn[]
646 \updefault
647 \usebox{}
648 \usecounter{}
649 \usefont{}{}{}{}
650 \usepackage[]{}[]
651 \value{}
652 % \vector(,){}   %picture
653 % \verb||     % reLyX needs \verb to be hardcoded
654 % \verb*||
655 \visible
656 \vline
657 \vspace{}
658 \vspace*{}
659 \whiledo{}{}
660
661
662 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
663 % There are some environments which reLyX doesn't have an equivalent for.
664 % However, *within* that environment, simple translatable LaTeX appears.
665 % (E.g., this doesn't include something like "picture" because the TeX
666 % parser can't (yet?) understand the parentheses as being delimiters of
667 % coordinates rather than plain text.)
668 %    The environment names are placed in a "reLyXre" environment.
669 %    There aren't very many of these; the idea is that the user can add
670 % user-defined environments in personal syntax files
671
672 \begin{reLyXre}
673 % filecontents can only appear before \documentclass command, so not worth it
674 fussypar
675 sloppypar
676 % slide only appears in the slides class, but if we don't put this in, then
677 % the whole document will be copied in TeX mode!
678 slide
679 titlepage
680 \end{reLyXre}
681
682 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
683 % Keep bugging AndrĂ© until he adds 'support' for these in mathed,
684 % meaning that they can be removed from here.
685
686 \begin{reLyXmt}
687 \sb    {_}
688 \sp    {^}
689 \ensuremath   {}  % If it's in math mode, \ensuremath is unnec.
690 \end{reLyXmt}
691
692
693 % LaTeX environments.
694 % They have always one extra "argument":
695 % It contains "translate" if the contents of the environment contains normal
696 % LaTeX code that can be translated to LyX.
697 \begin{environments}
698 bibunit[]{translate}
699 psmatrix[]{}
700 thebibliography{}
701 \end{environments}
702
703 % Environments that start math mode.
704 % $...$, $$...$$, \(...\) and \[...\] are hardcoded in tex2lyx.
705 % The arguments are currently ignored.
706 \begin{mathenvironments}
707 equation
708 equation*
709 eqnarray
710 eqnarray*
711 align
712 align*
713 gather
714 gather*
715 multline
716 multline*
717 math
718 displaymath
719 flalign
720 flalign
721 % These require extra args
722 alignat
723 alignat*
724 xalignat
725 xalignat*
726 xxalignat
727 % These are not known by LyX but work nevertheless:
728 empheq
729 \end{mathenvironments}
730
731 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
732 % Sweave stuff
733 \Sexpr{}
734 \SweaveOpts{}
735 \SweaveInput{}
736 \SweaveSyntax{}
737 \Scoderef{}
738
739 \Rcode{}
740 \Robject{}
741 \Rcommand{}
742 \Rfunction{}
743 \Rfunarg{}
744 \Rpackage{}
745 \Rclass{}
746 \Rmethod{}