% \iffalse
% ======================================================================
% scrlttr2-examples.dtx
% Copyright (c) Markus Kohm, 2008-2023
%
% This file is part of the LaTeX2e KOMA-Script bundle.
%
% This work may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, version 1.3c of the license.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later and of this work.
%
% This work has the LPPL maintenance status "author-maintained".
%
% The Current Maintainer and author of this work is Markus Kohm.
%
% This work consists of all files listed in MANIFEST.md.
% ======================================================================
%
% Generation of letter example files for scrlttr2 chapter.
%
% ======================================================================
%<*ins>
\def\batchfile{scrlttr2-examples.dtx}
\input docstrip.tex

\keepsilent
\askforoverwritefalse

\generate{%
  \nopreamble\nopostamble
  \file{musterlogo.eps}{\from{scrlttr2-examples.dtx}{logo}}%
}

\generate{%
  \nopreamble\nopostamble
  \file{ich.lco}{\from{scrlttr2-examples.dtx}{lco,23,ngerman}}%
  \file{me.lco}{\from{scrlttr2-examples.dtx}{lco,23,english}}%
}

\generate{%
  \nopreamble\nopostamble
  \file{letter-example-00-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,0,english}}%
  \file{letter-example-01-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,1,english}}%
  \file{letter-example-02-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,2,english}}%
  \file{letter-example-03-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,3,english}}%
  \file{letter-example-04-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,4,english}}%
  \file{letter-example-05-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,5,english}}%
  \file{letter-example-06-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,6,english}}%
  \file{letter-example-07-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,7,english}}%
  \file{letter-example-08-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,8,english}}%
  \file{letter-example-09-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,9,english}}%
  \file{letter-example-10-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,10,english}}%
  \file{letter-example-11-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,11,english}}%
  \file{letter-example-12-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,12,english}}%
  \file{letter-example-13-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,13,english}}%
  \file{letter-example-14-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,14,english}}%
  \file{letter-example-15-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,15,english}}%
  \file{letter-example-16-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,16,english}}%
  \file{letter-example-17-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,17,english}}%
  \file{letter-example-18-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,18,english}}%
  \file{letter-example-19-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,19,english}}%
  \file{letter-example-20-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,20,english}}%
  \file{letter-example-21-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,21,english}}%
  \file{letter-example-22-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,22,english}}%
  \file{letter-example-23-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,23,english}}%
  \file{letter-example-label-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,label,english}}%
  \file{letter-example-nipponA-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,22,nipponA,english}}%
  \file{letter-example-nipponB-en.tex}{%
    \from{scrlttr2-examples.dtx}{example,22,nipponB,english}}%
  \file{letter-example-00-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,0,ngerman}}%
  \file{letter-example-01-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,1,ngerman}}%
  \file{letter-example-02-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,2,ngerman}}%
  \file{letter-example-03-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,3,ngerman}}%
  \file{letter-example-04-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,4,ngerman}}%
  \file{letter-example-05-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,5,ngerman}}%
  \file{letter-example-06-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,6,ngerman}}%
  \file{letter-example-07-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,7,ngerman}}%
  \file{letter-example-08-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,8,ngerman}}%
  \file{letter-example-09-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,9,ngerman}}%
  \file{letter-example-10-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,10,ngerman}}%
  \file{letter-example-11-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,11,ngerman}}%
  \file{letter-example-12-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,12,ngerman}}%
  \file{letter-example-13-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,13,ngerman}}%
  \file{letter-example-14-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,14,ngerman}}%
  \file{letter-example-15-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,15,ngerman}}%
  \file{letter-example-16-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,16,ngerman}}%
  \file{letter-example-17-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,17,ngerman}}%
  \file{letter-example-18-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,18,ngerman}}%
  \file{letter-example-19-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,19,ngerman}}%
  \file{letter-example-20-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,20,ngerman}}%
  \file{letter-example-21-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,21,ngerman}}%
  \file{letter-example-22-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,22,ngerman}}%
  \file{letter-example-23-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,23,ngerman}}%
  \file{letter-example-label-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,label,ngerman}}%
  \file{letter-example-nipponA-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,22,nipponA,ngerman}}%
  \file{letter-example-nipponB-de.tex}{%
    \from{scrlttr2-examples.dtx}{example,22,nipponB,ngerman}}%
}

\csname endinput\endcsname
%</ins>
%
%    \begin{macrocode}
%<*lco&23>
%<english>\ProvidesFile{me.lco}[2008/06/11 lco (Joe Public)]
%<ngerman>\ProvidesFile{ich.lco}[2008/06/11 lco (Peter Musterfrau)]
\KOMAoptions{foldmarks=true,foldmarks=blmtP,
  fromphone,fromemail,fromlogo,subject=titled}
