summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/amnestyreport/amnestyreport.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/amnestyreport/amnestyreport.dtx')
-rw-r--r--macros/latex/contrib/amnestyreport/amnestyreport.dtx110
1 files changed, 106 insertions, 4 deletions
diff --git a/macros/latex/contrib/amnestyreport/amnestyreport.dtx b/macros/latex/contrib/amnestyreport/amnestyreport.dtx
index 0b25e4006d..3c97bb2f8b 100644
--- a/macros/latex/contrib/amnestyreport/amnestyreport.dtx
+++ b/macros/latex/contrib/amnestyreport/amnestyreport.dtx
@@ -222,7 +222,7 @@
% Amnesty International reports include a short blurb up to 200~words.
% The macro \cs{blurb}\marg{blurb text} sets them.
%
-%\section{Main matter}
+%\subsection{Main matter}
%\label{sec:ug_mainmatter}
%
% \DescribeMacro{\mainmatter}%
@@ -315,6 +315,27 @@
% > \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
%
@@ -333,7 +354,7 @@
\ProvidesFile{amnestyreport.dtx}
%</gobble>
%<class>\ProvidesClass{amnestyreport}
-[2023/12/31 v1.1 Typesetting articles for Amnesty International]
+[2024/01/12 v1.2 Typesetting articles for Amnesty International]
% \end{macrocode}
%
%
@@ -468,9 +489,18 @@ left=1.26in, right=1.26in, footskip=40pt]{geometry}
\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
@@ -496,6 +526,8 @@ left=1.26in, right=1.26in, footskip=40pt]{geometry}
ItalicFont=QTHelvetCnd-Light.otf,
BoldItalicFont=QTHelvetCnd.otf]
\fi
+\setmonofont[StylisticSet={1,2,3}]{Inconsolatazi4-Regular.otf}[
+ BoldFont=Inconsolatazi4-Bold.otf]
\RequirePackage{fontawesome5}
% \end{macrocode}
%
@@ -716,7 +748,7 @@ London WC1X 0DW, UK}\hfill
% \end{macro}
%
%
-%\section{Main matter}
+%\subsection{Main matter}
%\label{sec:mainmatter}
%
% \begin{macro}{\mainmatter}
@@ -779,7 +811,7 @@ London WC1X 0DW, UK}\hfill
%
%
%
-%\section{Sectioning}
+%\subsection{Sectioning}
%\label{sec:sectioning}
%
% \begin{macro}{\section}
@@ -899,12 +931,73 @@ London WC1X 0DW, UK}\hfill
#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}
@@ -1019,6 +1112,15 @@ London WC1X 0DW, UK}\hfill
% \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}
%