From 886db92f822ad4b346a15204e84abd9aa8fc040b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20St=C3=B6hr?= Date: Sun, 3 Feb 2008 11:56:44 +0000 Subject: [PATCH] enable the scrlttr 2 class for serial letters: - file format change - new example files and an example address database - remove ugly hack from scrlttr2.layout and fix bug 4529 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22764 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/FORMAT | 3 + development/scons/scons_manifest.py | 7 + lib/Makefile.am | 17 +- lib/examples/addressExample.adr | 32 +++ lib/examples/de/serienbrief1.lyx | 309 +++++++++++++++++++++++ lib/examples/de/serienbrief2.lyx | 251 +++++++++++++++++++ lib/examples/de/serienbrief3.lyx | 365 +++++++++++++++++++++++++++ lib/examples/serial_letter1.lyx | 309 +++++++++++++++++++++++ lib/examples/serial_letter2.lyx | 251 +++++++++++++++++++ lib/examples/serial_letter3.lyx | 366 ++++++++++++++++++++++++++++ lib/layouts/scrlttr2.layout | 28 ++- lib/lyx2lyx/LyX.py | 2 +- lib/lyx2lyx/lyx_1_6.py | 33 ++- src/Buffer.cpp | 2 +- 14 files changed, 1957 insertions(+), 18 deletions(-) create mode 100644 lib/examples/addressExample.adr create mode 100644 lib/examples/de/serienbrief1.lyx create mode 100644 lib/examples/de/serienbrief2.lyx create mode 100644 lib/examples/de/serienbrief3.lyx create mode 100644 lib/examples/serial_letter1.lyx create mode 100644 lib/examples/serial_letter2.lyx create mode 100644 lib/examples/serial_letter3.lyx diff --git a/development/FORMAT b/development/FORMAT index fcf3fce47a..70d242d9ed 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -1,6 +1,9 @@ LyX file-format changes ----------------------- +2008-02-03 Uwe Stöhr + * Format incremented to 314: adapt scrlttr2 class for serial letters + 2008-01-12 Richard Heck * Format incremented to 313: change in how modules are represented diff --git a/development/scons/scons_manifest.py b/development/scons/scons_manifest.py index efcdea42f9..d9d9b4c7bd 100644 --- a/development/scons/scons_manifest.py +++ b/development/scons/scons_manifest.py @@ -2283,6 +2283,7 @@ lib_examples_files = Split(''' Minipage.lyx aa_sample.lyx aas_sample.lyx + addressExample.adr amsart-test.lyx amsbook-test.lyx armenian-article.lyx @@ -2317,6 +2318,9 @@ lib_examples_files = Split(''' noweb2lyx.lyx powerdot-example.lyx script_form.lyx + serial_letter1.lyx + serial_letter2.lyx + serial_letter3.lyx simplecv.lyx splash.lyx ''') @@ -2345,6 +2349,9 @@ lib_examples_de_files = Split(''' beispiel_gelyxt.lyx beispiel_roh.lyx multicol.lyx + serienbrief1.lyx + serienbrief2.lyx + serienbrief3.lyx splash.lyx ''') diff --git a/lib/Makefile.am b/lib/Makefile.am index ece1cd7e36..85f8dc8018 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -83,14 +83,17 @@ dist_daexamples_DATA = \ deexamplesdir = $(pkgdatadir)/examples/de dist_deexamples_DATA = \ - examples/de/ItemizeBullets.lyx \ - examples/de/Lebenslauf.lyx \ - examples/de/Minipage.lyx \ examples/de/beispiel_gelyxt.lyx \ examples/de/beispiel_roh.lyx \ examples/de/Dezimal.lyx \ - examples/de/splash.lyx \ - examples/de/multicol.lyx + examples/de/ItemizeBullets.lyx \ + examples/de/Lebenslauf.lyx \ + examples/de/Minipage.lyx \ + examples/de/multicol.lyx \ + examples/de/serienbrief1.lyx \ + examples/de/serienbrief2.lyx \ + examples/de/serienbrief3.ly \ + examples/de/splash.lyx esexamplesdir = $(pkgdatadir)/examples/es dist_esexamples_DATA = \ @@ -191,6 +194,7 @@ dist_examples_DATA = \ examples/Minipage.lyx \ examples/aa_sample.lyx \ examples/aas_sample.lyx \ + examples/addressExample.adr \ examples/amsart-test.lyx \ examples/amsbook-test.lyx \ examples/armenian-article.lyx \ @@ -225,6 +229,9 @@ dist_examples_DATA = \ examples/noweb2lyx.lyx \ examples/powerdot-example.lyx \ examples/script_form.lyx \ + examples/serial_letter1.lyx \ + examples/serial_letter2.lyx \ + examples/serial_letter3.lyx \ examples/simplecv.lyx \ examples/splash.lyx diff --git a/lib/examples/addressExample.adr b/lib/examples/addressExample.adr new file mode 100644 index 0000000000..7e3244bb50 --- /dev/null +++ b/lib/examples/addressExample.adr @@ -0,0 +1,32 @@ +\adrentry{Boehme} + {Wilhelm} + {Ubierweg 49\\754127 Dingsda} + {0227557/35448} + {m} + {} + {alter Kollege} + {WILBOE} +\adrentry{Zylla} + {Rieke} + {Salierweg 9\\850289 Kolonia} + {022811/458290} + {w} + {} + {Versicherung} + {RIEZY} +\adrentry{Klausen} + {Daniela} + {Promenadenweg 17\\23155 Fuhlingen} + {0672289/30945} + {w} + {} + {Freundin} + {DANKLA} +\adrentry{Tollmann} + {Gerd} + {Ginsterweg 119\\48890 Karlingen} + {074418/90833} + {m} + {} + {Urlaub} + {GERTO} diff --git a/lib/examples/de/serienbrief1.lyx b/lib/examples/de/serienbrief1.lyx new file mode 100644 index 0000000000..6f9ac5cbe7 --- /dev/null +++ b/lib/examples/de/serienbrief1.lyx @@ -0,0 +1,309 @@ +#LyX 1.6.0svn created this file. For more info see http://www.lyx.org/ +\lyxformat 314 +\begin_document +\begin_header +\textclass scrlttr2 +\begin_preamble +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Here you can modify the layout of your letter +%% Have a look at the KOMA script documentation +%% for details. Most commands are commented out +%% here (i.e. we use default settings) +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% Load an *.lco style file (see KOMA documentation) +\LoadLetterOption{DIN}% + +%% THE CLASS OPTIONS +%% Remove preceeding '%' to uncomment an item +\KOMAoptions{% +%headsepline=true,% separate the header with a line on page >1 +%footsepline=true,% separate the footer with a line on page >1 +%pagenumber=botcenter,% position of the page number (see docu) +%parskip=false,% Use indent instead of skip (more options cf. docu) +fromalign=center,% alignment of the address +fromrule=aftername,% separate the address with a line? +fromphone=true,% print sender phone number +%fromfax=true,% print sender fax number +fromemail=true,% print sender e-mail address +fromurl=true% print sender URL +%fromlogo=true,% print a logo (position depends on fromalign) +%addrfield=false,% print an address field? +%backaddress=false,% print the back address? +%subject=afteropening,titled,% alternative subject layout and position +%locfield=narrow,% width of the (extra) location field +%foldmarks=false,% print foldmarks? +%numericaldate=true,% date layout +%refline=wide% layout of the refline +} + +%% Customize Separators +%\setkomavar{placeseparator}{ -- } +\setkomavar{backaddressseparator}{ $\cdot$ } +%\setkomavar{emailseparator}{ --> } +%\setkomavar{enclseparator}{ > } +%\setkomavar{faxseparator}{ --> } +%\setkomavar{phoneseparator}{ --> } +%\setkomavar{subjectseparator}{ >>> } + +%% Customize fonts +%% Use LaTeX's standard font commands +%% Modify with \setkomafont or \addtokomafont +%% (see KOMA documentation) +\setkomafont{backaddress}{\rmfamily} +%\setkomafont{descriptionlabel}{} +\setkomafont{fromaddress}{\small} +\setkomafont{fromname}{\scshape} +%\setkomafont{pagefoot}{} +%\setkomafont{pagehead}{} +%\setkomafont{pagenumber}{} +%\setkomafont{subject}{} +%\setkomafont{title}{} +\end_preamble +\language ngerman +\inputencoding auto +\font_roman palatino +\font_sans default +\font_typewriter default +\font_default_family default +\font_sc false +\font_osf false +\font_sf_scale 100 +\font_tt_scale 100 +\graphics default +\paperfontsize 11 +\spacing other 1.15 +\use_hyperref false +\papersize default +\use_geometry false +\use_amsmath 0 +\use_esint 0 +\cite_engine basic +\use_bibtopic false +\paperorientation portrait +\secnumdepth 3 +\tocdepth 3 +\paragraph_separation skip +\defskip medskip +\quotes_language german +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tracking_changes false +\output_changes false +\author "" +\author "" +\end_header + +\begin_body + +\begin_layout Name +Das LyX Entwickler Team +\end_layout + +\begin_layout SenderAddress +Planstr. + 140 +\newline +99999 Planstadt +\end_layout + +\begin_layout Telephone +0011/222\InsetSpace \thinspace{} +333 +\end_layout + +\begin_layout E-Mail +lyx-users@lists.lyx.org +\end_layout + +\begin_layout URL +www.lyx.org +\end_layout + +\begin_layout Backaddress +Das LyX Entwickler Team +\newline +Planstr. + 140 +\newline +99999 Planstadt +\end_layout + +\begin_layout Signature +Das LyX Team +\end_layout + +\begin_layout Subject +Neues KOMA letter Layout +\end_layout + +\begin_layout Place +Im Internet +\end_layout + +\begin_layout Date +\begin_inset ERT +status collapsed + +\begin_layout Standard + +\backslash +today +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Standard + +\backslash +renewcommand*{ +\backslash +adrentry}[8]{ +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Address +\begin_inset ERT +status collapsed + +\begin_layout Standard +#2 #1 +\backslash + +\backslash +#3 +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Opening +Hallo +\begin_inset ERT +status collapsed + +\begin_layout Standard +#2 #1 +\end_layout + +\end_inset + +, +\end_layout + +\begin_layout Standard +dieses Beispiel zeigt einen Serienbrief an +\series bold +alle Personen +\series default + einer Adressdatenbank. + Der Aufbau von Adressdatenbanken ist der unten angegebenen Dokumentation + beschrieben. +\end_layout + +\begin_layout Standard +Die Vorlage beschreibt den Gebrauch der neuen scrlttr2-Klasse, die mit KOMA-Scri +pt 2.9 eingeführt wurde. + Diese, den europäischen Bedürfnissen angepasste Klasse, ist sehr flexibel. + Im LyX-Menü +\family sans +Dokument\SpecialChar \menuseparator +Einstellungen\SpecialChar \menuseparator +LaTeX-Vorspann +\family default + finden sich die Einstellmöglichkeiten der meisten gebräuchlichen Parameter. + Die KOMA Script Dokumentation +\begin_inset Foot +status collapsed + +\begin_layout Standard +ftp://ftp.dante.de/tex-archive/macros/latex/contrib/koma-script/scrguide.pdf +\end_layout + +\end_inset + + liefert weitere Hinweise. +\end_layout + +\begin_layout Closing +Viel Spaß! +\end_layout + +\begin_layout PS +p.\InsetSpace \thinspace{} +s.: Blaufarbige Items sollen vor der Adresse eingefügt werden, magentafarbige + danach. +\end_layout + +\begin_layout CC +Die LyX User +\end_layout + +\begin_layout EndLetter +\begin_inset Note Note +status collapsed + +\begin_layout Standard +keep this environment empty +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Standard +} +\end_layout + +\end_inset + + +\begin_inset Note Note +status collapsed + +\begin_layout Standard +Schließt den +\series bold + +\backslash +renewcommand* +\series default + Befehl von oben ab. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset CommandInset include +LatexCommand input +filename "../addressExample.adr" + +\end_inset + + +\end_layout + +\end_body +\end_document diff --git a/lib/examples/de/serienbrief2.lyx b/lib/examples/de/serienbrief2.lyx new file mode 100644 index 0000000000..8188ba70d7 --- /dev/null +++ b/lib/examples/de/serienbrief2.lyx @@ -0,0 +1,251 @@ +#LyX 1.6.0svn created this file. For more info see http://www.lyx.org/ +\lyxformat 314 +\begin_document +\begin_header +\textclass scrlttr2 +\begin_preamble +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Here you can modify the layout of your letter +%% Have a look at the KOMA script documentation +%% for details. Most commands are commented out +%% here (i.e. we use default settings) +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% Load an *.lco style file (see KOMA documentation) +\LoadLetterOption{DIN}% + +%% THE CLASS OPTIONS +%% Remove preceeding '%' to uncomment an item +\KOMAoptions{% +%headsepline=true,% separate the header with a line on page >1 +%footsepline=true,% separate the footer with a line on page >1 +%pagenumber=botcenter,% position of the page number (see docu) +%parskip=false,% Use indent instead of skip (more options cf. docu) +fromalign=center,% alignment of the address +fromrule=aftername,% separate the address with a line? +fromphone=true,% print sender phone number +%fromfax=true,% print sender fax number +fromemail=true,% print sender e-mail address +fromurl=true% print sender URL +%fromlogo=true,% print a logo (position depends on fromalign) +%addrfield=false,% print an address field? +%backaddress=false,% print the back address? +%subject=afteropening,titled,% alternative subject layout and position +%locfield=narrow,% width of the (extra) location field +%foldmarks=false,% print foldmarks? +%numericaldate=true,% date layout +%refline=wide% layout of the refline +} + +%% Customize Separators +%\setkomavar{placeseparator}{ -- } +\setkomavar{backaddressseparator}{ $\cdot$ } +%\setkomavar{emailseparator}{ --> } +%\setkomavar{enclseparator}{ > } +%\setkomavar{faxseparator}{ --> } +%\setkomavar{phoneseparator}{ --> } +%\setkomavar{subjectseparator}{ >>> } + +%% Customize fonts +%% Use LaTeX's standard font commands +%% Modify with \setkomafont or \addtokomafont +%% (see KOMA documentation) +\setkomafont{backaddress}{\rmfamily} +%\setkomafont{descriptionlabel}{} +\setkomafont{fromaddress}{\small} +\setkomafont{fromname}{\scshape} +%\setkomafont{pagefoot}{} +%\setkomafont{pagehead}{} +%\setkomafont{pagenumber}{} +%\setkomafont{subject}{} +%\setkomafont{title}{} +\end_preamble +\language ngerman +\inputencoding auto +\font_roman palatino +\font_sans default +\font_typewriter default +\font_default_family default +\font_sc false +\font_osf false +\font_sf_scale 100 +\font_tt_scale 100 +\graphics default +\paperfontsize 11 +\spacing other 1.15 +\use_hyperref false +\papersize default +\use_geometry false +\use_amsmath 0 +\use_esint 0 +\cite_engine basic +\use_bibtopic false +\paperorientation portrait +\secnumdepth 3 +\tocdepth 3 +\paragraph_separation skip +\defskip medskip +\quotes_language german +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tracking_changes false +\output_changes false +\author "" +\author "" +\end_header + +\begin_body + +\begin_layout Name +Das LyX Entwickler Team +\end_layout + +\begin_layout SenderAddress +Planstr. + 140 +\newline +99999 Planstadt +\end_layout + +\begin_layout Telephone +0011/222\InsetSpace \thinspace{} +333 +\end_layout + +\begin_layout E-Mail +lyx-users@lists.lyx.org +\end_layout + +\begin_layout URL +www.lyx.org +\end_layout + +\begin_layout Backaddress +Das LyX Entwickler Team +\newline +Planstr. + 140 +\newline +99999 Planstadt +\end_layout + +\begin_layout Signature +Das LyX Team +\end_layout + +\begin_layout Subject +Neues KOMA letter Layout +\end_layout + +\begin_layout Place +Im Internet +\end_layout + +\begin_layout Date +\begin_inset ERT +status collapsed + +\begin_layout Standard + +\backslash +today +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset CommandInset include +LatexCommand input +filename "../addressExample.adr" + +\end_inset + + +\end_layout + +\begin_layout Address +\begin_inset ERT +status collapsed + +\begin_layout Standard + +\backslash +WILBOE +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Opening +Hallo lieber Wilhelm, +\end_layout + +\begin_layout Standard +dieses Beispiel zeigt einen Serienbrief an +\series bold +eine Person +\series default + der Adressdatenbank. + Der Aufbau von Adressdatenbanken ist der unten angegebenen Dokumentation + beschrieben. +\end_layout + +\begin_layout Standard +Die Vorlage beschreibt den Gebrauch der neuen scrlttr2-Klasse, die mit KOMA-Scri +pt 2.9 eingeführt wurde. + Diese, den europäischen Bedürfnissen angepasste Klasse, ist sehr flexibel. + Im LyX-Menü +\family sans +Dokument\SpecialChar \menuseparator +Einstellungen\SpecialChar \menuseparator +LaTeX-Vorspann +\family default + finden sich die Einstellmöglichkeiten der meisten gebräuchlichen Parameter. + Die KOMA Script Dokumentation +\begin_inset Foot +status collapsed + +\begin_layout Standard +ftp://ftp.dante.de/tex-archive/macros/latex/contrib/koma-script/scrguide.pdf +\end_layout + +\end_inset + + liefert weitere Hinweise. +\end_layout + +\begin_layout Closing +Viel Spaß! +\end_layout + +\begin_layout PS +p.\InsetSpace \thinspace{} +s.: Blaufarbige Items sollen vor der Adresse eingefügt werden, magentafarbige + danach. +\end_layout + +\begin_layout CC +Die LyX User +\end_layout + +\begin_layout EndLetter +\begin_inset Note Note +status collapsed + +\begin_layout Standard +keep this environment empty +\end_layout + +\end_inset + + +\end_layout + +\end_body +\end_document diff --git a/lib/examples/de/serienbrief3.lyx b/lib/examples/de/serienbrief3.lyx new file mode 100644 index 0000000000..96ef70905f --- /dev/null +++ b/lib/examples/de/serienbrief3.lyx @@ -0,0 +1,365 @@ +#LyX 1.6.0svn created this file. For more info see http://www.lyx.org/ +\lyxformat 314 +\begin_document +\begin_header +\textclass scrlttr2 +\begin_preamble +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Here you can modify the layout of your letter +%% Have a look at the KOMA script documentation +%% for details. Most commands are commented out +%% here (i.e. we use default settings) +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% Load an *.lco style file (see KOMA documentation) +\LoadLetterOption{DIN}% + +%% THE CLASS OPTIONS +%% Remove preceeding '%' to uncomment an item +\KOMAoptions{% +%headsepline=true,% separate the header with a line on page >1 +%footsepline=true,% separate the footer with a line on page >1 +%pagenumber=botcenter,% position of the page number (see docu) +%parskip=false,% Use indent instead of skip (more options cf. docu) +fromalign=center,% alignment of the address +fromrule=aftername,% separate the address with a line? +fromphone=true,% print sender phone number +%fromfax=true,% print sender fax number +fromemail=true,% print sender e-mail address +fromurl=true% print sender URL +%fromlogo=true,% print a logo (position depends on fromalign) +%addrfield=false,% print an address field? +%backaddress=false,% print the back address? +%subject=afteropening,titled,% alternative subject layout and position +%locfield=narrow,% width of the (extra) location field +%foldmarks=false,% print foldmarks? +%numericaldate=true,% date layout +%refline=wide% layout of the refline +} + +%% Customize Separators +%\setkomavar{placeseparator}{ -- } +\setkomavar{backaddressseparator}{ $\cdot$ } +%\setkomavar{emailseparator}{ --> } +%\setkomavar{enclseparator}{ > } +%\setkomavar{faxseparator}{ --> } +%\setkomavar{phoneseparator}{ --> } +%\setkomavar{subjectseparator}{ >>> } + +%% Customize fonts +%% Use LaTeX's standard font commands +%% Modify with \setkomafont or \addtokomafont +%% (see KOMA documentation) +\setkomafont{backaddress}{\rmfamily} +%\setkomafont{descriptionlabel}{} +\setkomafont{fromaddress}{\small} +\setkomafont{fromname}{\scshape} +%\setkomafont{pagefoot}{} +%\setkomafont{pagehead}{} +%\setkomafont{pagenumber}{} +%\setkomafont{subject}{} +%\setkomafont{title}{} +\end_preamble +\language ngerman +\inputencoding auto +\font_roman palatino +\font_sans default +\font_typewriter default +\font_default_family default +\font_sc false +\font_osf false +\font_sf_scale 100 +\font_tt_scale 100 +\graphics default +\paperfontsize 11 +\spacing other 1.15 +\use_hyperref false +\papersize default +\use_geometry false +\use_amsmath 0 +\use_esint 0 +\cite_engine basic +\use_bibtopic false +\paperorientation portrait +\secnumdepth 3 +\tocdepth 3 +\paragraph_separation skip +\defskip medskip +\quotes_language german +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tracking_changes false +\output_changes false +\author "" +\author "" +\end_header + +\begin_body + +\begin_layout Name +Das LyX Entwickler Team +\end_layout + +\begin_layout SenderAddress +Planstr. + 140 +\newline +99999 Planstadt +\end_layout + +\begin_layout Telephone +0011/222\InsetSpace \thinspace{} +333 +\end_layout + +\begin_layout E-Mail +lyx-users@lists.lyx.org +\end_layout + +\begin_layout URL +www.lyx.org +\end_layout + +\begin_layout Backaddress +Das LyX Entwickler Team +\newline +Planstr. + 140 +\newline +99999 Planstadt +\end_layout + +\begin_layout Signature +Das LyX Team +\end_layout + +\begin_layout Subject +Neues KOMA letter Layout +\end_layout + +\begin_layout Place +Im Internet +\end_layout + +\begin_layout Date +\begin_inset ERT +status collapsed + +\begin_layout Standard + +\backslash +today +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Standard + +\backslash +renewcommand*{ +\backslash +adrentry}[8]{ +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Standard + +\backslash +if #5w +\end_layout + +\end_inset + + +\begin_inset Note Note +status open + +\begin_layout Standard +wenn Person weiblich ist +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Address +\begin_inset ERT +status collapsed + +\begin_layout Standard +#2 #1 +\backslash + +\backslash +# +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Opening +Sehr geehrte Frau +\begin_inset ERT +status collapsed + +\begin_layout Standard +#1 +\end_layout + +\end_inset + +, +\end_layout + +\begin_layout Standard +dieses Beispiel zeigt einen Serienbrief an +\series bold +alle weiblichen Personen +\series default + der Adressdatenbank. + Der Aufbau von Adressdatenbanken ist der unten angegebenen Dokumentation + beschrieben. +\end_layout + +\begin_layout Standard +Die Vorlage beschreibt den Gebrauch der neuen scrlttr2-Klasse, die mit KOMA-Scri +pt 2.9 eingeführt wurde. + Diese, den europäischen Bedürfnissen angepasste Klasse, ist sehr flexibel. + Im LyX-Menü +\family sans +Dokument\SpecialChar \menuseparator +Einstellungen\SpecialChar \menuseparator +LaTeX-Vorspann +\family default + finden sich die Einstellmöglichkeiten der meisten gebräuchlichen Parameter. + Die KOMA Script Dokumentation +\begin_inset Foot +status collapsed + +\begin_layout Standard +ftp://ftp.dante.de/tex-archive/macros/latex/contrib/koma-script/scrguide.pdf +\end_layout + +\end_inset + + liefert weitere Hinweise. +\end_layout + +\begin_layout Closing +Viel Spaß! +\end_layout + +\begin_layout PS +p.\InsetSpace \thinspace{} +s.: Blaufarbige Items sollen vor der Adresse eingefügt werden, magentafarbige + danach. +\end_layout + +\begin_layout CC +Die LyX User +\end_layout + +\begin_layout EndLetter +\begin_inset Note Note +status collapsed + +\begin_layout Standard +keep this environment empty +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Standard + +\backslash +fi +\end_layout + +\end_inset + + +\begin_inset Note Note +status collapsed + +\begin_layout Standard +Schließt obigen +\series bold + +\backslash +if +\series default + Befehl ab. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Standard +} +\end_layout + +\end_inset + + +\begin_inset Note Note +status collapsed + +\begin_layout Standard +Schließt obigen +\series bold + +\backslash +renewcommand* +\series default + Befehl ab. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset CommandInset include +LatexCommand input +filename "../addressExample.adr" + +\end_inset + + +\end_layout + +\end_body +\end_document diff --git a/lib/examples/serial_letter1.lyx b/lib/examples/serial_letter1.lyx new file mode 100644 index 0000000000..6007318043 --- /dev/null +++ b/lib/examples/serial_letter1.lyx @@ -0,0 +1,309 @@ +#LyX 1.6.0svn created this file. For more info see http://www.lyx.org/ +\lyxformat 314 +\begin_document +\begin_header +\textclass scrlttr2 +\begin_preamble +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Here you can modify the layout of your letter +%% Have a look at the KOMA script documentation +%% for details. Most commands are commented out +%% here (i.e. we use default settings) +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% Load an *.lco style file (see KOMA documentation) +\LoadLetterOption{DIN}% + +%% THE CLASS OPTIONS +%% Remove preceeding '%' to uncomment an item +\KOMAoptions{% +%headsepline=true,% separate the header with a line on page >1 +%footsepline=true,% separate the footer with a line on page >1 +%pagenumber=botcenter,% position of the page number (see docu) +%parskip=false,% Use indent instead of skip (more options cf. docu) +fromalign=center,% alignment of the address +fromrule=aftername,% separate the address with a line? +fromphone=true,% print sender phone number +%fromfax=true,% print sender fax number +fromemail=true,% print sender e-mail address +fromurl=true% print sender URL +%fromlogo=true,% print a logo (position depends on fromalign) +%addrfield=false,% print an address field? +%backaddress=false,% print the back address? +%subject=afteropening,titled,% alternative subject layout and position +%locfield=narrow,% width of the (extra) location field +%foldmarks=false,% print foldmarks? +%numericaldate=true,% date layout +%refline=wide% layout of the refline +} + +%% Customize Separators +%\setkomavar{placeseparator}{ -- } +\setkomavar{backaddressseparator}{ $\cdot$ } +%\setkomavar{emailseparator}{ --> } +%\setkomavar{enclseparator}{ > } +%\setkomavar{faxseparator}{ --> } +%\setkomavar{phoneseparator}{ --> } +%\setkomavar{subjectseparator}{ >>> } + +%% Customize fonts +%% Use LaTeX's standard font commands +%% Modify with \setkomafont or \addtokomafont +%% (see KOMA documentation) +\setkomafont{backaddress}{\rmfamily} +%\setkomafont{descriptionlabel}{} +\setkomafont{fromaddress}{\small} +\setkomafont{fromname}{\scshape} +%\setkomafont{pagefoot}{} +%\setkomafont{pagehead}{} +%\setkomafont{pagenumber}{} +%\setkomafont{subject}{} +%\setkomafont{title}{} +\end_preamble +\language english +\inputencoding auto +\font_roman palatino +\font_sans default +\font_typewriter default +\font_default_family default +\font_sc false +\font_osf false +\font_sf_scale 100 +\font_tt_scale 100 +\graphics default +\paperfontsize 11 +\spacing other 1.15 +\use_hyperref false +\papersize default +\use_geometry false +\use_amsmath 0 +\use_esint 0 +\cite_engine basic +\use_bibtopic false +\paperorientation portrait +\secnumdepth 3 +\tocdepth 3 +\paragraph_separation skip +\defskip medskip +\quotes_language german +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tracking_changes false +\output_changes false +\author "" +\author "" +\end_header + +\begin_body + +\begin_layout Name +The LyX Developers Team +\end_layout + +\begin_layout SenderAddress +140 Map Road +\newline +SVN City +\end_layout + +\begin_layout Telephone +0011/222\InsetSpace \thinspace{} +333 +\end_layout + +\begin_layout E-Mail +lyx-users@lists.lyx.org +\end_layout + +\begin_layout URL +www.lyx.org +\end_layout + +\begin_layout Backaddress +The LyX Developers Team +\newline +140 Map Road +\newline +SVN City +\end_layout + +\begin_layout Signature +The LyX Team +\end_layout + +\begin_layout Subject +New KOMA letter layout +\end_layout + +\begin_layout Place +The Internet +\end_layout + +\begin_layout Date +\begin_inset ERT +status collapsed + +\begin_layout Standard + +\backslash +today +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Standard + +\backslash +renewcommand*{ +\backslash +adrentry}[8]{ +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Address +\begin_inset ERT +status collapsed + +\begin_layout Standard +#2 #1 +\backslash + +\backslash +#3 +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Opening +Hello +\begin_inset ERT +status collapsed + +\begin_layout Standard +#2 #1 +\end_layout + +\end_inset + +, +\end_layout + +\begin_layout Standard +this example is a serial letter to +\series bold +all persons +\series default + in an address database. + The design of address databases is described in the documentation listed + below. +\end_layout + +\begin_layout Standard +This template illustrates the use of the new scrlttr2 class (introduced + with KOMA-script v. + 2.9). + This letter class is very flexible. + Have a look at +\family sans +Layout\SpecialChar \menuseparator +Document\SpecialChar \menuseparator +Preamble +\family default + for the most common parameters. + Please consult the KOMA Script documentation +\begin_inset Foot +status collapsed + +\begin_layout Standard +http://www.ctan.org/tex-archive/macros/latex/contrib/supported/koma-script/scrguien.pdf +\end_layout + +\end_inset + + + for a detailed description. +\end_layout + +\begin_layout Closing +Have fun with it, +\end_layout + +\begin_layout PS +p.\InsetSpace \thinspace{} +s.: The blue colored items have to be before the address, the magenta colored + after it. +\end_layout + +\begin_layout CC +The LyX Users +\end_layout + +\begin_layout EndLetter +\begin_inset Note Note +status collapsed + +\begin_layout Standard +keep this environment empty +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Standard +} +\end_layout + +\end_inset + + +\begin_inset Note Note +status collapsed + +\begin_layout Standard +closes the above +\series bold + +\backslash +renewcommand* +\series default + command +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset CommandInset include +LatexCommand input +filename "addressExample.adr" + +\end_inset + + +\end_layout + +\end_body +\end_document diff --git a/lib/examples/serial_letter2.lyx b/lib/examples/serial_letter2.lyx new file mode 100644 index 0000000000..6b9ba5dcab --- /dev/null +++ b/lib/examples/serial_letter2.lyx @@ -0,0 +1,251 @@ +#LyX 1.6.0svn created this file. For more info see http://www.lyx.org/ +\lyxformat 314 +\begin_document +\begin_header +\textclass scrlttr2 +\begin_preamble +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Here you can modify the layout of your letter +%% Have a look at the KOMA script documentation +%% for details. Most commands are commented out +%% here (i.e. we use default settings) +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% Load an *.lco style file (see KOMA documentation) +\LoadLetterOption{DIN}% + +%% THE CLASS OPTIONS +%% Remove preceeding '%' to uncomment an item +\KOMAoptions{% +%headsepline=true,% separate the header with a line on page >1 +%footsepline=true,% separate the footer with a line on page >1 +%pagenumber=botcenter,% position of the page number (see docu) +%parskip=false,% Use indent instead of skip (more options cf. docu) +fromalign=center,% alignment of the address +fromrule=aftername,% separate the address with a line? +fromphone=true,% print sender phone number +%fromfax=true,% print sender fax number +fromemail=true,% print sender e-mail address +fromurl=true% print sender URL +%fromlogo=true,% print a logo (position depends on fromalign) +%addrfield=false,% print an address field? +%backaddress=false,% print the back address? +%subject=afteropening,titled,% alternative subject layout and position +%locfield=narrow,% width of the (extra) location field +%foldmarks=false,% print foldmarks? +%numericaldate=true,% date layout +%refline=wide% layout of the refline +} + +%% Customize Separators +%\setkomavar{placeseparator}{ -- } +\setkomavar{backaddressseparator}{ $\cdot$ } +%\setkomavar{emailseparator}{ --> } +%\setkomavar{enclseparator}{ > } +%\setkomavar{faxseparator}{ --> } +%\setkomavar{phoneseparator}{ --> } +%\setkomavar{subjectseparator}{ >>> } + +%% Customize fonts +%% Use LaTeX's standard font commands +%% Modify with \setkomafont or \addtokomafont +%% (see KOMA documentation) +\setkomafont{backaddress}{\rmfamily} +%\setkomafont{descriptionlabel}{} +\setkomafont{fromaddress}{\small} +\setkomafont{fromname}{\scshape} +%\setkomafont{pagefoot}{} +%\setkomafont{pagehead}{} +%\setkomafont{pagenumber}{} +%\setkomafont{subject}{} +%\setkomafont{title}{} +\end_preamble +\language english +\inputencoding auto +\font_roman palatino +\font_sans default +\font_typewriter default +\font_default_family default +\font_sc false +\font_osf false +\font_sf_scale 100 +\font_tt_scale 100 +\graphics default +\paperfontsize 11 +\spacing other 1.15 +\use_hyperref false +\papersize default +\use_geometry false +\use_amsmath 0 +\use_esint 0 +\cite_engine basic +\use_bibtopic false +\paperorientation portrait +\secnumdepth 3 +\tocdepth 3 +\paragraph_separation skip +\defskip medskip +\quotes_language danish +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tracking_changes false +\output_changes false +\author "" +\author "" +\end_header + +\begin_body + +\begin_layout Name +The LyX Developers Team +\end_layout + +\begin_layout SenderAddress +140 Map Road +\newline +SVN City +\end_layout + +\begin_layout Telephone +0011/222\InsetSpace \thinspace{} +333 +\end_layout + +\begin_layout E-Mail +lyx-users@lists.lyx.org +\end_layout + +\begin_layout URL +www.lyx.org +\end_layout + +\begin_layout Backaddress +The LyX Developers Team +\newline +140 Map Road +\newline +SVN City +\end_layout + +\begin_layout Signature +The LyX Team +\end_layout + +\begin_layout Subject +New KOMA letter layout +\end_layout + +\begin_layout Place +The Internet +\end_layout + +\begin_layout Date +\begin_inset ERT +status collapsed + +\begin_layout Standard + +\backslash +today +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset CommandInset include +LatexCommand input +filename "addressExample.adr" + +\end_inset + + +\end_layout + +\begin_layout Address +\begin_inset ERT +status collapsed + +\begin_layout Standard + +\backslash +WILBOE +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Opening +Dear Wilhelm, +\end_layout + +\begin_layout Standard +this example is a serial letter to +\series bold +one person +\series default + in an address database. + The design of address databases is described in the documentation listed + below. +\end_layout + +\begin_layout Standard +This template illustrates the use of the new scrlttr2 class (introduced + with KOMA-script v. + 2.9). + This letter class is very flexible. + Have a look at +\family sans +Layout\SpecialChar \menuseparator +Document\SpecialChar \menuseparator +Preamble +\family default + for the most common parameters. + Please consult the KOMA Script documentation +\begin_inset Foot +status collapsed + +\begin_layout Standard +http://www.ctan.org/tex-archive/macros/latex/contrib/supported/koma-script/scrguien.pdf +\end_layout + +\end_inset + + +for a detailed description. +\end_layout + +\begin_layout Closing +Have fun with it, +\end_layout + +\begin_layout PS +p.\InsetSpace \thinspace{} +s.: The blue colored items have to be before the address, the magenta colored + after it. +\end_layout + +\begin_layout CC +The LyX Users +\end_layout + +\begin_layout EndLetter +\begin_inset Note Note +status collapsed + +\begin_layout Standard +keep this environment empty +\end_layout + +\end_inset + + +\end_layout + +\end_body +\end_document diff --git a/lib/examples/serial_letter3.lyx b/lib/examples/serial_letter3.lyx new file mode 100644 index 0000000000..0411e66804 --- /dev/null +++ b/lib/examples/serial_letter3.lyx @@ -0,0 +1,366 @@ +#LyX 1.6.0svn created this file. For more info see http://www.lyx.org/ +\lyxformat 314 +\begin_document +\begin_header +\textclass scrlttr2 +\begin_preamble +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Here you can modify the layout of your letter +%% Have a look at the KOMA script documentation +%% for details. Most commands are commented out +%% here (i.e. we use default settings) +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% Load an *.lco style file (see KOMA documentation) +\LoadLetterOption{DIN}% + +%% THE CLASS OPTIONS +%% Remove preceeding '%' to uncomment an item +\KOMAoptions{% +%headsepline=true,% separate the header with a line on page >1 +%footsepline=true,% separate the footer with a line on page >1 +%pagenumber=botcenter,% position of the page number (see docu) +%parskip=false,% Use indent instead of skip (more options cf. docu) +fromalign=center,% alignment of the address +fromrule=aftername,% separate the address with a line? +fromphone=true,% print sender phone number +%fromfax=true,% print sender fax number +fromemail=true,% print sender e-mail address +fromurl=true% print sender URL +%fromlogo=true,% print a logo (position depends on fromalign) +%addrfield=false,% print an address field? +%backaddress=false,% print the back address? +%subject=afteropening,titled,% alternative subject layout and position +%locfield=narrow,% width of the (extra) location field +%foldmarks=false,% print foldmarks? +%numericaldate=true,% date layout +%refline=wide% layout of the refline +} + +%% Customize Separators +%\setkomavar{placeseparator}{ -- } +\setkomavar{backaddressseparator}{ $\cdot$ } +%\setkomavar{emailseparator}{ --> } +%\setkomavar{enclseparator}{ > } +%\setkomavar{faxseparator}{ --> } +%\setkomavar{phoneseparator}{ --> } +%\setkomavar{subjectseparator}{ >>> } + +%% Customize fonts +%% Use LaTeX's standard font commands +%% Modify with \setkomafont or \addtokomafont +%% (see KOMA documentation) +\setkomafont{backaddress}{\rmfamily} +%\setkomafont{descriptionlabel}{} +\setkomafont{fromaddress}{\small} +\setkomafont{fromname}{\scshape} +%\setkomafont{pagefoot}{} +%\setkomafont{pagehead}{} +%\setkomafont{pagenumber}{} +%\setkomafont{subject}{} +%\setkomafont{title}{} +\end_preamble +\language english +\inputencoding auto +\font_roman palatino +\font_sans default +\font_typewriter default +\font_default_family default +\font_sc false +\font_osf false +\font_sf_scale 100 +\font_tt_scale 100 +\graphics default +\paperfontsize 11 +\spacing other 1.15 +\use_hyperref false +\papersize default +\use_geometry false +\use_amsmath 0 +\use_esint 0 +\cite_engine basic +\use_bibtopic false +\paperorientation portrait +\secnumdepth 3 +\tocdepth 3 +\paragraph_separation skip +\defskip medskip +\quotes_language danish +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tracking_changes false +\output_changes false +\author "" +\author "" +\end_header + +\begin_body + +\begin_layout Name +The LyX Developers Team +\end_layout + +\begin_layout SenderAddress +140 Map Road +\newline +SVN City +\end_layout + +\begin_layout Telephone +0011/222\InsetSpace \thinspace{} +333 +\end_layout + +\begin_layout E-Mail +lyx-users@lists.lyx.org +\end_layout + +\begin_layout URL +www.lyx.org +\end_layout + +\begin_layout Backaddress +The LyX Developers Team +\newline +140 Map Road +\newline +SVN City +\end_layout + +\begin_layout Signature +The LyX Team +\end_layout + +\begin_layout Subject +New KOMA letter layout +\end_layout + +\begin_layout Place +The Internet +\end_layout + +\begin_layout Date +\begin_inset ERT +status collapsed + +\begin_layout Standard + +\backslash +today +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Standard + +\backslash +renewcommand*{ +\backslash +adrentry}[8]{ +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Standard + +\backslash +if #5w +\end_layout + +\end_inset + + +\begin_inset Note Note +status open + +\begin_layout Standard +when person is female +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Address +\begin_inset ERT +status collapsed + +\begin_layout Standard +#2 #1 +\backslash + +\backslash +#3 +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Opening +Dear Mrs.\InsetSpace ~ + +\begin_inset ERT +status collapsed + +\begin_layout Standard +#1 +\end_layout + +\end_inset + +, +\end_layout + +\begin_layout Standard +this example is a serial letter to +\series bold +all female persons +\series default + in an address database. + The design of address databases is described in the documentation listed + below. +\end_layout + +\begin_layout Standard +This template illustrates the use of the new scrlttr2 class (introduced + with KOMA-script v. + 2.9). + This letter class is very flexible. + Have a look at +\family sans +Layout\SpecialChar \menuseparator +Document\SpecialChar \menuseparator +Preamble +\family default + for the most common parameters. + Please consult the KOMA Script documentation +\begin_inset Foot +status collapsed + +\begin_layout Standard +http://www.ctan.org/tex-archive/macros/latex/contrib/supported/koma-script/scrguien.pdf +\end_layout + +\end_inset + + + for a detailed description. +\end_layout + +\begin_layout Closing +Have fun with it, +\end_layout + +\begin_layout PS +p.\InsetSpace \thinspace{} +s.: The blue colored items have to be before the address, the magenta colored + after it. +\end_layout + +\begin_layout CC +The LyX Users +\end_layout + +\begin_layout EndLetter +\begin_inset Note Note +status collapsed + +\begin_layout Standard +keep this environment empty +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Standard + +\backslash +fi +\end_layout + +\end_inset + + +\begin_inset Note Note +status collapsed + +\begin_layout Standard +Schließt obigen +\series bold + +\backslash +if +\series default + Befehl ab. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Standard +} +\end_layout + +\end_inset + + +\begin_inset Note Note +status collapsed + +\begin_layout Standard +Schließt obigen +\series bold + +\backslash +renewcommand* +\series default + Befehl ab. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset CommandInset include +LatexCommand input +filename "addressExample.adr" + +\end_inset + + +\end_layout + +\end_body +\end_document diff --git a/lib/layouts/scrlttr2.layout b/lib/layouts/scrlttr2.layout index 65b7aab2c4..d98ffb0fd9 100644 --- a/lib/layouts/scrlttr2.layout +++ b/lib/layouts/scrlttr2.layout @@ -2,6 +2,7 @@ # \DeclareLaTeXClass[scrlttr2]{letter (KOMA-Script v.2)} # KOMA scrlettr2 textclass definition file. # Juergen Spitzmueller , 2003/2/17. +# Uwe Stöhr , 2008/2/03. Format 6 Style Standard @@ -40,10 +41,6 @@ Style Address LatexType Command LatexName begin LatexParam {letter} - #Ugly hack! - Preamble - \AtEndDocument{\end{letter}} - EndPreamble KeepEmpty 1 LeftMargin xxxxxxxxxxxx::xx LabelSep xx @@ -53,7 +50,6 @@ Style Address Align Left LabelType Static LabelString "Address:" - LabelFont Series Bold Shape Italic @@ -76,7 +72,6 @@ Style NextAddress Align Left LabelType Static LabelString "Next Address:" - LabelFont Series Bold Shape Italic @@ -98,7 +93,6 @@ Style Opening Align Left LabelType Static LabelString "Opening:" - LabelFont Series Bold Shape Italic @@ -143,7 +137,7 @@ Style Name LatexName setkomavar LatexParam {fromname} KeepEmpty 1 - LeftMargin xxxxxxxxxxxx::xx + LeftMargin xxxxxxxxxxxxxxxxx::xx LabelSep xx TopSep 0.4 BottomSep 0.4 @@ -326,3 +320,21 @@ Style Invoice LatexParam {invoice} LabelString "Invoice no.:" End + + +Style EndLetter + Margin Dynamic + LatexType Command + LatexName end{letter} + KeepEmpty 1 + TopSep 1 + ParSkip 0.4 + Align Block + LabelSep xx + LabelType Static + LabelString "End of letter" + LabelFont + Series Bold + Color Green + EndFont +End diff --git a/lib/lyx2lyx/LyX.py b/lib/lyx2lyx/LyX.py index f0a032e331..586410da9e 100644 --- a/lib/lyx2lyx/LyX.py +++ b/lib/lyx2lyx/LyX.py @@ -80,7 +80,7 @@ format_relation = [("0_06", [200], minor_versions("0.6" , 4)), ("1_3", [221], minor_versions("1.3" , 7)), ("1_4", range(222,246), minor_versions("1.4" , 5)), ("1_5", range(246,277), minor_versions("1.5" , 2)), - ("1_6", range(277,314), minor_versions("1.6" , 0))] # Richard Heck: conversion of module representations + ("1_6", range(277,315), minor_versions("1.6" , 0))] # Uwe Stöhr: scrlttr2 for serial letters def formats_list(): diff --git a/lib/lyx2lyx/lyx_1_6.py b/lib/lyx2lyx/lyx_1_6.py index 0c50b81afa..14cdc65e23 100644 --- a/lib/lyx2lyx/lyx_1_6.py +++ b/lib/lyx2lyx/lyx_1_6.py @@ -1,6 +1,6 @@ # This file is part of lyx2lyx # -*- coding: utf-8 -*- -# Copyright (C) 2007 José Matos +# Copyright (C) 2007-2008 The LyX Team # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -1223,6 +1223,31 @@ def revert_widesideways(document): i = i + 1 +def convert_serial_letter(document): + " adds an EndLetter environment to scrlttr2 documents. " + tc = document.textclass + if (tc == "scrlttr2"): + i = len(document.body) + document.body[i-2] = '\\begin_layout EndLetter\n' \ + '\\begin_inset Note Note\n' \ + 'status collapsed\n\n' \ + '\\begin_layout Standard\n' \ + 'keep this environment empty\n' \ + '\\end_layout\n\n' \ + '\\end_inset\n\n\n' \ + '\\end_layout\n\n' + i = 0 + # remove ERT insets containing "\end{letter}" + while True: + i = find_token(document.body, "\\begin_inset ERT", i) + document.warning(str(i)) + if i == -1: + return + if document.body[i+7] == "end{letter}": + del document.body[i-1:i+14] + i = i + 1 + + ## # Conversion hub # @@ -1264,10 +1289,12 @@ convert = [[277, [fix_wrong_tables]], [310, []], [311, [convert_ams_classes]], [312, []], - [313, [convert_module_names]] + [313, [convert_module_names]], + [314, [convert_serial_letter]] ] -revert = [[312, [revert_module_names]], +revert = [[313, []], + [312, [revert_module_names]], [311, [revert_rotfloat, revert_widesideways]], [310, []], [309, [revert_btprintall]], diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 3ab46a024a..83c182a99c 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -114,7 +114,7 @@ namespace os = support::os; namespace { -int const LYX_FORMAT = 313; // Richard Heck: conversion of module representations +int const LYX_FORMAT = 314; // Uwe Stöhr: scrlttr2 for serial letters } // namespace anon