mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-09 18:52:46 +00:00
Fix bug with output of prettyref chapter references.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39288 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
08e516d438
commit
e47d0dfb0d
@ -302,13 +302,13 @@ void InsetRef::validate(LaTeXFeatures & features) const
|
|||||||
string const cmd = getCmdName();
|
string const cmd = getCmdName();
|
||||||
if (cmd == "vref" || cmd == "vpageref")
|
if (cmd == "vref" || cmd == "vpageref")
|
||||||
features.require("varioref");
|
features.require("varioref");
|
||||||
else if (getCmdName() == "formatted") {
|
else if (cmd == "formatted") {
|
||||||
docstring const data = getEscapedLabel(features.runparams());
|
docstring const data = getEscapedLabel(features.runparams());
|
||||||
docstring label;
|
docstring label;
|
||||||
docstring prefix;
|
docstring prefix;
|
||||||
|
string const fcmd = to_utf8(getFormattedCmd(data, label, prefix));
|
||||||
if (buffer().params().use_refstyle) {
|
if (buffer().params().use_refstyle) {
|
||||||
features.require("refstyle");
|
features.require("refstyle");
|
||||||
string const fcmd = to_utf8(getFormattedCmd(data, label, prefix));
|
|
||||||
if (!prefix.empty()) {
|
if (!prefix.empty()) {
|
||||||
string lcmd = "\\AtBeginDocument{\\providecommand" +
|
string lcmd = "\\AtBeginDocument{\\providecommand" +
|
||||||
fcmd + "[1]{\\ref{" + to_utf8(prefix) + ":#1}}}";
|
fcmd + "[1]{\\ref{" + to_utf8(prefix) + ":#1}}}";
|
||||||
@ -322,7 +322,7 @@ void InsetRef::validate(LaTeXFeatures & features) const
|
|||||||
if (prefix == "chap")
|
if (prefix == "chap")
|
||||||
features.addPreambleSnippet("\\let\\pr@chap=\\pr@cha");
|
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
|
// refstyle defines its own version
|
||||||
features.require("amsmath");
|
features.require("amsmath");
|
||||||
else if (cmd == "nameref")
|
else if (cmd == "nameref")
|
||||||
|
Loading…
Reference in New Issue
Block a user