[LyX/2.3.x] Amend 89d9334e03
commit 65c8e70588e7bbc22e0f07af2c6d9a53e9c14b93 Author: Juergen Spitzmueller Date: Sat Aug 15 08:35:26 2020 +0200 Amend 89d9334e03 This needs to be default layout, not plain layout (cherry picked from commit ea122aa8fa2381cac9858fc9dfe71062acb7218e) --- src/Text2.cpp |5 +++-- status.23x|2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Text2.cpp b/src/Text2.cpp index a16a270..60361f5 100644 --- a/src/Text2.cpp +++ b/src/Text2.cpp @@ -182,10 +182,11 @@ void Text::setLayout(pit_type start, pit_type end, for (pit_type pit = start; pit != end; ++pit) { Paragraph & par = pars_[pit]; - // Is this a separating paragraph? + // Is this a separating paragraph? If so, + // this needs to be standard layout bool const is_separator = par.size() == 1 && par.isEnvSeparator(0); - par.applyLayout(is_separator ? bp.documentClass().plainLayout() : lyxlayout); + par.applyLayout(is_separator ? bp.documentClass().defaultLayout() : lyxlayout); if (lyxlayout.margintype == MARGIN_MANUAL) par.setLabelWidthString(par.expandLabel(lyxlayout, bp)); } diff --git a/status.23x b/status.23x index aeee861..f8420a1 100644 --- a/status.23x +++ b/status.23x @@ -88,6 +88,8 @@ What's new - Do not allow editing of math package list in Document > Settings > Math Options, thus preventing a crash (bug 11931). + +- Maintain standard layout for separating paragraphs when switching layouts (bug 11936). * INTERNALS -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.3.x] Maintain plain layout for separating paragraphs when switching layouts (#11936)
commit 028593b979a70aa40ef689b17321c5f2cbd9c416 Author: Juergen Spitzmueller Date: Sat Aug 15 08:14:17 2020 +0200 Maintain plain layout for separating paragraphs when switching layouts (#11936) (cherry picked from commit 89d9334e03c311a4a7585f40ad81880304d174d4) --- src/Text2.cpp |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/Text2.cpp b/src/Text2.cpp index 71569db..a16a270 100644 --- a/src/Text2.cpp +++ b/src/Text2.cpp @@ -182,7 +182,10 @@ void Text::setLayout(pit_type start, pit_type end, for (pit_type pit = start; pit != end; ++pit) { Paragraph & par = pars_[pit]; - par.applyLayout(lyxlayout); + // Is this a separating paragraph? + bool const is_separator = par.size() == 1 + && par.isEnvSeparator(0); + par.applyLayout(is_separator ? bp.documentClass().plainLayout() : lyxlayout); if (lyxlayout.margintype == MARGIN_MANUAL) par.setLabelWidthString(par.expandLabel(lyxlayout, bp)); } -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Revert apparent accident introduced in fed71fa8c2
commit 469bc1bbe4f3cd93de1f147629ee497605ff9376 Author: Juergen Spitzmueller Date: Sat Aug 15 09:26:51 2020 +0200 Revert apparent accident introduced in fed71fa8c2 --- src/insets/InsetCitation.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/insets/InsetCitation.cpp b/src/insets/InsetCitation.cpp index 830648d..14a05a0 100644 --- a/src/insets/InsetCitation.cpp +++ b/src/insets/InsetCitation.cpp @@ -628,7 +628,7 @@ void InsetCitation::latex(otexstream & os, OutputParams const & runparams) const // check if we have to do a qualified list vector keys = getVectorFromString(cleanupWhitespace(key)); bool const qualified = cs.hasQualifiedList - && (!getParam("F").empty() + && (!getParam("pretextlist").empty() || !getParam("posttextlist").empty()); if (runparams.inulemcmd > 0) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Fixup Apa7 template
commit 80e9f7f426ae5f66c12251a8c6c6ba8a434ecaae Author: Juergen Spitzmueller Date: Sat Aug 15 09:52:35 2020 +0200 Fixup Apa7 template --- lib/Makefile.am|1 + ...n_Psychological_Association_%28APA%29,_v._7.lyx | 1337 +--- lib/templates/Articles/Figure1.pdf | Bin 0 -> 5068 bytes 3 files changed, 350 insertions(+), 988 deletions(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index da5c488..d4794f3 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -2538,6 +2538,7 @@ dist_articletemplates_DATA = \ templates/Articles/Copernicus_Publications_Manuscript_Preparation.lyx \ templates/Articles/Econometrica.lyx \ templates/Articles/Elsevier.lyx \ + templates/Articles/Figure1.pdf \ templates/Articles/Hebrew_Article_%28KOMA-Script%29.lyx \ templates/Articles/IEEE_Transactions_Computer_Society.lyx \ templates/Articles/IEEE_Transactions_Conference.lyx \ diff --git a/lib/templates/Articles/American_Psychological_Association_%28APA%29,_v._7.lyx b/lib/templates/Articles/American_Psychological_Association_%28APA%29,_v._7.lyx index bfda807..a6f608b 100644 --- a/lib/templates/Articles/American_Psychological_Association_%28APA%29,_v._7.lyx +++ b/lib/templates/Articles/American_Psychological_Association_%28APA%29,_v._7.lyx @@ -1,5 +1,5 @@ #LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 594 +\lyxformat 598 \begin_document \begin_header \save_transient_properties true @@ -37,7 +37,7 @@ %% -\usepackage{lipsum} + \usepackage{csquotes} \end_preamble @@ -121,24 +121,11 @@ \html_math_output 0 \html_css_as_file 0 \html_be_strict false +\docbook_table_output 0 \end_header \begin_body -\begin_layout Quotation -\begin_inset Note Note -status open - -\begin_layout Quotation -Content taken from texlive2020/texmf-dist/doc/latex/apa7/samples/longsample.tex - -\end_layout - -\end_inset - - -\end_layout - \begin_layout Title Sample APA-Style Document Using the \family sans @@ -165,21 +152,25 @@ Weiss \end_layout \begin_layout Abstract - -\lang latin -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -lipsum[1] -\end_layout - -\end_inset - - +This is the abstract. + This is the abstract. + This is the abstract. + This is the abstract. + This is the abstract. + This is the abstract. + This is the abstract. + This is the abstract. + This is the abstract. + This is the abstract. + This is the abstract. + This is the abstract. + This is the abstract. + This is the abstract. + This is the abstract. + This is the abstract. + This is the abstract. + This is the abstract. + \end_layout \begin_layout Keywords @@ -240,49 +231,35 @@ Correspondence concerning this article should be addressed to Daniel A. \end_layout \begin_layout Standard - -\lang latin -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -lipsum -\end_layout - -\end_inset - - -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout - -[ -\end_layout - -\end_inset - -2 -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout - -] -\end_layout - -\end_inset - - +Some text. + Some text. + Some text. + Some text. + Some text. + Some text. + Some text. + Some text. + Some text. + Some text. + Some text. + Some text. + Some text. + Some text. + Some text. + Some text. + Some text. + Some text. + Some text. + Some text. + Some text. + Some text. + \end_layout \begin_layout Standard \begin_inset CommandInset citation LatexCommand Citet -key "vonDavier2011" +key "coleridge" literal "false" \end_inset @@ -290,7 +267,7 @@ literal "false" said this, too \begin_inset CommandInset citation LatexCommand citep -key "vonDavier2011,Lassen2006" +key "coleridge,doody" literal "false" \end_inset @@ -299,50 +276,25 @@ literal "false" Further evidence comes from other sources \begin_inset CommandInset citation LatexCommand citep -key "Shotton1989,Lassen2006" +key "glashow,itzhaki" literal "false" \end_inset . + Some more text. + Some more text. + Some more text. + Some more text. + Some more text. + Some more text. + Some more text. + Some more text. + Some more text. + Some more text. + Some more text. + Some more text. -\lang latin - -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout - - -\backslash -lipsum -\end_layout - -\end_inset - - -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout - -[ -\end_layout - -\end_inset - -3 -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout - -] -\end_layout - -\end_inset - - \end_layout \begin_layout Section @@ -354,43 +306,19 @@ Participants \end_layout \begin_layout Standard - -\lang latin -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout - - -\backslash -lipsum -\end_layout - -\end_inset - - -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout - -[ -\end_layout - -\end_inse
[LyX/master] Cmake tests: Add a testcase
commit 6bcdea2b2d6bdd80367c8db2538bd0cb3ec880dc Author: Kornel Benko Date: Sat Aug 15 12:22:33 2020 +0200 Cmake tests: Add a testcase --- autotests/export/latex/languages/latinErt.lyx | 159 + 1 files changed, 159 insertions(+), 0 deletions(-) diff --git a/autotests/export/latex/languages/latinErt.lyx b/autotests/export/latex/languages/latinErt.lyx new file mode 100644 index 000..212d68e --- /dev/null +++ b/autotests/export/latex/languages/latinErt.lyx @@ -0,0 +1,159 @@ +#LyX 2.4 created this file. For more info see https://www.lyx.org/ +\lyxformat 598 +\begin_document +\begin_header +\save_transient_properties true +\origin unavailable +\textclass apa7 +\begin_preamble +%% +%% This is file `./samples/longsample.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% apa7.dtx (with options: `longsample') +%% -- +%% +%% apa7 - A LaTeX class for formatting documents in compliance with the +%% American Psychological Association's Publication Manual, 7th edition +%% +%% Copyright (C) 2020 by Daniel A. Weiss +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License (LPPL), either +%% version 1.3c of this license or (at your option) any later +%% version. The latest version of this license is in the file: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% Users may freely modify these files without permission, as long as the +%% copyright line and this statement are maintained intact. +%% +%% This work is not endorsed by, affiliated with, or probably even known +%% by, the American Psychological Association. +%% +%% -- +%% + + +\usepackage{lipsum} + +\usepackage{csquotes} +\end_preamble +\options jou +\use_default_options false +\maintain_unincluded_children no +\language american +\language_package default +\inputencoding auto-legacy +\fontencoding default +\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 true +\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 0 +\use_package cancel 0 +\use_package esint 1 +\use_package mathdots 0 +\use_package mathtools 0 +\use_package mhchem 0 +\use_package stackrel 0 +\use_package stmaryrd 0 +\use_package undertilde 0 +\cite_engine biblatex +\cite_engine_type authoryear +\biblio_style plainnat +\biblio_options sortcites=true,sorting=nyt,backend=biber +\biblatex_bibstyle apa +\biblatex_citestyle apa +\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 3 +\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 true +\html_math_output 0 +\html_css_as_file 0 +\html_be_strict false +\docbook_table_output 0 +\end_header + +\begin_body + +\begin_layout Title +Sample APA-Style Document Using the +\family sans +apa7 +\family default + Package +\end_layout + +\begin_layout Standard +said this, too . + Further evidence comes from other sources . + +\lang latin + +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +lipsum[3] +\end_layout + +\end_inset + + +\end_layout + +\end_body +\end_document -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Do not attempt to use switches around PassThur insets.
commit 0a2fce358d70ec062042b9845db3f86b4f7df2aa Author: Juergen Spitzmueller Date: Sat Aug 15 12:27:58 2020 +0200 Do not attempt to use switches around PassThur insets. This is bound to break with ERT snippets f. ex. --- src/Paragraph.cpp | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 3acdd93..e81eb2f 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1033,7 +1033,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, close = true; } - if (open_font && (!inset->inheritFont() || inset->allowMultiPar())) { + if (open_font && (!inset->inheritFont() || fontswitch_inset)) { bool lang_closed = false; // Close language if needed if (closeLanguage) { @@ -2581,14 +2581,18 @@ void Paragraph::latex(BufferParams const & bparams, && runningChange == change && change.type == Change::DELETED && !os.afterParbreak()); - bool const multipar_inset = - (c == META_INSET && getInset(i) && getInset(i)->allowMultiPar()); + // Insets where font switches are used (rather than font commands) + bool const fontswitch_inset = + c == META_INSET + && getInset(i) + && getInset(i)->allowMultiPar() + && !getInset(i)->isPassThru(); // Do we need to close the previous font? if (open_font && ((current_font != running_font || current_font.language() != running_font.language()) -|| (multipar_inset +|| (fontswitch_inset && (current_font == prev_font || current_font.language() == prev_font.language() { @@ -2676,7 +2680,7 @@ void Paragraph::latex(BufferParams const & bparams, column += 1; } otexstringstream ots; - if (!multipar_inset) { + if (!fontswitch_inset) { InsetText const * textinset = inInset().asInsetText(); bool const cprotect = textinset ? textinset->hasCProtectContent(runparams.moving_arg) @@ -2789,22 +2793,18 @@ void Paragraph::latex(BufferParams const & bparams, // so we don't close the language in those cases // (= differing isRightToLeft()). // ArabTeX, though, doesn't seem to handle this special behavior. - bool const inRLSwitch = - basefont.isRightToLeft() != running_font.isRightToLeft() + closeLanguage = basefont.isRightToLeft() != running_font.isRightToLeft() && basefont.language()->lang() != "arabic_arabtex" && running_font.language()->lang() != "arabic_arabtex"; - // Having said that, PassThru insets must be inside a font change command, - // as we do not re-open the font inside. So: - closeLanguage = !inset->isPassThru() && !inRLSwitch;; // We need to check prev_font as language changes directly at inset // will only be started inside the inset. lang_switched_at_inset = prev_font.language() != running_font.language(); } d->latexInset(bparams, os, rp, running_font, basefont, real_outerfont, open_font, - if (multipar_inset) { runningChange, style, i, column, fontswitch_inset, closeLanguage, lang_switched_at_inset); + if (fontswitch_inset) { if (open_font) { bool needPar = false; column += running_font.latexWriteEndChanges( -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Move some tests upstream, since we'll need it there
commit 0a44c1687e11d7943517ae36ee413c4a7568714d Author: Juergen Spitzmueller Date: Sat Aug 15 12:26:07 2020 +0200 Move some tests upstream, since we'll need it there --- src/Paragraph.cpp | 49 +++-- 1 files changed, 31 insertions(+), 18 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 7fd7eeb..3acdd93 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -342,7 +342,10 @@ public: Change & running_change, Layout const & style, pos_type & i, - unsigned int & column); + unsigned int & column, + bool const fontswitch_inset, + bool const closeLanguage, + bool const lang_switched_at_inset); /// void latexSpecialChar( @@ -957,7 +960,10 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, Change & running_change, Layout const & style, pos_type & i, - unsigned int & column) + unsigned int & column, + bool const fontswitch_inset, + bool const closeLanguage, + bool const lang_switched_at_inset) { Inset * inset = owner_->getInset(i); LBUFERR(inset); @@ -1028,21 +1034,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, } if (open_font && (!inset->inheritFont() || inset->allowMultiPar())) { - // Some insets cannot be inside a font change command. - // However, even such insets *can* be placed in \L or \R - // or their equivalents (for RTL language switches), - // so we don't close the language in those cases - // (= differing isRightToLeft()). - // ArabTeX, though, doesn't seem to handle this special behavior. - bool const inRLSwitch = - basefont.isRightToLeft() != running_font.isRightToLeft() - && basefont.language()->lang() != "arabic_arabtex" - && running_font.language()->lang() != "arabic_arabtex"; - // Having said that, PassThru insets must be inside a font change command, - // as we do not re-open the font inside. So: - bool const closeLanguage = !inset->isPassThru() && !inRLSwitch; bool lang_closed = false; - bool lang_switched_at_inset = false; // Close language if needed if (closeLanguage) { // We need prev_font here as language changes directly at inset @@ -1058,7 +1050,6 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, needPar, closeLanguage); column += count; lang_closed = count > 0; - lang_switched_at_inset = prev_font.language() != running_font.language(); } // Update the running_font, making sure, however, // to leave the language as it was. @@ -2788,10 +2779,32 @@ void Paragraph::latex(BufferParams const & bparams, // We need to restore parts of this after insets with // allowMultiPar() true Font const save_basefont = basefont; + Font const save_runningfont = running_font; + bool closeLanguage = false; + bool lang_switched_at_inset = false; + if (fontswitch_inset) { + // Some insets cannot be inside a font change command. + // However, even such insets *can* be placed in \L or \R + // or their equivalents (for RTL language switches), + // so we don't close the language in those cases + // (= differing isRightToLeft()). + // ArabTeX, though, doesn't seem to handle this special behavior. + bool const inRLSwitch = + basefont.isRightToLeft() != running_font.isRightToLeft() + && basefont.language()->lang() != "arabic_arabtex" + && run
[LyX/master] Fix a lang edgecase
commit dc4b11b0e92e364eedd91c081df0959839a8 Author: Juergen Spitzmueller Date: Sat Aug 15 12:28:38 2020 +0200 Fix a lang edgecase --- src/Paragraph.cpp | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index e81eb2f..54d266e 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1058,13 +1058,15 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, Font const copy_font(running_font); basefont = owner_->getLayoutFont(bparams, outerfont); running_font = basefont; - if (!closeLanguage) + if (!closeLanguage && !lang_switched_at_inset) running_font.setLanguage(copy_font.language()); // For these, we use switches, so they should be taken as // base inside the inset. basefont.fontInfo().setSize(copy_font.fontInfo().size()); basefont.fontInfo().setFamily(copy_font.fontInfo().family()); basefont.fontInfo().setSeries(copy_font.fontInfo().series()); + if (!closeLanguage && lang_switched_at_inset) + basefont.setLanguage(copy_font.language()); // Now re-do font changes in a way needed here // (using switches with multi-par insets) InsetText const * textinset = inset->asInsetText(); @@ -1074,7 +1076,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, : false; unsigned int count2 = basefont.latexWriteStartChanges(os, bparams, runparams, running_font, - basefont, true, + running_font, true, cprotect); column += count2; if (count2 == 0 && (lang_closed || lang_switched_at_inset)) @@ -2815,6 +2817,10 @@ void Paragraph::latex(BufferParams const & bparams, basefont.fontInfo().setSize(save_basefont.fontInfo().size()); basefont.fontInfo().setFamily(save_basefont.fontInfo().family()); basefont.fontInfo().setSeries(save_basefont.fontInfo().series()); + if (!closeLanguage && lang_switched_at_inset) { + basefont.setLanguage(save_basefont.language()); + running_font.setLanguage(save_runningfont.language()); + } } if (incremented) --parInline; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] de.po
commit ed28996f4230415e2249a6c8f52fc30d47056543 Author: Juergen Spitzmueller Date: Sat Aug 15 13:15:12 2020 +0200 de.po --- po/de.po | 265 +- 1 files changed, 142 insertions(+), 123 deletions(-) diff --git a/po/de.po b/po/de.po index 8dab422..20a144c 100644 --- a/po/de.po +++ b/po/de.po @@ -94,8 +94,8 @@ msgid "" msgstr "" "Project-Id-Version: LyX 2.4git\n" "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n" -"POT-Creation-Date: 2020-08-10 10:00+0200\n" -"PO-Revision-Date: 2020-08-10 10:02+0200\n" +"POT-Creation-Date: 2020-08-15 13:11+0200\n" +"PO-Revision-Date: 2020-08-15 13:14+0200\n" "Last-Translator: Jürgen Spitzmüller \n" "Language-Team: Deutsch \n" "Language: de\n" @@ -109,27 +109,40 @@ msgstr "" msgid "Version" msgstr "Version" -#: src/frontends/qt/ui/AboutUi.ui:69 -msgid "Version goes here" -msgstr "Die Versionsnummer kommt hierher" +#: src/frontends/qt/ui/AboutUi.ui:95 +msgid "Library directory" +msgstr "Systemverzeichnis" -#: src/frontends/qt/ui/AboutUi.ui:86 +#: src/frontends/qt/ui/AboutUi.ui:132 src/frontends/qt/ui/AboutUi.ui:173 +#: src/frontends/qt/GuiApplication.cpp:659 +msgid "Open" +msgstr "Öffnen" + +#: src/frontends/qt/ui/AboutUi.ui:142 +msgid "User directory" +msgstr "Benutzerverzeichnis" + +#: src/frontends/qt/ui/AboutUi.ui:187 msgid "Credits" msgstr "Mitwirkende" -#: src/frontends/qt/ui/AboutUi.ui:111 lib/layouts/apa.layout:205 +#: src/frontends/qt/ui/AboutUi.ui:212 lib/layouts/apa.layout:205 #: lib/layouts/apax.inc:314 msgid "Copyright" msgstr "Urheberrecht" -#: src/frontends/qt/ui/AboutUi.ui:136 +#: src/frontends/qt/ui/AboutUi.ui:237 msgid "Build Info" msgstr "Erstellung" -#: src/frontends/qt/ui/AboutUi.ui:161 +#: src/frontends/qt/ui/AboutUi.ui:262 msgid "Release Notes" msgstr "Versionshinweise" +#: src/frontends/qt/ui/AboutUi.ui:307 +msgid "Copy Version Info" +msgstr "Versionsinformationen kopieren" + #: src/frontends/qt/ui/BibitemUi.ui:26 src/frontends/qt/ui/BibitemUi.ui:45 msgid "The bibliography key" msgstr "Der Literaturschlüssel" @@ -1672,7 +1685,7 @@ msgstr "&Groß-/Kleinschreibung beachten" msgid "Find next occurrence [Enter]" msgstr "Nächster Treffer [Eingabe]" -#: src/frontends/qt/ui/FindAndReplaceUi.ui:150 +#: src/frontends/qt/ui/FindAndReplaceUi.ui:150 src/frontends/qt/ui/LogUi.ui:118 #: src/frontends/qt/ui/SearchUi.ui:105 msgid "Find &Next" msgstr "&Nächstes suchen" @@ -2902,35 +2915,32 @@ msgstr "Springe zur nächsten Fehlermeldung." msgid "Next &Error" msgstr "Nächster &Fehler" -#: src/frontends/qt/ui/LogUi.ui:81 +#: src/frontends/qt/ui/LogUi.ui:84 msgid "Jump to the next warning message." msgstr "Springe zur nächsten Warnmeldung." -#: src/frontends/qt/ui/LogUi.ui:84 +#: src/frontends/qt/ui/LogUi.ui:87 msgid "Next &Warning" msgstr "Nächste &Warnung" -#: src/frontends/qt/ui/LogUi.ui:95 +#: src/frontends/qt/ui/LogUi.ui:101 msgid "&Find:" msgstr "&Suchen:" -#: src/frontends/qt/ui/LogUi.ui:105 -msgid "Hit Enter to search, or click Go!" -msgstr "Drücken Sie die Enter-Taste oder klicken Sie \"Los!\" an" - -#: src/frontends/qt/ui/LogUi.ui:112 -msgid "&Go!" -msgstr "&Los!" +#: src/frontends/qt/ui/LogUi.ui:111 +msgid "Hit Enter or click 'Find Next' to search" +msgstr "" +"Um die Suche zu starten drücken Sie die Return-Taste oder ,Nächstes suchen` " -#: src/frontends/qt/ui/LogUi.ui:121 +#: src/frontends/qt/ui/LogUi.ui:130 msgid "&Open Containing Directory" msgstr "Beinhaltendes &Verzeichnis öffnen" -#: src/frontends/qt/ui/LogUi.ui:144 +#: src/frontends/qt/ui/LogUi.ui:156 msgid "Update the display" msgstr "Anzeige aktualisieren" -#: src/frontends/qt/ui/LogUi.ui:147 src/frontends/qt/ui/ViewSourceUi.ui:150 +#: src/frontends/qt/ui/LogUi.ui:159 src/frontends/qt/ui/ViewSourceUi.ui:150 #: src/frontends/qt/GuiRef.cpp:79 msgid "&Update" msgstr "A&ktualisieren" @@ -3143,39 +3153,39 @@ msgstr "&Spalten:" msgid "Resize this to the correct table dimensions" msgstr "Verändern Sie die Größe hinsichtlich der korrekten Tabellenmaße" -#: src/frontends/qt/ui/MathsUi.ui:48 +#: src/frontends/qt/ui/MathsUi.ui:51 msgid "All packages:" msgstr "Alle Pakete:" -#: src/frontends/qt/ui/MathsUi.ui:55 +#: src/frontends/qt/ui/MathsUi.ui:58 msgid "Load A&utomatically" msgstr "&Automatisch laden" -#: src/frontends/qt/ui/MathsUi.ui:62 +#: src/frontends/qt/ui/MathsUi.ui:65 msgid "Load Alwa&ys" msgstr "&Immer laden" -#: src/frontends/qt/ui/MathsUi.ui:69 +#: src/frontends/qt/ui/MathsUi.ui:72 msgid "Do &Not Load" msgstr "&Nicht laden" -#: src/frontends/qt/ui/MathsUi.ui:76 +#: src/frontends/qt/ui/MathsUi.ui:79 msgid "Indent displayed formulas instead of centering" msgstr "Abgesetzte Formeln einrücken (nicht zentrieren)" -#: src/frontends/qt/ui/MathsUi.ui:79 +#: src/frontends/qt/ui/MathsUi.ui:82 msgid "Indent &formulas" msgstr "&Formeln einrücken" -#: src/frontends/qt/ui/MathsUi.ui:95 src/frontends/qt/ui/TextLayoutUi.ui:183 +#: src/frontends/qt/ui/MathsUi.u
[LyX/master] Flag placeholder string nontranslatable
commit 6fd566fbec6494adf144cf43912666982982560e Author: Juergen Spitzmueller Date: Sat Aug 15 13:18:19 2020 +0200 Flag placeholder string nontranslatable This is just wasted efforts for the translators, as this string never appears in the GUI. --- src/frontends/qt/ui/AboutUi.ui |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt/ui/AboutUi.ui b/src/frontends/qt/ui/AboutUi.ui index fd07468..4db3359 100644 --- a/src/frontends/qt/ui/AboutUi.ui +++ b/src/frontends/qt/ui/AboutUi.ui @@ -7,7 +7,7 @@ 0 0 424 -370 +376 @@ -63,7 +63,7 @@ IBeamCursor -LyX version info goes here.
Qt version (run-time) goes here.
Qt version (compile-time) goes here.
+LyX version info goes here.
Qt version (run-time) goes here.
Qt version (compile-time) goes here.
Qt::AlignCenter @@ -107,7 +107,7 @@ IBeamCursor - Library directory goes here. + Library directory goes here. Qt::PlainText @@ -148,7 +148,7 @@ IBeamCursor - User directory goes here. + User directory goes here. Qt::PlainText -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Cmake tests: Adapt to new testcase
commit e33017a78dc01bf3d6bb45ac4550dd77df7829a6 Author: Kornel Benko Date: Sat Aug 15 14:47:37 2020 +0200 Cmake tests: Adapt to new testcase --- development/autotests/ignoredTests |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/development/autotests/ignoredTests b/development/autotests/ignoredTests index a8465b0..5d74ca2 100644 --- a/development/autotests/ignoredTests +++ b/development/autotests/ignoredTests @@ -187,6 +187,7 @@ export/export/latex/languages/supported-languages_XeTeX_.*(dvi|pdf.?|texF) export/export/latex/lyxbugs-resolved/9633-.*(dvi|pdf.?|texF) export/export/latex/lyxbugs/11522-systemfonts-Math-missingchars_pdf5_texF export/templates/Articles/American_Psychological_Association_%28APA_v\.7%29_(dvi3|pdf5)_texF +export/export/latex/languages/latinErt_(dvi3|pdf5)_texF # lyx2lyx # dedicated lyx2lyx tests -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Revert "Move some tests upstream, since we'll need it there"
commit 1c3ccc0ac22802bf5fccf35b4289fd90f317012a Author: Juergen Spitzmueller Date: Sat Aug 15 15:32:15 2020 +0200 Revert "Move some tests upstream, since we'll need it there" This reverts commit 0a44c1687e11d7943517ae36ee413c4a7568714d. --- src/Paragraph.cpp | 43 ++- 1 files changed, 18 insertions(+), 25 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index e81eb2f..6696188 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -343,9 +343,7 @@ public: Layout const & style, pos_type & i, unsigned int & column, - bool const fontswitch_inset, - bool const closeLanguage, - bool const lang_switched_at_inset); + bool const fontswitch_inset); /// void latexSpecialChar( @@ -961,9 +959,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, Layout const & style, pos_type & i, unsigned int & column, - bool const fontswitch_inset, - bool const closeLanguage, - bool const lang_switched_at_inset) + bool const fontswitch_inset) { Inset * inset = owner_->getInset(i); LBUFERR(inset); @@ -1034,7 +1030,21 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, } if (open_font && (!inset->inheritFont() || fontswitch_inset)) { + // Some insets cannot be inside a font change command. + // However, even such insets *can* be placed in \L or \R + // or their equivalents (for RTL language switches), + // so we don't close the language in those cases + // (= differing isRightToLeft()). + // ArabTeX, though, doesn't seem to handle this special behavior. + bool const inRLSwitch = + basefont.isRightToLeft() != running_font.isRightToLeft() + && basefont.language()->lang() != "arabic_arabtex" + && running_font.language()->lang() != "arabic_arabtex"; + // Having said that, PassThru insets must be inside a font change command, + // as we do not re-open the font inside. So: + bool const closeLanguage = !inset->isPassThru() && !inRLSwitch; bool lang_closed = false; + bool lang_switched_at_inset = false; // Close language if needed if (closeLanguage) { // We need prev_font here as language changes directly at inset @@ -1050,6 +1060,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, needPar, closeLanguage); column += count; lang_closed = count > 0; + lang_switched_at_inset = prev_font.language() != running_font.language(); } // Update the running_font, making sure, however, // to leave the language as it was. @@ -2783,27 +2794,9 @@ void Paragraph::latex(BufferParams const & bparams, // We need to restore parts of this after insets with // allowMultiPar() true Font const save_basefont = basefont; - Font const save_runningfont = running_font; - bool closeLanguage = false; - bool lang_switched_at_inset = false; - if (fontswitch_inset) { - // Some insets cannot be inside a font change command. - // However, even such insets *can* be placed in \L or \R - // or their equivalents (for RTL language switches), - // so we don't close the language in those cases - // (= differing isRightToLeft()). - // ArabTeX, though, doesn't seem to handle this special behavior. - closeLanguage = basefont.isRightToLeft() != running_font.isRightToLeft() - && basefont.language()->lang() != "arabic_arabtex" - && running_font.language()->lang() != "arabic_arabtex"; - // We need to check
[LyX/master] Revert "Fix a lang edgecase"
commit fb2077df118bbb0ff32f81d80150dd068efb2f3a Author: Juergen Spitzmueller Date: Sat Aug 15 15:21:19 2020 +0200 Revert "Fix a lang edgecase" This reverts commit dc4b11b0e92e364eedd91c081df0959839a8. --- src/Paragraph.cpp | 10 ++ 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 54d266e..e81eb2f 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1058,15 +1058,13 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, Font const copy_font(running_font); basefont = owner_->getLayoutFont(bparams, outerfont); running_font = basefont; - if (!closeLanguage && !lang_switched_at_inset) + if (!closeLanguage) running_font.setLanguage(copy_font.language()); // For these, we use switches, so they should be taken as // base inside the inset. basefont.fontInfo().setSize(copy_font.fontInfo().size()); basefont.fontInfo().setFamily(copy_font.fontInfo().family()); basefont.fontInfo().setSeries(copy_font.fontInfo().series()); - if (!closeLanguage && lang_switched_at_inset) - basefont.setLanguage(copy_font.language()); // Now re-do font changes in a way needed here // (using switches with multi-par insets) InsetText const * textinset = inset->asInsetText(); @@ -1076,7 +1074,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, : false; unsigned int count2 = basefont.latexWriteStartChanges(os, bparams, runparams, running_font, - running_font, true, + basefont, true, cprotect); column += count2; if (count2 == 0 && (lang_closed || lang_switched_at_inset)) @@ -2817,10 +2815,6 @@ void Paragraph::latex(BufferParams const & bparams, basefont.fontInfo().setSize(save_basefont.fontInfo().size()); basefont.fontInfo().setFamily(save_basefont.fontInfo().family()); basefont.fontInfo().setSeries(save_basefont.fontInfo().series()); - if (!closeLanguage && lang_switched_at_inset) { - basefont.setLanguage(save_basefont.language()); - running_font.setLanguage(save_runningfont.language()); - } } if (incremented) --parInline; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Cmake tests: Correct an entry (file name has changed)
commit 0d5020661036c379d044e08c3625fce35c1ccce4 Author: Kornel Benko Date: Sat Aug 15 15:57:02 2020 +0200 Cmake tests: Correct an entry (file name has changed) --- development/autotests/ignoredTests |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/development/autotests/ignoredTests b/development/autotests/ignoredTests index 5d74ca2..6a47f3f 100644 --- a/development/autotests/ignoredTests +++ b/development/autotests/ignoredTests @@ -186,7 +186,7 @@ export/export/latex/languages/supported-languages_polyglossia_.*(dvi|pdf.?|texF) export/export/latex/languages/supported-languages_XeTeX_.*(dvi|pdf.?|texF) export/export/latex/lyxbugs-resolved/9633-.*(dvi|pdf.?|texF) export/export/latex/lyxbugs/11522-systemfonts-Math-missingchars_pdf5_texF -export/templates/Articles/American_Psychological_Association_%28APA_v\.7%29_(dvi3|pdf5)_texF +export/templates/Articles/American_Psychological_Association_%28APA%29,_v\._7_(dvi3|pdf5)_texF export/export/latex/languages/latinErt_(dvi3|pdf5)_texF # lyx2lyx -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Polish About dialog
commit 5490e7545b1207e207f05d7c692f02cf4cd1ffe8 Author: Juergen Spitzmueller Date: Sat Aug 15 16:07:12 2020 +0200 Polish About dialog (this might need adaptation with HiDPI) --- src/frontends/qt/GuiAbout.cpp | 19 -- src/frontends/qt/ui/AboutUi.ui | 123 ++- 2 files changed, 82 insertions(+), 60 deletions(-) diff --git a/src/frontends/qt/GuiAbout.cpp b/src/frontends/qt/GuiAbout.cpp index 8e720df..d479029 100644 --- a/src/frontends/qt/GuiAbout.cpp +++ b/src/frontends/qt/GuiAbout.cpp @@ -258,14 +258,16 @@ static QString version() from_ascii(lyx_version), qstring_to_ucs4(loc_release_date))+"\n"; if (std::string(lyx_git_commit_hash) != "none") - version_date += _("Built from git commit hash ") + version_date += from_ascii("") + _("Built from git commit hash ") + from_utf8(lyx_git_commit_hash).substr(0,8); QString res; QTextStream out(&res); - out << toqstr(version_date) << "\n"; - out << toqstr(bformat(_("Qt Version (run-time): %1$s"), from_ascii(qVersion( << "\n"; + out << toqstr(""); + out << toqstr(version_date) << ""; + out << toqstr(bformat(_("Qt Version (run-time): %1$s"), from_ascii(qVersion( << ""; out << toqstr(bformat(_("Qt Version (compile-time): %1$s"), from_ascii(QT_VERSION_STR))); + out << toqstr(""); return res; } @@ -299,9 +301,6 @@ GuiAbout::GuiAbout(GuiView & lv) { d->ui.setupUi(this); - // fix height to minimum - setFixedHeight(sizeHint().height()); - d->ui.copyrightTB->setPlainText(copyright()); d->ui.copyrightTB->append(QString()); d->ui.copyrightTB->append(license()); @@ -309,6 +308,11 @@ GuiAbout::GuiAbout(GuiView & lv) d->ui.copyrightTB->append(disclaimer()); d->ui.versionLA->setText(version()); + QPixmap icon = getPixmap("images/", "lyx", "svg,png"); + int const iconsize = d->ui.versionLA->height() * 1.5; + d->ui.iconLA->setPixmap(icon.scaled(iconsize, iconsize, + Qt::IgnoreAspectRatio, + Qt::SmoothTransformation)); d->ui.dirLibraryLA->setText(dirLibrary()); d->ui.dirUserLA->setText(dirUser()); d->ui.buildinfoTB->setText(buildinfo()); @@ -317,6 +321,9 @@ GuiAbout::GuiAbout(GuiView & lv) d->ui.creditsTB->setHtml(credits()); d->ui.tab->setUsesScrollButtons(false); + + // fix height to minimum + setFixedHeight(sizeHint().height()); } diff --git a/src/frontends/qt/ui/AboutUi.ui b/src/frontends/qt/ui/AboutUi.ui index 4db3359..9ae795d 100644 --- a/src/frontends/qt/ui/AboutUi.ui +++ b/src/frontends/qt/ui/AboutUi.ui @@ -7,7 +7,7 @@ 0 0 424 -376 +409 @@ -16,22 +16,7 @@ true - - -9 - - -9 - - -9 - - -9 - - -6 - + @@ -41,42 +26,72 @@ Version - - -6 - - -9 - - -9 - - -9 - - -9 - - - - - IBeamCursor - - -LyX version info goes here.
Qt version (run-time) goes here.
Qt version (compile-time) goes here.
- - - Qt::AlignCenter - - - true - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - + + + + + + + + 0 + 0 + + + + + 80 + 80 + + + +LyX Icon + + + + + + +Qt::Horizontal + + +QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + + 0 + 0 + + + +IBeamCursor + + +LyX version info goes here.
Qt version (run-time) goes here.
Qt version (compile-time) goes here.
+ + +Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + +true + + +Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + - + Qt::Vertical @@ -89,7 +104,7 @@
[LyX/master] Fix deprecation warning
commit cba24bb642606bbb8c890b21e799d9f225ad9a3d Author: Juergen Spitzmueller Date: Sat Aug 15 16:06:56 2020 +0200 Fix deprecation warning --- src/frontends/qt/GuiAbout.cpp | 23 +++ 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt/GuiAbout.cpp b/src/frontends/qt/GuiAbout.cpp index 3c874df..8e720df 100644 --- a/src/frontends/qt/GuiAbout.cpp +++ b/src/frontends/qt/GuiAbout.cpp @@ -203,12 +203,27 @@ static QString buildinfo() QString res; QTextStream out(&res); out << "LyX " << lyx_version - << " (" << lyx_release_date << ")" << endl; + << " (" << lyx_release_date << ")" +#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) + << Qt::endl; +#else + << endl; +#endif if (std::string(lyx_git_commit_hash) != "none") out << qt_(" Git commit hash ") - << QString(lyx_git_commit_hash).left(8) << endl; - - out << lyx_version_info << endl; + << QString(lyx_git_commit_hash).left(8) +#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) + << Qt::endl; +#else + << endl; +#endif + + out << lyx_version_info +#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) + << Qt::endl; +#else + << endl; +#endif return res; } -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Only exclude ERT from language switch doing
commit 3c5c41ddc2d4a4f30d5ad27ea3dcd679b7a4db24 Author: Juergen Spitzmueller Date: Sat Aug 15 16:46:18 2020 +0200 Only exclude ERT from language switch doing --- src/Paragraph.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 6696188..7b46d1e 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -2597,7 +2597,7 @@ void Paragraph::latex(BufferParams const & bparams, c == META_INSET && getInset(i) && getInset(i)->allowMultiPar() - && !getInset(i)->isPassThru(); + && getInset(i)->lyxCode() != ERT_CODE; // Do we need to close the previous font? if (open_font && -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Trim endline whitespace
commit 5a212823d7bf103b59be0c79f72448a718186494 Author: José Matos Date: Sat Aug 15 16:36:34 2020 +0100 Trim endline whitespace --- lib/configure.py |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/configure.py b/lib/configure.py index cea9bdc..b638f93 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -217,7 +217,7 @@ def checkTeXPaths(): if sys.version_info[0] < 3: inpname = shortPath(unicode(tmpfname, encoding)).replace('\\', '/') else: -inpname = shortPath(tmpfname).replace('\\', '/') +inpname = shortPath(tmpfname).replace('\\', '/') else: inpname = cmdOutput('cygpath -m ' + tmpfname) logname = os.path.basename(re.sub("(?i).ltx", ".log", inpname)) @@ -1157,7 +1157,7 @@ def checkConverterEntries(): \converter svgz png"%%"""'''], path = ['', inkscape_path]) # -checkProg('Gnuplot', ['gnuplot'], +checkProg('Gnuplot', ['gnuplot'], rc_entry = [ r'''\Format gnuplot "gp, gnuplot""Gnuplot" "" "" "" "vector" "text/plain" \converter gnuplot pdf6 "python -tt $$s/scripts/gnuplot2pdf.py $$i $$o""needauth"''' ]) # -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Consider file encoding for modules in reconfigure
commit a8094051c1ae9c546c76bb0d3300d83e6cdbadef Author: José Matos Date: Sat Aug 15 17:49:23 2020 +0100 Consider file encoding for modules in reconfigure If the modules are not in utf8 then we warn and skip that file like it happens for layout files. It would be nice in both cases to have a warn in the gui and not only in the config.log --- lib/configure.py | 14 +++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/configure.py b/lib/configure.py index b638f93..2b4d61f 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -1562,9 +1562,17 @@ def checkModulesConfig(): continue seen.append(filename) - retval = processModuleFile(file, filename) - if retval: - tx.write(retval) + try: + retval = processModuleFile(file, filename) + if retval: + tx.write(retval) + except UnicodeDecodeError: + logger.warning("**\n" + "Module file '%s'\n" + "cannot be decoded in utf-8.\n" + "Please check if the file has the correct encoding.\n" + "Skipping this file!\n" + "**" % filename) tx.close() logger.info('\tdone') -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Consider encoding when re-setting language
commit 6876a306b94bfb41b4947e77498fbe58952f88ce Author: Juergen Spitzmueller Date: Sat Aug 15 19:20:30 2020 +0200 Consider encoding when re-setting language --- src/Paragraph.cpp |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 7b46d1e..8dbe0be 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1071,6 +1071,8 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, running_font = basefont; if (!closeLanguage) running_font.setLanguage(copy_font.language()); + OutputParams rp = runparams; + rp.encoding = basefont.language()->encoding(); // For these, we use switches, so they should be taken as // base inside the inset. basefont.fontInfo().setSize(copy_font.fontInfo().size()); @@ -1084,7 +1086,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams, && !textinset->text().isMainText() : false; unsigned int count2 = basefont.latexWriteStartChanges(os, bparams, - runparams, running_font, + rp, running_font, basefont, true, cprotect); column += count2; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] typo
commit d31e8294620d66f6ebdd48bd6f1f8da9380e59d7 Author: Juergen Spitzmueller Date: Sat Aug 15 19:21:01 2020 +0200 typo --- lib/doc/de/UserGuide.lyx |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/doc/de/UserGuide.lyx b/lib/doc/de/UserGuide.lyx index b9372d6..e751384 100644 --- a/lib/doc/de/UserGuide.lyx +++ b/lib/doc/de/UserGuide.lyx @@ -29123,7 +29123,7 @@ Literaturverweis \family sans Alle Autornamen \family default - verwendet wurde, schalter + verwendet wurde, schaltet \begin_inset Quotes gld \end_inset -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
Re: [LyX/master] New attempt on #9906: allow following hyperlinks via context menu.
On Fri, Aug 14, 2020 at 07:23:09PM +0200, Pavel Sanda wrote: > commit 48b1e8a0aca2f3f3faa8f1f800568e47792ba9a0 > Author: Pavel Sanda > Date: Fri Aug 14 19:46:13 2020 +0200 > > New attempt on #9906: allow following hyperlinks via context menu. > > Now safer version with the help of Qt. As a somewhat related issue I have very rough code (i.e. intended for my private patchset) which allows viewing papers cited in the document via the context menu of citation inset. ATM it is really shaped for my needs but I am curious how far I am from getting something along those lines (see attachment) to the upstream... What it essentially does is that: 1. Adds context menu item for citation to read the paper 2. Once triggered, first author's name and year is handed over to external shell script, which is capable to find the most appropriate pdfs on my drive and launches pdfviewer on them. Now, while this mostly satisfies my needs its way too peculiar for master. Namely it heavily relies on the fact that I have all my bibliography localy stored in way that name+year is easy searchable (though not always unique). It would not be terribly hard to extend the patch, so the functionality actually is: 1. For given reference find - path+filename of pdf if stored in bibliographic database & launch pdf viewer - if not found then URL to the paper & launch browser - if not found then give name + year to user-defined script (essentially my hack above) It could be enhanced by listing all possible targets in contex menu (because citation might include more papers and each one might have more pdf's). How much opposition would be to commit something like this? Pavel diff --git a/lib/ui/stdcontext.inc b/lib/ui/stdcontext.inc index c2beb316f4..2dc4f76db7 100644 --- a/lib/ui/stdcontext.inc +++ b/lib/ui/stdcontext.inc @@ -128,6 +128,7 @@ Menuset CiteStyles Separator Item "Settings...|S" "inset-settings" + Item "Find citation|F" "inset-edit" End diff --git a/src/FuncCode.h b/src/FuncCode.h index 585d1e1580..391faf71ce 100644 --- a/src/FuncCode.h +++ b/src/FuncCode.h @@ -490,6 +490,7 @@ enum FuncCode LFUN_MASTER_BUFFER_FORALL, // spitz 20191231 LFUN_IF_RELATIVES, // spitz 20200102 LFUN_WINDOW_RAISE, // forenr, 20202104 + LFUN_CITATION_OPEN, // sanda, 20200815 LFUN_LASTACTION // end of the table }; diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index 3de816a68f..a867a9248e 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -1239,6 +1239,7 @@ void LyXAction::init() * \endvar */ { LFUN_CITATION_INSERT, "citation-insert", Noop, Edit }, + { LFUN_CITATION_OPEN, "citation-open", Noop, Edit }, /*! * \var lyx::FuncCode lyx::LFUN_CLIPBOARD_PASTE diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp index 1b9f0ef27c..28b53c15f7 100644 --- a/src/frontends/qt/GuiView.cpp +++ b/src/frontends/qt/GuiView.cpp @@ -2371,6 +2371,10 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag) flag.setOnOff(lyxrc.spellcheck_continuously); break; + case LFUN_CITATION_OPEN: + enable = true; + break; + default: return false; } @@ -4620,6 +4624,13 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr) dr.screenUpdate(Update::Force); break; + case LFUN_CITATION_OPEN: { + string arg = cmd.getArg(1) + " " + cmd.getArg(0); + //TODO: get url from citation + //TODO: get file from citation + frontend::showTarget(arg); + } + default: // The LFUN must be for one of BufferView, Buffer or Cursor; // let's try that: diff --git a/src/frontends/qt/qt_helpers.cpp b/src/frontends/qt/qt_helpers.cpp index 9d44c3f9c1..5afcc0faf2 100644 --- a/src/frontends/qt/qt_helpers.cpp +++ b/src/frontends/qt/qt_helpers.cpp @@ -21,7 +21,10 @@ #include "BufferParams.h" #include "FloatList.h" +#include "FuncRequest.h" #include "Language.h" +#include "LyX.h" +#include "LyXAction.h" #include "TextClass.h" #include "support/convert.h" @@ -293,6 +296,12 @@ void showDirectory(FileName const & directory) if (!QDesktopServices::openUrl(qurl)) LYXERR0("Unable to open QUrl even though dir exists!"); } + +void showTarget(string const & target){ + //spot for generic url handling via QUrl && QDesktopServices::op
[LyX/2.3.x] Consider file encoding for modules in reconfigure
commit f5489036305eae3e63e721e2714746bd48bac1dc Author: José Matos Date: Sat Aug 15 21:02:38 2020 +0100 Consider file encoding for modules in reconfigure If the modules are not in utf8 then we warn and skip that file like it happens for layout files. This a port of commit a8094051c1ae9c546c76bb0d3300d83e6cdbadef to stable. --- lib/configure.py | 18 +- status.23x |6 +- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/lib/configure.py b/lib/configure.py index a5a49b7..7fee68d 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -228,7 +228,7 @@ def checkTeXPaths(): if sys.version_info[0] < 3: inpname = shortPath(unicode(tmpfname, encoding)).replace('\\', '/') else: -inpname = shortPath(tmpfname).replace('\\', '/') +inpname = shortPath(tmpfname).replace('\\', '/') else: inpname = cmdOutput('cygpath -m ' + tmpfname) logname = os.path.basename(re.sub("(?i).ltx", ".log", inpname)) @@ -1174,7 +1174,7 @@ def checkConverterEntries(): \converter svgz png"%%"""'''], path = ['', inkscape_path]) # -checkProg('Gnuplot', ['gnuplot'], +checkProg('Gnuplot', ['gnuplot'], rc_entry = [ r'''\Format gnuplot "gp, gnuplot""Gnuplot" "" "" "" "vector" "text/plain" \converter gnuplot pdf6 "python -tt $$s/scripts/gnuplot2pdf.py $$i $$o""needauth"''' ]) # @@ -1584,9 +1584,17 @@ def checkModulesConfig(): continue seen.append(filename) - retval = processModuleFile(file, filename, bool_docbook) - if retval: - tx.write(retval) + try: + retval = processModuleFile(file, filename, bool_docbook) + if retval: + tx.write(retval) + except UnicodeDecodeError: + logger.warning("**\n" + "Module file '%s'\n" + "cannot be decoded in utf-8.\n" + "Please check if the file has the correct encoding.\n" + "Skipping this file!\n" + "**" % filename) tx.close() logger.info('\tdone') diff --git a/status.23x b/status.23x index f8420a1..0a75945 100644 --- a/status.23x +++ b/status.23x @@ -88,7 +88,7 @@ What's new - Do not allow editing of math package list in Document > Settings > Math Options, thus preventing a crash (bug 11931). - + - Maintain standard layout for separating paragraphs when switching layouts (bug 11936). @@ -114,3 +114,7 @@ What's new - Wininstaller, fix bug where previous installations, with emergency version greater than 1, could not be seen in registry on overinstall + +- Do not break configuration if a module file is not decodable (file + not encoded in utf-8). Rather than that, issue a warning and skip + that file (a variant of bug 11736). -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
Re: [LyX/master] New attempt on #9906: allow following hyperlinks via context menu.
On Saturday, 15 August 2020 19.01.04 WEST Pavel Sanda wrote: > How much opposition would be to commit something like this? > > Pavel I like this. You have my endorsement. :-) -- José Abílio -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs