+ // set the font series and size for this snippet
+ DocIterator dit = pos;
+ while (dit.inMathed())
+ dit.pop_back();
+ Paragraph const & par = dit.paragraph();
+ Font font = par.getFontSettings(buffer->params(), dit.pos());
+ font.fontInfo().realize(par.layout().font);
+ string const lsize = font.latexSize();
+ docstring setfont;
+ docstring endfont;
+ if (font.fontInfo().series() == BOLD_SERIES) {
+ setfont += from_ascii("\\textbf{");
+ endfont += '}';
+ }
+ if (lsize != "normalsize" && !prefixIs(lsize, "error"))
+ setfont += from_ascii("\\" + lsize + '\n');
+