[LyX/2.3.x] Do not use needauth when only exporting code
commit 532d3600f20f889f3529bd111bddaf1b6c21eec0 Author: Scott KostyshakDate: Sun Apr 29 20:06:16 2018 -0400 Do not use needauth when only exporting code We have a couple of converters (using Sweave and knitr to "tangle" an intermediate file) that are used for exporting code chunks contained in a .lyx file. Since the code is just exported to a text file and is not executed, needauth is not necessary. (cherry picked from commit 065e37e96ff37dd891e47aede84258fd9adf23cf) --- lib/configure.py |8 status.23x |2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/configure.py b/lib/configure.py index ac4f0fd..a2b651e 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -823,12 +823,12 @@ def checkConverterEntries(): \converter knitr dviluatex "%%" "needauth"''']) # checkProg('a Sweave -> R/S code converter', ['Rscript --verbose --no-save --no-restore $$s/scripts/lyxstangle.R $$i $$e $$r'], -rc_entry = [ r'\converter sweave r "%%""needauth"', - r'\converter sweave-ja r "%%""needauth"' ]) +rc_entry = [ r'\converter sweave r "%%"""', + r'\converter sweave-ja r "%%"""' ]) # checkProg('a knitr -> R/S code converter', ['Rscript --verbose --no-save --no-restore $$s/scripts/lyxknitr.R $$p$$i $$p$$o $$e $$r tangle'], -rc_entry = [ r'\converter knitr r "%%""needauth"', - r'\converter knitr-ja r "%%""needauth"' ]) +rc_entry = [ r'\converter knitr r "%%"""', + r'\converter knitr-ja r "%%"""' ]) # checkProg('an HTML -> LaTeX converter', ['html2latex $$i', 'gnuhtml2latex', 'htmltolatex -input $$i -output $$o', 'htmltolatex.jar -input $$i -output $$o'], diff --git a/status.23x b/status.23x index a740f49..48a1330 100644 --- a/status.23x +++ b/status.23x @@ -25,6 +25,8 @@ What's new - Added LFUN_MASTER_BUFFER_EXPORT, which exports the master buffer, along the lines of LFUN_MASTER_BUFFER_VIEW (bug 8). +- Needauth is not needed for exporting R code (only when executing the code). + * TEX2LYX IMPROVEMENTS
[LyX/2.3.x] Fix problem with synchronous export.
commit ffeac12a86bc54db5fdf5659f9300a47e1b2eabb Author: Richard Kimberly HeckDate: Sat Apr 21 19:48:59 2018 -0400 Fix problem with synchronous export. It surprises me a bit that the code is different in this case from the case when EXPORT_in_THREAD is not set. I should check to see if there's a problem in the other case, too. (cherry picked from commit 0fc50a26371b9cbaf2cd73c5e377c86bf7fdb215) --- src/frontends/qt4/GuiView.cpp | 19 +-- 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index af594cb..0eb48cf 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -3616,12 +3616,9 @@ bool GuiView::GuiViewPrivate::asyncBufferProcessing( // We are asynchronous, so we don't know here anything about the success return true; } else { -#endif - // this will be run unconditionally in case EXPORT_in_THREAD - // is not defined. Buffer::ExportStatus status; if (syncFunc) { - status = (used_buffer->*syncFunc)(format, true); + status = (used_buffer->*syncFunc)(format, false); } else if (previewFunc) { status = (used_buffer->*previewFunc)(format); } else @@ -3630,9 +3627,19 @@ bool GuiView::GuiViewPrivate::asyncBufferProcessing( (void) asyncFunc; return (status == Buffer::ExportSuccess || status == Buffer::PreviewSuccess); -#if EXPORT_in_THREAD - // the end of the else clause in that case. } +#else + Buffer::ExportStatus status; + if (syncFunc) { + status = (used_buffer->*syncFunc)(format, true); + } else if (previewFunc) { + status = (used_buffer->*previewFunc)(format); + } else + return false; + handleExportStatus(gv_, status, format); + (void) asyncFunc; + return (status == Buffer::ExportSuccess + || status == Buffer::PreviewSuccess); #endif }
[LyX/master] Add \nospellcheck font property
commit 57dc817581faf54babaf3db0c602bac205dc6855 Author: Juergen SpitzmuellerDate: Sun May 6 19:48:21 2018 +0200 Add \nospellcheck font property This revives a ten year old idea (and patch) by Dov. You can now mark in the character dialog text and exclude it from spell checking. Fixes: #1042 File format change Remaining issue: The instant spell checking marks are not immediately removed, but only after some editing. --- development/FORMAT |4 + lib/lyx2lyx/lyx_2_4.py | 15 ++- src/Font.cpp| 11 +- src/FontInfo.cpp| 21 +++- src/FontInfo.h | 12 +- src/Paragraph.cpp |3 + src/RowPainter.cpp | 34 - src/RowPainter.h|2 + src/Text.cpp|3 + src/Text2.cpp |2 + src/frontends/qt4/GuiCharacter.cpp | 18 +++ src/frontends/qt4/GuiCharacter.h|3 + src/frontends/qt4/ui/CharacterUi.ui | 274 ++- src/version.h |4 +- 14 files changed, 257 insertions(+), 149 deletions(-) diff --git a/development/FORMAT b/development/FORMAT index ce0bd80..8338ee1 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -7,6 +7,10 @@ changes happened in particular if possible. A good example would be --- +2018-05-06 Jürgen Spitzmüller + * format incremented to 551: add font info param \nospellcheck that prevents + text from being spellchecked. + 2018-04-22 Jürgen Spitzmüller * format incremented to 550: rename \fontencoding global to \fontencoding auto. Semantic change: this is now automatically set depending on the document fonts. diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py index ac84d6a..941703a 100644 --- a/lib/lyx2lyx/lyx_2_4.py +++ b/lib/lyx2lyx/lyx_2_4.py @@ -202,6 +202,17 @@ def revert_fontenc(document): document.header[i] = document.header[i].replace("auto", "global") +def revert_nospellcheck(document): +" Remove nospellcheck font info param " + +i = 0 +while True: +i = find_token(document.body, '\\nospellcheck', i) +if i == -1: +return +del document.body[i] + + ## # Conversion hub # @@ -213,10 +224,12 @@ convert = [ [547, []], [548, []], [549, []], - [550, [convert_fontenc]] + [550, [convert_fontenc]], + [551, []] ] revert = [ + [549, [revert_nospellcheck]], [549, [revert_fontenc]], [548, []],# dummy format change [547, [revert_lscape]], diff --git a/src/Font.cpp b/src/Font.cpp index b810e45..b8a6a29 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -225,6 +225,8 @@ void Font::lyxWriteChanges(Font const & orgfont, os << "\\emph " << LyXMiscNames[bits_.emph()] << "\n"; if (orgfont.fontInfo().number() != bits_.number()) os << "\\numeric " << LyXMiscNames[bits_.number()] << "\n"; + if (orgfont.fontInfo().nospellcheck() != bits_.nospellcheck()) + os << "\\nospellcheck " << LyXMiscNames[bits_.nospellcheck()] << "\n"; if (orgfont.fontInfo().underbar() != bits_.underbar()) { // This is only for backwards compatibility switch (bits_.underbar()) { @@ -619,6 +621,7 @@ string Font::toString(bool const toggle) const << "uwave " << bits_.uwave() << '\n' << "noun " << bits_.noun() << '\n' << "number " << bits_.number() << '\n' + << "nospellcheck " << bits_.nospellcheck() << '\n' << "color " << bits_.color() << '\n' << "language " << lang << '\n' << "toggleall " << convert(toggle); @@ -660,7 +663,8 @@ bool Font::fromString(string const & data, bool & toggle) } else if (token == "emph" || token == "underbar" || token == "noun" || token == "number" || token == "uuline" || token == "uwave" - || token == "strikeout" || token == "xout") { + || token == "strikeout" || token == "xout" + || token == "nospellcheck") { int const next = lex.getInteger(); FontState const misc = FontState(next); @@ -681,6 +685,8 @@ bool Font::fromString(string const & data, bool & toggle) bits_.setNoun(misc); else if (token == "number") bits_.setNumber(misc); + else if (token == "nospellcheck") + bits_.setNoSpellcheck(misc); } else if (token == "color") { int const next =
[LyX/master] Try some new icons for new dynamic inset and charstyle menus.
commit 40a61357af4c293daa721763d3303b3b25190f8e Author: Richard Kimberly HeckDate: Thu May 3 21:28:09 2018 -0400 Try some new icons for new dynamic inset and charstyle menus. Suggestions by Pavel. Also move menus on toolbars per his suggestions. --- lib/images/dynamic-char-styles.svgz | Bin 1586 -> 35286 bytes lib/images/dynamic-custom-insets.svgz| Bin 1586 -> 15903 bytes lib/images/oxygen/dynamic-char-styles.svgz | Bin 30164 -> 9105 bytes lib/images/oxygen/dynamic-custom-insets.svgz | Bin 30164 -> 2272 bytes lib/ui/stdtoolbars.inc |5 ++--- 5 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/images/dynamic-char-styles.svgz b/lib/images/dynamic-char-styles.svgz index 715b5f3..b489775 100644 Binary files a/lib/images/dynamic-char-styles.svgz and b/lib/images/dynamic-char-styles.svgz differ diff --git a/lib/images/dynamic-custom-insets.svgz b/lib/images/dynamic-custom-insets.svgz index 715b5f3..dd52507 100644 Binary files a/lib/images/dynamic-custom-insets.svgz and b/lib/images/dynamic-custom-insets.svgz differ diff --git a/lib/images/oxygen/dynamic-char-styles.svgz b/lib/images/oxygen/dynamic-char-styles.svgz index 486a373..7a7855e 100644 Binary files a/lib/images/oxygen/dynamic-char-styles.svgz and b/lib/images/oxygen/dynamic-char-styles.svgz differ diff --git a/lib/images/oxygen/dynamic-custom-insets.svgz b/lib/images/oxygen/dynamic-custom-insets.svgz index 486a373..7350098 100644 Binary files a/lib/images/oxygen/dynamic-custom-insets.svgz and b/lib/images/oxygen/dynamic-custom-insets.svgz differ diff --git a/lib/ui/stdtoolbars.inc b/lib/ui/stdtoolbars.inc index 54bea8a..02083ee 100644 --- a/lib/ui/stdtoolbars.inc +++ b/lib/ui/stdtoolbars.inc @@ -87,18 +87,17 @@ ToolbarSet Item "Toggle emphasis" "font-emph" Item "Toggle noun" "font-noun" Item "Apply last" "textstyle-apply" + DynamicMenu "dynamic-char-styles" "Character Styles" Separator Item "Insert math" "math-mode on" Item "Insert graphics" "dialog-show-new-inset graphics" TableInsert "Insert table" + DynamicMenu "dynamic-custom-insets" "Custom Insets" Separator Item "Toggle outline" "dialog-toggle toc" Item "Toggle math toolbar" "toolbar-toggle math" Item "Toggle table toolbar" "toolbar-toggle table" Item "Toggle review toolbar" "toolbar-toggle review" - Separator - DynamicMenu "dynamic-custom-insets" "Custom Insets" - DynamicMenu "dynamic-char-styles" "Character Styles" End Toolbar "view/update" "View/Update"
[LyX/master] Update fr.po (first step)
commit 350499e5ebb01eb42e725930900fa9996d4898a5 Author: jpcDate: Sun May 6 17:43:44 2018 +0200 Update fr.po (first step) po/fr.gmo | Bin 541364 -> 546191 bytes po/fr.po | 5090 +++-- 2 files changed, 2575 insertions(+), 2515 deletions(-)
[LyX/master] Small corrections in slovak.nsh
commit d1e0dc7b761ff27b69908d93a43f9a43daf92de9 Author: Kornel BenkoDate: Sun May 6 15:29:41 2018 +0200 Small corrections in slovak.nsh --- .../Win32/packaging/installer/lang/slovak.nsh |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/development/Win32/packaging/installer/lang/slovak.nsh b/development/Win32/packaging/installer/lang/slovak.nsh index 53896af..d34f11d 100644 --- a/development/Win32/packaging/installer/lang/slovak.nsh +++ b/development/Win32/packaging/installer/lang/slovak.nsh @@ -42,7 +42,7 @@ ${LangFileString} EnterLaTeXFolder 'Tu môžte nastaviť cestu k $\"latex.exe$\" LaTeX-distribúciu, ktorá by mala byť používaná LyXom.\r\n\ Bez LaTeXu, LyX nedokáže produkovať dokumenty!\r\n\ \r\n\ - Inštalatér detegoval LaTeX-distribúciu \ + Inštalatér objavil LaTeX-distribúciu \ $\"$LaTeXName$\" na vašom systéme. Dolu je zobrazená jeho cesta.' ${LangFileString} EnterLaTeXFolderNone 'Nastavte dolu cestu k $\"latex.exe$\". Tým nastavíte, ktorá \ LaTeX-distribúcia má byť používaná LyXom.\r\n\ @@ -54,7 +54,7 @@ ${LangFileString} DontUseLaTeX "Nepoužiť LaTeX" ${LangFileString} InvalidLaTeXFolder 'Súbor $\"latex.exe$\" nie je na špecifikovanej ceste.' ${LangFileString} LatexInfo 'Teraz štartuje inštalatér LaTeX distribúcie $\"MiKTeX$\".$\r$\n\ - Na inštalovanie programu tlačte $\"Next$\" v okne inštalátora až inštalácia začne.$\r$\n\ + Na inštalovanie programu stlačte $\"Next$\" v okne inštalátora až inštalácia začne.$\r$\n\ $\r$\n\ !!! Prosím použite všetky štandardné možnosti inštalatéra MiKTeX !!!' @@ -105,7 +105,7 @@ ${LangFileString} FinishPageRun "Spustiť LyX" ${LangFileString} UnNotInRegistryLabel "Nemôžem nájsť LyX v registre.$\r$\n\ Skratky na pracovnej ploche a v štartovacom Menu sa nedajú odstrániť." ${LangFileString} UnInstallRunning "Najprv treba zavrieť LyX!" -${LangFileString} UnNotAdminLabel "Pre odinštaláciu LyX potrebujete administrátorské práva!" +${LangFileString} UnNotAdminLabel "Pre odinštaláciu LyXu potrebujete administrátorské práva!" ${LangFileString} UnReallyRemoveLabel "Ste si istý, že chcete kompletne odinštalovať LyX a všetky jeho súčiastky?" ${LangFileString} UnLyXPreferencesTitle 'LyXove užívateľské nastavenia'
[LyX/master] UserGuide: Adapt to new character dialog.
commit 4c8883b0e1dbb17f6863bf157ac1561ed251ade0 Author: Juergen SpitzmuellerDate: Sun May 6 14:17:28 2018 +0200 UserGuide: Adapt to new character dialog. Also differentiate more between (semantic) Character Styles and (formal) Text Properties. lib/doc/UserGuide.lyx| 1263 +++-- lib/doc/de/UserGuide.lyx | 1267 +- 2 files changed, 1998 insertions(+), 532 deletions(-)