%<*english>
\setkomavar{fromname}{Joe Public}
\setkomavar{signature}{Joe Public\\
  (former chairman)}
%</english>
%<*ngerman>
\setkomavar{fromname}{Peter Musterfrau}
\setkomavar{signature}{Peter Musterfrau\\
  (ehemaliger Vorsitzender)}
%</ngerman>
\renewcommand*{\raggedsignature}{\raggedright}
%<*english>
\setkomavar{fromaddress}{2 Valley\\
                         SAMPLEBY\\
                         ZY32 1XW}
%</english>
%<*ngerman>
\setkomavar{fromaddress}{Hinter dem Tal 2\\
                         54321 Musterheim}
%</ngerman>
\setkomavar{fromphone}{0\,12\,34~56\,78}
%<english>\setkomavar{fromemail}{joe@public.invalid}
%<ngerman>\setkomavar{fromemail}{Peter@Musterfrau.invalid}
\setkomavar{fromlogo}{%
  \includegraphics{musterlogo}}
\setkomavar{location}{\raggedright
%<*english>
  Club member no.~4711\\
  since 11.09.2001\\
  chairman 2003--2005}
\setkomavar{place}{Sampleby}
\setkomavar{frombank}{Bank of Friendly Greetings}
%</english>
%<*ngerman>
  Mitglied Nr.~4711\\
  seit dem 11.09.2001\\
  Vorsitzender in den Jahren 2003--2005}
\setkomavar{place}{Musterheim}
\setkomavar{frombank}{Bank freundlichen Gru\ss es}
%</ngerman>
%</lco&23>
%<*example>
%<*label>
\AtBeginDocument{%
  \usepackage{xcolor,eso-pic}%
  \BeforeClosingMainAux{%
    \AddToShipoutPicture*{%
      \thinlines\color{gray!50}%
      \AtPageLowerLeft{%
        \put(0,\LenToUnit{8mm}){%
          \line(0,1){\LenToUnit{180mm}}%
        }%
        \multiput(\LenToUnit{70mm},\LenToUnit{8mm})(\LenToUnit{70mm},0){3}{%
          \line(0,1){\LenToUnit{216mm}}%
        }%
        \multiput(0,\LenToUnit{8mm})(0,\LenToUnit{36mm}){6}{%
          \line(1,0){\LenToUnit{210mm}}%
        }%
        \put(\LenToUnit{70mm},\LenToUnit{224mm}){%
          \line(1,0){\LenToUnit{140mm}}%
        }%
      }\color{black}%
    }%
  }%
}
%</label>
%<0|1|2|3|4|5|23|label>\documentclass[version=last]{scrlttr2}
%<6>\documentclass[version=last,fontsize=14pt]{scrlttr2}
%<!0&!1&!2&!3&!4&!5&!6&!23&!label&!nipponA&!nipponB>\documentclass[foldmarks=true,foldmarks=blmtP,
%<nipponA|nipponB>\documentclass[foldmarks=true,locfield=wide,
%<8>  fromalign=false,
%<9>  fromalign=center,
%<10>  fromalign=false,fromrule=aftername,
%<11>  fromalign=center,fromrule=aftername,
%<12>  fromalign=false,fromrule=afteraddress,
%<13|17>  fromalign=center,fromrule=afteraddress,
%<14|16>  fromrule=afteraddress,
%<15|18>  fromalign=right,fromrule=afteraddress,
%<12|13|14|15>  fromphone,fromemail,
%<16|17|18|19|20|21|22>  fromphone,fromemail,fromlogo,
%<nipponA|nipponB>  fromphone=false,fromemail=false,
%<21|22>  subject=titled,
%<!0&!1&!2&!3&!4&!5&!6&!23&!label>  version=last]{scrlttr2}
%<23&ngerman>\LoadLetterOption{ich}
%<23&english>\LoadLetterOption{me}
%<nipponA>\LoadLetterOption{NipponLL}
%<nipponB>\LoadLetterOption{NipponEL}
%<label&ngerman>\LoadLetterOptions{ich,settleford600label}
%<label&english>\LoadLetterOptions{me,settleford600label}
%<ngerman>\usepackage[ngerman]{babel}
%<english>\usepackage[british]{babel}
%<16|17|18|19|20|21|22|23|label>\usepackage{graphics}
\begin{document}
%<*!0&!1&!2&!3&!4&!5&!6&!7&!23&!label>
%<english>\setkomavar{fromname}{Joe Public}
%<ngerman>\setkomavar{fromname}{Peter Musterfrau}
%<*22>
%<*english>
\setkomavar{signature}{Joe Public\\
  (former chairman)}
%</english>
%<*ngerman>
\setkomavar{signature}{Peter Musterfrau\\
  (ehemaliger Vorsitzender)}
%</ngerman>
\renewcommand*{\raggedsignature}{\raggedright}
%</22>
%<*english>
\setkomavar{fromaddress}{2 Valley\\
                         SAMPLEBY\\
                         ZY32 1XW}
%</english>
%<*ngerman>
\setkomavar{fromaddress}{Hinter dem Tal 2\\
                         54321 Musterheim}
%</ngerman>
%<*!9&!10&!11>
\setkomavar{fromphone}{0\,12\,34~56\,78}
%<english>\setkomavar{fromemail}{joe@public.invalid}
%<ngerman>\setkomavar{fromemail}{Peter@Musterfrau.invalid}
%<*!12&!13&!14&!15>
\setkomavar{fromlogo}{\includegraphics{musterlogo}}
%</!12&!13&!14&!15>
%</!9&!10&!11>
%</!0&!1&!2&!3&!4&!5&!6&!7&!23&!label>
%<*19|20|21|22|23|label>
%<*!23&!label&!nipponA&!nipponB>
\setkomavar{location}{\raggedright
%<*english>
  Club member no.~4711\\
  since 11.09.2001\\
  chairman 2003--2005}
%</english>
%<*ngerman>
  Mitglied Nr.~4711\\
  seit dem 11.09.2001\\
  Vorsitzender in den Jahren 2003--2005}
