Fix bug with output of prettyref chapter references.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@39289 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2011-07-13 15:19:38 +00:00
parent f61bc6d43f
commit 5f1008a4eb
2 changed files with 5 additions and 3 deletions

View File

@ -302,13 +302,13 @@ void InsetRef::validate(LaTeXFeatures & features) const
string const cmd = getCmdName();
if (cmd == "vref" || cmd == "vpageref")
features.require("varioref");
else if (getCmdName() == "formatted") {
else if (cmd == "formatted") {
docstring const data = getEscapedLabel(features.runparams());
docstring label;
docstring prefix;
string const fcmd = to_utf8(getFormattedCmd(data, label, prefix));
if (buffer().params().use_refstyle) {
features.require("refstyle");
string const fcmd = to_utf8(getFormattedCmd(data, label, prefix));
if (!prefix.empty()) {
string lcmd = "\\AtBeginDocument{\\providecommand" +
fcmd + "[1]{\\ref{" + to_utf8(prefix) + ":#1}}}";
@ -322,7 +322,7 @@ void InsetRef::validate(LaTeXFeatures & features) const
if (prefix == "chap")
features.addPreambleSnippet("\\let\\pr@chap=\\pr@cha");
}
} else if (getCmdName() == "eqref" && !buffer().params().use_refstyle)
} else if (cmd == "eqref" && !buffer().params().use_refstyle)
// refstyle defines its own version
features.require("amsmath");
else if (cmd == "nameref")

View File

@ -146,6 +146,8 @@ What's new
- Fix missing VCS revision information for RCS (author/date/time).
- Fix output of chapter references when using prettyref.
* USER INTERFACE