From: Richard Heck Date: Sat, 3 Dec 2011 23:15:04 +0000 (+0000) Subject: Comments. X-Git-Tag: 2.1.0beta1~2288 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e5fea4dabbad6dfe2a146e7ffe36748e6c3b7506;p=features.git Comments. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40356 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp index cd00e0d023..ef96101dc5 100644 --- a/src/insets/InsetRef.cpp +++ b/src/insets/InsetRef.cpp @@ -143,6 +143,10 @@ void InsetRef::latex(otexstream & os, OutputParams const & rp) const docstring const data = getEscapedLabel(rp); 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") { @@ -323,7 +327,7 @@ void InsetRef::validate(LaTeXFeatures & features) const features.addPreambleSnippet("\\let\\pr@chap=\\pr@cha"); } } else if (cmd == "eqref" && !buffer().params().use_refstyle) - // refstyle defines its own version + // with refstyle, we simply output "(\ref{label})" features.require("amsmath"); else if (cmd == "nameref") features.require("nameref");