]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetArgument.cpp
Circumvent odd stmary font metrics (part of #9990).
[lyx.git] / src / insets / InsetArgument.cpp
index 4c27323235cd92982a37637ae735009ba8dd4f26..48551db1f528e94f1d6becdc8d38414a188206d1 100644 (file)
@@ -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.");
@@ -148,7 +149,7 @@ void InsetArgument::doDispatch(Cursor & cur, FuncRequest & cmd)
                        cur.undispatched();
                        return;
                }
-               cur.recordUndoInset(ATOMIC_UNDO, this);
+               cur.recordUndoInset(this);
                name_ = cmd.getArg(1);
                cur.forceBufferUpdate();
                break;
@@ -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(", ");