From e5fea4dabbad6dfe2a146e7ffe36748e6c3b7506 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 3 Dec 2011 23:15:04 +0000 Subject: [PATCH] Comments. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40356 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetRef.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"); -- 2.39.2