Debian Codegraph @

texmf-dist/source/latex/pressrelease/pressrelease.dtx

raw
1 %\iffalse
2 % pressrelease.dtx generated using makedtx version 1.1 (c) Nicola Talbot
3 % Command line args:
4 % -src "pressrelease.cls\Z=>pressrelease.cls"
5 % -src "(.+\.sty)\Z=>\1"
6 % -doc "pressrelease-manual.tex"
7 % -author "Nicola Talbot"
8 % pressrelease
9 % Created on 2014/9/10 18:01
10 %\fi
11 %\iffalse
12 %<*package>
13 %% \CharacterTable
14 %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
15 %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
16 %% Digits \0\1\2\3\4\5\6\7\8\9
17 %% Exclamation \! Double quote \" Hash (number) \#
18 %% Dollar \$ Percent \% Ampersand \&
19 %% Acute accent \' Left paren \( Right paren \)
20 %% Asterisk \* Plus \+ Comma \,
21 %% Minus \- Point \. Solidus \/
22 %% Colon \: Semicolon \; Less than \<
23 %% Equals \= Greater than \> Question mark \?
24 %% Commercial at \@ Left bracket \[ Backslash \\
25 %% Right bracket \] Circumflex \^ Underscore \_
26 %% Grave accent \` Left brace \{ Vertical bar \|
27 %% Right brace \} Tilde \~}
28 %</package>
29 %\fi
30 % \iffalse
31 % Doc-Source file to use with LaTeX2e
32 % Copyright (C) 2014 Nicola Talbot, all rights reserved.
33 % \fi
34 % \iffalse
35 %<*driver>
36 \documentclass{nlctdoc}
37
38 \usepackage{alltt}
39 \usepackage{verbatim}
40 \usepackage{graphicx}
41 \usepackage[utf8]{inputenc}
42 \usepackage[T1]{fontenc}
43 \usepackage[colorlinks,
44 bookmarks,
45 hyperindex=false,
46 pdfauthor={Nicola L.C. Talbot},
47 pdftitle={pressrelease.cls: LaTeX class for typesetting press releases},
48 pdfkeywords={LaTeX,press release}]{hyperref}
49
50
51 \CheckSum{776}
52
53 \newcommand*{\opt}[1]{\csopt{PRset}{#1}}
54 \providecommand*{\optfmt}[1]{\textsf{#1}}
55 \renewcommand*{\ienv}[1]{\SpecialEnvIndex{#1}}
56 \renewcommand*{\usage}[1]{\hyperpage{#1}}
57 \renewcommand*{\main}[1]{\hyperpage{#1}}
58 \IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}}
59 \setcounter{IndexColumns}{2}
60
61 \begin{document}
62 \DocInput{pressrelease.dtx}
63 \end{document}
64 %</driver>
65 %\fi
66 %
67 %\MakeShortVerb{"}
68 %
69 %\title{pressrelease v1.0:
70 %typesetting press releases}
71 %\author{Nicola L. C. Talbot\\\url{http://www.dickimaw-books.com/}}
72 %
73 %\date{2014-09-10}
74 %\maketitle
75 %
76 %\begin{abstract}
77 %The \clsfmt{pressrelease} class is provided for typesetting press
78 %releases. I wrote it because I found that \cls{newlfm}'s press
79 %release option wasn't sufficiently configurable for my requirements.
80 %Sample documents should be available in the \texttt{samples} subdirectory
81 %of the directory where this document is located.
82 %\end{abstract}
83 %
84 %\tableofcontents
85 %
86 %\section{Introduction}
87 %\label{sec:intro}
88 %
89 %A press release is a written statement to inform the media of
90 %forthcoming events, new products, awards or any other type of news
91 %item. A press release should be a~compact document that briefly
92 %outlines the main details of the news item. Therefore press releases
93 %are usually no longer than a~single page. Hard copies are typically
94 %double-spaced to allow the journalist room to scribble notes. The
95 %end of the press release is signalled by three hash (\#) signs
96 %(\term{end of release marker}).
97 %
98 %The \clsfmt{pressrelease} class is loaded in the usual \LaTeX\
99 %manner:
100 %\begin{verbatim}
101 %\documentclass{pressrelease}
102 %\end{verbatim}
103 %You may specify the class options: \clsopt{10pt}, \clsopt{11pt},
104 %\clsopt{12pt}, \clsopt{a4paper}, \clsopt{letterpaper}. These are the
105 %same as the standard class options of the same names. The
106 %\sty{geometry} package is automatically loaded so if you want to
107 %change the page size you can do so using \cs{geometry} (see the
108 %\sty{geometry} documentation for further details). You can also use
109 %the class option \clsopt{symbols} to automatically load the
110 %accompanying \sty{pressrelease-symbols} package (see
111 %\sectionref{sec:tags}).
112 %
113 %Within the \envfmt{document} environment, the contents of the press
114 %release should be placed inside the \env{pressrelease} environment.
115 %\begin{definition}[\DescribeEnv{pressrelease}]
116 %\cs{begin}\{pressrelease\}\newline
117 %\meta{press release content}\newline
118 %\cs{end}\{pressrelease\}
119 %\end{definition}
120 %
121 %Within the \env{pressrelease} environment you can use the
122 %\envfmt{about} environment for information about the company.
123 %\begin{definition}[\DescribeEnv{about}]
124 %\cs{begin}\{about\}\newline
125 %\meta{Information}\newline
126 %\cs{end}\{about\}
127 %\end{definition}
128 %
129 %The contents of the \env{pressrelease} environment are double-spaced
130 %(using the \sty{setspace} package, which is loaded by
131 %default). Two \LaTeX\ runs are required to ensure the last page
132 %information is correct.
133 %
134 %\section{Data Setting Commands}
135 %\label{sec:datacommands}
136 %
137 %In the preamble (or anywhere before the start of the
138 %\env{pressrelease} environment) you may use the commands described below
139 %to provide data used in the press release.
140 %You can later access the information provided using
141 %\begin{definition}[\DescribeMacro\PRusevar]
142 %\cs{PRusevar}\marg{variable}
143 %\end{definition}
144 %where \meta{variable} is the variable name. For example, to access
145 %the information provided by \cs{PRcompany}, you can use
146 %\verb|\PRusevar{company}|.
147 %
148 %\begin{definition}[\DescribeMacro\PRheadline]
149 %\cs{PRheadline}\marg{text}
150 %\end{definition}
151 %This specifies the press release title used in the
152 %\term{headline block}.
153 %
154 %\begin{definition}[\DescribeMacro\PRsubheadline]
155 %\cs{PRsubheadline}\marg{text}
156 %\end{definition}
157 %This specifies the press release sub-title used in the
158 %\term{headline block}.
159 %
160 %\begin{definition}[\DescribeMacro\PRrelease]
161 %\cs{PRrelease}\marg{text}
162 %\end{definition}
163 %This specifies the \term{release statement}. If omitted, the default is
164 %``For immediate release''. For example:
165 %\begin{verbatim}
166 %\PRrelease{Embargo until 30th April 2014}
167 %\end{verbatim}
168 %
169 %\begin{definition}[\DescribeMacro\PRlogo]
170 %\cs{PRlogo}\marg{logo}
171 %\end{definition}
172 %This specifies the company \term{logo}, where \meta{logo} represents the
173 %commands required to display the logo. For example, if the logo is
174 %in the image file \texttt{company-logo.png}:
175 %\begin{verbatim}
176 %\PRlogo{\includegraphics{company-logo}}
177 %\end{verbatim}
178 %(Remember to include the \sty{graphicx} package if you want to use
179 %\cs{includegraphics}.)
180 %
181 %\begin{definition}[\DescribeMacro\PRcompany]
182 %\cs{PRcompany}\marg{name}
183 %\end{definition}
184 %This specifies the company name. For example:
185 %\begin{verbatim}
186 %\PRcompany{Imaginary Company, Ltd}
187 %\end{verbatim}
188 %
189 %\begin{definition}[\DescribeMacro\PRdepartment]
190 %\cs{PRdepartment}\marg{name}
191 %\end{definition}
192 %This specifies the department name. For example:
193 %\begin{verbatim}
194 %\PRdepartment{Department of Miscellaneous Stuff}
195 %\end{verbatim}
196 %
197 %\begin{definition}[\DescribeMacro\PRlocation]
198 %\cs{PRlocation}\marg{place}
199 %\end{definition}
200 %This specifies the company's location. For example:
201 %\begin{verbatim}
202 %\PRlocation{The Moon}
203 %\end{verbatim}
204 %
205 %\begin{definition}[\DescribeMacro\date]
206 %\cs{date}\marg{some date}
207 %\end{definition}
208 %This specifies the date of the press release. For example:
209 %\begin{verbatim}
210 %\date{1st April 2014}
211 %\end{verbatim}
212 %If omitted, \cs{today} will be used.
213 %
214 %\begin{definition}[\DescribeMacro\PRcontact]
215 %\cs{PRcontact}\marg{name}
216 %\end{definition}
217 %This specifies the name of the contact person in case of
218 %queries. For example:
219 %\begin{verbatim}
220 %\PRcontact{Ann Other}
221 %\end{verbatim}
222 %
223 %\begin{definition}[\DescribeMacro\PRaddress]
224 %\cs{PRaddress}\marg{text}
225 %\end{definition}
226 %This specifies the contact's postal address. For example:
227 %\begin{verbatim}
228 %\PRaddress{1 The Street\\The City\\AB1 2YZ}
229 %\end{verbatim}
230 %
231 %\begin{definition}[\DescribeMacro\PRphone]
232 %\cs{PRphone}\marg{number}
233 %\end{definition}
234 %This specifies the contact's telephone number. For example:
235 %\begin{verbatim}
236 %\PRphone{0123 456789}
237 %\end{verbatim}
238 %
239 %\begin{definition}[\DescribeMacro\PRmobile]
240 %\cs{PRmobile}\marg{number}
241 %\end{definition}
242 %This specifies the contact's mobile phone number. For example:
243 %\begin{verbatim}
244 %\PRmobile{07123 456789}
245 %\end{verbatim}
246 %
247 %\begin{definition}[\DescribeMacro\PRfax]
248 %\cs{PRfax}\marg{number}
249 %\end{definition}
250 %This specifies the contact's fax number. For example:
251 %\begin{verbatim}
252 %\PRfax{0123 456788}
253 %\end{verbatim}
254 %
255 %\begin{definition}[\DescribeMacro\PRurl]
256 %\cs{PRurl}\marg{web address}
257 %\end{definition}
258 %This specifies the company's web address. For example:
259 %\begin{verbatim}
260 %\PRurl{http://www.some-company.com/}
261 %\end{verbatim}
262 %This information is inserted at the end of the \env{about}
263 %environment using \ics{url} (the \sty{url} package is automatically
264 %loaded).
265 %
266 %\begin{definition}[\DescribeMacro\PRemail]
267 %\cs{PRemail}\marg{email address}
268 %\end{definition}
269 %This specifies the contact's email address. For example:
270 %\begin{verbatim}
271 %\PRemail{[email protected]}
272 %\end{verbatim}
273 %This is formatted using the command
274 %\begin{definition}[\DescribeMacro\PRemailformat]
275 %\cs{PRemailformat}\marg{text}
276 %\end{definition}
277 %This defaults to \cs{texttt}\marg{text} but if you load the
278 %\sty{hyperref} package you can convert the email address into an
279 %active length using:
280 %\begin{verbatim}
281 %\renewcommand*{\PRemailformat}[1]{\href{mailto:#1}{\texttt{#1}}}
282 %\end{verbatim}
283 %\begin{definition}[\DescribeMacro\PRhours]
284 %\cs{PRhours}\marg{times}
285 %\end{definition}
286 %This specifies the company's opening hours. For example:
287 %\begin{verbatim}
288 %\PRhours{9:00--17:30 Mon--Fri}
289 %\end{verbatim}
290 %
291 %\begin{definition}[\DescribeMacro\PRencl]
292 %\cs{PRencl}\marg{times}
293 %\end{definition}
294 %This specifies any enclosed information. For example:
295 %\begin{verbatim}
296 %\PRencl{complementary tickets}
297 %\end{verbatim}
298 %This information is inserted before the
299 %\term{end of release marker}.
300 %
301 %\section{Changing the Settings}
302 %\label{sec:settings}
303 %
304 %The layout of the press release consists of: (\term{upper area}) the
305 %\term{logo}, the \term{release statement}, the
306 %\term{headline block}, the \term{top information block};
307 %(\term{lower area}) the \term{bottom information block}, the
308 %\term{enclosure} information, the \term{end of release marker}.
309 %The contents of the \env{pressrelease}
310 %environment is placed between the upper and lower areas.
311 %
312 %The layout of the press release can be customized using:
313 %\begin{definition}[\DescribeMacro\PRset]
314 %\cs{PRset}\marg{options}
315 %\end{definition}
316 %where \meta{options} is a \meta{key}=\meta{value} list of options.
317 %Most of these options can also be passed as class options. The
318 %options that can't be passed as a class option are:
319 %\opt{topinfo} and \opt{bottominfo}.
320 %
321 %\begin{description}
322 %\item[\opt{head}] This indicates if the \term{headline block} should go above or
323 %below the \term{top information block} and may also be used to
324 %indicate the horizontal position of the headline block.
325 %Permitted values: \optfmt{above}, \optfmt{below}, \optfmt{center},
326 %\optfmt{left}, \optfmt{right}. (The value \optfmt{centre} is
327 %equivalent to \optfmt{center}.)
328 %Mutually exclusive options override each other. For example
329 %\begin{verbatim}
330 %\PRset{head=left,head=right}
331 %\end{verbatim}
332 %will put the headline block on the right, whereas
333 %\begin{verbatim}
334 %\PRset{head=left,head=above}
335 %\end{verbatim}
336 %will put the headline block on the left above the top information block.
337 %For convenience the following options are also supplied to specified
338 %both the horizontal and vertical position: \optfmt{above center} (or
339 %\optfmt{above centre}), \optfmt{above left}, \optfmt{above right},
340 %\optfmt{below center} (or \optfmt{below centre}), \optfmt{below
341 %left}, \optfmt{below right}. The default is \optfmt{above center}.
342 %
343 %\item[\opt{smashlogo}] This is a boolean option. If \optfmt{true},
344 %the \term{logo} is placed inside a \cs{vbox} of zero height. The default
345 %is \optfmt{false}.
346 %
347 %\item[\opt{logo}] This indicates the \term{logo}'s position.
348 %Permitted values: \optfmt{left}
349 %(flush left), \optfmt{right} (flush right), \optfmt{above} (above
350 %the \term{release statement}), \optfmt{below} (below the release
351 %statement). Mutually exclusive options override each other.
352 %For example
353 %\begin{verbatim}
354 %\PRset{logo=left,logo=right}
355 %\end{verbatim}
356 %will put the logo on the right, whereas
357 %\begin{verbatim}
358 %\PRset{logo=left,logo=above}
359 %\end{verbatim}
360 %will put the logo on the left above the release statement. For
361 %convenience the following options are also provided that specify
362 %both the horizontal and vertical positions: \optfmt{above left},
363 %\optfmt{above right}, \optfmt{below left} and \optfmt{below right}.
364 %For example
365 %\begin{verbatim}
366 %\PRset{logo=above left}
367 %\end{verbatim}
368 %is equivalent to
369 %\begin{verbatim}
370 %\PRset{logo=left,logo=above}
371 %\end{verbatim}
372 %The default is \optfmt{above right}.
373 %
374 %\item[\opt{releasealign}] This specifies the alignment of the
375 %\term{release statement}. Permitted values: \optfmt{center}
376 %(centred), \optfmt{left} (flush left), \optfmt{right} (flush right).
377 %The default is \optfmt{center}. (The value \optfmt{centre} is
378 %equivalent to \optfmt{center}.)
379 %
380 %\item[\opt{ruled}] This is a boolean option. If \optfmt{true},
381 %horizontal rules are placed in the header block. If the \opt{head} option
382 %has been set to \optfmt{above} only two rules are drawn, one above
383 %the release statement and the other below the subheading. If the
384 %\opt{head} option has been set to \optfmt{below}, four rules are
385 %drawn: above and below the release statement, above the headline and
386 %below the subheading. The default value is \optfmt{true}.
387 %
388 %\item[\opt{topinfoalign}] This specifies the alignment of the
389 %\term{top information block}. Permitted values: \optfmt{center}
390 %(centred), \optfmt{left} (flush left), \optfmt{right} (flush right).
391 %The default is \optfmt{left}. (The value \optfmt{centre} is
392 %equivalent to \optfmt{center}.)
393 %
394 %\item[\opt{bottominfoalign}] This specifies the alignment of the
395 %\term{bottom information block}. Permitted values: \optfmt{center}
396 %(centred), \optfmt{left} (flush left), \optfmt{right} (flush right).
397 %The default is \optfmt{right}. (The value \optfmt{centre} is
398 %equivalent to \optfmt{center}.)
399 %
400 %\item[\opt{topinfo}] The specifies the information to display
401 %in the \term{top information block} and the display order. The
402 %value should be a slash \texttt{/} separated list of keywords
403 %indicating the information. The order of the keywords in the list
404 %indicates the display order. Permitted keywords: \optfmt{company}
405 %(as given by \ics{PRcompany}), \optfmt{department} (as given by
406 %\ics{PRdepartment}), \optfmt{location} (as given by
407 %\ics{PRlocation}), \optfmt{contact} (as given by \ics{PRcontact}),
408 %\optfmt{address} (as given by \ics{PRaddress}), \optfmt{hours} (as
409 %given by \ics{PRhours}), \optfmt{phone} (the phone numbers block as
410 %given by \ics{PRphone}, \ics{PRmobile} and \ics{PRfax}),
411 %\optfmt{email} (as given by \ics{PRemail}), \optfmt{date} (as given
412 %by \ics{date}). The default is:
413 %\begin{verbatim}
414 %\PRset{topinfo=company/department/location/date}
415 %\end{verbatim}
416 %This option can't be passed as a class option.
417 %
418 %\item[\opt{bottominfo}] The specifies the information to display
419 %in the \term{bottom information block} and the display order. This
420 %has the same syntax as \opt{topinfo}. The default is:
421 %\begin{verbatim}
422 %\PRset{bottominfo=contact/address/hours/phone/email}
423 %\end{verbatim}
424 %This option can't be passed as a class option.
425 %\end{description}
426 %
427 %\section{Textual Tags}
428 %\label{sec:tags}
429 %
430 %The \term{top information block}, the website information at the end of the
431 %\env{about} environment, the \term{bottom information block},
432 %and the \term{enclosure} information all have textual tags
433 %formatted using:
434 %\begin{definition}[\DescribeMacro\PRtagformat]
435 %\cs{PRtagformat}\marg{text}
436 %\end{definition}
437 %This defaults to \verb|\textbf{|\meta{text}\verb|:}| (the tag in
438 %bold with a colon). The top and bottom information blocks are set in
439 %a \env{tabular} environment with each row displayed using
440 %\begin{definition}[\DescribeMacro\PRinfotopline]
441 %\cs{PRinfotopline}\marg{tag}\marg{details}
442 %\end{definition}
443 %for the top information block and
444 %\begin{definition}[\DescribeMacro\PRinfobottomline]
445 %\cs{PRinfobottomline}\marg{tag}\marg{details}
446 %\end{definition}
447 %for the bottom information block. Both of these commands default to
448 %\begin{definition}[\DescribeMacro\PRinfoline]
449 %\cs{PRinfoline}\marg{tag}\marg{details}
450 %\end{definition}
451 %This is defined as
452 %\begin{verbatim}
453 %\newcommand*{\PRinfoline}[2]{%
454 % \PRtagformat{#1} & \PRinfoentry{#2}\tabularnewline
455 %}
456 %\end{verbatim}
457 %where
458 %\begin{definition}[\DescribeMacro\PRinfoentry]
459 %\cs{PRinfoentry}\marg{details}
460 %\end{definition}
461 %formats the data supplied by commands such as \cs{PRcompany},
462 %described in \sectionref{sec:datacommands}. Rows with empty data are
463 %ignored.
464 %
465 %If you want to remove all tags in the top and bottom information
466 %blocks, you can do so using:
467 %\begin{verbatim}
468 %\renewcommand*{\PRinfoline}[2]{%
469 % \PRinfoentry{#2}\tabularnewline
470 %}
471 %\end{verbatim}
472 %or if you want the tags on the right instead of the left you can do:
473 %\begin{verbatim}
474 %\renewcommand*{\PRinfoline}[2]{%
475 % \PRinfoentry{#2} & \PRtagformat{#1}\tabularnewline
476 %}
477 %\end{verbatim}
478 %If you only want to remove the tags from the top information block,
479 %you can do:
480 %\begin{verbatim}
481 %\renewcommand*{\PRinfotopline}[2]{%
482 % \PRinfoentry{#2}\tabularnewline
483 %}
484 %\end{verbatim}
485 %
486 %The enclosure information is formatted using:
487 %\begin{definition}[\DescribeMacro\PRenclformat]
488 %\cs{PRenclformat}\marg{tag}\marg{details}
489 %\end{definition}
490 %
491 %The website information at the end of the \env{about} environment is
492 %formatted using:
493 %\begin{definition}[\DescribeMacro\PRurlformat]
494 %\cs{PRurlformat}\marg{tag}\marg{web address}
495 %\end{definition}
496 %
497 %The tags can be changed by redefining the commands described below.
498 %For example, if you want to provide alternative text or if you want
499 %to display symbols instead. The \sty{pressrelease-symbols} package
500 %provided with the \clsfmt{pressrelease} class redefines these commands
501 %to display symbols from the \sty{marvosym} package\footnote{There's
502 %an additional symbol defined using the \sty{tikz} package.}. (It
503 %also suppresses the tags in the top information block.) So if
504 %you want symbols you can just do:
505 %\begin{verbatim}
506 %\documentclass{pressrelease}
507 %\usepackage{pressrelease-symbols}
508 %\end{verbatim}
509 %or, equivalently,
510 %\begin{verbatim}
511 %\documentclass[symbols]{pressrelease}
512 %\end{verbatim}
513 %If you don't like this choice of symbols you can just redefine the
514 %commands below according to your preferences.
515 %
516 %\begin{definition}[\DescribeMacro\PRcontacttext]
517 %\cs{PRcontacttext}
518 %\end{definition}
519 %The contact tag. Default: \qt{Contact}.
520 %
521 %\begin{definition}[\DescribeMacro\PRphonetext]
522 %\cs{PRphonetext}
523 %\end{definition}
524 %The phone tag. Default: \qt{Telephone}.
525 %
526 %\begin{definition}[\DescribeMacro\PRmobiletext]
527 %\cs{PRmobiletext}
528 %\end{definition}
529 %The mobile phone tag. Default: \qt{Mobile}.
530 %
531 %\begin{definition}[\DescribeMacro\PRemailtext]
532 %\cs{PRemailtext}
533 %\end{definition}
534 %The email tag. Default: \qt{Email}.
535 %
536 %\begin{definition}[\DescribeMacro\PRurltext]
537 %\cs{PRurltext}
538 %\end{definition}
539 %The url tag. Default: \qt{Website}.
540 %
541 %\begin{definition}[\DescribeMacro\PRfaxtext]
542 %\cs{PRfaxtext}
543 %\end{definition}
544 %The fax tag. Default: \qt{Fax}.
545 %
546 %\begin{definition}[\DescribeMacro\PRcompanytext]
547 %\cs{PRcompanytext}
548 %\end{definition}
549 %The company tag. Default: \qt{Company}.
550 %
551 %\begin{definition}[\DescribeMacro\PRdepartmenttext]
552 %\cs{PRdepartmenttext}
553 %\end{definition}
554 %The department tag. Default: \qt{Department}.
555 %
556 %\begin{definition}[\DescribeMacro\PRaddresstext]
557 %\cs{PRaddresstext}
558 %\end{definition}
559 %The address tag. Default: \qt{Address}.
560 %
561 %\begin{definition}[\DescribeMacro\PRhourstext]
562 %\cs{PRhourstext}
563 %\end{definition}
564 %The opening hours tag. Default: \qt{Opening Times}.
565 %
566 %\begin{definition}[\DescribeMacro\PRdatetext]
567 %\cs{PRdatetext}
568 %\end{definition}
569 %The date tag. Default: \qt{Date}.
570 %
571 %\begin{definition}[\DescribeMacro\PRlocationtext]
572 %\cs{PRlocationtext}
573 %\end{definition}
574 %The location tag. Default: \qt{Location}.
575 %
576 %\begin{definition}[\DescribeMacro\PRencltext]
577 %\cs{PRencltext}
578 %\end{definition}
579 %The enclosures tag. Default: \qt{Encl.}
580 %
581 %\begin{definition}[\DescribeMacro\PRabouttext]
582 %\cs{PRabouttext}
583 %\end{definition}
584 %The about tag. Default: \verb|About \PRusevar{company}|.
585 %
586 %The default release statement (\qt{For immediate release}) is produced using
587 %\begin{definition}[\DescribeMacro\PRreleasetext]
588 %\cs{PRreleasetext}
589 %\end{definition}
590 %This is used if \cs{PRrelease} isn't used.
591 %
592 %The page footer uses
593 %\begin{definition}[\DescribeMacro\PRnOfm]
594 %\cs{PRnOfm}\marg{n}\marg{m}
595 %\end{definition}
596 %to format the page number in the style \qt{\meta{n} of \meta{m}}.
597 %
598 %\section{Adding Multilingual Support}
599 %\label{sec:multiling}
600 %
601 %If you want to provide translations for the tags, you can write your
602 %own package that redefines the commands described in
603 %\sectionref{sec:tags}. For example, create a file called
604 %\texttt{pressrelease-}\meta{LANG}\texttt{.sty}, where \meta{LANG} is
605 %the language name and type in the following, replacing \meta{LANG}
606 %with the language name and inserting the required translations:
607 %\begin{alltt}
608 %\cs{NeedsTeXFormat}\{LaTeX2e\}
609 %\cs{ProvidesPackage}\{pressrelease-\meta{LANG}\}
610 %\end{alltt}
611 %\begin{verbatim}
612 %\renewcommand*{\PRreleasetext}{For immediate release}
613 %\renewcommand*{\PRcontacttext}{Contact}
614 %\renewcommand*{\PRphonetext}{Telephone}
615 %\renewcommand*{\PRmobiletext}{Mobile}
616 %\renewcommand*{\PRemailtext}{Email}
617 %\renewcommand*{\PRurltext}{Website}
618 %\renewcommand*{\PRfaxtext}{Fax}
619 %\renewcommand*{\PRcompanytext}{Company}
620 %\renewcommand*{\PRdepartmenttext}{Department}
621 %\renewcommand*{\PRaddresstext}{Address}
622 %\renewcommand*{\PRhourstext}{Opening Times}
623 %\renewcommand*{\PRdatetext}{Date}
624 %\renewcommand*{\PRlocationtext}{Location}
625 %\renewcommand*{\PRabouttext}{About \PRusevar{company}}
626 %\renewcommand*{\PRencltext}{Encl.}
627 %\renewcommand*{\PRnOfm}[2]{#1 of #2}
628 %
629 %\endinput
630 %\end{verbatim}
631 %If you want to use the \sty{babel} interface, you can add the
632 %definitions to the \cs{captions}\meta{LANG} command:
633 %\begin{alltt}
634 %\cs{addto}\cs{captions}\meta{LANG}\{\%
635 % \cs{renewcommand}*\{\cs{PRreleasetext}\}\{For immediate release\}
636 % \% etc
637 %\}
638 %\end{alltt}
639 %
640 %Put the file somewhere on \TeX's path, and now you can use this
641 %package in your document. You might also consider uploading it
642 %to CTAN in case other users find it useful.
643 %
644 %\section{Example Document}
645 %
646 %The document below uses the default layout. (The first two lines are
647 %\texttt{arara} directives. You can ignore them if you don't use
648 %\texttt{arara}, but they are a reminder that two \LaTeX\ runs are
649 %required.) The \isty{babel} package is loaded with the
650 %\texttt{british} option to change the default date format. The image
651 %file used for the logo is provided by the \sty{mwe} package. The
652 %resulting document is shown in Figure~\ref{fig:sample}. This
653 %example, and others, can be found in the \texttt{samples}
654 %subdirectory of the documentation directory.
655 %
656 %\verbatiminput{samples/sample-pressrelease}
657 %
658 %\begin{figure}[p]
659 % \centering
660 % \frame{\includegraphics[height=0.9\textheight]{samples/sample-pressrelease}}
661 % \caption{Sample Document}
662 % \label{fig:sample}
663 %\end{figure}
664 %
665 %\clearpage
666 %\StopEventually{\PrintIndex}
667 %
668 %
669 %\section{The Code}
670 %\iffalse
671 % \begin{macrocode}
672 %<*pressrelease.cls>
673 % \end{macrocode}
674 %\fi
675 %\subsection{pressrelease.cls}
676 %\changes{1.0}{2014-09-10}{Initial release}
677 % Declare class and required TeX format:
678 % \begin{macrocode}
679 \NeedsTeXFormat{LaTeX2e}
680 \ProvidesClass{pressrelease}[2014/09/10 v1.0 (NLCT) Press Release Class]
681 % \end{macrocode}
682 % Class options have a key=value interface.
683 % \begin{macrocode}
684 \RequirePackage{xkeyval}
685 \RequirePackage{etoolbox}
686 % \end{macrocode}
687 %
688 % Font size options.
689 % \begin{macrocode}
690 \DeclareOptionX{10pt}{\PassOptionsToClass{10pt}{article}}
691 \DeclareOptionX{11pt}{\PassOptionsToClass{11pt}{article}}
692 \DeclareOptionX{12pt}{\PassOptionsToClass{12pt}{article}}
693 % \end{macrocode}
694 % Paper size options (sizes can also be set via \cs{geometry})
695 % \begin{macrocode}
696 \DeclareOptionX{letterpaper}{\PassOptionsToClass{letterpaper}{article}}
697 \DeclareOptionX{a4paper}{\PassOptionsToClass{a4paper}{article}}
698 % \end{macrocode}
699 %
700 %\begin{macro}{\ifPRloadsymbols}
701 % Load \sty{pressrelease-symbols} if true
702 % \begin{macrocode}
703 \define@boolkey{pressrelease.cls}[@PRload]{symbols}[true]{}
704 \@PRloadsymbolsfalse
705 % \end{macrocode}
706 %\end{macro}
707 %
708 %\begin{macro}{\ifPRheadabove}
709 % If true, head line goes above top info block otherwise headline
710 % goes below top info block.
711 % \begin{macrocode}
712 \newif\ifPRheadabove
713 \PRheadabovetrue
714 % \end{macrocode}
715 %\end{macro}
716 %\begin{macro}{\PRheadalign}
717 % Headline alignment (default: centred)
718 % \begin{macrocode}
719 \newcommand{\PRheadalign}[1]{%
720 \begin{center}#1\end{center}%
721 }
722 % \end{macrocode}
723 %\end{macro}
724 %
725 % \begin{macrocode}
726 \define@choicekey{pressrelease.cls}{head}[\val\nr]%
727 {above,below,center,left,right,centre,%
728 above center,above centre,above left,above right,%
729 below center,below centre,below left,below right}%
730 {%
731 \ifcase\nr\relax
732 \PRheadabovetrue
733 \or
734 \PRheadabovefalse
735 \or
736 \renewcommand{\PRheadalign}[1]{\begin{center}##1\end{center}}%
737 \or
738 \renewcommand{\PRheadalign}[1]{\begin{flushleft}##1\end{flushleft}}%
739 \or
740 \renewcommand{\PRheadalign}[1]{\begin{flushright}##1\end{flushright}}%
741 \or
742 \renewcommand{\PRheadalign}[1]{\begin{center}##1\end{center}}%
743 \or % above center
744 \PRheadabovetrue
745 \renewcommand{\PRheadalign}[1]{\begin{center}##1\end{center}}%
746 \or % above centre
747 \PRheadabovetrue
748 \renewcommand{\PRheadalign}[1]{\begin{center}##1\end{center}}%
749 \or % above left
750 \PRheadabovetrue
751 \renewcommand{\PRheadalign}[1]{\begin{flushleft}##1\end{flushleft}}%
752 \or % above right
753 \PRheadabovetrue
754 \renewcommand{\PRheadalign}[1]{\begin{flushright}##1\end{flushright}}%
755 \or % below centre
756 \PRheadabovefalse
757 \renewcommand{\PRheadalign}[1]{\begin{center}##1\end{center}}%
758 \or % below center
759 \PRheadabovefalse
760 \renewcommand{\PRheadalign}[1]{\begin{center}##1\end{center}}%
761 \or % below left
762 \PRheadabovefalse
763 \renewcommand{\PRheadalign}[1]{\begin{flushleft}##1\end{flushleft}}%
764 \or % below right
765 \PRheadabovefalse
766 \renewcommand{\PRheadalign}[1]{\begin{flushright}##1\end{flushright}}%
767 \fi
768 }
769 % \end{macrocode}
770 %
771 %\begin{macro}{\PRlogoformat}
772 % \begin{macrocode}
773 \newcommand*{\PRlogoformat}[1]{#1}
774 % \end{macrocode}
775 % Make it possible for user to ``smash'' logo so it doesn't take up
776 % vertical space:
777 % \begin{macrocode}
778 \define@choicekey{pressrelease.cls}{smashlogo}[\val\nr]{true,false}[true]{%
779 \ifcase\nr\relax
780 \renewcommand*{\PRlogoformat}[1]{\vbox to 0pt{##1}}%
781 \or
782 \renewcommand*{\PRlogoformat}[1]{##1}%
783 \fi
784 }
785 % \end{macrocode}
786 %\end{macro}
787 %
788 %\begin{macro}{\PRlogoalign}
789 % \begin{macrocode}
790 \newif\ifPRlogoabove
791 \PRlogoabovetrue
792 \newcommand{\PRlogoalign}[1]{{\raggedleft\PRlogoformat{#1}\par}}
793 \define@choicekey{pressrelease.cls}{logo}[\val\nr]%
794 {left,right,above,below,above left,above right,below left,below right}{%
795 \ifcase\nr\relax
796 \renewcommand{\PRlogoalign}[1]{{\raggedright\PRlogoformat{##1}\@@par}}%
797 \or
798 \renewcommand{\PRlogoalign}[1]{{\raggedleft\PRlogoformat{##1}\@@par}}%
799 \or
800 \PRlogoabovetrue
801 \or
802 \PRlogoabovefalse
803 \or
804 \PRlogoabovetrue
805 \renewcommand{\PRlogoalign}[1]{{\raggedright\PRlogoformat{##1}\@@par}}%
806 \or
807 \PRlogoabovetrue
808 \renewcommand{\PRlogoalign}[1]{{\raggedleft\PRlogoformat{##1}\@@par}}%
809 \or
810 \PRlogoabovefalse
811 \renewcommand{\PRlogoalign}[1]{{\raggedright\PRlogoformat{##1}\@@par}}%
812 \or
813 \PRlogoabovefalse
814 \renewcommand{\PRlogoalign}[1]{{\raggedleft\PRlogoformat{##1}\@@par}}%
815 \fi
816 }
817 % \end{macrocode}
818 %\end{macro}
819 %
820 %\begin{macro}{\PRreleasealign}
821 % Release alignment (default: centred)
822 % \begin{macrocode}
823 \newcommand{\PRreleasealign}[1]{%
824 \begin{center}#1\end{center}%
825 }
826 \define@choicekey{pressrelease.cls}{releasealign}[\val\nr]{center,left,right,centre}{%
827 \ifcase\nr\relax
828 \renewcommand{\PRreleasealign}[1]{\begin{center}##1\end{center}}%
829 \or
830 \renewcommand{\PRreleasealign}[1]{\begin{flushleft}##1\end{flushleft}}%
831 \or
832 \renewcommand{\PRreleasealign}[1]{\begin{flushright}##1\end{flushright}}%
833 \or
834 \renewcommand{\PRreleasealign}[1]{\begin{center}##1\end{center}}%
835 \fi
836 }
837 % \end{macrocode}
838 %\end{macro}
839 %
840 %\begin{macro}{\ifPRruled}
841 % Use horizontal rules if true.
842 % \begin{macrocode}
843 \define@boolkey{pressrelease.cls}[PR]{ruled}[true]{}
844 \PRruledtrue
845 % \end{macrocode}
846 %\end{macro}
847 %
848 %\begin{macro}{\PRinfotopalign}
849 % Contact details alignment of top info block (default: left)
850 % \begin{macrocode}
851 \newcommand{\PRinfotopalign}[1]{%
852 \begin{flushleft}#1\end{flushleft}%
853 }
854 \define@choicekey{pressrelease.cls}{topinfoalign}[\val\nr]{center,left,right,centre}{%
855 \ifcase\nr\relax
856 \renewcommand{\PRinfotopalign}[1]{\begin{center}##1\end{center}}%
857 \or
858 \renewcommand{\PRinfotopalign}[1]{\begin{flushleft}##1\end{flushleft}}%
859 \or
860 \renewcommand{\PRinfotopalign}[1]{\begin{flushright}##1\end{flushright}}%
861 \or
862 \renewcommand{\PRinfotopalign}[1]{\begin{center}##1\end{center}}%
863 \fi
864 }
865 % \end{macrocode}
866 %\end{macro}
867 %
868 %\begin{macro}{\PRinfobottomalign}
869 % Contact details alignment of bottom info block (default: right)
870 % \begin{macrocode}
871 \newcommand{\PRinfobottomalign}[1]{%
872 \begin{flushright}#1\end{flushright}%
873 }
874 \define@choicekey{pressrelease.cls}{bottominfoalign}[\val\nr]{center,left,right,centre}{%
875 \ifcase\nr\relax
876 \renewcommand{\PRinfobottomalign}[1]{\begin{center}##1\end{center}}%
877 \or
878 \renewcommand{\PRinfobottomalign}[1]{\begin{flushleft}##1\end{flushleft}}%
879 \or
880 \renewcommand{\PRinfobottomalign}[1]{\begin{flushright}##1\end{flushright}}%
881 \or
882 \renewcommand{\PRinfobottomalign}[1]{\begin{center}##1\end{center}}%
883 \fi
884 }
885 % \end{macrocode}
886 %\end{macro}
887 %
888 % Process options
889 % \begin{macrocode}
890 \ProcessOptionsX
891 % \end{macrocode}
892 % Load \cls{article} class:
893 % \begin{macrocode}
894 \LoadClass{article}
895 % \end{macrocode}
896 % Load required packages:
897 % \begin{macrocode}
898 \RequirePackage{setspace}
899 \RequirePackage{geometry}
900 \RequirePackage{url}
901 \RequirePackage{refcount}
902 % \end{macrocode}
903 % Set wide margins
904 % \begin{macrocode}
905 \geometry{hmargin=1in,vmargin=1in,hcentering}
906 % \end{macrocode}
907 % Start with single spacing.
908 % \begin{macrocode}
909 \singlespacing
910 % \end{macrocode}
911 %
912 % Text defaults:
913 %\begin{macro}{\PRreleasetext}
914 % \begin{macrocode}
915 \newcommand*{\PRreleasetext}{For immediate release}
916 % \end{macrocode}
917 %\end{macro}
918 %\begin{macro}{\PRcontacttext}
919 % \begin{macrocode}
920 \newcommand*{\PRcontacttext}{Contact}
921 % \end{macrocode}
922 %\end{macro}
923 %\begin{macro}{\PRphonetext}
924 % \begin{macrocode}
925 \newcommand*{\PRphonetext}{Telephone}
926 % \end{macrocode}
927 %\end{macro}
928 %\begin{macro}{\PRmobiletext}
929 % \begin{macrocode}
930 \newcommand*{\PRmobiletext}{Mobile}
931 % \end{macrocode}
932 %\end{macro}
933 %\begin{macro}{\PRemailtext}
934 % \begin{macrocode}
935 \newcommand*{\PRemailtext}{Email}
936 % \end{macrocode}
937 %\end{macro}
938 %\begin{macro}{\PRurltext}
939 % \begin{macrocode}
940 \newcommand*{\PRurltext}{Website}
941 % \end{macrocode}
942 %\end{macro}
943 %\begin{macro}{\PRfaxtext}
944 % \begin{macrocode}
945 \newcommand*{\PRfaxtext}{Fax}
946 % \end{macrocode}
947 %\end{macro}
948 %\begin{macro}{\PRcompanytext}
949 % \begin{macrocode}
950 \newcommand*{\PRcompanytext}{Company}
951 % \end{macrocode}
952 %\end{macro}
953 %\begin{macro}{\PRdepartmenttext}
954 % \begin{macrocode}
955 \newcommand*{\PRdepartmenttext}{Department}
956 % \end{macrocode}
957 %\end{macro}
958 %\begin{macro}{\PRaddresstext}
959 % \begin{macrocode}
960 \newcommand*{\PRaddresstext}{Address}
961 % \end{macrocode}
962 %\end{macro}
963 %\begin{macro}{\PRhourstext}
964 % \begin{macrocode}
965 \newcommand*{\PRhourstext}{Opening Times}
966 % \end{macrocode}
967 %\end{macro}
968 %\begin{macro}{\PRdatetext}
969 % \begin{macrocode}
970 \newcommand*{\PRdatetext}{Date}
971 % \end{macrocode}
972 %\end{macro}
973 %\begin{macro}{\PRlocationtext}
974 % \begin{macrocode}
975 \newcommand*{\PRlocationtext}{Location}
976 % \end{macrocode}
977 %\end{macro}
978 %
979 %\begin{macro}{\PRabouttext}
980 % \begin{macrocode}
981 \newcommand*{\PRabouttext}{About \PRusevar{company}}
982 % \end{macrocode}
983 %\end{macro}
984 %
985 %\begin{macro}{\PRencltext}
986 % \begin{macrocode}
987 \newcommand*{\PRencltext}{Encl.}
988 % \end{macrocode}
989 %\end{macro}
990 %
991 %\begin{macro}{\PRrelease}
992 % Set the release text.
993 % \begin{macrocode}
994 \newcommand*{\PRrelease}[1]{\renewcommand*{\@PRrelease}{#1}}
995 \newcommand*{\@PRrelease}{\PRreleasetext}
996 % \end{macrocode}
997 %\end{macro}
998 %
999 %\begin{macro}{\PRreleaseformat}
1000 % Format used for the release text.
1001 % \begin{macrocode}
1002 \newcommand*{\PRreleaseformat}[1]{\textbf{\Large\MakeUppercase{#1}}}
1003 % \end{macrocode}
1004 %\end{macro}
1005 %
1006 %\begin{macro}{\PRdohrule}
1007 % Do a horizontal rule if the ruled option has been set.
1008 % \begin{macrocode}
1009 \newcommand{\PRdohrule}{\ifPRruled\par\noindent\hrulefill\par\noindent\fi}
1010 % \end{macrocode}
1011 %\end{macro}
1012 %
1013 %\begin{macro}{\PRtagformat}
1014 % Font for the tags:
1015 % \begin{macrocode}
1016 \newcommand*{\PRtagformat}[1]{\textbf{#1:}}
1017 % \end{macrocode}
1018 %\end{macro}
1019 %
1020 %\begin{macro}{\PRcompany}
1021 % Set the company name.
1022 % \begin{macrocode}
1023 \newcommand*{\PRcompany}[1]{\renewcommand*{\@PRcompany}{#1}}
1024 \newcommand*{\@PRcompany}{}
1025 % \end{macrocode}
1026 %\end{macro}
1027 %\begin{macro}{\PRdepartment}
1028 % Set the department name.
1029 % \begin{macrocode}
1030 \newcommand*{\PRdepartment}[1]{\renewcommand*{\@PRdepartment}{#1}}
1031 \newcommand*{\@PRdepartment}{}
1032 % \end{macrocode}
1033 %\end{macro}
1034 %\begin{macro}{\PRcontact}
1035 % Set the contact name.
1036 % \begin{macrocode}
1037 \newcommand*{\PRcontact}[1]{\renewcommand*{\@PRcontact}{#1}}
1038 \newcommand*{\@PRcontact}{}
1039 % \end{macrocode}
1040 %\end{macro}
1041 %\begin{macro}{\PRaddress}
1042 % Set the address.
1043 % \begin{macrocode}
1044 \newcommand*{\PRaddress}[1]{\renewcommand*{\@PRaddress}{#1}}
1045 \newcommand*{\@PRaddress}{}
1046 % \end{macrocode}
1047 %\end{macro}
1048 %\begin{macro}{\PRlocation}
1049 % Set the location.
1050 % \begin{macrocode}
1051 \newcommand*{\PRlocation}[1]{\renewcommand*{\@PRlocation}{#1}}
1052 \newcommand*{\@PRlocation}{}
1053 % \end{macrocode}
1054 %\end{macro}
1055 %
1056 %\begin{macro}{\PRphone}
1057 % Set the phone number.
1058 % \begin{macrocode}
1059 \newcommand*{\PRphone}[1]{\renewcommand*{\@PRphone}{#1}}
1060 \newcommand*{\@PRphone}{}
1061 % \end{macrocode}
1062 %\end{macro}
1063 %\begin{macro}{\PRmobile}
1064 % Set the mobile number.
1065 % \begin{macrocode}
1066 \newcommand*{\PRmobile}[1]{\renewcommand*{\@PRmobile}{#1}}
1067 \newcommand*{\@PRmobile}{}
1068 % \end{macrocode}
1069 %\end{macro}
1070 %\begin{macro}{\PRfax}
1071 % Set the fax number.
1072 % \begin{macrocode}
1073 \newcommand*{\PRfax}[1]{\renewcommand*{\@PRfax}{#1}}
1074 \newcommand*{\@PRfax}{}
1075 % \end{macrocode}
1076 %\end{macro}
1077 %
1078 %\begin{macro}{\PRemail}
1079 % Set the email address.
1080 % \begin{macrocode}
1081 \newcommand*{\PRemail}[1]{\renewcommand*{\@PRemail}{\PRemailformat{#1}}}
1082 \newcommand*{\@PRemail}{}
1083 % \end{macrocode}
1084 %\end{macro}
1085 %
1086 %\begin{macro}{\PRemailformat}
1087 % \begin{macrocode}
1088 \newcommand*{\PRemailformat}[1]{\texttt{#1}}
1089 % \end{macrocode}
1090 %\end{macro}
1091 %
1092 %\begin{macro}{\PRurl}
1093 % Set the web address.
1094 % \begin{macrocode}
1095 \newcommand*{\PRurl}[1]{\renewcommand*{\@PRurl}{\protect\url{#1}}}
1096 \newcommand*{\@PRurl}{}
1097 % \end{macrocode}
1098 %\end{macro}
1099 %
1100 %\begin{macro}{\PRhours}
1101 % Set the opening hours.
1102 % \begin{macrocode}
1103 \newcommand*{\PRhours}[1]{\renewcommand*{\@PRhours}{#1}}
1104 \newcommand*{\@PRhours}{}
1105 % \end{macrocode}
1106 %\end{macro}
1107 %
1108 %\begin{macro}{\PRlogo}
1109 % Set the company logo.
1110 % \begin{macrocode}
1111 \newcommand*{\PRlogo}[1]{\renewcommand*{\@PRlogo}{#1}}
1112 \newcommand*{\@PRlogo}{}
1113 % \end{macrocode}
1114 %\end{macro}
1115 %
1116 %\begin{macro}{\PRencl}
1117 % Set the enclosure text.
1118 % \begin{macrocode}
1119 \newcommand*{\PRencl}[1]{\renewcommand*{\@PRencl}{#1}}
1120 \newcommand*{\@PRencl}{}
1121 % \end{macrocode}
1122 %\end{macro}
1123 %
1124 %\begin{macro}{\PRusevar}
1125 % Access information set using the above commands.
1126 % \begin{macrocode}
1127 \newcommand*{\PRusevar}[1]{\csuse{@PR#1}}
1128 % \end{macrocode}
1129 %\end{macro}
1130 % Allow the date to be accessed in the same way.
1131 % \begin{macrocode}
1132 \newcommand*{\@PRdate}{\@date}
1133 % \end{macrocode}
1134 %
1135 %\begin{macro}{\PRinfotopblock}
1136 %\begin{definition}
1137 %\cs{PRinfotopblock}\marg{company}\marg{department}\marg{location}\marg{contact
1138 %name}\marg{address}\marg{opening
1139 %hours}\marg{phone}\marg{email}\marg{date}
1140 %\end{definition}
1141 % Order of information in the top info block.
1142 % \begin{macrocode}
1143 \newcommand{\PRinfotopblock}[9]{#1#2#3#9}
1144 % \end{macrocode}
1145 %
1146 %\begin{macro}{\PRinfobottomblock}
1147 %\begin{definition}
1148 %\cs{PRinfobottomblock}\marg{company}\marg{department}\marg{location}\marg{contact
1149 %name}\marg{address}\marg{opening
1150 %hours}\marg{phone}\marg{email}\marg{date}
1151 %\end{definition}
1152 % Order of information in the bottom info block.
1153 % \begin{macrocode}
1154 \newcommand{\PRinfobottomblock}[9]{#4#5#6#7#8}
1155 % \end{macrocode}
1156 %
1157 % Provide option to set order of items in the info blocks. First define a list parser that
1158 % uses the hyphen character as the separator.
1159 % \begin{macrocode}
1160 \DeclareListParser*{\@PR@forslashlist}{/}
1161 \newcommand*{\@PR@slashlistdo}[1]{%
1162 \ifstrequal{#1}{company}%
1163 {\appto\@PR@infoargs{##1}}%
1164 {%
1165 \ifstrequal{#1}{department}%
1166 {\appto\@PR@infoargs{##2}}%
1167 {%
1168 \ifstrequal{#1}{location}%
1169 {\appto\@PR@infoargs{##3}}%
1170 {%
1171 \ifstrequal{#1}{contact}%
1172 {\appto\@PR@infoargs{##4}}%
1173 {%
1174 \ifstrequal{#1}{address}%
1175 {\appto\@PR@infoargs{##5}}%
1176 {%
1177 \ifstrequal{#1}{hours}%
1178 {\appto\@PR@infoargs{##6}}%
1179 {%
1180 \ifstrequal{#1}{phone}%
1181 {\appto\@PR@infoargs{##7}}%
1182 {%
1183 \ifstrequal{#1}{email}%
1184 {\appto\@PR@infoargs{##8}}%
1185 {%
1186 \ifstrequal{#1}{date}%
1187 {\appto\@PR@infoargs{##9}}%
1188 {%
1189 \ClassError{pressrelease}%
1190 {Unknown info block option `#1'}%
1191 {Available options: `company', `department',
1192 `location', `contact', `address', `hours', `phone',
1193 `email', `date'}%
1194 }%
1195 }%
1196 }%
1197 }%
1198 }%
1199 }%
1200 }%
1201 }%
1202 }%
1203 }
1204 % \end{macrocode}
1205 %
1206 % The options below can't be passed as class options. They must be
1207 % set using \cs{PRset}.
1208 %
1209 % \begin{macrocode}
1210 \define@key{pressrelease.cls}{topinfo}{%
1211 \def\@PR@infoargs{}%
1212 \@PR@forslashlist\@PR@slashlistdo{#1}%
1213 \expandafter\renewcommand\expandafter\PRinfotopblock
1214 \expandafter[\expandafter9\expandafter]\expandafter{\@PR@infoargs}%
1215 }
1216 % \end{macrocode}
1217 %\end{macro}
1218 %
1219 % \begin{macrocode}
1220 \define@key{pressrelease.cls}{bottominfo}{%
1221 \def\@PR@infoargs{}%
1222 \@PR@forslashlist\@PR@slashlistdo{#1}%
1223 \expandafter\renewcommand\expandafter\PRinfobottomblock
1224 \expandafter[\expandafter9\expandafter]\expandafter{\@PR@infoargs}%
1225 }
1226 % \end{macrocode}
1227 %\end{macro}
1228
1229 %\begin{macro}{\PRset}
1230 % \begin{macrocode}
1231 \newcommand*{\PRset}[1]{\setkeys{pressrelease.cls}{#1}}
1232 % \end{macrocode}
1233 %\end{macro}
1234 %
1235 %\begin{macro}{\PR@infotopline}
1236 % Check for empty entry.
1237 % \begin{macrocode}
1238 \newcommand*{\PR@infotopline}[2]{%
1239 \ifdefempty{#2}{}{\PRinfotopline{#1}{#2}}%
1240 }
1241 % \end{macrocode}
1242 %\end{macro}
1243 %
1244 %\begin{macro}{\PR@infobottomline}
1245 % Check for empty entry.
1246 % \begin{macrocode}
1247 \newcommand*{\PR@infobottomline}[2]{%
1248 \ifdefempty{#2}{}{\PRinfobottomline{#1}{#2}}%
1249 }
1250 % \end{macrocode}
1251 %\end{macro}
1252 %
1253 %\begin{macro}{\PR@doinfotop}
1254 % Do the top info block details.
1255 % \begin{macrocode}
1256 \newcommand{\PR@doinfotop}{%
1257 \PRinfotopalign{%
1258 \PR@doinfoblock\PR@infotopline\PRinfotopblock
1259 \PRinfotopbeginhook\PRinfotopendhook
1260 }%
1261 }
1262 % \end{macrocode}
1263 %\end{macro}
1264 %
1265 %\begin{macro}{\PR@doinfobottom}
1266 % Do the bottom info block details.
1267 % \begin{macrocode}
1268 \newcommand{\PR@doinfobottom}{%
1269 \PRinfobottomalign{%
1270 \PR@doinfoblock\PR@infobottomline\PRinfobottomblock
1271 \PRinfobottombeginhook\PRinfobottomendhook
1272 }%
1273 }
1274 % \end{macrocode}
1275 %\end{macro}
1276 %
1277 %\begin{macro}{\PR@doinfoblock}
1278 %\begin{definition}
1279 %\cs{PR@doinfoblock}\marg{info line cs}\marg{block order cs}\marg{begin hook cs}\marg{end hook cs}
1280 %\end{definition}
1281 % Do info block details.
1282 % \begin{macrocode}
1283 \newcommand{\PR@doinfoblock}[4]{%
1284 \begin{tabular}{@{}ll@{}}%
1285 #3%
1286 #2%
1287 {%
1288 #1{\PRcompanytext}{\@PRcompany}%
1289 }%
1290 {%
1291 #1{\PRdepartmenttext}{\@PRdepartment}%
1292 }%
1293 {%
1294 #1{\PRlocationtext}{\@PRlocation}%
1295 }%
1296 {%
1297 #1{\PRcontacttext}{\@PRcontact}%
1298 }%
1299 {%
1300 #1{\PRaddresstext}{\@PRaddress}%
1301 }%
1302 {%
1303 #1{\PRhourstext}{\@PRhours}%
1304 }%
1305 {%
1306 #1{\PRphonetext}{\@PRphone}%
1307 #1{\PRmobiletext}{\@PRmobile}%
1308 #1{\PRfaxtext}{\@PRfax}%
1309 }%
1310 {%
1311 #1{\PRemailtext}{\@PRemail}%
1312 }%
1313 {%
1314 #1{\PRdatetext}{\@date}%
1315 }%
1316 #4%
1317 \end{tabular}%
1318 }
1319 % \end{macrocode}
1320 %\end{macro}
1321 %
1322 %\begin{macro}{\PRinfoentry}
1323 % Format the entry information within the info line (not the tag).
1324 % \begin{macrocode}
1325 \newcommand*{\PRinfoentry}[1]{\begin{tabular}[t]{@{}l@{}}#1\end{tabular}}
1326 % \end{macrocode}
1327 %\end{macro}
1328 %
1329 %\begin{macro}{\PRinfoline}
1330 % Generic line format for info block.
1331 % \begin{macrocode}
1332 \newcommand*{\PRinfoline}[2]{%
1333 \PRtagformat{#1} & \PRinfoentry{#2}\tabularnewline
1334 }
1335 % \end{macrocode}
1336 %\end{macro}
1337 %
1338 %\begin{macro}{\PRinfotopline}
1339 % Format line in the top info block.
1340 % \begin{macrocode}
1341 \newcommand*{\PRinfotopline}{\PRinfoline}
1342 % \end{macrocode}
1343 %\end{macro}
1344 %
1345 %\begin{macro}{\PRinfobottomline}
1346 % Format line in the bottom info block.
1347 % \begin{macrocode}
1348 \newcommand*{\PRinfobottomline}{\PRinfoline}
1349 % \end{macrocode}
1350 %\end{macro}
1351 %
1352 %\begin{macro}{\PRinfotopbeginhook}
1353 % Hook for user to provide additional information at the start of the
1354 % top info block.
1355 % \begin{macrocode}
1356 \newcommand*{\PRinfotopbeginhook}{}
1357 % \end{macrocode}
1358 %\end{macro}
1359 %\begin{macro}{\PRinfotopendhook}
1360 % Hook for user to provide additional information at the end of the
1361 % info block.
1362 % \begin{macrocode}
1363 \newcommand*{\PRinfotopendhook}{}
1364 % \end{macrocode}
1365 %\end{macro}
1366 %
1367 %\begin{macro}{\PRinfobottombeginhook}
1368 % Hook for user to provide additional information at the start of the
1369 % bottom info block.
1370 % \begin{macrocode}
1371 \newcommand*{\PRinfobottombeginhook}{}
1372 % \end{macrocode}
1373 %\end{macro}
1374 %\begin{macro}{\PRinfobottomendhook}
1375 % Hook for user to provide additional information at the end of the
1376 % info block.
1377 % \begin{macrocode}
1378 \newcommand*{\PRinfobottomendhook}{}
1379 % \end{macrocode}
1380 %\end{macro}
1381
1382
1383 %\begin{macro}{\PRheadline}
1384 % \begin{macrocode}
1385 \newcommand*{\PRheadline}[1]{\renewcommand*{\@PRheadline}{#1}}
1386 \newcommand*{\@PRheadline}{}
1387 % \end{macrocode}
1388 %\end{macro}
1389 %\begin{macro}{\PRsubheadline}
1390 % \begin{macrocode}
1391 \newcommand*{\PRsubheadline}[1]{\renewcommand*{\@PRsubheadline}{#1}}
1392 \newcommand*{\@PRsubheadline}{}
1393 % \end{macrocode}
1394 %\end{macro}
1395 %
1396 %\begin{macro}{\PRheadformat}
1397 % \begin{macrocode}
1398 \newcommand*{\PRheadformat}[1]{\textbf{\Large #1}}
1399 % \end{macrocode}
1400 %\end{macro}
1401 %\begin{macro}{\PRsubheadformat}
1402 % \begin{macrocode}
1403 \newcommand*{\PRsubheadformat}[1]{\textit{#1}}
1404 % \end{macrocode}
1405 %\end{macro}
1406 %
1407 % Just in case anyone wants to have multiple statements in a single
1408 % document:
1409 % \begin{macrocode}
1410 \newcounter{pressrelease}
1411 % \end{macrocode}
1412 %
1413 %\begin{macro}{\PRthelastpage}
1414 % \begin{macrocode}
1415 \newcommand*{\PRthelastpage}{0}
1416 % \end{macrocode}
1417 %\end{macro}
1418 %
1419 %\begin{environment}{pressrelease}
1420 % \begin{macrocode}
1421 \newenvironment{pressrelease}%
1422 {%
1423 \refstepcounter{pressrelease}%
1424 \refused{pressreleaseend.\number\c@pressrelease}%
1425 \xdef\PRthelastpage{%
1426 \getpagerefnumber{pressreleaseend.\number\c@pressrelease}}%
1427 \pagestyle{pressrelease}%
1428 \ifPRlogoabove
1429 \ifdefempty\@PRlogo{}{\PRlogoalign{\@PRlogo}}%
1430 \fi
1431 \PRreleasealign{%
1432 \PRdohrule\mbox{}\par\noindent
1433 \PRreleaseformat{\@PRrelease}%
1434 \ifPRheadabove\else\PRdohrule\fi
1435 }%
1436 \ifPRlogoabove
1437 \else
1438 \ifdefempty\@PRlogo{}{\PRlogoalign{\@PRlogo}}%
1439 \fi
1440 \ifPRheadabove
1441 \PRheadalign
1442 {%
1443 \PRheadformat{\@PRheadline}%
1444 \ifdefempty\@PRsubheadline
1445 {}%
1446 {\par\PRsubheadformat{\@PRsubheadline}}%
1447 \PRdohrule
1448 }%
1449 \par\noindent\PR@doinfotop
1450 \else
1451 \par\noindent\PR@doinfotop
1452 \PRheadalign
1453 {%
1454 \PRdohrule\mbox{}\par\noindent
1455 \PRheadformat{\@PRheadline}%
1456 \ifdefempty\@PRsubheadline
1457 {}%
1458 {\par\PRsubheadformat{\@PRsubheadline}}%
1459 \PRdohrule
1460 }%
1461 \fi
1462 \par
1463 \doublespacing
1464 \@afterheading\@afterindentfalse
1465 }%
1466 {%
1467 \par\singlespacing
1468 \PR@doinfobottom
1469 \ifdefempty{\@PRencl}{}%
1470 {\par\noindent\PRenclformat{\PRencltext}{\@PRencl}}%
1471 \PRformatendsignal{\PRendsignal}%
1472 \label{pressreleaseend.\number\c@pressrelease}%
1473 }%
1474 % \end{macrocode}
1475 %\end{environment}
1476 %
1477 %\begin{macro}{\PRenclformat}
1478 % \begin{macrocode}
1479 \newcommand*{\PRenclformat}[2]{%
1480 \begin{tabular}{@{}ll}%
1481 \PRtagformat{#1}&\PRinfoentry{#2}%
1482 \end{tabular}}
1483 % \end{macrocode}
1484 %\end{macro}
1485 %
1486 %\begin{macro}{\PRheaderfont}
1487 % Font used in page header.
1488 % \begin{macrocode}
1489 \newcommand*{\PRheaderfont}[1]{\textit{#1}}
1490 % \end{macrocode}
1491 %\end{macro}
1492 %
1493 %\begin{macro}{\ps@pressrelease}
1494 % Press release page style.
1495 % \begin{macrocode}
1496 \newcommand*{\ps@pressrelease}{%
1497 \gdef\@oddhead{\hfill\ifnum\c@page>1\relax
1498 \PRheaderfont{\PRusevar{headline}}%
1499 \fi\hfill}%
1500 \global\let\@evenhead\@oddhead
1501 \gdef\@oddfoot{%
1502 \hfill
1503 \PRnOfm{\thepage}{\PRthelastpage}%
1504 \hfill}%
1505 \global\let\@evenfoot\@oddfoot
1506 }
1507 % \end{macrocode}
1508 %\end{macro}
1509 %
1510 %\begin{macro}{\PRnOfm}
1511 % \begin{macrocode}
1512 \newcommand*{\PRnOfm}[2]{#1 of #2}
1513 % \end{macrocode}
1514 %\end{macro}
1515 %
1516 %\begin{macro}{\PRendsignal}
1517 % End of statement marker.
1518 % \begin{macrocode}
1519 \newcommand*{\PRendsignal}{\#\#\#}
1520 % \end{macrocode}
1521 %\end{macro}
1522 %
1523 %\begin{macro}{\PRformatendsignal}
1524 % \begin{macrocode}
1525 \newcommand*{\PRformatendsignal}[1]{\begin{center}#1\end{center}}
1526 % \end{macrocode}
1527 %\end{macro}
1528 %
1529 %\begin{environment}{about}
1530 % \begin{macrocode}
1531 \newenvironment{about}%
1532 {%
1533 \section*{\PRabouttext}%
1534 }%
1535 {%
1536 \ifdefempty\@PRurl
1537 {}%
1538 {%
1539 \PRurlformat{\PRurltext}{\@PRurl}\PRaboutposturlhook\par
1540 }%
1541 }
1542 % \end{macrocode}
1543 %\end{environment}
1544 %
1545 %\begin{macro}{\PRurlformat}
1546 % \begin{macrocode}
1547 \newcommand{\PRurlformat}[2]{%
1548 \par\noindent\PRtagformat{#1} #2}
1549 % \end{macrocode}
1550 %\end{macro}
1551 %
1552 %\begin{macro}{\PRaboutposturlhook}
1553 % Allow user to add text after the website address.
1554 % \begin{macrocode}
1555 \newcommand*{\PRaboutposturlhook}{}
1556 % \end{macrocode}
1557 %\end{macro}
1558 %
1559 % Finally, load \sty{pressrelease-symbols} if required:
1560 % \begin{macrocode}
1561 \if@PRloadsymbols
1562 \RequirePackage{pressrelease-symbols}
1563 \fi
1564 \disable@keys{pressrelease.cls}{symbols}
1565 % \end{macrocode}
1566 %\iffalse
1567 % \begin{macrocode}
1568 %</pressrelease.cls>
1569 % \end{macrocode}
1570 %\fi
1571 %\iffalse
1572 % \begin{macrocode}
1573 %<*pressrelease-symbols.sty>
1574 % \end{macrocode}
1575 %\fi
1576 %\subsection{pressrelease-symbols.sty}
1577 % This package loads \sty{marvosym} and \sty{tikz} to define symbols
1578 % for the bottom info block. The tags are suppressed for the top
1579 % info block. This package should be used with the
1580 % \clsfmt{pressrelease} class.
1581 % \begin{macrocode}
1582 \NeedsTeXFormat{LaTeX2e}
1583 \ProvidesPackage{pressrelease-symbols}[2014/09/10 v1.0 (NLCT)]
1584 % \end{macrocode}
1585 % Load \sty{marvosym} and \sty{tikz}:
1586 % \begin{macrocode}
1587 \RequirePackage{marvosym}
1588 \RequirePackage{tikz}
1589 % \end{macrocode}
1590 % Define a command to produce a paper clip symbol.
1591 % \begin{macrocode}
1592 \newcommand*{\paperclip}{%
1593 \begin{tikzpicture}[x=0.055ex,y=0.055ex,rotate=-90]
1594 \draw[line width=0.05ex] (9,-1) -- (26,-1)
1595 .. controls (33,1) and (33,9) ..
1596 (26,11) -- (8,11)
1597 .. controls (0,11) and (0,2) ..
1598 (8,2) -- (22,2)
1599 .. controls (26,2) and (26,8) ..
1600 (22,8) -- (8,8);
1601 \end{tikzpicture}%
1602 }
1603 % \end{macrocode}
1604 % Remove tags from top info block
1605 % \begin{macrocode}
1606 \renewcommand*{\PRinfotopline}[2]{%
1607 \PRinfoentry{#2}\tabularnewline
1608 }
1609 % \end{macrocode}
1610 % Change textual tags to use symbols
1611 % \begin{macrocode}
1612 \renewcommand*{\PRcontacttext}{\Info}
1613 \renewcommand*{\PRphonetext}{\Telefon}
1614 \renewcommand*{\PRmobiletext}{\Mobilefone}
1615 \renewcommand*{\PRfaxtext}{\fax}
1616 \renewcommand*{\PRemailtext}{\Email}
1617 \renewcommand*{\PRaddresstext}{\Letter}
1618 \renewcommand*{\PRhourstext}{\ClockLogo}
1619 \renewcommand*{\PRurltext}{\ComputerMouse}
1620 \renewcommand*{\PRencltext}{\paperclip}
1621 % \end{macrocode}
1622 % Remove the colon and bold formatting from the tag:
1623 % \begin{macrocode}
1624 \renewcommand*{\PRtagformat}[1]{#1}
1625 % \end{macrocode}
1626 %\iffalse
1627 % \begin{macrocode}
1628 %</pressrelease-symbols.sty>
1629 % \end{macrocode}
1630 %\fi
1631 %\Finale
1632 \endinput