mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
Implement a newenvironment in preamble for greyedout. Patch provided
by J�rgen Spitzm�ller. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7442 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f558c98c76
commit
93ea6f14a0
@ -1,3 +1,9 @@
|
||||
2003-07-29 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* LaTeXFeatures.C:
|
||||
* lay_sty.[Ch]:h: Implement a newenvironment in preamble for
|
||||
greyedout. Patch provided by Jürgen Spitzmüller.
|
||||
|
||||
2003-07-29 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* kbmap.C (read): fix error message when reading bind files
|
||||
|
@ -350,6 +350,10 @@ string const LaTeXFeatures::getMacros() const
|
||||
if (isRequired("NeedTabularnewline"))
|
||||
macros << tabularnewline_def;
|
||||
|
||||
// greyedout environment (note inset)
|
||||
if (isRequired("lyxgreyedout"))
|
||||
macros << lyxgreyedout_def;
|
||||
|
||||
// floats
|
||||
getFloatDefinitions(macros);
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-07-29 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* insetnote.C: Implement a newenvironment in preamble for
|
||||
greyedout. Patch provided by Jürgen Spitzmüller.
|
||||
|
||||
2003-07-29 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* insetcommand.C (localDispatch): default to
|
||||
|
@ -151,9 +151,11 @@ int InsetNote::latex(Buffer const * buf, ostream & os,
|
||||
|
||||
int i = 0;
|
||||
if (pt == "Comment")
|
||||
os << "%\n\\begin{comment}\n"; // remember to validate
|
||||
// verbatim
|
||||
os << "%\n\\begin{comment}\n";
|
||||
else if (pt == "Greyedout")
|
||||
os << "%\n\\color[gray]{0.8}";
|
||||
// we roll our own macro
|
||||
os << "%\n\\begin{lyxgreyedout}\n";
|
||||
|
||||
if (pt != "Note")
|
||||
i = inset.latex(buf, os, runparams);
|
||||
@ -162,7 +164,7 @@ int InsetNote::latex(Buffer const * buf, ostream & os,
|
||||
os << "%\n\\end{comment}\n";
|
||||
i += 3;
|
||||
} else if (pt == "Greyedout") {
|
||||
os << "\\normalcolor%\n";
|
||||
os << "%\n\\end{lyxgreyedout}\n";
|
||||
i += 2;
|
||||
}
|
||||
return i;
|
||||
@ -224,8 +226,10 @@ void InsetNote::validate(LaTeXFeatures & features) const
|
||||
{
|
||||
if (params_.type == "Comment")
|
||||
features.require("verbatim");
|
||||
if (params_.type == "Greyedout")
|
||||
if (params_.type == "Greyedout") {
|
||||
features.require("color");
|
||||
features.require("lyxgreyedout");
|
||||
}
|
||||
inset.validate(features);
|
||||
}
|
||||
|
||||
|
@ -122,3 +122,7 @@ string const mathcircumflex_def =
|
||||
string const tabularnewline_def =
|
||||
"%% Because html converters don't know tabularnewline\n"
|
||||
"\\providecommand{\\tabularnewline}{\\\\}\n";
|
||||
|
||||
string const lyxgreyedout_def =
|
||||
"%% The greyedout annotation environment\n"
|
||||
"\\newenvironment{lyxgreyedout}{\\color[gray]{0.8}}{}\n";
|
||||
|
@ -51,5 +51,7 @@ extern string const binom_def;
|
||||
extern string const mathcircumflex_def;
|
||||
///
|
||||
extern string const tabularnewline_def;
|
||||
///
|
||||
extern string const lyxgreyedout_def;
|
||||
|
||||
#endif // LYX_STY_H
|
||||
|
Loading…
Reference in New Issue
Block a user