mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
add preamble snippets to charstyles
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19732 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
68a28b60c9
commit
e38b581bcb
@ -2,7 +2,7 @@
|
||||
# Author : Martin vermeer <amrtin.vermeer@hut.fi>
|
||||
# Character Styles definition
|
||||
|
||||
Format 4
|
||||
Format 5
|
||||
InsetLayout CharStyle:Noun
|
||||
LyxType charstyle
|
||||
LabelString noun
|
||||
@ -11,6 +11,9 @@ InsetLayout CharStyle:Noun
|
||||
Font
|
||||
Shape Smallcaps
|
||||
EndFont
|
||||
Preamble
|
||||
\newcommand{\noun}[1]{\textsc{#1}}
|
||||
EndPreamble
|
||||
End
|
||||
|
||||
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include "FuncStatus.h"
|
||||
#include "Cursor.h"
|
||||
#include "gettext.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "Color.h"
|
||||
#include "Lexer.h"
|
||||
#include "Text.h"
|
||||
@ -242,14 +241,6 @@ void InsetCharStyle::textString(Buffer const & buf, odocstream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetCharStyle::validate(LaTeXFeatures & features) const
|
||||
{
|
||||
// Force inclusion of preamble snippet in layout file
|
||||
features.require(layout_.latexname);
|
||||
InsetText::validate(features);
|
||||
}
|
||||
|
||||
|
||||
void InsetCharStyleParams::write(ostream & os) const
|
||||
{
|
||||
os << "CharStyle " << name << "\n";
|
||||
|
@ -76,8 +76,6 @@ public:
|
||||
OutputParams const &) const;
|
||||
/// the string that is passed to the TOC
|
||||
virtual void textString(Buffer const &, odocstream &) const;
|
||||
///
|
||||
void validate(LaTeXFeatures &) const;
|
||||
|
||||
///
|
||||
InsetCharStyleParams const & params() const { return params_; }
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "FuncStatus.h"
|
||||
#include "gettext.h"
|
||||
#include "Color.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "Lexer.h"
|
||||
#include "FuncRequest.h"
|
||||
#include "MetricsInfo.h"
|
||||
@ -651,4 +652,12 @@ int InsetCollapsable::latex(Buffer const & buf, odocstream & os,
|
||||
}
|
||||
|
||||
|
||||
void InsetCollapsable::validate(LaTeXFeatures & features) const
|
||||
{
|
||||
// Force inclusion of preamble snippet in layout file
|
||||
features.addPreambleSnippet(layout_.preamble);
|
||||
InsetText::validate(features);
|
||||
}
|
||||
|
||||
|
||||
} // namespace lyx
|
||||
|
@ -133,6 +133,8 @@ public:
|
||||
///
|
||||
int latex(Buffer const &, odocstream &,
|
||||
OutputParams const &) const;
|
||||
///
|
||||
void validate(LaTeXFeatures &) const;
|
||||
|
||||
protected:
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user