// we have to provide all the optional arguments here, even though
// the last one is the only one we care about.
// Separate handling of optional argument inset.
- if (!layout_->latexargs().empty())
- latexArgInsets(*owner_, os, features.runparams(),
- layout_->latexargs());
- else
- os << from_ascii(layout_->latexparam());
+ if (!layout_->latexargs().empty()) {
+ OutputParams rp = features.runparams();
+ rp.local_font = &owner_->getFirstFontSettings(bp);
+ latexArgInsets(*owner_, os, rp, layout_->latexargs());
+ }
+ os << from_ascii(layout_->latexparam());
}
docstring::size_type const length = ods.str().length();
// this will output "{" at the beginning, but not at the end
owner_->latex(bp, f, os, features.runparams(), 0, -1, true);
if (ods.str().length() > length) {
- if (is_command)
+ if (is_command) {
ods << '}';
+ if (!layout_->postcommandargs().empty()) {
+ OutputParams rp = features.runparams();
+ rp.local_font = &owner_->getFirstFontSettings(bp);
+ latexArgInsets(*owner_, os, rp, layout_->postcommandargs(), "post:");
+ }
+ }
string const snippet = to_utf8(ods.str());
features.addPreambleSnippet(snippet);
}
bool Paragraph::isPassThru() const
{
- return inInset().getLayout().isPassThru() || d->layout_->pass_thru;
+ return inInset().isPassThru() || d->layout_->pass_thru;
}
namespace {
} else {
char_type c = getUChar(buf.params(), i);
- if (style.pass_thru)
+ if (style.pass_thru || runparams.pass_thru)
xs << c;
else if (c == '-') {
docstring str;