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

  \newfontfamily\condensed{AmnestyTradeGothic-Cn18.ttf}[
  BoldFont=AmnestyTradeGothic-BdCn20.ttf,
  ItalicFont=AmnestyTradeGothic-Cn18Obl.ttf,
  BoldItalicFont=AmnestyTradeGothic-BdCn20Ob.ttf]
\else
  \ClassInfo{amnestyreport}{Using free fonts}
  \setmainfont{texgyreadventor-regular.otf}[
  BoldFont=texgyreadventor-bold.otf,
  ItalicFont=texgyreadventor-italic.otf,
  BoldItalicFont=texgyreadventor-bolditalic.otf]

  \newfontfamily\condensed{QTHelvetCnd-Light.otf}[
  BoldFont=QTHelvetCnd.otf,
  ItalicFont=QTHelvetCnd-Light.otf,
  BoldItalicFont=QTHelvetCnd.otf]
\fi  
\setmonofont[StylisticSet={1,2,3}]{Inconsolatazi4-Regular.otf}[
  BoldFont=Inconsolatazi4-Bold.otf]
\RequirePackage{fontawesome5}
%    \end{macrocode}
%
%
%\subsection{Paragraphing}
%\label{sec:paragraphing}
%
% The base size is 9pt.  This is taken from size9.clo
%    \begin{macrocode}
\renewcommand\normalsize{%
   \@setfontsize\normalsize\@ixpt\@xipt%
   \abovedisplayskip 8\p@ \@plus4\p@ \@minus4\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 5\p@ \@plus3\p@ \@minus3\p@
   \belowdisplayskip \abovedisplayskip
   \let\@listi\@listI}
