texlive[69023] Master/texmf-dist: argumentation (3dec23)

commits+karl at tug.org commits+karl at tug.org
Sun Dec 3 22:08:22 CET 2023


Revision: 69023
          https://tug.org/svn/texlive?view=revision&revision=69023
Author:   karl
Date:     2023-12-03 22:08:22 +0100 (Sun, 03 Dec 2023)
Log Message:
-----------
argumentation (3dec23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/argumentation/README.md
    trunk/Master/texmf-dist/doc/latex/argumentation/argumentation-doc.pdf
    trunk/Master/texmf-dist/doc/latex/argumentation/argumentation-doc.tex
    trunk/Master/texmf-dist/tex/latex/argumentation/argumentation.sty

Modified: trunk/Master/texmf-dist/doc/latex/argumentation/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/argumentation/README.md	2023-12-03 21:07:35 UTC (rev 69022)
+++ trunk/Master/texmf-dist/doc/latex/argumentation/README.md	2023-12-03 21:08:22 UTC (rev 69023)
@@ -4,5 +4,5 @@
 For bug reports and feedback, please contact:
 Lars Bengel <lars.bengel at fernuni-hagen.de>
 
-Version: 1.0 [2023/11/05]
+Version: 1.1 [2023/12/03]
 This package is subject to the LaTeX Project Public License 1.3c
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/latex/argumentation/argumentation-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/argumentation/argumentation-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/argumentation/argumentation-doc.tex	2023-12-03 21:07:35 UTC (rev 69022)
+++ trunk/Master/texmf-dist/doc/latex/argumentation/argumentation-doc.tex	2023-12-03 21:08:22 UTC (rev 69023)
@@ -1,15 +1,23 @@
 \documentclass{article}
 
-\title{The \texttt{argumentation} Package}
-\author{Lars Bengel\\\small lars.bengel at fernuni-hagen.de}
-%\date{}
+\title{The \argumentation Package}
+\author{Lars Bengel\footnote{Please report any issues at \url{https://github.com/aig-hagen/tikz_argumentation}}\\\small lars.bengel at fernuni-hagen.de}
+\date{Version 1.1 [2023/12/03]}
 
 %%%%%%%%% IMPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\usepackage{argumentation}
-\usepackage{amsmath}
+\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
 
@@ -25,7 +33,7 @@
         \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[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}
@@ -32,24 +40,26 @@
         \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{args1}{args6}
         \dualattack[inactive]{args6}{args7}
         
         \attack[inactive]{args8}{args7}
         \attack[inactive]{args7}{args2}
-        \attack[]{args3}{args2}    
-        \attack[]{args4}{args5}
-        \attack[]{args5}{args10}
-        \attack[]{args10}{args9}
-        \attack[]{args9}{args4}
+        \annotatedattack{args3}{args2}{$3$}
+        \attack[incomplete]{args4}{args5}
+        \attack{args5}{args10}
+        \attack{args10}{args9}
+        \attack{args9}{args4}
 
-        \support[]{args4}{args3}
-        \support[]{args9}{args3}
+        \support{args4}{args3}
+        \support{args9}{args3}
     \end{af}
-    \caption{An exemplary AF created with the \textsf{argumentation} package.}
+    \caption{An exemplary AF created with the \argumentation package.}
     \label{fig:example}
 \end{figure}
 \vspace{-0.4cm}
@@ -62,7 +72,7 @@
             \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[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}
@@ -72,67 +82,139 @@
             \afname[left of=args1,yshift=-0.8cm,xshift=-0.2cm]{cap}{\textbf{F:}}
     
             \selfattack{args1}
-            \dualattack[]{args1}{args6}
+            \dualattack{args1}{args6}
             \dualattack[inactive]{args6}{args7}
             
             \attack[inactive]{args8}{args7}
             \attack[inactive]{args7}{args2}
-            \attack[]{args3}{args2}    
-            \attack[]{args4}{args5}
-            \attack[]{args5}{args10}
-            \attack[]{args10}{args9}
-            \attack[]{args9}{args4}
+            \annotatedattack{args3}{args2}{$3$}
+            \attack[incomplete]{args4}{args5}
+            \attack{args5}{args10}
+            \attack{args10}{args9}
+            \attack{args9}{args4}
 
-            \support[]{args4}{args3}
-            \support[]{args9}{args3}
+            \support{args4}{args3}
+            \support{args9}{args3}
         \end{af}
-        \caption{An exemplary AF created with the \textsf{argumentation} package.}
+        \caption{An exemplary AF created with the \argumentation package.}
         \label{fig:example}
     \end{figure}
 \end{verbatim}
 
-\section{Documentation for Version 1.0 [2023/11/05]}
-In the following, we provide an overview over the functionality of the \textsf{argumentation} package.
+\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}
-    Three options are provided to customize the look of the argumentation framework: \textsf{namestyle}, \textsf{argumentstyle} and \textsf{attackstyle}.
-    The \textsf{namestyle} option accepts three different values
+    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{(default) The argument name is rendered with \textbf{\emph{both}}.}\\
+        \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*}
 
-    The \textsf{argumentstyle} option controls the style of the argument nodes and accepts two values
-        \begin{align*}
-            \mathsf{standard} &\quad \text{(default) Standard style for the argument nodes.}\\
-            \mathsf{retro} &\quad \text{Alternative style, node size may vary for large argument names.}
-        \end{align*}
+\noindent\texttt{argumentstyle=}\opt{option}
 
-    The \textsf{attackstyle} option controls the style of the attack arrows and accepts two values
+    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{retro} &\quad \text{Alternative style, arrow tip is smaller and flatter.}
+        \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*}
 
-\subsection{Environments}
-The package provides two environments for creating abstract argumentation frameworks and bipolar argumentation frameworks in \LaTeX-documents.
+You can override the \textsf{argumentstyle}, \textsf{attackstyle} and \textsf{supportstyle} parameters and set a custom style via the following commands respectively.
 
-\subsubsection{\textsf{af}-Environment}
-    The \textsf{argumentation} package provides the \textsf{af} environment for creating abstract argumentation framework.
-    The \textsf{af} environment extends the \textsf{tikzpicture} environment, meaning all \textsf{tikzpicture}-parameters can be used inside the \textsf{af} environment as well.
-    The most relevant parameter is \verb|node distance|, which is set to \verb|1cm| per default.
-    
-\subsubsection{\textsf{miniaf}-Environment}
-    The \textsf{miniaf} environment can be used to create argumentation frameworks using less space.
-    Especially useful for two-column layout documents.
-    It provides essentially the same as the \textsf{af} environment, but with \verb|node distance=0.5cm| and for each node \verb|minimum size=0.5cm|, \verb|font=\small|.
+\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]
-    \centering
-    \begin{miniaf}
+    \begin{subfigure}{0.48\textwidth}
+        \centering
+        \begin{af}[small]
         \argument{args1}{a}
         \argument[right=of args1]{args2}{b}
         \argument[right=of args2]{args3}{c}
