summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/koma-script/doc/ngerman/labelbasic.lco
blob: 7dd29182cfc1ef4be96ffa908a958fbe2e285f90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
%
% labelbasic.lco
%
% Copyright(c) Markus Kohm <komascript@gmx.de>, 2006
%
%-----------------------------------------------------------------------------



% This must be line 10!!!
\ProvidesFile{labelbasic.lco}
             [2006/12/14 v0.1 unsupported LCO-file]

\newcommand*{\printlabel}[4][]{%
  \begin{letter}{#2}%
    \KOMAoptions{%
      addrfield=true,%
      backaddress=false,%
      fromlogo=false,%
      foldmarks=false%
    }%

    \firsthead{}
    \firstfoot{}

    \setkomavar{location}{}

    \removereffields
    \setkomavar{date}{}

    \setkomavar{signature}{}

    #1

    \setlengthtoplength{\@tempdima}{labelsheettopmargin}
    \addtolengthplength[#3]{\@tempdima}{labelheight}
    \addtolengthplength[-]{\@tempdima}{labelheight}
    \addtolengthplength[#3]{\@tempdima}{labelvoffset}
    \addtolengthplength[-]{\@tempdima}{labelvoffset}
    \@setplength{toaddrvpos}{\@tempdima}

    \setlengthtoplength{\@tempdima}{labelsheetleftmargin}
    \addtolengthplength[#4]{\@tempdima}{labelwidth}
    \addtolengthplength[-]{\@tempdima}{labelwidth}
    \addtolengthplength[#4]{\@tempdima}{labelhoffset}
    \addtolengthplength[-]{\@tempdima}{labelhoffset}
    \@setplength{toaddrhpos}{\@tempdima}

    \@setplength{toaddrindent}{\useplength{labelmargin}}
    \@setplength{toaddrwidth}{\useplength{labelwidth}}
    \@addtoplength[-]{toaddrwidth}{\useplength{labelmargin}}
    \@setplength{toaddrheight}{\useplength{labelheight}}

    \@setplength{refvpos}{0pt}
    \@setplength{refaftervskip}{-5\baselineskip}
    \@setplength{sigbeforevskip}{-5\baselineskip}

    \opening{}
    \closing{}

  \end{letter}%  
}

\@newplength{labelheight}
\@newplength{labelhoffset}
\@newplength{labelmargin}
\@newplength{labelsheetleftmargin}
\@newplength{labelsheettopmargin}
\@newplength{labelvoffset}
\@newplength{labelwidth}

\newcommand*{\savelabel}[3][]{%
  \AtEndDocument{\let\@printlabel\printlabel}%
  \if@filesw
    \begingroup
      \let\\\@undefined
      \DeclareRobustCommand*{\\}{\string\\}%
      \usekomavar[\edef\toname]{toname}%
      \usekomavar[\edef\toaddress]{toaddress}%
      \protected@write\@auxout{%
        \let\@printlabel\relax
      }{%
        \@printlabel[{#1}]{\toname\string\\\toaddress}{#2}{#3}%
      }%
    \endgroup
  \fi
}

\newcommand*{\@printlabel}[4][]{}

\endinput