\renewcommand\small{%
   \@setfontsize\small\@viiipt\@ixpt%
   \abovedisplayskip 5\p@ \@plus2\p@ \@minus2\p@
   \abovedisplayshortskip \z@ \@plus1\p@
   \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
   \def\@listi{\leftmargin\leftmargini
               \topsep 3\p@ \@plus\p@ \@minus\p@
               \parsep 2\p@ \@plus\p@ \@minus\p@
               \itemsep \parsep}%
   \belowdisplayskip \abovedisplayskip
}
\renewcommand\footnotesize{%
   \@setfontsize\footnotesize\@viipt\@viiipt
   \abovedisplayskip 4\p@ \@plus2\p@ \@minus2\p@
   \abovedisplayshortskip \z@ \@plus1\p@
   \belowdisplayshortskip 2.5\p@ \@plus\p@ \@minus\p@
   \def\@listi{\leftmargin\leftmargini
               \topsep 3\p@ \@plus\p@ \@minus\p@
               \parsep 2\p@ \@plus\p@ \@minus\p@
               \itemsep \parsep}%
   \belowdisplayskip \abovedisplayskip
}
\renewcommand\scriptsize{\@setfontsize\scriptsize\@vipt\@viipt}
\renewcommand\tiny{\@setfontsize\tiny\@vpt\@vipt}
\renewcommand\large{\@setfontsize\large\@xpt\@xiipt}
\renewcommand\Large{\@setfontsize\Large\@xipt{13}}
\renewcommand\LARGE{\@setfontsize\LARGE\@xiipt{14}}
\renewcommand\huge{\@setfontsize\huge\@xivpt{18}}
\renewcommand\Huge{\@setfontsize\Huge\@xviipt{22}}
\setlength\parskip{6pt}
\setlength\parindent\z@
%    \end{macrocode}
%
%
%\subsection{Colors}
%\label{sec:colors}
%
%    \begin{macrocode}
\RequirePackage{xcolor}
\definecolor{AmnestyYellow}{RGB/cmyk}{255,255,0/0,0,1,0}
\definecolor{AmnestyGray1}{RGB/cmyk}{228,228,228/0,0,0,15}
\definecolor{AmnestyGray2}{RGB/cmyk}{178,178,178/0,0,0,32}
\definecolor{AmnestyGray3}{RGB/cmyk}{118,118,118/0,0,0,64}
\definecolor{AmnestyGray4}{RGB/cmyk}{82,82,82/0,0,0,79}
\definecolor{AmnestyGray4}{RGB/cmyk}{37,37,37/0,0,0,97}
\RequirePackage{soul}
\sethlcolor{AmnestyYellow}
%    \end{macrocode}
%
%
%\subsection{Setting up top matter}
%\label{sec:top_matter}
%
% \begin{macro}{\titleimage}
%   The title image
%    \begin{macrocode}
\newcommand\titleimage[1]{\def\@titleimage{#1}}
\titleimage{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\titleimagecaption}
%   The caption for the image
%    \begin{macrocode}
\newcommand\titleimagecaption[1]{\def\@titleimagecaption{#1}}
\titleimagecaption{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\subtitle}
% The subitle
%    \begin{macrocode}
\newcommand\subtitle[1]{\def\@subtitle{#1}}
\subtitle{}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\copyrightyear}
% The copyright year
%    \begin{macrocode}
\newcommand\copyrightyear[1]{\def\@copyrightyear{#1}}
\copyrightyear{\the\year}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\firstpublicationyear}
% The publication year
%    \begin{macrocode}
\newcommand\firstpublicationyear[1]{\def\@firstpublicationyear{#1}}
\firstpublicationyear{\@copyrightyear}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\reportyear}
% The report year
%    \begin{macrocode}
\newcommand\reportyear[1]{\def\@reportyear{#1}}
\reportyear{\@copyrightyear}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\reportmonth}
% The report month
%    \begin{macrocode}
\newcommand\reportmonth[1]{\def\@reportmonth{#1}}
\reportmonth{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi}
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\reportindex}
% The index
%    \begin{macrocode}
\newcommand\reportindex[1]{\def\@reportindex{#1}}
\reportindex{XXXX XX/XX/XXX}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\blurb}
% The blurb
%    \begin{macrocode}
\newcommand\blurb[1]{\def\@blurb{#1}}
\blurb{}
%    \end{macrocode}
% \end{macro}
% 
%
%\subsection{Typesetting top matter}
%\label{sec:maketitle}
%
% \begin{macro}{\frontmatter}
%   We use empty page style for the front matter
%    \begin{macrocode}
\newcommand\frontmatter{%
  \pagenumbering{arabic}%
  \pagestyle{empty}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\maketitle}
%   The \cs{maketitle} command\ldots
%    \begin{macrocode}
\renewcommand{\maketitle}{%
  \newgeometry{top=0.55in, bottom=1.18in,
    left=0.55in, right=0.55in, footskip=20pt}%
  \pagestyle{titlepage}%
    \ifx\@titleimage\@empty
    \ClassWarningNoLine{amnestyreport}{You did not define the title
      image}%
    \else
    \includegraphics[width=18.17cm]{\@titleimage}\par
    \fi
    \ifx\@title\@empty\else
    {\condensed\bfseries\fontsize{48pt}{48pt}\selectfont
      \hl{\MakeUppercase{\@title}}\par}%
    \fi
    \ifx\@subtitle\@empty\else
    {\condensed\fontsize{22pt}{22pt}\selectfont
      \MakeUppercase{\@subtitle}\par}%
    \fi
    \clearpage
      \thispagestyle{backtitlepage}%
    {\condensed\bfseries\fontsize{22pt}{22pt}\selectfont
      \hl{Amnesty International is a movement of 10 million people  
 which mobilizes the humanity in everyone and campaigns  
 for change so we can all enjoy our human rights. Our vision  
 is of a world where those in power keep their promises,  
 respect international law and are held to account. We are 
 independent of any government, political ideology, economic 
 interest or religion and are funded mainly by our  membership 
 and individual donations. We believe that acting in solidarity 
 and compassion with people everywhere can change our 
 societies for the better.}\par}
\vfill
\parbox[t]{0.48\textwidth}{\condensed\footnotesize
  \textcopyright~Amnesty International~\@copyrightyear

Except where otherwise noted, content in this document is licensed
under a Creative Commons (attribution, non-commercial, no derivatives,
international 4.0) licence. 
\url{https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode}.

For more information please visit the permissions page on our website:
\href{https://www.amnesty.org}{www.amnesty.org}.

Where material is attributed to a copyright owner other than Amnesty International this 
material is not subject to the Creative Commons licence.

First published in \@firstpublicationyear\\
by Amnesty International Ltd\\
Peter Benenson House, 1 Easton Street\\
London WC1X 0DW, UK}\hfill
\parbox[t]{0.48\textwidth}{\condensed\footnotesize
  \ifx\@titleimagecaption\@empty\else
  $\leftarrow$\faEye[regular] \raggedright\itshape\textbf{Cover photo:} \@titleimagecaption\fi}
\restoregeometry
\pagestyle{empty}}
     
%    \end{macrocode}
% \end{macro}
%
%
%\subsection{Main matter}
%\label{sec:mainmatter}
%
% \begin{macro}{\mainmatter}
% THe main matter
\newcommand\mainmatter{\cleardoublepage
  \pagestyle{main}%
}
% \end{macro}
% 
%
%\subsection{Page styles}
%\label{sec:page_styles}
%
% \begin{macro}{\amnesty@logo@graphics}
% \changes{v1.1}{2023/11/28}{Introduced macro}
% Either AI logo or a strut
%    \begin{macrocode}
\def\amnesty@logo@graphics{%
  \ifamnesty@logo
    \includegraphics[height=0.5in]{Amnesty_logo}%
  \else
    \rule{0pt}{0.5in}%
  \fi}
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
\RequirePackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancypagestyle{titlepage}{%
  \fancyhf{}%
  \fancyfoot[R]{\raisebox{-\height}{\amnesty@logo@graphics}}%
}
\fancypagestyle{backtitlepage}{%
  \fancyhf{}%
  \fancyfoot[L]{\bfseries Index: \@reportindex\\
    Original language: English\\
    \large\href{https://amnesty.org}{amnesty.org}}%
  \fancyfoot[R]{\raisebox{-\height}{\amnesty@logo@graphics}}%
}
\fancypagestyle{main}{%
  \fancyhf{}%
  \fancyfoot[L]{\condensed\footnotesize\textbf{\MakeUppercase{\@title}}\par
    \ifx\@subtitle\@empty\else\condensed\MakeUppercase{\@subtitle}\par\fi
    Amnesty International
  }%
  \fancyfoot[R]{\normalsize\normalfont\thepage\hspace{1in}}%
}
\fancypagestyle{backcoverpage}{%
  \fancyhf{}%
  \fancyfoot[L]{\normalsize\normalfont
      INDEX: \mbox{\@reportindex}\\
    \MakeUppercase{\@reportmonth~\@reportyear}\\
    LANGUAGE: ENGLISH\\
    \LARGE\bfseries\href{https://amnesty.org}{amnesty.org}}%
  \fancyfoot[R]{\raisebox{-\height}{\amnesty@logo@graphics}\hspace{1in}}%
}
%    \end{macrocode}
%
%
%
%\subsection{Sectioning}
%\label{sec:sectioning}
%
% \begin{macro}{\section}
% The section
%    \begin{macrocode}
\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {.5ex \@plus.2ex}%
                                   {\condensed\fontsize{45pt}{45pt}\selectfont\bfseries\raggedright\MakeUppercase}} 
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\subsection}
%   Subsection
%    \begin{macrocode}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {0.5ex \@plus .2ex}%
                                     {\condensed\fontsize{21pt}{21pt}\selectfont\bfseries\raggedright\MakeUppercase}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\subsubsection}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {0.5ex \@plus .2ex}%
                                     {\condensed\fontsize{16pt}{16pt}\selectfont\bfseries\raggedright\MakeUppercase}}
% \end{macro}
%
% \begin{macro}{\paragraph}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                    {3.25ex \@plus1ex \@minus.2ex}%
                                    {1sp}%
                                    {\condensed\fontsize{11pt}{11pt}\selectfont\bfseries\raggedright\MakeUppercase}}
% \end{macro}
%
%
%\subsection{Table of contents formatting}
%\label{sec:toc}
%
% TOC formatting
% \begin{macro}{\l@section}
% Section formatting
%    \begin{macrocode}
\renewcommand*\l@section[2]{%
  \ifnum \c@tocdepth >\z@
    \addpenalty\@secpenalty
    \addvspace{1.0em \@plus\p@}%
    \setlength\@tempdima{1.5em}%
    \begingroup
      \def\numberline##1{##1~}%
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode \condensed\fontsize{11pt}{11pt}\selectfont\bfseries
      \advance\leftskip\@tempdima
      \hskip -\leftskip
      \MakeUppercase{#1}\nobreak\hfil
      \nobreak\hb@xt@\@pnumwidth{\hss #2%
                                 \kern-\p@\kern\p@}\par
    \endgroup
  \fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\l@subsection}
% Subsection formatting
%    \begin{macrocode}
\renewcommand*\l@subsection[2]{%
  \ifnum \c@tocdepth >1
    \addvspace{0.5em \@plus\p@}%
    \setlength\@tempdima{2em}%
    \begingroup
      \def\numberline##1{##1~}%
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode \condensed\fontsize{10pt}{10pt}\selectfont
      \advance\leftskip\@tempdima
      \hskip -\leftskip
      \MakeUppercase{#1}\nobreak\hfil
      \nobreak\hb@xt@\@pnumwidth{\hss #2%
                                 \kern-\p@\kern\p@}\par
    \endgroup
  \fi}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\l@subsubsection}
% Subsubsection formatting
%    \begin{macrocode}
\renewcommand*\l@subsubsection[2]{%
  \ifnum \c@tocdepth >2
    \addvspace{0.5em \@plus\p@}%
    \setlength\@tempdima{2.5em}%
    \begingroup
      \def\numberline##1{##1~}%
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode \condensed\fontsize{9pt}{9pt}\selectfont
      \advance\leftskip\@tempdima
      \hskip -\leftskip
      \MakeUppercase{#1}\nobreak\hfil
      \nobreak\hb@xt@\@pnumwidth{\hss #2%
                                 \kern-\p@\kern\p@}\par
    \endgroup
  \fi}
%    \end{macrocode}
% \end{macro}
%
%
%\subsection{Figures and tables}
%\label{sec:floats}
%
% We use the caption package for the formatting
%    \begin{macrocode}
\RequirePackage[font=it]{caption}
\DeclareCaptionLabelFormat{table}{$\downarrow$\faEye[regular]\itshape~
  #1 #2}
\DeclareCaptionLabelFormat{figure}{$\uparrow$\faEye[regular]\itshape~
  #1 #2}
\DeclareCaptionLabelFormat{side}{$\leftarrow$\faEye[regular]\itshape~
  #1 #2}
\captionsetup[table]{labelformat=table}
\captionsetup[figure]{labelformat=figure}
\captionsetup[SCfigure]{labelformat=side}
\captionsetup[SCtable]{labelformat=side}
\def\fps@figure{hb}
\def\fps@table{hb}
\def\fps@SCfigure{hb}
\def\fps@SCtable{hb}
%    \end{macrocode}
%
% \begin{macro}{\sideTableCaptions}
% \changes{v1.2}{2024/01/14}{Added macro}
% Switching to the sideways tables.
%    \begin{macrocode}
\let\table@AI@Orig\table
\let\endtable@AI@Orig\endtable
\def\sideTableCaptions{%
  \def\table{\SCtable[50]}%
  \def\endtable{\endSCtable}}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\normalTableCaptions}
% \changes{v1.2}{2024/01/14}{Added macro}
% Switching to the normal tables.
%    \begin{macrocode}
\def\normalTableCaptions{%
  \def\table{\table@AI@Orig}%
  \def\endtable{\endtable@AI@Orig}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\if@AI@sideFigures}
% \changes{v1.2}{2024/01/14}{Added macro}
% Since the typesetting of photos depends on the typesetting of
% figures, we need the switch
%    \begin{macrocode}
\newif\if@AI@sideFigures
\@AI@sideFiguresfalse
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\sideFigureCaptions}
% \changes{v1.2}{2024/01/14}{Added macro}
% Switching to the sideways figures.
%    \begin{macrocode}
\let\figure@AI@Orig\figure
\let\endfigure@AI@Orig\endfigure
\def\sideFigureCaptions{%
  \@AI@sideFigurestrue
  \def\figure{\SCfigure[50]}%
  \def\endfigure{\endSCfigure}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\normalFigureCaptions}
% \changes{v1.2}{2024/01/14}{Added macro}
% Switching to the normal figures.
%    \begin{macrocode}
\def\normalFigureCaptions{%
  \@AI@sideFiguresfalse
  \def\figure{\figure@AI@Orig}%
  \def\endfigure{\endfigure@AI@Orig}}
%    \end{macrocode}
% \end{macro}
%
%\subsection{Footnotes}
%\label{sec:footnotes}
%
% \begin{macro}{\@makefntext}
% Our footnotes are not indented
%    \begin{macrocode}
\renewcommand\@makefntext[1]{%
  \raggedright\parindent\z@\hangindent2em%
  \noindent
    \@makefnmark\,#1}
%    \end{macrocode}
% \end{macro}
%
%\subsection{Backmatter}
%\label{sec:back}
%
% \begin{macro}{\backmatter}
% The end of the report
%    \begin{macrocode}
\newcommand\backmatter{%
  \cleardoublepage
  \thispagestyle{empty}%
  \setbox\@tempboxa\vbox{\hsize=5in\condensed\fontsize{40pt}{40pt}\selectfont\bfseries
  AMNESTY INTERNATIONAL 
  IS A GLOBAL MOVEMENT 
  FOR HUMAN RIGHTS. 
  WHEN INJUSTICE HAPPENS 
  TO ONE PERSON, IT 
  MATTERS TO US ALL.}%
\textcolor{AmnestyYellow}{\rule{10pt}{\ht\@tempboxa}}\hspace{5pt}\box\@tempboxa
\vfill

\parbox[t]{0.45\textwidth}{\setlength{\parskip}{6pt}%
  \condensed\fontsize{16pt}{16pt}\selectfont
  CONTACT US

\normalsize\normalfont
\faEnvelope~\href{mailto:info@amnesty.org}{info@amnesty.org}

\faPhone*~+44 (0)20 7413 5500}\hspace{0.05\textwidth}%
\parbox[t]{0.45\textwidth}{\setlength{\parskip}{6pt}%
  \condensed\fontsize{16pt}{16pt}\selectfont
  JOIN THE CONVERSATION

\normalsize\normalfont
\faFacebook~\href{https://www.facebook.com/AmnestyGlobal}{www.facebook.com/AmnestyGlobal}

\faTwitter~@Amnesty}\clearpage
\thispagestyle{backcoverpage}%
{\condensed\fontsize{28pt}{28pt}\bfseries\hl{\MakeUppercase{\@title}}\par}%
\ifx\@subtitle\@empty\else
{\condensed\fontsize{16pt}{16pt}\MakeUppercase{\@subtitle}\par}%
\fi
\bigskip
\@blurb
}

%    \end{macrocode}
% \end{macro}
%
%
%\subsection{Glossary}
%\label{sec:glossary}
%
% Some packages for the glossary
%    \begin{macrocode}
\RequirePackage{longtable, booktabs}
\newdimen\@tempdimAI
%    \end{macrocode}
%
% \begin{macro}{\AmnestyGlossary}
% \changes{v1.0}{2023/10/15}{Added macro}
% Now glossary.
%    \begin{macrocode}
\newenvironment{AmnestyGlossary}[1][5em]{%
  \clearpage
  \section*{Glossary}
  \bgroup
  \setlength\extrarowheight{1pt}%
  \rowcolors{1}{AmnestyGray1}{white}%
  \setlength\@tempdimAI{\textwidth}%
  \addtolength\@tempdimAI{-2\tabcolsep}%
  \addtolength\@tempdimAI{-#1}%
  \begin{longtable}{p{#1}<{\raggedright}p{\@tempdimAI}<{\raggedright}}}{%
    \end{longtable}\egroup}
%    \end{macrocode}
% \end{macro}
%
%
%\subsection{Lists}
%\label{sec:lists}
%
% \begin{macro}{\quote}
% \changes{v1.1}{2023/12/12}{Redefined macro}
% Quotes have a special setup here.  This is just ``leftbar'' from
% framed.sty 
%    \begin{macrocode}
\renewenvironment{quote}{%
  \def\FrameCommand{\vrule width 6pt \hspace{10pt}}%
  \MakeFramed {\advance\hsize-\width \FrameRestore}%
  \vskip0pt\Huge\bfseries\condensed\raggedright\strut\relax}%
{\strut\vskip5pt\endMakeFramed}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\attribution}
% \changes{v1.1}{2023/12/12}{Introduced macro}
% Attribution for quotations
%    \begin{macrocode}
\def\attribution#1{\par\normalfont\mdseries\normalsize\raggedright #1}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\tightlist}
% \changes{v1.2}{2024/01/12}{Introduced macro}
% Pandoc defines `tightlist`, which it uses for |*|-defined lists
%    \begin{macrocode}
\def\tightlist{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
%    \end{macrocode}
% \end{macro}
%
%\subsection{End of Class}
%\label{end}
%
%
%    \begin{macrocode}
\normalsize\normalfont\raggedright
\frontmatter
%</class>
%    \end{macrocode}
%
%\Finale
%\clearpage
%
%\PrintChanges
%\clearpage
%\PrintIndex
%
\endinput