@@ -161,58 +243,91 @@
         \attack[]{args5}{args10}
         \attack[]{args10}{args9}
         \attack[]{args9}{args4}
-    \end{miniaf}
-    \caption{An exemplary Mini-AF created with the \textsf{miniaf} environment.}
-    \label{fig:example_mini}
-\end{figure}
+        \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:}}
 
-\subsection{Arguments}
-    Arguments can be created with the following command
+        \selfattack{args1}
+        \dualattack[]{args1}{args6}
+        \dualattack[inactive]{args6}{args7}
+        \attack[inactive]{args8}{args7}
 
-    \verb|\argument{id}{name}|
+        \attack[inactive]{args7}{args2}
+        \attack[]{args3}{args2}
 
-    \noindent
-    To create an argument, you must provide a unique identifier \textsf{id} and the \textsf{name} to be displayed in the picture.
-    The \textsf{id} of an argument is then referred to when creating attacks as well as for the relative positioning of the other arguments.
+        \support[]{args4}{args3}
+        \support[]{args9}{args3}
 
-    The \textsf{standard} style of an argument is defined with the following parameters, all of which can be overridden if desired.
-    \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*}
-    \subsubsection{Relative Positioning}    
-    This package supports relative placement of the arguments via the \textsf{tikz}-library \textsf{positioning}.
-    The relative positioning information is provided as an optional parameter via
+        \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}
     
