\documentclass{article} \title{The \argumentation Package} \author{Lars Bengel\footnote{Please report any issues at \url{https://github.com/aig-hagen/tikz_argumentation}}\\\small lars.bengel@fernuni-hagen.de} \date{Version 1.1 [2023/12/03]} %%%%%%%%% IMPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[]{argumentation} % Main Package \usepackage{amsmath} % For example environment \usepackage{xspace} % For dynamic spacing after commands \usepackage{xcolor} % Coloring \usepackage[hidelinks]{hyperref} % Hyperlinks \usepackage{subcaption} % For two-part figures \newcommand{\tikzname}{Ti\emph{k}Z\xspace} \newcommand{\argumentation}{\texttt{argumentation}\xspace} \newcommand{\opt}[2][red]{\ensuremath{\textcolor{#1}{\langle #2\rangle}}} \newtheorem{example}{Example} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \maketitle \tableofcontents \newpage \section{Example} \vspace{-0.7cm} \begin{figure}[ht] \centering \begin{af} \argument{args1}{a} \argument[right=of args1]{args2}{b} \argument[right=of args2]{args3}{c} \argument[right=of args3]{args4}{d} \argument[right=of args4,incomplete]{args5}{e} \argument[below=of args1]{args6}{f} \argument[inactive,right=of args6]{args7}{g} \argument[inactive,argin,right=of args7]{args8}{h} \argument[right=of args8]{args9}{i} \argument[right=of args9]{args10}{j} %\annotation[right]{args5}{$a\lor b$} \afname[left of=args1,yshift=-0.8cm,xshift=-0.2cm]{cap}{\textbf{F:}} \selfattack{args1} \dualattack{args1}{args6} \dualattack[inactive]{args6}{args7} \attack[inactive]{args8}{args7} \attack[inactive]{args7}{args2} \annotatedattack{args3}{args2}{$3$} \attack[incomplete]{args4}{args5} \attack{args5}{args10} \attack{args10}{args9} \attack{args9}{args4} \support{args4}{args3} \support{args9}{args3} \end{af} \caption{An exemplary AF created with the \argumentation package.} \label{fig:example} \end{figure} \vspace{-0.4cm} \begin{verbatim} \usepackage{argumentation} \begin{figure}[ht] \centering \begin{af} \argument{args1}{a} \argument[right=of args1]{args2}{b} \argument[right=of args2]{args3}{c} \argument[right=of args3]{args4}{d} \argument[right=of args4,incomplete]{args5}{e} \argument[below=of args1]{args6}{f} \argument[inactive,right=of args6]{args7}{g} \argument[inactive,argin,right=of args7]{args8}{h} \argument[right=of args8]{args9}{i} \argument[right=of args9]{args10}{j} \afname[left of=args1,yshift=-0.8cm,xshift=-0.2cm]{cap}{\textbf{F:}} \selfattack{args1} \dualattack{args1}{args6} \dualattack[inactive]{args6}{args7} \attack[inactive]{args8}{args7} \attack[inactive]{args7}{args2} \annotatedattack{args3}{args2}{$3$} \attack[incomplete]{args4}{args5} \attack{args5}{args10} \attack{args10}{args9} \attack{args9}{args4} \support{args4}{args3} \support{args9}{args3} \end{af} \caption{An exemplary AF created with the \argumentation package.} \label{fig:example} \end{figure} \end{verbatim} \section{Documentation for Version 1.1 [2023/12/03]} In the following, we give an overview over the functionality of the \argumentation package. In general, the functionality provided by this package is fully compatible with \tikzname. Meaning every command from this package can be used inside the \textsf{tikzpicture} environment and every \tikzname command or option can be used inside the \texttt{af} environment or in context of the argument nodes and attack edges. \subsection{Package Options} The \argumentation package can be imported via the command \noindent \verb|\usepackage{argumentation}| Alternatively, one can also adjust the appearance by providing some package options via \noindent \verb|\usepackage[|\opt{options}\verb|]{argumentation}| \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt} \item The package provides the following \emph{optional} options to customize the look of the argumentation frameworks. \end{list} \begin{align*} \mathsf{namestyle} &\quad \text{Customizes the font of the argument names.}\\ \mathsf{argumentstyle} &\quad \text{Customizes the appearance of the argument nodes.}\\ \mathsf{attackstyle} &\quad \text{Customizes the appearance of the attack edges.}\\ \mathsf{supportstyle} &\quad \text{Customizes the appearance of the support edges.}\\ \end{align*} In the following, we list the available options for each of the style parameters.\\ \noindent\texttt{namestyle=}\opt{option} The \textsf{namestyle} parameter accepts three different options \begin{align*} \mathsf{normal} &\quad \text{(default) The argument name is rendered normally.}\\ \mathsf{italics} &\quad \text{The argument name is rendered in \emph{italics}.}\\ \mathsf{bold} &\quad \text{The argument name is rendered in \textbf{bold}.}\\ \mathsf{bolditalics} &\quad \text{The argument name is rendered with \textbf{\emph{both}}.}\\ \mathsf{monospace} &\quad \text{The argument name is rendered in \texttt{monospace} font.}\\ \end{align*} \noindent\texttt{argumentstyle=}\opt{option} The \textsf{argumentstyle} parameter accepts two options \begin{align*} \mathsf{standard} &\quad \text{(default) Standard style for the argument nodes.}\\ %\mathsf{retro} &\quad \text{Thicker outline and slightly larger nodes.}\\ \end{align*} \newpage \noindent\texttt{attackstyle=}\opt{option} The \textsf{attackstyle} parameter accepts two options \begin{align*} \mathsf{standard} &\quad \text{(default) Standard style for the attack arrow tips.}\\ \mathsf{large} &\quad \text{Alternative style, arrow tip is larger and sharper.}\\ \end{align*} \noindent\texttt{supportstyle=}\opt{option} The \textsf{supportstyle} parameter accepts three options \begin{align*} \mathsf{standard} &\quad \text{(default) Standard style for the attack arrow tips.}\\ \mathsf{dashed} &\quad \text{Dashed arrow line, same tip.}\\ \mathsf{double} &\quad \text{Double arrow line and large flat tip.}\\ \end{align*} You can override the \textsf{argumentstyle}, \textsf{attackstyle} and \textsf{supportstyle} parameters and set a custom style via the following commands respectively. \noindent \verb|\setargumentstyle{|\opt{style}\verb|}| \noindent \verb|\setattackstyle{|\opt{style}\verb|}| \noindent \verb|\setsupportstyle{|\opt{style}\verb|}| \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt} \item where \opt{style} is a list of \tikzname style parameters. \end{list} \subsection{The \texttt{af} Environment} The \argumentation package provides an environment for creating abstract argumentation frameworks and bipolar argumentation frameworks in \LaTeX-documents.\\ \noindent \verb|\begin{af}[|\opt{options}\verb|]| \opt[green]{environment~content} \noindent \verb|\end{af}| \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt} \item The \argumentation package provides the \texttt{af} environment for creating abstract argumentation framework. The \texttt{af} environment extends the \textsf{tikzpicture} environment, meaning all \tikzname commands can be used inside the \texttt{af} environment as well. Furthermore, all options for the \textsf{tikzpicture} environment can be used for the \texttt{af} environment as well. For instance, the option parameter \verb|node distance|, which is set to \verb|1cm| per default. If you want to create an argumentation framework with limited space available, you can provide one of the following predefined options for the environment. This is especially useful for two-column layout documents. \begin{align*} \mathsf{tiny} &\quad \text{\textsf{node distance} is set to $0.35cm$ and nodes are smaller.}\\ \mathsf{small} &\quad \text{\textsf{node distance} is set to $0.55cm$ and nodes are smaller.}\\ \end{align*} \begin{example} Consider the two AFs in Figure~\ref{fig:mini_afs} created with the \textsf{small} and \textsf{tiny} option respectively. \end{example} \end{list} \begin{figure}[ht] \begin{subfigure}{0.48\textwidth} \centering \begin{af}[small] \argument{args1}{a} \argument[right=of args1]{args2}{b} \argument[right=of args2]{args3}{c} \argument[right=of args3]{args4}{d} \argument[right=of args4]{args5}{e} \argument[below=of args1]{args6}{f} \argument[inactive,right=of args6]{args7}{g} \argument[inactive,argin,right=of args7]{args8}{h} \argument[right=of args8]{args9}{i} \argument[right=of args9]{args10}{j} \afname[left of=args1,yshift=-0.5cm,xshift=-0.2cm]{cap}{\textbf{F:}} \selfattack{args1} \dualattack[]{args1}{args6} \dualattack[inactive]{args6}{args7} \attack[inactive]{args8}{args7} \attack[inactive]{args7}{args2} \attack[]{args3}{args2} \support[]{args4}{args3} \support[]{args9}{args3} \attack[]{args4}{args5} \attack[]{args5}{args10} \attack[]{args10}{args9} \attack[]{args9}{args4} \end{af} \caption{An exemplary AF created with the \textsf{small} option set.} \label{fig:example_small} \end{subfigure} \hfill \begin{subfigure}{0.48\textwidth} \centering \begin{af}[tiny] \argument{args1}{a} \argument[right=of args1]{args2}{b} \argument[right=of args2]{args3}{c} \argument[right=of args3]{args4}{d} \argument[right=of args4]{args5}{e} \argument[below=of args1]{args6}{f} \argument[inactive,right=of args6]{args7}{g} \argument[inactive,argin,right=of args7]{args8}{h} \argument[right=of args8]{args9}{i} \argument[right=of args9]{args10}{j} \afname[left of=args1,yshift=-0.5cm,xshift=-0.2cm]{cap}{\textbf{F:}} \selfattack{args1} \dualattack[]{args1}{args6} \dualattack[inactive]{args6}{args7} \attack[inactive]{args8}{args7} \attack[inactive]{args7}{args2} \attack[]{args3}{args2} \support[]{args4}{args3} \support[]{args9}{args3} \attack[]{args4}{args5} \attack[]{args5}{args10} \attack[]{args10}{args9} \attack[]{args9}{args4} \end{af} \caption{An exemplary AF created with the \textsf{tiny} option set.} \label{fig:example_tiny} \end{subfigure} \caption{Two AFs with smaller nodes, created by using the \textsf{small} and \textsf{tiny} options of the \texttt{af} environment.} \label{fig:mini_afs} \end{figure} While the following commands are intended to be used inside the \texttt{af} environment, they can also be used inside the \textsf{tikzpicture} environment. \subsection{Arguments} Arguments can be created with the following command\\ \noindent \verb|\argument{|\opt{id}\verb|}{|\opt{name}\verb|}| \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt} \item\opt{id}~ is the identifier of the new argument \item\opt{name}~ is the displayed name of the argument \item To create an argument, you must provide a unique identifier and the name to be displayed in the picture. The \opt{id} of an argument is then referred to when creating attacks as well as for the relative positioning of other arguments. \end{list} \subsubsection{Relative Positioning} This package supports relative placement of the arguments via the \tikzname-library \textsf{positioning}. The relative positioning information is provided as an optional parameter via\\ \noindent \verb|\argument[|\opt{dir}\verb|=of |\opt{arg\_id}\verb|]{|\opt{id}\verb|}{|\opt{name}\verb|}| \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt} \item\opt{dir}~ has to be one of: \emph{right}, \emph{left}, \emph{below} and \emph{above} \item\opt{arg\_id}~ is the identifier of another argument \item Additionally, you can adjust the horizontal/vertical position of an argument via the options \verb|xshift=|\opt{v} and \verb|yshift=|\opt{v}. The value \opt{v} is the horizontal/vertical offset, e.\,g., \verb|5pt|, \verb|-3ex| or \verb|0.2cm|. \end{list} \begin{example}~ \begin{verbatim} \begin{af} \argument{arg1}{a} \argument[below=of arg1]{arg2}{b} \argument[right=of arg1, yshift=-24pt,xshift=-8pt]{arg3}{c} \argument[right=of arg3, xshift=-0.5cm]{arg4}{d} \argument[right=of arg4, yshift=5ex]{arg4}{e} \end{af} \end{verbatim} \begin{center} \begin{af} \argument{arg1}{a} \argument[below=of arg1]{arg2}{b} \argument[right=of arg1, yshift=-24pt,xshift=-8pt]{arg3}{c} \argument[right=of arg3, xshift=-0.5cm]{arg4}{d} \argument[right=of arg4, yshift=5ex]{arg4}{e} \end{af} \end{center} \end{example} \subsubsection{Argument Styling} Furthermore, you can provide optional parameters to adjust the style of the argument node. For that you can use all \tikzname-style options and additionally the following predefined style parameters: \begin{align*} \mathsf{inactive} &\quad \text{The argument is displayed with grey outline and text.}\\ \mathsf{incomplete} &\quad \text{The argument is displayed with a dotted outline.}\\ \mathsf{invisible} &\quad \text{The argument node is completely transparent.}\\ \mathsf{argin} &\quad \text{The argument is displayed with green background color.}\\ \mathsf{argout} &\quad \text{The argument is displayed with red background color.}\\ \mathsf{argundec} &\quad \text{The argument is displayed with cyan background color.}\\ \end{align*} %Some relevant \tikzname style-parameters are %\begin{align*} %\textsf{circle} &\quad \text{the shape of the argument.}\\ % \textsf{minimum~size=0.75cm} &\quad \text{the minimum size of the circle, to ensure consistent}\\ % &\quad \text{argument size.}\\ % \textsf{draw=black} &\quad \text{outline and text color of the argument.}\\ %\textsf{thick} &\quad \text{the outline of the circle is rendered in \textsf{thick} mode.}\\ % \textsf{fill=white} &\quad \text{the background color of the argument.}\\ % \textsf{font=large} &\quad \text{the font size of the argument name.}\\ %\textsf{text~centered} &\quad \text{positioning of the argument name inside the circle.}\\ % \textsf{inner~sep=0} &\quad \text{inner margins of the circle, set to \textsf{0} to optimize space.} %\end{align*} \subsection{Attacks} Attacks between two arguments can be created with the command\\ \noindent \verb|\attack{|\opt{arg1}\verb|}{|\opt{arg2}\verb|}| \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt} \item where \opt{arg1} and \opt{arg2} are the identifiers of two previously defined arguments. \end{list} \subsubsection{Attack Styling} To customize an attack you can provide additional optional parameters: \begin{align*} \mathsf{inactive} &\quad \text{The attack is displayed in grey.}\\ \mathsf{incomplete} &\quad \text{The attack is displayed with a dotted line.}\\ \mathsf{invisible} &\quad \text{The attack is completely transparent.}\\ \mathsf{selfattack} &\quad \text{Use if source and target of the attack are the same node.}\\ \mathsf{bend~right} &\quad \text{The attack arrow is bent to the right.}\\ &\quad \text{Can additionally provide the angle, e.\,g., \textsf{bend~right=40}.}\\ \mathsf{bend~left} &\quad \text{The attack arrow is bent to the left. Can also provide an angle.}\\ \end{align*} Of course, all \tikzname style parameters can be used here as well. \begin{example}~ \begin{verbatim} \begin{af} \argument{arg1}{a} \argument[right=of arg1]{arg2}{b} \argument[right=of arg2]{arg3}{c} \argument[right=of arg3]{arg4}{d} \attack{arg1}{arg2} \attack[bend right]{arg2}{arg3} \attack[bend left=10,inactive]{arg3}{arg4} \end{af} \end{verbatim} \begin{center} \begin{af} \argument{arg1}{a} \argument[right=of arg1]{arg2}{b} \argument[right=of arg2]{arg3}{c} \argument[right=of arg3]{arg4}{d} \attack{arg1}{arg2} \attack[bend right]{arg2}{arg3} \attack[bend left=10,inactive]{arg3}{arg4} \end{af} \end{center} \end{example} Additionally, there is a shortcut for creating a symmetric attack between two arguments with \noindent \verb|\dualattack{|\opt{arg1}\verb|}{|\opt{arg2}\verb|}|\\ \noindent and a shortcut for a self-attack for an argument with \noindent \verb|\selfattack{|\opt{arg1}\verb|}|\\ \noindent For both commands, you can use the same optional parameters as for the \verb|\attack| command. \begin{example}~ \begin{verbatim} \begin{af} \argument{arg1}{a} \argument[right=of arg1]{arg2}{b} \selfattack{arg1} \dualattack{arg1}{arg2} \end{af} \end{verbatim} \begin{center} \begin{af} \argument{arg1}{a} \argument[right=of arg1]{arg2}{b} \selfattack{arg2} \dualattack{arg1}{arg2} \end{af} \end{center} \end{example} \subsection{Supports} You can create a support relation between two arguments with the command\\ \noindent \verb|\support{|\opt{arg1}\verb|}{|\opt{arg2}\verb|}| \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt} \item where \opt{arg1} and \opt{arg2} are the identifiers of two previously defined arguments. The support arrow use the same tip as the attack arrows, but have a perpendicular mark to distinguish them from attacks. Supports can be customized in the same way as attacks. \end{list} \begin{example}~ \begin{verbatim} \begin{af} \argument{arg1}{a} \argument[right=of arg1]{arg2}{b} \argument[right=of arg2]{arg3}{c} \support{arg1}{arg2} \support[bend right]{arg2}{arg3} \end{af} \end{verbatim} \begin{center} \begin{af} \argument{arg1}{a} \argument[right=of arg1]{arg2}{b} \argument[right=of arg2]{arg3}{c} \support{arg1}{arg2} \support[bend right]{arg2}{arg3} \end{af} \end{center} \end{example} \subsection{Annotated Attacks} Many extensions of the original abstract argumentation framework rely on attacks with an associated value. This may, for instance, be probabilities in the case of probabilistic argumentation frameworks or numerical weights in the case of weighted argumentation frameworks. These annotations can be added manually via \tikzname or via the following command\\ \noindent \verb|\annotatedattack{|\opt{arg1}\verb|}{|\opt{arg2}\verb|}{|\opt{value}\verb|}| \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt} \item where \opt{arg1} and \opt{arg2} are the identifiers of two previously defined arguments and \opt{value} is the number or string that should be annotated to the attack. With this command, the annotation is placed above the attack arrow. \end{list} \begin{example}~ \begin{verbatim} \begin{af} \argument{arg1}{a} \argument[right=of arg1]{arg2}{b} \argument[right=of arg2]{arg3}{c} \annotatedattack{arg1}{arg2}{$x$} \annotatedattack[bend right]{arg2}{arg3}{$0.6$} \end{af} \end{verbatim} \begin{center} \begin{af} \argument{arg1}{a} \argument[right=of arg1]{arg2}{b} \argument[right=of arg2]{arg3}{c} \annotatedattack{arg1}{arg2}{$x$} \annotatedattack[bend right]{arg2}{arg3}{$0.6$} \end{af} \end{center} \end{example} \subsection{Further Commands} If you want to display an identifier for your argumentation framework in the picture, you can use the command\\ \noindent \verb|\afname{|\opt{id}\verb|}{|\opt{name}\verb|}| \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt} \item where \opt{id} is an identifier for the created node and \opt{name} is the text displayed in the picture. Additionally, positioning information can be provided via the optional parameters. \end{list} \noindent To create an annotation, e.\,g., an acceptance condition or a weight, next to an argument, the following command can be used.\\ \noindent \verb|\annotation{|\opt{arg\_id}\verb|}{|\opt{text}\verb|}| \begin{list}{}{\leftmargin=\parindent\rightmargin=0pt} \item where \opt{arg\_id} is the identifier of some argument and \opt{text} is the text to be displayed. Additionally, positioning information, via \textsf{xshift} or \textsf{yshift}, can be provided via the optional parameters. \end{list} \begin{example}~ \begin{verbatim} \begin{af} \argument{arg1}{a} \argument[right=of arg1]{arg2}{b} \afname[left=of arg1]{caption}{$F:$} \annotation[yshift=-0.4cm,xshift=0.4cm]{arg2}{$\neg a$} \attack{arg1}{arg2} \end{af} \end{verbatim} \begin{center} \begin{af} \argument{arg1}{a} \argument[right=of arg1]{arg2}{b} \afname[left=of arg1]{caption}{$F:$} \annotation[yshift=-0.4cm,xshift=0.4cm]{arg2}{$\neg a$} \support{arg1}{arg2} \end{af} \end{center} \end{example} %\section{Style Definitions} \newpage \section{Version History} \subsection*{[v1.0 2023/11/05]} \begin{itemize} \item First Version. \end{itemize} \subsection*{[v1.1 2023/12/03]} \begin{itemize} \item Adjusted standard styles. \item Added command for creating annotated attacks. \item Now only provides one environment, which can be parameterised. \item Changed option management to pgfkeys. \item Updated and improved documentation. \end{itemize} \end{document}