[LyX/master] InsetNote: pass on inset-modify lfuns addressed at other insets (#13068)
commit ae1ddcbda0615b742184f4263cd1ad550eb38c32 Author: Juergen Spitzmueller Date: Fri May 24 14:19:18 2024 +0200 InsetNote: pass on inset-modify lfuns addressed at other insets (#13068) --- src/insets/InsetNote.cpp | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp index 7eed0ed9cc..ce5fd3e382 100644 --- a/src/insets/InsetNote.cpp +++ b/src/insets/InsetNote.cpp @@ -143,6 +143,11 @@ void InsetNote::doDispatch(Cursor & cur, FuncRequest & cmd) switch (cmd.action()) { case LFUN_INSET_MODIFY: { + if (cmd.getArg(0) != "note") { + // not for us; might be handled higher up + cur.undispatched(); + return; + } // Do not do anything if converting to the same type of Note. // A quick break here is done instead of disabling the LFUN // because disabling the LFUN would lead to a greyed out @@ -152,7 +157,7 @@ void InsetNote::doDispatch(Cursor & cur, FuncRequest & cmd) InsetNoteParams params; string2params(to_utf8(cmd.argument()), params); if (params_.type == params.type) - break; + break; cur.recordUndoInset(this); string2params(to_utf8(cmd.argument()), params_); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.1-devel] Update status
commit 091b8a93a8f4d485e60217c7c107764b7381f710 Author: Juergen Spitzmueller Date: Mon May 20 18:01:33 2024 +0200 Update status --- status.24x | 7 +++ 1 file changed, 7 insertions(+) diff --git a/status.24x b/status.24x index e6a9c112ae..b3831b31c6 100644 --- a/status.24x +++ b/status.24x @@ -62,6 +62,9 @@ What's new - Fix some cases where beamer breaks with the new cprotect mechanism. +- Update acknowledgments handling in aastex63 layout + (cf. https://journals.aas.org/aastexguide/#acknowledgments) + * USER INTERFACE @@ -81,6 +84,10 @@ What's new - Fix case where insets do not have proper information about current buffer (bug 12682). +- Handle deprecated Qt enum value. + +- Fix initialization of an internal value. + * DOCUMENTATION AND LOCALIZATION -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.1-devel] Initialize is_long_tabular before updateIndexes() (which employs it)
commit 26834b7a07626d44d81aea619e219ec26e00cb79 Author: Juergen Spitzmueller Date: Mon May 20 08:50:39 2024 +0200 Initialize is_long_tabular before updateIndexes() (which employs it) (cherry picked from commit 10b5f03d95dca8f3e8c225aa2deca4d473f8b169) --- src/insets/InsetTabular.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 5242775e7f..da8e426935 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -783,8 +783,8 @@ void Tabular::init(Buffer * buf, row_type rows_arg, row_info.reserve(10); column_info.reserve(10); cell_info.reserve(100); - updateIndexes(); is_long_tabular = false; + updateIndexes(); tabular_valignment = LYX_VALIGN_MIDDLE; tabular_width = Length(); longtabular_alignment = LYX_LONGTABULAR_ALIGN_CENTER; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.1-devel] Address Qt 6.7 deprecation warning
commit 712baff7b6fe14f10bedb5018ab8e68afa908e67 Author: Juergen Spitzmueller Date: Mon May 20 09:49:10 2024 +0200 Address Qt 6.7 deprecation warning (cherry picked from commit 44633c7f729e79ea023f2a5ccbbdd0002411619f) --- src/frontends/qt/GuiKeySymbol.cpp | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt/GuiKeySymbol.cpp b/src/frontends/qt/GuiKeySymbol.cpp index 083bc5f884..b785791c85 100644 --- a/src/frontends/qt/GuiKeySymbol.cpp +++ b/src/frontends/qt/GuiKeySymbol.cpp @@ -267,7 +267,12 @@ static int string_to_qkey(std::string const & str) if (str == "twosuperior") return Qt::Key_twosuperior; if (str == "threesuperior") return Qt::Key_threesuperior; if (str == "acute") return Qt::Key_acute; - if (str == "mu") return Qt::Key_mu; + if (str == "mu") +#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)) + return Qt::Key_micro; +#else + return Qt::Key_mu; +#endif if (str == "paragraph") return Qt::Key_paragraph; if (str == "periodcentered") return Qt::Key_periodcentered; if (str == "cedilla") return Qt::Key_cedilla; @@ -590,7 +595,14 @@ static std::string const qkey_to_string(int lkey) case Qt::Key_twosuperior: return "twosuperior"; case Qt::Key_threesuperior: return "threesuperior"; case Qt::Key_acute: return "acute"; +#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)) + // FIXME: Qt::Key_mu has been deprecated in Qt 6.7 + // since it is a misnomer. Change our return string, too? + // If so, don't forget string_to_qkey() + case Qt::Key_micro: return "mu"; +#else case Qt::Key_mu: return "mu"; +#endif case Qt::Key_paragraph: return "paragraph"; case Qt::Key_periodcentered: return "periodcentered"; case Qt::Key_cedilla: return "cedilla"; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.1-devel] Update aastex63.layout according to https://journals.aas.org/aastexguide/#acknowledgments
commit ac6d011e7f84f3e80c694e6ae3e90dcfe4f46564 Author: Juergen Spitzmueller Date: Mon May 20 16:10:23 2024 +0200 Update aastex63.layout according to https://journals.aas.org/aastexguide/#acknowledgments (cherry picked from commit d3d8b3d748f03ebafd477570291264961e22c7c4) --- lib/layouts/aastex63.layout | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/layouts/aastex63.layout b/lib/layouts/aastex63.layout index e94d490e91..4af00f7af2 100644 --- a/lib/layouts/aastex63.layout +++ b/lib/layouts/aastex63.layout @@ -49,6 +49,8 @@ # Version 6.3 04/03/24 - Stub for AASTeX 6.31: # new layout file aastex631.layout, because # aastex62.cls was renamed to aastex631.cls (2021/09/16) +#- Change Acknowledgments style to environment. See +# https://journals.aas.org/aastexguide/#acknowledgments ## # TODO: - support for new commands (see below) # - aastex6.cls loads hyperref (with pre-set options) and url @@ -236,6 +238,7 @@ Style Altaffilation End Style Acknowledgments + LatexTypeEnvironment Font Shape Up EndFont -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update aastex63.layout according to https://journals.aas.org/aastexguide/#acknowledgments
commit d3d8b3d748f03ebafd477570291264961e22c7c4 Author: Juergen Spitzmueller Date: Mon May 20 16:10:23 2024 +0200 Update aastex63.layout according to https://journals.aas.org/aastexguide/#acknowledgments --- lib/layouts/aastex63.layout | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/layouts/aastex63.layout b/lib/layouts/aastex63.layout index e94d490e91..4af00f7af2 100644 --- a/lib/layouts/aastex63.layout +++ b/lib/layouts/aastex63.layout @@ -49,6 +49,8 @@ # Version 6.3 04/03/24 - Stub for AASTeX 6.31: # new layout file aastex631.layout, because # aastex62.cls was renamed to aastex631.cls (2021/09/16) +#- Change Acknowledgments style to environment. See +# https://journals.aas.org/aastexguide/#acknowledgments ## # TODO: - support for new commands (see below) # - aastex6.cls loads hyperref (with pre-set options) and url @@ -236,6 +238,7 @@ Style Altaffilation End Style Acknowledgments + LatexTypeEnvironment Font Shape Up EndFont -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Address Qt 6.7 deprecation warning
commit 44633c7f729e79ea023f2a5ccbbdd0002411619f Author: Juergen Spitzmueller Date: Mon May 20 09:49:10 2024 +0200 Address Qt 6.7 deprecation warning --- src/frontends/qt/GuiKeySymbol.cpp | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt/GuiKeySymbol.cpp b/src/frontends/qt/GuiKeySymbol.cpp index 083bc5f884..b785791c85 100644 --- a/src/frontends/qt/GuiKeySymbol.cpp +++ b/src/frontends/qt/GuiKeySymbol.cpp @@ -267,7 +267,12 @@ static int string_to_qkey(std::string const & str) if (str == "twosuperior") return Qt::Key_twosuperior; if (str == "threesuperior") return Qt::Key_threesuperior; if (str == "acute") return Qt::Key_acute; - if (str == "mu") return Qt::Key_mu; + if (str == "mu") +#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)) + return Qt::Key_micro; +#else + return Qt::Key_mu; +#endif if (str == "paragraph") return Qt::Key_paragraph; if (str == "periodcentered") return Qt::Key_periodcentered; if (str == "cedilla") return Qt::Key_cedilla; @@ -590,7 +595,14 @@ static std::string const qkey_to_string(int lkey) case Qt::Key_twosuperior: return "twosuperior"; case Qt::Key_threesuperior: return "threesuperior"; case Qt::Key_acute: return "acute"; +#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)) + // FIXME: Qt::Key_mu has been deprecated in Qt 6.7 + // since it is a misnomer. Change our return string, too? + // If so, don't forget string_to_qkey() + case Qt::Key_micro: return "mu"; +#else case Qt::Key_mu: return "mu"; +#endif case Qt::Key_paragraph: return "paragraph"; case Qt::Key_periodcentered: return "periodcentered"; case Qt::Key_cedilla: return "cedilla"; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Initialize is_long_tabular before updateIndexes() (which employs it)
commit 10b5f03d95dca8f3e8c225aa2deca4d473f8b169 Author: Juergen Spitzmueller Date: Mon May 20 08:50:39 2024 +0200 Initialize is_long_tabular before updateIndexes() (which employs it) --- src/insets/InsetTabular.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 46b54486de..2f32e3dd8d 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -783,8 +783,8 @@ void Tabular::init(Buffer * buf, row_type rows_arg, row_info.reserve(10); column_info.reserve(10); cell_info.reserve(100); - updateIndexes(); is_long_tabular = false; + updateIndexes(); tabular_valignment = LYX_VALIGN_MIDDLE; tabular_width = Length(); longtabular_alignment = LYX_LONGTABULAR_ALIGN_CENTER; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Limit the nopassthurchars case in beamer to URL
commit 6ef18c35837053f1add431f6099f4b7c0c3e2180 Author: Juergen Spitzmueller Date: Mon May 20 08:26:03 2024 +0200 Limit the nopassthurchars case in beamer to URL and also generally extend to classes that provide hyperref --- lib/layouts/beamer.layout | 2 -- src/Buffer.cpp| 6 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/layouts/beamer.layout b/lib/layouts/beamer.layout index cdc379e53d..8b9f1b2f69 100644 --- a/lib/layouts/beamer.layout +++ b/lib/layouts/beamer.layout @@ -554,7 +554,6 @@ Style Frame Example,Examples,Fact,Lemma,Proof,Theorem,LyX-Code EndAutoNests NeedCProtect-1 - NoPassThruChars "%#" End Style PlainFrame @@ -578,7 +577,6 @@ Style FragileFrame PresetArg "fragile" EndArgument NeedCProtect 0 - NoPassThruChars "" End Style AgainFrame diff --git a/src/Buffer.cpp b/src/Buffer.cpp index f4a02ca4e5..6dea0a44e7 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1882,7 +1882,8 @@ Buffer::ExportStatus Buffer::writeLaTeXSource(otexstream & os, // This is only set once per document (in master) if (!runparams.is_child) { runparams.use_polyglossia = features.usePolyglossia(); - runparams.use_hyperref = features.isRequired("hyperref"); + runparams.use_hyperref = features.isRequired("hyperref") + || features.isProvided("hyperref"); runparams.use_CJK = features.mustProvide("CJK"); } LYXERR(Debug::OUTFILE, " Buffer validation done."); @@ -4208,7 +4209,8 @@ unique_ptr Buffer::getSourceCode(odocstream & os, string const & format, validate(features); runparams.use_polyglossia = features.usePolyglossia(); runparams.use_babel = features.useBabel(); - runparams.use_hyperref = features.isRequired("hyperref"); + runparams.use_hyperref = features.isRequired("hyperref") + || features.isProvided("hyperref"); // latex or literate otexstream ots(os); // output above -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.x] Amend 207eaeee9071cb
commit 8f65ae16e14c7909aa122532b19422ff32d3446e Author: Juergen Spitzmueller Date: Thu May 16 07:33:29 2024 +0200 Amend 207eaeee9071cb The upstream encoding needs to be updated after this routine (see comment in OutputParams.h:183ff.) (cherry picked from commit 2d95f8fc160d6ecc63acb81ffac16a99339083b2) --- src/output_latex.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/output_latex.cpp b/src/output_latex.cpp index 1c1faf7435..9b504a72cb 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -494,6 +494,9 @@ void TeXEnvironment(Buffer const & buf, Text const & text, if (pit != runparams.par_end) LYXERR(Debug::OUTFILE, "TeXEnvironment for paragraph " << par_begin << " done."); + + // set upstream encoding + runparams_in.encoding = runparams.encoding; } -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Amend 207eaeee9071cb
commit 2d95f8fc160d6ecc63acb81ffac16a99339083b2 Author: Juergen Spitzmueller Date: Thu May 16 07:33:29 2024 +0200 Amend 207eaeee9071cb The upstream encoding needs to be updated after this routine (see comment in OutputParams.h:183ff.) --- src/output_latex.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/output_latex.cpp b/src/output_latex.cpp index 8ea5502e1c..49dbd2d07a 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -495,6 +495,9 @@ void TeXEnvironment(Buffer const & buf, Text const & text, if (pit != runparams.par_end) LYXERR(Debug::OUTFILE, "TeXEnvironment for paragraph " << par_begin << " done."); + + // set upstream encoding + runparams_in.encoding = runparams.encoding; } -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] mumble
commit c23f731fae40d58bb6df6a031754bf1e93041247 Author: Juergen Spitzmueller Date: Wed May 15 18:36:47 2024 +0200 mumble --- lib/lyx2lyx/lyx_2_5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lyx2lyx/lyx_2_5.py b/lib/lyx2lyx/lyx_2_5.py index 520cd3f88f..17deb820c7 100644 --- a/lib/lyx2lyx/lyx_2_5.py +++ b/lib/lyx2lyx/lyx_2_5.py @@ -98,7 +98,7 @@ def revert_url_escapes(document): while True: i = find_token(document.body, "\\begin_inset Flex URL", i) if i == -1: -continue +return j = find_end_of_inset(document.body, i) if j == -1: document.warning("Malformed LyX document: Could not find end of URL inset.") -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.1-devel] Document NeedCProtect -1 InsetLayout option
commit fe2e5dcf35221e6e04653635410b1f4b94fe424a Author: Juergen Spitzmueller Date: Wed May 15 13:58:28 2024 +0200 Document NeedCProtect -1 InsetLayout option --- lib/doc/Customization.lyx| 73 +- lib/doc/de/Customization.lyx | 220 +++ status.24x | 2 + 3 files changed, 294 insertions(+), 1 deletion(-) diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx index bb97630c58..0500d0fce1 100644 --- a/lib/doc/Customization.lyx +++ b/lib/doc/Customization.lyx @@ -20803,6 +20803,17 @@ NeedCProtect \begin_inset Flex Code status collapsed +\begin_layout Plain Layout +-1 +\end_layout + +\end_inset + +, + +\begin_inset Flex Code +status collapsed + \begin_layout Plain Layout \emph on @@ -20825,7 +20836,17 @@ status collapsed \end_inset -] This causes macros that contain this inset to be protected with +] Value +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +1 +\end_layout + +\end_inset + + causes macros that contain this inset to be protected with \begin_inset Flex Code status collapsed @@ -20844,6 +20865,54 @@ cprotect \family default ) if necessary and thus allows (some) verbatim stuff in macros. Default is false. + With the default setting (value +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +0 +\end_layout + +\end_inset + +), + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + is used if a nested element requires it. + Value +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +-1 +\end_layout + +\end_inset + + prevents any use of +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + within this inset, + even if required by a nested element. \end_layout \begin_layout Description @@ -31439,6 +31508,8 @@ status collapsed \change_inserted -712698321 1712389749 $$OrigAbsName +\change_unchanged + \end_layout \end_inset diff --git a/lib/doc/de/Customization.lyx b/lib/doc/de/Customization.lyx index 6164c0721d..396898f8ff 100644 --- a/lib/doc/de/Customization.lyx +++ b/lib/doc/de/Customization.lyx @@ -19607,6 +19607,226 @@ MultiPar \begin_inset Flex Code status collapsed +\begin_layout Plain Layout +NeedCProtect +\end_layout + +\end_inset + + [ +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +-1 +\end_layout + +\end_inset + +, +\begin_inset space \thinspace{} +\end_inset + + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\emph on +0 +\end_layout + +\end_inset + +, +\begin_inset space \thinspace{} +\end_inset + + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +1 +\end_layout + +\end_inset + +] Wert +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +1 +\end_layout + +\end_inset + + bewirkt, + dass Makros, + die diese Einfügung enthalten, + mittels +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + (Paket +\family sans +cprotect +\family default +) geschützt werden, + falls nötig. + Damit wird die Verwendung (mancher) Verbatim-Dinge in Makros ermöglicht. + In der Voreinstellung (Wert +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +0 +\end_layout + +\end_inset + +) wird +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + verwendet, + sobald ein eingebettetes Element dies verlangt. + Der Wert +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +-1 +\end_layout + +\end_inset + + unterbindet die Verwendung von +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + selbst dann, + wenn eingebettete Elemente dies verlangen. +\end_layout + +\begin_layout Description +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +NeedMBoxProtect +\end_layout + +\end_inset + + [ +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\emph on +0 +\end_layout + +\end_inset + +, +\begin_inset space \thinspace{} +\end_inset + + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +1 +\end_layout + +\end_inset + +] legt fest, + ob bestimmte Befehle in dieser Einfügung (bspw. + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cite +\end_layout + +\end_inset + + und +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +ref +\end_layout + +\end_inset + +) in einer +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +mbox +\end_layout + +\end_inset + + geschützt werden sollen. + Das ist vor allem für Einfügungen nötig, + die auf Befehle der Pakete +\family sans
[LyX/2.4.1-devel] Amend a716fb96b53447
commit 576d3836cf8e5d31d75ddf5e1910373af58cf4cb Author: Juergen Spitzmueller Date: Tue May 14 13:54:00 2024 +0200 Amend a716fb96b53447 (cherry picked from commit af59551b1b0c7d7e95c70ae4db156cba7ac0cefe) --- src/Paragraph.cpp| 1 + src/insets/InsetText.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index ec92fa21cf..22a75c7d19 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1173,6 +1173,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, && !textinset->text().isMainText() && inset->lyxCode() != BRANCH_CODE && !runparams.no_cprotect + && !inset->getLayout().noCProtect() : false; unsigned int count2 = basefont.latexWriteStartChanges(os, bparams, rp, running_font, diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 5552d479be..73813d9ee3 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -500,7 +500,7 @@ void InsetText::latex(otexstream & os, OutputParams const & runparams) const // FIXME UNICODE // FIXME \protect should only be used for fragile //commands, but we do not provide this information yet. - if (!runparams.no_cprotect && hasCProtectContent(runparams.moving_arg)) { + if (!il.noCProtect() && !runparams.no_cprotect && hasCProtectContent(runparams.moving_arg)) { if (contains(runparams.active_chars, '^')) { // cprotect relies on ^ being on catcode 7 os << "\\begingroup\\catcode`\\^=7"; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.1-devel] NeedCProtect -1 also for InsetLayouts
commit 176ecba6308c47c7674c0b7c2c2b0f264b9d6b84 Author: Juergen Spitzmueller Date: Tue May 14 13:37:29 2024 +0200 NeedCProtect -1 also for InsetLayouts (cherry picked from commit a716fb96b534475759799b195a7edaeb049fbcf6) --- lib/layouts/beamer.layout | 7 +++ src/insets/InsetLayout.cpp | 12 ++-- src/insets/InsetLayout.h | 4 src/insets/InsetText.cpp | 2 ++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/lib/layouts/beamer.layout b/lib/layouts/beamer.layout index 58caf67c7d..8b9f1b2f69 100644 --- a/lib/layouts/beamer.layout +++ b/lib/layouts/beamer.layout @@ -1576,6 +1576,7 @@ InsetLayout Flex:Only EndArgument ResetsFont true CustomPars false + NeedCProtect -1 End InsetLayout Flex:Uncover @@ -1597,6 +1598,7 @@ InsetLayout Flex:Uncover EndArgument ResetsFont true CustomPars false + NeedCProtect -1 End InsetLayout Flex:Visible @@ -1618,6 +1620,7 @@ InsetLayout Flex:Visible EndArgument ResetsFont true CustomPars false + NeedCProtect -1 End InsetLayout Flex:Invisible @@ -1639,6 +1642,7 @@ InsetLayout Flex:Invisible EndArgument ResetsFont true CustomPars false + NeedCProtect -1 End InsetLayout Flex:Alternative @@ -1666,6 +1670,7 @@ InsetLayout Flex:Alternative EndArgument ResetsFont true CustomPars false + NeedCProtect -1 End InsetLayout Flex:Beamer_Note @@ -1701,6 +1706,7 @@ InsetLayout Flex:ArticleMode LabelString Article MultiPartrue ResetsFont true + NeedCProtect-1 End InsetLayout Flex:PresentationMode @@ -1712,6 +1718,7 @@ InsetLayout Flex:PresentationMode LabelString Presentation MultiPartrue ResetsFont true + NeedCProtect-1 End diff --git a/src/insets/InsetLayout.cpp b/src/insets/InsetLayout.cpp index 8e5ed651cf..b4c7dc4eee 100644 --- a/src/insets/InsetLayout.cpp +++ b/src/insets/InsetLayout.cpp @@ -400,9 +400,17 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass, case IL_NEEDPROTECT: lex >> needprotect_; break; - case IL_NEEDCPROTECT: - lex >> needcprotect_; + case IL_NEEDCPROTECT: { + string val; + lex >> val; + nocprotect_ = false; + needcprotect_ = false; + if (val == "-1") + nocprotect_ = true; + else if (val == "1" || val == "true") + needcprotect_ = true; break; + } case IL_NEEDMBOXPROTECT: lex >> needmboxprotect_; break; diff --git a/src/insets/InsetLayout.h b/src/insets/InsetLayout.h index 6700100252..ee5d4afefa 100644 --- a/src/insets/InsetLayout.h +++ b/src/insets/InsetLayout.h @@ -221,6 +221,8 @@ public: bool isNeedProtect() const { return needprotect_; } /// bool needsCProtect() const { return needcprotect_; } + /// + bool noCProtect() const { return nocprotect_; } /// Protection of some elements such as \ref and \cite /// in \mbox (needed by commands building on soul or ulem) bool isNeedMBoxProtect() const { return needmboxprotect_; } @@ -415,6 +417,8 @@ private: /// bool needcprotect_ = false; /// + bool nocprotect_ = false; + /// bool needmboxprotect_ = false; /// should the contents be written to TOC strings? bool intoc_ = false; diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 9a60f4d855..5552d479be 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -549,6 +549,8 @@ void InsetText::latex(otexstream & os, OutputParams const & runparams) const ++rp.inulemcmd; if (!il.passThruChars().empty()) rp.pass_thru_chars += il.passThruChars(); + if (il.noCProtect()) + rp.no_cprotect = true; if (!il.newlineCmd().empty()) rp.newlinecmd = il.newlineCmd(); rp.par_begin = 0; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.1-devel] Document NeedCProtect -1
commit 1511516ef769cb3a11546a78cea6abd41cb91ffe Author: Juergen Spitzmueller Date: Mon May 13 06:53:19 2024 +0200 Document NeedCProtect -1 (cherry picked from commit ea004cdb28e9b440347a9487d127e55765940c79) --- lib/doc/Customization.lyx| 74 +++- lib/doc/de/Customization.lyx | 76 - lib/doc/fr/Customization.lyx | 155 ++ lib/doc/ja/Customization.lyx | 156 +++ 4 files changed, 458 insertions(+), 3 deletions(-) diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx index 79ece05a06..bb97630c58 100644 --- a/lib/doc/Customization.lyx +++ b/lib/doc/Customization.lyx @@ -15113,6 +15113,20 @@ NeedCProtect \begin_inset Flex Code status collapsed +\begin_layout Plain Layout +-1 +\end_layout + +\end_inset + +, +\begin_inset space \thinspace{} +\end_inset + + +\begin_inset Flex Code +status collapsed + \begin_layout Plain Layout \emph on @@ -15135,7 +15149,17 @@ status collapsed \end_inset -] This causes macros that contain this layout to be protected with +] Value +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +1 +\end_layout + +\end_inset + + causes macros that contain this layout to be protected with \begin_inset Flex Code status collapsed @@ -15153,6 +15177,54 @@ cprotect cprotect \family default ) if necessary and thus allows (some) verbatim stuff in macros. + With the default setting (value +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +0 +\end_layout + +\end_inset + +), + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + is used if a nested element requires it. + Value +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +-1 +\end_layout + +\end_inset + + prevents any use of +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + within this layout, + even if required by a nested element. \end_layout \begin_layout Description diff --git a/lib/doc/de/Customization.lyx b/lib/doc/de/Customization.lyx index b88adcebb1..6164c0721d 100644 --- a/lib/doc/de/Customization.lyx +++ b/lib/doc/de/Customization.lyx @@ -13743,6 +13743,20 @@ NeedCProtect \begin_inset Flex Code status collapsed +\begin_layout Plain Layout +-1 +\end_layout + +\end_inset + +, +\begin_inset space \thinspace{} +\end_inset + + +\begin_inset Flex Code +status collapsed + \begin_layout Plain Layout \emph on @@ -13765,7 +13779,17 @@ status collapsed \end_inset -] bewirkt, +] Wert +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +1 +\end_layout + +\end_inset + + bewirkt, dass Makros, die dieses Layout enthalten, mittels @@ -13784,9 +13808,57 @@ cprotect \family sans cprotect \family default -) gechützt werden, +) geschützt werden, falls nötig. Damit wird die Verwendung (mancher) Verbatim-Dinge in Makros ermöglicht. + In der Voreinstellung (Wert +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +0 +\end_layout + +\end_inset + +) wird +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + verwendet, + sobald ein eingebettetes Element dies verlangt. + Der Wert +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +-1 +\end_layout + +\end_inset + + unterbindet die Verwendung von +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + selbst dann, + wenn eingebettete Elemente dies verlangen. \end_layout \begin_layout Description diff --git a/lib/doc/fr/Customization.lyx b/lib/doc/fr/Customization.lyx index 11d3457edb..9955dc4579 100644 --- a/lib/doc/fr/Customization.lyx +++ b/lib/doc/fr/Customization.lyx @@ -14816,6 +14816,161 @@ cprotect cprotect \family default ) et par suite autorise du texte verbatim dans les macros +\begin_inset Note Note +status open + +\begin_layout Description + +\lang english +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\lang english +NeedCProtect +\end_layout + +\end_inset + + [ +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\lang english +-1 +\end_layout + +\end_inset + +, +\begin_inset space \thinspace{} +\end_inset + + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\emph on +\lang english +0 +\end_layout + +\end_inset + +, +\begin_inset space \thinspace{} +\end_inset + + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\lang english +1 +\end_layout + +\end_inset + +] Value +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\lang english +1 +\end_layout + +\end_inset + + causes macros that contain this layout to be protected with +\begin_inset Flex Code
[LyX/2.4.1-devel] Amend 207eaeee9071cb
commit 4a81296b3d4d2d6f953869fd8f1a39f12b806c8b Author: Juergen Spitzmueller Date: Sun May 12 08:52:09 2024 +0200 Amend 207eaeee9071cb FragileFrame, as opposed to normal frame, supports cprotect (and needs it in the usual circumstances) (cherry picked from commit eeb3f9e719d15c4117a510e8a214d1c1b2c5a33c) (cherry picked from commit 50cd148bd260222e30b6e429d135c45f8c2f1f14) --- lib/layouts/beamer.layout | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/layouts/beamer.layout b/lib/layouts/beamer.layout index 9649aeb531..58caf67c7d 100644 --- a/lib/layouts/beamer.layout +++ b/lib/layouts/beamer.layout @@ -576,6 +576,7 @@ Style FragileFrame Tooltip "Frame options (see beamer manual)" PresetArg "fragile" EndArgument + NeedCProtect 0 End Style AgainFrame -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.1-devel] Introduce NeedCProtect -1 layout option
commit 0af725902578cf9b820008c85e7b36eb7fea7eed Author: Juergen Spitzmueller Date: Sun May 12 07:52:16 2024 +0200 Introduce NeedCProtect -1 layout option It turns out beamer frame does not allow \cprotect and errors if it is used. Hence we need to prevent it in this context entirely. (cherry picked from commit 207eaeee9071cb828a2ab7f4680f8ff92e379af8) (cherry picked from commit f05fd787548e8b3082051b7d45bb4119f97a55dc) --- lib/layouts/beamer.layout | 1 + src/Layout.cpp| 13 +++-- src/Layout.h | 3 +++ src/OutputParams.h| 5 + src/Paragraph.cpp | 2 ++ src/insets/InsetText.cpp | 2 +- src/output_latex.cpp | 13 - 7 files changed, 31 insertions(+), 8 deletions(-) diff --git a/lib/layouts/beamer.layout b/lib/layouts/beamer.layout index e9d9c5d904..9649aeb531 100644 --- a/lib/layouts/beamer.layout +++ b/lib/layouts/beamer.layout @@ -553,6 +553,7 @@ Style Frame ExampleBlock,AlertBlock,Bibliography,Quotation,Quote,Verse,Corollary,Definition,Definitions, Example,Examples,Fact,Lemma,Proof,Theorem,LyX-Code EndAutoNests + NeedCProtect-1 End Style PlainFrame diff --git a/src/Layout.cpp b/src/Layout.cpp index 8e54891fb9..d7b9cb2e9c 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -162,6 +162,7 @@ Layout::Layout() inpreamble = false; needprotect = false; needcprotect = false; + nocprotect = false; needmboxprotect = false; keepempty = false; font = inherit_font; @@ -465,9 +466,17 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass, lex >> needprotect; break; - case LT_NEED_CPROTECT: - lex >> needcprotect; + case LT_NEED_CPROTECT: { + int i; + lex >> i; + nocprotect = false; + needcprotect = false; + if (i == -1) + nocprotect = true; + else if (i == 1) + needcprotect = true; break; + } case LT_NEED_MBOXPROTECT: lex >> needmboxprotect; diff --git a/src/Layout.h b/src/Layout.h index 6581155007..144603f06c 100644 --- a/src/Layout.h +++ b/src/Layout.h @@ -399,6 +399,9 @@ public: /** true when the verbatim stuff of this layout needs to be \cprotect'ed. */ bool needcprotect; + /** true when the verbatim stuff of this layout never should be + \cprotect'ed. */ + bool nocprotect; /** true when specific commands in this paragraph need to be protected in an \mbox. */ bool needmboxprotect; diff --git a/src/OutputParams.h b/src/OutputParams.h index 9d9a7ae8f8..2e7d84e9c7 100644 --- a/src/OutputParams.h +++ b/src/OutputParams.h @@ -108,6 +108,11 @@ public: */ bool moving_arg = false; + /** no_cprotect == true means that the layout in which this is +* does not allow \cprotect'ing. + */ + bool no_cprotect = false; + /** intitle == true means that the environment in which the inset is typeset is part of a title (before a \\maketitle). Footnotes in such environments have moving arguments. diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 4282defa4a..ec92fa21cf 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1172,6 +1172,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, ? textinset->hasCProtectContent(runparams.moving_arg) && !textinset->text().isMainText() && inset->lyxCode() != BRANCH_CODE + && !runparams.no_cprotect : false; unsigned int count2 = basefont.latexWriteStartChanges(os, bparams, rp, running_font, @@ -3014,6 +3015,7 @@ void Paragraph::latex(BufferParams const & bparams, ? textinset->hasCProtectContent(runparams.moving_arg) && !textinset->text().isMainText() && inInset().lyxCode() != BRANCH_CODE + && !runparams.no_cprotect : false; column += current_font.latexWriteStartChanges(ots, bparams, runparams, basefont, last_font, false, diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index b8e65709a1..9a60f4d855 100644 --- a/src/insets
[LyX/master] # and % need to be escaped in hyperref URL as well
commit 9d43fd2ae138f73fc565e3018a8ef58d7614b489 Author: Juergen Spitzmueller Date: Wed May 15 13:15:08 2024 +0200 # and % need to be escaped in hyperref URL as well Also fix some lyx2lyx glitches This hopefully fixes the test issues. --- lib/lyx2lyx/lyx_2_5.py | 58 +- src/Paragraph.cpp | 8 --- 2 files changed, 34 insertions(+), 32 deletions(-) diff --git a/lib/lyx2lyx/lyx_2_5.py b/lib/lyx2lyx/lyx_2_5.py index c574aa2eb9..520cd3f88f 100644 --- a/lib/lyx2lyx/lyx_2_5.py +++ b/lib/lyx2lyx/lyx_2_5.py @@ -55,75 +55,73 @@ from parser_tools import (find_end_of_inset, find_end_of_layout, find_token, fin ### def convert_url_escapes(document): -"""Unescape # and % in URLs in frames.""" -if document.textclass not in ['beamer', 'scrarticle-beamer', 'beamerposter', 'article-beamer']: +"""Unescape # and % in URLs with hyperref.""" + +hyperref = find_token(document.header, "\\use_hyperref true", 0) != -1 +beamer = document.textclass in ['beamer', 'scrarticle-beamer', 'beamerposter', 'article-beamer'] + +if not hyperref and not beamer: return rurl = re.compile(r'^[%#].*') i = 0 while True: -i = find_token(document.body, "\\begin_layout Frame", i + 1) +i = find_token(document.body, "\\begin_inset Flex URL", i) if i == -1: return -j = find_end_of_layout(document.body, i) +j = find_end_of_inset(document.body, i) if j == -1: -document.warning("Malformed LyX document: Could not find end of Frame layout.") -continue -k = find_token(document.body, "\\begin_inset Flex URL", i, j) -if k == -1: -continue -l = find_end_of_inset(document.body, k) -if l == -1: document.warning("Malformed LyX document: Could not find end of URL inset.") +i += 1 continue while True: -surl = find_re(document.body, rurl, k, l) +surl = find_re(document.body, rurl, i, j) if surl == -1: +i = j break if document.body[surl - 1] == "\\backslash": del document.body[surl - 1] -k = surl +i = surl def revert_url_escapes(document): -"""Unescape # and % in URLs in frames.""" -if document.textclass not in ['beamer', 'scrarticle-beamer', 'beamerposter', 'article-beamer']: +"""Unescape # and % in URLs with hyperref.""" + +hyperref = find_token(document.header, "\\use_hyperref true", 0) != -1 +beamer = document.textclass in ['beamer', 'scrarticle-beamer', 'beamerposter', 'article-beamer'] + +if not hyperref and not beamer: return rurl = re.compile(r'^(.*)([%#].*)') i = 0 while True: -i = find_token(document.body, "\\begin_layout Frame", i + 1) +i = find_token(document.body, "\\begin_inset Flex URL", i) if i == -1: -return -j = find_end_of_layout(document.body, i) -if j == -1: -document.warning("Malformed LyX document: Could not find end of Frame layout.") continue -k = find_token(document.body, "\\begin_inset Flex URL", i, j) -if k == -1: -continue -l = find_end_of_inset(document.body, k) -if l == -1: +j = find_end_of_inset(document.body, i) +if j == -1: document.warning("Malformed LyX document: Could not find end of URL inset.") +i += 1 continue while True: -surl = find_re(document.body, rurl, k, l) +surl = find_re(document.body, rurl, i, j) if surl == -1: +i = j break m = rurl.match(document.body[surl]) if m: if m.group(1) == "" and document.body[surl - 1] == "\\backslash": break document.body[surl : surl + 1] = [m.group(1), "\\backslash", m.group(2)] -k = surl +i = surl def convert_url_escapes2(document): """Unescape backslashes in URLs with hyperref.""" i = find_token(document.header, "\\use_hyperref true", 0) -if i != -1 and document.textclass not in ['beamer', 'scrarticle-beamer', 'beamerposter', 'article-beamer']: +if i == -1 and document.textclass not in ['beamer', 'scrarticle-beamer', 'beamerposter', 'article-beamer']: return i = 0 @@ -134,6 +132,7 @@ def convert_ur
[LyX/master] Amend a716fb96b53447
commit af59551b1b0c7d7e95c70ae4db156cba7ac0cefe Author: Juergen Spitzmueller Date: Tue May 14 13:54:00 2024 +0200 Amend a716fb96b53447 --- src/Paragraph.cpp| 1 + src/insets/InsetText.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 0dee0af3ae..dd8d66d1fa 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1174,6 +1174,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, && !textinset->text().isMainText() && inset->lyxCode() != BRANCH_CODE && !runparams.no_cprotect + && !inset->getLayout().noCProtect() : false; unsigned int count2 = basefont.latexWriteStartChanges(os, bparams, rp, running_font, diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 6df4d8eca8..b8be5c206b 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -500,7 +500,7 @@ void InsetText::latex(otexstream & os, OutputParams const & runparams) const // FIXME UNICODE // FIXME \protect should only be used for fragile //commands, but we do not provide this information yet. - if (!runparams.no_cprotect && hasCProtectContent(runparams.moving_arg)) { + if (!il.noCProtect() && !runparams.no_cprotect && hasCProtectContent(runparams.moving_arg)) { if (contains(runparams.active_chars, '^')) { // cprotect relies on ^ being on catcode 7 os << "\\begingroup\\catcode`\\^=7"; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Document a716fb96b53447
commit 227ce773bfb915a4dad331cc74fadec89a54c238 Author: Juergen Spitzmueller Date: Tue May 14 13:38:16 2024 +0200 Document a716fb96b53447 --- lib/doc/Customization.lyx| 101 +++- lib/doc/de/Customization.lyx | 222 ++- 2 files changed, 321 insertions(+), 2 deletions(-) diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx index 8de047803e..83784e8c2a 100644 --- a/lib/doc/Customization.lyx +++ b/lib/doc/Customization.lyx @@ -20890,6 +20890,23 @@ NeedCProtect \end_inset [ +\change_inserted -712698321 1715685021 + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1715685023 +-1 +\end_layout + +\end_inset + +, + +\change_unchanged + \begin_inset Flex Code status collapsed @@ -20915,7 +20932,25 @@ status collapsed \end_inset -] This causes macros that contain this inset to be protected with +] +\change_deleted -712698321 1715685030 +This +\change_inserted -712698321 1715685031 +Value +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1715685031 +1 +\end_layout + +\end_inset + + +\change_unchanged + causes macros that contain this inset to be protected with \begin_inset Flex Code status collapsed @@ -20934,6 +20969,66 @@ cprotect \family default ) if necessary and thus allows (some) verbatim stuff in macros. Default is false. + +\change_inserted -712698321 1715685049 + With the default setting (value +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1715685008 +0 +\end_layout + +\end_inset + +), + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1715685008 + +\backslash +cprotect +\end_layout + +\end_inset + + is used if a nested element requires it. + Value +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1715685008 +-1 +\end_layout + +\end_inset + + prevents any use of +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1715685008 + +\backslash +cprotect +\end_layout + +\end_inset + + within this inset, + even if required by a nested element. +\change_unchanged + \end_layout \begin_layout Description @@ -21104,6 +21199,8 @@ status collapsed \change_inserted -712698321 1715512954 NoPassThruChars +\change_unchanged + \end_layout \end_inset @@ -21116,6 +21213,8 @@ status collapsed \change_inserted -712698321 1715512954 string +\change_unchanged + \end_layout \end_inset diff --git a/lib/doc/de/Customization.lyx b/lib/doc/de/Customization.lyx index 2ad9f1a8f9..3c671d525b 100644 --- a/lib/doc/de/Customization.lyx +++ b/lib/doc/de/Customization.lyx @@ -13946,7 +13946,7 @@ ulem soul \family default aufbauen, - welche ihren Inhalt in kompexer Art und Weise auslesen. + welche ihren Inhalt in komplexer Art und Weise auslesen. \end_layout \begin_layout Description @@ -19723,6 +19723,226 @@ nicht \begin_inset Flex Code status collapsed +\begin_layout Plain Layout +NeedCProtect +\end_layout + +\end_inset + + [ +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +-1 +\end_layout + +\end_inset + +, +\begin_inset space \thinspace{} +\end_inset + + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\emph on +0 +\end_layout + +\end_inset + +, +\begin_inset space \thinspace{} +\end_inset + + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +1 +\end_layout + +\end_inset + +] Wert +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +1 +\end_layout + +\end_inset + + bewirkt, + dass Makros, + die diese Einfügung enthalten, + mittels +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + (Paket +\family sans +cprotect +\family default +) geschützt werden, + falls nötig. + Damit wird die Verwendung (mancher) Verbatim-Dinge in Makros ermöglicht. + In der Voreinstellung (Wert +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +0 +\end_layout + +\end_inset + +) wird +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + verwendet, + sobald ein eingebettetes Element dies verlangt. + Der Wert +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +-1 +\end_layout + +\end_inset + + unterbindet die Verwendung von +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + selbst dann, + wenn eingebettete Elemente dies verlangen. +\end_layout + +\begin_layout Description +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +NeedMBoxProtect +\end_layout + +\end_inset + + [ +\begin_inset Flex Code +status collapsed + +\begin_layout
[LyX/master] NeedCProtect -1 also for InsetLayouts
commit a716fb96b534475759799b195a7edaeb049fbcf6 Author: Juergen Spitzmueller Date: Tue May 14 13:37:29 2024 +0200 NeedCProtect -1 also for InsetLayouts --- lib/layouts/beamer.layout | 7 +++ src/insets/InsetLayout.cpp | 12 ++-- src/insets/InsetLayout.h | 4 src/insets/InsetText.cpp | 2 ++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/lib/layouts/beamer.layout b/lib/layouts/beamer.layout index 42b9989dfa..cdc379e53d 100644 --- a/lib/layouts/beamer.layout +++ b/lib/layouts/beamer.layout @@ -1578,6 +1578,7 @@ InsetLayout Flex:Only EndArgument ResetsFont true CustomPars false + NeedCProtect -1 End InsetLayout Flex:Uncover @@ -1599,6 +1600,7 @@ InsetLayout Flex:Uncover EndArgument ResetsFont true CustomPars false + NeedCProtect -1 End InsetLayout Flex:Visible @@ -1620,6 +1622,7 @@ InsetLayout Flex:Visible EndArgument ResetsFont true CustomPars false + NeedCProtect -1 End InsetLayout Flex:Invisible @@ -1641,6 +1644,7 @@ InsetLayout Flex:Invisible EndArgument ResetsFont true CustomPars false + NeedCProtect -1 End InsetLayout Flex:Alternative @@ -1668,6 +1672,7 @@ InsetLayout Flex:Alternative EndArgument ResetsFont true CustomPars false + NeedCProtect -1 End InsetLayout Flex:Beamer_Note @@ -1703,6 +1708,7 @@ InsetLayout Flex:ArticleMode LabelString Article MultiPartrue ResetsFont true + NeedCProtect-1 End InsetLayout Flex:PresentationMode @@ -1714,6 +1720,7 @@ InsetLayout Flex:PresentationMode LabelString Presentation MultiPartrue ResetsFont true + NeedCProtect-1 End diff --git a/src/insets/InsetLayout.cpp b/src/insets/InsetLayout.cpp index 2b45119f2c..69f5ac4113 100644 --- a/src/insets/InsetLayout.cpp +++ b/src/insets/InsetLayout.cpp @@ -405,9 +405,17 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass, case IL_NEEDPROTECT: lex >> needprotect_; break; - case IL_NEEDCPROTECT: - lex >> needcprotect_; + case IL_NEEDCPROTECT: { + string val; + lex >> val; + nocprotect_ = false; + needcprotect_ = false; + if (val == "-1") + nocprotect_ = true; + else if (val == "1" || val == "true") + needcprotect_ = true; break; + } case IL_NEEDMBOXPROTECT: lex >> needmboxprotect_; break; diff --git a/src/insets/InsetLayout.h b/src/insets/InsetLayout.h index c879e41f51..36a3c91bbf 100644 --- a/src/insets/InsetLayout.h +++ b/src/insets/InsetLayout.h @@ -223,6 +223,8 @@ public: bool isNeedProtect() const { return needprotect_; } /// bool needsCProtect() const { return needcprotect_; } + /// + bool noCProtect() const { return nocprotect_; } /// Protection of some elements such as \ref and \cite /// in \mbox (needed by commands building on soul or ulem) bool isNeedMBoxProtect() const { return needmboxprotect_; } @@ -419,6 +421,8 @@ private: /// bool needcprotect_ = false; /// + bool nocprotect_ = false; + /// bool needmboxprotect_ = false; /// should the contents be written to TOC strings? bool intoc_ = false; diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 284e466fe4..6df4d8eca8 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -551,6 +551,8 @@ void InsetText::latex(otexstream & os, OutputParams const & runparams) const rp.pass_thru_chars += il.passThruChars(); if (!il.noPassThruChars().empty()) rp.no_pass_thru_chars += il.noPassThruChars(); + if (il.noCProtect()) + rp.no_cprotect = true; if (!il.newlineCmd().empty()) rp.newlinecmd = il.newlineCmd(); rp.par_begin = 0; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Revert false chunk
commit 2306082787129b381b3980e9795f694374321ea0 Author: Juergen Spitzmueller Date: Tue May 14 13:21:55 2024 +0200 Revert false chunk --- src/insets/InsetLayout.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/insets/InsetLayout.h b/src/insets/InsetLayout.h index 4ac8d378ab..c879e41f51 100644 --- a/src/insets/InsetLayout.h +++ b/src/insets/InsetLayout.h @@ -401,8 +401,6 @@ private: /// docstring no_passthru_chars_; /// - docstring no_hr_passthru_chars_; - /// std::string newline_cmd_; /// bool parbreakisnewline_ = false; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Whitespace
commit 9dae88a15ad2782859f76165d654b869e22684dc Author: Juergen Spitzmueller Date: Tue May 14 13:18:05 2024 +0200 Whitespace --- src/Layout.cpp | 12 ++-- src/Layout.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Layout.cpp b/src/Layout.cpp index 1a63ca3293..e531fab362 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -885,13 +885,13 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass, lex >> docbookiteminnertagtype_; break; -case LT_DOCBOOKNOFONTINSIDE: -lex >> docbooknofontinside_; -break; + case LT_DOCBOOKNOFONTINSIDE: + lex >> docbooknofontinside_; + break; -case LT_DOCBOOKGENERATETITLE: -lex >> docbookgeneratetitle_; -break; + case LT_DOCBOOKGENERATETITLE: + lex >> docbookgeneratetitle_; + break; case LT_SPELLCHECK: lex >> spellcheck; diff --git a/src/Layout.h b/src/Layout.h index 3b8be82ee9..eef0bee290 100644 --- a/src/Layout.h +++ b/src/Layout.h @@ -403,7 +403,7 @@ public: /** true when the verbatim stuff of this layout needs to be \cprotect'ed. */ bool needcprotect; - /** true when the verbatim stuff of this layout never should be + /** true when the verbatim stuff of this layout never should be \cprotect'ed. */ bool nocprotect; /** true when specific commands in this paragraph need to be -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Fix comment
commit 1512216909ad10ca1792b3e1a71cef67846c14c7 Author: Juergen Spitzmueller Date: Mon May 13 10:26:45 2024 +0200 Fix comment --- lib/lyx2lyx/lyx_2_5.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/lyx2lyx/lyx_2_5.py b/lib/lyx2lyx/lyx_2_5.py index 0adc24d70e..c574aa2eb9 100644 --- a/lib/lyx2lyx/lyx_2_5.py +++ b/lib/lyx2lyx/lyx_2_5.py @@ -119,7 +119,7 @@ def revert_url_escapes(document): k = surl def convert_url_escapes2(document): -"""Unescape / in URLs with hyperref.""" +"""Unescape backslashes in URLs with hyperref.""" i = find_token(document.header, "\\use_hyperref true", 0) @@ -144,7 +144,7 @@ def convert_url_escapes2(document): i = bs + 1 def revert_url_escapes2(document): -"""Escape / in URLs with hyperref.""" +"""Escape backslashes in URLs with hyperref.""" i = find_token(document.header, "\\use_hyperref true", 0) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Properly escape backslash in URLs with hyperref (#13012)
commit 52d31155c1f22498111c363c115b72b162fc1428 Author: Juergen Spitzmueller Date: Mon May 13 09:17:30 2024 +0200 Properly escape backslash in URLs with hyperref (#13012) --- lib/lyx2lyx/lyx_2_5.py | 53 -- src/Paragraph.cpp | 14 +++-- 2 files changed, 63 insertions(+), 4 deletions(-) diff --git a/lib/lyx2lyx/lyx_2_5.py b/lib/lyx2lyx/lyx_2_5.py index 9d0486cffb..0adc24d70e 100644 --- a/lib/lyx2lyx/lyx_2_5.py +++ b/lib/lyx2lyx/lyx_2_5.py @@ -118,17 +118,66 @@ def revert_url_escapes(document): document.body[surl : surl + 1] = [m.group(1), "\\backslash", m.group(2)] k = surl +def convert_url_escapes2(document): +"""Unescape / in URLs with hyperref.""" + +i = find_token(document.header, "\\use_hyperref true", 0) + +if i != -1 and document.textclass not in ['beamer', 'scrarticle-beamer', 'beamerposter', 'article-beamer']: +return + +i = 0 +while True: +i = find_token(document.body, "\\begin_inset Flex URL", i + 1) +if i == -1: +return +j = find_end_of_inset(document.body, i) +if j == -1: +document.warning("Malformed LyX document: Could not find end of URL inset.") +continue +while True: +bs = find_token(document.body, "\\backslash", i, j) +if bs == -1: +break +if document.body[bs + 2] == "\\backslash": +del document.body[bs + 2] +i = bs + 1 + +def revert_url_escapes2(document): +"""Escape / in URLs with hyperref.""" + +i = find_token(document.header, "\\use_hyperref true", 0) + +if i != -1 and document.textclass not in ['beamer', 'scrarticle-beamer', 'beamerposter', 'article-beamer']: +return + +i = 0 +while True: +i = find_token(document.body, "\\begin_inset Flex URL", i + 1) +if i == -1: +return +j = find_end_of_inset(document.body, i) +if j == -1: +document.warning("Malformed LyX document: Could not find end of URL inset.") +continue +while True: +bs = find_token(document.body, "\\backslash", i, j) +if bs == -1: +break +document.body[bs] = "\\backslash\\backslash" +i = bs + 1 + ## # Conversion hub # supported_versions = ["2.5.0", "2.5"] convert = [ - [621, [convert_url_escapes]] + [621, [convert_url_escapes, convert_url_escapes2]] ] -revert = [[620, [revert_url_escapes]] +revert = [[620, [revert_url_escapes2, revert_url_escapes]] ] diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 0241dece7f..0dee0af3ae 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -354,6 +354,7 @@ public: Font const & running_font, string & alien_script, Layout const & style, + InsetLayout const & il, pos_type & i, pos_type end_pos, unsigned int & column) const; @@ -1234,12 +1235,21 @@ void Paragraph::Private::latexSpecialChar(otexstream & os, Font const & running_font, string & alien_script, Layout const & style, + InsetLayout const & il, pos_type & i, pos_type end_pos, unsigned int & column) const { char_type const c = owner_->getUChar(bparams, runparams, i); + // Special case: URLs with hyperref need to escape backslash (#13012). + // Both a layout tag and a dedicated inset seem too much effort for this. + if (c == '\\' && runparams.use_hyperref && il.latexname() == "url" + && il.required().find("url") != il.required().end()) { + os << ""; + return; + } + if ((style.pass_thru || runparams.pass_thru || runparams.find_effective() || contains(style.pass_thru_chars, c) || contains(runparams.pass_thru_chars, c)) @@ -3170,8 +3180,8 @@ void Paragraph::latex(BufferParams const & bparams, } } try { - d->latexSpecialChar(os, bparams, rp, running_font, -
[LyX/master] Handle URL escaping in beamer frames
commit ed62816eb64b1af6c4edddb05782cab2cd3492af Author: Juergen Spitzmueller Date: Mon May 13 07:26:41 2024 +0200 Handle URL escaping in beamer frames File format change -- this introduces the first LyX 2.5 format and hence sets up the lyx2lyx machinery --- lib/configure.py | 4 +- lib/doc/Customization.lyx| 116 lib/doc/de/Customization.lyx | 102 +++- lib/layouts/beamer.layout| 2 + lib/lyx2lyx/LyX.py | 9 +-- lib/lyx2lyx/Makefile.am | 1 + lib/lyx2lyx/lyx_2_5.py | 136 +++ src/Layout.cpp | 6 ++ src/Layout.h | 3 + src/OutputParams.h | 4 ++ src/Paragraph.cpp| 5 +- src/insets/InsetLayout.cpp | 5 ++ src/insets/InsetLayout.h | 6 ++ src/insets/InsetText.cpp | 2 + src/output_latex.cpp | 1 + src/version.h| 4 +- 16 files changed, 396 insertions(+), 10 deletions(-) diff --git a/lib/configure.py b/lib/configure.py index f414607c6f..2d425146c3 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -877,7 +877,8 @@ def checkFormatEntries(dtl_tools): \Format lyx20x 20.lyx "LyX 2.0.x" "" """" "document" "" \Format lyx21x 21.lyx "LyX 2.1.x" "" """" "document" "" \Format lyx22x 22.lyx "LyX 2.2.x" "" """" "document" "" -\Format lyx23x 23.lyx "LyX 2.3.x" "" """" "document,menu=export" "" +\Format lyx23x 23.lyx "LyX 2.3.x" "" """" "document" "" +\Format lyx24x 24.lyx "LyX 2.4.x" "" """" "document,menu=export" "" \Format clyx cjklyx "CJK LyX 1.4.x (big5)" "" """" "document" "" \Format jlyx cjklyx "CJK LyX 1.4.x (euc-jp)" "" "" "" "document" "" \Format klyx cjklyx "CJK LyX 1.4.x (euc-kr)" "" "" "" "document" "" @@ -1417,6 +1418,7 @@ def checkConverterEntries(): \converter lyxlyx21x "$${python} $$s/lyx2lyx/lyx2lyx -V 2.1 -o $$o $$i""" \converter lyxlyx22x "$${python} $$s/lyx2lyx/lyx2lyx -V 2.2 -o $$o $$i""" \converter lyxlyx23x "$${python} $$s/lyx2lyx/lyx2lyx -V 2.3 -o $$o $$i""" +\converter lyxlyx24x "$${python} $$s/lyx2lyx/lyx2lyx -V 2.4 -o $$o $$i""" \converter lyxclyx "$${python} $$s/lyx2lyx/lyx2lyx -V 1.4 -o $$o -c big5 $$i" "" \converter lyxjlyx "$${python} $$s/lyx2lyx/lyx2lyx -V 1.4 -o $$o -c euc_jp $$i" "" \converter lyxklyx "$${python} $$s/lyx2lyx/lyx2lyx -V 1.4 -o $$o -c euc_kr $$i" "" diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx index 3c78295014..8de047803e 100644 --- a/lib/doc/Customization.lyx +++ b/lib/doc/Customization.lyx @@ -15119,6 +15119,8 @@ status collapsed \change_inserted -712698321 1715492433 -1 +\change_unchanged + \end_layout \end_inset @@ -15165,6 +15167,8 @@ status collapsed \change_inserted -712698321 1715492466 1 +\change_unchanged + \end_layout \end_inset @@ -15201,6 +15205,8 @@ status collapsed \change_inserted -712698321 1715492536 0 +\change_unchanged + \end_layout \end_inset @@ -15216,6 +15222,8 @@ status collapsed \backslash cprotect +\change_unchanged + \end_layout \end_inset @@ -15229,6 +15237,8 @@ status collapsed \change_inserted -712698321 1715492585 -1 +\change_unchanged + \end_layout \end_inset @@ -15243,6 +15253,8 @@ status collapsed \backslash cprotect +\change_unchanged + \end_layout \end_inset @@ -15456,6 +15468,58 @@ Standard (So this will not affect the display of non-default paragraphs.) \end_layout +\begin_layout Description + +\change_inserted -712698321 1715509676 +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1715509206 +NoPassThruChars +\change_unchanged + +\end_layout + +\end_inset + + [ +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1715509203 +string +\change_unchanged + +\end_layout + +\end_inset + +] +\family typewriter + +\famil
[LyX/2.4.x] Document NeedCProtect -1
commit ea004cdb28e9b440347a9487d127e55765940c79 Author: Juergen Spitzmueller Date: Mon May 13 06:53:19 2024 +0200 Document NeedCProtect -1 --- lib/doc/Customization.lyx| 74 +++- lib/doc/de/Customization.lyx | 76 - lib/doc/fr/Customization.lyx | 155 ++ lib/doc/ja/Customization.lyx | 156 +++ 4 files changed, 458 insertions(+), 3 deletions(-) diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx index ab2212ce11..7130edc8fc 100644 --- a/lib/doc/Customization.lyx +++ b/lib/doc/Customization.lyx @@ -15112,6 +15112,20 @@ NeedCProtect \begin_inset Flex Code status collapsed +\begin_layout Plain Layout +-1 +\end_layout + +\end_inset + +, +\begin_inset space \thinspace{} +\end_inset + + +\begin_inset Flex Code +status collapsed + \begin_layout Plain Layout \emph on @@ -15134,7 +15148,17 @@ status collapsed \end_inset -] This causes macros that contain this layout to be protected with +] Value +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +1 +\end_layout + +\end_inset + + causes macros that contain this layout to be protected with \begin_inset Flex Code status collapsed @@ -15152,6 +15176,54 @@ cprotect cprotect \family default ) if necessary and thus allows (some) verbatim stuff in macros. + With the default setting (value +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +0 +\end_layout + +\end_inset + +), + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + is used if a nested element requires it. + Value +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +-1 +\end_layout + +\end_inset + + prevents any use of +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + within this layout, + even if required by a nested element. \end_layout \begin_layout Description diff --git a/lib/doc/de/Customization.lyx b/lib/doc/de/Customization.lyx index 7f0032dca8..c01bfa9b03 100644 --- a/lib/doc/de/Customization.lyx +++ b/lib/doc/de/Customization.lyx @@ -13743,6 +13743,20 @@ NeedCProtect \begin_inset Flex Code status collapsed +\begin_layout Plain Layout +-1 +\end_layout + +\end_inset + +, +\begin_inset space \thinspace{} +\end_inset + + +\begin_inset Flex Code +status collapsed + \begin_layout Plain Layout \emph on @@ -13765,7 +13779,17 @@ status collapsed \end_inset -] bewirkt, +] Wert +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +1 +\end_layout + +\end_inset + + bewirkt, dass Makros, die dieses Layout enthalten, mittels @@ -13784,9 +13808,57 @@ cprotect \family sans cprotect \family default -) gechützt werden, +) geschützt werden, falls nötig. Damit wird die Verwendung (mancher) Verbatim-Dinge in Makros ermöglicht. + In der Voreinstellung (Wert +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +0 +\end_layout + +\end_inset + +) wird +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + verwendet, + sobald ein eingebettetes Element dies verlangt. + Der Wert +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +-1 +\end_layout + +\end_inset + + unterbindet die Verwendung von +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + selbst dann, + wenn eingebettete Elemente dies verlangen. \end_layout \begin_layout Description diff --git a/lib/doc/fr/Customization.lyx b/lib/doc/fr/Customization.lyx index db1be0b439..34d0e5d3f2 100644 --- a/lib/doc/fr/Customization.lyx +++ b/lib/doc/fr/Customization.lyx @@ -14822,6 +14822,161 @@ cprotect cprotect \family default ) et par suite autorise du texte verbatim dans les macros +\begin_inset Note Note +status open + +\begin_layout Description + +\lang english +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\lang english +NeedCProtect +\end_layout + +\end_inset + + [ +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\lang english +-1 +\end_layout + +\end_inset + +, +\begin_inset space \thinspace{} +\end_inset + + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\emph on +\lang english +0 +\end_layout + +\end_inset + +, +\begin_inset space \thinspace{} +\end_inset + + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\lang english +1 +\end_layout + +\end_inset + +] Value +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\lang english +1 +\end_layout + +\end_inset + + causes macros that contain this layout to be protected with +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\lang english + +\backslash
[LyX/2.4.x] Amend 207eaeee9071cb
commit 50cd148bd260222e30b6e429d135c45f8c2f1f14 Author: Juergen Spitzmueller Date: Sun May 12 08:52:09 2024 +0200 Amend 207eaeee9071cb FragileFrame, as opposed to normal frame, supports cprotect (and needs it in the usual circumstances) (cherry picked from commit eeb3f9e719d15c4117a510e8a214d1c1b2c5a33c) --- lib/layouts/beamer.layout | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/layouts/beamer.layout b/lib/layouts/beamer.layout index 9649aeb531..58caf67c7d 100644 --- a/lib/layouts/beamer.layout +++ b/lib/layouts/beamer.layout @@ -576,6 +576,7 @@ Style FragileFrame Tooltip "Frame options (see beamer manual)" PresetArg "fragile" EndArgument + NeedCProtect 0 End Style AgainFrame -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.x] Introduce NeedCProtect -1 layout option
commit f05fd787548e8b3082051b7d45bb4119f97a55dc Author: Juergen Spitzmueller Date: Sun May 12 07:52:16 2024 +0200 Introduce NeedCProtect -1 layout option It turns out beamer frame does not allow \cprotect and errors if it is used. Hence we need to prevent it in this context entirely. (cherry picked from commit 207eaeee9071cb828a2ab7f4680f8ff92e379af8) --- lib/layouts/beamer.layout | 1 + src/Layout.cpp| 13 +++-- src/Layout.h | 3 +++ src/OutputParams.h| 5 + src/Paragraph.cpp | 2 ++ src/insets/InsetText.cpp | 2 +- src/output_latex.cpp | 13 - 7 files changed, 31 insertions(+), 8 deletions(-) diff --git a/lib/layouts/beamer.layout b/lib/layouts/beamer.layout index e9d9c5d904..9649aeb531 100644 --- a/lib/layouts/beamer.layout +++ b/lib/layouts/beamer.layout @@ -553,6 +553,7 @@ Style Frame ExampleBlock,AlertBlock,Bibliography,Quotation,Quote,Verse,Corollary,Definition,Definitions, Example,Examples,Fact,Lemma,Proof,Theorem,LyX-Code EndAutoNests + NeedCProtect-1 End Style PlainFrame diff --git a/src/Layout.cpp b/src/Layout.cpp index 8e54891fb9..d7b9cb2e9c 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -162,6 +162,7 @@ Layout::Layout() inpreamble = false; needprotect = false; needcprotect = false; + nocprotect = false; needmboxprotect = false; keepempty = false; font = inherit_font; @@ -465,9 +466,17 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass, lex >> needprotect; break; - case LT_NEED_CPROTECT: - lex >> needcprotect; + case LT_NEED_CPROTECT: { + int i; + lex >> i; + nocprotect = false; + needcprotect = false; + if (i == -1) + nocprotect = true; + else if (i == 1) + needcprotect = true; break; + } case LT_NEED_MBOXPROTECT: lex >> needmboxprotect; diff --git a/src/Layout.h b/src/Layout.h index 6581155007..144603f06c 100644 --- a/src/Layout.h +++ b/src/Layout.h @@ -399,6 +399,9 @@ public: /** true when the verbatim stuff of this layout needs to be \cprotect'ed. */ bool needcprotect; + /** true when the verbatim stuff of this layout never should be + \cprotect'ed. */ + bool nocprotect; /** true when specific commands in this paragraph need to be protected in an \mbox. */ bool needmboxprotect; diff --git a/src/OutputParams.h b/src/OutputParams.h index 9d9a7ae8f8..2e7d84e9c7 100644 --- a/src/OutputParams.h +++ b/src/OutputParams.h @@ -108,6 +108,11 @@ public: */ bool moving_arg = false; + /** no_cprotect == true means that the layout in which this is +* does not allow \cprotect'ing. + */ + bool no_cprotect = false; + /** intitle == true means that the environment in which the inset is typeset is part of a title (before a \\maketitle). Footnotes in such environments have moving arguments. diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 49713a8b9a..0f495f50f8 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1172,6 +1172,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, ? textinset->hasCProtectContent(runparams.moving_arg) && !textinset->text().isMainText() && inset->lyxCode() != BRANCH_CODE + && !runparams.no_cprotect : false; unsigned int count2 = basefont.latexWriteStartChanges(os, bparams, rp, running_font, @@ -3014,6 +3015,7 @@ void Paragraph::latex(BufferParams const & bparams, ? textinset->hasCProtectContent(runparams.moving_arg) && !textinset->text().isMainText() && inInset().lyxCode() != BRANCH_CODE + && !runparams.no_cprotect : false; column += current_font.latexWriteStartChanges(ots, bparams, runparams, basefont, last_font, false, diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index d65cbf9f31..121b763e2f 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -494,7 +494,7 @@ void In
[LyX/master] Amend 207eaeee9071cb
commit eeb3f9e719d15c4117a510e8a214d1c1b2c5a33c Author: Juergen Spitzmueller Date: Sun May 12 08:52:09 2024 +0200 Amend 207eaeee9071cb FragileFrame, as opposed to normal frame, supports cprotect (and needs it in the usual circumstances) --- lib/layouts/beamer.layout | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/layouts/beamer.layout b/lib/layouts/beamer.layout index 9649aeb531..58caf67c7d 100644 --- a/lib/layouts/beamer.layout +++ b/lib/layouts/beamer.layout @@ -576,6 +576,7 @@ Style FragileFrame Tooltip "Frame options (see beamer manual)" PresetArg "fragile" EndArgument + NeedCProtect 0 End Style AgainFrame -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Document 207eaeee9071cb
commit a2fb7b3566ceefa38c31aeed46fc87821e6437cf Author: Juergen Spitzmueller Date: Sun May 12 07:54:04 2024 +0200 Document 207eaeee9071cb --- lib/doc/Customization.lyx| 102 ++- lib/doc/de/Customization.lyx | 74 ++- 2 files changed, 174 insertions(+), 2 deletions(-) diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx index 79ece05a06..3c78295014 100644 --- a/lib/doc/Customization.lyx +++ b/lib/doc/Customization.lyx @@ -15110,6 +15110,26 @@ NeedCProtect \end_inset [ +\change_inserted -712698321 1715492667 + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1715492433 +-1 +\end_layout + +\end_inset + +, +\begin_inset space \thinspace{} +\end_inset + + +\change_unchanged + \begin_inset Flex Code status collapsed @@ -15135,7 +15155,25 @@ status collapsed \end_inset -] This causes macros that contain this layout to be protected with +] +\change_inserted -712698321 1715492466 +Value +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1715492466 +1 +\end_layout + +\end_inset + + +\change_deleted -712698321 1715492468 +This +\change_unchanged + causes macros that contain this layout to be protected with \begin_inset Flex Code status collapsed @@ -15153,6 +15191,66 @@ cprotect cprotect \family default ) if necessary and thus allows (some) verbatim stuff in macros. + +\change_inserted -712698321 1715492595 + With the default setting (value +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1715492536 +0 +\end_layout + +\end_inset + +), + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1715492551 + +\backslash +cprotect +\end_layout + +\end_inset + + is used if a nested element requires it. + Value +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1715492585 +-1 +\end_layout + +\end_inset + + prevents any use of +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1715492585 + +\backslash +cprotect +\end_layout + +\end_inset + + within this layout, + even if required by a nested element. +\change_unchanged + \end_layout \begin_layout Description @@ -31367,6 +31465,8 @@ status collapsed \change_inserted -712698321 1712389749 $$OrigAbsName +\change_unchanged + \end_layout \end_inset diff --git a/lib/doc/de/Customization.lyx b/lib/doc/de/Customization.lyx index b88adcebb1..3ff3e4d63c 100644 --- a/lib/doc/de/Customization.lyx +++ b/lib/doc/de/Customization.lyx @@ -13743,6 +13743,20 @@ NeedCProtect \begin_inset Flex Code status collapsed +\begin_layout Plain Layout +-1 +\end_layout + +\end_inset + +, +\begin_inset space \thinspace{} +\end_inset + + +\begin_inset Flex Code +status collapsed + \begin_layout Plain Layout \emph on @@ -13765,7 +13779,17 @@ status collapsed \end_inset -] bewirkt, +] Wert +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +1 +\end_layout + +\end_inset + + bewirkt, dass Makros, die dieses Layout enthalten, mittels @@ -13787,6 +13811,54 @@ cprotect ) gechützt werden, falls nötig. Damit wird die Verwendung (mancher) Verbatim-Dinge in Makros ermöglicht. + In der Voreinstellung (Wert +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +0 +\end_layout + +\end_inset + +) wird +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + verwendet, + sobald ein eingebettetes Element dies verlangt. + Der Wert +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout +-1 +\end_layout + +\end_inset + + unterbindet die Verwendung von +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\backslash +cprotect +\end_layout + +\end_inset + + selbst dann, + wenn eingebettete Elemente dies verlangen. \end_layout \begin_layout Description -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Introduce NeedCProtect -1 layout option
commit 207eaeee9071cb828a2ab7f4680f8ff92e379af8 Author: Juergen Spitzmueller Date: Sun May 12 07:52:16 2024 +0200 Introduce NeedCProtect -1 layout option It turns out beamer frame does not allow \cprotect and errors if it is used. Hence we need to prevent it in this context entirely. --- lib/layouts/beamer.layout | 1 + src/Layout.cpp| 13 +++-- src/Layout.h | 3 +++ src/OutputParams.h| 5 + src/Paragraph.cpp | 2 ++ src/insets/InsetText.cpp | 2 +- src/output_latex.cpp | 13 - 7 files changed, 31 insertions(+), 8 deletions(-) diff --git a/lib/layouts/beamer.layout b/lib/layouts/beamer.layout index e9d9c5d904..9649aeb531 100644 --- a/lib/layouts/beamer.layout +++ b/lib/layouts/beamer.layout @@ -553,6 +553,7 @@ Style Frame ExampleBlock,AlertBlock,Bibliography,Quotation,Quote,Verse,Corollary,Definition,Definitions, Example,Examples,Fact,Lemma,Proof,Theorem,LyX-Code EndAutoNests + NeedCProtect-1 End Style PlainFrame diff --git a/src/Layout.cpp b/src/Layout.cpp index 50a4d05ac6..16d530361d 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -162,6 +162,7 @@ Layout::Layout() inpreamble = false; needprotect = false; needcprotect = false; + nocprotect = false; needmboxprotect = false; keepempty = false; font = inherit_font; @@ -465,9 +466,17 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass, lex >> needprotect; break; - case LT_NEED_CPROTECT: - lex >> needcprotect; + case LT_NEED_CPROTECT: { + int i; + lex >> i; + nocprotect = false; + needcprotect = false; + if (i == -1) + nocprotect = true; + else if (i == 1) + needcprotect = true; break; + } case LT_NEED_MBOXPROTECT: lex >> needmboxprotect; diff --git a/src/Layout.h b/src/Layout.h index 0c0b4ae0ef..c8e3181cc1 100644 --- a/src/Layout.h +++ b/src/Layout.h @@ -400,6 +400,9 @@ public: /** true when the verbatim stuff of this layout needs to be \cprotect'ed. */ bool needcprotect; + /** true when the verbatim stuff of this layout never should be + \cprotect'ed. */ + bool nocprotect; /** true when specific commands in this paragraph need to be protected in an \mbox. */ bool needmboxprotect; diff --git a/src/OutputParams.h b/src/OutputParams.h index 9d9a7ae8f8..2e7d84e9c7 100644 --- a/src/OutputParams.h +++ b/src/OutputParams.h @@ -108,6 +108,11 @@ public: */ bool moving_arg = false; + /** no_cprotect == true means that the layout in which this is +* does not allow \cprotect'ing. + */ + bool no_cprotect = false; + /** intitle == true means that the environment in which the inset is typeset is part of a title (before a \\maketitle). Footnotes in such environments have moving arguments. diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 4282defa4a..ec92fa21cf 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1172,6 +1172,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, ? textinset->hasCProtectContent(runparams.moving_arg) && !textinset->text().isMainText() && inset->lyxCode() != BRANCH_CODE + && !runparams.no_cprotect : false; unsigned int count2 = basefont.latexWriteStartChanges(os, bparams, rp, running_font, @@ -3014,6 +3015,7 @@ void Paragraph::latex(BufferParams const & bparams, ? textinset->hasCProtectContent(runparams.moving_arg) && !textinset->text().isMainText() && inInset().lyxCode() != BRANCH_CODE + && !runparams.no_cprotect : false; column += current_font.latexWriteStartChanges(ots, bparams, runparams, basefont, last_font, false, diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 084e418027..3e80312928 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -500,7 +500,7 @@ void InsetText::latex(otexstream & os, OutputParams const & runparams) const
[LyX/master] Consider CT in dash mechanism (#13062)
commit fe4f0dbf0b37c413994bbfa780a833b1c041a433 Author: Juergen Spitzmueller Date: Sat May 11 13:07:32 2024 +0200 Consider CT in dash mechanism (#13062) --- src/Text.cpp | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Text.cpp b/src/Text.cpp index 44ca43f3ae..c6e2e054fb 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -1127,12 +1127,15 @@ void Text::insertChar(Cursor & cur, char_type c) if (!cur.paragraph().isPassThru() && owner_->lyxCode() != IPA_CODE && cur.real_current_font.fontInfo().family() != TYPEWRITER_FAMILY && c == '-' && pos > 0) { - if (par.getChar(pos - 1) == '-') { + pos_type prev_pos = pos - 1; + while (prev_pos > 0 && par.isDeleted(prev_pos)) + --prev_pos; + if (!par.isDeleted(prev_pos) && par.getChar(prev_pos) == '-') { // convert "--" to endash - par.eraseChar(pos - 1, cur.buffer()->params().track_changes); + par.eraseChar(prev_pos, cur.buffer()->params().track_changes); c = 0x2013; pos--; - } else if (par.getChar(pos - 1) == 0x2013) { + } else if (!par.isDeleted(prev_pos) && par.getChar(prev_pos) == 0x2013) { // convert "---" to emdash par.eraseChar(pos - 1, cur.buffer()->params().track_changes); c = 0x2014; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.3.x] Fake CJK quotes also for utf8 inputenc
commit a6d3c1e6900d47e1a98d5996cce4484422ce3a51 Author: Juergen Spitzmueller Date: Mon Apr 30 15:22:50 2018 +0200 Fake CJK quotes also for utf8 inputenc The glyphs are not covered yet. (cherry picked from commit 9644916d32d6fd8b2774f99596011254f6086c97) --- src/insets/InsetQuotes.cpp | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetQuotes.cpp b/src/insets/InsetQuotes.cpp index cdf25cfe50..f67eb32cda 100644 --- a/src/insets/InsetQuotes.cpp +++ b/src/insets/InsetQuotes.cpp @@ -863,8 +863,11 @@ void InsetQuotes::latex(otexstream & os, OutputParams const & runparams) const // (spacing and kerning is then handled respectively) qstr = docstring(1, quotechar); } + // The CJK marks are not yet covered by utf8 inputenc (we don't have the entry in + // unicodesymbols, since we don't want to add fake synbols there). else if (style == InsetQuotesParams::CJKQuotes || style == InsetQuotesParams::CJKAngleQuotes) { - if (runparams.encoding && runparams.encoding->encodable(quotechar)) + if (runparams.encoding && runparams.encoding->name() != "utf8" + && runparams.encoding->encodable(quotechar)) qstr = docstring(1, quotechar); else qstr = quoteparams.getLaTeXQuote(quotechar, "int"); @@ -1064,10 +1067,12 @@ void InsetQuotes::validate(LaTeXFeatures & features) const features.require("textquotedbl"); break; } - // we fake these from math + // we fake these from math (also for utf8 inputenc + // currently; see above) case 0x300e: // LEFT WHITE CORNER BRACKET case 0x300f: // RIGHT WHITE CORNER BRACKET if (!features.runparams().encoding + || features.runparams().encoding->name() == "utf8" || !features.runparams().encoding->encodable(type)) features.require("stmaryrd"); break; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.3.x] Update lilypond converter settings (#12618)
commit 6f65cbdce2be06827b84da3807dd355e62401260 Author: Juergen Spitzmueller Date: Sun Apr 21 11:42:40 2024 +0200 Update lilypond converter settings (#12618) As of v. 2.23.12, the safe mode is no longer supported and results in error. We thus remove the -safe flags from the converter and use our own needauth flag instead. --- lib/configure.py | 22 +++--- status.23x | 2 ++ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/configure.py b/lib/configure.py index 69aeeaf96b..747299050a 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -1198,15 +1198,15 @@ def checkConverterEntries(): version_number = match.groups()[0] version = version_number.split('.') if int(version[0]) > 2 or (len(version) > 1 and int(version[0]) == 2 and int(version[1]) >= 11): -addToRC(r'''\converter lilypond eps"lilypond -dbackend=eps -dsafe --ps $$i" "" -\converter lilypond png"lilypond -dbackend=eps -dsafe --png $$i" ""''') -addToRC(r'\converter lilypond pdf6 "lilypond -dbackend=eps -dsafe --pdf $$i" ""') +addToRC(r'''\converter lilypond eps"lilypond -dbackend=eps --ps $$i" "needauth" +\converter lilypond png"lilypond -dbackend=eps --png $$i" "needauth"''') +addToRC(r'\converter lilypond pdf6 "lilypond -dbackend=eps --pdf $$i" "needauth"') logger.info('+ found LilyPond version %s.' % version_number) elif int(version[0]) > 2 or (len(version) > 1 and int(version[0]) == 2 and int(version[1]) >= 6): -addToRC(r'''\converter lilypond eps"lilypond -b eps --ps --safe $$i" "" +addToRC(r'''\converter lilypond eps"lilypond -b eps --ps $$i""needauth" \converter lilypond png"lilypond -b eps --png $$i" ""''') if int(version[0]) > 2 or (len(version) > 1 and int(version[0]) == 2 and int(version[1]) >= 9): -addToRC(r'\converter lilypond pdf6 "lilypond -b eps --pdf --safe $$i" ""') +addToRC(r'\converter lilypond pdf6 "lilypond -b eps --pdf $$i" "needauth"') logger.info('+ found LilyPond version %s.' % version_number) else: logger.info('+ found LilyPond, but version %s is too old.' % version_number) @@ -1228,12 +1228,12 @@ def checkConverterEntries(): # even when requested with --pdf. This is a problem if a user # clicks View PDF after having done a View DVI. To circumvent # this, use different output folders for eps and pdf outputs. -addToRC(r'\converter lilypond-book latex"lilypond-book --safe --lily-output-dir=ly-eps $$i"""') -addToRC(r'\converter lilypond-book pdflatex "lilypond-book --safe --pdf --latex-program=pdflatex --lily-output-dir=ly-pdf $$i" ""') -addToRC(r'\converter lilypond-book-ja platex "lilypond-book --safe --pdf --latex-program=platex --lily-output-dir=ly-pdf $$i" ""') -addToRC(r'\converter lilypond-book xetex"lilypond-book --safe --pdf --latex-program=xelatex --lily-output-dir=ly-pdf $$i" ""') -addToRC(r'\converter lilypond-book luatex "lilypond-book --safe --pdf --latex-program=lualatex --lily-output-dir=ly-pdf $$i" ""') -addToRC(r'\converter lilypond-book dviluatex "lilypond-book --safe --latex-program=dvilualatex --lily-output-dir=ly-eps $$i" ""') +addToRC(r'\converter lilypond-book latex"lilypond-book --lily-output-dir=ly-eps $$i""needauth"') +addToRC(r'\converter lilypond-book pdflatex "lilypond-book --pdf --latex-program=pdflatex --lily-output-dir=ly-pdf $$i" "needauth"') +addToRC(r'\converter lilypond-book-ja platex "lilypond-book --pdf --latex-program=platex --lily-output-dir=ly-pdf $$i" "needauth"') +addToRC(r'\converter lilypond-book xetex"lilypond-book --pdf --latex-program=xelatex --lily-output-dir=ly-pdf $$i" "needauth"') +addToRC(r'\converter lilypond-book luatex "lilypond-book --pdf --latex-program=lualatex --lily-output-dir=ly-pdf $$i" "needauth"') +addToRC(r'\converter lilypond-book dviluatex "
[LyX/2.4.x] de.po
commit 075fdbd4f95c2a4f85803fd3c3b66928ae500de7 Author: Juergen Spitzmueller Date: Sun Apr 21 11:25:12 2024 +0200 de.po --- po/de.po | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/po/de.po b/po/de.po index 87317afa09..8f678ac317 100644 --- a/po/de.po +++ b/po/de.po @@ -96,14 +96,14 @@ msgstr "" "Project-Id-Version: LyX 2.4git\n" "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n" "POT-Creation-Date: 2024-04-21 11:22+0200\n" -"PO-Revision-Date: 2024-03-05 15:57+0100\n" +"PO-Revision-Date: 2024-04-21 11:25+0200\n" "Last-Translator: Juergen Spitzmueller \n" -"Language-Team: German \n" +"Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 18.12.1\n" +"X-Generator: Lokalize 24.02.2\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" #: src/frontends/qt/ui/AboutUi.ui:27 @@ -30467,17 +30467,18 @@ msgstr "" #: src/LaTeXPackages.cpp:89 msgid "Invalid package list format!" -msgstr "" +msgstr "Ungültiges Paketlisten-Format!" #: src/LaTeXPackages.cpp:90 msgid "" "The format of your LaTeX packages list is wrong. Please file a bug report." msgstr "" +"Das Format Ihrer LaTeX-Paket-Liste is inkorrekt. Bitte reichen Sie einen" +" Bugreport ein!" #: src/LaTeXPackages.cpp:98 src/LaTeXPackages.cpp:104 -#, fuzzy msgid "Outdated configuration script detected!" -msgstr "Die Konfigurationsdatei konnte nicht gelesen werden" +msgstr "Veraltete Konfigurationsdatei entdeckt!" #: src/LaTeXPackages.cpp:99 msgid "" @@ -30485,6 +30486,11 @@ msgid "" "The script has been renamed to 'chkconfig.ltx.bak'.\n" "If you did not copy the script there by purpose, you can safely delete it." msgstr "" +"Wir haben eine veraltete Version der Datei 'chkconfig.ltx' in Ihrem" +" Benutzerverzeichnis gefunden.\n" +"Die Datei wurde nun umbenannt in 'chkconfig.ltx.bak'.\n" +"Wenn Sie die Datei nicht absichtlich hierher kopiert haben, können Sie sie" +" bedenkenlos löschen." #: src/LaTeXPackages.cpp:105 #, c-format @@ -30493,6 +30499,10 @@ msgid "" "(%1$s).\n" "Please delete or update this file!" msgstr "" +"Wir haben eine veraltete Version der Datei 'chkconfig.ltx' in Ihrem" +" Benutzerverzeichnis gefunden\n" +"(%1$s).\n" +"Bitte aktualisieren oder löschen Sie diese Datei!" #: src/LyX.cpp:136 msgid "Could not read configuration file" @@ -43747,3 +43757,4 @@ msgstr "Unbekannter Benutzer" #~ msgid " (auto)" #~ msgstr " (automatisch)" + -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.x] remerge strings
commit 4d8316402d078aa92b19d3c538e08cac0221f230 Author: Juergen Spitzmueller Date: Sun Apr 21 11:24:02 2024 +0200 remerge strings po/ar.po | 1616 +++-- po/bg.po | 1671 +++--- po/cs.gmo| Bin 627180 -> 627292 bytes po/cs.po | 593 ++-- po/de.gmo| Bin 653622 -> 653560 bytes po/de.po | 940 --- po/en.po | 1556 ++- po/es.po | 1628 +++-- po/eu.po | 1627 +++-- po/fi.po | 1619 +++-- po/fr.po | 954 --- po/he.po | 1618 +++-- po/hu.po | 1621 +++-- po/ia.po | 1617 +++-- po/id.po | 1620 +++-- po/it.po | 1614 +++-- po/ja.gmo| Bin 678876 -> 678815 bytes po/ja.po | 1614 +++-- po/nb.po | 1624 +++-- po/nl.po | 1626 +++-- po/nn.po | 1622 +++-- po/pl.po | 1620 +++-- po/pt_BR.gmo | Bin 646632 -> 646894 bytes po/pt_BR.po | 369 ++-- po/pt_PT.po | 1624 +++-- po/ru.po | 1620 +++-- po/sk.gmo| Bin 636629 -> 636748 bytes po/sk.po | 1621 +++-- po/sv.po | 1626 +++-- po/uk.po | 1648 -- po/zh_CN.gmo | Bin 447576 -> 471508 bytes po/zh_CN.po | 1768 ++ po/zh_TW.po | 1626 +++-- 33 files changed, 20835 insertions(+), 19467 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.x] Handle the case of outdated chkconfig.ltx in user directory
commit 237b0404ff45af46d2815d65b3590d309ce4e2bf Author: Juergen Spitzmueller Date: Sat Apr 20 14:57:12 2024 +0200 Handle the case of outdated chkconfig.ltx in user directory (cherry picked from commit b8ff824a4f4ab4d3e213b55bf8117fd95b7b9657) --- src/LaTeXPackages.cpp | 39 --- src/LaTeXPackages.h | 2 +- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/LaTeXPackages.cpp b/src/LaTeXPackages.cpp index e708df1dfe..0f4129eabe 100644 --- a/src/LaTeXPackages.cpp +++ b/src/LaTeXPackages.cpp @@ -22,9 +22,12 @@ #include "support/debug.h" #include "support/FileName.h" #include "support/filetools.h" +#include "support/gettext.h" #include "support/lstrings.h" #include "support/Package.h" +#include "frontends/alert.h" + using namespace std; using namespace lyx::support; @@ -35,7 +38,7 @@ namespace lyx { LaTeXPackages::Packages LaTeXPackages::packages_; -void LaTeXPackages::getAvailable() +void LaTeXPackages::getAvailable(bool retry) { Lexer lex; support::FileName const real_file = libFileSearch("", "packages.lst"); @@ -73,10 +76,40 @@ void LaTeXPackages::getAvailable() } } // Check if the pkglist has current format. - // Reconfigure and re-parse if not. + // Reconfigure once and re-parse if not. if (lstformat != "2") { + // If we have already reconfigured, check if there is an outdated config file + // which produces the outdated lstformat + if (retry) { + // check if we have an outdated chkconfig.ltx file in user dir + support::FileName chkconfig = fileSearch(addPath(package().user_support().absFileName(), ""), + "chkconfig.ltx", string(), must_exist); + if (chkconfig.empty()) { + // nothing found. So we can only warn + frontend::Alert::warning(_("Invalid package list format!"), + _("The format of your LaTeX packages list is wrong. Please file a bug report.")); + return; + } + // Found. Try to rename and warn. + support::FileName chkconfig_bak; + chkconfig_bak.set(chkconfig.absFileName() + ".bak"); + if (chkconfig.renameTo(chkconfig_bak)) + // renaming succeeded + frontend::Alert::warning(_("Outdated configuration script detected!"), + _("We have detected an outdated script 'chkconfig.ltx' in your user directory.\n" + "The script has been renamed to 'chkconfig.ltx.bak'.\n" + "If you did not copy the script there by purpose, you can safely delete it.")); + else { + // renaming failed + frontend::Alert::warning(_("Outdated configuration script detected!"), + bformat(_("We have detected an outdated script 'chkconfig.ltx' in your user directory\n" + "(%1$s).\n" + "Please delete or update this file!"), from_utf8(chkconfig.absFileName(; + return; + } + } package().reconfigureUserLyXDir(""); - getAvailable(); + getAvailable(true); } } diff --git a/src/LaTeXPackages.h b/src/LaTeXPackages.h index dba6d039f6..12f3e4ec0b 100644 --- a/src/LaTeXPackages.h +++ b/src/LaTeXPackages.h @@ -25,7 +25,7 @@ namespace lyx { class LaTeXPackages { public: /// Which of the required packages are installed? - static void getAvailable(); + static void getAvailable(bool retry = false); /// Is the (required) package available? static bool isAvailable(std::string const & name); /// Is the (required) package available at least as of -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.1-devel] gbrief-2 loads babel internally. So don't load it ourselves.
commit 9871c17ec2f87f2b8081fe5385ffcc13ca44a75d Author: Juergen Spitzmueller Date: Sat Apr 13 07:32:30 2024 +0200 gbrief-2 loads babel internally. So don't load it ourselves. This makes the class fully functional with non-TeX fonts (it uses \babelfont for the purpose). Before, docs were compiling but the output was wrong. (cherry picked from commit c3c96a446b32ef77927b5e06436c2668d95dfd6d) --- lib/layouts/g-brief2.layout | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/layouts/g-brief2.layout b/lib/layouts/g-brief2.layout index ac0b8deb77..b57bbdb249 100644 --- a/lib/layouts/g-brief2.layout +++ b/lib/layouts/g-brief2.layout @@ -17,6 +17,9 @@ Sides 1 PageStyle Empty DefaultStyle Standard +# Babel is loaded internally +Provides babel 1 + # This is just to show how to declare the default font. # The defaults are exactly those shown here. DefaultFont -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.1-devel] Status update
commit 64393c7c6e1176ce0430cce19e30b45626c8 Author: Juergen Spitzmueller Date: Sun Apr 21 09:34:35 2024 +0200 Status update --- status.24x | 3 +++ 1 file changed, 3 insertions(+) diff --git a/status.24x b/status.24x index c92a8495ea..f667c16376 100644 --- a/status.24x +++ b/status.24x @@ -54,6 +54,9 @@ What's new - Set cursor font after pasting to PassThru (e.g., ERT) inset (bug 12592). +- The g-brief and g-brief2 letter classes load babel internally. LyX now + is aware of that. + * USER INTERFACE -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.1-devel] g-brief loads babel internally. So don't load it ourselves.
commit 7b7322b831f1bd916293b0e20c827db429ed3773 Author: Juergen Spitzmueller Date: Tue Apr 16 18:23:01 2024 +0200 g-brief loads babel internally. So don't load it ourselves. This makes the class fully functional with non-TeX fonts (it uses \babelfont for the purpose). Before, docs were compiling but the output was wrong. --- lib/layouts/g-brief.layout | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/layouts/g-brief.layout b/lib/layouts/g-brief.layout index 532fa2f0ec..d2421bb11d 100644 --- a/lib/layouts/g-brief.layout +++ b/lib/layouts/g-brief.layout @@ -18,6 +18,9 @@ Sides 1 PageStyle Empty DefaultStyleLetter +# Babel is loaded internally +Provides babel 1 + Style Letter MarginStatic -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] de.po
commit 1a7df1ab69c8964945ed9e681e73c4ff5a38eebb Author: Juergen Spitzmueller Date: Sat Apr 20 17:06:00 2024 +0200 de.po --- po/de.po | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/po/de.po b/po/de.po index fa065f8b29..c722640463 100644 --- a/po/de.po +++ b/po/de.po @@ -96,7 +96,7 @@ msgstr "" "Project-Id-Version: LyX 2.4git\n" "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n" "POT-Creation-Date: 2024-04-20 16:51+0200\n" -"PO-Revision-Date: 2024-04-20 16:50+0200\n" +"PO-Revision-Date: 2024-04-20 17:03+0200\n" "Last-Translator: Juergen Spitzmueller \n" "Language-Team: German \n" "Language: de\n" @@ -30483,17 +30483,18 @@ msgstr "" #: src/LaTeXPackages.cpp:89 msgid "Invalid package list format!" -msgstr "" +msgstr "Ungültiges Paketlisten-Format!" #: src/LaTeXPackages.cpp:90 msgid "" "The format of your LaTeX packages list is wrong. Please file a bug report." msgstr "" +"Das Format Ihrer LaTeX-Paket-Liste is inkorrekt. Bitte reichen Sie einen" +" Bugreport ein!" #: src/LaTeXPackages.cpp:98 src/LaTeXPackages.cpp:104 -#, fuzzy msgid "Outdated configuration script detected!" -msgstr "Die Konfigurationsdatei konnte nicht gelesen werden" +msgstr "Veraltete Konfigurationsdatei entdeckt!" #: src/LaTeXPackages.cpp:99 msgid "" @@ -30501,6 +30502,11 @@ msgid "" "The script has been renamed to 'chkconfig.ltx.bak'.\n" "If you did not copy the script there by purpose, you can safely delete it." msgstr "" +"Wir haben eine veraltete Version der Datei 'chkconfig.ltx' in Ihrem" +" Benutzerverzeichnis gefunden.\n" +"Die Datei wurde nun umbenannt in 'chkconfig.ltx.bak'.\n" +"Wenn Sie die Datei nicht absichtlich hierher kopiert haben, können Sie sie" +" bedenkenlos löschen." #: src/LaTeXPackages.cpp:105 #, c-format @@ -30509,6 +30515,10 @@ msgid "" "(%1$s).\n" "Please delete or update this file!" msgstr "" +"Wir haben eine veraltete Version der Datei 'chkconfig.ltx' in Ihrem" +" Benutzerverzeichnis gefunden\n" +"(%1$s).\n" +"Bitte aktualisieren oder löschen Sie diese Datei!" #: src/LyX.cpp:136 msgid "Could not read configuration file" @@ -43763,3 +43773,4 @@ msgstr "Unbekannter Benutzer" #~ msgid " (auto)" #~ msgstr " (automatisch)" + -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] de.po
commit d64c9a9d00c175c8859ce94dfcf7b39d6293132d Author: Juergen Spitzmueller Date: Sat Apr 20 16:59:17 2024 +0200 de.po po/de.po | 1156 -- 1 file changed, 596 insertions(+), 560 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Handle the case of outdated chkconfig.ltx in user directory
commit b8ff824a4f4ab4d3e213b55bf8117fd95b7b9657 Author: Juergen Spitzmueller Date: Sat Apr 20 14:57:12 2024 +0200 Handle the case of outdated chkconfig.ltx in user directory --- src/LaTeXPackages.cpp | 39 --- src/LaTeXPackages.h | 2 +- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/LaTeXPackages.cpp b/src/LaTeXPackages.cpp index e708df1dfe..0f4129eabe 100644 --- a/src/LaTeXPackages.cpp +++ b/src/LaTeXPackages.cpp @@ -22,9 +22,12 @@ #include "support/debug.h" #include "support/FileName.h" #include "support/filetools.h" +#include "support/gettext.h" #include "support/lstrings.h" #include "support/Package.h" +#include "frontends/alert.h" + using namespace std; using namespace lyx::support; @@ -35,7 +38,7 @@ namespace lyx { LaTeXPackages::Packages LaTeXPackages::packages_; -void LaTeXPackages::getAvailable() +void LaTeXPackages::getAvailable(bool retry) { Lexer lex; support::FileName const real_file = libFileSearch("", "packages.lst"); @@ -73,10 +76,40 @@ void LaTeXPackages::getAvailable() } } // Check if the pkglist has current format. - // Reconfigure and re-parse if not. + // Reconfigure once and re-parse if not. if (lstformat != "2") { + // If we have already reconfigured, check if there is an outdated config file + // which produces the outdated lstformat + if (retry) { + // check if we have an outdated chkconfig.ltx file in user dir + support::FileName chkconfig = fileSearch(addPath(package().user_support().absFileName(), ""), + "chkconfig.ltx", string(), must_exist); + if (chkconfig.empty()) { + // nothing found. So we can only warn + frontend::Alert::warning(_("Invalid package list format!"), + _("The format of your LaTeX packages list is wrong. Please file a bug report.")); + return; + } + // Found. Try to rename and warn. + support::FileName chkconfig_bak; + chkconfig_bak.set(chkconfig.absFileName() + ".bak"); + if (chkconfig.renameTo(chkconfig_bak)) + // renaming succeeded + frontend::Alert::warning(_("Outdated configuration script detected!"), + _("We have detected an outdated script 'chkconfig.ltx' in your user directory.\n" + "The script has been renamed to 'chkconfig.ltx.bak'.\n" + "If you did not copy the script there by purpose, you can safely delete it.")); + else { + // renaming failed + frontend::Alert::warning(_("Outdated configuration script detected!"), + bformat(_("We have detected an outdated script 'chkconfig.ltx' in your user directory\n" + "(%1$s).\n" + "Please delete or update this file!"), from_utf8(chkconfig.absFileName(; + return; + } + } package().reconfigureUserLyXDir(""); - getAvailable(); + getAvailable(true); } } diff --git a/src/LaTeXPackages.h b/src/LaTeXPackages.h index dba6d039f6..12f3e4ec0b 100644 --- a/src/LaTeXPackages.h +++ b/src/LaTeXPackages.h @@ -25,7 +25,7 @@ namespace lyx { class LaTeXPackages { public: /// Which of the required packages are installed? - static void getAvailable(); + static void getAvailable(bool retry = false); /// Is the (required) package available? static bool isAvailable(std::string const & name); /// Is the (required) package available at least as of -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] g-brief loads babel internally. So don't load it ourselves.
commit 2f6b24297f97ea2a765705fbf21e1214a7ba38ba Author: Juergen Spitzmueller Date: Tue Apr 16 18:25:38 2024 +0200 g-brief loads babel internally. So don't load it ourselves. This makes the class fully functional with non-TeX fonts (it uses \babelfont for the purpose). Before, docs were compiling but the output was wrong. --- lib/layouts/g-brief.layout | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/layouts/g-brief.layout b/lib/layouts/g-brief.layout index 532fa2f0ec..d2421bb11d 100644 --- a/lib/layouts/g-brief.layout +++ b/lib/layouts/g-brief.layout @@ -18,6 +18,9 @@ Sides 1 PageStyle Empty DefaultStyleLetter +# Babel is loaded internally +Provides babel 1 + Style Letter MarginStatic -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.1-devel] Disable language package choice if the class preloads a package
commit d29baf59a4a69ad022bca7ee63b3512838b295a2 Author: Juergen Spitzmueller Date: Sat Apr 13 10:07:18 2024 +0200 Disable language package choice if the class preloads a package (cherry picked from commit 5477451e36cd9ff4e99aefea2627fbf63e028004) --- src/frontends/qt/GuiDocument.cpp | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp index d4471cff7b..e020ab92c2 100644 --- a/src/frontends/qt/GuiDocument.cpp +++ b/src/frontends/qt/GuiDocument.cpp @@ -4217,15 +4217,30 @@ void GuiDocument::paramsToDialog() // LaTeX input encoding: set after the fonts (see below) - int p = langModule->languagePackageCO->findData(toqstr(bp_.lang_package)); + // If the class provides babel or polyglossia, do not allow + // to change that + bool const extern_babel = + documentClass().provides("babel"); + bool const extern_polyglossia = + documentClass().provides("polyglossia"); + + int p = -1; + if (extern_babel) + p = langModule->languagePackageCO->findData(toqstr("babel")); + else if (extern_polyglossia) + p = langModule->languagePackageCO->findData(toqstr("polyglossia")); + else + p = langModule->languagePackageCO->findData(toqstr(bp_.lang_package)); + if (p == -1) { langModule->languagePackageCO->setCurrentIndex( - langModule->languagePackageCO->findData("custom")); + langModule->languagePackageCO->findData("custom")); langModule->languagePackageLE->setText(toqstr(bp_.lang_package)); } else { langModule->languagePackageCO->setCurrentIndex(p); langModule->languagePackageLE->clear(); } + langModule->languagePackageCO->setEnabled(!extern_babel && !extern_polyglossia); //color if (bp_.isfontcolor) { -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.1-devel] Set cursor font after pasting to PassThru inset (#12592)
commit d21042299f8dc1812798b68f9a5596603ad61dd9 Author: Juergen Spitzmueller Date: Sat Apr 13 11:36:10 2024 +0200 Set cursor font after pasting to PassThru inset (#12592) (cherry picked from commit 09c72d7c8d3341ecc7ae2307b4355c592d9dcc1b) --- src/insets/InsetText.cpp | 6 ++ status.24x | 1 + 2 files changed, 7 insertions(+) diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index d65cbf9f31..b8e65709a1 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -334,6 +334,12 @@ void InsetText::doDispatch(Cursor & cur, FuncRequest & cmd) // attributes. // FIXME: Change only the pasted paragraphs fixParagraphsFont(); + // This might be needed in general, but we currently + // only have evidence for PassThru (latex_font), + // see #12592 + if (isPassThru()) + // assure current cursor font is latex + cur.setCurrentFont(); break; case LFUN_INSET_SPLIT: diff --git a/status.24x b/status.24x index 569bfb5ca9..c92a8495ea 100644 --- a/status.24x +++ b/status.24x @@ -52,6 +52,7 @@ What's new * DOCUMENT INPUT/OUTPUT +- Set cursor font after pasting to PassThru (e.g., ERT) inset (bug 12592). * USER INTERFACE -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Set cursor font after pasting to PassThru inset (#12592)
commit 09c72d7c8d3341ecc7ae2307b4355c592d9dcc1b Author: Juergen Spitzmueller Date: Sat Apr 13 11:36:10 2024 +0200 Set cursor font after pasting to PassThru inset (#12592) --- src/insets/InsetText.cpp | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index d65cbf9f31..b8e65709a1 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -334,6 +334,12 @@ void InsetText::doDispatch(Cursor & cur, FuncRequest & cmd) // attributes. // FIXME: Change only the pasted paragraphs fixParagraphsFont(); + // This might be needed in general, but we currently + // only have evidence for PassThru (latex_font), + // see #12592 + if (isPassThru()) + // assure current cursor font is latex + cur.setCurrentFont(); break; case LFUN_INSET_SPLIT: -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Fix indentation
commit cab03f2680a3a569a882a17cc73ade1db4638ca0 Author: Juergen Spitzmueller Date: Sat Apr 13 10:11:24 2024 +0200 Fix indentation --- src/frontends/qt/GuiDocument.cpp | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp index ed20023c93..e020ab92c2 100644 --- a/src/frontends/qt/GuiDocument.cpp +++ b/src/frontends/qt/GuiDocument.cpp @@ -4217,24 +4217,24 @@ void GuiDocument::paramsToDialog() // LaTeX input encoding: set after the fonts (see below) -// If the class provides babel or polyglossia, do not allow -// to change that + // If the class provides babel or polyglossia, do not allow + // to change that bool const extern_babel = documentClass().provides("babel"); -bool const extern_polyglossia = + bool const extern_polyglossia = documentClass().provides("polyglossia"); int p = -1; if (extern_babel) - p = langModule->languagePackageCO->findData(toqstr("babel")); + p = langModule->languagePackageCO->findData(toqstr("babel")); else if (extern_polyglossia) - p = langModule->languagePackageCO->findData(toqstr("polyglossia")); + p = langModule->languagePackageCO->findData(toqstr("polyglossia")); else - p = langModule->languagePackageCO->findData(toqstr(bp_.lang_package)); + p = langModule->languagePackageCO->findData(toqstr(bp_.lang_package)); if (p == -1) { langModule->languagePackageCO->setCurrentIndex( - langModule->languagePackageCO->findData("custom")); + langModule->languagePackageCO->findData("custom")); langModule->languagePackageLE->setText(toqstr(bp_.lang_package)); } else { langModule->languagePackageCO->setCurrentIndex(p); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Disable language package choice if the class preloads a package
commit 5477451e36cd9ff4e99aefea2627fbf63e028004 Author: Juergen Spitzmueller Date: Sat Apr 13 10:07:18 2024 +0200 Disable language package choice if the class preloads a package --- src/frontends/qt/GuiDocument.cpp | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp index d4471cff7b..ed20023c93 100644 --- a/src/frontends/qt/GuiDocument.cpp +++ b/src/frontends/qt/GuiDocument.cpp @@ -4217,7 +4217,21 @@ void GuiDocument::paramsToDialog() // LaTeX input encoding: set after the fonts (see below) - int p = langModule->languagePackageCO->findData(toqstr(bp_.lang_package)); +// If the class provides babel or polyglossia, do not allow +// to change that + bool const extern_babel = + documentClass().provides("babel"); +bool const extern_polyglossia = + documentClass().provides("polyglossia"); + + int p = -1; + if (extern_babel) + p = langModule->languagePackageCO->findData(toqstr("babel")); + else if (extern_polyglossia) + p = langModule->languagePackageCO->findData(toqstr("polyglossia")); + else + p = langModule->languagePackageCO->findData(toqstr(bp_.lang_package)); + if (p == -1) { langModule->languagePackageCO->setCurrentIndex( langModule->languagePackageCO->findData("custom")); @@ -4226,6 +4240,7 @@ void GuiDocument::paramsToDialog() langModule->languagePackageCO->setCurrentIndex(p); langModule->languagePackageLE->clear(); } + langModule->languagePackageCO->setEnabled(!extern_babel && !extern_polyglossia); //color if (bp_.isfontcolor) { -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] gbrief-2 loads babel internally. So don't load it ourselves.
commit c3c96a446b32ef77927b5e06436c2668d95dfd6d Author: Juergen Spitzmueller Date: Sat Apr 13 07:32:30 2024 +0200 gbrief-2 loads babel internally. So don't load it ourselves. This makes the class fully functional with non-TeX fonts (it uses \babelfont for the purpose). Before, docs were compiling but the output was wrong. --- lib/layouts/g-brief2.layout | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/layouts/g-brief2.layout b/lib/layouts/g-brief2.layout index ac0b8deb77..b57bbdb249 100644 --- a/lib/layouts/g-brief2.layout +++ b/lib/layouts/g-brief2.layout @@ -17,6 +17,9 @@ Sides 1 PageStyle Empty DefaultStyle Standard +# Babel is loaded internally +Provides babel 1 + # This is just to show how to declare the default font. # The defaults are exactly those shown here. DefaultFont -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.1-devel] Document 76dbb9dc4
commit 276a80fccbc91a5162195383946b8bc0ec591a27 Author: Juergen Spitzmueller Date: Sat Apr 13 07:16:21 2024 +0200 Document 76dbb9dc4 --- status.24x | 2 ++ 1 file changed, 2 insertions(+) diff --git a/status.24x b/status.24x index 3e6573947a..569bfb5ca9 100644 --- a/status.24x +++ b/status.24x @@ -56,6 +56,8 @@ What's new * USER INTERFACE +- Fix wrong position of conversion windows of the input method (bugs 11723, + 13054). * INTERNALS -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.x] Clarify release note.
commit 8c0e81db9a7507b8daeec2a5512b0b2def30adeb Author: Juergen Spitzmueller Date: Sat Apr 13 07:12:34 2024 +0200 Clarify release note. --- lib/RELEASE-NOTES | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/RELEASE-NOTES b/lib/RELEASE-NOTES index 78ba3d750d..3178372492 100644 --- a/lib/RELEASE-NOTES +++ b/lib/RELEASE-NOTES @@ -332,11 +332,11 @@ !!Known issues in version 2.4.0 -* Various versions Qt6 have a problem with key events handling (QTBUG-123848). - This issue is documented in bug #12641 (e.g. LyX is unresponsive to - Control-Command keyboard shortcuts). - The fix for the Qt bug will be included in Qt 6.8.0 and 6.7.1 and might also - be backported to Qt 6.5.6 and 6.2.13. +* Various versions of Qt6 (> 6.2) have problems with key events handling on MacOS. + In LyX, this results in Control-Command keyboard shortcuts not working if + LyX is compiled against such a version for MacOS (see bug #12641). + This is a Qt bug (QTBUG-123848) which will be fixed in Qt 6.8.0 and 6.7.1. + The fix might also be backported to Qt 6.5.6 and 6.2.13. * Gnome environments defaulting to Wayland + mutter compositor might be missing proper window decorations. This is a generic problem which can be for Qt-based -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.x] Update Qt bug documentation (#12641)
commit 8810e9418fe68ad1b608f756afd1806c69cc105c Author: Juergen Spitzmueller Date: Fri Apr 12 11:13:15 2024 +0200 Update Qt bug documentation (#12641) --- lib/RELEASE-NOTES | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/RELEASE-NOTES b/lib/RELEASE-NOTES index 7b103e6f93..78ba3d750d 100644 --- a/lib/RELEASE-NOTES +++ b/lib/RELEASE-NOTES @@ -332,8 +332,11 @@ !!Known issues in version 2.4.0 -* Compiling LyX 2.4 on MacOS with Qt6 makes currently LyX unresponsive to - Control-Command keyboard shortcuts (bug #12641). +* Various versions Qt6 have a problem with key events handling (QTBUG-123848). + This issue is documented in bug #12641 (e.g. LyX is unresponsive to + Control-Command keyboard shortcuts). + The fix for the Qt bug will be included in Qt 6.8.0 and 6.7.1 and might also + be backported to Qt 6.5.6 and 6.2.13. * Gnome environments defaulting to Wayland + mutter compositor might be missing proper window decorations. This is a generic problem which can be for Qt-based -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[Wiki-uploads/master] update README
commit 7dd130824aa05d12994d3251492207650d57b564 Author: Juergen Spitzmueller Date: Thu Apr 11 08:44:52 2024 +0200 update README --- Tools/EvinceSyncLyX/evince_sync_lyx.zip | Bin 6517 -> 6515 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Tools/EvinceSyncLyX/evince_sync_lyx.zip b/Tools/EvinceSyncLyX/evince_sync_lyx.zip index bb8bd6b..ea37a42 100644 Binary files a/Tools/EvinceSyncLyX/evince_sync_lyx.zip and b/Tools/EvinceSyncLyX/evince_sync_lyx.zip differ -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.x] Fix assertion when pasting paragraph with insets in lyxrc.ct_markup_copied
commit 87b3bea823080b493e2e2f22b3ee9a45de97e34d Author: Juergen Spitzmueller Date: Sat Apr 6 09:47:22 2024 +0200 Fix assertion when pasting paragraph with insets in lyxrc.ct_markup_copied This has to be done after the inset buffers have been initialized. (cherry picked from commit 9198ed5965809a1e951d1b721899d0051e619e34) --- src/CutAndPaste.cpp | 45 + 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index 7fd76f98bc..276285dfbc 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -292,26 +292,6 @@ pasteSelectionHelper(DocIterator const & cur, ParagraphList const & parlist, if (!target_inset->insetAllowed(inset->lyxCode())) tmpbuf->eraseChar(i--, false); } - - if (lyxrc.ct_markup_copied) { - // Only remove deleted text and change - // the rest to inserted if ct is active, - // otherwise leave markup as is - if (buffer.params().track_changes) { - if (tmpbuf->size() > 0) { - if (!isFullyDeleted(insertion)) - tmpbuf->acceptChanges(0, tmpbuf->size()); - else - tmpbuf->rejectChanges(0, tmpbuf->size()); - } - tmpbuf->setChange(Change(Change::INSERTED)); - } - } else - // Resolve all markup to inserted or unchanged - // Deleted text has already been removed on copy - // (copySelectionHelper) - tmpbuf->setChange(Change(buffer.params().track_changes ? -Change::INSERTED : Change::UNCHANGED)); } bool const target_empty = pars[pit].empty(); @@ -495,6 +475,31 @@ pasteSelectionHelper(DocIterator const & cur, ParagraphList const & parlist, } insertion.swap(in.paragraphs()); + // We need to do this here, after the inset handling above, + // as acceptChanges() and rejectChanges() might access inset buffers. + tmpbuf = insertion.begin(); + for (; tmpbuf != insertion.end(); ++tmpbuf) { + if (lyxrc.ct_markup_copied) { + // Only remove deleted text and change + // the rest to inserted if ct is active, + // otherwise leave markup as is + if (buffer.params().track_changes) { + if (tmpbuf->size() > 0) { + if (!isFullyDeleted(insertion)) + tmpbuf->acceptChanges(0, tmpbuf->size()); + else + tmpbuf->rejectChanges(0, tmpbuf->size()); + } + tmpbuf->setChange(Change(Change::INSERTED)); + } + } else + // Resolve all markup to inserted or unchanged + // Deleted text has already been removed on copy + // (copySelectionHelper) + tmpbuf->setChange(Change(buffer.params().track_changes ? +Change::INSERTED : Change::UNCHANGED)); + } + // Split the paragraph for inserting the buf if necessary. if (!target_empty) breakParagraphConservative(buffer.params(), pars, pit, pos); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Comment on 9198ed596580
commit 6a2a9086ad6519528285c311e8448a67c93a9429 Author: Juergen Spitzmueller Date: Sun Apr 7 06:24:37 2024 +0200 Comment on 9198ed596580 --- src/CutAndPaste.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index 226b48e250..276285dfbc 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -475,6 +475,8 @@ pasteSelectionHelper(DocIterator const & cur, ParagraphList const & parlist, } insertion.swap(in.paragraphs()); + // We need to do this here, after the inset handling above, + // as acceptChanges() and rejectChanges() might access inset buffers. tmpbuf = insertion.begin(); for (; tmpbuf != insertion.end(); ++tmpbuf) { if (lyxrc.ct_markup_copied) { -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.1-devel] Document 0d3d91c0551
commit 0ecfb01a79537a30a0026809673759a6516623cf Author: Juergen Spitzmueller Date: Sat Apr 6 09:58:31 2024 +0200 Document 0d3d91c0551 (cherry picked from commit 012c739668700d1e02109a3bee6d116bb45cf912) --- lib/doc/Customization.lyx| 33 +++-- lib/doc/de/Customization.lyx | 16 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx index ab2212ce11..79ece05a06 100644 --- a/lib/doc/Customization.lyx +++ b/lib/doc/Customization.lyx @@ -129,7 +129,7 @@ logicalmkup \papersides 2 \paperpagestyle headings \tablestyle default -\tracking_changes false +\tracking_changes true \output_changes false \change_bars false \postpone_fragile_content false @@ -138,6 +138,7 @@ logicalmkup \html_be_strict true \docbook_table_output 0 \docbook_mathml_prefix 1 +\author -712698321 "Jürgen Spitzmüller" \end_header \begin_body @@ -31214,7 +31215,14 @@ $$AbsPath \end_inset - The absolute file path. + The absolute file path +\change_inserted -712698321 1712390130 +. + If compiling with \SpecialChar LyX +, + this is the path to the file in the temporary directory +\change_unchanged +. \end_layout \begin_layout Description @@ -31345,6 +31353,27 @@ $$FName (absolute name or relative to the \SpecialChar LyX document). +\change_inserted -712698321 1712389740 + +\end_layout + +\begin_layout Description + +\change_inserted -712698321 1712390181 +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1712389749 +$$OrigAbsName +\end_layout + +\end_inset + + The file name with absolute path to the original directory (not the temporary directory). +\change_unchanged + \end_layout \begin_layout Description diff --git a/lib/doc/de/Customization.lyx b/lib/doc/de/Customization.lyx index 7f0032dca8..b88adcebb1 100644 --- a/lib/doc/de/Customization.lyx +++ b/lib/doc/de/Customization.lyx @@ -28612,6 +28612,9 @@ $$AbsPath \end_inset Der absolute Dateipfad. + Wenn Sie das Dokument mit \SpecialChar LyX + ausgeben, + ist dies der Pfad zum temporären Verzeichnis. \end_layout \begin_layout Description @@ -28755,6 +28758,19 @@ $$FName \begin_inset Flex Code status collapsed +\begin_layout Plain Layout +$$OrigAbsName +\end_layout + +\end_inset + + Der Dateiname mit absolutem Dateipfad zum ursprünglichen Verzeichnis (nicht dem temporären). +\end_layout + +\begin_layout Description +\begin_inset Flex Code +status collapsed + \begin_layout Plain Layout $$RelPathMaster \end_layout -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Document 0d3d91c0551
commit 012c739668700d1e02109a3bee6d116bb45cf912 Author: Juergen Spitzmueller Date: Sat Apr 6 09:58:31 2024 +0200 Document 0d3d91c0551 --- lib/doc/Customization.lyx| 33 +++-- lib/doc/de/Customization.lyx | 16 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx index ab2212ce11..79ece05a06 100644 --- a/lib/doc/Customization.lyx +++ b/lib/doc/Customization.lyx @@ -129,7 +129,7 @@ logicalmkup \papersides 2 \paperpagestyle headings \tablestyle default -\tracking_changes false +\tracking_changes true \output_changes false \change_bars false \postpone_fragile_content false @@ -138,6 +138,7 @@ logicalmkup \html_be_strict true \docbook_table_output 0 \docbook_mathml_prefix 1 +\author -712698321 "Jürgen Spitzmüller" \end_header \begin_body @@ -31214,7 +31215,14 @@ $$AbsPath \end_inset - The absolute file path. + The absolute file path +\change_inserted -712698321 1712390130 +. + If compiling with \SpecialChar LyX +, + this is the path to the file in the temporary directory +\change_unchanged +. \end_layout \begin_layout Description @@ -31345,6 +31353,27 @@ $$FName (absolute name or relative to the \SpecialChar LyX document). +\change_inserted -712698321 1712389740 + +\end_layout + +\begin_layout Description + +\change_inserted -712698321 1712390181 +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1712389749 +$$OrigAbsName +\end_layout + +\end_inset + + The file name with absolute path to the original directory (not the temporary directory). +\change_unchanged + \end_layout \begin_layout Description diff --git a/lib/doc/de/Customization.lyx b/lib/doc/de/Customization.lyx index 7f0032dca8..b88adcebb1 100644 --- a/lib/doc/de/Customization.lyx +++ b/lib/doc/de/Customization.lyx @@ -28612,6 +28612,9 @@ $$AbsPath \end_inset Der absolute Dateipfad. + Wenn Sie das Dokument mit \SpecialChar LyX + ausgeben, + ist dies der Pfad zum temporären Verzeichnis. \end_layout \begin_layout Description @@ -28755,6 +28758,19 @@ $$FName \begin_inset Flex Code status collapsed +\begin_layout Plain Layout +$$OrigAbsName +\end_layout + +\end_inset + + Der Dateiname mit absolutem Dateipfad zum ursprünglichen Verzeichnis (nicht dem temporären). +\end_layout + +\begin_layout Description +\begin_inset Flex Code +status collapsed + \begin_layout Plain Layout $$RelPathMaster \end_layout -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Fix assertion when pasting paragraph with insets in lyxrc.ct_markup_copied
commit 9198ed5965809a1e951d1b721899d0051e619e34 Author: Juergen Spitzmueller Date: Sat Apr 6 09:47:22 2024 +0200 Fix assertion when pasting paragraph with insets in lyxrc.ct_markup_copied This has to be done after the inset buffers have been initialized. --- src/CutAndPaste.cpp | 43 +++ 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index 7fd76f98bc..226b48e250 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -292,26 +292,6 @@ pasteSelectionHelper(DocIterator const & cur, ParagraphList const & parlist, if (!target_inset->insetAllowed(inset->lyxCode())) tmpbuf->eraseChar(i--, false); } - - if (lyxrc.ct_markup_copied) { - // Only remove deleted text and change - // the rest to inserted if ct is active, - // otherwise leave markup as is - if (buffer.params().track_changes) { - if (tmpbuf->size() > 0) { - if (!isFullyDeleted(insertion)) - tmpbuf->acceptChanges(0, tmpbuf->size()); - else - tmpbuf->rejectChanges(0, tmpbuf->size()); - } - tmpbuf->setChange(Change(Change::INSERTED)); - } - } else - // Resolve all markup to inserted or unchanged - // Deleted text has already been removed on copy - // (copySelectionHelper) - tmpbuf->setChange(Change(buffer.params().track_changes ? -Change::INSERTED : Change::UNCHANGED)); } bool const target_empty = pars[pit].empty(); @@ -495,6 +475,29 @@ pasteSelectionHelper(DocIterator const & cur, ParagraphList const & parlist, } insertion.swap(in.paragraphs()); + tmpbuf = insertion.begin(); + for (; tmpbuf != insertion.end(); ++tmpbuf) { + if (lyxrc.ct_markup_copied) { + // Only remove deleted text and change + // the rest to inserted if ct is active, + // otherwise leave markup as is + if (buffer.params().track_changes) { + if (tmpbuf->size() > 0) { + if (!isFullyDeleted(insertion)) + tmpbuf->acceptChanges(0, tmpbuf->size()); + else + tmpbuf->rejectChanges(0, tmpbuf->size()); + } + tmpbuf->setChange(Change(Change::INSERTED)); + } + } else + // Resolve all markup to inserted or unchanged + // Deleted text has already been removed on copy + // (copySelectionHelper) + tmpbuf->setChange(Change(buffer.params().track_changes ? +Change::INSERTED : Change::UNCHANGED)); + } + // Split the paragraph for inserting the buf if necessary. if (!target_empty) breakParagraphConservative(buffer.params(), pars, pit, pos); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Allow for multiple accelerator alternatives
commit aa7ff14933d4850f2b98bd3b78a9d2b3cee3ee82 Author: Juergen Spitzmueller Date: Thu Apr 4 17:12:48 2024 +0200 Allow for multiple accelerator alternatives This needs some testing before it could go to 2.4.x eventually --- README.localization| 10 lib/ui/stdcontext.inc | 2 +- src/frontends/qt/Menus.cpp | 124 ++--- 3 files changed, 106 insertions(+), 30 deletions(-) diff --git a/README.localization b/README.localization index 7e4d3d7cdb..2f1b3512df 100644 --- a/README.localization +++ b/README.localization @@ -64,6 +64,16 @@ These chars should be somehow used in your translations, however you'll have to invent your own working shortcuts for dialog and menu entries and resolve possible conflicts of the same shortcut chars in one menu... +You will be informed about conflicts in the terminal if you try to access the +menu. + +Note that, in the case of '|', if more than one character follows, this means +that LyX will try each of them in turn and use the first one that is not yet +used by another entry in the menu. That way, you can define alternative shortcuts +in the case one works in one context only, and another one only in another. You +can use this possibility also in translations, but please use it only if no +single shortcut that fits could be found. + Note also that there are already used global shortcuts (such as p k x c m s a) and you should avoid using these characters for first-level menu shortcuts. diff --git a/lib/ui/stdcontext.inc b/lib/ui/stdcontext.inc index dc49f44c77..32d76e603e 100644 --- a/lib/ui/stdcontext.inc +++ b/lib/ui/stdcontext.inc @@ -650,7 +650,7 @@ Menuset Menu "context-edit-index" OptItem "Insert Subentry|n" "indexmacro-insert subentry" OptItem "Insert Sortkey|k" "indexmacro-insert sortkey" - OptItem "Insert See Reference|c" "indexmacro-insert see" + OptItem "Insert See Reference|cf" "indexmacro-insert see" OptItem "Insert See also Reference|a" "indexmacro-insert seealso" End diff --git a/src/frontends/qt/Menus.cpp b/src/frontends/qt/Menus.cpp index 4a09a1b4a7..193e2478fa 100644 --- a/src/frontends/qt/Menus.cpp +++ b/src/frontends/qt/Menus.cpp @@ -233,10 +233,19 @@ public: } /// The keyboard shortcut (usually underlined in the entry) - QString shortcut() const + /// If \p first is true, return only the first character + /// if a multi-character string has been defined. + QString shortcut(bool first = false) const { int const index = label_.lastIndexOf('|'); - return index == -1 ? QString() : label_.mid(index + 1); + if (index == -1) + return QString(); + QString accelerators = label_.mid(index + 1); + if (accelerators.size() == 1) + return accelerators; + if (first) + return accelerators.left(1); + return accelerators; } /// The complete label, with label and shortcut separated by a '|' QString fulllabel() const { return label_; } @@ -349,8 +358,12 @@ public: /// Checks the associated FuncRequest status before adding the /// menu item. void addWithStatusCheck(MenuItem const &); - // Check whether the menu shortcuts are unique - void checkShortcuts() const; + /// Check whether the shortcut of \p mi are unique and valid, and report if not + void checkShortcutUnique(MenuItem const & mi) const; + /// Return true if a \p sc is a unique shortcut + bool checkShortcut(QString const sc) const; + /// Try to find a unique shortcut from a string of alternatives + QString getBestShortcut(MenuItem const & mi) const; /// void expandLastfiles(); void expandDocuments(); @@ -760,28 +773,84 @@ void MenuDefinition::cat(MenuDefinition const & other) } -void MenuDefinition::checkShortcuts() const +QString MenuDefinition::getBestShortcut(MenuItem const & mi) const { - // This is a quadratic algorithm, but we do not care because - // menus are short enough - for (const_iterator it1 = begin(); it1 != end(); ++it1) { - QString shortcut = it1->shortcut(); - if (shortcut.isEmpty()) - continue; - if (!it1->label().contains(shortcut)) + // This might be a string of accelerators, a single accelerator + // or empty + QString accelerators = mi.shortcut(); + QString const label = mi.label(); + if (accelerators.size() == 0) + return QString(); + if (accelerators.size() == 1) { + // check and report clashes +
[LyX features/biginset] de.po
commit 16fb7ae52d751d582ee926cff93bf9fc6d8265f3 Author: Juergen Spitzmueller Date: Thu Apr 4 17:17:05 2024 +0200 de.po --- po/de.gmo | Bin 653622 -> 653743 bytes po/de.po | 160 +++--- 2 files changed, 80 insertions(+), 80 deletions(-) diff --git a/po/de.gmo b/po/de.gmo index 9fc86c4547..f00b3460ae 100644 Binary files a/po/de.gmo and b/po/de.gmo differ diff --git a/po/de.po b/po/de.po index 39ec99ea70..5438bf69e0 100644 --- a/po/de.po +++ b/po/de.po @@ -95,8 +95,8 @@ msgid "" msgstr "" "Project-Id-Version: LyX 2.4git\n" "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n" -"POT-Creation-Date: 2024-04-03 08:54+0200\n" -"PO-Revision-Date: 2024-04-03 09:10+0200\n" +"POT-Creation-Date: 2024-04-04 17:13+0200\n" +"PO-Revision-Date: 2024-04-04 17:15+0200\n" "Last-Translator: Juergen Spitzmueller \n" "Language-Team: German \n" "Language: de\n" @@ -1112,7 +1112,7 @@ msgstr "S:" #: lib/layouts/europasscv.layout:483 lib/layouts/europecv.layout:322 #: lib/layouts/europecv.layout:328 lib/layouts/moderncv.layout:581 #: src/frontends/qt/GuiDocument.cpp:1831 src/frontends/qt/GuiPrefs.cpp:2324 -#: src/frontends/qt/Menus.cpp:955 +#: src/frontends/qt/Menus.cpp:1024 msgid "Language" msgstr "Sprache" @@ -7617,8 +7617,8 @@ msgstr "Zusammenfassung" msgid "Summary ##" msgstr "Zusammenfassung ##" -#: lib/layouts/AEA.layout:356 src/frontends/qt/Menus.cpp:1823 -#: src/frontends/qt/Menus.cpp:1838 +#: lib/layouts/AEA.layout:356 src/frontends/qt/Menus.cpp:1892 +#: src/frontends/qt/Menus.cpp:1907 msgid "Caption" msgstr "Legende" @@ -21223,7 +21223,7 @@ msgid "Insert Sortkey|k" msgstr "Sortierschlüssel einfügen|r" #: lib/ui/stdcontext.inc:653 -msgid "Insert See Reference|c" +msgid "Insert See Reference|cf" msgstr "\"Siehe\"-Verweis einfügen|w" #: lib/ui/stdcontext.inc:654 @@ -35662,10 +35662,10 @@ msgstr "" "Schieber, Strg-+/- oder Umschalt-Mausrad." #: src/frontends/qt/GuiView.cpp:733 src/frontends/qt/GuiView.cpp:844 -#: src/frontends/qt/GuiView.cpp:1031 src/frontends/qt/Menus.cpp:1862 -#: src/frontends/qt/Menus.cpp:1866 src/frontends/qt/Menus.cpp:1870 -#: src/frontends/qt/Menus.cpp:1874 src/frontends/qt/Menus.cpp:1878 -#: src/frontends/qt/Menus.cpp:1882 +#: src/frontends/qt/GuiView.cpp:1031 src/frontends/qt/Menus.cpp:1931 +#: src/frontends/qt/Menus.cpp:1935 src/frontends/qt/Menus.cpp:1939 +#: src/frontends/qt/Menus.cpp:1943 src/frontends/qt/Menus.cpp:1947 +#: src/frontends/qt/Menus.cpp:1951 msgid "[[ZOOM]]%1$d%" msgstr "%1$d%" @@ -36335,27 +36335,27 @@ msgstr "Quelltext-Vorschau" msgid "%1[[preview format name]] Preview" msgstr "%1-Vorschau" -#: src/frontends/qt/GuiWorkArea.cpp:1582 +#: src/frontends/qt/GuiWorkArea.cpp:1584 msgid "Close File" msgstr "Datei schließen" -#: src/frontends/qt/GuiWorkArea.cpp:2120 +#: src/frontends/qt/GuiWorkArea.cpp:2122 msgid "%1 (read only)" msgstr "%1 (schreibgeschützt)" -#: src/frontends/qt/GuiWorkArea.cpp:2128 +#: src/frontends/qt/GuiWorkArea.cpp:2130 msgid "%1 (modified externally)" msgstr "%1 (extern bearbeitet)" -#: src/frontends/qt/GuiWorkArea.cpp:2151 +#: src/frontends/qt/GuiWorkArea.cpp:2153 msgid " Tab" msgstr "Unterfenster " -#: src/frontends/qt/GuiWorkArea.cpp:2157 +#: src/frontends/qt/GuiWorkArea.cpp:2159 msgid " Tab" msgstr "Unterfenster ßen" -#: src/frontends/qt/GuiWorkArea.cpp:2197 +#: src/frontends/qt/GuiWorkArea.cpp:2199 msgid "The file %1 changed on disk." msgstr "Die Datei %1 wurde auf der Festplatte verändert." @@ -36386,269 +36386,269 @@ msgstr "Geben Sie Zeichen zum Filtern der Absatzformatliste ein." msgid "%1$s (unknown)" msgstr "%1$s (unbekannt)" -#: src/frontends/qt/Menus.cpp:752 +#: src/frontends/qt/Menus.cpp:765 msgid "More...|M" msgstr "Mehr...|M" -#: src/frontends/qt/Menus.cpp:834 +#: src/frontends/qt/Menus.cpp:903 msgid "No Group" msgstr "Keine Gruppe" -#: src/frontends/qt/Menus.cpp:864 src/frontends/qt/Menus.cpp:865 +#: src/frontends/qt/Menus.cpp:933 src/frontends/qt/Menus.cpp:934 msgid "More Spelling Suggestions" msgstr "Weitere Rechtschreibvorschläge" -#: src/frontends/qt/Menus.cpp:889 +#: src/frontends/qt/Menus.cpp:958 msgid "Add to personal dictionary|r" msgstr "Zum persönlichen Wörterbuch hinzufügen|ö" -#: src/frontends/qt/Menus.cpp:891 +#: src/frontends/qt/Menus.cpp:960 msgid "Ignore this occurrence|o" msgstr "An dieser Stelle ignorieren|g" -#: src/fro
[LyX features/biginset] de.po
commit c1078811c4b90e49f27f4883be8e56d7d5e0fd7c Author: Juergen Spitzmueller Date: Wed Apr 3 09:12:15 2024 +0200 de.po --- po/de.po | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/po/de.po b/po/de.po index 1bcd38fdd5..39ec99ea70 100644 --- a/po/de.po +++ b/po/de.po @@ -95,8 +95,8 @@ msgid "" msgstr "" "Project-Id-Version: LyX 2.4git\n" "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n" -"POT-Creation-Date: 2024-04-02 16:21+0200\n" -"PO-Revision-Date: 2024-04-02 16:25+0200\n" +"POT-Creation-Date: 2024-04-03 08:54+0200\n" +"PO-Revision-Date: 2024-04-03 09:10+0200\n" "Last-Translator: Juergen Spitzmueller \n" "Language-Team: German \n" "Language: de\n" @@ -20654,7 +20654,7 @@ msgid "Open All Notes|A" msgstr "Alle Notizen öffnen|f" #: lib/ui/stdcontext.inc:240 -msgid "Close All Notes|o" +msgid "Close All Notes|l" msgstr "Alle Notizen schließen|c" #: lib/ui/stdcontext.inc:248 lib/ui/stdmenus.inc:558 @@ -20898,8 +20898,8 @@ msgid "End Editing Externally" msgstr "Externe Bearbeitung beenden" #: lib/ui/stdcontext.inc:381 -msgid "Split Inset|t" -msgstr "Einfügung spalten|f" +msgid "Split Inset|i" +msgstr "Einfügung spalten|ü" #: lib/ui/stdcontext.inc:383 msgid "Jump Back to Saved Bookmark|B" @@ -20949,9 +20949,9 @@ msgstr "Änderung ablehnen|b" msgid "Text Properties|x" msgstr "Texteigenschaften|x" -#: lib/ui/stdcontext.inc:402 lib/ui/stdmenus.inc:125 -msgid "Custom Text Styles|S" -msgstr "Spezifische Textstile|T" +#: lib/ui/stdcontext.inc:402 +msgid "Custom Text Styles|y" +msgstr "Spezifische Textstile|f" #: lib/ui/stdcontext.inc:403 lib/ui/stdmenus.inc:123 msgid "Paragraph Settings...|P" @@ -21124,7 +21124,7 @@ msgstr "Mehrseitige Tabelle|t" #: lib/ui/stdcontext.inc:507 msgid "Formal Style|m" -msgstr "Formaler Stil|F" +msgstr "Formaler Stil|m" #: lib/ui/stdcontext.inc:509 msgid "Borders|d" @@ -21215,7 +21215,7 @@ msgid "Custom Page Formatting...|u" msgstr "Benutzerdefinierter Seitenverweis...|u" #: lib/ui/stdcontext.inc:651 -msgid "Insert Subentry|b" +msgid "Insert Subentry|n" msgstr "Untereintrag einfügen|n" #: lib/ui/stdcontext.inc:652 @@ -21223,8 +21223,8 @@ msgid "Insert Sortkey|k" msgstr "Sortierschlüssel einfügen|r" #: lib/ui/stdcontext.inc:653 -msgid "Insert See Reference|e" -msgstr "\"Siehe\"-Verweis einfügen|S" +msgid "Insert See Reference|c" +msgstr "\"Siehe\"-Verweis einfügen|w" #: lib/ui/stdcontext.inc:654 msgid "Insert See also Reference|a" @@ -21506,6 +21506,10 @@ msgstr "Suchen & Ersetzen (einfach)...|S" msgid "Find & Replace (Advanced)..." msgstr "Suchen & Ersetzen (erweitert)..." +#: lib/ui/stdmenus.inc:125 +msgid "Custom Text Styles|S" +msgstr "Spezifische Textstile|T" + #: lib/ui/stdmenus.inc:126 msgid "Manage Counter Values..." msgstr "Zählerwerte verwalten..." @@ -36396,14 +36400,14 @@ msgstr "Weitere Rechtschreibvorschläge" #: src/frontends/qt/Menus.cpp:889 msgid "Add to personal dictionary|r" -msgstr "Zum persönlichen Wörterbuch hinzufügen|Z" +msgstr "Zum persönlichen Wörterbuch hinzufügen|ö" #: src/frontends/qt/Menus.cpp:891 -msgid "Ignore this occurrence|g" +msgid "Ignore this occurrence|o" msgstr "An dieser Stelle ignorieren|g" #: src/frontends/qt/Menus.cpp:893 -msgid "Ignore all for this session|l" +msgid "Ignore all for this session|t" msgstr "Während dieser Sitzung ignorieren|i" #: src/frontends/qt/Menus.cpp:895 -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Dissolve some shortcut conflicts in the wake of f3a4602c4c1ec
commit 728175f9acdd8b67249d5403d99319557201f80c Author: Juergen Spitzmueller Date: Wed Apr 3 08:28:00 2024 +0200 Dissolve some shortcut conflicts in the wake of f3a4602c4c1ec --- lib/ui/stdcontext.inc | 10 +- src/frontends/qt/Menus.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/ui/stdcontext.inc b/lib/ui/stdcontext.inc index 90a4cda1aa..dc49f44c77 100644 --- a/lib/ui/stdcontext.inc +++ b/lib/ui/stdcontext.inc @@ -237,7 +237,7 @@ Menuset Item "Greyed Out|y" "inset-modify note Note Greyedout" Separator Item "Open All Notes|A" "inset-forall Note inset-toggle open" - Item "Close All Notes|o" "inset-forall Note inset-toggle close" + Item "Close All Notes|l" "inset-forall Note inset-toggle close" End # @@ -378,7 +378,7 @@ Menuset Item "Paste" "paste" Submenu "Paste Recent|e" "edit_pasterecent" Separator - OptItem "Split Inset|t" "inset-split" + OptItem "Split Inset|i" "inset-split" Separator Item "Jump Back to Saved Bookmark|B" "bookmark-goto 0" OptItem "Forward Search|F" "forward-search" @@ -399,7 +399,7 @@ Menuset OptItem "Reject Change|j" "change-reject" Separator Submenu "Text Properties|x" "edit_textprops" - OptSubmenu "Custom Text Styles|S" "edit_textstyles" + OptSubmenu "Custom Text Styles|y" "edit_textstyles" Item "Paragraph Settings...|P" "layout-paragraph" OptItem "Unify Graphics Groups|U" "graphics-unify" LanguageSelector @@ -648,9 +648,9 @@ Menuset End Menu "context-edit-index" - OptItem "Insert Subentry|b" "indexmacro-insert subentry" + OptItem "Insert Subentry|n" "indexmacro-insert subentry" OptItem "Insert Sortkey|k" "indexmacro-insert sortkey" - OptItem "Insert See Reference|e" "indexmacro-insert see" + OptItem "Insert See Reference|c" "indexmacro-insert see" OptItem "Insert See also Reference|a" "indexmacro-insert seealso" End diff --git a/src/frontends/qt/Menus.cpp b/src/frontends/qt/Menus.cpp index 6c4b08cf48..4a09a1b4a7 100644 --- a/src/frontends/qt/Menus.cpp +++ b/src/frontends/qt/Menus.cpp @@ -888,9 +888,9 @@ void MenuDefinition::expandSpellingSuggestions(BufferView const * bv) docstring const arg = wl.word() + " " + from_ascii(wl.lang()->lang()); add(MenuItem(MenuItem::Command, qt_("Add to personal dictionary|r"), FuncRequest(LFUN_SPELLING_ADD, arg))); - add(MenuItem(MenuItem::Command, qt_("Ignore this occurrence|g"), + add(MenuItem(MenuItem::Command, qt_("Ignore this occurrence|o"), FuncRequest(LFUN_FONT_NO_SPELLCHECK, arg))); - add(MenuItem(MenuItem::Command, qt_("Ignore all for this session|l"), + add(MenuItem(MenuItem::Command, qt_("Ignore all for this session|t"), FuncRequest(LFUN_SPELLING_IGNORE, arg))); add(MenuItem(MenuItem::Command, qt_("Ignore all in this document|u"), FuncRequest(LFUN_SPELLING_ADD_LOCAL, arg))); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Update German User Guide
commit a55ede6a7462affbdf860caa6bc54777f6ad3aa5 Author: Juergen Spitzmueller Date: Wed Apr 3 07:35:59 2024 +0200 Update German User Guide --- lib/doc/de/UserGuide.lyx | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/lib/doc/de/UserGuide.lyx b/lib/doc/de/UserGuide.lyx index 30366aa07f..368fae244e 100644 --- a/lib/doc/de/UserGuide.lyx +++ b/lib/doc/de/UserGuide.lyx @@ -1,4 +1,4 @@ -#LyX 2.4 created this file. For more info see https://www.lyx.org/ +#LyX 2.5 created this file. For more info see https://www.lyx.org/ \lyxformat 620 \begin_document \begin_header @@ -9302,10 +9302,12 @@ Unformatiert \end_layout \begin_layout Verbatim + Dies ist Unformatiert. \end_layout \begin_layout Verbatim + Die folgenden 2 Zeilen sind leer: \end_layout @@ -9318,6 +9320,7 @@ Die folgenden 2 Zeilen sind leer: \end_layout \begin_layout Verbatim + Fast alles ist in Unformatiert erlaubt:"%&$§#~'` \backslash }][{| @@ -9343,6 +9346,7 @@ Unformatiert \end_layout \begin_layout Verbatim* + Dies ist Unformatiert*. \end_layout @@ -43818,6 +43822,10 @@ Nicht-typographisches \begin_inset space ~ \end_inset +doppeltes +\begin_inset space ~ +\end_inset + Anführungszeichen Fügt dieses Anführungszeichen ein: ", unabhängig vom Anführungszeichen-Stil der im Dialog @@ -43829,6 +43837,30 @@ Sprache eingestellt ist. \end_layout +\begin_layout Description +Nicht-typographisches +\begin_inset space ~ +\end_inset + +einfaches +\begin_inset space ~ +\end_inset + +Anführungszeichen Fügt dieses Anführungszeichen ein: + +\begin_inset Quotes qls +\end_inset + +, + unabhängig vom Anführungszeichen-Stil der im Dialog +\family sans +Dokument\SpecialChar menuseparator +Einstellungen\SpecialChar menuseparator +Sprache +\family default + eingestellt ist. +\end_layout + \begin_layout Description Inneres \begin_inset space ~ -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Merge branch 'master' of git.lyx.org:lyx
commit 77b680546d08e4cf5cefac2feca30155d52ad183 Merge: 655cdfbb7b 34dbdad957 Author: Juergen Spitzmueller Date: Wed Apr 3 07:26:11 2024 +0200 Merge branch 'master' of git.lyx.org:lyx .gitignore| 2 +- lib/doc/UserGuide.lyx | 87 -- po/fr.gmo | Bin 656494 -> 656498 bytes po/fr.po | 26 +++ src/LyXAction.cpp | 4 ++- 5 files changed, 101 insertions(+), 18 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] de.po
commit 655cdfbb7b8d72efbc5eca64a24b31898bfe Author: Juergen Spitzmueller Date: Tue Apr 2 16:26:00 2024 +0200 de.po --- po/de.po | 214 +++ 1 file changed, 107 insertions(+), 107 deletions(-) diff --git a/po/de.po b/po/de.po index b2575ee8b9..1bcd38fdd5 100644 --- a/po/de.po +++ b/po/de.po @@ -95,8 +95,8 @@ msgid "" msgstr "" "Project-Id-Version: LyX 2.4git\n" "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n" -"POT-Creation-Date: 2024-04-02 08:21+0200\n" -"PO-Revision-Date: 2024-04-02 08:23+0200\n" +"POT-Creation-Date: 2024-04-02 16:21+0200\n" +"PO-Revision-Date: 2024-04-02 16:25+0200\n" "Last-Translator: Juergen Spitzmueller \n" "Language-Team: German \n" "Language: de\n" @@ -1112,7 +1112,7 @@ msgstr "S:" #: lib/layouts/europasscv.layout:483 lib/layouts/europecv.layout:322 #: lib/layouts/europecv.layout:328 lib/layouts/moderncv.layout:581 #: src/frontends/qt/GuiDocument.cpp:1831 src/frontends/qt/GuiPrefs.cpp:2324 -#: src/frontends/qt/Menus.cpp:936 +#: src/frontends/qt/Menus.cpp:955 msgid "Language" msgstr "Sprache" @@ -1741,25 +1741,25 @@ msgid "Case " msgstr "ß-/Kleinschreibung beachten" #: src/frontends/qt/ui/FindAndReplaceUi.ui:205 -#: src/frontends/qt/FindAndReplace.cpp:716 +#: src/frontends/qt/FindAndReplace.cpp:719 msgid "Find next occurrence (Enter, backwards: Shift+Enter)" msgstr "" "Suche nächsten Treffer (Eingabetaste; rückwärts: Umschalt+Eingabetaste)" #: src/frontends/qt/ui/FindAndReplaceUi.ui:208 -#: src/frontends/qt/ui/SearchUi.ui:190 src/frontends/qt/FindAndReplace.cpp:715 +#: src/frontends/qt/ui/SearchUi.ui:190 src/frontends/qt/FindAndReplace.cpp:718 msgid "Find &>" msgstr "Suchen &>" #: src/frontends/qt/ui/FindAndReplaceUi.ui:221 -#: src/frontends/qt/FindAndReplace.cpp:718 +#: src/frontends/qt/FindAndReplace.cpp:721 msgid "Replace and find next occurrence (Enter, backwards: Shift+Enter)" msgstr "" "Ersetze und suche nächsten Treffer (Eingabetaste; rückwärts: " "Umschalt+Eingabetaste)" #: src/frontends/qt/ui/FindAndReplaceUi.ui:224 -#: src/frontends/qt/FindAndReplace.cpp:717 +#: src/frontends/qt/FindAndReplace.cpp:720 msgid "Rep >" msgstr "Erse >" @@ -5568,7 +5568,7 @@ msgstr "Ohne Hyperlink " msgid "Find previous occurrence (Shift+Enter)" msgstr "Vorhergehender Treffer (Umschalt+Eingabe)" -#: src/frontends/qt/ui/SearchUi.ui:55 src/frontends/qt/FindAndReplace.cpp:710 +#: src/frontends/qt/ui/SearchUi.ui:55 src/frontends/qt/FindAndReplace.cpp:713 msgid "&< Find" msgstr "&< Suchen" @@ -7617,8 +7617,8 @@ msgstr "Zusammenfassung" msgid "Summary ##" msgstr "Zusammenfassung ##" -#: lib/layouts/AEA.layout:356 src/frontends/qt/Menus.cpp:1804 -#: src/frontends/qt/Menus.cpp:1819 +#: lib/layouts/AEA.layout:356 src/frontends/qt/Menus.cpp:1823 +#: src/frontends/qt/Menus.cpp:1838 msgid "Caption" msgstr "Legende" @@ -20646,7 +20646,7 @@ msgid "Comment|m" msgstr "Kommentar|K" #: lib/ui/stdcontext.inc:237 lib/ui/stdmenus.inc:548 -msgid "Greyed Out|G" +msgid "Greyed Out|y" msgstr "Grauschrift|G" #: lib/ui/stdcontext.inc:239 @@ -20654,7 +20654,7 @@ msgid "Open All Notes|A" msgstr "Alle Notizen öffnen|f" #: lib/ui/stdcontext.inc:240 -msgid "Close All Notes|l" +msgid "Close All Notes|o" msgstr "Alle Notizen schließen|c" #: lib/ui/stdcontext.inc:248 lib/ui/stdmenus.inc:558 @@ -20910,7 +20910,7 @@ msgid "Forward Search|F" msgstr "Vorwärtssuche|V" #: lib/ui/stdcontext.inc:386 lib/ui/stdmenus.inc:120 -msgid "Move Paragraph Up|o" +msgid "Move Paragraph Up|h" msgstr "Absatz nach oben verschieben|o" #: lib/ui/stdcontext.inc:387 lib/ui/stdmenus.inc:121 @@ -27892,10 +27892,6 @@ msgstr "Gnuplot" msgid "External Material" msgstr "Externes Material" -#: lib/examples/Articles:0 -msgid "XY-Figure" -msgstr "XY-Figure" - #: lib/examples/Articles:0 msgid "Feynman Diagrams" msgstr "Feynman-Diagramme" @@ -27904,6 +27900,10 @@ msgstr "Feynman-Diagramme" msgid "Instant Preview" msgstr "Eingebettete Vorschau" +#: lib/examples/Articles:0 +msgid "Itemize Bullets" +msgstr "Auflistungszeichen" + #: lib/examples/Articles:0 msgid "Minted File Listing" msgstr "Minted-Programmlistings (Dateien)" @@ -27913,8 +27913,8 @@ msgid "Minted Listings" msgstr "Minted-Programmlistings&q
[LyX features/biginset] Smarter menu length calculation
commit f3a4602c4c1eca9bc79e7ba0b58395b79eafe9db Author: Juergen Spitzmueller Date: Tue Apr 2 14:41:54 2024 +0200 Smarter menu length calculation It is possible I have missed some shortcut conflicts, so please report if you find any. --- lib/ui/stdcontext.inc | 6 +++--- lib/ui/stdmenus.inc| 4 ++-- src/frontends/qt/Menus.cpp | 43 +-- 3 files changed, 38 insertions(+), 15 deletions(-) diff --git a/lib/ui/stdcontext.inc b/lib/ui/stdcontext.inc index 6d4fc75703..90a4cda1aa 100644 --- a/lib/ui/stdcontext.inc +++ b/lib/ui/stdcontext.inc @@ -234,10 +234,10 @@ Menuset Menu "context-note" Item "LyX Note|N" "inset-modify note Note Note" Item "Comment|m" "inset-modify note Note Comment" - Item "Greyed Out|G" "inset-modify note Note Greyedout" + Item "Greyed Out|y" "inset-modify note Note Greyedout" Separator Item "Open All Notes|A" "inset-forall Note inset-toggle open" - Item "Close All Notes|l" "inset-forall Note inset-toggle close" + Item "Close All Notes|o" "inset-forall Note inset-toggle close" End # @@ -383,7 +383,7 @@ Menuset Item "Jump Back to Saved Bookmark|B" "bookmark-goto 0" OptItem "Forward Search|F" "forward-search" Separator - Item "Move Paragraph Up|o" "paragraph-move-up" + Item "Move Paragraph Up|h" "paragraph-move-up" Item "Move Paragraph Down|v" "paragraph-move-down" Separator EnvironmentSeparatorsContext diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc index 7d7750cc03..14c927dc06 100644 --- a/lib/ui/stdmenus.inc +++ b/lib/ui/stdmenus.inc @@ -117,7 +117,7 @@ Menuset Item "Find & Replace (Quick)...|F" "dialog-show findreplace" Item "Find & Replace (Advanced)..." "dialog-show findreplaceadv" Separator - Item "Move Paragraph Up|o" "paragraph-move-up" + Item "Move Paragraph Up|h" "paragraph-move-up" Item "Move Paragraph Down|v" "paragraph-move-down" Separator Item "Paragraph Settings...|P" "layout-paragraph" @@ -545,7 +545,7 @@ Menuset Menu "insert_note" Item "LyX Note|N" "note-insert Note" Item "Comment|C" "note-insert Comment" - Item "Greyed Out|G" "note-insert Greyedout" + Item "Greyed Out|y" "note-insert Greyedout" End Menu "insert_branches" diff --git a/src/frontends/qt/Menus.cpp b/src/frontends/qt/Menus.cpp index a3fc5a7ce1..6c4b08cf48 100644 --- a/src/frontends/qt/Menus.cpp +++ b/src/frontends/qt/Menus.cpp @@ -342,6 +342,8 @@ public: const; /// bool hasFunc(FuncRequest const &) const; + /// The real size of the menu considering hidden entries + int realSize() const; /// Add the menu item unconditionally void add(MenuItem const & item) { items_.push_back(item); } /// Checks the associated FuncRequest status before adding the @@ -727,6 +729,23 @@ bool MenuDefinition::hasFunc(FuncRequest const & func) const } +int MenuDefinition::realSize() const +{ + int res = 0; + for (auto const & it : *this) { + if (it.kind() == MenuItem::Submenu) + ++res; + else if (it.kind() == MenuItem::Command) { + FuncStatus status = lyx::getStatus(*it.func()); + // count only items that are actually displayed + if (!status.unknown() && (status.enabled() || !it.optional())) + ++res; + } + } + return res; +} + + void MenuDefinition::catSub(docstring const & name) { add(MenuItem(MenuItem::Submenu, @@ -867,13 +886,13 @@ void MenuDefinition::expandSpellingSuggestions(BufferView const * bv) if (i > 0) add(MenuItem(MenuItem::Separator)); docstring const arg = wl.word() + " " + from_ascii(wl.lang()->lang()); - add(MenuItem(MenuItem::Command, qt_("Add to personal dictionary|n"), + add(MenuItem(MenuIte
[LyX features/biginset] de/UserGuide: update
commit 0b8e8eb1740f6db4f81772fd39dff8f80243dd5d Author: Juergen Spitzmueller Date: Tue Apr 2 09:32:02 2024 +0200 de/UserGuide: update --- lib/doc/de/UserGuide.lyx | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/doc/de/UserGuide.lyx b/lib/doc/de/UserGuide.lyx index d0d819de8c..30366aa07f 100644 --- a/lib/doc/de/UserGuide.lyx +++ b/lib/doc/de/UserGuide.lyx @@ -43830,11 +43830,11 @@ Sprache \end_layout \begin_layout Description -Einfaches +Inneres \begin_inset space ~ \end_inset -Anführungszeichen Fügt ein einfaches Anführungszeichen im Anführungszeichenstil ein, +Anführungszeichen Fügt ein inneres Anführungszeichen im Anführungszeichenstil ein, der im Dialog \family sans Dokument\SpecialChar menuseparator @@ -43842,6 +43842,15 @@ Einstellungen\SpecialChar menuseparator Sprache \family default eingestellt ist. + Meist sind dies +\begin_inset Quotes gls +\end_inset + +einfache +\begin_inset Quotes grs +\end_inset + + Anführungszeichen. \end_layout \begin_layout Description -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] de.po
commit 645ab7fa730768995f7d1f55f0aa33182d07fdc4 Author: Juergen Spitzmueller Date: Tue Apr 2 08:23:42 2024 +0200 de.po po/de.po | 1054 +++--- 1 file changed, 529 insertions(+), 525 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Fix label escaping in InsetMathRef (#12980)
commit 98080ca0d548b754433a99f9f097054134117184 Author: Juergen Spitzmueller Date: Tue Apr 2 08:15:53 2024 +0200 Fix label escaping in InsetMathRef (#12980) This was completely broken: the IDs have been escaped in the LyX file (which they absolutely shouldn't) but not in all LaTeX output (which they should). --- src/insets/InsetCommandParams.cpp | 9 ++--- src/insets/InsetCommandParams.h | 2 +- src/mathed/InsetMathRef.cpp | 22 -- src/mathed/MathExtern.cpp | 15 ++- src/mathed/MathFactory.cpp| 2 +- 5 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/insets/InsetCommandParams.cpp b/src/insets/InsetCommandParams.cpp index 034f9d59c8..9c3552a4b7 100644 --- a/src/insets/InsetCommandParams.cpp +++ b/src/insets/InsetCommandParams.cpp @@ -569,7 +569,7 @@ docstring InsetCommandParams::prepareCommand(OutputParams const & runparams, } -docstring InsetCommandParams::getCommand(OutputParams const & runparams, bool starred) const +docstring InsetCommandParams::getCommand(OutputParams const & runparams, bool starred, bool unhandled) const { docstring s = '\\' + from_ascii(cmdName_); if (starred) @@ -579,20 +579,23 @@ docstring InsetCommandParams::getCommand(OutputParams const & runparams, bool st ParamInfo::const_iterator end = info_.end(); for (; it != end; ++it) { std::string const & name = it->name(); + ParamInfo::ParamHandling handling = unhandled ? + ParamInfo::HANDLING_NONE + : it->handling(); switch (it->type()) { case ParamInfo::LYX_INTERNAL: break; case ParamInfo::LATEX_REQUIRED: { docstring const data = - prepareCommand(runparams, (*this)[name], it->handling()); + prepareCommand(runparams, (*this)[name], handling); s += '{' + data + '}'; noparam = false; break; } case ParamInfo::LATEX_OPTIONAL: { docstring data = - prepareCommand(runparams, (*this)[name], it->handling()); + prepareCommand(runparams, (*this)[name], handling); if (!data.empty()) { s += '[' + protectArgument(data) + ']'; noparam = false; diff --git a/src/insets/InsetCommandParams.h b/src/insets/InsetCommandParams.h index 134b46a604..f05fb61ddc 100644 --- a/src/insets/InsetCommandParams.h +++ b/src/insets/InsetCommandParams.h @@ -136,7 +136,7 @@ public: /// void Write(std::ostream & os, Buffer const * buf) const; /// Build the complete LaTeX command - docstring getCommand(OutputParams const &, bool starred = false) const; + docstring getCommand(OutputParams const &, bool starred = false, bool unhandled = false) const; /// Return the command name std::string const & getCmdName() const { return cmdName_; } /// Set the name to \p n. This must be a known name. All parameters diff --git a/src/mathed/InsetMathRef.cpp b/src/mathed/InsetMathRef.cpp index ad2e499167..082a341cf4 100644 --- a/src/mathed/InsetMathRef.cpp +++ b/src/mathed/InsetMathRef.cpp @@ -76,7 +76,7 @@ void InsetMathRef::doDispatch(Cursor & cur, FuncRequest & cmd) switch (cmd.action()) { case LFUN_INSET_MODIFY: { string const arg0 = cmd.getArg(0); - string const arg1 = cmd.getArg(1); + string const arg1 = cmd.getArg(1); if (arg0 == "ref") { if (arg1 == "changetarget") { string const oldtarget = cmd.getArg(2); @@ -295,25 +295,27 @@ void InsetMathRef::write(TeXMathStream & os) const LYXERR0("Unassigned buffer_ in InsetMathRef::write!"); LYXERR0("LaTeX output may be wrong!"); } + // are we writing to the LyX file? + if (!os.latex()) { + // if so, then this is easy + InsetMathCommand::write(os); + return; + } bool const use_refstyle = buffer_ && buffer().params().use_refstyle; bool special_case = cmd == "formatted" || cmd == "labelonly" || (cmd == "eqref" && use_refstyle); - // are we writing to the LyX file or not in a special case? - if (!os.latex() || !special_case) { - // if so, then this is easy - InsetMathCommand::write(os); - ret
[LyX features/biginset] Fix backslash LaTeXifying in InsetCommand
commit a020bbc4a8143cff34e80442caf71d3b2ff8ccd3 Author: Juergen Spitzmueller Date: Mon Apr 1 10:57:27 2024 +0200 Fix backslash LaTeXifying in InsetCommand \ was transformed very early to \textbackslash{}, but then the following routines escaped braces in the string, so we wrongly ended up in \textbackslash\{\} and "\{} in the output --- src/insets/InsetCommandParams.cpp | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/insets/InsetCommandParams.cpp b/src/insets/InsetCommandParams.cpp index 94b9a2c8a2..034f9d59c8 100644 --- a/src/insets/InsetCommandParams.cpp +++ b/src/insets/InsetCommandParams.cpp @@ -455,7 +455,21 @@ docstring InsetCommandParams::prepareCommand(OutputParams const & runparams, // LATEXIFY, ESCAPE and NONE are mutually exclusive if (handling & ParamInfo::HANDLING_LATEXIFY) { // First handle backslash - result = subst(command, from_ascii("\\"), from_ascii("\\textbackslash{}")); + // we cannot replace yet with \textbackslash{} + // as the braces would be erroneously escaped + // in the following routines ("\textbackslash\{\}"). + // So create a unique placeholder which is replaced + // in the end. + docstring bs = from_ascii("@LyXBackslash@"); + // We are super-careful and assure the placeholder + // does not exist in the string + for (int i = 0; ; ++i) { + if (!contains(command, bs)) { + result = subst(command, from_ascii("\\"), bs); + break; + } + bs = from_ascii("@LyXBackslash") + i + '@'; + } // Then get LaTeX macros pair command_latexed = runparams.encoding->latexString(result, runparams.dryrun); @@ -493,6 +507,8 @@ docstring InsetCommandParams::prepareCommand(OutputParams const & runparams, result.replace(pos, 1, backslash + chars_escape[k] + term); } } + // set in real backslash now + result = subst(result, bs, from_ascii("\\textbackslash{}")); } else if (handling & ParamInfo::HANDLING_ESCAPE) result = escape(command); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Fix context menu of InsetMathRef
commit 31ec96e01ff0acca660cc91df1e3e6590d8aa649 Author: Juergen Spitzmueller Date: Mon Apr 1 17:59:56 2024 +0200 Fix context menu of InsetMathRef --- src/mathed/InsetMathRef.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/mathed/InsetMathRef.cpp b/src/mathed/InsetMathRef.cpp index b70b7eae5e..ad2e499167 100644 --- a/src/mathed/InsetMathRef.cpp +++ b/src/mathed/InsetMathRef.cpp @@ -164,6 +164,10 @@ bool InsetMathRef::getStatus(Cursor & cur, FuncRequest const & cmd, switch (cmd.action()) { // we handle these case LFUN_INSET_MODIFY: + if (cmd.getArg(0) == "changetype") + status.setOnOff(from_ascii(cmd.getArg(1)) == commandname()); + status.setEnabled(true); + return true; case LFUN_INSET_DIALOG_UPDATE: case LFUN_INSET_SETTINGS: case LFUN_MOUSE_RELEASE: -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Factor out shared method
commit 812e306dada7c5c0565c9428232f329ec4c705d3 Author: Juergen Spitzmueller Date: Sun Mar 31 12:40:27 2024 +0200 Factor out shared method Amends babb5b007bd --- src/BufferView.cpp | 19 +++ src/BufferView.h | 3 +++ src/frontends/qt/GuiSpellchecker.cpp | 29 ++--- src/lyxfind.cpp | 25 ++--- 4 files changed, 26 insertions(+), 50 deletions(-) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index ad534eae28..39fffed68e 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -2993,6 +2993,25 @@ void BufferView::putSelectionAt(DocIterator const & cur, } +void BufferView::setSelection(DocIterator const & from, + DocIterator const & to) +{ + if (from.pit() != to.pit()) { + // there are multiple paragraphs in selection + cursor().setCursor(from); + cursor().clearSelection(); + cursor().selection(true); + cursor().setCursor(to); + cursor().selection(true); + } else { + // only single paragraph + int const size = to.pos() - from.pos(); + putSelectionAt(from, size, false); + } + processUpdateFlags(Update::Force | Update::FitCursor); +} + + bool BufferView::selectIfEmpty(DocIterator & cur) { if ((cur.inTexted() && !cur.paragraph().empty()) diff --git a/src/BufferView.h b/src/BufferView.h index d239fdd360..b46ade3df5 100644 --- a/src/BufferView.h +++ b/src/BufferView.h @@ -302,6 +302,9 @@ public: */ void putSelectionAt(DocIterator const & cur, int length, bool backwards); + /// set a selection between \p from and \p to + void setSelection(DocIterator const & from, +DocIterator const & to); /// selects the item at cursor if its paragraph is empty. bool selectIfEmpty(DocIterator & cur); diff --git a/src/frontends/qt/GuiSpellchecker.cpp b/src/frontends/qt/GuiSpellchecker.cpp index d58f435b10..66952eb7dc 100644 --- a/src/frontends/qt/GuiSpellchecker.cpp +++ b/src/frontends/qt/GuiSpellchecker.cpp @@ -72,8 +72,6 @@ struct SpellcheckerWidget::Private void check(); /// close the spell checker dialog void hide() const; - /// make/restore a selection between from and to - void setSelection(DocIterator const & from, DocIterator const & to) const; /// if no selection was checked: /// ask the user if the check should start over bool continueFromBeginning(); @@ -339,7 +337,7 @@ void SpellcheckerWidget::Private::hide() const if (isCurrentBuffer(bvcur)) { if (!begin_.empty() && !end_.empty()) { // restore previous selection - setSelection(begin_, end_); + bv->setSelection(begin_, end_); } else { // restore cursor position bvcur.setCursor(start_); @@ -349,29 +347,6 @@ void SpellcheckerWidget::Private::hide() const } } -void SpellcheckerWidget::Private::setSelection( - DocIterator const & from, DocIterator const & to) const -{ - BufferView * bv = gv_->documentBufferView(); - DocIterator end = to; - - if (from.pit() != end.pit()) { - // there are multiple paragraphs in selection - Cursor & bvcur = bv->cursor(); - bvcur.setCursor(from); - bvcur.clearSelection(); - bvcur.selection(true); - bvcur.setCursor(end); - bvcur.selection(true); - } else { - // FIXME LFUN - // If we used a LFUN, dispatch would do all of this for us - int const size = end.pos() - from.pos(); - bv->putSelectionAt(from, size, false); - } - bv->processUpdateFlags(Update::Force | Update::FitCursor); -} - void SpellcheckerWidget::Private::forward() { DocIterator const from = cursor(); @@ -632,7 +607,7 @@ void SpellcheckerWidget::Private::check() return; setLanguage(word_lang.lang()); // mark misspelled word - setSelection(from, to); + bv->setSelection(from, to); // enable relevant widgets updateView(); } diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index 6281b82abc..6e3b324bfa 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -281,27 +281,6 @@ bool searchAllowed(docstring const & str) return true; } -void setSelection(BufferView * bv, DocIterator const & from, DocIterator const & to) -{ - DocIterator end = to; - - if (from.pit() != end.pit()) { - // there are multiple paragraphs in selection - Cursor &
[LyX features/biginset] Fix crash with quick search starting with mathed selection
commit babb5b007bdb273c12255edf7c84a537327c0400 Author: Juergen Spitzmueller Date: Sat Mar 30 10:14:34 2024 +0100 Fix crash with quick search starting with mathed selection setCursorSelection does not work with math. Copy the method from spellchecker. --- src/lyxfind.cpp | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index edf21d4022..6281b82abc 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -281,6 +281,27 @@ bool searchAllowed(docstring const & str) return true; } +void setSelection(BufferView * bv, DocIterator const & from, DocIterator const & to) +{ + DocIterator end = to; + + if (from.pit() != end.pit()) { + // there are multiple paragraphs in selection + Cursor & bvcur = bv->cursor(); + bvcur.setCursor(from); + bvcur.clearSelection(); + bvcur.selection(true); + bvcur.setCursor(end); + bvcur.selection(true); + } else { + // FIXME LFUN + // If we used a LFUN, dispatch would do all of this for us + int const size = end.pos() - from.pos(); + bv->putSelectionAt(from, size, false); + } + bv->processUpdateFlags(Update::Force | Update::FitCursor); +} + } // namespace @@ -387,7 +408,7 @@ bool findOne(BufferView * bv, docstring const & searchstr, // restore original selection if (had_selection) { bv->cursor().resetAnchor(); - bv->setCursorSelectionTo(endcur); + setSelection(bv, startcur, endcur); } return false; } @@ -464,7 +485,7 @@ int replaceAll(BufferView * bv, if (had_selection) { endcur.fixIfBroken(); bv->cursor().resetAnchor(); - bv->setCursorSelectionTo(endcur); + setSelection(bv, startcur, endcur); } return num; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Do not enter page break in heading (#13040)
commit 698f922d19eb28f3ca84cc9f6a1bb5aaf3ba0301 Author: Juergen Spitzmueller Date: Thu Mar 28 18:03:54 2024 +0100 Do not enter page break in heading (#13040) Rather than that, put it before or after, or disallow, depending on the position. --- src/Text.cpp | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/Text.cpp b/src/Text.cpp index e1c8830dc3..d5a1069fa1 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -5720,12 +5720,27 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) } case LFUN_NOMENCL_PRINT: - case LFUN_NEWPAGE_INSERT: // do nothing fancy doInsertInset(cur, this, cmd, false, false); cur.posForward(); break; + case LFUN_NEWPAGE_INSERT: { + // When we are in a heading, put the page break in a standard + // paragraph before the heading (if cur.pos() == 0) or after + // (if cur.pos() == cur.lastpos()) + if (cur.text()->getTocLevel(cur.pit()) != Layout::NOT_IN_TOC) { + lyx::dispatch(FuncRequest(LFUN_PARAGRAPH_BREAK)); + DocumentClass const & tc = bv->buffer().params().documentClass(); + lyx::dispatch(FuncRequest(LFUN_LAYOUT, from_ascii("\"") + tc.plainLayout().name() + + from_ascii("\" ignoreautonests"))); + } + // do nothing fancy + doInsertInset(cur, this, cmd, false, false); + cur.posForward(); + break; + } + case LFUN_SEPARATOR_INSERT: { doInsertInset(cur, this, cmd, false, false); cur.posForward(); @@ -6956,9 +6971,11 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd, } case LFUN_NEWPAGE_INSERT: - // not allowed in description items + // not allowed in description items and in the midst of sections code = NEWPAGE_CODE; - enable = !inDescriptionItem(cur); + enable = !inDescriptionItem(cur) + && (cur.text()->getTocLevel(cur.pit()) == Layout::NOT_IN_TOC + || cur.pos() == 0 || cur.pos() == cur.lastpos()); break; case LFUN_LANGUAGE: -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Fix alignment of screen font preview in prefs (remaining part of #13046)
commit 60cffcd9b7cc768d3a3cbfa97beebefb426350e1 Author: Juergen Spitzmueller Date: Sun Mar 24 09:00:41 2024 +0100 Fix alignment of screen font preview in prefs (remaining part of #13046) --- src/frontends/qt/GuiFontExample.cpp | 26 +- src/frontends/qt/GuiFontExample.h | 5 + src/frontends/qt/GuiPrefs.cpp | 13 + src/frontends/qt/GuiPrefs.h | 1 + 4 files changed, 40 insertions(+), 5 deletions(-) diff --git a/src/frontends/qt/GuiFontExample.cpp b/src/frontends/qt/GuiFontExample.cpp index 8a4ca13df8..ee7716d588 100644 --- a/src/frontends/qt/GuiFontExample.cpp +++ b/src/frontends/qt/GuiFontExample.cpp @@ -4,12 +4,15 @@ * Licence details can be found in the file COPYING. * * \author John Levon + * \author Jürgen Spitzmüller * * Full author contact details are available in file CREDITS. */ #include +#include "support/qstring_helpers.h" + #include "GuiFontExample.h" #include "GuiFontMetrics.h" @@ -23,28 +26,41 @@ void GuiFontExample::set(QFont const & font, QString const & text) { font_ = font; text_ = text; + lyx::frontend::GuiFontMetrics m(font_); + // store width, ascent and descent of the font name + string_width_ = m.width(text_); + for (auto const c : lyx::fromqstr(text)) { + string_ascent_ = std::max(string_ascent_, m.ascent(c)); + string_descent_ = std::max(string_ascent_, m.descent(c)); + } update(); } QSize GuiFontExample::sizeHint() const { - lyx::frontend::GuiFontMetrics m(font_); - return QSize(m.width(text_) + 10, m.maxHeight() + 6); + return QSize(string_width_ + 10, +string_ascent_ + string_descent_ + 6); } void GuiFontExample::paintEvent(QPaintEvent *) { QPainter p; - lyx::frontend::GuiFontMetrics m(font_); p.begin(this); p.setFont(font_); - p.drawRect(0, 0, width() - 1, height() - 1); - p.drawText(5, 3 + m.maxAscent(), text_); + int const h = height() - 1; + p.drawRect(0, 0, width() - 1, h); + p.drawText(5, (h / 2) + (string_descent_ / 2), text_); p.end(); } +int GuiFontExample::minWidth() const +{ + return string_width_; +} + + //} // namespace lyx diff --git a/src/frontends/qt/GuiFontExample.h b/src/frontends/qt/GuiFontExample.h index 57862e93ee..f9b36dff2f 100644 --- a/src/frontends/qt/GuiFontExample.h +++ b/src/frontends/qt/GuiFontExample.h @@ -28,6 +28,8 @@ public: void set(QFont const & font, QString const & text); QSize sizeHint() const override; + + int minWidth() const; protected: void paintEvent(QPaintEvent * p) override; @@ -35,6 +37,9 @@ protected: private: QFont font_; QString text_; + int string_ascent_ = 0; + int string_descent_ = 0; + int string_width_ = 0; }; diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp index a0c28e413f..d531dd4cde 100644 --- a/src/frontends/qt/GuiPrefs.cpp +++ b/src/frontends/qt/GuiPrefs.cpp @@ -931,18 +931,31 @@ void PrefScreenFonts::updateScreenFontSizes(LyXRC const & rc) void PrefScreenFonts::selectRoman(const QString & name) { screenRomanFE->set(QFont(name), name); + screenFontsChanged(); } void PrefScreenFonts::selectSans(const QString & name) { screenSansFE->set(QFont(name), name); + screenFontsChanged(); } void PrefScreenFonts::selectTypewriter(const QString & name) { screenTypewriterFE->set(QFont(name), name); + screenFontsChanged(); +} + + +void PrefScreenFonts::screenFontsChanged() +{ + int w = max(screenRomanFE->minWidth(), screenSansFE->minWidth()); + w = max(screenTypewriterFE->minWidth(), w); + screenRomanFE->setFixedWidth(w); + screenSansFE->setFixedWidth(w); + screenTypewriterFE->setFixedWidth(w); } diff --git a/src/frontends/qt/GuiPrefs.h b/src/frontends/qt/GuiPrefs.h index 767b6a9c5f..21a9d43a4e 100644 --- a/src/frontends/qt/GuiPrefs.h +++ b/src/frontends/qt/GuiPrefs.h @@ -235,6 +235,7 @@ private Q_SLOTS: void selectRoman(const QString&); void selectSans(const QString&); void selectTypewriter(const QString&); + void screenFontsChanged(); public Q_SLOTS: void updateScreenFontSizes(LyXRC const & rc); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Add $$OrigAbsName placeholder to external
commit 0d3d91c0551cf3158fe89e765b4e076fcc613e73 Author: Jürgen Spitzmüller Date: Wed Mar 20 07:57:43 2024 +0100 Add $$OrigAbsName placeholder to external This produces the absolute path to the original file. Documentation will follow in die time (after documentation has been unfrozen) --- src/insets/ExternalSupport.cpp | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/insets/ExternalSupport.cpp b/src/insets/ExternalSupport.cpp index 33c14d38be..5893a5d454 100644 --- a/src/insets/ExternalSupport.cpp +++ b/src/insets/ExternalSupport.cpp @@ -106,8 +106,10 @@ string const doSubstitution(InsetExternalParams const & params, params.filename.mangledFileName() : params.filename.outputFileName(parentpath); string const basename = changeExtension( - onlyFileName(filename), string()); + onlyFileName(filename), string()); string const absname = makeAbsPath(filename, parentpath).absFileName(); + string const origabsname = makeAbsPath(params.filename.outputFileName(parentpath), + parentpath).absFileName(); if (what != ALL_BUT_PATHS) { string const filepath = onlyPath(filename); @@ -136,6 +138,10 @@ string const doSubstitution(InsetExternalParams const & params, use_latex_path, PROTECT_EXTENSION, ESCAPE_DOTS); + result = subst_path(result, "$$OrigAbsName", origabsname, + use_latex_path, + PROTECT_EXTENSION, + ESCAPE_DOTS); result = subst_path(result, "$$RelPathMaster", relToMasterPath, use_latex_path, PROTECT_EXTENSION, -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Use docstring for preview snippet all the way down
commit b1e2986df8ad819ac732e8a86b6dff09333a95ca Author: Juergen Spitzmueller Date: Sat Mar 16 11:55:17 2024 +0100 Use docstring for preview snippet all the way down No need to convert back and forth --- src/graphics/PreviewImage.cpp | 10 - src/graphics/PreviewImage.h| 4 ++-- src/graphics/PreviewLoader.cpp | 49 +- src/graphics/PreviewLoader.h | 9 src/insets/InsetText.cpp | 4 ++-- src/insets/RenderPreview.cpp | 4 ++-- src/insets/RenderPreview.h | 2 +- 7 files changed, 42 insertions(+), 40 deletions(-) diff --git a/src/graphics/PreviewImage.cpp b/src/graphics/PreviewImage.cpp index b31af6fbd9..e94384c168 100644 --- a/src/graphics/PreviewImage.cpp +++ b/src/graphics/PreviewImage.cpp @@ -32,7 +32,7 @@ class PreviewImage::Impl { public: /// Impl(PreviewImage & p, PreviewLoader & l, -string const & s, FileName const & f, double af); +docstring const & s, FileName const & f, double af); /// ~Impl(); /// @@ -47,14 +47,14 @@ public: /// Loader iloader_; /// - string const snippet_; + docstring const snippet_; /// double const ascent_frac_; }; PreviewImage::PreviewImage(PreviewLoader & l, - string const & s, + docstring const & s, FileName const & f, double af) : pimpl_(new Impl(*this, l, s, f, af)) @@ -67,7 +67,7 @@ PreviewImage::~PreviewImage() } -string const & PreviewImage::snippet() const +docstring const & PreviewImage::snippet() const { return pimpl_->snippet_; } @@ -105,7 +105,7 @@ PreviewLoader & PreviewImage::previewLoader() const } -PreviewImage::Impl::Impl(PreviewImage & p, PreviewLoader & l, string const & s, +PreviewImage::Impl::Impl(PreviewImage & p, PreviewLoader & l, docstring const & s, FileName const & bf, double af) : parent_(p), ploader_(l), iloader_(l.buffer().fileName(), bf), snippet_(s), ascent_frac_(af) diff --git a/src/graphics/PreviewImage.h b/src/graphics/PreviewImage.h index bea2553eeb..6d26748092 100644 --- a/src/graphics/PreviewImage.h +++ b/src/graphics/PreviewImage.h @@ -31,14 +31,14 @@ public: * descent = height * (1 - ascent_frac) */ PreviewImage(PreviewLoader & parent, -std::string const & latex_snippet, +docstring const & latex_snippet, support::FileName const & bitmap_file, double ascent_frac); /// ~PreviewImage(); /// - std::string const & snippet() const; + docstring const & snippet() const; /// Dimension dim() const; diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp index d39a6a8513..4c37f7a8d0 100644 --- a/src/graphics/PreviewLoader.cpp +++ b/src/graphics/PreviewLoader.cpp @@ -47,16 +47,17 @@ #include using namespace std; +using namespace lyx; using namespace lyx::support; namespace { -typedef pair SnippetPair; +typedef pair SnippetPair; // A list of all snippets to be converted to previews -typedef list PendingSnippets; +typedef list PendingSnippets; // Each item in the vector is a pair. typedef vector BitmapFile; @@ -121,7 +122,7 @@ void setAscentFractions(vector & ascent_fractions, } -std::function FindFirst(string const & comp) +std::function FindFirst(docstring const & comp) { return [](SnippetPair const & sp) { return sp.first == comp; }; } @@ -166,13 +167,13 @@ public: /// Stop any InProgress items still executing. ~Impl(); /// - PreviewImage const * preview(string const & latex_snippet) const; + PreviewImage const * preview(docstring const & latex_snippet) const; /// - PreviewLoader::Status status(string const & latex_snippet) const; + PreviewLoader::Status status(docstring const & latex_snippet) const; /// - void add(string const & latex_snippet); + void add(docstring const & latex_snippet); /// - void remove(string const & latex_snippet); + void remove(docstring const & latex_snippet); /// \p wait whether to wait for the process to complete or, instead, /// to do it in the background. void startLoading(bool wait = false); @@ -199,7 +200,7 @@ private: */ typedef std::shared_ptr PreviewImagePtr; /// - typedef map Cache; + typedef map Cache; /// Cache cache_; @@ -246,25 +247,25 @@ PreviewLoader::PreviewLoader(Buffer const & b) {} -PreviewImage const * PreviewLoader::preview(string const & latex_snippet)
[LyX features/biginset] Simplify b3fe9cb7049da
commit f9c60d477d18a73c85fd277d75aeafb8edc1fbec Author: Juergen Spitzmueller Date: Sat Mar 16 05:01:53 2024 +0100 Simplify b3fe9cb7049da --- src/graphics/PreviewLoader.cpp | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp index dc944b1929..d39a6a8513 100644 --- a/src/graphics/PreviewLoader.cpp +++ b/src/graphics/PreviewLoader.cpp @@ -852,7 +852,6 @@ void PreviewLoader::Impl::dumpData(odocstream & os, Encoding const & enc = buffer_.params().encoding(); for (; it != end; ++it) { - docstring res; bool uncodable_content = false; // check whether the content is encodable // FIXME: the preview loader should be able @@ -864,14 +863,13 @@ void PreviewLoader::Impl::dumpData(odocstream & os, << docstring(1, n) << "' in preview snippet!"); uncodable_content = true; - } else - res += n; + } } // FIXME UNICODE os << "\\begin{preview}\n"; // do not show incomplete preview if (!uncodable_content) - os << res; + os << from_utf8(it->first); os << "\n\\end{preview}\n\n"; } } -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Merge branch 'master' of git.lyx.org:lyx
commit 5f82a7a515bffd3527c9e557ebfb1e39d1705a97 Merge: 1f4238c9fb b3fe9cb704 Author: Juergen Spitzmueller Date: Sat Mar 16 04:59:08 2024 +0100 Merge branch 'master' of git.lyx.org:lyx src/graphics/PreviewLoader.cpp | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Merge branch 'master' of git.lyx.org:lyx
commit 1fca6842a57f0cf9ccefbb4be178a227895f407a Merge: 5f82a7a515 f9c60d477d Author: Juergen Spitzmueller Date: Sat Mar 16 05:03:16 2024 +0100 Merge branch 'master' of git.lyx.org:lyx src/graphics/PreviewLoader.cpp | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Prevent iconv exception in previews (#13042)
commit b3fe9cb7049daaacbcf357ba5e4ece479f7b1be4 Author: Juergen Spitzmueller Date: Sat Mar 16 04:52:51 2024 +0100 Prevent iconv exception in previews (#13042) The preview loader assumes all content is in the main document encoding. As soon as content was not encodable, LyX crashed. We now check for that and if non-encodable glyphs are found, we do not produce a preview snippet and warn. Ideally, the preview loader should be made aware of encoding changes, or we should generally use utf8 for previews. --- src/graphics/PreviewLoader.cpp | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp index a350a4939b..dc944b1929 100644 --- a/src/graphics/PreviewLoader.cpp +++ b/src/graphics/PreviewLoader.cpp @@ -849,11 +849,30 @@ void PreviewLoader::Impl::dumpData(odocstream & os, BitmapFile::const_iterator it = vec.begin(); BitmapFile::const_iterator end = vec.end(); + Encoding const & enc = buffer_.params().encoding(); + for (; it != end; ++it) { + docstring res; + bool uncodable_content = false; + // check whether the content is encodable + // FIXME: the preview loader should be able + //to handle multiple encodings + //or we should generally use utf8 + for (char_type n : from_utf8(it->first)) { + if (!enc.encodable(n)) { + LYXERR0("Uncodable character '" + << docstring(1, n) + << "' in preview snippet!"); + uncodable_content = true; + } else + res += n; + } // FIXME UNICODE - os << "\\begin{preview}\n" - << from_utf8(it->first) - << "\n\\end{preview}\n\n"; + os << "\\begin{preview}\n"; + // do not show incomplete preview + if (!uncodable_content) + os << res; + os << "\n\\end{preview}\n\n"; } } -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Add Idan Pazi to contributors list
commit 1f4238c9fb03993822c0178e9bf7056a87f44c79 Author: Juergen Spitzmueller Date: Tue Mar 12 12:53:34 2024 +0100 Add Idan Pazi to contributors list --- lib/generate_contributions.py | 8 1 file changed, 8 insertions(+) diff --git a/lib/generate_contributions.py b/lib/generate_contributions.py index bb0627fe58..3d0db11273 100755 --- a/lib/generate_contributions.py +++ b/lib/generate_contributions.py @@ -1564,6 +1564,14 @@ contributors = [ "17 November 2016", u"Module updates"), + contributor(u'Idan Pazi', + "idan.kp () gmail ! com", + "GPL", + "Re: windows preview bug fix", + "m=171024249203393", + "12 March 2024", + u"Windows-specific fixes"), + contributor(u'Bo Peng', "ben.bob () gmail ! com", "GPL", -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Fix returned value of win32file.ReadFile
commit 0fb7650786e9574d978015b8986686e10b2330e8 Author: Idan Pazi Date: Fri Feb 16 15:17:17 2024 +0200 Fix returned value of win32file.ReadFile returns an PyOVERLAPPEDReadBuffer that needs to be converted to str. --- lib/scripts/lyxpreview_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/scripts/lyxpreview_tools.py b/lib/scripts/lyxpreview_tools.py index 1a6b1c1f7f..c75563d464 100644 --- a/lib/scripts/lyxpreview_tools.py +++ b/lib/scripts/lyxpreview_tools.py @@ -165,7 +165,7 @@ def run_command_win32(cmd): try: hr, buffer = win32file.ReadFile(stdout_r, 4096) if hr != winerror.ERROR_IO_PENDING: -data = data + buffer +data = data + str(buffer) except pywintypes.error as e: if e.args[0] != winerror.ERROR_BROKEN_PIPE: -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] de/Additional: small adaptations
commit 5e5612698fa3a8393041c67a35f5f22a6053 Author: Juergen Spitzmueller Date: Fri Mar 8 09:06:26 2024 +0100 de/Additional: small adaptations --- lib/doc/de/Additional.lyx | 31 ++- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/lib/doc/de/Additional.lyx b/lib/doc/de/Additional.lyx index 4ec989b000..8aefaef5fc 100644 --- a/lib/doc/de/Additional.lyx +++ b/lib/doc/de/Additional.lyx @@ -110,6 +110,7 @@ initials \suppress_date false \justification true \use_refstyle 0 +\use_formatted_ref 0 \use_minted 0 \use_lineno 0 \notefontcolor #ff @@ -2391,19 +2392,13 @@ American Mathematical Society \begin_layout Standard Die von \SpecialChar LyX - unterstützten Klassen + unterstützten Klassen der \family sans \lang english -article (AMS) +American Mathematical Society (AMS) \family default \lang ngerman - und -\family sans -\lang english -book (AMS) -\family default -\lang ngerman - werden von der + (Aufsatz und Buch) werden von der \emph on \lang english American Mathematical Society @@ -7115,17 +7110,11 @@ Stellen Sie sicher, sample.tex \family default (und eventuell -\begin_inset Flex URL -status collapsed - -\begin_layout Plain Layout - +\family typewriter table.tex -\end_layout - -\end_inset - -) in ein eigenes Verzeichnis und versuchen Sie, +\family default +) aus der AAS\SpecialChar TeX +-Distribution in ein eigenes Verzeichnis und versuchen Sie, es mit \family typewriter latex @@ -7137,7 +7126,7 @@ latex Überzeugen Sie sich, dass die Datei \family typewriter -aastex.layout +aastex63.layout \family default im Ordner \begin_inset Flex Code @@ -7176,7 +7165,7 @@ American Astronomical Society (AASTeX V. \begin_inset space \thinspace{} \end_inset -6) +6.3.1^) \family default \lang ngerman als Auswahloption in -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Additional: Minor fix
commit 5e1dd61819980a0826ee3a46843f8a0e3c3124d5 Author: Juergen Spitzmueller Date: Fri Mar 8 09:05:57 2024 +0100 Additional: Minor fix --- lib/doc/Additional.lyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/doc/Additional.lyx b/lib/doc/Additional.lyx index 64a70724f8..a23f0b5d29 100644 --- a/lib/doc/Additional.lyx +++ b/lib/doc/Additional.lyx @@ -6988,7 +6988,7 @@ sample.tex \begin_layout Enumerate Make certain that \family typewriter -aastex631.layout +aastex63.layout \family default appears in \SpecialChar LyX 's @@ -7019,7 +7019,7 @@ American Astronomical Society (AASTeX V. \begin_inset space \thinspace{} \end_inset -631) +6.3.1) \family default appear in the class list in \family sans -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] de.po
commit 1ee04c77a7074def03cf123b73e45fc402380990 Author: Juergen Spitzmueller Date: Tue Mar 5 15:57:15 2024 +0100 de.po po/de.gmo | Bin 653451 -> 653622 bytes po/de.po | 1089 +++-- 2 files changed, 557 insertions(+), 532 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] grmpf
commit 7250f15b830aaf117ad15d37fc68b2d3634f5fa0 Author: Juergen Spitzmueller Date: Tue Mar 5 15:55:53 2024 +0100 grmpf --- lib/layouts/aastex63.layout | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/layouts/aastex63.layout b/lib/layouts/aastex63.layout index 3af56ec6a4..e2438986d7 100644 --- a/lib/layouts/aastex63.layout +++ b/lib/layouts/aastex63.layout @@ -1,5 +1,5 @@ #% Do not delete the line below; configure depends on this -#\DeclareLaTeXClass[aastex631,amssymb.sty,latexsym.sty,natbib.sty,verbatim.sty]{American Astronomical Society (AASTeX v. 6.31)} +#\DeclareLaTeXClass[aastex631,amssymb.sty,latexsym.sty,natbib.sty,verbatim.sty]{American Astronomical Society (AASTeX v. 6.3.1)} # \DeclareCategory{Articles} # # LyX support for the AAS TeX package http://www.ctan.org/pkg/aastex -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Fix lyx2lyx bug with nested inset arguments
commit de04f3270efc8d30431dffb245f976974af5720a Author: Jürgen Spitzmüller Date: Tue Mar 5 15:41:21 2024 +0100 Fix lyx2lyx bug with nested inset arguments --- lib/lyx2lyx/lyx_2_4.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py index 687c3fbfbd..baa214c9a7 100644 --- a/lib/lyx2lyx/lyx_2_4.py +++ b/lib/lyx2lyx/lyx_2_4.py @@ -30,11 +30,11 @@ from parser_tools import (count_pars_in_inset, del_complete_lines, del_token, find_end_of, find_end_of_inset, find_end_of_layout, find_token, find_token_backwards, find_token_exact, find_re, get_bool_value, get_containing_inset, get_containing_layout, get_option_value, get_value, - get_quoted_value) + get_quoted_value, is_in_inset) #del_value, #find_complete_lines, #find_re, find_substring, -#is_in_inset, set_bool_value +#set_bool_value #find_tokens, check_token from lyx2lyx_tools import (put_cmd_in_ert, add_to_preamble, insert_to_preamble, lyx2latex, @@ -1649,8 +1649,8 @@ def convert_hebrew_parentheses(document): continue elif line.startswith('\\end_inset'): if inset_is_arg: -inset_is_arg = False -else: +inset_is_arg = is_in_inset(document.body, i, "\\begin_inset Argument")[0] != -1 +else: current_insets.pop() elif current_languages[-1] == 'hebrew' and not line.startswith('\\'): document.body[i] = line.replace('(','\x00').replace(')','(').replace('\x00',')') -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Fix file name
commit 503bc42d7e70b97a81fa9706c2b51c211e14bd0e Author: Juergen Spitzmueller Date: Tue Mar 5 15:52:22 2024 +0100 Fix file name This way, we still have a string freeze break, but it is at least only one string :-( (and no, it does not matter whether the translation of this string is identical to the English string) --- lib/Makefile.am | 4 ++-- ...29.lyx => American_Astronomical_Society_%28AASTeX_v._6.3.1%29.lyx} | 0 ...29.lyx => American_Astronomical_Society_%28AASTeX_v._6.3.1%29.lyx} | 0 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index e687ab1fe7..4ad1745aa7 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -370,7 +370,7 @@ dist_examples_DATA = \ articleexamplesdir = $(pkgdatadir)/examples/Articles dist_articleexamples_DATA = \ examples/Articles/Astronomy_%26_Astrophysics.lyx \ - examples/Articles/American_Astronomical_Society_%28AASTeX_v._631%29.lyx \ + examples/Articles/American_Astronomical_Society_%28AASTeX_v._6.3.1%29.lyx \ examples/Articles/American_Chemical_Society_%28ACS%29.lyx \ examples/Articles/American_Mathematical_Society_%28AMS%29.lyx @@ -2765,7 +2765,7 @@ dist_templates_DATA = \ articletemplatesdir = $(pkgdatadir)/templates/Articles dist_articletemplates_DATA = \ - templates/Articles/American_Astronomical_Society_%28AASTeX_v._631%29.lyx \ + templates/Articles/American_Astronomical_Society_%28AASTeX_v._6.3.1%29.lyx \ templates/Articles/American_Economic_Association_%28AEA%29.lyx \ templates/Articles/American_Psychological_Association_%28APA%29.lyx \ templates/Articles/American_Psychological_Association_%28APA%29,_v._7.lyx \ diff --git a/lib/examples/Articles/American_Astronomical_Society_%28AASTeX_v._631%29.lyx b/lib/examples/Articles/American_Astronomical_Society_%28AASTeX_v._6.3.1%29.lyx similarity index 100% rename from lib/examples/Articles/American_Astronomical_Society_%28AASTeX_v._631%29.lyx rename to lib/examples/Articles/American_Astronomical_Society_%28AASTeX_v._6.3.1%29.lyx diff --git a/lib/templates/Articles/American_Astronomical_Society_%28AASTeX_v._631%29.lyx b/lib/templates/Articles/American_Astronomical_Society_%28AASTeX_v._6.3.1%29.lyx similarity index 100% rename from lib/templates/Articles/American_Astronomical_Society_%28AASTeX_v._631%29.lyx rename to lib/templates/Articles/American_Astronomical_Society_%28AASTeX_v._6.3.1%29.lyx -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX features/biginset] Amend e530f71f8f33bc0
commit a48e32fbe6374d357723d2a9f3cb55d7896c41de Author: Jürgen Spitzmüller Date: Tue Mar 5 15:30:17 2024 +0100 Amend e530f71f8f33bc0 I suppose the template file should not have been deleted, but moved. --- lib/Makefile.am| 4 +- ...an_Astronomical_Society_%28AASTeX_v._6.2%29.lyx | 460 + 2 files changed, 462 insertions(+), 2 deletions(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index dbfe2a98d2..e687ab1fe7 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -2466,7 +2466,7 @@ dist_layouts_DATA =\ layouts/aastex.layout \ layouts/aastex6.layout \ layouts/aastex62.layout \ - layouts/aastex631.layout \ + layouts/aastex63.layout \ layouts/achemso.layout \ layouts/acm-sigs.layout \ layouts/acm-sigs-alt.layout \ @@ -2855,7 +2855,7 @@ dist_obsoletetemplates_DATA = \ templates/Obsolete/ACM_SIGPLAN_%28Obsolete%29.lyx \ templates/Obsolete/ACM_SIG_Proceedings_%28SP,_Obsolete%29.lyx \ templates/Obsolete/American_Astronomical_Society_%28AASTeX_v._6%29.lyx \ - templates/Articles/American_Astronomical_Society_%28AASTeX_v._6.2%29.lyx \ + templates/Obsolete/American_Astronomical_Society_%28AASTeX_v._6.2%29.lyx \ templates/Obsolete/American_Geophysical_Union_%28AGUTeX%29.lyx \ templates/Obsolete/American_Psychological_Association_%28APA%29,_v._6.lyx \ templates/Obsolete/Latex8_Article_%28Obsolete%29.lyx diff --git a/lib/templates/Obsolete/American_Astronomical_Society_%28AASTeX_v._6.2%29.lyx b/lib/templates/Obsolete/American_Astronomical_Society_%28AASTeX_v._6.2%29.lyx new file mode 100644 index 00..21f8ea4fef --- /dev/null +++ b/lib/templates/Obsolete/American_Astronomical_Society_%28AASTeX_v._6.2%29.lyx @@ -0,0 +1,460 @@ +#LyX 2.4 created this file. For more info see https://www.lyx.org/ +\lyxformat 620 +\begin_document +\begin_header +\save_transient_properties true +\origin /systemlyxdir/templates/Articles/ +\textclass aastex62 +\begin_preamble +\received{January 1, 2018} +\revised{January 7, 2018} +\accepted{\today} +\submitjournal{ApJ} + +\shorttitle{} +\shortauthors{} +\end_preamble +\use_default_options true +\maintain_unincluded_children no +\language english +\language_package default +\inputencoding utf8 +\fontencoding auto +\font_roman "default" "default" +\font_sans "default" "default" +\font_typewriter "default" "default" +\font_math "auto" "auto" +\font_default_family default +\use_non_tex_fonts false +\font_sc false +\font_roman_osf false +\font_sans_osf false +\font_typewriter_osf false +\font_sf_scale 100 100 +\font_tt_scale 100 100 +\use_microtype false +\use_dash_ligatures false +\graphics default +\default_output_format default +\output_sync 0 +\bibtex_command default +\index_command default +\float_placement class +\float_alignment class +\paperfontsize default +\spacing single +\use_hyperref false +\papersize default +\use_geometry false +\use_package amsmath 1 +\use_package amssymb 1 +\use_package cancel 1 +\use_package esint 1 +\use_package mathdots 1 +\use_package mathtools 1 +\use_package mhchem 1 +\use_package stackrel 1 +\use_package stmaryrd 1 +\use_package undertilde 1 +\cite_engine natbib +\cite_engine_type authoryear +\biblio_style plainnat +\use_bibtopic false +\use_indices false +\paperorientation portrait +\suppress_date false +\justification true +\use_refstyle 0 +\use_minted 0 +\use_lineno 0 +\index Index +\shortcut idx +\color #008000 +\end_index +\secnumdepth 3 +\tocdepth 0 +\paragraph_separation indent +\paragraph_indentation default +\is_math_indent 0 +\math_numbering_side default +\quotes_style english +\dynamic_quotes 0 +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tablestyle default +\tracking_changes false +\output_changes false +\change_bars false +\postpone_fragile_content false +\html_math_output 0 +\html_css_as_file 0 +\html_be_strict false +\docbook_table_output 0 +\docbook_mathml_prefix 1 +\end_header + +\begin_body + +\begin_layout Standard +\begin_inset Note Note +status open + +\begin_layout Plain Layout +\noindent +\align left +Template for contributions to journals of the American Astronomical Society (AAS). +\end_layout + +\begin_layout Plain Layout +\noindent +\align left +Please consult the +\begin_inset CommandInset href +LatexCommand href +name "AASTeX user guide" +target "http://journals.aas.org/authors/aastex/aasguide.html; +literal "false" + +\end_inset + + for details on how to use AASTeX. + +\end_layout + +\begin_layout Plain Layout +\noindent +\align left +A LyX sample document is available under +\family sans +File>Open>Examples>aas_sample.lyx +\family default +. + An up-to-date sample LaTeX article using AASTeX is available under +\begin_inset Flex URL +status open + +\begin_layout Plain Layout + +http://journals.aas.org/authors/aastex/aastex.html#_download +\end_layout + +\end_inset + +. +\end_layout + +\end_inset + +
[LyX features/biginset] Do not \cprotect in table cells
commit 88a2414839f7dd29ae086482612c001b72a61ebe Author: Juergen Spitzmueller Date: Fri Mar 1 07:18:28 2024 +0100 Do not \cprotect in table cells --- src/Paragraph.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 1d4861e64e..49713a8b9a 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -4284,9 +4284,10 @@ bool Paragraph::isHardHyphenOrApostrophe(pos_type pos) const bool Paragraph::needsCProtection(bool const fragile) const { // first check the layout of the paragraph, but only in insets + // and not in tables InsetText const * textinset = inInset().asInsetText(); bool const maintext = textinset - ? textinset->text().isMainText() + ? textinset->text().isMainText() || inInset().lyxCode() == CELL_CODE : false; if (!maintext && layout().needcprotect) { -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.x] Couple of corrections in RELEASE-NOTES (mainly typos)
commit d35288f4cd4359bde642473889fa28ad560cd7bc Author: Juergen Spitzmueller Date: Fri Apr 5 13:44:19 2024 +0200 Couple of corrections in RELEASE-NOTES (mainly typos) --- lib/RELEASE-NOTES | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/RELEASE-NOTES b/lib/RELEASE-NOTES index 3273085211..7b103e6f93 100644 --- a/lib/RELEASE-NOTES +++ b/lib/RELEASE-NOTES @@ -35,7 +35,7 @@ * Continuous spellcheck is now on by default, but only if the user does not have an existing preferences file. In that case, the old setting is preserved. -* Document (or selection statistics) is now shown in status bar and can be +* Document (or selection) statistics is now shown in status bar and can be disabled by the context menu. * The actual enabled state of the synchronize TeX output option of the document @@ -44,11 +44,11 @@ * When using the document compare function, there is now an option to display the differences using a special "Document Compare" author. -* InsetRef now supports starred commands. The starred commands stop hyperref from - creating a link (and are only available when hyperref is used). There is a - checkbox "No Hyperlink" for this purpose. +* The cross reference inset now supports starred commands. The starred commands + stop hyperref from creating a link (and are only available when hyperref is used). + There is a checkbox "No Hyperlink" for this purpose. -* Alt-Escape can be used to 'float' and redock widgets like the table of contents +* Alt-Escape can be used to 'float' and redock widgets such as the table of contents or source view. * Edit > Paste operation now preserves newlines in text by default. @@ -109,10 +109,11 @@ be found when processing your documents. Package maintainers of distributions (e.g. openSUSE or Debian derivates) where ghostscript conversions of ImageMagick are banned can simply - add dependencies for poppler-utils and libtiff-tools to workaround + add dependencies for poppler-utils and libtiff-tools to work around the problem. -* LyX now supports hebrew and hungarian quotation styles. +* LyX now supports Hebrew and Hungarian quotation styles. + !!!The following pref variables were added in 2.4: @@ -138,6 +139,7 @@ !!!The following pref variables were changed in 2.4: +* none. !!!The following pref variables are obsoleted in 2.4: @@ -251,6 +253,7 @@ * date-insert: obsoleted by info-insert date. + !!!The following LyX function has been added and then removed in 2.4 development cycle. * bidi: used as a first solution to provide icons that change @@ -281,6 +284,7 @@ !!!The following preferences files have been removed from the tarball in 2.4: +* none. !!!The following metadata files have been added to the tarball in 2.4: @@ -300,6 +304,7 @@ * The dependency on sgmltools was dropped, see DocBook 5 section. + !!! Dependencies to generate ePub files: * The DocBook XSLT 1.0 style sheets are a required dependency to generate @@ -368,6 +373,7 @@ or layout and argument to the appropriate list, or dictionary in the function "convert_hebrew_parentheses(document)" in lyx_2_4.py. + !! If upgrading from a LyX version before 2.3.0 * Please additionally see the release notes from the versions in-between: -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] de.po
commit 16fb7ae52d751d582ee926cff93bf9fc6d8265f3 Author: Juergen Spitzmueller Date: Thu Apr 4 17:17:05 2024 +0200 de.po --- po/de.gmo | Bin 653622 -> 653743 bytes po/de.po | 160 +++--- 2 files changed, 80 insertions(+), 80 deletions(-) diff --git a/po/de.gmo b/po/de.gmo index 9fc86c4547..f00b3460ae 100644 Binary files a/po/de.gmo and b/po/de.gmo differ diff --git a/po/de.po b/po/de.po index 39ec99ea70..5438bf69e0 100644 --- a/po/de.po +++ b/po/de.po @@ -95,8 +95,8 @@ msgid "" msgstr "" "Project-Id-Version: LyX 2.4git\n" "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n" -"POT-Creation-Date: 2024-04-03 08:54+0200\n" -"PO-Revision-Date: 2024-04-03 09:10+0200\n" +"POT-Creation-Date: 2024-04-04 17:13+0200\n" +"PO-Revision-Date: 2024-04-04 17:15+0200\n" "Last-Translator: Juergen Spitzmueller \n" "Language-Team: German \n" "Language: de\n" @@ -1112,7 +1112,7 @@ msgstr "S:" #: lib/layouts/europasscv.layout:483 lib/layouts/europecv.layout:322 #: lib/layouts/europecv.layout:328 lib/layouts/moderncv.layout:581 #: src/frontends/qt/GuiDocument.cpp:1831 src/frontends/qt/GuiPrefs.cpp:2324 -#: src/frontends/qt/Menus.cpp:955 +#: src/frontends/qt/Menus.cpp:1024 msgid "Language" msgstr "Sprache" @@ -7617,8 +7617,8 @@ msgstr "Zusammenfassung" msgid "Summary ##" msgstr "Zusammenfassung ##" -#: lib/layouts/AEA.layout:356 src/frontends/qt/Menus.cpp:1823 -#: src/frontends/qt/Menus.cpp:1838 +#: lib/layouts/AEA.layout:356 src/frontends/qt/Menus.cpp:1892 +#: src/frontends/qt/Menus.cpp:1907 msgid "Caption" msgstr "Legende" @@ -21223,7 +21223,7 @@ msgid "Insert Sortkey|k" msgstr "Sortierschlüssel einfügen|r" #: lib/ui/stdcontext.inc:653 -msgid "Insert See Reference|c" +msgid "Insert See Reference|cf" msgstr "\"Siehe\"-Verweis einfügen|w" #: lib/ui/stdcontext.inc:654 @@ -35662,10 +35662,10 @@ msgstr "" "Schieber, Strg-+/- oder Umschalt-Mausrad." #: src/frontends/qt/GuiView.cpp:733 src/frontends/qt/GuiView.cpp:844 -#: src/frontends/qt/GuiView.cpp:1031 src/frontends/qt/Menus.cpp:1862 -#: src/frontends/qt/Menus.cpp:1866 src/frontends/qt/Menus.cpp:1870 -#: src/frontends/qt/Menus.cpp:1874 src/frontends/qt/Menus.cpp:1878 -#: src/frontends/qt/Menus.cpp:1882 +#: src/frontends/qt/GuiView.cpp:1031 src/frontends/qt/Menus.cpp:1931 +#: src/frontends/qt/Menus.cpp:1935 src/frontends/qt/Menus.cpp:1939 +#: src/frontends/qt/Menus.cpp:1943 src/frontends/qt/Menus.cpp:1947 +#: src/frontends/qt/Menus.cpp:1951 msgid "[[ZOOM]]%1$d%" msgstr "%1$d%" @@ -36335,27 +36335,27 @@ msgstr "Quelltext-Vorschau" msgid "%1[[preview format name]] Preview" msgstr "%1-Vorschau" -#: src/frontends/qt/GuiWorkArea.cpp:1582 +#: src/frontends/qt/GuiWorkArea.cpp:1584 msgid "Close File" msgstr "Datei schließen" -#: src/frontends/qt/GuiWorkArea.cpp:2120 +#: src/frontends/qt/GuiWorkArea.cpp:2122 msgid "%1 (read only)" msgstr "%1 (schreibgeschützt)" -#: src/frontends/qt/GuiWorkArea.cpp:2128 +#: src/frontends/qt/GuiWorkArea.cpp:2130 msgid "%1 (modified externally)" msgstr "%1 (extern bearbeitet)" -#: src/frontends/qt/GuiWorkArea.cpp:2151 +#: src/frontends/qt/GuiWorkArea.cpp:2153 msgid " Tab" msgstr "Unterfenster " -#: src/frontends/qt/GuiWorkArea.cpp:2157 +#: src/frontends/qt/GuiWorkArea.cpp:2159 msgid " Tab" msgstr "Unterfenster ßen" -#: src/frontends/qt/GuiWorkArea.cpp:2197 +#: src/frontends/qt/GuiWorkArea.cpp:2199 msgid "The file %1 changed on disk." msgstr "Die Datei %1 wurde auf der Festplatte verändert." @@ -36386,269 +36386,269 @@ msgstr "Geben Sie Zeichen zum Filtern der Absatzformatliste ein." msgid "%1$s (unknown)" msgstr "%1$s (unbekannt)" -#: src/frontends/qt/Menus.cpp:752 +#: src/frontends/qt/Menus.cpp:765 msgid "More...|M" msgstr "Mehr...|M" -#: src/frontends/qt/Menus.cpp:834 +#: src/frontends/qt/Menus.cpp:903 msgid "No Group" msgstr "Keine Gruppe" -#: src/frontends/qt/Menus.cpp:864 src/frontends/qt/Menus.cpp:865 +#: src/frontends/qt/Menus.cpp:933 src/frontends/qt/Menus.cpp:934 msgid "More Spelling Suggestions" msgstr "Weitere Rechtschreibvorschläge" -#: src/frontends/qt/Menus.cpp:889 +#: src/frontends/qt/Menus.cpp:958 msgid "Add to personal dictionary|r" msgstr "Zum persönlichen Wörterbuch hinzufügen|ö" -#: src/frontends/qt/Menus.cpp:891 +#: src/frontends/qt/Menus.cpp:960 msgid "Ignore this occurrence|o" msgstr "An dieser Stelle ignorieren|g" -#: src/fro
[LyX/master] Allow for multiple accelerator alternatives
commit aa7ff14933d4850f2b98bd3b78a9d2b3cee3ee82 Author: Juergen Spitzmueller Date: Thu Apr 4 17:12:48 2024 +0200 Allow for multiple accelerator alternatives This needs some testing before it could go to 2.4.x eventually --- README.localization| 10 lib/ui/stdcontext.inc | 2 +- src/frontends/qt/Menus.cpp | 124 ++--- 3 files changed, 106 insertions(+), 30 deletions(-) diff --git a/README.localization b/README.localization index 7e4d3d7cdb..2f1b3512df 100644 --- a/README.localization +++ b/README.localization @@ -64,6 +64,16 @@ These chars should be somehow used in your translations, however you'll have to invent your own working shortcuts for dialog and menu entries and resolve possible conflicts of the same shortcut chars in one menu... +You will be informed about conflicts in the terminal if you try to access the +menu. + +Note that, in the case of '|', if more than one character follows, this means +that LyX will try each of them in turn and use the first one that is not yet +used by another entry in the menu. That way, you can define alternative shortcuts +in the case one works in one context only, and another one only in another. You +can use this possibility also in translations, but please use it only if no +single shortcut that fits could be found. + Note also that there are already used global shortcuts (such as p k x c m s a) and you should avoid using these characters for first-level menu shortcuts. diff --git a/lib/ui/stdcontext.inc b/lib/ui/stdcontext.inc index dc49f44c77..32d76e603e 100644 --- a/lib/ui/stdcontext.inc +++ b/lib/ui/stdcontext.inc @@ -650,7 +650,7 @@ Menuset Menu "context-edit-index" OptItem "Insert Subentry|n" "indexmacro-insert subentry" OptItem "Insert Sortkey|k" "indexmacro-insert sortkey" - OptItem "Insert See Reference|c" "indexmacro-insert see" + OptItem "Insert See Reference|cf" "indexmacro-insert see" OptItem "Insert See also Reference|a" "indexmacro-insert seealso" End diff --git a/src/frontends/qt/Menus.cpp b/src/frontends/qt/Menus.cpp index 4a09a1b4a7..193e2478fa 100644 --- a/src/frontends/qt/Menus.cpp +++ b/src/frontends/qt/Menus.cpp @@ -233,10 +233,19 @@ public: } /// The keyboard shortcut (usually underlined in the entry) - QString shortcut() const + /// If \p first is true, return only the first character + /// if a multi-character string has been defined. + QString shortcut(bool first = false) const { int const index = label_.lastIndexOf('|'); - return index == -1 ? QString() : label_.mid(index + 1); + if (index == -1) + return QString(); + QString accelerators = label_.mid(index + 1); + if (accelerators.size() == 1) + return accelerators; + if (first) + return accelerators.left(1); + return accelerators; } /// The complete label, with label and shortcut separated by a '|' QString fulllabel() const { return label_; } @@ -349,8 +358,12 @@ public: /// Checks the associated FuncRequest status before adding the /// menu item. void addWithStatusCheck(MenuItem const &); - // Check whether the menu shortcuts are unique - void checkShortcuts() const; + /// Check whether the shortcut of \p mi are unique and valid, and report if not + void checkShortcutUnique(MenuItem const & mi) const; + /// Return true if a \p sc is a unique shortcut + bool checkShortcut(QString const sc) const; + /// Try to find a unique shortcut from a string of alternatives + QString getBestShortcut(MenuItem const & mi) const; /// void expandLastfiles(); void expandDocuments(); @@ -760,28 +773,84 @@ void MenuDefinition::cat(MenuDefinition const & other) } -void MenuDefinition::checkShortcuts() const +QString MenuDefinition::getBestShortcut(MenuItem const & mi) const { - // This is a quadratic algorithm, but we do not care because - // menus are short enough - for (const_iterator it1 = begin(); it1 != end(); ++it1) { - QString shortcut = it1->shortcut(); - if (shortcut.isEmpty()) - continue; - if (!it1->label().contains(shortcut)) + // This might be a string of accelerators, a single accelerator + // or empty + QString accelerators = mi.shortcut(); + QString const label = mi.label(); + if (accelerators.size() == 0) + return QString(); + if (accelerators.size() == 1) { + // check and report clashes +
[LyX/2.4.1-devel] Add status file
commit 3034a150f20f9bc7d6a31d7b24560c1821d7aa4e Author: Juergen Spitzmueller Date: Wed Apr 3 09:35:12 2024 +0200 Add status file --- status.24x | 87 ++ 1 file changed, 87 insertions(+) diff --git a/status.24x b/status.24x new file mode 100644 index 00..90d1af4b9c --- /dev/null +++ b/status.24x @@ -0,0 +1,87 @@ +-*- text -*- + +This file describes what has been done in the preparation of LyX 2.4.1. +All comments are welcome. + +We try to group things by topic and in decreasing order of importance. +Please feel free to re-arrange if that seems like a good idea. + + +What's new +== + +** Updates: +*** + +* DOCUMENT INPUT/OUTPUT + + + + +* MISCELLANEOUS + + + +* TEX2LYX IMPROVEMENTS + + + +* USER INTERFACE + +- Add plain single quote to menu (bug 13025). + +- In context menus, more items are now shown on top level. + + +* DOCUMENTATION AND LOCALIZATION + +- Clarify quote-insert LFUN. + + +* BUILD/INSTALLATION + +- Fix cmake build with qt6 (macos), which did not include + "plugins". + + +** Bug fixes: +* + +* DOCUMENT INPUT/OUTPUT + + + +* USER INTERFACE + + + +* INTERNALS + + + +* DOCUMENTATION AND LOCALIZATION + + +* LYX2LYX + + + +* TEX2LYX + + + +* LYXHTML + + + +* ADVANCED FIND AND REPLACE + +- Handle neg-spaces like normal space if searching without format. + +- No paragraph indentation in search and replace windows (bug 11555). + + +* BUILD/INSTALLATION + +- Cmake build: Handle deprecated cmake versions. + -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.4.1-devel] de.po
commit b506306e08a54597617708dfe27c92a232e1833c Author: Juergen Spitzmueller Date: Wed Apr 3 09:19:14 2024 +0200 de.po --- po/de.po | 236 --- 1 file changed, 120 insertions(+), 116 deletions(-) diff --git a/po/de.po b/po/de.po index 05d45a6895..beae59b0cd 100644 --- a/po/de.po +++ b/po/de.po @@ -95,8 +95,8 @@ msgid "" msgstr "" "Project-Id-Version: LyX 2.4git\n" "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n" -"POT-Creation-Date: 2024-04-02 09:12+0200\n" -"PO-Revision-Date: 2024-04-02 09:14+0200\n" +"POT-Creation-Date: 2024-04-03 09:16+0200\n" +"PO-Revision-Date: 2024-04-03 09:18+0200\n" "Last-Translator: Juergen Spitzmueller \n" "Language-Team: German \n" "Language: de\n" @@ -1112,7 +1112,7 @@ msgstr "S:" #: lib/layouts/europasscv.layout:483 lib/layouts/europecv.layout:322 #: lib/layouts/europecv.layout:328 lib/layouts/moderncv.layout:581 #: src/frontends/qt/GuiDocument.cpp:1831 src/frontends/qt/GuiPrefs.cpp:2324 -#: src/frontends/qt/Menus.cpp:936 +#: src/frontends/qt/Menus.cpp:955 msgid "Language" msgstr "Sprache" @@ -1741,25 +1741,25 @@ msgid "Case " msgstr "ß-/Kleinschreibung beachten" #: src/frontends/qt/ui/FindAndReplaceUi.ui:205 -#: src/frontends/qt/FindAndReplace.cpp:716 +#: src/frontends/qt/FindAndReplace.cpp:719 msgid "Find next occurrence (Enter, backwards: Shift+Enter)" msgstr "" "Suche nächsten Treffer (Eingabetaste; rückwärts: Umschalt+Eingabetaste)" #: src/frontends/qt/ui/FindAndReplaceUi.ui:208 -#: src/frontends/qt/ui/SearchUi.ui:190 src/frontends/qt/FindAndReplace.cpp:715 +#: src/frontends/qt/ui/SearchUi.ui:190 src/frontends/qt/FindAndReplace.cpp:718 msgid "Find &>" msgstr "Suchen &>" #: src/frontends/qt/ui/FindAndReplaceUi.ui:221 -#: src/frontends/qt/FindAndReplace.cpp:718 +#: src/frontends/qt/FindAndReplace.cpp:721 msgid "Replace and find next occurrence (Enter, backwards: Shift+Enter)" msgstr "" "Ersetze und suche nächsten Treffer (Eingabetaste; rückwärts: " "Umschalt+Eingabetaste)" #: src/frontends/qt/ui/FindAndReplaceUi.ui:224 -#: src/frontends/qt/FindAndReplace.cpp:717 +#: src/frontends/qt/FindAndReplace.cpp:720 msgid "Rep >" msgstr "Erse >" @@ -5568,7 +5568,7 @@ msgstr "Ohne Hyperlink " msgid "Find previous occurrence (Shift+Enter)" msgstr "Vorhergehender Treffer (Umschalt+Eingabe)" -#: src/frontends/qt/ui/SearchUi.ui:55 src/frontends/qt/FindAndReplace.cpp:710 +#: src/frontends/qt/ui/SearchUi.ui:55 src/frontends/qt/FindAndReplace.cpp:713 msgid "&< Find" msgstr "&< Suchen" @@ -7617,8 +7617,8 @@ msgstr "Zusammenfassung" msgid "Summary ##" msgstr "Zusammenfassung ##" -#: lib/layouts/AEA.layout:356 src/frontends/qt/Menus.cpp:1804 -#: src/frontends/qt/Menus.cpp:1819 +#: lib/layouts/AEA.layout:356 src/frontends/qt/Menus.cpp:1823 +#: src/frontends/qt/Menus.cpp:1838 msgid "Caption" msgstr "Legende" @@ -20646,7 +20646,7 @@ msgid "Comment|m" msgstr "Kommentar|K" #: lib/ui/stdcontext.inc:237 lib/ui/stdmenus.inc:548 -msgid "Greyed Out|G" +msgid "Greyed Out|y" msgstr "Grauschrift|G" #: lib/ui/stdcontext.inc:239 @@ -20898,8 +20898,8 @@ msgid "End Editing Externally" msgstr "Externe Bearbeitung beenden" #: lib/ui/stdcontext.inc:381 -msgid "Split Inset|t" -msgstr "Einfügung spalten|f" +msgid "Split Inset|i" +msgstr "Einfügung spalten|ü" #: lib/ui/stdcontext.inc:383 msgid "Jump Back to Saved Bookmark|B" @@ -20910,7 +20910,7 @@ msgid "Forward Search|F" msgstr "Vorwärtssuche|V" #: lib/ui/stdcontext.inc:386 lib/ui/stdmenus.inc:120 -msgid "Move Paragraph Up|o" +msgid "Move Paragraph Up|h" msgstr "Absatz nach oben verschieben|o" #: lib/ui/stdcontext.inc:387 lib/ui/stdmenus.inc:121 @@ -20949,9 +20949,9 @@ msgstr "Änderung ablehnen|b" msgid "Text Properties|x" msgstr "Texteigenschaften|x" -#: lib/ui/stdcontext.inc:402 lib/ui/stdmenus.inc:125 -msgid "Custom Text Styles|S" -msgstr "Spezifische Textstile|T" +#: lib/ui/stdcontext.inc:402 +msgid "Custom Text Styles|y" +msgstr "Spezifische Textstile|f" #: lib/ui/stdcontext.inc:403 lib/ui/stdmenus.inc:123 msgid "Paragraph Settings...|P" @@ -21215,7 +21215,7 @@ msgid "Custom Page Formatting...|u" msgstr "Benutzerdefinierter Seitenverweis...|u" #: lib/ui/stdcontext.inc:651 -msgid "Insert Subentry|b" +msgid "Insert Subentry|n&qu
[LyX/2.4.1-devel] Smarter menu length calculation
commit c92d14e8c978372d24fccbc0a0fe8284f4f8601c Author: Juergen Spitzmueller Date: Tue Apr 2 14:41:54 2024 +0200 Smarter menu length calculation It is possible I have missed some shortcut conflicts, so please report if you find any. (cherry picked from commit f3a4602c4c1eca9bc79e7ba0b58395b79eafe9db) --- lib/ui/stdcontext.inc | 6 +++--- lib/ui/stdmenus.inc| 4 ++-- src/frontends/qt/Menus.cpp | 43 +-- 3 files changed, 38 insertions(+), 15 deletions(-) diff --git a/lib/ui/stdcontext.inc b/lib/ui/stdcontext.inc index 6d4fc75703..90a4cda1aa 100644 --- a/lib/ui/stdcontext.inc +++ b/lib/ui/stdcontext.inc @@ -234,10 +234,10 @@ Menuset Menu "context-note" Item "LyX Note|N" "inset-modify note Note Note" Item "Comment|m" "inset-modify note Note Comment" - Item "Greyed Out|G" "inset-modify note Note Greyedout" + Item "Greyed Out|y" "inset-modify note Note Greyedout" Separator Item "Open All Notes|A" "inset-forall Note inset-toggle open" - Item "Close All Notes|l" "inset-forall Note inset-toggle close" + Item "Close All Notes|o" "inset-forall Note inset-toggle close" End # @@ -383,7 +383,7 @@ Menuset Item "Jump Back to Saved Bookmark|B" "bookmark-goto 0" OptItem "Forward Search|F" "forward-search" Separator - Item "Move Paragraph Up|o" "paragraph-move-up" + Item "Move Paragraph Up|h" "paragraph-move-up" Item "Move Paragraph Down|v" "paragraph-move-down" Separator EnvironmentSeparatorsContext diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc index 7d7750cc03..14c927dc06 100644 --- a/lib/ui/stdmenus.inc +++ b/lib/ui/stdmenus.inc @@ -117,7 +117,7 @@ Menuset Item "Find & Replace (Quick)...|F" "dialog-show findreplace" Item "Find & Replace (Advanced)..." "dialog-show findreplaceadv" Separator - Item "Move Paragraph Up|o" "paragraph-move-up" + Item "Move Paragraph Up|h" "paragraph-move-up" Item "Move Paragraph Down|v" "paragraph-move-down" Separator Item "Paragraph Settings...|P" "layout-paragraph" @@ -545,7 +545,7 @@ Menuset Menu "insert_note" Item "LyX Note|N" "note-insert Note" Item "Comment|C" "note-insert Comment" - Item "Greyed Out|G" "note-insert Greyedout" + Item "Greyed Out|y" "note-insert Greyedout" End Menu "insert_branches" diff --git a/src/frontends/qt/Menus.cpp b/src/frontends/qt/Menus.cpp index a3fc5a7ce1..6c4b08cf48 100644 --- a/src/frontends/qt/Menus.cpp +++ b/src/frontends/qt/Menus.cpp @@ -342,6 +342,8 @@ public: const; /// bool hasFunc(FuncRequest const &) const; + /// The real size of the menu considering hidden entries + int realSize() const; /// Add the menu item unconditionally void add(MenuItem const & item) { items_.push_back(item); } /// Checks the associated FuncRequest status before adding the @@ -727,6 +729,23 @@ bool MenuDefinition::hasFunc(FuncRequest const & func) const } +int MenuDefinition::realSize() const +{ + int res = 0; + for (auto const & it : *this) { + if (it.kind() == MenuItem::Submenu) + ++res; + else if (it.kind() == MenuItem::Command) { + FuncStatus status = lyx::getStatus(*it.func()); + // count only items that are actually displayed + if (!status.unknown() && (status.enabled() || !it.optional())) + ++res; + } + } + return res; +} + + void MenuDefinition::catSub(docstring const & name) { add(MenuItem(MenuItem::Submenu, @@ -867,13 +886,13 @@ void MenuDefinition::expandSpellingSuggestions(BufferView const * bv) if (i > 0) add(MenuItem(MenuItem::Separator)); docstring const arg = wl.word() + " " + from_ascii(wl.lang()->lang()); - add(MenuItem(MenuItem::Command, qt_("Add to personal dictionary|n"), +