-    \verb|\argument[dir=of arg_id]{id}{name}|
-    
+\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
-    with \textsf{dir} being one of: \emph{right}, \emph{left}, \emph{below} and \emph{above} and \textsf{arg\_id} being the id of another argument.
+    \verb|\argument{|\opt{id}\verb|}{|\opt{name}\verb|}|
     
-    Additionally, you can adjust the horizontal/vertical position of an argument via the options \textsf{xshift} and \textsf{yshift}.
-    You must also specify the distance in one of the following ways
+    \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.
 
-    \verb|\argument[xshift=5mm]{id}{name}|
+    \end{list}
 
-    \verb|\argument[xshift=5pt]{id}{name}|
+\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\\
 
-    \verb|\argument[xshift=5ex]{id}{name}|
+    \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[right=of arg1]{arg2}{b}
-            \argument[right=of arg2, yshift=-10pt]{arg3}{c}
+            \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}
 
@@ -219,50 +334,66 @@
     \begin{center}
         \begin{af}
             \argument{arg1}{a}
-            \argument[right=of arg1]{arg2}{b}
-            \argument[right=of arg2, yshift=-10pt]{arg3}{c}
+            \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 Styles}
+\subsubsection{Argument Styling}
     Furthermore, you can provide optional parameters to adjust the style of the argument node.
-    For that you can use all \textsf{tikz}-style options and additionally the following pre-defined style parameters:
+    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 in grey and with a dotted outline.}\\
+        \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.}
+        \mathsf{argundec} &\quad \text{The argument is displayed with cyan background color.}\\
     \end{align*}
 
-    \begin{example}
-        
-    \end{example}
+    %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
+    Attacks between two arguments can be created with the command\\
 
-    \verb|\attack{arg1}{arg2}|
-
     \noindent
-    where \textsf{arg1} and \textsf{arg2} are the identifiers of two previously defined arguments.
-    The \textsf{standard} style for attacks is defined with the \textsf{arrows.meta} library as follows
-    \begin{align*}
-        \texttt{-{Stealth[scale=1.25]}}
-    \end{align*}
+    \verb|\attack{|\opt{arg1}\verb|}{|\opt{arg2}\verb|}|
 
-\subsubsection{Attack Styles}
+    \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 and with a dotted line.}\\
+        \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.
 
-    Furthermore, all \textsf{tikz} style parameters can be used here as well.
-
     \begin{example}~
     \begin{verbatim}
         \begin{af}
@@ -290,16 +421,17 @@
         \end{af}
     \end{center}
     \end{example}
-    
 
-    Additionally, you can create a symmetric attack between two arguments with
+    Additionally, there is a shortcut for creating a symmetric attack between two arguments with
 
-    \verb|\dualattack{arg1}{arg2}|
+    \noindent
+    \verb|\dualattack{|\opt{arg1}\verb|}{|\opt{arg2}\verb|}|\\
 
     \noindent
-    and a self-attack for an argument with
+    and a shortcut for a self-attack for an argument with
 
-    \verb|\selfattack{arg1}|
+    \noindent
+    \verb|\selfattack{|\opt{arg1}\verb|}|\\
 
     \noindent
     For both commands, you can use the same optional parameters as for the \verb|\attack| command.
@@ -328,15 +460,16 @@
     
 
 \subsection{Supports}
-    You can create a support relation between two arguments with the command
+    You can create a support relation between two arguments with the command\\
 
-    \verb|\support{arg1}{arg2}|
+    \noindent
+    \verb|\support{|\opt{arg1}\verb|}{|\opt{arg2}\verb|}|
 
-    \noindent
-    where \verb|arg1| and \verb|arg2| are the identifiers of two previously defined arguments.
+    \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}
@@ -361,16 +494,65 @@
     \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
