mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
parent
16bfcc0e91
commit
5b03ae11a0
@ -994,6 +994,9 @@ void Layout::readArgument(Lexer & lex)
|
||||
arg.font = lyxRead(lex, arg.font);
|
||||
} else if (tok == "labelfont") {
|
||||
arg.labelfont = lyxRead(lex, arg.labelfont);
|
||||
} else if (tok == "passthruchars") {
|
||||
lex.next();
|
||||
arg.pass_thru_chars = lex.getDocString();
|
||||
} else {
|
||||
lex.printError("Unknown tag");
|
||||
error = true;
|
||||
|
@ -104,6 +104,7 @@ public:
|
||||
FontInfo font;
|
||||
FontInfo labelfont;
|
||||
bool autoinsert;
|
||||
docstring pass_thru_chars;
|
||||
};
|
||||
///
|
||||
typedef std::map<std::string, latexarg> LaTeXArgMap;
|
||||
|
@ -39,7 +39,7 @@ namespace lyx {
|
||||
InsetArgument::InsetArgument(Buffer * buf, string const & name)
|
||||
: InsetCollapsable(buf), name_(name), labelstring_(docstring()),
|
||||
font_(inherit_font), labelfont_(inherit_font), decoration_(string()),
|
||||
pass_thru_(false)
|
||||
pass_thru_(false), pass_thru_chars_(docstring())
|
||||
{}
|
||||
|
||||
|
||||
@ -112,6 +112,7 @@ void InsetArgument::updateBuffer(ParIterator const & it, UpdateType utype)
|
||||
font_ = (*lait).second.font;
|
||||
labelfont_ = (*lait).second.labelfont;
|
||||
decoration_ = (*lait).second.decoration;
|
||||
pass_thru_chars_ = (*lait).second.pass_thru_chars;
|
||||
} else {
|
||||
labelstring_ = _("Unknown Argument");
|
||||
tooltip_ = _("Argument not known in this Layout. Will be supressed in the output.");
|
||||
@ -268,6 +269,8 @@ void InsetArgument::latexArgument(otexstream & os,
|
||||
odocstringstream ss;
|
||||
otexstream ots(ss, texrow);
|
||||
OutputParams runparams = runparams_in;
|
||||
if (!pass_thru_chars_.empty())
|
||||
runparams.pass_thru_chars += pass_thru_chars_;
|
||||
InsetText::latex(ots, runparams);
|
||||
docstring str = ss.str();
|
||||
docstring const sep = str.empty() ? docstring() : from_ascii(", ");
|
||||
|
@ -97,6 +97,8 @@ private:
|
||||
std::string decoration_;
|
||||
///
|
||||
bool pass_thru_;
|
||||
///
|
||||
docstring pass_thru_chars_;
|
||||
|
||||
protected:
|
||||
/// \name Protected functions inherited from Inset class
|
||||
|
@ -620,6 +620,9 @@ void InsetLayout::readArgument(Lexer & lex)
|
||||
arg.font = lyxRead(lex, arg.font);
|
||||
} else if (tok == "labelfont") {
|
||||
arg.labelfont = lyxRead(lex, arg.labelfont);
|
||||
} else if (tok == "passthruchars") {
|
||||
lex.next();
|
||||
arg.pass_thru_chars = lex.getDocString();
|
||||
} else {
|
||||
lex.printError("Unknown tag");
|
||||
error = true;
|
||||
|
Loading…
Reference in New Issue
Block a user