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.
This commit is contained in:
Georg Baum 2016-06-19 21:23:25 +02:00
parent 4bc2b248f7
commit d66d6f7805
30 changed files with 69 additions and 612 deletions

View File

@ -11,6 +11,10 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx.
----------------------- -----------------------
2016-06-19 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* Format incremented to 510
Removed external date inset
2016-06-16 Pavel Sanda <sanda@lyx.org> 2016-06-16 Pavel Sanda <sanda@lyx.org>
* Format incremented to 509. * Format incremented to 509.
New parameter "\use_microtype bool" for including microtype LaTeX New parameter "\use_microtype bool" for including microtype LaTeX

View File

@ -2311,7 +2311,6 @@ dist_scripts_DATA += \
scripts/convert_pdf.py \ scripts/convert_pdf.py \
scripts/convertDefault.py \ scripts/convertDefault.py \
scripts/csv2lyx.py \ scripts/csv2lyx.py \
scripts/date.py \
scripts/ext_copy.py \ scripts/ext_copy.py \
scripts/fen2ascii.py \ scripts/fen2ascii.py \
scripts/fig2pdftex.py \ scripts/fig2pdftex.py \

View File

@ -614,7 +614,6 @@ def checkFormatEntries(dtl_tools):
rc_entry = [r'''\Format asciichess asc "Plain text (chess output)" "" "" "%%" "" "" rc_entry = [r'''\Format asciichess asc "Plain text (chess output)" "" "" "%%" "" ""
\Format asciiimage asc "Plain text (image)" "" "" "%%" "" "" \Format asciiimage asc "Plain text (image)" "" "" "%%" "" ""
\Format asciixfig asc "Plain text (Xfig output)" "" "" "%%" "" "" \Format asciixfig asc "Plain text (Xfig output)" "" "" "%%" "" ""
\Format dateout tmp "date (output)" "" "" "%%" "" ""
\Format docbook sgml DocBook B "" "%%" "document,menu=export" "" \Format docbook sgml DocBook B "" "%%" "document,menu=export" ""
\Format docbook-xml xml "DocBook (XML)" "" "" "%%" "document,menu=export" "application/docbook+xml" \Format docbook-xml xml "DocBook (XML)" "" "" "%%" "document,menu=export" "application/docbook+xml"
\Format dot dot "Graphviz Dot" "" "" "%%" "vector" "text/vnd.graphviz" \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"''']) \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 # entries that do not need checkProg
addToRC(r'''\Format date "" "date command" "" "" "" "" "" addToRC(r'''\Format csv csv "Table (CSV)" "" "" "" "document" "text/csv"
\Format csv csv "Table (CSV)" "" "" "" "document" "text/csv"
\Format fax "" Fax "" "" "" "document" "" \Format fax "" Fax "" "" "" "document" ""
\Format lyx lyx LyX "" "" "" "" "application/x-lyx" \Format lyx lyx LyX "" "" "" "" "application/x-lyx"
\Format lyx13x 13.lyx "LyX 1.3.x" "" "" "" "document" "" \Format lyx13x 13.lyx "LyX 1.3.x" "" "" "" "document" ""
@ -1088,7 +1086,6 @@ def checkConverterEntries():
# Entries that do not need checkProg # Entries that do not need checkProg
addToRC(r''' addToRC(r'''
\converter csv lyx "python -tt $$s/scripts/csv2lyx.py $$i $$o" "" \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 docbook docbook-xml "cp $$i $$o" "xml"
\converter fen asciichess "python -tt $$s/scripts/fen2ascii.py $$i $$o" "" \converter fen asciichess "python -tt $$s/scripts/fen2ascii.py $$i $$o" ""
\converter lyx lyx13x "python -tt $$s/lyx2lyx/lyx2lyx -t 221 $$i > $$o" "" \converter lyx lyx13x "python -tt $$s/lyx2lyx/lyx2lyx -t 221 $$i > $$o" ""

View File

@ -1,5 +1,5 @@
#LyX 2.2 created this file. For more info see http://www.lyx.org/ #LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 508 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -171,6 +171,7 @@ graphicboxes
\font_osf false \font_osf false
\font_sf_scale 100 100 \font_sf_scale 100 100
\font_tt_scale 100 100 \font_tt_scale 100 100
\use_microtype false
\graphics default \graphics default
\default_output_format pdf2 \default_output_format pdf2
\output_sync 0 \output_sync 0
@ -38219,67 +38220,6 @@ target "http://en.wikipedia.org/wiki/XBoard"
. .
\end_layout \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 \begin_layout Description
Dia Dia
\begin_inset space ~ \begin_inset space ~
@ -38698,12 +38638,11 @@ Comparison of the date input methods.
\begin_layout Plain Layout \begin_layout Plain Layout
\align center \align center
\begin_inset Tabular \begin_inset Tabular
<lyxtabular version="3" rows="4" columns="4"> <lyxtabular version="3" rows="4" columns="3">
<features tabularvalignment="middle"> <features tabularvalignment="middle">
<column alignment="center" valignment="top"> <column alignment="center" valignment="top">
<column alignment="center" valignment="top"> <column alignment="center" valignment="top">
<column alignment="center" valignment="top"> <column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row> <row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text \begin_inset Text
@ -38719,18 +38658,6 @@ Document format
\begin_layout Plain Layout \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 \family sans
Insert\SpecialChar menuseparator Insert\SpecialChar menuseparator
Date Date
@ -38766,15 +38693,6 @@ today
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text \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 \begin_layout Plain Layout
as date as date
\end_layout \end_layout
@ -38810,15 +38728,6 @@ as \SpecialChar TeX
as date as date
\end_layout \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
\end_inset \end_inset
</cell> </cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@ -38848,15 +38757,6 @@ DVI, PDF, PS
as date as date
\end_layout \end_layout
\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 \end_inset
</cell> </cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">

View File

@ -1,5 +1,5 @@
#LyX 2.2 created this file. For more info see http://www.lyx.org/ #LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 508 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -174,6 +174,7 @@ graphicboxes
\font_osf false \font_osf false
\font_sf_scale 100 100 \font_sf_scale 100 100
\font_tt_scale 100 100 \font_tt_scale 100 100
\use_microtype false
\graphics default \graphics default
\default_output_format pdf2 \default_output_format pdf2
\output_sync 0 \output_sync 0
@ -38351,69 +38352,6 @@ target "http://de.wikipedia.org/wiki/XBoard"
erzeugt wurden. erzeugt wurden.
\end_layout \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 \begin_layout Description
Dia-Diagramm unterstützt Diagramme, die mit dem Programm Dia-Diagramm unterstützt Diagramme, die mit dem Programm
\series bold \series bold
@ -38803,12 +38741,11 @@ Vergleich der Datums-Eingaben
\begin_layout Plain Layout \begin_layout Plain Layout
\align center \align center
\begin_inset Tabular \begin_inset Tabular
<lyxtabular version="3" rows="4" columns="4"> <lyxtabular version="3" rows="4" columns="3">
<features tabularvalignment="middle"> <features tabularvalignment="middle">
<column alignment="center" valignment="top"> <column alignment="center" valignment="top">
<column alignment="center" valignment="top"> <column alignment="center" valignment="top">
<column alignment="center" valignment="top"> <column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row> <row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text \begin_inset Text
@ -38824,18 +38761,6 @@ Dokumentformat
\begin_layout Plain Layout \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 \family sans
Einfügen\SpecialChar menuseparator Einfügen\SpecialChar menuseparator
Datum Datum
@ -38871,15 +38796,6 @@ today
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text \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 \begin_layout Plain Layout
als Datum als Datum
\end_layout \end_layout
@ -38915,15 +38831,6 @@ als \SpecialChar TeX
als Datum als Datum
\end_layout \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
\end_inset \end_inset
</cell> </cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@ -38953,15 +38860,6 @@ DVI, PDF, PS
als Datum als Datum
\end_layout \end_layout
\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 \end_inset
</cell> </cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">

View File

@ -1,5 +1,5 @@
#LyX 2.2 created this file. For more info see http://www.lyx.org/ #LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 508 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -175,6 +175,7 @@ graphicboxes
\font_osf false \font_osf false
\font_sf_scale 100 100 \font_sf_scale 100 100
\font_tt_scale 100 100 \font_tt_scale 100 100
\use_microtype false
\graphics default \graphics default
\default_output_format pdf2 \default_output_format pdf2
\output_sync 0 \output_sync 0
@ -37934,67 +37935,6 @@ spreadsheet.lyx
para ver ejemplos de uso y posibles limitaciones. para ver ejemplos de uso y posibles limitaciones.
\end_layout \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 \begin_layout Description
Tipografía Tipografía
\begin_inset space ~ \begin_inset space ~
@ -38341,12 +38281,11 @@ Comparación de los métodos de inserción de fecha.
\begin_layout Plain Layout \begin_layout Plain Layout
\align center \align center
\begin_inset Tabular \begin_inset Tabular
<lyxtabular version="3" rows="4" columns="4"> <lyxtabular version="3" rows="4" columns="3">
<features tabularvalignment="middle"> <features tabularvalignment="middle">
<column alignment="center" valignment="top"> <column alignment="center" valignment="top">
<column alignment="center" valignment="top"> <column alignment="center" valignment="top">
<column alignment="center" valignment="top"> <column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row> <row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text \begin_inset Text
@ -38362,18 +38301,6 @@ Documento
\begin_layout Plain Layout \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 \family sans
Insertar\SpecialChar menuseparator Insertar\SpecialChar menuseparator
Fecha Fecha
@ -38409,15 +38336,6 @@ today
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text \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 \begin_layout Plain Layout
como fecha como fecha
\end_layout \end_layout
@ -38453,15 +38371,6 @@ como cuadro código \SpecialChar TeX
como fecha como fecha
\end_layout \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
\end_inset \end_inset
</cell> </cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@ -38491,15 +38400,6 @@ DVI, PDF, PS
como fecha como fecha
\end_layout \end_layout
\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 \end_inset
</cell> </cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">

View File

@ -1,5 +1,5 @@
#LyX 2.2 created this file. For more info see http://www.lyx.org/ #LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 508 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -177,6 +177,7 @@ graphicboxes
\font_osf false \font_osf false
\font_sf_scale 100 100 \font_sf_scale 100 100
\font_tt_scale 100 100 \font_tt_scale 100 100
\use_microtype false
\graphics default \graphics default
\default_output_format pdf2 \default_output_format pdf2
\output_sync 0 \output_sync 0
@ -38932,67 +38933,6 @@ target "http://fr.wikipedia.org/wiki/XBoard"
. .
\end_layout \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 \begin_layout Description
Diagramme Diagramme
\begin_inset space ~ \begin_inset space ~
@ -39471,12 +39411,11 @@ Comparaison des méthodes d'insertion de la date.
\begin_layout Plain Layout \begin_layout Plain Layout
\align center \align center
\begin_inset Tabular \begin_inset Tabular
<lyxtabular version="3" rows="4" columns="4"> <lyxtabular version="3" rows="4" columns="3">
<features tabularvalignment="middle"> <features tabularvalignment="middle">
<column alignment="center" valignment="top"> <column alignment="center" valignment="top">
<column alignment="center" valignment="top"> <column alignment="center" valignment="top">
<column alignment="center" valignment="top"> <column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row> <row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text \begin_inset Text
@ -39492,22 +39431,6 @@ Format du document
\begin_layout Plain Layout \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 \family sans
Insertion\SpecialChar menuseparator Insertion\SpecialChar menuseparator
Date Date
@ -39543,15 +39466,6 @@ today
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text \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 \begin_layout Plain Layout
comme date comme date
\end_layout \end_layout
@ -39587,15 +39501,6 @@ comme boîte de code \SpecialChar TeX
comme date comme date
\end_layout \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
\end_inset \end_inset
</cell> </cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@ -39625,15 +39530,6 @@ DVI, PDF, PS
comme date comme date
\end_layout \end_layout
\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 \end_inset
</cell> </cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">

View File

@ -1,5 +1,5 @@
#LyX 2.2 created this file. For more info see http://www.lyx.org/ #LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 508 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -212,6 +212,7 @@ End
\font_osf false \font_osf false
\font_sf_scale 100 100 \font_sf_scale 100 100
\font_tt_scale 100 100 \font_tt_scale 100 100
\use_microtype false
\graphics default \graphics default
\default_output_format pdf3 \default_output_format pdf3
\output_sync 0 \output_sync 0
@ -35726,60 +35727,6 @@ target "http://en.wikipedia.org/wiki/XBoard"
プログラムで作成されたチェス棋譜をサポートします. プログラムで作成されたチェス棋譜をサポートします.
\end_layout \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 \begin_layout Description
Dia このひな型は, Dia このひな型は,
\series bold \series bold
@ -36165,12 +36112,11 @@ name "tab:日付挿入方法"
\begin_layout Plain Layout \begin_layout Plain Layout
\align center \align center
\begin_inset Tabular \begin_inset Tabular
<lyxtabular version="3" rows="4" columns="4"> <lyxtabular version="3" rows="4" columns="3">
<features tabularvalignment="middle"> <features tabularvalignment="middle">
<column alignment="center" valignment="top"> <column alignment="center" valignment="top">
<column alignment="center" valignment="top"> <column alignment="center" valignment="top">
<column alignment="center" valignment="top"> <column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row> <row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text \begin_inset Text
@ -36186,18 +36132,6 @@ name "tab:日付挿入方法"
\begin_layout Plain Layout \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 \family sans
挿入\SpecialChar menuseparator 挿入\SpecialChar menuseparator
日付 日付
@ -36235,15 +36169,6 @@ today
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text \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 \begin_layout Plain Layout
日付として 日付として
\end_layout \end_layout
@ -36279,15 +36204,6 @@ today
日付として 日付として
\end_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
\end_inset \end_inset
</cell> </cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@ -36317,15 +36233,6 @@ DVI, PDF, PS
日付として 日付として
\end_layout \end_layout
\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 \end_inset
</cell> </cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">

View File

@ -409,38 +409,6 @@ Template PDFPages
TemplateEnd 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 Template Dia
GuiName "Dia diagram" GuiName "Dia diagram"
HelpText HelpText

View File

@ -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_0", list(range(346,414)), minor_versions("2.0" , 8)),
("2_1", list(range(414,475)), minor_versions("2.1" , 5)), ("2_1", list(range(414,475)), minor_versions("2.1" , 5)),
("2_2", list(range(475,509)), minor_versions("2.2" , 0)), ("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))
] ]
#################################################################### ####################################################################

View File

@ -30,14 +30,14 @@ import sys, os
# find_token_backwards, is_in_inset, get_value, get_quoted_value, \ # find_token_backwards, is_in_inset, get_value, get_quoted_value, \
# del_token, check_token, get_option_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, \ #from lyx2lyx_tools import add_to_preamble, put_cmd_in_ert, get_ert, lyx2latex, \
# lyx2verbatim, length_in_bp, convert_info_insets # lyx2verbatim, length_in_bp, convert_info_insets
# insert_to_preamble, latex_length, revert_flex_inset, \ # insert_to_preamble, latex_length, revert_flex_inset, \
# revert_font_attrs, hex2ratio, str2bool # 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 # Private helper functions
@ -75,6 +75,24 @@ def revert_microtype(document):
add_to_preamble(document, ["\\usepackage{microtype}"]) 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 # Conversion hub
@ -82,10 +100,12 @@ def revert_microtype(document):
supported_versions = ["2.3.0", "2.3"] supported_versions = ["2.3.0", "2.3"]
convert = [ convert = [
[509, [convert_microtype]] [509, [convert_microtype]],
[510, [convert_dateinset]]
] ]
revert = [ revert = [
[509, []],
[508, [revert_microtype]] [508, [revert_microtype]]
] ]

View File

@ -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)

View File

@ -12,8 +12,8 @@ LyX feature: LyX inset or document setting
Format LaTeX feature LyX feature Format LaTeX feature LyX feature
224 external insets defined in InsetExternal 224 external insets defined in InsetExternal
lib/external_templates. lib/external_templates.
(- Date and RasterImage cannot be supported (- RasterImage clashes with InsetGraphics
- Dia and LilyPond are an \includegraphics and can therefore onyl be imported as image - Dia and LilyPond are an \includegraphics and can therefore only be imported as image
- Chess diagram, PDF pages and Spreadsheet are supported) - Chess diagram, PDF pages and Spreadsheet are supported)
(Xfig figure, Lilypond, Dia diagram can be supported by looking at the file extension) (Xfig figure, Lilypond, Dia diagram can be supported by looking at the file extension)
226 nothing (impossible to import) InsetBranch, \branch...\end_branch 226 nothing (impossible to import) InsetBranch, \branch...\end_branch

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3 #LyX file created by tex2lyx 2.3
\lyxformat 509 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3 #LyX file created by tex2lyx 2.3
\lyxformat 509 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3 #LyX file created by tex2lyx 2.3
\lyxformat 509 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3 #LyX file created by tex2lyx 2.3
\lyxformat 509 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3 #LyX file created by tex2lyx 2.3
\lyxformat 509 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3 #LyX file created by tex2lyx 2.3
\lyxformat 509 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3 #LyX file created by tex2lyx 2.3
\lyxformat 509 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3 #LyX file created by tex2lyx 2.3
\lyxformat 509 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3 #LyX file created by tex2lyx 2.3
\lyxformat 509 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3 #LyX file created by tex2lyx 2.3
\lyxformat 509 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3 #LyX file created by tex2lyx 2.3
\lyxformat 509 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3 #LyX file created by tex2lyx 2.3
\lyxformat 509 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3 #LyX file created by tex2lyx 2.3
\lyxformat 509 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3 #LyX file created by tex2lyx 2.3
\lyxformat 509 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3 #LyX file created by tex2lyx 2.3
\lyxformat 509 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3 #LyX file created by tex2lyx 2.3
\lyxformat 509 \lyxformat 510
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true

View File

@ -32,8 +32,8 @@ extern char const * const lyx_version_info;
// Do not remove the comment below, so we get merge conflict in // Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own. // independent branches. Instead add your own.
#define LYX_FORMAT_LYX 509 // ps: microtype #define LYX_FORMAT_LYX 510 // gb: date inset
#define LYX_FORMAT_TEX2LYX 509 #define LYX_FORMAT_TEX2LYX 510
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX #if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
#ifndef _MSC_VER #ifndef _MSC_VER