%</ngerman>
%</!23&!label&!nipponA&!nipponB>
%<*20|21|22|23|label>
%<english>\setkomavar{date}{29th February 2011}
%<ngerman>\setkomavar{date}{29. Februar 2011}
%<*!23&!label>
%<english>\setkomavar{place}{Sampleby}
%<ngerman>\setkomavar{place}{Musterheim}
%</!23&!label>
%<*21|22|23|label>
%<english>\setkomavar{subject}{Missing general meeting}
%<ngerman>\setkomavar{subject}{Mitgliederversammlung vermisst}
%</21|22|23|label>
%</20|21|22|23|label>
%</19|20|21|22|23|label>
%<!5>\begin{letter}{%
%<5>\begin{letter}[fontsize=14pt]{%
%<*english>
    Joanna Public\\
    1 Hillside\\
    SAMPLESTEAD\\
    WX12 3YZ%
%</english>
%<*ngerman>
    Petra Mustermann\\
    Vor dem Berg 1\\
    12345 Musterhausen%
%</ngerman>
  }
%<label>\savelabel{3}{2}
%<english>\opening{Dear Madam Chair,}
%<ngerman>\opening{Liebe Vereinsvorsitzende,}
%<*!0>
%<*english>
The last general meeting was more than a year ago.
I would like to remind you that the articles of our
club stipulate that one should be held every
six months. For this reason, I call on the executive
board to arrange such a meeting immediately.
\closing{Anticipating an invitation}
%</english>
%<*ngerman>
seit einem Jahr gab es keine Mitgliederversammlung
mehr. Ich erinnere daran, dass unsere Satzung eine
solche jedes halbe Jahr vorsieht. Ich fordere den 
Vorstand daher auf, umgehend eine solche in 
Angriff zu nehmen.
\closing{In Erwartung einer Einladung}
%</ngerman>
%<*!1>
%<*english>
\ps PS: I hope you do not take this request amiss.
%</english>
%<*ngerman>
\ps PS: Ich hoffe, Du nimmst mir das nicht krumm.
%</ngerman>
%<*!2>
%<*!3>
%<*english>
\setkomavar*{enclseparator}{Enclosure}
\encl{Excerpt from the articles governing general
  meetings}
%</english>
%<*ngerman>
\setkomavar*{enclseparator}{Anlage}
\encl{Auszug aus der Satzung, in dem die 
  Mitgliederversammlungen geregelt sind}
%</ngerman>
%</!3>
%<*english>
\cc{executive board\\all members}
%</english>
%<*ngerman>
\cc{Die Vereinsvorsitzende\\Alle Mitglieder}
%</ngerman>
%</!2>
%</!1>
%</!0>
\end{letter}
\end{document}
%</example>
%<*logo>
%%!
%%BoundingBox: 0 0 72 72
0 0 moveto
72 72 rlineto
72 neg 0 rlineto
72 72 neg rlineto
stroke
0 0 moveto
/Bitstream-Charter findfont
72 scalefont
setfont
(M) show
showpage
%</logo>
%    \end{macrocode}
%
% \iffalse
\endinput

%%% Local Variables: 
%%% mode: doctex
%%% TeX-master: t
%%% coding: utf-8
%%% ispell-local-dictionary: "en_US"
%%% eval: (flyspell-mode 1)
%%% End: 
% \fi