[LyX/2.3.x] Win installer: upgrade to Qt 5.9.4
commit 55d5c20d93ff5e330b2948703537432b748e05f5 Author: Uwe StöhrDate: Wed Jan 24 03:26:34 2018 +0100 Win installer: upgrade to Qt 5.9.4 --- development/Win32/packaging/installer/settings.nsh |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/development/Win32/packaging/installer/settings.nsh b/development/Win32/packaging/installer/settings.nsh index bc94a80..ff8029f 100644 --- a/development/Win32/packaging/installer/settings.nsh +++ b/development/Win32/packaging/installer/settings.nsh @@ -38,7 +38,7 @@ These typically need to be modified for each LyX release !define FILES_LYX "D:\LyXPackage2.3\LyX" !define FILES_DEPS "D:\LyXGit\Master\lyx-windows-deps-msvc2015" -!define FILES_QT "C:\Qt\Qt5.9.3\5.9.3\msvc2015" +!define FILES_QT "C:\Qt\Qt5.9.4\5.9.4\msvc2015" !define ClassFileDir "${FILES_LYX}\Resources\tex" !define DVIPostFileDir "${FILES_DEPS}\tex"
[LyX/master] Win installer: upgrade to Qt 5.9.4
commit fe00302403724cb070e53d19ad0ec27d673a2a8a Author: Uwe StöhrDate: Wed Jan 24 03:26:02 2018 +0100 Win installer: upgrade to Qt 5.9.4 --- development/Win32/packaging/installer/settings.nsh |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/development/Win32/packaging/installer/settings.nsh b/development/Win32/packaging/installer/settings.nsh index bc94a80..ff8029f 100644 --- a/development/Win32/packaging/installer/settings.nsh +++ b/development/Win32/packaging/installer/settings.nsh @@ -38,7 +38,7 @@ These typically need to be modified for each LyX release !define FILES_LYX "D:\LyXPackage2.3\LyX" !define FILES_DEPS "D:\LyXGit\Master\lyx-windows-deps-msvc2015" -!define FILES_QT "C:\Qt\Qt5.9.3\5.9.3\msvc2015" +!define FILES_QT "C:\Qt\Qt5.9.4\5.9.4\msvc2015" !define ClassFileDir "${FILES_LYX}\Resources\tex" !define DVIPostFileDir "${FILES_DEPS}\tex"
[LyX/2.3.x] seminar.lyx: backport Günter's recent fixes
commit b36aca42a27e73e6c124047c0c4551d44023f3d2 Author: Uwe StöhrDate: Wed Jan 24 01:24:21 2018 +0100 seminar.lyx: backport Günter's recent fixes --- lib/examples/fr/seminar.lyx |8 +--- lib/examples/seminar.lyx|6 +- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/lib/examples/fr/seminar.lyx b/lib/examples/fr/seminar.lyx index c851113..fa0da73 100644 --- a/lib/examples/fr/seminar.lyx +++ b/lib/examples/fr/seminar.lyx @@ -582,13 +582,7 @@ slideframe[ \backslash setlength{ \backslash -shadowsize}{1pt}]{shadow}% -\end_layout - -\begin_layout LyX-Code - -\lang english - framecolor "black" backgroundcolor +shadowsize}{1pt}]{shadow} \end_layout \begin_layout Standard diff --git a/lib/examples/seminar.lyx b/lib/examples/seminar.lyx index a993687..a9a9e60 100644 --- a/lib/examples/seminar.lyx +++ b/lib/examples/seminar.lyx @@ -513,11 +513,7 @@ slideframe[ \backslash setlength{ \backslash -shadowsize}{1pt}]{shadow}% -\end_layout - -\begin_layout LyX-Code - framecolor "black" backgroundcolor "none" +shadowsize}{1pt}]{shadow} \end_layout \begin_layout Standard
[LyX/2.3.x] build5*.bat: update to Qt 5.9.4
commit cd8c6d4d2b14db23cc3fe818ffacd6c794738642 Author: Uwe StöhrDate: Wed Jan 24 01:19:19 2018 +0100 build5*.bat: update to Qt 5.9.4 - also adjust build5-2015-x64.bat --- development/cmake/build5-2015-installer.bat |2 +- development/cmake/build5-2015-x64.bat | 11 +-- development/cmake/build5-2015.bat |2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/development/cmake/build5-2015-installer.bat b/development/cmake/build5-2015-installer.bat index c0c4566..80bc4a7 100644 --- a/development/cmake/build5-2015-installer.bat +++ b/development/cmake/build5-2015-installer.bat @@ -5,7 +5,7 @@ REM Create a link and add cmd.exe /k in the preferences in front of the mingw. ::echo off REM Install Qt from qt.io -set PATH=C:\Qt\Qt5.9.3\5.9.3\msvc2015\bin;%PATH% +set PATH=C:\Qt\Qt5.9.4\5.9.4\msvc2015\bin;%PATH% set LYX_SOURCE=%~DP0..\.. set LYX_BUILD=%LYX_SOURCE%\..\build-result-5-2015 diff --git a/development/cmake/build5-2015-x64.bat b/development/cmake/build5-2015-x64.bat index 0ac4660..ef582ec 100644 --- a/development/cmake/build5-2015-x64.bat +++ b/development/cmake/build5-2015-x64.bat @@ -32,13 +32,12 @@ set CL=/MP REM Save path set CALLED_FROM=%CD% -REM Add path to qmake here or set PATH correctly on your system. -set PATH=C:\Qt\Qt5.9.3\5.9.3\msvc2015_64;%PATH% - REM Edit pathes here or set the environment variables on your system. -set GNUWIN32_DIR=D:\LyXGit\Master\lyx-windows-deps-msvc2015-x64 -set LYX_SOURCE=D:\LyXGit\Master\ -set LYX_BUILD=D:\LyXGit\Master\compile-2015-x64 +set CMAKE_PATH="C:\Program Files\CMake\bin" +set QT_PATH="C:\Qt\Qt5.9.4\5.9.4\msvc2015_64" +set GNUWIN32_DIR="D:\LyXGit\Master\lyx-windows-deps-msvc2015-x64" +set LYX_SOURCE="D:\LyXGit\2.3.x" +set LYX_BUILD="D:\LyXGit\2.3.x\compile-2015-x64" if [%LYX_SOURCE%]==[] ( set LYX_SOURCE=%~DP0\..\.. diff --git a/development/cmake/build5-2015.bat b/development/cmake/build5-2015.bat index 131ff68..3e47fdc 100644 --- a/development/cmake/build5-2015.bat +++ b/development/cmake/build5-2015.bat @@ -34,7 +34,7 @@ set CALLED_FROM=%CD% REM Edit pathes here or set the environment variables on your system. set CMAKE_PATH="C:\Program Files\CMake\bin" -set QT_PATH="C:\Qt\Qt5.9.3\5.9.3\msvc2015" +set QT_PATH="C:\Qt\Qt5.9.4\5.9.4\msvc2015" set GNUWIN32_DIR="D:\LyXGit\Master\lyx-windows-deps-msvc2015" set LYX_SOURCE="D:\LyXGit\2.3.x" set LYX_BUILD="D:\LyXGit\2.3.x\compile-2015"
[LyX/master] build5*.bat: update to Qt 5.9.4
commit dceb7e393d1d39a9a986b2baf15e2352d3b10b61 Author: Uwe StöhrDate: Wed Jan 24 01:18:32 2018 +0100 build5*.bat: update to Qt 5.9.4 - also adjust build5-2015-x64.bat --- development/cmake/build5-2015-installer.bat |2 +- development/cmake/build5-2015-x64.bat | 13 ++--- development/cmake/build5-2015.bat |2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/development/cmake/build5-2015-installer.bat b/development/cmake/build5-2015-installer.bat index c0c4566..80bc4a7 100644 --- a/development/cmake/build5-2015-installer.bat +++ b/development/cmake/build5-2015-installer.bat @@ -5,7 +5,7 @@ REM Create a link and add cmd.exe /k in the preferences in front of the mingw. ::echo off REM Install Qt from qt.io -set PATH=C:\Qt\Qt5.9.3\5.9.3\msvc2015\bin;%PATH% +set PATH=C:\Qt\Qt5.9.4\5.9.4\msvc2015\bin;%PATH% set LYX_SOURCE=%~DP0..\.. set LYX_BUILD=%LYX_SOURCE%\..\build-result-5-2015 diff --git a/development/cmake/build5-2015-x64.bat b/development/cmake/build5-2015-x64.bat index 9ca66c9..3c57915 100644 --- a/development/cmake/build5-2015-x64.bat +++ b/development/cmake/build5-2015-x64.bat @@ -32,13 +32,12 @@ set CL=/MP REM Save path set CALLED_FROM=%CD% -REM Add path to qmake here or set PATH correctly on your system. -set PATH=C:\Qt\Qt5.9.3\5.9.3\msvc2015_64;%PATH% - REM Edit pathes here or set the environment variables on your system. -set GNUWIN32_DIR=D:\LyXGit\Master\lyx-windows-deps-msvc2015-x64 -set LYX_SOURCE=D:\LyXGit\Master\ -set LYX_BUILD=D:\LyXGit\Master\compile-2015-x64 +set CMAKE_PATH="C:\Program Files\CMake\bin" +set QT_PATH="C:\Qt\Qt5.9.4\5.9.4\msvc2015_64" +set GNUWIN32_DIR="D:\LyXGit\Master\lyx-windows-deps-msvc2015-x64" +set LYX_SOURCE="D:\LyXGit\Master" +set LYX_BUILD="D:\LyXGit\Master\compile-2015-x64" if [%LYX_SOURCE%]==[] ( set LYX_SOURCE=%~DP0\..\.. @@ -73,7 +72,7 @@ REM start with a new cmake run if "%1%" == "devel" ( REM Build solution to develop LyX REM you can add the option "-GNinja" for a faster compilation - cmake %LYX_SOURCE% -G"Visual Studio 14 2015 Win64" -DLYX_USE_QT=QT5 -DLYX_ENABLE_EXPORT_TESTS=0 -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=0 -DLYX_RELEASE=0 -DLYX_CONSOLE=ON -DLYX_3RDPARTY_BUILD=1 %DEPENDENCIES_DOWNLOAD% + cmake %LYX_SOURCE% -G"Visual Studio 14 2015 Win64" -DLYX_USE_QT=QT5 -DLYX_ENABLE_EXPORT_TESTS=0 -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=0 -DLYX_RELEASE=0 -DLYX_CONSOLE=FORCE -DLYX_3RDPARTY_BUILD=1 %DEPENDENCIES_DOWNLOAD% msbuild src\LyX.vcxproj /p:Configuration=Debug msbuild src\tex2lyx\tex2lyx.vcxproj /p:Configuration=Debug ) diff --git a/development/cmake/build5-2015.bat b/development/cmake/build5-2015.bat index 413ec53..6e11ce7 100644 --- a/development/cmake/build5-2015.bat +++ b/development/cmake/build5-2015.bat @@ -34,7 +34,7 @@ set CALLED_FROM=%CD% REM Edit pathes here or set the environment variables on your system. set CMAKE_PATH="C:\Program Files\CMake\bin" -set QT_PATH="C:\Qt\Qt5.9.3\5.9.3\msvc2015" +set QT_PATH="C:\Qt\Qt5.9.4\5.9.4\msvc2015" set GNUWIN32_DIR="D:\LyXGit\Master\lyx-windows-deps-msvc2015" set LYX_SOURCE="D:\LyXGit\Master" set LYX_BUILD="D:\LyXGit\Master\compile-2015"
[LyX/master] Merge branch 'master' of git.lyx.org:lyx
commit 029a6aace60704616f65d9071cc655c79cf755a5 Merge: dceb7e3 a77cfef Author: Uwe StöhrDate: Wed Jan 24 01:18:43 2018 +0100 Merge branch 'master' of git.lyx.org:lyx lib/examples/fr/seminar.lyx | 10 + lib/examples/seminar.lyx|8 +--- lib/lyx2lyx/lyx_2_0.py | 75 --- lib/lyx2lyx/lyx_2_2.py | 21 lib/lyx2lyx/parser_tools.py | 43 +++- 5 files changed, 73 insertions(+), 84 deletions(-)
[LyX/master] Fix some more lyx2lyx round-trips.
commit a77cfef1c61006b72df73560a2d301b7356ae3cc Author: Günter MildeDate: Wed Jan 24 01:02:24 2018 +0100 Fix some more lyx2lyx round-trips. Also restore corrupted seminar example. Add default return value to parser_tools.is_in_inset(). --- lib/examples/fr/seminar.lyx | 10 + lib/examples/seminar.lyx|8 +--- lib/lyx2lyx/lyx_2_0.py | 75 --- lib/lyx2lyx/lyx_2_2.py | 21 lib/lyx2lyx/parser_tools.py | 43 +++- 5 files changed, 73 insertions(+), 84 deletions(-) diff --git a/lib/examples/fr/seminar.lyx b/lib/examples/fr/seminar.lyx index c851113..5fc8044 100644 --- a/lib/examples/fr/seminar.lyx +++ b/lib/examples/fr/seminar.lyx @@ -1,4 +1,4 @@ -#LyX 2.3 created this file. For more info see http://www.lyx.org/ +#LyX 2.4 created this file. For more info see https://www.lyx.org/ \lyxformat 544 \begin_document \begin_header @@ -582,13 +582,7 @@ slideframe[ \backslash setlength{ \backslash -shadowsize}{1pt}]{shadow}% -\end_layout - -\begin_layout LyX-Code - -\lang english - framecolor "black" backgroundcolor +shadowsize}{1pt}]{shadow} \end_layout \begin_layout Standard diff --git a/lib/examples/seminar.lyx b/lib/examples/seminar.lyx index a993687..f5a82c2 100644 --- a/lib/examples/seminar.lyx +++ b/lib/examples/seminar.lyx @@ -1,4 +1,4 @@ -#LyX 2.3 created this file. For more info see http://www.lyx.org/ +#LyX 2.4 created this file. For more info see https://www.lyx.org/ \lyxformat 544 \begin_document \begin_header @@ -513,11 +513,7 @@ slideframe[ \backslash setlength{ \backslash -shadowsize}{1pt}]{shadow}% -\end_layout - -\begin_layout LyX-Code - framecolor "black" backgroundcolor "none" +shadowsize}{1pt}]{shadow} \end_layout \begin_layout Standard diff --git a/lib/lyx2lyx/lyx_2_0.py b/lib/lyx2lyx/lyx_2_0.py index eefe0b2..3faf944 100644 --- a/lib/lyx2lyx/lyx_2_0.py +++ b/lib/lyx2lyx/lyx_2_0.py @@ -514,8 +514,6 @@ def convert_ulinelatex(document): " Remove preamble code for \\uline font attribute. " del_complete_lines(document.preamble, ['% Added by lyx2lyx']+ulinelatex_preamble) -for line in document.preamble: -print line def revert_ulinelatex(document): " Add preamble code for \\uline font attribute in citations. " @@ -835,6 +833,9 @@ def revert_suppress_date(document): del document.header[i] +mhchem_preamble = [r"\PassOptionsToPackage{version=3}{mhchem}", + r"\usepackage{mhchem}"] + def convert_mhchem(document): "Set mhchem to off for versions older than 1.6.x" if document.initial_format < 277: @@ -852,47 +853,44 @@ def convert_mhchem(document): # pre-1.5.x document i = find_token(document.header, "\\use_amsmath", 0) if i == -1: -document.warning("Malformed LyX document: Could not find amsmath os esint setting.") +document.warning("Malformed LyX document: " + "Could not find amsmath or esint setting.") return document.header.insert(i + 1, "\\use_mhchem %d" % mhchem) +# remove LyX-inserted preamble +if mhchem != 0: +del_complete_lines(document.preamble, + ['% Added by lyx2lyx']+mhchem_preamble) def revert_mhchem(document): -"Revert mhchem loading to preamble code" +"Revert mhchem loading to preamble code." -mhchem = "off" -i = find_token(document.header, "\\use_mhchem", 0) -if i == -1: -document.warning("Malformed LyX document: Could not find mhchem setting.") -mhchem = "auto" -else: -val = get_value(document.header, "\\use_mhchem", i) -if val == "1": -mhchem = "auto" -elif val == "2": -mhchem = "on" -del document.header[i] - -if mhchem == "off": - # don't load case - return +mhchem = get_value(document.header, "\\use_mhchem", delete=True) +try: +mhchem = int(mhchem) +except ValueError: +document.warning("Malformed LyX document: " + "Could not find mhchem setting.") +mhchem = 1 # "auto" +# mhchem in {0: "off", 1: "auto", 2: "on"} -if mhchem == "auto": +if mhchem == 1: # "auto" i = 0 -while True: +while i != 1 and mhchem == 1: i = find_token(document.body, "\\begin_inset Formula", i) -if i == -1: - break -line = document.body[i] -if line.find("\\ce{") != -1 or line.find("\\cf{") != -1: - mhchem = "on" - break +j = find_end_of_inset(document.body, i) +if j == -1: +break +if (True for line in document.body[i:j] +if r"\ce{" in line or r"\cf{" in line): +mhchem = 2 +break i += 1 -if mhchem == "on": -pre =
[LyX/master] ru.po: more translations from Yuriy
commit 6f64e3cb0fc0775f68910bc2ef7156c7dced1358 Author: Uwe StöhrDate: Tue Jan 23 14:26:32 2018 +0100 ru.po: more translations from Yuriy po/ru.po | 1035 +++--- 1 files changed, 583 insertions(+), 452 deletions(-)
[LyX/2.3.x] ru.po: more translations from Yuriy
commit bcedc7cd95fbc99b85a1c315f099e58ffe839a84 Author: Uwe StöhrDate: Tue Jan 23 14:26:18 2018 +0100 ru.po: more translations from Yuriy po/ru.po | 450 +++--- 1 files changed, 281 insertions(+), 169 deletions(-)
[LyX/master] Fix some lyx2lyx round-trip tests.
commit 67eca412ff90708f7d02c273ec65a791cf75d23f Author: Günter MildeDate: Tue Jan 23 14:01:30 2018 +0100 Fix some lyx2lyx round-trip tests. Fix cases where lyx2lyx adds changes with every round cycle uncovered by recent ctest change. Add optional `delete` argument to parser_tools.get*value(): If True, delete the matching line. More efficient "allowbreak" con/reversion. --- lib/lyx2lyx/lyx_2_0.py | 49 +-- lib/lyx2lyx/lyx_2_1.py | 14 +++-- lib/lyx2lyx/lyx_2_3.py | 107 +-- lib/lyx2lyx/parser_tools.py | 25 ++ 4 files changed, 109 insertions(+), 86 deletions(-) diff --git a/lib/lyx2lyx/lyx_2_0.py b/lib/lyx2lyx/lyx_2_0.py index 1741d4a..eefe0b2 100644 --- a/lib/lyx2lyx/lyx_2_0.py +++ b/lib/lyx2lyx/lyx_2_0.py @@ -22,7 +22,8 @@ import re, string import unicodedata import sys, os -from parser_tools import find_token, find_end_of, find_tokens, \ +from parser_tools import del_complete_lines, \ + find_token, find_end_of, find_tokens, \ find_token_exact, find_end_of_inset, find_end_of_layout, \ find_token_backwards, is_in_inset, get_value, get_quoted_value, \ del_token, check_token, get_option_value @@ -484,6 +485,15 @@ def revert_printindexall(document): document.body[i:k + 1] = subst i = i + 1 +strikeout_preamble = ['% for proper underlining', + r'\PassOptionsToPackage{normalem}{ulem}', + r'\usepackage{ulem}'] + +def convert_strikeout(document): +" Remove preamble code loading 'ulem' package. " +del_complete_lines(document.preamble, + ['% Added by lyx2lyx']+strikeout_preamble) + def revert_strikeout(document): " Reverts \\strikeout font attribute " @@ -491,25 +501,32 @@ def revert_strikeout(document): changed = revert_font_attrs(document.body, "\\uwave", "\\uwave") or changed changed = revert_font_attrs(document.body, "\\strikeout", "\\sout") or changed if changed == True: -insert_to_preamble(document, \ -['% for proper underlining', -'\\PassOptionsToPackage{normalem}{ulem}', -'\\usepackage{ulem}']) +insert_to_preamble(document, strikeout_preamble) + +ulinelatex_preamble = ['% fix underbar in citations', +r'\let\cite@rig\cite', +r'\newcommand{\b@xcite}[2][\%]{\def\def@pt{\%}\def\pas@pt{#1}', +r' \mbox{\ifx\def@pt\pas@pt\cite@rig{#2}\else\cite@rig[#1]{#2}\fi}}', +r'\renewcommand{\underbar}[1]{{\let\cite\b@xcite\uline{#1}}}'] + +def convert_ulinelatex(document): +" Remove preamble code for \\uline font attribute. " +del_complete_lines(document.preamble, + ['% Added by lyx2lyx']+ulinelatex_preamble) +for line in document.preamble: +print line def revert_ulinelatex(document): -" Reverts \\uline font attribute " +" Add preamble code for \\uline font attribute in citations. " i = find_token(document.body, '\\bar under', 0) if i == -1: return -insert_to_preamble(document,\ -['% for proper underlining', -'\\PassOptionsToPackage{normalem}{ulem}', -'\\usepackage{ulem}', -'\\let\\cite@rig\\cite', - '\\newcommand{\\b@xcite}[2][\\%]{\\def\\def@pt{\\%}\\def\\pas@pt{#1}', -' \\mbox{\\ifx\\def@pt\\pas@pt\\cite@rig{#2}\\else\\cite@rig[#1]{#2}\\fi}}', - '\\renewcommand{\\underbar}[1]{{\\let\\cite\\b@xcite\\uline{#1}}}']) +try: +document.preamble.index(r'\usepackage{ulem}') +except ValueError: +insert_to_preamble(document, strikeout_preamble) +insert_to_preamble(document, ulinelatex_preamble) def revert_custom_processors(document): @@ -2468,9 +2485,9 @@ convert = [[346, []], [352, [convert_splitindex]], [353, []], [354, []], - [355, []], + [355, [convert_strikeout]], [356, []], - [357, []], + [357, [convert_ulinelatex]], [358, []], [359, [convert_nomencl_width]], [360, []], diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py index f56d3ad..84b057a 100644 --- a/lib/lyx2lyx/lyx_2_1.py +++ b/lib/lyx2lyx/lyx_2_1.py @@ -24,7 +24,8 @@ import sys, os # Uncomment only what you need to import, please. -from parser_tools import count_pars_in_inset, del_token, find_token, find_token_exact, \ +from parser_tools import count_pars_in_inset, del_complete_lines, del_token, \ +find_token, find_token_exact, \ find_token_backwards, find_end_of, find_end_of_inset, find_end_of_layout, \ find_end_of_sequence, find_re, get_option_value, get_containing_layout, \ get_containing_inset, get_value, get_quoted_value, set_option_value @@ -618,15 +619,16 @@ def convert_use_package(document, pkg, commands, oldauto): # oldauto defines how the version we are converting from behaves: #