-
Notifications
You must be signed in to change notification settings - Fork 0
/
letter.sty
108 lines (91 loc) · 2.24 KB
/
letter.sty
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
%% letter.sty -
%% based on Stanford letterhead style (for letter class)
%% 2003/10/17 - First attempt
% What the user can define:
% \name{Sender's name} required
% \address{Sender's 855 Serra Street\\ Stanford University\\ Stanford, CA 94305-4115}
% \telephone{Sender's phone number} default is Stanford Directory Infor
% \fax{Sender's fax}
% Class options:
% nofigure: include no figure in the logo
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{myletter}[2005/09/07 My letterhead]
\RequirePackage{graphicx}
%
% Declare Options
%
\DeclareOption{noimage}{\def\logoimage{\hspace*{3cm}}}
%
% ProcessOptions
%
\ProcessOptions
% Letter margins A4
\setlength{\oddsidemargin}{0pt} % Left margin on odd-numbered pages.
\setlength{\evensidemargin}{0pt} % Left margin on even-numbered pages.
\setlength{\topmargin}{-6pt}
\setlength{\textwidth}{15.5cm}
\setlength{\textheight}{22cm}
% Increase the indent for right stuff a little to 55%
%\longindentation=.55\textwidth
%\indentedwidth=\textwidth
%\advance\indentedwidth -\longindentation
% No page numbers
\thispagestyle{empty}
% This is the LOGO of the letter
\newcommand{\logo}[2]{
\null
\vspace{-4cm}
\begingroup
\vspace{10pt}
\begin{minipage}[t]{3cm}
%\center
\hspace{-200pt}
\includegraphics[width=2.5cm]{#1}
\end{minipage}
\begin{minipage}[r]{12.5cm}
\raggedleft
\input{#2}
\end{minipage}
\endgroup
\par
}
% This is the LOGO of the letter (without figure)
\newcommand{\logonofigure}[1]{
\null
\vspace{-1cm}
\begingroup
\raggedleft
\input{#1}
\endgroup
\par
}
\def\showname{
\vspace{2ex}
{\raggedleft \fromname\par}
%\vspace{1.5ex}
}
\def\showinfo#1{
\vspace{-1ex}
{\raggedleft #1\par}
}
% Show date in a decent format
\renewcommand*{\today}{\number\day\space
\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
\space\number\year}
\def\showdate{
\vspace{1ex}
{\raggedleft \hfill\hbox{\@date}}
\vspace{1ex}
}
\def\receiver#1{
\vspace{2ex}
#1
\vspace{2ex}
}
\def\dear#1{
\vspace{2ex}
#1
\vspace{2ex}
}