Newer
Older
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{otsletter}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{letter}}
\ProcessOptions
\LoadClass[letterpaper]{letter}
\longindentation=0pt
\RequirePackage{ifthen}
\usepackage{setspace}
\usepackage{comment}
%% For angle brackets in non-math text mode. Use the shortcuts \la
%% and \ra (defined below) in this slightly non-intuitive way:
%% "\la jrandom@example.com\ra"
\usepackage{textcomp}
\newcommand\la{\textlangle}
\newcommand\ra{\textrangle}
%% Stuff for colored rules
\usepackage[table]{xcolor}
\definecolor{ltgreen}{RGB}{66, 147, 90}
\definecolor{dkgreen}{RGB}{50, 109, 72}
\definecolor{dkergreen}{RGB}{0, 100, 0}
%% Stuff for logo insertion
\usepackage{graphicx}
\usepackage[absolute]{textpos}
\setlength{\TPHorizModule}{30mm}
\setlength{\TPVertModule}{\TPHorizModule}
\textblockorigin{10mm}{10mm}
% start everything near the top-left corner
\setlength{\parindent}{0pt}
%% Handle long tables (e.g., correctly break them across multiple pages).
%%
%% QUESTION: Why is this necessary when invoice.sty in this directory
%% already has "\RequirePackage{longtable}" (as of 2012-06-17)? Are
%% we not actually using invoice.sty for anything? Is it just there
%% as an example? In any case, if we don't pull in 'longtable' here,
%% then generating an OTS invoice will fail with the rather clear
%% message "LaTeX Error: Environment longtable undefined", despite the
%% the \RequirePackage in invoice.sty.
\RequirePackage{longtable}
\address{Does it matter what I write here? It appears not. But don't remove it or the sig block gets left justified?!}
\signature{\fromname}
\newcommand{\yrefname}{\textsl{Your ref.}}
\newcommand{\ymailname}{\textsl{Your letter from}}
\newcommand{\myrefname}{\textsl{Our Ref.}}
\newcommand{\subjectname}{\textsl{Subject}}
\newcommand{\telephonename}{Telephone}
\newcommand{\postcode}{11225-1512}
\newcommand{\@yref}{}
\newcommand{\@ymail}{}
\newcommand{\@myref}{}
\newcommand{\@internet}{}
\newcommand{\@subject}{}
\newcommand{\yref}[1]{\renewcommand{\@yref}{\yrefname: #1}}
\newcommand{\ymail}[1]{\renewcommand{\@ymail}{\ymailname: #1}}
\newcommand{\myref}[1]{\renewcommand{\@myref}{\myrefname: #1}}
\newcommand{\subject}[1]{\renewcommand{\@subject}{\subjectname: #1}}
\newcommand{\internet}[1]{\renewcommand{\@internet}{#1}}
\setlength{\textheight}{215mm}
\setlength{\textwidth}{160mm}
\setlength{\oddsidemargin}{0pt}
\setlength{\evensidemargin}{0pt}
\setlength{\topmargin}{-20pt}
\setlength{\headheight}{12pt}
\setlength{\headsep}{35pt}
\DeclareFixedFont{\xviisf}{OT1}{cmss}{m}{n}{17}
\DeclareFixedFont{\xsf}{OT1}{cmss}{m}{n}{10}
\DeclareFixedFont{\viiisf}{OT1}{cmss}{m}{n}{8}
\newlength{\leftfield}
\setlength{\leftfield}{117mm}
\newlength{\rightfield}
\setlength{\rightfield}{43mm}
\newcommand{\circlesep}{\raisebox{1.7em}{\hspace{1.8em}\includegraphics[clip, trim=0cm 11cm 19.3cm 11cm, scale=0.05]{otslogo.pdf}\hspace{1.8em}}}
\newsavebox{\FIRM}
\newsavebox{\firmaddress}
\newsavebox{\firm}
\sbox{\FIRM}
{\parbox[t]{\leftfield}
% Uncomment next line for small logo, then do similar ~17 lines below
{\xviisf \begin{textblock}{3}(0.5,0.87)\includegraphics[scale=.3]{otslogo.pdf}\end{textblock} }}
% Uncomment next line for big logo, then do similar ~17 lines below
%{\xviisf \begin{textblock}{3}(0,0)\includegraphics[scale=.7]{otslogo.pdf}\end{textblock} }}
\sbox{\firm}{\xsf Open Tech Strategies}
\sbox{\firmaddress}
{\parbox[t]{5.8in}
% TBD: Switch the commenting on the next two lines to
% generate an invoice with vs without our NY street address.
% We still need to figure out a letterhead design that won't
% confuse clients as to where to send payment. Maybe we
% could put something like:
%
% New York * Chicago * info@ots * phone number ?
%
% { \textcolor{dkergreen}{ {\viiisf 333 East 102nd Street, \#409, New York, NY 10029 \circlesep opentechstrategies.com \circlesep +1 (312) 857-6361} }}}
{ \textcolor{dkergreen}{ {\viiisf \null \hfill info@opentechstrategies.com \circlesep +1 (312) 857-6361} }}}
% {\textcolor{dkergreen}{{\viiisf \null \hfill +1 (312) 857-6361\\333 East 102nd St, New York, NY 10029\hfill opentechstrategies.com}}}}}
% {\xviisf \begin{textblock}{3}(0.5,0.87)333 East 102nd St, \#409, New York, NY 10029\end{textblock}}
%\textcolor{dkergreen}{333 East 102nd St, \#409, New York, NY 10029\hspace{5em}opentechstrategies.com\hspace{5em}+1 (312) 857-6361}
%}
\newsavebox{\firmhead}
%\newsavebox{\firmfoot}
\sbox{\firmhead}
{\parbox{\textwidth}{\usebox{\FIRM}\\\hspace*{1.4cm}\raisebox{-1.7cm}{\usebox{\firmaddress}}\\[3pt]\textcolor{dkgreen}{\rule{\textwidth}{1pt}}}}
\renewcommand{\ps@firstpage}
{\setlength{\headheight}{71pt}\setlength{\headsep}{25pt}%
\renewcommand{\@oddhead}{\usebox{\firmhead}}%
%\renewcommand{\@oddfoot}{\raisebox{-20pt}[0pt]}
% {\usebox{\firmfoot}}}%
%\renewcommand{\@evenhead}{}\renewcommand{\@evenfoot}{}
}
\renewcommand{\ps@headings}{
\setlength{\headheight}{41pt}%
\renewcommand{\@oddhead}{
\textcolor{dkgreen}{
\parbox{\textwidth}{%\usebox{\firm}\\[5pt]
\includegraphics[scale=.15]{otslogo.pdf}\\[1pt]
\slshape \headtoname{} \toname\hfill\@date\hfill
\pagename{} \thepage\\
\rule[3pt]{\textwidth}{1pt}}}}
\renewcommand{\@oddfoot}{}
\renewcommand{\@evenhead}{\@oddhead}
\renewcommand{\@evenfoot}{\@oddfoot}
}
\providecommand{\@evenhead}{}
\providecommand{\@oddhead}{}
\providecommand{\@evenfoot}{}
\providecommand{\@oddfoot}{}
%\pagestyle{headings}
\renewcommand{\opening}[1]{
\makeatletter
\let\@texttop\relax
\makeatother
\vspace*{13mm} %%%% jlv
\thispagestyle{firstpage}
\parbox[t]{\leftfield}
{
\parbox[b][1.5cm][c]{\leftfield}{\toname\\\toaddress}
}
\parbox[t]{\rightfield}
{\vspace*{-6em}
\begin{spacing}{0.70}
{\viiisf \fromname
\ifthenelse{\equal{\telephonenum}{}}
{}{\\ {\viiisf\baselineskip10pt \telephonenum}}
\ifthenelse{\equal{\@internet}{}}
{}{\\ {\viiisf\baselineskip10pt \@internet}}
}
\end{spacing}
\vspace*{2.5em}\@date}
\par
\textcolor{dkgreen}{\rule{\textwidth}{01.6pt}}
\makebox[\leftfield][l]
{\ifthenelse{\equal{\@yref}{}}
{\@ymail}{\@yref\hfill\@ymail\hfill}}
\@myref\par
\ifthenelse{\equal{\@subject}{}}{}{\vspace{-1.75em}\@subject\par}
\vspace{2\parskip} #1 \par\nobreak}
\begin{comment}
\end{comment}