+    If you want to display an identifier for your argumentation framework in the picture, you can use the command\\
 
-    \verb|\afname{id}{name}|
+    \noindent
+    \verb|\afname{|\opt{id}\verb|}{|\opt{name}\verb|}|
 
-    \noindent
-    where \verb|id| is an identifier for the created node and \verb|name| is the text displayed in the picture.
+    \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}
@@ -377,6 +559,7 @@
             \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}    
@@ -386,8 +569,8 @@
         \begin{af}
             \argument{arg1}{a}
             \argument[right=of arg1]{arg2}{b}
-            \argument[right=of arg2]{arg3}{c}
             \afname[left=of arg1]{caption}{$F:$}
+            \annotation[yshift=-0.4cm,xshift=0.4cm]{arg2}{$\neg a$}
     
             \support{arg1}{arg2}
         \end{af}    
@@ -394,4 +577,23 @@
     \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}

Modified: trunk/Master/texmf-dist/tex/latex/argumentation/argumentation.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/argumentation/argumentation.sty	2023-12-03 21:07:35 UTC (rev 69022)
+++ trunk/Master/texmf-dist/tex/latex/argumentation/argumentation.sty	2023-12-03 21:08:22 UTC (rev 69023)
@@ -1,104 +1,109 @@
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{argumentation}[2023/11/05 Argumentation]
-% Author: Lars Bengel
-% E-Mail: lars.bengel at fernuni-hagen.de
-% Version: 1.0
-% License: LaTeX Project Public License 1.3c
+\ProvidesPackage{argumentation}[2023/12/03 Argumentation]
+% Author:   Lars Bengel
+% E-Mail:   lars.bengel at fernuni-hagen.de
+% Version:  1.1
+% Date:     2023/12/03
+% License:  LaTeX Project Public License 1.3c
 
-%%%%%%%%%%% Package Requirements %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\RequirePackage{options}                        % For managing package options
+%%%%%%%%%%% Package Requirements %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\RequirePackage{pgfopts}                        % For managing package options
 \RequirePackage{tikz}                           % For drawing the argumentation frameworks
 \usetikzlibrary{positioning}                    % For relative node positioning
 \usetikzlibrary{arrows.meta}                    % For directed edges / attack arrows
+\usetikzlibrary{arrows}                         % For directed edges / attack arrows
 \usetikzlibrary{decorations.markings}           % For creating the support edge markings
 
