]> git.lyx.org Git - lyx.git/blob - src/lyx_sty.C
If I ever see another licence blurb again, it'll be too soon...
[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 //\NeedsTeXFormat{LaTeX2e}
16 //\ProvidesPackage{lyx}[1996/01/11 LLE v0.2 (LyX LaTeX Extensions)]
17 //\message{LyX LaTeX Extensions (LLE v0.2) of 11-Jan-1996.}
18
19 string const lyx_def =
20         "\\providecommand{\\LyX}{L\\kern-.1667em\\lower.25em\\hbox{Y}\\kern-.125emX\\@}";
21
22 string const lyxline_def =
23         "\\newcommand{\\lyxline}[1]{\n"
24         "  {#1 \\vspace{1ex} \\hrule width \\columnwidth \\vspace{1ex}}\n"
25         "}";
26
27 string const noun_def = "\\newcommand{\\noun}[1]{\\textsc{#1}}";
28
29 string const lyxarrow_def =
30       "\\newcommand{\\lyxarrow}{\\leavevmode\\,$\\triangleright$\\,\\allowbreak}";
31
32 // for quotes without babel. This does not give perfect results, but
33 // anybody serious about non-english quotes should use babel (JMarc).
34
35 string const quotedblbase_def =
36         "\\ProvideTextCommandDefault{\\quotedblbase}{%\n"
37         "  \\raisebox{-1.4ex}[1ex][.5ex]{\\textquotedblright}%\n"
38         "  \\penalty10000\\hskip0em\\relax%\n"
39         "}";
40
41 string const quotesinglbase_def =
42         "\\ProvideTextCommandDefault{\\quotesinglbase}{%\n"
43         "  \\raisebox{-1.4ex}[1ex][.5ex]{\\textquoteright}%\n"
44         "  \\penalty10000\\hskip0em\\relax%\n"
45         "}";
46
47 string const guillemotleft_def =
48         "\\ProvideTextCommandDefault{\\guillemotleft}{%\n"
49         "  {\\usefont{U}{lasy}{m}{n}\\char'50\\kern-.15em\\char'50}%\n"
50         "\\penalty10000\\hskip0pt\\relax%\n"
51         "}";
52
53 string const guillemotright_def =
54         "\\ProvideTextCommandDefault{\\guillemotright}{%\n"
55         "  \\penalty10000\\hskip0pt%\n"
56         "  {\\usefont{U}{lasy}{m}{n}\\char'51\\kern-.15em\\char'51}%\n"
57         "}";
58
59 string const guilsinglleft_def =
60         "\\ProvideTextCommandDefault{\\guilsinglleft}{%\n"
61         "  {\\usefont{U}{lasy}{m}{n}\\char'50}%\n"
62         "  \\penalty10000\\hskip0pt\\relax%\n"
63         "}";
64
65 string const guilsinglright_def =
66         "\\ProvideTextCommandDefault{\\guilsinglright}{%\n"
67         "  \\penalty10000\\hskip0pt%\n"
68         "  {\\usefont{U}{lasy}{m}{n}\\char'51}%\n"
69         "}";
70
71 string const paragraphleftindent_def =
72         "\\newenvironment{LyXParagraphLeftIndent}[1]%\n"
73         "{\n"
74         "  \\begin{list}{}{%\n"
75         "    \\setlength\\topsep{0pt}%\n"
76         "    \\addtolength{\\leftmargin}{#1}\n"
77 // ho hum, yet more things commented out with no hint as to why they
78 // weren't just removed
79 //      "%%    \\addtolength{\\leftmargin}{#1\\textwidth}\n"
80 //      "%%    \\setlength{\\textwidth}{#2\\textwidth}\n"
81 //      "%%    \\setlength\\listparindent\\parindent%\n"
82 //      "%%    \\setlength\\itemindent\\parindent%\n"
83         "    \\setlength\\parsep{0pt plus 1pt}%\n"
84         "  }\n"
85         "  \\item[]\n"
86         "}\n"
87         "{\\end{list}}\n";
88
89 string const floatingfootnote_def =
90         "%% Special footnote code from the package 'stblftnt.sty'\n"
91         "%% Author: Robin Fairbairns -- Last revised Dec 13 1996\n"
92         "\\let\\SF@@footnote\\footnote\n"
93         "\\def\\footnote{\\ifx\\protect\\@typeset@protect\n"
94         "    \\expandafter\\SF@@footnote\n"
95         "  \\else\n"
96         "    \\expandafter\\SF@gobble@opt\n"
97         "  \\fi\n"
98         "}\n"
99         "\\expandafter\\def\\csname SF@gobble@opt \\endcsname{\\@ifnextchar[%]\n"
100         "  \\SF@gobble@twobracket\n"
101         "  \\@gobble\n"
102         "}\n"
103         "\\edef\\SF@gobble@opt{\\noexpand\\protect\n"
104         "  \\expandafter\\noexpand\\csname SF@gobble@opt \\endcsname}\n"
105         "\\def\\SF@gobble@twobracket[#1]#2{}\n";
106
107 string const minipageindent_def =
108         "%% This length is the backup for minipages of the \\parindent\n"
109         "\\newlength{\\LyXMinipageIndent}\n"
110         "\\setlength{\\LyXMinipageIndent}{\\parindent}\n";
111
112 string const boldsymbol_def =
113         "%% Bold symbol macro for standard LaTeX users\n"
114         "\\newcommand{\\boldsymbol}[1]{\\mbox{\\boldmath $#1$}}\n";
115
116 string const binom_def =
117         "%% Binom macro for standard LaTeX users\n"
118         "\\newcommand{\\binom}[2]{{#1 \\choose #2}}\n";
119
120 string const mathcircumflex_def =
121         "%% For printing a cirumflex inside a formula\n"
122         "\\newcommand{\\mathcircumflex}[0]{\\mbox{\\^{}}}\n";
123
124 string const tabularnewline_def =
125         "%% Because html converters don't know tabularnewline\n"
126         "\\providecommand{\\tabularnewline}{\\\\}\n";
127
128 string const lyxgreyedout_def =
129         "%% The greyedout annotation environment\n"
130         "\\newenvironment{lyxgreyedout}{\\color[gray]{0.8}}{}\n";