Debian Codegraph @

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

raw
1 % \iffalse
2 %
3 % Copyright 2023, Boris Veytsman
4 % This work may be distributed and/or modified under the
5 % conditions of the LaTeX Project Public License, either
6 % version 1.3 of this license or (at your option) any
7 % later version.
8 % The latest version of the license is in
9 % http://www.latex-project.org/lppl.txt
10 % and version 1.3 or later is part of all distributions of
11 % LaTeX version 2005/12/01 or later.
12 %
13 % This work has the LPPL maintenance status `maintained'.
14 %
15 % The Current Maintainer of this work is Boris Veytsman,
16 % <[email protected]>
17 %
18 % This work consists of the file amnestyreport.dtx and the
19 % derived file amnestyreport.cls.
20 %
21 %
22 %
23 % \fi
24 % \CheckSum{0}
25 %
26 %
27 %% \CharacterTable
28 %% {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
29 %% 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
30 %% Digits \0\1\2\3\4\5\6\7\8\9
31 %% Exclamation \! Double quote \" Hash (number) \#
32 %% Dollar \$ Percent \% Ampersand \&
33 %% Acute accent \' Left paren \( Right paren \)
34 %% Asterisk \* Plus \+ Comma \,
35 %% Minus \- Point \. Solidus \/
36 %% Colon \: Semicolon \; Less than \<
37 %% Equals \= Greater than \> Question mark \?
38 %% Commercial at \@ Left bracket \[ Backslash \\
39 %% Right bracket \] Circumflex \^ Underscore \_
40 %% Grave accent \` Left brace \{ Vertical bar \|
41 %% Right brace \} Tilde \~}
42 %
43 %\iffalse
44 % Taken from xkeyval.dtx
45 %\fi
46 %\makeatletter
47 %\def\DescribeOption#1{\leavevmode\@bsphack
48 % \marginpar{\raggedleft\PrintDescribeOption{#1}}%
49 % \SpecialOptionIndex{#1}\@esphack\ignorespaces}
50 %\def\PrintDescribeOption#1{\strut\emph{option}\\\MacroFont #1\ }
51 %\def\SpecialOptionIndex#1{\@bsphack
52 % \index{#1\actualchar{\protect\ttfamily#1}
53 % (option)\encapchar usage}%
54 % \index{options:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar
55 % usage}\@esphack}
56 %\def\DescribeOptions#1{\leavevmode\@bsphack
57 % \marginpar{\raggedleft\strut\emph{options}%
58 % \@for\@tempa:=#1\do{%
59 % \\\strut\MacroFont\@tempa\SpecialOptionIndex\@tempa
60 % }}\@esphack\ignorespaces}
61 %\makeatother
62 %
63 % \MakeShortVerb{|}
64 % \GetFileInfo{amnestyreport.dtx}
65 % % \changes{v1.1}{2023/12/31}{Documentation update}
66 % \newcommand{\progname}[1]{\textsf{#1}}
67 % \title{\LaTeX{} Class for \emph{Amnesty International}
68 % Reports\thanks{\copyright 2023, Boris Veytsman}}
69 % \author{Boris Veytsman\thanks{%
70 % \href{mailto:[email protected]}{\texttt{[email protected]}},
71 % \href{mailto:[email protected]}{\texttt{[email protected]}}}}
72 % \date{\filedate, \fileversion}
73 % \maketitle
74 % \begin{abstract}
75 % This package provides a class for typesetting Reports for
76 % \emph{Amnesty International}
77 % \end{abstract}
78 % \tableofcontents
79 %
80 % \clearpage
81 % \section{Introduction}
82 % \label{sec:intro}
83 %
84 % \emph{Amnesty International} house style is describes in the Amnesty
85 % International brand hub, \url{https://brandhub.amnesty.org}. Most
86 % reports for \emph{Amnesty International} were made using word
87 % processing software or typesetting software like \emph{InDesign}.
88 % The onset of reports made with \TeX, or \textsl{R} using
89 % \textsl{knitr} or \textsl{Rmarkdown} made necessary to recreate the
90 % house style in \TeX. This file provides such style.
91 %
92 % I am grateful to Richard Swingler and Jule Krueger for their testing
93 % and helpful comments.
94 %
95 % To use the style, you need the files |amnestyreport.cls|, the fonts
96 % and the logos. They can be downloaded from
97 % \url{https://brandhub.amnesty.org/} (note that you need to have a
98 % special permission to use the font). You need to rename the file
99 % with the logo into |Amnesty_logo.png|.
100 %
101 % To use the style just say
102 % \begin{quote}
103 % |\usepackage|\oarg{options}|{amnestyreports}|
104 % \end{quote}
105 %
106 %
107 % The option |amnestyfonts| (the default) selects the font Amnesty
108 % Trade Gothic
109 % (\url{https://brandhub.amnesty.org/visual-design/our-typeface/}) for
110 % the report. The researchers working with Amnesty International may
111 % download this font. If you are a student of work on a
112 % self-initiated project, use the option |freefonts| to use free fonts
113 % similar to Amnesty Trade Gothic.
114 %
115 % The option |nologo| suppresses the use of Amnesty International
116 % logo. It is automatically chosen if \LaTeX\ cannot find the file
117 % |Amnesty_logo.png| in the search path.
118 %
119 % The paper size options currently supported are |letterpaper| and
120 % |a4paper| (the later is the default).
121 %
122 %
123 %
124 %\subsection{Use of the styles with Rmarkdown}
125 %\label{sec:Rmarkdown}
126 %
127 % If you use the style with the \emph{Rmarkdown} package, you need to
128 % include the file \path{amnestytemplate.tex}, which accompanies this
129 % release. The YAML syntax for the commands is easy to get from the
130 % the example \path{sample.Rmd}:
131 % \begin{verbatim}
132 % ---
133 % title: "RMarkdown report example"
134 % subtitle: "An example report for Amnesty output"
135 % titleimage: "BoschFragment"
136 % titleimagecaption: "The Garden of Earthly Delights is the modern title
137 % given to a triptych oil painting on oak panel painted by the Early
138 % Netherlandish master Hieronymus Bosch, between 1490 and 1510, when
139 % Bosch was between 40 and 60 years old. It has been housed in the
140 % Museo del Prado in Madrid, Spain since 1939.\n\n
141 % \\textcopyright{} Image: Public domain.\n\n
142 % \\textcopyright{} Caption: Wikipedia contributors, 2023, released
143 % under Creative Commons Attribution-ShareAlike License 4.0"
144 % copyrightyear: 2023
145 % firstpublicationyear: 2022
146 % reportindex: ABXC/AAAA/2022
147 %
148 % output:
149 % pdf_document:
150 % template: amnestytemplate.tex
151 % latex_engine: xelatex
152 % toc: true
153 % keep_tex: true
154 % citation_package: natbib
155 % header-includes:
156 % - \renewcommand{\thesection}{\Alph{section}}
157 % bibliography: "examplereferences.bib"
158 % ---
159 %
160 % \end{verbatim}
161 %
162 % Some notes:
163 % \begin{enumerate}
164 % \item The file names for bibliography and title images should not
165 % include underscores or spaces.
166 % \item In multiline strings use |\n\n| for paragraph breaks and two
167 % backslashes
168 % for \TeX\ commands.
169 % \end{enumerate}
170 %
171 % There is an accompanying R package \textsl{amnestyreportR}. It
172 % helps to create plots and tables in the style of Amnesty Report.
173 % See the sample file for an example of use. You may download the
174 % package from the Amnesty International site or CRAN.
175 %
176 %
177 %\subsection{Front matter}
178 %\label{sec:ug_frontmatter}
179 %
180 % \DescribeMacro{\maketitle}%
181 % Front matter is the part of the report that includes title, half
182 % title (the back of the title page), table of contents, glossary,
183 % foreword, etc. Some of it is typeset automatically by the command
184 % \cs{maketitle}, which must be preceded by a number of commands that
185 % set the information to be typeset.
186 %
187 % \DescribeMacro{\titleimage}%
188 % \DescribeMacro{\titleimagecaption}%
189 % The command \cs{titleimage}\marg{filename} defines the image on the
190 % title page. This file must be square. It will be resized
191 % automatically to the standard size
192 % $\qty{18.17}{\centi\meter}\times\qty{18.17}{\centi\meter}$. The
193 % command \cs{titleimagecaption}\marg{caption} describes the image.
194 % It should have copyright information; you may use the command
195 % \cs{textcopyright} for the copyright symbol.
196 %
197 % \DescribeMacro{\title}%
198 % \DescribeMacro{\subtitle}%
199 % The command \cs{title} is similar to the one in standard classes. An
200 % additional command \cs{subtitle} is used to set the subtitle of the
201 % report.
202 %
203 % \DescribeMacro{\copyrightyear}%
204 % \DescribeMacro{\firstpublicationyear}%
205 % The commands \cs{copyrightyear}\marg{year} and
206 % \cs{firstpublicationyear}\marg{year} set
207 % the year when the report was copyrighted and first published. The
208 % default is the current year.
209 %
210 % \DescribeMacro{\reportyear}%
211 % \DescribeMacro{\reportmonth}%
212 % Sometimes the report year or month might be different from the
213 % copyright year. You can set them with the commands
214 % \cs{reportyear}\marg{year} and \cs{reportmonth}\marg{month}. The
215 % default is the copyright year and the current month.
216 %
217 % \DescribeMacro{\reportindex}%
218 % The index of the report is set by the command
219 % \cs{reportindex}\marg{index}.
220 %
221 % \DescribeMacro{\blurb}%
222 % Amnesty International reports include a short blurb up to 200~words.
223 % The macro \cs{blurb}\marg{blurb text} sets them.
224 %
225 %\subsection{Main matter}
226 %\label{sec:ug_mainmatter}
227 %
228 % \DescribeMacro{\mainmatter}%
229 % The main section starts with the command \cs{mainmatter}. The R
230 % template provides it automatically.
231 %
232 %\subsection{Colors}
233 %\label{sec:ug_colors}
234 %
235 % The class defines the following colors
236 % \begin{enumerate}
237 % \item |AmnestyYellow|, the primary color.
238 % \item |AmnestyGray1|, |AmnestyGray2|, |AmnestyGray3|,
239 % |AmnestyGray4|, |AmnestyGray5|, the grayscale from the lightest to
240 % the darkest.
241 % \end{enumerate}
242 %
243 %
244 %
245 %\subsection{Glossary}
246 %\label{sec:ug-glossary}
247 %
248 % \DescribeEnv{AmnestyGlossary}%
249 % Amnesty international reports may be accompanied by a glossary. A
250 % glossary is introduced by the environment |AmnestyGlossary|. It has one
251 % optional parameter: the maximal size of the word defined in the
252 % table, by default 5em. The glossary entries are |tabular| entries:
253 % the word to be defined is separated from the definition by |&|, and
254 % definitions are ended by |\\|, for example (from
255 % \url{https://www.amnesty.org/en/latest/campaigns/2015/07/beginners-guide-human-rights-jargon/}):
256 % \begin{verbatim}
257 % \begin{AmnestyGlossary}[3em]
258 % Commute &
259 % Commute means to replace a punishment, usually a death
260 % sentence, with a less severe one. For example, Amnesty called for
261 % the USA to commute to time served the 35-year jail sentence of
262 % whistleblower Chelsea Manning, who had been arrested after leaking
263 % classified government material. \\
264 % Crimes against humanity &
265 % When certain acts---including murder, torture and slavery---form
266 % part of a widespread attack on a civilian population by a state or
267 % organization. Unlike war crimes, they can take place at times of
268 % peace as well as during conflict. The Rwandan genocide of 1994 is
269 % one example of a crime against humanity. \\
270 % Extrajudicial executions &
271 % Unlawful killings ordered by a government, or committed with its
272 % knowledge and support. They can be carried out by the military,
273 % police, or by civilians working with government forces. For
274 % example, Hamas forces in Gaza committed serious human rights
275 % abuses, including extrajudicial executions, torture and
276 % abductions, during the 2014 Gaza/Israel conflict. \\
277 % Freedom of expression &
278 % The right to seek, receive and share information and ideas,
279 % without fear or interference. It is closely linked with freedom of
280 % association (the right to meet with anyone you choose, for
281 % example, to form and join clubs, societies or trade unions) and
282 % the right to take part in a peaceful assembly, such as a
283 % demonstration or public meeting. \\
284 % \end{AmnestyGlossary}
285 % \end{verbatim}
286 %
287 %
288 %\subsection{Quotation styles}
289 %\label{sec:ug_quotation}
290 %
291 % \DescribeEnv{quote}%
292 % \DescribeMacro{attribution}%
293 % There are several quotations styles used by Amnesty International
294 % style. The most ubiquitous one is ``display quotes'', which is used
295 % by the |quote| environment. This is the
296 % style that is translated from the Markdown quotation style, with |>|
297 % marks. It has a special command \cs{attribution}, which should be
298 % used at the end of the quote, for example,
299 % \begin{verbatim}
300 % \begin{quote}
301 % All human beings are born free and equal in dignity and
302 % rights. They are endowed with reason and conscience and should act
303 % towards one another in a spirit of brotherhood.
304 %
305 % \attribution{Universal Declaration of Human Rights}
306 % \end{quote}
307 % \end{verbatim}
308 %
309 % The equivalent Markdown syntax is
310 % \begin{verbatim}
311 % > All human beings are born free and equal in dignity and
312 % > rights. They are endowed with reason and conscience and should act
313 % > towards one another in a spirit of brotherhood.
314 % >
315 % > \attribution{Universal Declaration of Human Rights}
316 % \end{verbatim}
317 %
318 %
319 %
320 %\subsection{Figures and tables}
321 %\label{sec:ug_floats}
322 %
323 % Figures and tables by default are typeset with the `here` placement
324 % option. You should put the caption of a table \emph{before} the
325 % table, and the caption of a figure \emph{after} the figure. You can
326 % use \cs{FloatBarrier} command to stop figures and tables from
327 % moving.
328 %
329 % \DescribeMacro{\sideTableCaptions}%
330 % \DescribeMacro{\sideFigureCaptions}%
331 % \DescribeMacro{\normalTableCaptions}%
332 % \DescribeMacro{\normalFigureCaptions}%
333 % The style allows figures and tables with right side captions. The
334 % commands \cs{sideTableCaptions} and \cs{sideFigureCaptions} switch
335 % to this style, while the commands \cs{normalTableCaptions} and
336 % \cs{normalFigureCaptions} switch to the standard style.
337 %
338 %
339 % \clearpage
340 % \StopEventually
341 %
342 %\section{Implementation}
343 %\label{sec:impl}
344 %
345 %\subsection{Identification}
346 %\label{sec:ident}
347 %
348 % We start with the declaration who we are. Most |.dtx| files put
349 % driver code in a separate driver file |.drv|. We roll this code into the
350 % main file, and use the pseudo-guard |<gobble>| for it.
351 % \begin{macrocode}
352 %<class>\NeedsTeXFormat{LaTeX2e}
353 %<*gobble>
354 \ProvidesFile{amnestyreport.dtx}
355 %</gobble>
356 %<class>\ProvidesClass{amnestyreport}
357 [2024/01/12 v1.2 Typesetting articles for Amnesty International]
358 % \end{macrocode}
359 %
360 %
361 %
362 % And the driver code:
363 % \begin{macrocode}
364 %<*gobble>
365 \documentclass{ltxdoc}
366 \usepackage[breaklinks,colorlinks,linkcolor=black,citecolor=black,
367 pagecolor=black,urlcolor=black,hyperindex=false]{hyperref}
368 \usepackage{siunitx}
369 \PageIndex
370 \CodelineIndex
371 \RecordChanges
372 \EnableCrossrefs
373 \begin{document}
374 \DocInput{amnestyreport.dtx}
375 \end{document}
376 %</gobble>
377 %<*class>
378 % \end{macrocode}
379 %
380 %\subsection{Options}
381 %\label{sec:options}
382 %
383 % We pass paper size to \textsl{geometry}
384 % \begin{macrocode}
385 \DeclareOption{a4paper}{\PassOptionsToPackage{\CurrentOption}{geometry}}
386 \DeclareOption{letterpaper}{\PassOptionsToPackage{\CurrentOption}{geometry}}
387 % \end{macrocode}
388 %
389 % \begin{macro}{\ifamnesty@fonts}
390 % \changes{v1.1}{2023/11/28}{Introduced macro}
391 % The switch whether to use Amensty proprietary font
392 % \begin{macrocode}
393 \newif\ifamnesty@fonts
394 \amnesty@fontstrue
395 % \end{macrocode}
396 % \end{macro}
397 %
398 % Setting the font
399 % \begin{macrocode}
400 \DeclareOption{amnestyfonts}{\amnesty@fontstrue}
401 \DeclareOption{freefonts}{\amnesty@fontsfalse}
402 % \end{macrocode}
403 %
404 % \begin{macro}{\ifamnesty@logo}
405 % \changes{v1.1}{2023/11/28}{Introduced macro}
406 % Whether we have the logo
407 % \begin{macrocode}
408 \newif\ifamnesty@logo
409 \amnesty@logotrue
410 % \end{macrocode}
411 % \end{macro}
412 %
413 % Setting the logo
414 % \begin{macrocode}
415 \DeclareOption{logo}{\amnesty@logotrue}
416 \DeclareOption{nologo}{\amnesty@logofalse}
417 % \end{macrocode}
418 %
419 % And executing the options
420 % \begin{macrocode}
421 \ExecuteOptions{a4paper,amnestyfonts}
422 \ProcessOptions\relax
423 % \end{macrocode}
424 %
425 % Sanity check whether logo exists
426 % \begin{macrocode}
427 \IfFileExists{Amnesty_logo.png}{}{\amnesty@logofalse}
428 % \end{macrocode}
429 %
430 %
431 %\subsection{Loading Class and Packages}
432 %\label{sec:loading}
433 %
434 % We start with the base class
435 % \begin{macrocode}
436 \LoadClass{article}
437 % \end{macrocode}
438 %
439 % Geometry to set up margins
440 % \begin{macrocode}
441 \RequirePackage[top=1.02in, bottom=1.38in,
442 left=1.26in, right=1.26in, footskip=40pt]{geometry}
443 % \end{macrocode}
444 %
445 % We suppress hyphenation
446 % \begin{macrocode}
447 \usepackage[none]{hyphenat}
448 % \end{macrocode}
449 %
450 % URLs
451 % \begin{macrocode}
452 \RequirePackage[colorlinks=false]{hyperref}
453 \def\UrlFont{}
454 \def\sectionautorefname{Section}
455 \def\subsectionautorefname{Section}
456 \def\subsubsectionautorefname{Section}
457 % \end{macrocode}
458 %
459 % We need graphics
460 % \begin{macrocode}
461 \RequirePackage{graphicx}
462 % \end{macrocode}
463 %
464 % We use biblatex
465 % \begin{macrocode}
466 \RequirePackage[backend=bibtex]{biblatex}
467 % \end{macrocode}
468 %
469 % Due to the way Rmarkdown works, we add \cs{citep} and \cs{citet}
470 % commands
471 % \begin{macro}{\citep}
472 % \begin{macrocode}
473 \RequirePackage{xparse}
474 \NewDocumentCommand{\citep}{oom}{%
475 \IfNoValueTF{#2}{%
476 \IfNoValueTF{#1}{\footfullcite{#3}}{\footfullcite[][#1]{#3}}}{%
477 \footfullcite[#1][#2]{#3}}}
478 \let\citet\citep
479 % \end{macrocode}
480 % \end{macro}
481 %
482 % We need \cs{FloatBarrier} command
483 % \begin{macrocode}
484 \RequirePackage{placeins}
485 % \end{macrocode}
486 %
487 % We need framed for splitting leftbar boxes
488 % \begin{macrocode}
489 \RequirePackage{framed}
490 % \end{macrocode}
491 %
492 % \changes{v1.2}{2024/01/14}{Added sidecap package}
493 % We need sidecap to typeset sidewise captions.
494 % \begin{macrocode}
495 \RequirePackage[rightcaption]{sidecap}
496 \def\SC@figure@vpos{t}
497 % \end{macrocode}
498 %
499 %\subsection{Fonts}
500 %\label{sec:fonts}
501 %
502 % \changes{v1.2}{2024/01/02}{Added Inconsolata as monofont}
503 %
504 % \begin{macrocode}
505 \RequirePackage{fontspec}
506 \ifamnesty@fonts
507 \ClassInfo{amnestyreport}{Using Amnesty International fonts}
508 \setmainfont{AmnestyTradeGothic-Light.ttf}[
509 BoldFont=AmnestyTradeGothic-Bd2.ttf,
510 ItalicFont=AmnestyTradeGothic-LightObl.ttf,
511 BoldItalicFont=AmnestyTradeGothic-Bd2Obl.ttf]
512
513 \newfontfamily\condensed{AmnestyTradeGothic-Cn18.ttf}[
514 BoldFont=AmnestyTradeGothic-BdCn20.ttf,
515 ItalicFont=AmnestyTradeGothic-Cn18Obl.ttf,
516 BoldItalicFont=AmnestyTradeGothic-BdCn20Ob.ttf]
517 \else
518 \ClassInfo{amnestyreport}{Using free fonts}
519 \setmainfont{texgyreadventor-regular.otf}[
520 BoldFont=texgyreadventor-bold.otf,
521 ItalicFont=texgyreadventor-italic.otf,
522 BoldItalicFont=texgyreadventor-bolditalic.otf]
523
524 \newfontfamily\condensed{QTHelvetCnd-Light.otf}[
525 BoldFont=QTHelvetCnd.otf,
526 ItalicFont=QTHelvetCnd-Light.otf,
527 BoldItalicFont=QTHelvetCnd.otf]
528 \fi
529 \setmonofont[StylisticSet={1,2,3}]{Inconsolatazi4-Regular.otf}[
530 BoldFont=Inconsolatazi4-Bold.otf]
531 \RequirePackage{fontawesome5}
532 % \end{macrocode}
533 %
534 %
535 %\subsection{Paragraphing}
536 %\label{sec:paragraphing}
537 %
538 % The base size is 9pt. This is taken from size9.clo
539 % \begin{macrocode}
540 \renewcommand\normalsize{%
541 \@setfontsize\normalsize\@ixpt\@xipt%
542 \abovedisplayskip 8\p@ \@plus4\p@ \@minus4\p@
543 \abovedisplayshortskip \z@ \@plus3\p@
544 \belowdisplayshortskip 5\p@ \@plus3\p@ \@minus3\p@
545 \belowdisplayskip \abovedisplayskip
546 \let\@listi\@listI}
547 \renewcommand\small{%
548 \@setfontsize\small\@viiipt\@ixpt%
549 \abovedisplayskip 5\p@ \@plus2\p@ \@minus2\p@
550 \abovedisplayshortskip \z@ \@plus1\p@
551 \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
552 \def\@listi{\leftmargin\leftmargini
553 \topsep 3\p@ \@plus\p@ \@minus\p@
554 \parsep 2\p@ \@plus\p@ \@minus\p@
555 \itemsep \parsep}%
556 \belowdisplayskip \abovedisplayskip
557 }
558 \renewcommand\footnotesize{%
559 \@setfontsize\footnotesize\@viipt\@viiipt
560 \abovedisplayskip 4\p@ \@plus2\p@ \@minus2\p@
561 \abovedisplayshortskip \z@ \@plus1\p@
562 \belowdisplayshortskip 2.5\p@ \@plus\p@ \@minus\p@
563 \def\@listi{\leftmargin\leftmargini
564 \topsep 3\p@ \@plus\p@ \@minus\p@
565 \parsep 2\p@ \@plus\p@ \@minus\p@
566 \itemsep \parsep}%
567 \belowdisplayskip \abovedisplayskip
568 }
569 \renewcommand\scriptsize{\@setfontsize\scriptsize\@vipt\@viipt}
570 \renewcommand\tiny{\@setfontsize\tiny\@vpt\@vipt}
571 \renewcommand\large{\@setfontsize\large\@xpt\@xiipt}
572 \renewcommand\Large{\@setfontsize\Large\@xipt{13}}
573 \renewcommand\LARGE{\@setfontsize\LARGE\@xiipt{14}}
574 \renewcommand\huge{\@setfontsize\huge\@xivpt{18}}
575 \renewcommand\Huge{\@setfontsize\Huge\@xviipt{22}}
576 \setlength\parskip{6pt}
577 \setlength\parindent\z@
578 % \end{macrocode}
579 %
580 %
581 %\subsection{Colors}
582 %\label{sec:colors}
583 %
584 % \begin{macrocode}
585 \RequirePackage{xcolor}
586 \definecolor{AmnestyYellow}{RGB/cmyk}{255,255,0/0,0,1,0}
587 \definecolor{AmnestyGray1}{RGB/cmyk}{228,228,228/0,0,0,15}
588 \definecolor{AmnestyGray2}{RGB/cmyk}{178,178,178/0,0,0,32}
589 \definecolor{AmnestyGray3}{RGB/cmyk}{118,118,118/0,0,0,64}
590 \definecolor{AmnestyGray4}{RGB/cmyk}{82,82,82/0,0,0,79}
591 \definecolor{AmnestyGray4}{RGB/cmyk}{37,37,37/0,0,0,97}
592 \RequirePackage{soul}
593 \sethlcolor{AmnestyYellow}
594 % \end{macrocode}
595 %
596 %
597 %\subsection{Setting up top matter}
598 %\label{sec:top_matter}
599 %
600 % \begin{macro}{\titleimage}
601 % The title image
602 % \begin{macrocode}
603 \newcommand\titleimage[1]{\def\@titleimage{#1}}
604 \titleimage{}
605 % \end{macrocode}
606 % \end{macro}
607 %
608 % \begin{macro}{\titleimagecaption}
609 % The caption for the image
610 % \begin{macrocode}
611 \newcommand\titleimagecaption[1]{\def\@titleimagecaption{#1}}
612 \titleimagecaption{}
613 % \end{macrocode}
614 % \end{macro}
615 %
616 % \begin{macro}{\subtitle}
617 % The subitle
618 % \begin{macrocode}
619 \newcommand\subtitle[1]{\def\@subtitle{#1}}
620 \subtitle{}
621 % \end{macrocode}
622 % \end{macro}
623 %
624 % \begin{macro}{\copyrightyear}
625 % The copyright year
626 % \begin{macrocode}
627 \newcommand\copyrightyear[1]{\def\@copyrightyear{#1}}
628 \copyrightyear{\the\year}
629 % \end{macrocode}
630 % \end{macro}
631 %
632 % \begin{macro}{\firstpublicationyear}
633 % The publication year
634 % \begin{macrocode}
635 \newcommand\firstpublicationyear[1]{\def\@firstpublicationyear{#1}}
636 \firstpublicationyear{\@copyrightyear}
637 % \end{macrocode}
638 % \end{macro}
639 %
640 % \begin{macro}{\reportyear}
641 % The report year
642 % \begin{macrocode}
643 \newcommand\reportyear[1]{\def\@reportyear{#1}}
644 \reportyear{\@copyrightyear}
645 % \end{macrocode}
646 % \end{macro}
647 %
648 % \begin{macro}{\reportmonth}
649 % The report month
650 % \begin{macrocode}
651 \newcommand\reportmonth[1]{\def\@reportmonth{#1}}
652 \reportmonth{\ifcase\month\or
653 January\or February\or March\or April\or May\or June\or
654 July\or August\or September\or October\or November\or December\fi}
655 % \end{macrocode}
656 % \end{macro}
657 %
658 %
659 % \begin{macro}{\reportindex}
660 % The index
661 % \begin{macrocode}
662 \newcommand\reportindex[1]{\def\@reportindex{#1}}
663 \reportindex{XXXX XX/XX/XXX}
664 % \end{macrocode}
665 % \end{macro}
666 %
667 % \begin{macro}{\blurb}
668 % The blurb
669 % \begin{macrocode}
670 \newcommand\blurb[1]{\def\@blurb{#1}}
671 \blurb{}
672 % \end{macrocode}
673 % \end{macro}
674 %
675 %
676 %\subsection{Typesetting top matter}
677 %\label{sec:maketitle}
678 %
679 % \begin{macro}{\frontmatter}
680 % We use empty page style for the front matter
681 % \begin{macrocode}
682 \newcommand\frontmatter{%
683 \pagenumbering{arabic}%
684 \pagestyle{empty}}
685 % \end{macrocode}
686 % \end{macro}
687 %
688 % \begin{macro}{\maketitle}
689 % The \cs{maketitle} command\ldots
690 % \begin{macrocode}
691 \renewcommand{\maketitle}{%
692 \newgeometry{top=0.55in, bottom=1.18in,
693 left=0.55in, right=0.55in, footskip=20pt}%
694 \pagestyle{titlepage}%
695 \ifx\@titleimage\@empty
696 \ClassWarningNoLine{amnestyreport}{You did not define the title
697 image}%
698 \else
699 \includegraphics[width=18.17cm]{\@titleimage}\par
700 \fi
701 \ifx\@title\@empty\else
702 {\condensed\bfseries\fontsize{48pt}{48pt}\selectfont
703 \hl{\MakeUppercase{\@title}}\par}%
704 \fi
705 \ifx\@subtitle\@empty\else
706 {\condensed\fontsize{22pt}{22pt}\selectfont
707 \MakeUppercase{\@subtitle}\par}%
708 \fi
709 \clearpage
710 \thispagestyle{backtitlepage}%
711 {\condensed\bfseries\fontsize{22pt}{22pt}\selectfont
712 \hl{Amnesty International is a movement of 10 million people
713 which mobilizes the humanity in everyone and campaigns
714 for change so we can all enjoy our human rights. Our vision
715 is of a world where those in power keep their promises,
716 respect international law and are held to account. We are
717 independent of any government, political ideology, economic
718 interest or religion and are funded mainly by our membership
719 and individual donations. We believe that acting in solidarity
720 and compassion with people everywhere can change our
721 societies for the better.}\par}
722 \vfill
723 \parbox[t]{0.48\textwidth}{\condensed\footnotesize
724 \textcopyright~Amnesty International~\@copyrightyear
725
726 Except where otherwise noted, content in this document is licensed
727 under a Creative Commons (attribution, non-commercial, no derivatives,
728 international 4.0) licence.
729 \url{https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode}.
730
731 For more information please visit the permissions page on our website:
732 \href{https://www.amnesty.org}{www.amnesty.org}.
733
734 Where material is attributed to a copyright owner other than Amnesty International this
735 material is not subject to the Creative Commons licence.
736
737 First published in \@firstpublicationyear\\
738 by Amnesty International Ltd\\
739 Peter Benenson House, 1 Easton Street\\
740 London WC1X 0DW, UK}\hfill
741 \parbox[t]{0.48\textwidth}{\condensed\footnotesize
742 \ifx\@titleimagecaption\@empty\else
743 $\leftarrow$\faEye[regular] \raggedright\itshape\textbf{Cover photo:} \@titleimagecaption\fi}
744 \restoregeometry
745 \pagestyle{empty}}
746
747 % \end{macrocode}
748 % \end{macro}
749 %
750 %
751 %\subsection{Main matter}
752 %\label{sec:mainmatter}
753 %
754 % \begin{macro}{\mainmatter}
755 % THe main matter
756 \newcommand\mainmatter{\cleardoublepage
757 \pagestyle{main}%
758 }
759 % \end{macro}
760 %
761 %
762 %\subsection{Page styles}
763 %\label{sec:page_styles}
764 %
765 % \begin{macro}{\amnesty@logo@graphics}
766 % \changes{v1.1}{2023/11/28}{Introduced macro}
767 % Either AI logo or a strut
768 % \begin{macrocode}
769 \def\amnesty@logo@graphics{%
770 \ifamnesty@logo
771 \includegraphics[height=0.5in]{Amnesty_logo}%
772 \else
773 \rule{0pt}{0.5in}%
774 \fi}
775 % \end{macrocode}
776 % \end{macro}
777 %
778 % \begin{macrocode}
779 \RequirePackage{fancyhdr}
780 \renewcommand{\headrulewidth}{0pt}
781 \renewcommand{\footrulewidth}{0pt}
782 \fancypagestyle{titlepage}{%
783 \fancyhf{}%
784 \fancyfoot[R]{\raisebox{-\height}{\amnesty@logo@graphics}}%
785 }
786 \fancypagestyle{backtitlepage}{%
787 \fancyhf{}%
788 \fancyfoot[L]{\bfseries Index: \@reportindex\\
789 Original language: English\\
790 \large\href{https://amnesty.org}{amnesty.org}}%
791 \fancyfoot[R]{\raisebox{-\height}{\amnesty@logo@graphics}}%
792 }
793 \fancypagestyle{main}{%
794 \fancyhf{}%
795 \fancyfoot[L]{\condensed\footnotesize\textbf{\MakeUppercase{\@title}}\par
796 \ifx\@subtitle\@empty\else\condensed\MakeUppercase{\@subtitle}\par\fi
797 Amnesty International
798 }%
799 \fancyfoot[R]{\normalsize\normalfont\thepage\hspace{1in}}%
800 }
801 \fancypagestyle{backcoverpage}{%
802 \fancyhf{}%
803 \fancyfoot[L]{\normalsize\normalfont
804 INDEX: \mbox{\@reportindex}\\
805 \MakeUppercase{\@reportmonth~\@reportyear}\\
806 LANGUAGE: ENGLISH\\
807 \LARGE\bfseries\href{https://amnesty.org}{amnesty.org}}%
808 \fancyfoot[R]{\raisebox{-\height}{\amnesty@logo@graphics}\hspace{1in}}%
809 }
810 % \end{macrocode}
811 %
812 %
813 %
814 %\subsection{Sectioning}
815 %\label{sec:sectioning}
816 %
817 % \begin{macro}{\section}
818 % The section
819 % \begin{macrocode}
820 \renewcommand\section{\@startsection {section}{1}{\z@}%
821 {-3.5ex \@plus -1ex \@minus -.2ex}%
822 {.5ex \@plus.2ex}%
823 {\condensed\fontsize{45pt}{45pt}\selectfont\bfseries\raggedright\MakeUppercase}}
824 % \end{macrocode}
825 % \end{macro}
826 %
827 % \begin{macro}{\subsection}
828 % Subsection
829 % \begin{macrocode}
830 \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
831 {-3.25ex\@plus -1ex \@minus -.2ex}%
832 {0.5ex \@plus .2ex}%
833 {\condensed\fontsize{21pt}{21pt}\selectfont\bfseries\raggedright\MakeUppercase}}
834 % \end{macrocode}
835 % \end{macro}
836 %
837 % \begin{macro}{\subsubsection}
838 \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
839 {-3.25ex\@plus -1ex \@minus -.2ex}%
840 {0.5ex \@plus .2ex}%
841 {\condensed\fontsize{16pt}{16pt}\selectfont\bfseries\raggedright\MakeUppercase}}
842 % \end{macro}
843 %
844 % \begin{macro}{\paragraph}
845 \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
846 {3.25ex \@plus1ex \@minus.2ex}%
847 {1sp}%
848 {\condensed\fontsize{11pt}{11pt}\selectfont\bfseries\raggedright\MakeUppercase}}
849 % \end{macro}
850 %
851 %
852 %\subsection{Table of contents formatting}
853 %\label{sec:toc}
854 %
855 % TOC formatting
856 % \begin{macro}{\l@section}
857 % Section formatting
858 % \begin{macrocode}
859 \renewcommand*\l@section[2]{%
860 \ifnum \c@tocdepth >\z@
861 \addpenalty\@secpenalty
862 \addvspace{1.0em \@plus\p@}%
863 \setlength\@tempdima{1.5em}%
864 \begingroup
865 \def\numberline##1{##1~}%
866 \parindent \z@ \rightskip \@pnumwidth
867 \parfillskip -\@pnumwidth
868 \leavevmode \condensed\fontsize{11pt}{11pt}\selectfont\bfseries
869 \advance\leftskip\@tempdima
870 \hskip -\leftskip
871 \MakeUppercase{#1}\nobreak\hfil
872 \nobreak\hb@xt@\@pnumwidth{\hss #2%
873 \kern-\p@\kern\p@}\par
874 \endgroup
875 \fi}
876 % \end{macrocode}
877 % \end{macro}
878 %
879 % \begin{macro}{\l@subsection}
880 % Subsection formatting
881 % \begin{macrocode}
882 \renewcommand*\l@subsection[2]{%
883 \ifnum \c@tocdepth >1
884 \addvspace{0.5em \@plus\p@}%
885 \setlength\@tempdima{2em}%
886 \begingroup
887 \def\numberline##1{##1~}%
888 \parindent \z@ \rightskip \@pnumwidth
889 \parfillskip -\@pnumwidth
890 \leavevmode \condensed\fontsize{10pt}{10pt}\selectfont
891 \advance\leftskip\@tempdima
892 \hskip -\leftskip
893 \MakeUppercase{#1}\nobreak\hfil
894 \nobreak\hb@xt@\@pnumwidth{\hss #2%
895 \kern-\p@\kern\p@}\par
896 \endgroup
897 \fi}
898 % \end{macrocode}
899 % \end{macro}
900 %
901 % \begin{macro}{\l@subsubsection}
902 % Subsubsection formatting
903 % \begin{macrocode}
904 \renewcommand*\l@subsubsection[2]{%
905 \ifnum \c@tocdepth >2
906 \addvspace{0.5em \@plus\p@}%
907 \setlength\@tempdima{2.5em}%
908 \begingroup
909 \def\numberline##1{##1~}%
910 \parindent \z@ \rightskip \@pnumwidth
911 \parfillskip -\@pnumwidth
912 \leavevmode \condensed\fontsize{9pt}{9pt}\selectfont
913 \advance\leftskip\@tempdima
914 \hskip -\leftskip
915 \MakeUppercase{#1}\nobreak\hfil
916 \nobreak\hb@xt@\@pnumwidth{\hss #2%
917 \kern-\p@\kern\p@}\par
918 \endgroup
919 \fi}
920 % \end{macrocode}
921 % \end{macro}
922 %
923 %
924 %\subsection{Figures and tables}
925 %\label{sec:floats}
926 %
927 % We use the caption package for the formatting
928 % \begin{macrocode}
929 \RequirePackage[font=it]{caption}
930 \DeclareCaptionLabelFormat{table}{$\downarrow$\faEye[regular]\itshape~
931 #1 #2}
932 \DeclareCaptionLabelFormat{figure}{$\uparrow$\faEye[regular]\itshape~
933 #1 #2}
934 \DeclareCaptionLabelFormat{side}{$\leftarrow$\faEye[regular]\itshape~
935 #1 #2}
936 \captionsetup[table]{labelformat=table}
937 \captionsetup[figure]{labelformat=figure}
938 \captionsetup[SCfigure]{labelformat=side}
939 \captionsetup[SCtable]{labelformat=side}
940 \def\fps@figure{hb}
941 \def\fps@table{hb}
942 \def\fps@SCfigure{hb}
943 \def\fps@SCtable{hb}
944 % \end{macrocode}
945 %
946 % \begin{macro}{\sideTableCaptions}
947 % \changes{v1.2}{2024/01/14}{Added macro}
948 % Switching to the sideways tables.
949 % \begin{macrocode}
950 \let\table@AI@Orig\table
951 \let\endtable@AI@Orig\endtable
952 \def\sideTableCaptions{%
953 \def\table{\SCtable[50]}%
954 \def\endtable{\endSCtable}}
955 % \end{macrocode}
956 % \end{macro}
957 %
958 % \begin{macro}{\normalTableCaptions}
959 % \changes{v1.2}{2024/01/14}{Added macro}
960 % Switching to the normal tables.
961 % \begin{macrocode}
962 \def\normalTableCaptions{%
963 \def\table{\table@AI@Orig}%
964 \def\endtable{\endtable@AI@Orig}}
965 % \end{macrocode}
966 % \end{macro}
967 %
968 % \begin{macro}{\if@AI@sideFigures}
969 % \changes{v1.2}{2024/01/14}{Added macro}
970 % Since the typesetting of photos depends on the typesetting of
971 % figures, we need the switch
972 % \begin{macrocode}
973 \newif\if@AI@sideFigures
974 \@AI@sideFiguresfalse
975 % \end{macrocode}
976 % \end{macro}
977 %
978 % \begin{macro}{\sideFigureCaptions}
979 % \changes{v1.2}{2024/01/14}{Added macro}
980 % Switching to the sideways figures.
981 % \begin{macrocode}
982 \let\figure@AI@Orig\figure
983 \let\endfigure@AI@Orig\endfigure
984 \def\sideFigureCaptions{%
985 \@AI@sideFigurestrue
986 \def\figure{\SCfigure[50]}%
987 \def\endfigure{\endSCfigure}}
988 % \end{macrocode}
989 % \end{macro}
990 %
991 % \begin{macro}{\normalFigureCaptions}
992 % \changes{v1.2}{2024/01/14}{Added macro}
993 % Switching to the normal figures.
994 % \begin{macrocode}
995 \def\normalFigureCaptions{%
996 \@AI@sideFiguresfalse
997 \def\figure{\figure@AI@Orig}%
998 \def\endfigure{\endfigure@AI@Orig}}
999 % \end{macrocode}
1000 % \end{macro}
1001 %
1002 %\subsection{Footnotes}
1003 %\label{sec:footnotes}
1004 %
1005 % \begin{macro}{\@makefntext}
1006 % Our footnotes are not indented
1007 % \begin{macrocode}
1008 \renewcommand\@makefntext[1]{%
1009 \raggedright\parindent\z@\hangindent2em%
1010 \noindent
1011 \@makefnmark\,#1}
1012 % \end{macrocode}
1013 % \end{macro}
1014 %
1015 %\subsection{Backmatter}
1016 %\label{sec:back}
1017 %
1018 % \begin{macro}{\backmatter}
1019 % The end of the report
1020 % \begin{macrocode}
1021 \newcommand\backmatter{%
1022 \cleardoublepage
1023 \thispagestyle{empty}%
1024 \setbox\@tempboxa\vbox{\hsize=5in\condensed\fontsize{40pt}{40pt}\selectfont\bfseries
1025 AMNESTY INTERNATIONAL
1026 IS A GLOBAL MOVEMENT
1027 FOR HUMAN RIGHTS.
1028 WHEN INJUSTICE HAPPENS
1029 TO ONE PERSON, IT
1030 MATTERS TO US ALL.}%
1031 \textcolor{AmnestyYellow}{\rule{10pt}{\ht\@tempboxa}}\hspace{5pt}\box\@tempboxa
1032 \vfill
1033
1034 \parbox[t]{0.45\textwidth}{\setlength{\parskip}{6pt}%
1035 \condensed\fontsize{16pt}{16pt}\selectfont
1036 CONTACT US
1037
1038 \normalsize\normalfont
1039 \faEnvelope~\href{mailto:[email protected]}{[email protected]}
1040
1041 \faPhone*~+44 (0)20 7413 5500}\hspace{0.05\textwidth}%
1042 \parbox[t]{0.45\textwidth}{\setlength{\parskip}{6pt}%
1043 \condensed\fontsize{16pt}{16pt}\selectfont
1044 JOIN THE CONVERSATION
1045
1046 \normalsize\normalfont
1047 \faFacebook~\href{https://www.facebook.com/AmnestyGlobal}{www.facebook.com/AmnestyGlobal}
1048
1049 \faTwitter~@Amnesty}\clearpage
1050 \thispagestyle{backcoverpage}%
1051 {\condensed\fontsize{28pt}{28pt}\bfseries\hl{\MakeUppercase{\@title}}\par}%
1052 \ifx\@subtitle\@empty\else
1053 {\condensed\fontsize{16pt}{16pt}\MakeUppercase{\@subtitle}\par}%
1054 \fi
1055 \bigskip
1056 \@blurb
1057 }
1058
1059 % \end{macrocode}
1060 % \end{macro}
1061 %
1062 %
1063 %\subsection{Glossary}
1064 %\label{sec:glossary}
1065 %
1066 % Some packages for the glossary
1067 % \begin{macrocode}
1068 \RequirePackage{longtable, booktabs}
1069 \newdimen\@tempdimAI
1070 % \end{macrocode}
1071 %
1072 % \begin{macro}{\AmnestyGlossary}
1073 % \changes{v1.0}{2023/10/15}{Added macro}
1074 % Now glossary.
1075 % \begin{macrocode}
1076 \newenvironment{AmnestyGlossary}[1][5em]{%
1077 \clearpage
1078 \section*{Glossary}
1079 \bgroup
1080 \setlength\extrarowheight{1pt}%
1081 \rowcolors{1}{AmnestyGray1}{white}%
1082 \setlength\@tempdimAI{\textwidth}%
1083 \addtolength\@tempdimAI{-2\tabcolsep}%
1084 \addtolength\@tempdimAI{-#1}%
1085 \begin{longtable}{p{#1}<{\raggedright}p{\@tempdimAI}<{\raggedright}}}{%
1086 \end{longtable}\egroup}
1087 % \end{macrocode}
1088 % \end{macro}
1089 %
1090 %
1091 %\subsection{Lists}
1092 %\label{sec:lists}
1093 %
1094 % \begin{macro}{\quote}
1095 % \changes{v1.1}{2023/12/12}{Redefined macro}
1096 % Quotes have a special setup here. This is just ``leftbar'' from
1097 % framed.sty
1098 % \begin{macrocode}
1099 \renewenvironment{quote}{%
1100 \def\FrameCommand{\vrule width 6pt \hspace{10pt}}%
1101 \MakeFramed {\advance\hsize-\width \FrameRestore}%
1102 \vskip0pt\Huge\bfseries\condensed\raggedright\strut\relax}%
1103 {\strut\vskip5pt\endMakeFramed}
1104 % \end{macrocode}
1105 % \end{macro}
1106 %
1107 % \begin{macro}{\attribution}
1108 % \changes{v1.1}{2023/12/12}{Introduced macro}
1109 % Attribution for quotations
1110 % \begin{macrocode}
1111 \def\attribution#1{\par\normalfont\mdseries\normalsize\raggedright #1}
1112 % \end{macrocode}
1113 % \end{macro}
1114 %
1115 % \begin{macro}{\tightlist}
1116 % \changes{v1.2}{2024/01/12}{Introduced macro}
1117 % Pandoc defines `tightlist`, which it uses for |*|-defined lists
1118 % \begin{macrocode}
1119 \def\tightlist{%
1120 \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
1121 % \end{macrocode}
1122 % \end{macro}
1123 %
1124 %\subsection{End of Class}
1125 %\label{end}
1126 %
1127 %
1128 % \begin{macrocode}
1129 \normalsize\normalfont\raggedright
1130 \frontmatter
1131 %</class>
1132 % \end{macrocode}
1133 %
1134 %\Finale
1135 %\clearpage
1136 %
1137 %\PrintChanges
1138 %\clearpage
1139 %\PrintIndex
1140 %
1141 \endinput