X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyx_sty.C;h=9b0874948cbdee87e7af05e71b81cd692bb80613;hb=35204f8f33d7400a5fefeffea533fb4cb4097211;hp=a4a7308aacf3bd532cb5ed07bd28cb72b8c90644;hpb=44cd0fc9a1687cc63911c7f98d978594458e7813;p=lyx.git diff --git a/src/lyx_sty.C b/src/lyx_sty.C index a4a7308aac..9b0874948c 100644 --- a/src/lyx_sty.C +++ b/src/lyx_sty.C @@ -12,6 +12,9 @@ #include "lyx_sty.h" + +namespace lyx { + using std::string; @@ -30,7 +33,7 @@ string const lyxline_def = string const noun_def = "\\newcommand{\\noun}[1]{\\textsc{#1}}"; string const lyxarrow_def = - "\\newcommand{\\lyxarrow}{\\leavevmode\\,$\\triangleright$\\,\\allowbreak}"; + "\\newcommand{\\lyxarrow}{\\leavevmode\\,$\\triangleright$\\,\\allowbreak}"; // for quotes without babel. This does not give perfect results, but // anybody serious about non-english quotes should use babel (JMarc). @@ -107,14 +110,9 @@ string const floatingfootnote_def = " \\expandafter\\noexpand\\csname SF@gobble@opt \\endcsname}\n" "\\def\\SF@gobble@twobracket[#1]#2{}\n"; -string const minipageindent_def = - "%% This length is the backup for minipages of the \\parindent\n" - "\\newlength{\\LyXMinipageIndent}\n" - "\\setlength{\\LyXMinipageIndent}{\\parindent}\n"; - string const boldsymbol_def = "%% Bold symbol macro for standard LaTeX users\n" - "\\newcommand{\\boldsymbol}[1]{\\mbox{\\boldmath $#1$}}\n"; + "\\providecommand{\\boldsymbol}[1]{\\mbox{\\boldmath $#1$}}\n"; string const binom_def = "%% Binom macro for standard LaTeX users\n" @@ -130,4 +128,14 @@ string const tabularnewline_def = string const lyxgreyedout_def = "%% The greyedout annotation environment\n" - "\\newenvironment{lyxgreyedout}{\\color[gray]{0.8}}{}\n"; + "\\newenvironment{lyxgreyedout}{\\textcolor[gray]{0.8}\\bgroup}{\\egroup}\n"; + +// 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"; + + +} // namespace lyx