#include "Lexer.h"
#include "OutputParams.h"
#include "ParIterator.h"
+#include "TexRow.h"
+#include "texstream.h"
#include "support/convert.h"
#include "support/debug.h"
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())
{}
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.");
cur.undispatched();
return;
}
- cur.recordUndoInset(ATOMIC_UNDO, this);
+ cur.recordUndoInset(this);
name_ = cmd.getArg(1);
cur.forceBufferUpdate();
break;
string InsetArgument::contextMenuName() const
{
- return "context-argument";
+ if (decoration() == InsetLayout::CONGLOMERATE)
+ return "context-argument-conglomerate";
+ else
+ return "context-argument";
}
OutputParams const & runparams_in, docstring const & ldelim,
docstring const & rdelim, docstring const & presetarg) const
{
- TexRow texrow;
odocstringstream ss;
- otexstream ots(ss, texrow);
+ otexstream ots(ss);
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(", ");
str = presetarg + sep + str;
if (ldelim != "{" && support::contains(str, rdelim))
str = '{' + str + '}';
+ // TODO: append texrow information
os << ldelim << str << rdelim;
}