commit d66d6f7805da9085857f6229b6d96477ebaff092
Author: Georg Baum <[email protected]>
Date:   Sun Jun 19 21:23:25 2016 +0200

    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.

diff --git a/development/FORMAT b/development/FORMAT
index f7bb30f..fb944cb 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  <[email protected]>
+       * Format incremented to 510
+        Removed external date inset
+
 2016-06-16 Pavel Sanda <[email protected]>
        * Format incremented to 509.
        New parameter "\use_microtype bool" for including microtype LaTeX
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 607fd70..96ce5a6 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 3e66e9c..d15b81d 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 71d1e46..a6b2312 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
@@ -38220,67 +38221,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 ~
 \end_inset
@@ -38698,12 +38638,11 @@ Comparison of the date input methods.
 \begin_layout Plain Layout
 \align center
 \begin_inset Tabular
-<lyxtabular version="3" rows="4" columns="4">
+<lyxtabular version="3" rows="4" columns="3">
 <features tabularvalignment="middle">
 <column alignment="center" valignment="top">
 <column alignment="center" valignment="top">
 <column alignment="center" valignment="top">
-<column alignment="center" valignment="top">
 <row>
 <cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
 \begin_inset Text
@@ -38720,18 +38659,6 @@ Document format
 \begin_layout Plain Layout
 
 \family sans
-External Material\SpecialChar menuseparator
-Date
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family sans
 Insert\SpecialChar menuseparator
 Date
 \end_layout
@@ -38767,15 +38694,6 @@ today
 \begin_inset Text
 
 \begin_layout Plain Layout
-as inset box
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
 as date
 \end_layout
 
@@ -38812,15 +38730,6 @@ as date
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-as date
-\end_layout
-
-\end_inset
-</cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" 
rightline="true" usebox="none">
 \begin_inset Text
 
@@ -38850,15 +38759,6 @@ as date
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-as date
-\end_layout
-
-\end_inset
-</cell>
 <cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
diff --git a/lib/doc/de/EmbeddedObjects.lyx b/lib/doc/de/EmbeddedObjects.lyx
index ed30447..f75afca 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
@@ -38352,69 +38353,6 @@ target "http://de.wikipedia.org/wiki/XBoard";
 \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
-<lyxtabular version="3" rows="4" columns="4">
+<lyxtabular version="3" rows="4" columns="3">
 <features tabularvalignment="middle">
 <column alignment="center" valignment="top">
 <column alignment="center" valignment="top">
 <column alignment="center" valignment="top">
-<column alignment="center" valignment="top">
 <row>
 <cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
 \begin_inset Text
@@ -38825,18 +38762,6 @@ Dokumentformat
 \begin_layout Plain Layout
 
 \family sans
-Externes Material\SpecialChar menuseparator
-Datum
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family sans
 Einfügen\SpecialChar menuseparator
 Datum
 \end_layout
@@ -38872,15 +38797,6 @@ today
 \begin_inset Text
 
 \begin_layout Plain Layout
-als Box
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
 als Datum
 \end_layout
 
@@ -38917,15 +38833,6 @@ als Datum
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-als Datum
-\end_layout
-
-\end_inset
-</cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" 
rightline="true" usebox="none">
 \begin_inset Text
 
@@ -38955,15 +38862,6 @@ als Datum
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-als Datum
-\end_layout
-
-\end_inset
-</cell>
 <cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
diff --git a/lib/doc/es/EmbeddedObjects.lyx b/lib/doc/es/EmbeddedObjects.lyx
index 05d534b..dc2902b 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
@@ -37935,67 +37936,6 @@ spreadsheet.lyx
 \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 ~
 \end_inset
@@ -38341,12 +38281,11 @@ Comparación de los métodos de inserción de fecha.
 \begin_layout Plain Layout
 \align center
 \begin_inset Tabular
-<lyxtabular version="3" rows="4" columns="4">
+<lyxtabular version="3" rows="4" columns="3">
 <features tabularvalignment="middle">
 <column alignment="center" valignment="top">
 <column alignment="center" valignment="top">
 <column alignment="center" valignment="top">
-<column alignment="center" valignment="top">
 <row>
 <cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
 \begin_inset Text
@@ -38363,18 +38302,6 @@ Documento
 \begin_layout Plain Layout
 
 \family sans
-Material externo\SpecialChar menuseparator
-Fecha
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family sans
 Insertar\SpecialChar menuseparator
 Fecha
 \end_layout
