On 8/18/23 18:09, Richard Kimberly Heck wrote:
commit 784a7210baf6b0c610c04d507e08855bb233565e
Author: Richard Kimberly Heck <rikih...@lyx.org>
Date:   Fri Aug 18 19:17:05 2023 -0400

     Use master buffer setting when exporting

Thibaut: This change may also be needed in the DocBook and XHTML export routines. Basically, we were querying the buffer itself for the setting of the use_refstyle flag rather than the master buffer. I ran into a case where this was a problem: One child document did not have that flag set, so it was issuing \prettyref rather than \fnref, e.g., which led to inconsistencies. I assume we do need this in the other output routines and can do that, but wanted to check with you first.

Riki


---
  src/insets/InsetRef.cpp |    8 ++++----
  1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp
index 0938b47..277f8e5 100644
--- a/src/insets/InsetRef.cpp
+++ b/src/insets/InsetRef.cpp
@@ -260,12 +260,12 @@ void InsetRef::latex(otexstream & os, OutputParams const 
& rp) const
  {
        string const & cmd = getCmdName();
        docstring const & data = getEscapedLabel(rp);
-       bool const hyper_on = buffer().params().pdfoptions().use_hyperref;
+       bool const hyper_on = buffer().masterParams().pdfoptions().use_hyperref;
if (rp.inulemcmd > 0)
                os << "\\mbox{";
- if (buffer().params().use_refstyle && cmd == "eqref") {
+       if (buffer().masterParams().use_refstyle && cmd == "eqref") {
                // 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
@@ -281,7 +281,7 @@ void InsetRef::latex(otexstream & os, OutputParams const & 
rp) const
                docstring prefix;
                bool const use_caps     = getParam("caps") == "true";
                bool const use_plural   = getParam("plural") == "true";
-               bool const use_refstyle = buffer().params().use_refstyle;
+               bool const use_refstyle = buffer().masterParams().use_refstyle;
                docstring const fcmd =
                        getFormattedCmd(data, label, prefix, use_refstyle, 
use_caps);
                os << fcmd;
@@ -576,7 +576,7 @@ void InsetRef::validate(LaTeXFeatures & features) const
                docstring const data = getEscapedLabel(features.runparams());
                docstring label;
                docstring prefix;
-               bool const use_refstyle = buffer().params().use_refstyle;
+               bool const use_refstyle = buffer().masterParams().use_refstyle;
                bool const use_caps   = getParam("caps") == "true";
                docstring const fcmd =
                        getFormattedCmd(data, label, prefix, use_refstyle, 
use_caps);


--
----------------------------
Richard Kimberly (Riki) Heck
Professor of Philosophy
Brown University

Pronouns: they/them/their

Website:         http://rkheck.frege.org/
Blog:            http://rikiheck.blogspot.com/
Amazon:          http://amazon.com/author/richardgheckjr
Google Scholar:  https://scholar.google.com/citations?user=QUKBG6EAAAAJ
ORCID:           http://orcid.org/0000-0002-2961-2663
Research Gate:   https://www.researchgate.net/profile/Richard_Heck

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to