+ docstring const data = getEscapedLabel(rp);
+
+ if (rp.inulemcmd > 0)
+ os << "\\mbox{";
+
+ if (cmd == "eqref" && buffer().params().use_refstyle) {
+ // we advertise this as printing "(n)", so we'll do that, at least
+ // for refstyle, since refstlye's own \eqref prints, by default,
+ // "equation n". if one wants \eqref, one can get it by using a
+ // formatted label in this case.
+ os << '(' << from_ascii("\\ref{") << data << from_ascii("})");
+ }
+ else if (cmd == "formatted") {
+ docstring label;
+ docstring prefix;
+ docstring const fcmd = getFormattedCmd(data, label, prefix);
+ os << fcmd << '{' << label << '}';
+ }
+ else {