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