+namespace {
+
+// output the proper paragraph start according to latextype.
+void parStartCommand(Paragraph const & par, otexstream & os,
+ OutputParams const & runparams, Layout const & style)
+{
+ switch (style.latextype) {
+ case LATEX_COMMAND:
+ os << '\\' << from_ascii(style.latexname());
+
+ // Separate handling of optional argument inset.
+ if (style.optargs != 0 || style.reqargs != 0)
+ latexArgInsets(par, os, runparams, style.reqargs, style.optargs);
+ else
+ os << from_ascii(style.latexparam());
+ break;
+ case LATEX_ITEM_ENVIRONMENT:
+ case LATEX_LIST_ENVIRONMENT:
+ os << "\\item ";
+ break;
+ case LATEX_BIB_ENVIRONMENT:
+ // ignore this, the inset will write itself
+ break;
+ default:
+ break;
+ }
+}
+
+} // namespace anon