-\newcommand{\argstyle}[1]{\textbf{\emph{#1}}}   % Defines the font style in which argument names are displayed
+\newcommand{\argstyle}[1]{#1}                   % Defines the font style in which argument names are displayed
 
+%%%%%%%%%% Package Options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pgfkeys{/argumentation/argumentstyle/.is choice,
+    /argumentation/argumentstyle/standard/.code={\tikzset{argument/.style={circle,draw=black,inner sep=0,outer sep=0}}},
+    /argumentation/argumentstyle/custom/.code={},
+    /argumentation/argumentstyle=standard,
+}
 
-%%%%%%%%%% Package Options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\options{
-    /argumentation/.new family,
-    /argumentation/argumentstyle/.new choice = {standard, retro},
-    /argumentation/namestyle/.new choice = {normal, italics, bold, bolditalics},
-    /argumentation/attackstyle/.new choice = {standard, retro},
-    /argumentation/@unknown/.new cmd 2 = \PackageWarning{argumentation}{Unknown option `#1'}
+\pgfkeys{/argumentation/attackstyle/.is choice,
+    /argumentation/attackstyle/standard/.code={\tikzset{attack/.style={-{stealth'}}}},
+    /argumentation/attackstyle/large/.code={\tikzset{attack/.style={-{Stealth[scale=1.25]}}}},
+    /argumentation/attackstyle=standard,
 }
-\options at ProcessOptions{/argumentation}
 
-%%%%%%%%%% Preprocessing options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifcase\option{/argumentation/namestyle/@ord}\relax
-\or\renewcommand{\argstyle}[1]{\emph{#1}}
-\or\renewcommand{\argstyle}[1]{\textbf{#1}}
-\or\renewcommand{\argstyle}[1]{\textbf{\emph{#1}}}
-\fi
+\pgfkeys{/argumentation/supportstyle/.is choice,
+    /argumentation/supportstyle/standard/.code={\tikzset{support/.style = {attack,postaction = {decorate,decoration={markings,mark=at position 0.36 with {\draw[-] (0,-0.1) -- (0.1,0.1);}}}}}},
+    /argumentation/supportstyle/dashed/.code={\tikzset{support/.style = {attack,densely dashed}}},
+    /argumentation/supportstyle/double/.code={\tikzstyle{support}=[-{Classical TikZ Rightarrow},double]},
+    /argumentation/supportstyle=standard,
+}
 
-\ifcase\option{/argumentation/argumentstyle/@ord}
-\tikzset{arg/.style={circle, minimum size=0.75cm,draw=black,thick,fill=white,font=\large, text centered, inner sep=0}}
-\or\tikzset{arg/.style={circle, minimum size=0.7cm,draw=black,thick,fill=white}}
-\fi
+\pgfkeys{/argumentation/namestyle/.is choice,
+    /argumentation/namestyle/normal/.code={\relax},
+    /argumentation/namestyle/italics/.code={\renewcommand{\argstyle}[1]{\emph{#1}}},
+    /argumentation/namestyle/bold/.code={\renewcommand{\argstyle}[1]{\textbf{#1}}},
+    /argumentation/namestyle/bolditalics/.code={\renewcommand{\argstyle}[1]{\emph{\textbf{#1}}}},
+    /argumentation/namestyle/monospace/.code={\renewcommand{\argstyle}[1]{\texttt{#1}}},
+    /argumentation/namestyle=normal,
+}
 
-\ifcase\option{/argumentation/attackstyle/@ord}
-\tikzset{att/.style={-{Stealth[scale=1.25]}}}
-\or\tikzset{att/.style={->}}
-\fi
+\ProcessPgfPackageOptions{/argumentation}
+%%%%%%%%%% Package Content %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-%%%%%%%%%% Package Content %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\tikzset{ % Basic predefined tikz-styles
-    % Self-Loop style
-    every loop/.style={min distance=2mm,in=0,out=60,looseness=5},
-    % Color shortcuts for labelled arguments and reduced arguments
-    inactive/.style={draw=black!30, text=black!40,densely dashed},
-    argin/.style={fill=green},
-    argout/.style={fill=red},
-    argundec/.style={fill=cyan},
-    % Style for displaying AF name in Figure
-    caption/.style={draw=none},
-    % Style for support mark
-    support mark/.style = {postaction = {decorate,decoration={markings,mark=at position #1 with {\draw[-] (0,-0.1) -- (0.1,0.1);}}}},
+\tikzset{ % global predefined tikz-styles
+    argument size/.style={minimum size=0.7cm},                              % Standard size of argument nodes
+    selfattack/.style={loop,min distance=2mm,in=0,out=60,looseness=5},      % Standard style for self-attacks
+    inactive/.style={draw=black!30, text=black!40},                         % Make a node or edge inactive, i.e., greyed out
+    incomplete/.style={densely dashed},                                     % Style for displaying incomplete nodes or attacks
+    argin/.style={fill=green},                                              % Color an argument that is labelled in
+    argout/.style={fill=red},                                               % Color an argument that is labelled out
+    argundec/.style={fill=cyan},                                            % Color an argument that is labelled undecided
+    caption/.style={draw=none},                                             % Style for displaying AF name in Figure
+    invisible/.style={draw=none,text=black!0},                              % Make a node or edge invisible
+    annotation/.style={above,font=\small},
 }
 
-\newcommand{\setargumentstyle}[1]{\tikzset{arg/.style={#1}}}
-\newcommand{\setattackstyle}[1]{\tikzset{att/.style={#1}}}
-\newcommand{\setloopstyle}[1]{\tikzset{every loop/.style={#1}}}
+% Commands for setting custom tikz-style parameters (experimental)
+\newcommand{\setargumentstyle}[1]{\tikzset{argument/.style={#1}}}
+\newcommand{\setattackstyle}[1]{\tikzset{attack/.style={#1}}}
+\newcommand{\setsupportstyle}[1]{\tikzset{support/.style={#1}}}
 
-\newcommand{\adjustargumentstyle}[1]{\tikzset{arg/.append style={#1}}}
-\newcommand{\adjustattackstyle}[1]{\tikzset{att/.append style={#1}}}
+%\newcommand{\setloopstyle}[1]{\tikzset{selfattack/.style={#1}}}
+%\newcommand{\adjustargumentstyle}[1]{\tikzset{argument/.append style={#1}}}
+%\newcommand{\adjustattackstyle}[1]{\tikzset{attack/.append style={#1}}}
 
-\newcommand{\resetargumentstyle}{\setargumentstyle{circle, minimum size=0.75cm,draw=black,thick,fill=white,font=\large, text centered, inner sep=0}}
-\newcommand{\resetattackstyle}{\setattackstyle{-{Stealth[scale=1.25]}}}
-\newcommand{\resetloopstyle}{\setloopstyle{min distance=2mm,in=0,out=60,looseness=5}}
 
-
-\newenvironment{af}{
-    \tikzpicture
-}{%
-    \endtikzpicture
+%%%%%%%%%%%%%%% Environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pgfkeys{
+    /tikz/small/.style = {node distance=0.55cm,argument size/.style={minimum size=0.55cm},caption/.append style={font=\small}},
+    /tikz/tiny/.style = {node distance=0.35cm,argument size/.style={font=\small, minimum size=0.4cm},caption/.append style={font=\small}},
 }
 
-\newenvironment{miniaf}[1][]{
-    \tikzset{arg/.append style={font=\small, minimum size=0.5cm},
-             att/.append style={-{Stealth[scale=0.9]}},
-    }
-    \tikzpicture[node distance=0.5cm,#1]
+\newenvironment{af}[1][]{
+    \tikzpicture[#1]
 }{%
     \endtikzpicture
 }
 
+%%%%%%%%%%%%%%%% Commands %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
 % Creates a node displaying the name of the AF
 \newcommand{\afname}[3][]{\node[caption,#1](#2){#3};}
 
+\newcommand{\annotation}[3][]{\node[annotation,above of=#2,#1](an_#2){#3};}
+
 % Creates an argument node
-\newcommand{\argument}[3][]{\node[arg,#1](#2){\argstyle{#3}};}
+\newcommand{\argument}[3][]{\node[argument,argument size,#1](#2){\argstyle{#3}};}
 
 % Creates an attack edge
-\newcommand{\attack}[3][]{\path(#2) edge [att,#1] (#3);}
+\newcommand{\attack}[3][]{\path(#2) edge [attack,#1] (#3);}
 
 % Creates a self-attack
-\newcommand{\selfattack}[2][]{\path(#2) edge [att,loop,#1] (#2);}
+\newcommand{\selfattack}[2][]{\path(#2) edge [attack,selfattack,#1] (#2);}
 
 % Creates two symmetric attack edges between two arguments
-\newcommand{\dualattack}[3][]{\path(#2) edge [att, bend right,#1] (#3);\path(#3) edge [att, bend right,#1] (#2);}
+\newcommand{\dualattack}[3][]{\path(#2) edge [attack, bend right,#1] (#3);\path(#3) edge [attack, bend right,#1] (#2);}
 
+% Creates a weighted attack
+\newcommand{\annotatedattack}[4][]{\path(#2) edge [attack,#1] node[annotation](p_#2_#3){#4} (#3);}
+
 % Creates a support edge between two arguments
-\newcommand{\support}[3][]{\path(#2) edge [att,support mark=0.3,#1] (#3);}
+\newcommand{\support}[3][]{\path(#2) edge [support=0.35,#1] (#3);}



More information about the tex-live-commits mailing list.