]> git.lyx.org Git - lyx.git/blob - src/lyx_sty.C
Support lgathered and rgathered math environments
[lyx.git] / src / lyx_sty.C
1 /**
2  * \file lyx_sty.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Lars Gullik Bjønnes
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "lyx_sty.h"
14
15 using std::string;
16
17
18 //\NeedsTeXFormat{LaTeX2e}
19 //\ProvidesPackage{lyx}[1996/01/11 LLE v0.2 (LyX LaTeX Extensions)]
20 //\message{LyX LaTeX Extensions (LLE v0.2) of 11-Jan-1996.}
21
22 string const lyx_def =
23         "\\providecommand{\\LyX}{L\\kern-.1667em\\lower.25em\\hbox{Y}\\kern-.125emX\\@}";
24
25 string const lyxline_def =
26         "\\newcommand{\\lyxline}[1]{\n"
27         "  {#1 \\vspace{1ex} \\hrule width \\columnwidth \\vspace{1ex}}\n"
28         "}";
29
30 string const noun_def = "\\newcommand{\\noun}[1]{\\textsc{#1}}";
31
32 string const lyxarrow_def =
33         "\\newcommand{\\lyxarrow}{\\leavevmode\\,$\\triangleright$\\,\\allowbreak}";
34
35 // for quotes without babel. This does not give perfect results, but
36 // anybody serious about non-english quotes should use babel (JMarc).
37
38 string const quotedblbase_def =
39         "\\ProvideTextCommandDefault{\\quotedblbase}{%\n"
40         "  \\raisebox{-1.4ex}[1ex][.5ex]{\\textquotedblright}%\n"
41         "  \\penalty10000\\hskip0em\\relax%\n"
42         "}";
43
44 string const quotesinglbase_def =
45         "\\ProvideTextCommandDefault{\\quotesinglbase}{%\n"
46         "  \\raisebox{-1.4ex}[1ex][.5ex]{\\textquoteright}%\n"
47         "  \\penalty10000\\hskip0em\\relax%\n"
48         "}";
49
50 string const guillemotleft_def =
51         "\\ProvideTextCommandDefault{\\guillemotleft}{%\n"
52         "  {\\usefont{U}{lasy}{m}{n}\\char'50\\kern-.15em\\char'50}%\n"
53         "\\penalty10000\\hskip0pt\\relax%\n"
54         "}";
55
56 string const guillemotright_def =
57         "\\ProvideTextCommandDefault{\\guillemotright}{%\n"
58         "  \\penalty10000\\hskip0pt%\n"
59         "  {\\usefont{U}{lasy}{m}{n}\\char'51\\kern-.15em\\char'51}%\n"
60         "}";
61
62 string const guilsinglleft_def =
63         "\\ProvideTextCommandDefault{\\guilsinglleft}{%\n"
64         "  {\\usefont{U}{lasy}{m}{n}\\char'50}%\n"
65         "  \\penalty10000\\hskip0pt\\relax%\n"
66         "}";
67
68 string const guilsinglright_def =
69         "\\ProvideTextCommandDefault{\\guilsinglright}{%\n"
70         "  \\penalty10000\\hskip0pt%\n"
71         "  {\\usefont{U}{lasy}{m}{n}\\char'51}%\n"
72         "}";
73
74 string const paragraphleftindent_def =
75         "\\newenvironment{LyXParagraphLeftIndent}[1]%\n"
76         "{\n"
77         "  \\begin{list}{}{%\n"
78         "    \\setlength\\topsep{0pt}%\n"
79         "    \\addtolength{\\leftmargin}{#1}\n"
80 // ho hum, yet more things commented out with no hint as to why they
81 // weren't just removed
82 //      "%%    \\addtolength{\\leftmargin}{#1\\textwidth}\n"
83 //      "%%    \\setlength{\\textwidth}{#2\\textwidth}\n"
84 //      "%%    \\setlength\\listparindent\\parindent%\n"
85 //      "%%    \\setlength\\itemindent\\parindent%\n"
86         "    \\setlength\\parsep{0pt plus 1pt}%\n"
87         "  }\n"
88         "  \\item[]\n"
89         "}\n"
90         "{\\end{list}}\n";
91
92 string const floatingfootnote_def =
93         "%% Special footnote code from the package 'stblftnt.sty'\n"
94         "%% Author: Robin Fairbairns -- Last revised Dec 13 1996\n"
95         "\\let\\SF@@footnote\\footnote\n"
96         "\\def\\footnote{\\ifx\\protect\\@typeset@protect\n"
97         "    \\expandafter\\SF@@footnote\n"
98         "  \\else\n"
99         "    \\expandafter\\SF@gobble@opt\n"
100         "  \\fi\n"
101         "}\n"
102         "\\expandafter\\def\\csname SF@gobble@opt \\endcsname{\\@ifnextchar[%]\n"
103         "  \\SF@gobble@twobracket\n"
104         "  \\@gobble\n"
105         "}\n"
106         "\\edef\\SF@gobble@opt{\\noexpand\\protect\n"
107         "  \\expandafter\\noexpand\\csname SF@gobble@opt \\endcsname}\n"
108         "\\def\\SF@gobble@twobracket[#1]#2{}\n";
109
110 string const boldsymbol_def =
111         "%% Bold symbol macro for standard LaTeX users\n"
112         "\\providecommand{\\boldsymbol}[1]{\\mbox{\\boldmath $#1$}}\n";
113
114 string const binom_def =
115         "%% Binom macro for standard LaTeX users\n"
116         "\\newcommand{\\binom}[2]{{#1 \\choose #2}}\n";
117
118 string const mathcircumflex_def =
119         "%% For printing a cirumflex inside a formula\n"
120         "\\newcommand{\\mathcircumflex}[0]{\\mbox{\\^{}}}\n";
121
122 string const tabularnewline_def =
123         "%% Because html converters don't know tabularnewline\n"
124         "\\providecommand{\\tabularnewline}{\\\\}\n";
125
126 string const lyxgreyedout_def =
127         "%% The greyedout annotation environment\n"
128         "\\newenvironment{lyxgreyedout}{\\textcolor[gray]{0.8}\\bgroup}{\\egroup}\n";
129
130 // We want to omit the file extension for includegraphics, but this does not
131 // work when the filename contains other dots.
132 // Idea from http://www.tex.ac.uk/cgi-bin/texfaq2html?label=unkgrfextn
133 string const lyxdot_def =
134         "%% A simple dot to overcome graphicx limitations\n"
135         "\\newcommand{\\lyxdot}{.}\n";