From d66d6f7805da9085857f6229b6d96477ebaff092 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Sun, 19 Jun 2016 21:23:25 +0200 Subject: [PATCH] Remove external date inset The external date inset was implemented as a demonstrator for external insets in general. It was never intended for production code. Now that we have several external insets defined we do not need the demonstrator anymore. This fixes bugs #4398 and #9948. --- development/FORMAT | 4 + lib/Makefile.am | 1 - lib/configure.py | 5 +- lib/doc/EmbeddedObjects.lyx | 108 +---------------- lib/doc/de/EmbeddedObjects.lyx | 110 +---------------- lib/doc/es/EmbeddedObjects.lyx | 108 +---------------- lib/doc/fr/EmbeddedObjects.lyx | 112 +----------------- lib/doc/ja/EmbeddedObjects.lyx | 101 +--------------- lib/external_templates | 32 ----- lib/lyx2lyx/LyX.py | 2 +- lib/lyx2lyx/lyx_2_3.py | 26 +++- lib/scripts/date.py | 32 ----- src/tex2lyx/TODO.txt | 4 +- src/tex2lyx/test/CJK.lyx.lyx | 2 +- src/tex2lyx/test/CJKutf8.lyx.lyx | 2 +- src/tex2lyx/test/DummyDocument.lyx.lyx | 2 +- src/tex2lyx/test/Dummy~Document.lyx.lyx | 2 +- src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx | 2 +- src/tex2lyx/test/algo2e.lyx.lyx | 2 +- .../test/box-color-size-space-align.lyx.lyx | 2 +- src/tex2lyx/test/test-insets-basic.lyx.lyx | 2 +- src/tex2lyx/test/test-insets.lyx.lyx | 2 +- src/tex2lyx/test/test-memoir.lyx.lyx | 2 +- src/tex2lyx/test/test-modules.lyx.lyx | 2 +- .../test/test-refstyle-theorems.lyx.lyx | 2 +- src/tex2lyx/test/test-scr.lyx.lyx | 2 +- src/tex2lyx/test/test-structure.lyx.lyx | 2 +- src/tex2lyx/test/test.lyx.lyx | 2 +- src/tex2lyx/test/verbatim.lyx.lyx | 2 +- src/version.h | 4 +- 30 files changed, 69 insertions(+), 612 deletions(-) delete mode 100755 lib/scripts/date.py diff --git a/development/FORMAT b/development/FORMAT index f7bb30f08b..fb944cbd25 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -11,6 +11,10 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx. ----------------------- +2016-06-19 Georg Baum + * Format incremented to 510 + Removed external date inset + 2016-06-16 Pavel Sanda * Format incremented to 509. New parameter "\use_microtype bool" for including microtype LaTeX diff --git a/lib/Makefile.am b/lib/Makefile.am index 607fd70a3b..96ce5a65b2 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -2311,7 +2311,6 @@ dist_scripts_DATA += \ scripts/convert_pdf.py \ scripts/convertDefault.py \ scripts/csv2lyx.py \ - scripts/date.py \ scripts/ext_copy.py \ scripts/fen2ascii.py \ scripts/fig2pdftex.py \ diff --git a/lib/configure.py b/lib/configure.py index 3e66e9c4c6..d15b81d82c 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -614,7 +614,6 @@ def checkFormatEntries(dtl_tools): rc_entry = [r'''\Format asciichess asc "Plain text (chess output)" "" "" "%%" "" "" \Format asciiimage asc "Plain text (image)" "" "" "%%" "" "" \Format asciixfig asc "Plain text (Xfig output)" "" "" "%%" "" "" -\Format dateout tmp "date (output)" "" "" "%%" "" "" \Format docbook sgml DocBook B "" "%%" "document,menu=export" "" \Format docbook-xml xml "DocBook (XML)" "" "" "%%" "document,menu=export" "application/docbook+xml" \Format dot dot "Graphviz Dot" "" "" "%%" "vector" "text/vnd.graphviz" @@ -699,8 +698,7 @@ def checkFormatEntries(dtl_tools): \Format word2 docx "MS Word Office Open XML" O "%%" "%%" "document,vector,menu=export" "application/vnd.openxmlformats-officedocument.wordprocessingml.document"''']) # # entries that do not need checkProg - addToRC(r'''\Format date "" "date command" "" "" "" "" "" -\Format csv csv "Table (CSV)" "" "" "" "document" "text/csv" + addToRC(r'''\Format csv csv "Table (CSV)" "" "" "" "document" "text/csv" \Format fax "" Fax "" "" "" "document" "" \Format lyx lyx LyX "" "" "" "" "application/x-lyx" \Format lyx13x 13.lyx "LyX 1.3.x" "" "" "" "document" "" @@ -1088,7 +1086,6 @@ def checkConverterEntries(): # Entries that do not need checkProg addToRC(r''' \converter csv lyx "python -tt $$s/scripts/csv2lyx.py $$i $$o" "" -\converter date dateout "python -tt $$s/scripts/date.py %d-%m-%Y > $$o" "" \converter docbook docbook-xml "cp $$i $$o" "xml" \converter fen asciichess "python -tt $$s/scripts/fen2ascii.py $$i $$o" "" \converter lyx lyx13x "python -tt $$s/lyx2lyx/lyx2lyx -t 221 $$i > $$o" "" diff --git a/lib/doc/EmbeddedObjects.lyx b/lib/doc/EmbeddedObjects.lyx index 71d1e460ea..a6b23129b0 100644 --- a/lib/doc/EmbeddedObjects.lyx +++ b/lib/doc/EmbeddedObjects.lyx @@ -1,5 +1,5 @@ -#LyX 2.2 created this file. For more info see http://www.lyx.org/ -\lyxformat 508 +#LyX 2.3 created this file. For more info see http://www.lyx.org/ +\lyxformat 510 \begin_document \begin_header \save_transient_properties true @@ -171,6 +171,7 @@ graphicboxes \font_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 +\use_microtype false \graphics default \default_output_format pdf2 \output_sync 0 @@ -38219,67 +38220,6 @@ target "http://en.wikipedia.org/wiki/XBoard" . \end_layout -\begin_layout Description -Date This inserts the date in the form -\emph on -Day-Month-Year -\emph default -. - This is a date inserted as external material: -\begin_inset External - template Date - filename . - -\end_inset - - -\begin_inset space ~ -\end_inset - - -\begin_inset Note Note -status collapsed - -\begin_layout Plain Layout -Remove the protected space when bug 4398 is fixed! -\end_layout - -\end_inset - - -\begin_inset Newline newline -\end_inset - -The date is not shown within \SpecialChar LyX -, only in the output. - There are two other methods of inserting a date: Via menu -\family sans -Insert\SpecialChar menuseparator -Date -\family default - and with the \SpecialChar LaTeX - command -\series bold - -\backslash -today -\series default - as \SpecialChar TeX - Code. - The different methods are compared in Table -\begin_inset space ~ -\end_inset - - -\begin_inset CommandInset ref -LatexCommand ref -reference "tab:Comparison-of-the" - -\end_inset - -. -\end_layout - \begin_layout Description Dia \begin_inset space ~ @@ -38698,12 +38638,11 @@ Comparison of the date input methods. \begin_layout Plain Layout \align center \begin_inset Tabular - + - \begin_inset Text @@ -38719,18 +38658,6 @@ Document format \begin_layout Plain Layout -\family sans -External Material\SpecialChar menuseparator -Date -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout - \family sans Insert\SpecialChar menuseparator Date @@ -38766,15 +38693,6 @@ today \begin_inset Text -\begin_layout Plain Layout -as inset box -\end_layout - -\end_inset - - -\begin_inset Text - \begin_layout Plain Layout as date \end_layout @@ -38810,15 +38728,6 @@ as \SpecialChar TeX as date \end_layout -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -as date -\end_layout - \end_inset @@ -38848,15 +38757,6 @@ DVI, PDF, PS as date \end_layout -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -as date -\end_layout - \end_inset diff --git a/lib/doc/de/EmbeddedObjects.lyx b/lib/doc/de/EmbeddedObjects.lyx index ed30447950..f75afca94b 100644 --- a/lib/doc/de/EmbeddedObjects.lyx +++ b/lib/doc/de/EmbeddedObjects.lyx @@ -1,5 +1,5 @@ -#LyX 2.2 created this file. For more info see http://www.lyx.org/ -\lyxformat 508 +#LyX 2.3 created this file. For more info see http://www.lyx.org/ +\lyxformat 510 \begin_document \begin_header \save_transient_properties true @@ -174,6 +174,7 @@ graphicboxes \font_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 +\use_microtype false \graphics default \default_output_format pdf2 \output_sync 0 @@ -38351,69 +38352,6 @@ target "http://de.wikipedia.org/wiki/XBoard" erzeugt wurden. \end_layout -\begin_layout Description -Datum fügt ein Datum mit dem Format -\emph on -Tag-Monat-Jahr -\emph default - ein. - Hier ist ein Beispiel: -\begin_inset External - template Date - filename . - -\end_inset - - -\begin_inset space ~ -\end_inset - - -\begin_inset Note Note -status collapsed - -\begin_layout Plain Layout - -\lang english -Remove the protected space when bug 4398 is fixed! -\end_layout - -\end_inset - - -\begin_inset Newline newline -\end_inset - -Das Datum ist in \SpecialChar LyX - nicht zu sehen, nur in der Druckausgabe. - Es gibt noch zwei andere Möglichkeiten, ein Datum einzufügen: Über das - Menü -\family sans -Einfügen\SpecialChar menuseparator -Datum -\family default - und mit dem \SpecialChar LaTeX --Befehl -\series bold - -\backslash -today -\series default -. - Die verschiedenen Methoden werden in Tabelle -\begin_inset space ~ -\end_inset - - -\begin_inset CommandInset ref -LatexCommand ref -reference "tab:Vergleich-der-Datums-Eingaben" - -\end_inset - - verglichen. -\end_layout - \begin_layout Description Dia-Diagramm unterstützt Diagramme, die mit dem Programm \series bold @@ -38803,12 +38741,11 @@ Vergleich der Datums-Eingaben \begin_layout Plain Layout \align center \begin_inset Tabular - + - \begin_inset Text @@ -38824,18 +38761,6 @@ Dokumentformat \begin_layout Plain Layout -\family sans -Externes Material\SpecialChar menuseparator -Datum -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout - \family sans Einfügen\SpecialChar menuseparator Datum @@ -38871,15 +38796,6 @@ today \begin_inset Text -\begin_layout Plain Layout -als Box -\end_layout - -\end_inset - - -\begin_inset Text - \begin_layout Plain Layout als Datum \end_layout @@ -38915,15 +38831,6 @@ als \SpecialChar TeX als Datum \end_layout -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -als Datum -\end_layout - \end_inset @@ -38953,15 +38860,6 @@ DVI, PDF, PS als Datum \end_layout -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -als Datum -\end_layout - \end_inset diff --git a/lib/doc/es/EmbeddedObjects.lyx b/lib/doc/es/EmbeddedObjects.lyx index 05d534bf23..dc2902b980 100644 --- a/lib/doc/es/EmbeddedObjects.lyx +++ b/lib/doc/es/EmbeddedObjects.lyx @@ -1,5 +1,5 @@ -#LyX 2.2 created this file. For more info see http://www.lyx.org/ -\lyxformat 508 +#LyX 2.3 created this file. For more info see http://www.lyx.org/ +\lyxformat 510 \begin_document \begin_header \save_transient_properties true @@ -175,6 +175,7 @@ graphicboxes \font_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 +\use_microtype false \graphics default \default_output_format pdf2 \output_sync 0 @@ -37934,67 +37935,6 @@ spreadsheet.lyx para ver ejemplos de uso y posibles limitaciones. \end_layout -\begin_layout Description -Fecha Esta inserta la fecha en el formato -\emph on -Día-Mes-Año. - -\emph default - A continuación hay una fecha insertada como material externo: -\begin_inset External - template Date - filename . - -\end_inset - - -\begin_inset space ~ -\end_inset - - -\begin_inset Note Note -status collapsed - -\begin_layout Plain Layout -¡Quitar el espacio protegido cuando se arregle el fallo 4398! -\end_layout - -\end_inset - - -\begin_inset Newline newline -\end_inset - -La fecha no se muestra en \SpecialChar LyX -, sólo en la salida. - Hay otros dos métodos de insertar una fecha, con el menú -\family sans -Insertar\SpecialChar menuseparator -Fecha -\family default - y con el comando \SpecialChar LaTeX - -\series bold - -\backslash -today -\series default - en código \SpecialChar TeX -. - Los distintos métodos se comparan en el cuadro -\begin_inset space ~ -\end_inset - - -\begin_inset CommandInset ref -LatexCommand ref -reference "tab:Comparación-de" - -\end_inset - -. -\end_layout - \begin_layout Description Tipografía \begin_inset space ~ @@ -38341,12 +38281,11 @@ Comparación de los métodos de inserción de fecha. \begin_layout Plain Layout \align center \begin_inset Tabular - + - \begin_inset Text @@ -38362,18 +38301,6 @@ Documento \begin_layout Plain Layout -\family sans -Material externo\SpecialChar menuseparator -Fecha -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout - \family sans Insertar\SpecialChar menuseparator Fecha @@ -38409,15 +38336,6 @@ today \begin_inset Text -\begin_layout Plain Layout -como recuadro -\end_layout - -\end_inset - - -\begin_inset Text - \begin_layout Plain Layout como fecha \end_layout @@ -38453,15 +38371,6 @@ como cuadro código \SpecialChar TeX como fecha \end_layout -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -como fecha -\end_layout - \end_inset @@ -38491,15 +38400,6 @@ DVI, PDF, PS como fecha \end_layout -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -como fecha -\end_layout - \end_inset diff --git a/lib/doc/fr/EmbeddedObjects.lyx b/lib/doc/fr/EmbeddedObjects.lyx index 46088eb383..8b50f08c21 100644 --- a/lib/doc/fr/EmbeddedObjects.lyx +++ b/lib/doc/fr/EmbeddedObjects.lyx @@ -1,5 +1,5 @@ -#LyX 2.2 created this file. For more info see http://www.lyx.org/ -\lyxformat 508 +#LyX 2.3 created this file. For more info see http://www.lyx.org/ +\lyxformat 510 \begin_document \begin_header \save_transient_properties true @@ -177,6 +177,7 @@ graphicboxes \font_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 +\use_microtype false \graphics default \default_output_format pdf2 \output_sync 0 @@ -38932,67 +38933,6 @@ target "http://fr.wikipedia.org/wiki/XBoard" . \end_layout -\begin_layout Description -Date Ce modèle insère la date sous la forme -\emph on -Jour-Mois-Année -\emph default -. - Voici un exemple de date insérée comme objet externe : -\begin_inset External - template Date - filename . - -\end_inset - - -\begin_inset space ~ -\end_inset - - -\begin_inset Note Note -status collapsed - -\begin_layout Plain Layout -Retirer l'espace protégé quand le bug 4398 sera résolu ! -\end_layout - -\end_inset - - -\begin_inset Newline newline -\end_inset - -La date n'apparaîtra pas dans \SpecialChar LyX -, mais seulement dans la sortie imprimée. - Il y a deux autre méthodes pour insérer une date : Avec le menu -\family sans -Insertion\SpecialChar menuseparator -Date -\family default - et avec la commande \SpecialChar LaTeX - -\series bold - -\backslash -today -\series default - entrée comme code \SpecialChar TeX -. - Ces différentes méthodes sont comparée dans le tableau -\begin_inset space ~ -\end_inset - - -\begin_inset CommandInset ref -LatexCommand ref -reference "tab:Comparaison-des-dates" - -\end_inset - -. -\end_layout - \begin_layout Description Diagramme \begin_inset space ~ @@ -39471,12 +39411,11 @@ Comparaison des méthodes d'insertion de la date. \begin_layout Plain Layout \align center \begin_inset Tabular - + - \begin_inset Text @@ -39492,22 +39431,6 @@ Format du document \begin_layout Plain Layout -\family sans -Objet -\begin_inset space ~ -\end_inset - -Externe\SpecialChar menuseparator -Date -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout - \family sans Insertion\SpecialChar menuseparator Date @@ -39543,15 +39466,6 @@ today \begin_inset Text -\begin_layout Plain Layout -comme boîte d'insert -\end_layout - -\end_inset - - -\begin_inset Text - \begin_layout Plain Layout comme date \end_layout @@ -39587,15 +39501,6 @@ comme boîte de code \SpecialChar TeX comme date \end_layout -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -comme date -\end_layout - \end_inset @@ -39625,15 +39530,6 @@ DVI, PDF, PS comme date \end_layout -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -comme date -\end_layout - \end_inset diff --git a/lib/doc/ja/EmbeddedObjects.lyx b/lib/doc/ja/EmbeddedObjects.lyx index d20dbc814f..41ff45ff4d 100644 --- a/lib/doc/ja/EmbeddedObjects.lyx +++ b/lib/doc/ja/EmbeddedObjects.lyx @@ -1,5 +1,5 @@ -#LyX 2.2 created this file. For more info see http://www.lyx.org/ -\lyxformat 508 +#LyX 2.3 created this file. For more info see http://www.lyx.org/ +\lyxformat 510 \begin_document \begin_header \save_transient_properties true @@ -212,6 +212,7 @@ End \font_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 +\use_microtype false \graphics default \default_output_format pdf3 \output_sync 0 @@ -35726,60 +35727,6 @@ target "http://en.wikipedia.org/wiki/XBoard" プログラムで作成されたチェス棋譜をサポートします. \end_layout -\begin_layout Description -日付 これは, -\emph on -日-月-年 -\emph default -の書式で日付を挿入します.右は,外部素材として挿入された日付です: -\begin_inset External - template Date - filename . - -\end_inset - - -\begin_inset space ~ -\end_inset - - -\begin_inset Note Note -status collapsed - -\begin_layout Plain Layout -バグ4398が修正されたら,この保護空白は削除してください! -\end_layout - -\end_inset - - -\begin_inset Newline newline -\end_inset - -日付は\SpecialChar LyX -内では表示されず,出力のみで表示されます.日付を挿入するには,ほかに二つの方法があります.一つは, -\family sans -挿入 -\family default -\SpecialChar menuseparator -日付メニューを使用する方法で,他は\SpecialChar LaTeX -コマンドの -\series bold - -\backslash -today -\series default -を\SpecialChar TeX -コードで使用する方法です.これらの各方法は,表 -\begin_inset CommandInset ref -LatexCommand ref -reference "tab:日付挿入方法" - -\end_inset - -に比較を掲載しておきます. -\end_layout - \begin_layout Description Dia このひな型は, \series bold @@ -36165,12 +36112,11 @@ name "tab:日付挿入方法" \begin_layout Plain Layout \align center \begin_inset Tabular - + - \begin_inset Text @@ -36186,18 +36132,6 @@ name "tab:日付挿入方法" \begin_layout Plain Layout -\family sans -外部素材\SpecialChar menuseparator -日付 -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout - \family sans 挿入\SpecialChar menuseparator 日付 @@ -36235,15 +36169,6 @@ today \begin_inset Text -\begin_layout Plain Layout -差込枠として -\end_layout - -\end_inset - - -\begin_inset Text - \begin_layout Plain Layout 日付として \end_layout @@ -36279,15 +36204,6 @@ today 日付として \end_layout -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -日付として -\end_layout - \end_inset @@ -36317,15 +36233,6 @@ DVI, PDF, PS 日付として \end_layout -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -日付として -\end_layout - \end_inset diff --git a/lib/external_templates b/lib/external_templates index 54b6dbde0b..026f8837d4 100644 --- a/lib/external_templates +++ b/lib/external_templates @@ -409,38 +409,6 @@ Template PDFPages TemplateEnd -Template Date - GuiName "Date" - HelpText - Today's date. - Read 'info date' for more information. - HelpTextEnd - InputFormat date - FileFilter "*" - AutomaticProduction true - Preview Off - Format LaTeX - Product "$$Contents(\"$$Tempname\")" - UpdateFormat dateout - UpdateResult "$$Tempname" - FormatEnd - Format PDFLaTeX - Product "$$Contents(\"$$Tempname\")" - UpdateFormat dateout - UpdateResult "$$Tempname" - FormatEnd - Format Ascii - Product "$$Contents(\"$$Tempname\")" - UpdateFormat dateout - UpdateResult "$$Tempname" - FormatEnd - Format DocBook - Product "$$Contents(\"$$Tempname\")" - UpdateFormat dateout - UpdateResult "$$Tempname" - FormatEnd -TemplateEnd - Template Dia GuiName "Dia diagram" HelpText diff --git a/lib/lyx2lyx/LyX.py b/lib/lyx2lyx/LyX.py index 3ee9a68baf..bea3d678ce 100644 --- a/lib/lyx2lyx/LyX.py +++ b/lib/lyx2lyx/LyX.py @@ -92,7 +92,7 @@ format_relation = [("0_06", [200], minor_versions("0.6" , 4)), ("2_0", list(range(346,414)), minor_versions("2.0" , 8)), ("2_1", list(range(414,475)), minor_versions("2.1" , 5)), ("2_2", list(range(475,509)), minor_versions("2.2" , 0)), - ("2_3", list(range(509,510)), minor_versions("2.3" , 0)) + ("2_3", list(range(509,511)), minor_versions("2.3" , 0)) ] #################################################################### diff --git a/lib/lyx2lyx/lyx_2_3.py b/lib/lyx2lyx/lyx_2_3.py index f1596c0f6d..d6cba52539 100644 --- a/lib/lyx2lyx/lyx_2_3.py +++ b/lib/lyx2lyx/lyx_2_3.py @@ -30,14 +30,14 @@ import sys, os # find_token_backwards, is_in_inset, get_value, get_quoted_value, \ # del_token, check_token, get_option_value -from parser_tools import find_token, get_value +from parser_tools import find_token, find_end_of_inset, get_value #from lyx2lyx_tools import add_to_preamble, put_cmd_in_ert, get_ert, lyx2latex, \ # lyx2verbatim, length_in_bp, convert_info_insets # insert_to_preamble, latex_length, revert_flex_inset, \ # revert_font_attrs, hex2ratio, str2bool -from lyx2lyx_tools import add_to_preamble +from lyx2lyx_tools import add_to_preamble, put_cmd_in_ert #################################################################### # Private helper functions @@ -75,6 +75,24 @@ def revert_microtype(document): add_to_preamble(document, ["\\usepackage{microtype}"]) +def convert_dateinset(document): + ' Convert date external inset to ERT ' + i = 0 + while 1: + i = find_token(document.body, "\\begin_inset External", i) + if i == -1: + return + j = find_end_of_inset(document.body, i) + if j == -1: + document.warning("Malformed lyx document: Missing '\\end_inset' in convert_dateinset.") + i += 1 + continue + if get_value(document.body, 'template', i, j) == "Date": + document.body[i : j + 1] = put_cmd_in_ert("\\today ") + i += 1 + continue + + ## # Conversion hub @@ -82,10 +100,12 @@ def revert_microtype(document): supported_versions = ["2.3.0", "2.3"] convert = [ - [509, [convert_microtype]] + [509, [convert_microtype]], + [510, [convert_dateinset]] ] revert = [ + [509, []], [508, [revert_microtype]] ] diff --git a/lib/scripts/date.py b/lib/scripts/date.py deleted file mode 100755 index 39426e969d..0000000000 --- a/lib/scripts/date.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- - -# file date.py -# This file is part of LyX, the document processor. -# Licence details can be found in the file COPYING. - -# \author Enrico Forestieri - -# Full author contact details are available in file CREDITS. - -# Print the system date and time in the given format. See the python -# documentation for available formats (mostly the same as the POSIX std). -# This file is provided because the date command on Windows is not -# POSIX compliant. - -import sys -from time import strftime - -def main(argv): - if len(argv) > 2: - sys.stderr.write('Usage: python date.py []\n') - sys.exit(1) - - if len(argv) == 2: - format = argv[1] - else: - format = "%d-%m-%Y" - - print strftime(format) - -if __name__ == "__main__": - main(sys.argv) diff --git a/src/tex2lyx/TODO.txt b/src/tex2lyx/TODO.txt index 5305fea871..233950bf0c 100644 --- a/src/tex2lyx/TODO.txt +++ b/src/tex2lyx/TODO.txt @@ -12,8 +12,8 @@ LyX feature: LyX inset or document setting Format LaTeX feature LyX feature 224 external insets defined in InsetExternal lib/external_templates. - (- Date and RasterImage cannot be supported - - Dia and LilyPond are an \includegraphics and can therefore onyl be imported as image + (- RasterImage clashes with InsetGraphics + - Dia and LilyPond are an \includegraphics and can therefore only be imported as image - Chess diagram, PDF pages and Spreadsheet are supported) (Xfig figure, Lilypond, Dia diagram can be supported by looking at the file extension) 226 nothing (impossible to import) InsetBranch, \branch...\end_branch diff --git a/src/tex2lyx/test/CJK.lyx.lyx b/src/tex2lyx/test/CJK.lyx.lyx index 9c718835ae..7b713b0b48 100644 --- a/src/tex2lyx/test/CJK.lyx.lyx +++ b/src/tex2lyx/test/CJK.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.3 -\lyxformat 509 +\lyxformat 510 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/CJKutf8.lyx.lyx b/src/tex2lyx/test/CJKutf8.lyx.lyx index dbe414f53d..5ba3c778e4 100644 --- a/src/tex2lyx/test/CJKutf8.lyx.lyx +++ b/src/tex2lyx/test/CJKutf8.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.3 -\lyxformat 509 +\lyxformat 510 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/DummyDocument.lyx.lyx b/src/tex2lyx/test/DummyDocument.lyx.lyx index 50ece36f84..36ad7d0158 100644 --- a/src/tex2lyx/test/DummyDocument.lyx.lyx +++ b/src/tex2lyx/test/DummyDocument.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.3 -\lyxformat 509 +\lyxformat 510 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/Dummy~Document.lyx.lyx b/src/tex2lyx/test/Dummy~Document.lyx.lyx index 83b9899967..fec05eb6ea 100644 --- a/src/tex2lyx/test/Dummy~Document.lyx.lyx +++ b/src/tex2lyx/test/Dummy~Document.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.3 -\lyxformat 509 +\lyxformat 510 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx b/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx index b8765fa5a4..864d3b34e2 100644 --- a/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx +++ b/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.3 -\lyxformat 509 +\lyxformat 510 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/algo2e.lyx.lyx b/src/tex2lyx/test/algo2e.lyx.lyx index 6d0099bc1d..0d4f23b3af 100644 --- a/src/tex2lyx/test/algo2e.lyx.lyx +++ b/src/tex2lyx/test/algo2e.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.3 -\lyxformat 509 +\lyxformat 510 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/box-color-size-space-align.lyx.lyx b/src/tex2lyx/test/box-color-size-space-align.lyx.lyx index 37a8cac820..a93fedac73 100644 --- a/src/tex2lyx/test/box-color-size-space-align.lyx.lyx +++ b/src/tex2lyx/test/box-color-size-space-align.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.3 -\lyxformat 509 +\lyxformat 510 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-insets-basic.lyx.lyx b/src/tex2lyx/test/test-insets-basic.lyx.lyx index 9d5d0b8503..8467a17809 100644 --- a/src/tex2lyx/test/test-insets-basic.lyx.lyx +++ b/src/tex2lyx/test/test-insets-basic.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.3 -\lyxformat 509 +\lyxformat 510 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-insets.lyx.lyx b/src/tex2lyx/test/test-insets.lyx.lyx index 46a8cae848..cc8c66e03c 100644 --- a/src/tex2lyx/test/test-insets.lyx.lyx +++ b/src/tex2lyx/test/test-insets.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.3 -\lyxformat 509 +\lyxformat 510 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-memoir.lyx.lyx b/src/tex2lyx/test/test-memoir.lyx.lyx index bcb8f3b3d2..e56e1d9a07 100644 --- a/src/tex2lyx/test/test-memoir.lyx.lyx +++ b/src/tex2lyx/test/test-memoir.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.3 -\lyxformat 509 +\lyxformat 510 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-modules.lyx.lyx b/src/tex2lyx/test/test-modules.lyx.lyx index e597606555..5a3039bcf0 100644 --- a/src/tex2lyx/test/test-modules.lyx.lyx +++ b/src/tex2lyx/test/test-modules.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.3 -\lyxformat 509 +\lyxformat 510 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx b/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx index 00857bf54a..aea133c9dd 100644 --- a/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx +++ b/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.3 -\lyxformat 509 +\lyxformat 510 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-scr.lyx.lyx b/src/tex2lyx/test/test-scr.lyx.lyx index 7f3a5ccb52..9b5406c482 100644 --- a/src/tex2lyx/test/test-scr.lyx.lyx +++ b/src/tex2lyx/test/test-scr.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.3 -\lyxformat 509 +\lyxformat 510 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-structure.lyx.lyx b/src/tex2lyx/test/test-structure.lyx.lyx index f88f9dd827..d8bc0089a3 100644 --- a/src/tex2lyx/test/test-structure.lyx.lyx +++ b/src/tex2lyx/test/test-structure.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.3 -\lyxformat 509 +\lyxformat 510 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test.lyx.lyx b/src/tex2lyx/test/test.lyx.lyx index 842f40be6a..e2ebe2ccfa 100644 --- a/src/tex2lyx/test/test.lyx.lyx +++ b/src/tex2lyx/test/test.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.3 -\lyxformat 509 +\lyxformat 510 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/verbatim.lyx.lyx b/src/tex2lyx/test/verbatim.lyx.lyx index 9289267240..0e7b40e9c2 100644 --- a/src/tex2lyx/test/verbatim.lyx.lyx +++ b/src/tex2lyx/test/verbatim.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.3 -\lyxformat 509 +\lyxformat 510 \begin_document \begin_header \save_transient_properties true diff --git a/src/version.h b/src/version.h index d8aecddd33..883c5e2475 100644 --- a/src/version.h +++ b/src/version.h @@ -32,8 +32,8 @@ extern char const * const lyx_version_info; // Do not remove the comment below, so we get merge conflict in // independent branches. Instead add your own. -#define LYX_FORMAT_LYX 509 // ps: microtype -#define LYX_FORMAT_TEX2LYX 509 +#define LYX_FORMAT_LYX 510 // gb: date inset +#define LYX_FORMAT_TEX2LYX 510 #if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX #ifndef _MSC_VER -- 2.39.2