@@ -38410,15 +38337,6 @@ today
 \begin_inset Text
 
 \begin_layout Plain Layout
-como recuadro
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
 como fecha
 \end_layout
 
@@ -38455,15 +38373,6 @@ como fecha
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-como fecha
-\end_layout
-
-\end_inset
-</cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" 
rightline="true" usebox="none">
 \begin_inset Text
 
@@ -38493,15 +38402,6 @@ como fecha
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-como fecha
-\end_layout
-
-\end_inset
-</cell>
 <cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
diff --git a/lib/doc/fr/EmbeddedObjects.lyx b/lib/doc/fr/EmbeddedObjects.lyx
index 46088eb..8b50f08 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
@@ -38933,67 +38934,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 ~
 \end_inset
@@ -39471,12 +39411,11 @@ Comparaison des méthodes d'insertion de la date.
 \begin_layout Plain Layout
 \align center
 \begin_inset Tabular
-<lyxtabular version="3" rows="4" columns="4">
+<lyxtabular version="3" rows="4" columns="3">
 <features tabularvalignment="middle">
 <column alignment="center" valignment="top">
 <column alignment="center" valignment="top">
 <column alignment="center" valignment="top">
-<column alignment="center" valignment="top">
 <row>
 <cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
 \begin_inset Text
@@ -39493,22 +39432,6 @@ Format du document
 \begin_layout Plain Layout
 
 \family sans
-Objet
-\begin_inset space ~
-\end_inset
-
-Externe\SpecialChar menuseparator
-Date
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family sans
 Insertion\SpecialChar menuseparator
 Date
 \end_layout
@@ -39544,15 +39467,6 @@ today
 \begin_inset Text
 
 \begin_layout Plain Layout
-comme boîte d'insert
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
 comme date
 \end_layout
 
@@ -39589,15 +39503,6 @@ comme date
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-comme date
-\end_layout
-
-\end_inset
-</cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" 
rightline="true" usebox="none">
 \begin_inset Text
 
@@ -39627,15 +39532,6 @@ comme date
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-comme date
-\end_layout
-
-\end_inset
-</cell>
 <cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
diff --git a/lib/doc/ja/EmbeddedObjects.lyx b/lib/doc/ja/EmbeddedObjects.lyx
index d20dbc8..41ff45f 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
@@ -35727,60 +35728,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
-<lyxtabular version="3" rows="4" columns="4">
+<lyxtabular version="3" rows="4" columns="3">
 <features tabularvalignment="middle">
 <column alignment="center" valignment="top">
 <column alignment="center" valignment="top">
 <column alignment="center" valignment="top">
-<column alignment="center" valignment="top">
 <row>
 <cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
 \begin_inset Text
@@ -36187,18 +36133,6 @@ name "tab:日付挿入方法"
 \begin_layout Plain Layout
 
 \family sans
-外部素材\SpecialChar menuseparator
-日付
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family sans
 挿入\SpecialChar menuseparator
 日付
 \end_layout
@@ -36236,15 +36170,6 @@ today
 \begin_inset Text
 
 \begin_layout Plain Layout
-差込枠として
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
 日付として
 \end_layout
 
@@ -36281,15 +36206,6 @@ today
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-日付として
-\end_layout
-
-\end_inset
-</cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" 
rightline="true" usebox="none">
 \begin_inset Text
 
@@ -36319,15 +36235,6 @@ DVI, PDF, PS
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-日付として
-\end_layout
-
-\end_inset
-</cell>
 <cell alignment="center" valignment="top" topline="true" bottomline="true" 
leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
diff --git a/lib/external_templates b/lib/external_templates
index 54b6dbd..026f883 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 3ee9a68..bea3d67 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 f1596c0..d6cba52 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 39426e9..0000000
--- 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 [<format>]\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 5305fea..233950b 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 9c71883..7b713b0 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 dbe414f..5ba3c77 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 50ece36..36ad7d0 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 83b9899..fec05eb 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 b8765fa..864d3b3 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 6d0099b..0d4f23b 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 37a8cac..a93feda 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 9d5d0b8..8467a17 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 46a8cae..cc8c66e 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 bcb8f3b..e56e1d9 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 e597606..5a3039b 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 00857bf..aea133c 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 7f3a5cc..9b5406c 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 f88f9dd..d8bc008 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 842f40b..e2ebe2c 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 9289267..0e7b40e 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 d8aecdd..883c5e2 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

Reply via email to