]> git.lyx.org Git - lyx.git/blob - src/lyx_sty.C
two patches from john
[lyx.git] / src / lyx_sty.C
1 /* This file is part of
2  * ====================================================== 
3  * 
4  *           LyX, The Document Processor
5  *        
6  *           Copyright 1995 Matthias Ettrich
7  *           Copyright 1995-2001 The LyX Team.
8  *
9  * ====================================================== */
10
11 #include <config.h>
12
13 #ifdef __GNUG__
14 #pragma implementation
15 #endif
16
17 #include "lyx_sty.h"
18
19 //\NeedsTeXFormat{LaTeX2e}
20 //\ProvidesPackage{lyx}[1996/01/11 LLE v0.2 (LyX LaTeX Extensions)]
21 //\message{LyX LaTeX Extensions (LLE v0.2) of 11-Jan-1996.} 
22
23 // include this always
24 string const lyx_def = 
25         "\\providecommand{\\LyX}{L\\kern-.1667em\\lower.25em\\hbox{Y}\\kern-.125emX\\@}";
26         
27 string const lyxline_def = 
28         "\\newcommand{\\lyxline}[1]{\n"
29         "  {#1 \\vspace{1ex} \\hrule width \\columnwidth \\vspace{1ex}}\n"
30         "}";
31
32 string const noun_def = "\\newcommand{\\noun}[1]{\\textsc{#1}}";
33
34 string const lyxarrow_def = 
35       "\\newcommand{\\lyxarrow}{\\leavevmode\\,$\\triangleright$\\,\\allowbreak}";
36
37 // for quotes without babel. This does not give perfect results, but
38 // anybody serious about non-english quotes should use babel (JMarc).
39
40
41
42 string const quotedblbase_def = 
43         "\\ProvideTextCommandDefault{\\quotedblbase}{%\n"
44         "  \\raisebox{-1.4ex}[1ex][.5ex]{\\textquotedblright}%\n"
45         "  \\penalty10000\\hskip0em\\relax%\n"
46         "}";
47
48 string const quotesinglbase_def = 
49         "\\ProvideTextCommandDefault{\\quotesinglbase}{%\n"
50         "  \\raisebox{-1.4ex}[1ex][.5ex]{\\textquoteright}%\n"
51         "  \\penalty10000\\hskip0em\\relax%\n"
52         "}";
53
54 string const guillemotleft_def = 
55         "\\ProvideTextCommandDefault{\\guillemotleft}{%\n"
56         "  {\\usefont{U}{lasy}{m}{n}\\char'50\\kern-.15em\\char'50}%\n"
57         "\\penalty10000\\hskip0pt\\relax%\n"
58         "}";
59
60 string const guillemotright_def = 
61         "\\ProvideTextCommandDefault{\\guillemotright}{%\n"
62         "  \\penalty10000\\hskip0pt%\n"
63         "  {\\usefont{U}{lasy}{m}{n}\\char'51\\kern-.15em\\char'51}%\n"
64         "}";
65
66 string const guilsinglleft_def = 
67         "\\ProvideTextCommandDefault{\\guilsinglleft}{%\n"
68         "  {\\usefont{U}{lasy}{m}{n}\\char'50}%\n"
69         "  \\penalty10000\\hskip0pt\\relax%\n"
70         "}";
71
72 string const guilsinglright_def = 
73         "\\ProvideTextCommandDefault{\\guilsinglright}{%\n"
74         "  \\penalty10000\\hskip0pt%\n"
75         "  {\\usefont{U}{lasy}{m}{n}\\char'51}%\n"
76         "}";
77
78 string const paragraphindent_def = 
79         "\\newenvironment{LyXParagraphIndent}[1]%\n"
80         "{\n"
81         "  \\begin{list}{}{%\n"
82         "    \\setlength\\topsep{0pt}%\n"
83         "    \\addtolength{\\leftmargin}{#1}\n"
84 //      "%%    \\addtolength{\\leftmargin}{#1\\textwidth}\n"
85 //      "%%    \\setlength{\\textwidth}{#2\\textwidth}\n"
86 //      "%%    \\setlength\\listparindent\\parindent%\n"
87 //      "%%    \\setlength\\itemindent\\parindent%\n"
88         "    \\setlength\\parsep{0pt plus 1pt}%\n"
89         "  }\n"
90         "  \\item[]\n"
91         "}\n"
92         "{\\end{list}}\n";
93
94 string const floatingfootnote_def = 
95         "%% Special footnote code from the package 'stblftnt.sty'\n"
96         "%% Author: Robin Fairbairns -- Last revised Dec 13 1996\n"
97         "\\let\\SF@@footnote\\footnote\n"
98         "\\def\\footnote{\\ifx\\protect\\@typeset@protect\n"
99         "    \\expandafter\\SF@@footnote\n"
100         "  \\else\n"
101         "    \\expandafter\\SF@gobble@opt\n"
102         "  \\fi\n"
103         "}\n"
104         "\\expandafter\\def\\csname SF@gobble@opt \\endcsname{\\@ifnextchar[%]\n"
105         "  \\SF@gobble@twobracket\n"
106         "  \\@gobble\n"
107         "}\n"
108         "\\edef\\SF@gobble@opt{\\noexpand\\protect\n"
109         "  \\expandafter\\noexpand\\csname SF@gobble@opt \\endcsname}\n"
110         "\\def\\SF@gobble@twobracket[#1]#2{}\n";
111
112 string const minipageindent_def = 
113         "%% This length is the backup for minipages of the \\parindent\n"
114         "\\newlength{\\LyXMinipageIndent}\n"
115         "\\setlength{\\LyXMinipageIndent}{\\parindent}\n";
116
117 string const boldsymbol_def = 
118         "%% Bold symbol macro for standard LaTeX users\n"
119         "\\newcommand{\\boldsymbol}[1]{\\mbox{\\boldmath $#1$}}\n";
120
121 string const binom_def = 
122         "%% Binom macro for standard LaTeX users\n"
123         "\\newcommand{\\binom}[2]{{#1 \\choose #2}}\n";
124