2002-05-30 03:37:24 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file lyx_sty.C
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-03-21 17:27:08 +00:00
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-05-30 03:37:24 +00:00
|
|
|
|
*/
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
|
|
#include "lyx_sty.h"
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
|
using std::string;
|
|
|
|
|
|
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
|
//\NeedsTeXFormat{LaTeX2e}
|
|
|
|
|
//\ProvidesPackage{lyx}[1996/01/11 LLE v0.2 (LyX LaTeX Extensions)]
|
2002-03-21 17:27:08 +00:00
|
|
|
|
//\message{LyX LaTeX Extensions (LLE v0.2) of 11-Jan-1996.}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2002-03-21 17:27:08 +00:00
|
|
|
|
string const lyx_def =
|
1999-09-27 18:44:28 +00:00
|
|
|
|
"\\providecommand{\\LyX}{L\\kern-.1667em\\lower.25em\\hbox{Y}\\kern-.125emX\\@}";
|
2002-03-21 17:27:08 +00:00
|
|
|
|
|
|
|
|
|
string const lyxline_def =
|
2007-01-31 01:15:14 +00:00
|
|
|
|
"\\newcommand{\\lyxline}[1][1pt]{%\n"
|
|
|
|
|
" \\par\\noindent%\n"
|
|
|
|
|
" \\rule[.5ex]{\\linewidth}{#1}\\par}";
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
1999-10-02 16:21:10 +00:00
|
|
|
|
string const noun_def = "\\newcommand{\\noun}[1]{\\textsc{#1}}";
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2002-03-21 17:27:08 +00:00
|
|
|
|
string const lyxarrow_def =
|
2004-10-05 10:11:42 +00:00
|
|
|
|
"\\newcommand{\\lyxarrow}{\\leavevmode\\,$\\triangleright$\\,\\allowbreak}";
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
// for quotes without babel. This does not give perfect results, but
|
|
|
|
|
// anybody serious about non-english quotes should use babel (JMarc).
|
|
|
|
|
|
2002-03-21 17:27:08 +00:00
|
|
|
|
string const quotedblbase_def =
|
1999-09-27 18:44:28 +00:00
|
|
|
|
"\\ProvideTextCommandDefault{\\quotedblbase}{%\n"
|
|
|
|
|
" \\raisebox{-1.4ex}[1ex][.5ex]{\\textquotedblright}%\n"
|
|
|
|
|
" \\penalty10000\\hskip0em\\relax%\n"
|
|
|
|
|
"}";
|
|
|
|
|
|
2002-03-21 17:27:08 +00:00
|
|
|
|
string const quotesinglbase_def =
|
1999-09-27 18:44:28 +00:00
|
|
|
|
"\\ProvideTextCommandDefault{\\quotesinglbase}{%\n"
|
|
|
|
|
" \\raisebox{-1.4ex}[1ex][.5ex]{\\textquoteright}%\n"
|
|
|
|
|
" \\penalty10000\\hskip0em\\relax%\n"
|
|
|
|
|
"}";
|
|
|
|
|
|
2002-03-21 17:27:08 +00:00
|
|
|
|
string const guillemotleft_def =
|
|
|
|
|
"\\ProvideTextCommandDefault{\\guillemotleft}{%\n"
|
|
|
|
|
" {\\usefont{U}{lasy}{m}{n}\\char'50\\kern-.15em\\char'50}%\n"
|
|
|
|
|
"\\penalty10000\\hskip0pt\\relax%\n"
|
|
|
|
|
"}";
|
|
|
|
|
|
|
|
|
|
string const guillemotright_def =
|
|
|
|
|
"\\ProvideTextCommandDefault{\\guillemotright}{%\n"
|
|
|
|
|
" \\penalty10000\\hskip0pt%\n"
|
|
|
|
|
" {\\usefont{U}{lasy}{m}{n}\\char'51\\kern-.15em\\char'51}%\n"
|
|
|
|
|
"}";
|
|
|
|
|
|
|
|
|
|
string const guilsinglleft_def =
|
|
|
|
|
"\\ProvideTextCommandDefault{\\guilsinglleft}{%\n"
|
|
|
|
|
" {\\usefont{U}{lasy}{m}{n}\\char'50}%\n"
|
|
|
|
|
" \\penalty10000\\hskip0pt\\relax%\n"
|
|
|
|
|
"}";
|
|
|
|
|
|
|
|
|
|
string const guilsinglright_def =
|
|
|
|
|
"\\ProvideTextCommandDefault{\\guilsinglright}{%\n"
|
|
|
|
|
" \\penalty10000\\hskip0pt%\n"
|
|
|
|
|
" {\\usefont{U}{lasy}{m}{n}\\char'51}%\n"
|
|
|
|
|
"}";
|
|
|
|
|
|
2002-05-08 12:58:16 +00:00
|
|
|
|
string const paragraphleftindent_def =
|
|
|
|
|
"\\newenvironment{LyXParagraphLeftIndent}[1]%\n"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
"{\n"
|
|
|
|
|
" \\begin{list}{}{%\n"
|
2007-01-03 10:40:12 +00:00
|
|
|
|
" \\setlength{\\topsep}{0pt}%\n"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
" \\addtolength{\\leftmargin}{#1}\n"
|
2002-05-30 03:37:24 +00:00
|
|
|
|
// ho hum, yet more things commented out with no hint as to why they
|
|
|
|
|
// weren't just removed
|
2002-03-21 17:27:08 +00:00
|
|
|
|
// "%% \\addtolength{\\leftmargin}{#1\\textwidth}\n"
|
|
|
|
|
// "%% \\setlength{\\textwidth}{#2\\textwidth}\n"
|
|
|
|
|
// "%% \\setlength\\listparindent\\parindent%\n"
|
|
|
|
|
// "%% \\setlength\\itemindent\\parindent%\n"
|
2007-01-03 10:40:12 +00:00
|
|
|
|
" \\setlength{\\parsep}{0pt plus 1pt}%\n"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
" }\n"
|
|
|
|
|
" \\item[]\n"
|
|
|
|
|
"}\n"
|
|
|
|
|
"{\\end{list}}\n";
|
|
|
|
|
|
2002-03-21 17:27:08 +00:00
|
|
|
|
string const floatingfootnote_def =
|
1999-09-27 18:44:28 +00:00
|
|
|
|
"%% Special footnote code from the package 'stblftnt.sty'\n"
|
|
|
|
|
"%% Author: Robin Fairbairns -- Last revised Dec 13 1996\n"
|
|
|
|
|
"\\let\\SF@@footnote\\footnote\n"
|
|
|
|
|
"\\def\\footnote{\\ifx\\protect\\@typeset@protect\n"
|
|
|
|
|
" \\expandafter\\SF@@footnote\n"
|
|
|
|
|
" \\else\n"
|
|
|
|
|
" \\expandafter\\SF@gobble@opt\n"
|
|
|
|
|
" \\fi\n"
|
|
|
|
|
"}\n"
|
|
|
|
|
"\\expandafter\\def\\csname SF@gobble@opt \\endcsname{\\@ifnextchar[%]\n"
|
|
|
|
|
" \\SF@gobble@twobracket\n"
|
|
|
|
|
" \\@gobble\n"
|
|
|
|
|
"}\n"
|
|
|
|
|
"\\edef\\SF@gobble@opt{\\noexpand\\protect\n"
|
|
|
|
|
" \\expandafter\\noexpand\\csname SF@gobble@opt \\endcsname}\n"
|
|
|
|
|
"\\def\\SF@gobble@twobracket[#1]#2{}\n";
|
|
|
|
|
|
2002-03-21 17:27:08 +00:00
|
|
|
|
string const boldsymbol_def =
|
1999-09-27 18:44:28 +00:00
|
|
|
|
"%% Bold symbol macro for standard LaTeX users\n"
|
2004-04-08 13:06:49 +00:00
|
|
|
|
"\\providecommand{\\boldsymbol}[1]{\\mbox{\\boldmath $#1$}}\n";
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2002-03-21 17:27:08 +00:00
|
|
|
|
string const binom_def =
|
1999-09-27 18:44:28 +00:00
|
|
|
|
"%% Binom macro for standard LaTeX users\n"
|
|
|
|
|
"\\newcommand{\\binom}[2]{{#1 \\choose #2}}\n";
|
|
|
|
|
|
2002-03-21 17:27:08 +00:00
|
|
|
|
string const mathcircumflex_def =
|
2002-03-04 11:10:26 +00:00
|
|
|
|
"%% For printing a cirumflex inside a formula\n"
|
|
|
|
|
"\\newcommand{\\mathcircumflex}[0]{\\mbox{\\^{}}}\n";
|
2002-09-06 13:41:19 +00:00
|
|
|
|
|
|
|
|
|
string const tabularnewline_def =
|
2002-11-27 10:30:28 +00:00
|
|
|
|
"%% Because html converters don't know tabularnewline\n"
|
|
|
|
|
"\\providecommand{\\tabularnewline}{\\\\}\n";
|
2003-07-29 12:20:04 +00:00
|
|
|
|
|
|
|
|
|
string const lyxgreyedout_def =
|
|
|
|
|
"%% The greyedout annotation environment\n"
|
2006-08-13 17:36:49 +00:00
|
|
|
|
"\\newenvironment{lyxgreyedout}{\\textcolor[gray]{0.8}\\bgroup}{\\egroup}\n";
|
2004-04-26 11:05:19 +00:00
|
|
|
|
|
|
|
|
|
// We want to omit the file extension for includegraphics, but this does not
|
|
|
|
|
// work when the filename contains other dots.
|
|
|
|
|
// Idea from http://www.tex.ac.uk/cgi-bin/texfaq2html?label=unkgrfextn
|
|
|
|
|
string const lyxdot_def =
|
|
|
|
|
"%% A simple dot to overcome graphicx limitations\n"
|
|
|
|
|
"\\newcommand{\\lyxdot}{.}\n";
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace lyx
|