[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"), +
[LyX/2.4.1-devel] Dissolve some shortcut conflicts in the wake of f3a4602c4c1ec
commit 3b4d9f8606f6bb90c8d64dca64b8cd2ed801bc48 Author: Juergen Spitzmueller Date: Wed Apr 3 08:28:00 2024 +0200 Dissolve some shortcut conflicts in the wake of f3a4602c4c1ec (cherry picked from commit 728175f9acdd8b67249d5403d99319557201f80c) --- 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/master] 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/master] 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/2.4.1-devel] Update German User Guide
commit ad95503c0b8e9100674361d990bca2d810daf9c9 Author: Juergen Spitzmueller Date: Wed Apr 3 07:40:56 2024 +0200 Update German User Guide --- lib/doc/de/UserGuide.lyx | 28 1 file changed, 28 insertions(+) diff --git a/lib/doc/de/UserGuide.lyx b/lib/doc/de/UserGuide.lyx index 30366aa07f..a5d30012e9 100644 --- a/lib/doc/de/UserGuide.lyx +++ b/lib/doc/de/UserGuide.lyx @@ -43818,6 +43818,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 +43833,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/2.4.1-devel] de/UserGuide: update
commit 1424c518abaaab3fa579d6c41842774a73a20f9f 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/master] 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/master] 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/master] 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/2.4.x] Fix label escaping in InsetMathRef (#12980)
commit 1dad179256a7d3f9cc0e5bf609b835c88d005c4e 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). (cherry picked from commit 98080ca0d548b754433a99f9f097054134117184) --- 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
[LyX/master] 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/master] 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/2.4.x] de/UserGuide: update
commit 334b5391ef30967bd3ef7266fe1d33fd34905d3b 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/2.4.1-devel] de.po
commit b4a93a493c17ebde04a5759dd16d3d12a63f9adf Author: Juergen Spitzmueller Date: Tue Apr 2 09:15:03 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/master] 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/master] 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/master] 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/master] 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/master] 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/master] 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/master] 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/master] 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/master] 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/master] 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/master] 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/master] 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/master] 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/master] 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/master] 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/master] 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/master] 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/master] 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/master] 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/master] 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/master] 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/master] Linguistics: resolve tracked changes
commit be209506d5ad7b1781b1996ddd8d5e8cd5b2017d Author: Juergen Spitzmueller Date: Wed Feb 28 16:16:43 2024 +0100 Linguistics: resolve tracked changes --- lib/examples/Modules/Linguistics.lyx | 1058 +- 1 file changed, 30 insertions(+), 1028 deletions(-) diff --git a/lib/examples/Modules/Linguistics.lyx b/lib/examples/Modules/Linguistics.lyx index 641f5a2699..f08d1f2ac8 100644 --- a/lib/examples/Modules/Linguistics.lyx +++ b/lib/examples/Modules/Linguistics.lyx @@ -94,6 +94,7 @@ linguistics \suppress_date false \justification true \use_refstyle 0 +\use_formatted_ref 0 \use_minted 0 \use_lineno 0 \index Index @@ -121,7 +122,6 @@ linguistics \html_be_strict false \docbook_table_output 0 \docbook_mathml_prefix 1 -\author -712698321 "Jürgen Spitzmüller" \end_header \begin_body @@ -156,30 +156,16 @@ literal "false" This paper describes some features that \SpecialChar LyX provides to linguists. It demonstrates how to use some native support in order to produce numbered examples, - -\change_inserted -712698321 1559649291 -interlinear -\change_unchanged -glosses, + interlinear glosses, OT tableaux, semantic markup, structure trees, - -\change_inserted -712698321 1561275938 -Discourse Representation Structures, - -\change_unchanged -and phonetic symbols (IPA). + Discourse Representation Structures, + and phonetic symbols (IPA). \end_layout \begin_layout Section -Aims and -\change_deleted -712698321 1559649283 -p -\change_inserted -712698321 1559649283 -P -\change_unchanged -rerequisites +Aims and Prerequisites \end_layout \begin_layout Standard @@ -251,25 +237,9 @@ literal "true" \end_inset : - This is the base package used for numbered examples -\change_inserted -712698321 1561270568 -, - -\change_unchanged - -\change_deleted -712698321 1561270570 -and -\change_unchanged -glosses -\change_inserted -712698321 1561270580 - and semantic markup -\change_unchanged -. - -\change_inserted -712698321 1689860042 + This is the base package used for numbered examples, + glosses and semantic markup. Note that at least version 2.11 of the covington package is required to use all features. -\change_unchanged - \end_layout \begin_deeper @@ -282,59 +252,6 @@ arg "covington" \end_inset . -\change_inserted -712698321 1561275950 - -\end_layout - -\end_deeper -\begin_layout Enumerate - -\change_deleted -712698321 1559635693 - -\emph on -enumitem.sty -\emph default - -\begin_inset CommandInset citation -LatexCommand cite -key "enumitem" -literal "true" - -\end_inset - -: - This package is used for the Subexamples style. - It is generally useful to alter the appearance of lists (such as -\emph on -enumerate -\emph default -, - -\emph on -itemize -\emph default -, - -\emph on -description -\emph default -). -\end_layout - -\begin_deeper -\begin_layout Itemize - -\change_deleted -712698321 1559635693 -Installed on your system: - -\begin_inset Info -type "package" -arg "enumitem" -\end_inset - -. -\change_unchanged - \end_layout \end_deeper @@ -356,11 +273,7 @@ literal "true" \emph on Meaning \emph default - character style -\change_inserted -712698321 1559635744 - and for glosses -\change_unchanged -. + character style and for glosses. The package provides context sensitive quotation marks, depending on the language in use. \end_layout @@ -375,15 +288,11 @@ arg "csquotes" \end_inset . -\change_inserted -712698321 1561276155 - \end_layout \end_deeper \begin_layout Enumerate -\change_inserted -712698321 1561276156 - \emph on drs.sty \emph default @@ -406,8 +315,6 @@ Discourse Representation Structures \begin_deeper \begin_layout Itemize - -\change_inserted -712698321 1561276156 Installed on your system: \begin_inset Info @@ -416,8 +323,6 @@ arg "drs" \end_inset . -\change_unchanged - \end_layout \end_deeper @@ -480,15 +385,11 @@ arg "forest" \end_inset . -\change_inserted -712698321 1561276162 - \end_layout \end_deeper \begin_layout Enumerate -\change_inserted -712698321 1561276195 - \emph on pict2e.sty \emph default @@ -510,8 +411,6 @@ es. \begin_deeper \begin_layout Itemize - -\change_inserted -712698321 1689942218 Installed on your system: \begin_inset Info @@ -525,8 +424,6 @@ arg "pict2e" \end_deeper \begin_layout Enumerate -\change_inserted -712698321 1689942481 - \emph on varwidth.sty \emph default @@ -544,8 +441,6 @@ literal "true" \begin_deeper \begin_layout Itemize - -\change_inserted -712698321 1689942218 Installed on your system: \begin_inset Info @@ -554,19 +449,11 @@ arg "varwidth" \end_inset . -\change_unchanged - \end_layout \end_deeper \begin_layout Section -Numbered -\change_deleted -712698321 1559649278 -e -\change_inserted -712698321 1559649278 -E -\change_u