[LyX/master] Use master buffer setting when exporting
commit 784a7210baf6b0c610c04d507e08855bb233565e Author: Richard Kimberly Heck Date: Fri Aug 18 19:17:05 2023 -0400 Use master buffer setting when exporting --- 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); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] supported-languages.lyx: update format
commit 946b7500900fea077922b9391c035226dad6d455 Author: Scott Kostyshak Date: Fri Aug 18 11:22:07 2023 -0400 supported-languages.lyx: update format .../export/latex/languages/supported-languages.lyx | 750 +++- 1 files changed, 412 insertions(+), 338 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] supported-languages: update info on font subs
commit ccd88246a94e66552882bfe6fc5e047f2501f89f Author: Scott Kostyshak Date: Fri Aug 18 11:24:34 2023 -0400 supported-languages: update info on font subs Consistent with 008e1cc9. --- .../export/latex/languages/supported-languages.lyx |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/autotests/export/latex/languages/supported-languages.lyx b/autotests/export/latex/languages/supported-languages.lyx index b099da2..0130643 100644 --- a/autotests/export/latex/languages/supported-languages.lyx +++ b/autotests/export/latex/languages/supported-languages.lyx @@ -6006,13 +6006,14 @@ usepackage{fonts-tlwg}} \end_layout \begin_layout Standard -or set up the font substitutes with the +or set up the font substitutes with +\backslash +DeclareFontFamilySubstitution (if you have a LaTeX kernel older than February 2020, + you can use the now-deprecated \emph on substitutefont \emph default -package -\emph on -. +package). \end_layout \end_deeper -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Amend change 5c8e3a5f0d - correct include directives
commit d409555bda9772a7f684cdd4701ada38231c3082 Author: Stephan Witt Date: Fri Aug 18 12:51:40 2023 +0200 Amend change 5c8e3a5f0d - correct include directives --- src/frontends/qt/GuiProgress.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt/GuiProgress.cpp b/src/frontends/qt/GuiProgress.cpp index 80ba8ae..4e35b58 100644 --- a/src/frontends/qt/GuiProgress.cpp +++ b/src/frontends/qt/GuiProgress.cpp @@ -13,7 +13,6 @@ #include #include "GuiProgress.h" -#include "ui_ToggleWarningUi.h" #include "qt_helpers.h" @@ -23,9 +22,10 @@ #include "support/Systemcall.h" #include -#include +#include #include #include +#include namespace lyx { -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Improve readability of code and comments
commit 15f9129a26e0e3159c96118aff4b42e11cd94cf3 Author: Juergen Spitzmueller Date: Fri Aug 18 10:02:48 2023 +0200 Improve readability of code and comments --- src/Paragraph.cpp | 31 ++- 1 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 0ff0e15..d69d09a 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -2052,15 +2052,16 @@ char_type Paragraph::getUChar(BufferParams const & bparams, { char_type c = d->text_[pos]; - // Return unchanged character in LTR languages - // or if we use XeTeX - // or with babel and LuaTeX. + // Return unchanged character + // 1. in all LTR languages + // 2. if we use XeTeX (both with babel and polyglossia) + // 3. if we use LuaTeX with babel if (!getFontSettings(bparams, pos).isRightToLeft() || rp.flavor == Flavor::XeTeX || (rp.use_babel && rp.flavor == Flavor::LuaTeX)) return c; - // Without polyglossia/bidi, we need to account for some special cases. + // For the remaining cases, we need to account for some special cases. // FIXME This needs to be audited! // Check if: // * The input is as expected for all delimiters @@ -2079,15 +2080,19 @@ char_type Paragraph::getUChar(BufferParams const & bparams, string const & lang = getFontSettings(bparams, pos).language()->lang(); char_type uc = c; - // 1. With polyglossia/luabidi all delimiters need to be mirrored, - //regardless of the languge, or script. - // 2. In the following languages, parentheses need to be mirrored. - bool const reverseparens = (lang == "hebrew" || rp.use_polyglossia); - - // 3. In the following languages, brackets don't need to be mirrored. - bool const reversebrackets = (lang != "arabic_arabtex" - && lang != "arabic_arabi" - && lang != "farsi") || rp.use_polyglossia; + // These are the cases where we need to mirror delimiters in RTL context + // in the remaining cases (polyglossia + LuaTeX or classic [pdf]latex): + // 1. With polyglossia and LuaTeX (luabidi) parentheses and brackets + //need to be mirrored in RTL, regardless of the language, or script. + // 2. In the languages that follow, parentheses need to be mirrored + //in classic (pdf)latex + bool const reverseparens = (rp.use_polyglossia || lang == "hebrew"); + // 3. In all RTL languages except for those that follow, brackets + //need to be mirrored in classic (pdf)latex + bool const reversebrackets = rp.use_polyglossia + || (lang != "arabic_arabtex" + && lang != "arabic_arabi" + && lang != "farsi"); // Now swap delimiters if needed. switch (c) { -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Mirror all delimiters in RTL context with luabidi, regardless of the language or script (#12881)
commit fe57b192942e9528a480015b247d75bde2ea468c Author: Juergen Spitzmueller Date: Fri Aug 18 09:20:26 2023 +0200 Mirror all delimiters in RTL context with luabidi, regardless of the language or script (#12881) Patch by Udi Fogiel --- src/Paragraph.cpp | 19 ++- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 641f8b1..0ff0e15 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -2053,11 +2053,11 @@ char_type Paragraph::getUChar(BufferParams const & bparams, char_type c = d->text_[pos]; // Return unchanged character in LTR languages - // or if we use poylglossia/bidi (XeTeX) - // or with babel and Xe/LuaTeX. + // or if we use XeTeX + // or with babel and LuaTeX. if (!getFontSettings(bparams, pos).isRightToLeft() - || bparams.useBidiPackage(rp) - || (rp.use_babel && rp.isFullUnicode())) + || rp.flavor == Flavor::XeTeX + || (rp.use_babel && rp.flavor == Flavor::LuaTeX)) return c; // Without polyglossia/bidi, we need to account for some special cases. @@ -2079,14 +2079,15 @@ char_type Paragraph::getUChar(BufferParams const & bparams, string const & lang = getFontSettings(bparams, pos).language()->lang(); char_type uc = c; - // 1. In the following languages, parentheses need to be reversed. - //Also with polyglossia/luabidi + // 1. With polyglossia/luabidi all delimiters need to be mirrored, + //regardless of the languge, or script. + // 2. In the following languages, parentheses need to be mirrored. bool const reverseparens = (lang == "hebrew" || rp.use_polyglossia); - // 2. In the following languages, brackets don't need to be reversed. - bool const reversebrackets = lang != "arabic_arabtex" + // 3. In the following languages, brackets don't need to be mirrored. + bool const reversebrackets = (lang != "arabic_arabtex" && lang != "arabic_arabi" - && lang != "farsi"; + && lang != "farsi") || rp.use_polyglossia; // Now swap delimiters if needed. switch (c) { -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Remove Qt < 5.2 conditionals and special code
commit 5c8e3a5f0d637974a0ac321d1f729c5ead2c1717 Author: Juergen Spitzmueller Date: Fri Aug 18 09:04:12 2023 +0200 Remove Qt < 5.2 conditionals and special code We require Qt 5.2 at least for LyX 2.4 --- src/frontends/qt/FancyLineEdit.cpp |4 - src/frontends/qt/GuiApplication.cpp| 17 +- src/frontends/qt/GuiApplication.h |2 - src/frontends/qt/GuiFontMetrics.cpp|4 - src/frontends/qt/GuiProgress.cpp | 32 -- src/frontends/qt/GuiView.cpp |2 - src/frontends/qt/GuiWorkArea.cpp |2 - src/frontends/qt/Makefile.am |1 - src/frontends/qt/ui/ToggleWarningUi.ui | 103 9 files changed, 2 insertions(+), 165 deletions(-) diff --git a/src/frontends/qt/FancyLineEdit.cpp b/src/frontends/qt/FancyLineEdit.cpp index 570d6cc..269a717 100644 --- a/src/frontends/qt/FancyLineEdit.cpp +++ b/src/frontends/qt/FancyLineEdit.cpp @@ -15,10 +15,6 @@ #include "FancyLineEdit.h" -#if QT_VERSION < 0x050200 -#include "GuiApplication.h" -#endif - #include #include #include diff --git a/src/frontends/qt/GuiApplication.cpp b/src/frontends/qt/GuiApplication.cpp index 165d140..a237242 100644 --- a/src/frontends/qt/GuiApplication.cpp +++ b/src/frontends/qt/GuiApplication.cpp @@ -1028,10 +1028,7 @@ public: struct GuiApplication::Private { Private(): language_model_(nullptr), meta_fake_bit(NoModifier), - global_menubar_(nullptr) - #if (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)) - , last_state_(Qt::ApplicationInactive) - #endif + global_menubar_(nullptr), last_state_(Qt::ApplicationInactive) { #if (QT_VERSION >= 0x050400) #if defined(Q_OS_WIN) || defined(Q_CYGWIN_WIN) @@ -1112,10 +1109,8 @@ struct GuiApplication::Private /// Only used on mac. QMenuBar * global_menubar_; -#if (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)) /// Holds previous application state on Mac Qt::ApplicationState last_state_; -#endif #if defined(Q_OS_MAC) && (QT_VERSION < 0x06) /// Linkback mime handler for MacOSX. @@ -1156,7 +1151,7 @@ GuiApplication::GuiApplication(int & argc, char ** argv) QCoreApplication::setOrganizationName(app_name); QCoreApplication::setOrganizationDomain("lyx.org"); QCoreApplication::setApplicationName(lyx_package); -#if QT_VERSION >= 0x050100 && QT_VERSION < 0x06 +#if QT_VERSION < 0x06 QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); #endif @@ -1195,11 +1190,9 @@ GuiApplication::GuiApplication(int & argc, char ** argv) setupApplescript(); appleCleanupEditMenu(); appleCleanupViewMenu(); -#if (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)) connect(this, SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(onApplicationStateChanged(Qt::ApplicationState))); #endif -#endif #if defined(QPA_XCB) // doubleClickInterval() is 400 ms on X11 which is just too long. @@ -2954,11 +2947,7 @@ namespace { QFont const GuiApplication::typewriterSystemFont() { -#if QT_VERSION >= 0x050200 QFont font = QFontDatabase::systemFont(QFontDatabase::FixedFont); -#else - QFont font("monospace"); -#endif if (!isFixedPitch(font)) { // try to enforce a real monospaced font font.setStyleHint(QFont::Monospace); @@ -3452,7 +3441,6 @@ void GuiApplication::onLastWindowClosed() } -#if (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)) void GuiApplication::onApplicationStateChanged(Qt::ApplicationState state) { std::string name = "unknown"; @@ -3479,7 +3467,6 @@ void GuiApplication::onApplicationStateChanged(Qt::ApplicationState state) LYXERR(Debug::GUI, "onApplicationStateChanged..." << name); d->last_state_ = state; } -#endif void GuiApplication::startLongOperation() { diff --git a/src/frontends/qt/GuiApplication.h b/src/frontends/qt/GuiApplication.h index 3eab5ec..a77b0c7 100644 --- a/src/frontends/qt/GuiApplication.h +++ b/src/frontends/qt/GuiApplication.h @@ -226,9 +226,7 @@ private Q_SLOTS: /// void slotProcessFuncRequestQueue() { processFuncRequestQueue(); } /// -#if (QT_VERSION >= 0x050100) void onApplicationStateChanged(Qt::ApplicationState state); -#endif private: /// diff --git a/src/frontends/qt/GuiFontMetrics.cpp b/src/frontends/qt/GuiFontMetrics.cpp index 0e69ffd..631aecc 100644 --- a/src/frontends/qt/GuiFontMetrics.cpp +++ b/src/frontends/qt/GuiFontMetrics.cpp @@ -30,11 +30,7 @@ #include #include -#if QT_VERSION >= 0x050100 #include -#else -#define qDegreesToRadians(degree) (degree) * (M_PI / 180) -#endif using namespace std; using namespace lyx::support; diff --git a/src/frontends/qt/GuiProgress.cpp b/src/frontends/qt/GuiProgress.cpp index a21baf3..80ba8ae 100644 --- a/src/frontends/qt/GuiProgress.cpp +++