diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp index 7b6cf6d981..cd00e0d023 100644 --- a/src/insets/InsetRef.cpp +++ b/src/insets/InsetRef.cpp @@ -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") diff --git a/status.20x b/status.20x index 8d91ab5c28..705b04f105 100644 --- a/status.20x +++ b/status.20x @@ -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