- // we have to provide all the optional arguments here, even though
- // the last one is the only one we care about.
+ if (is_command) {
+ ods << '\\' << from_ascii(layout_->latexname());
+ // 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_->optargs != 0 || layout_->reqargs != 0)
+ latexArgInsets(*owner_, ods, features.runparams(),
+ layout_->reqargs, layout_->optargs);
+ else
+ ods << from_ascii(layout_->latexparam());
+ }
+ docstring::size_type const length = ods.str().length();
+ // this will output "{" at the beginning, but not at the end