diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/argumentation/README.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/argumentation/argumentation-doc.pdf | bin | 528829 -> 570323 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/argumentation/argumentation-doc.tex | 34 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/argumentation/argumentation.sty | 200 |
4 files changed, 172 insertions, 64 deletions
diff --git a/Master/texmf-dist/doc/latex/argumentation/README.md b/Master/texmf-dist/doc/latex/argumentation/README.md index b015ce3555f..c6a5ab27ec0 100644 --- a/Master/texmf-dist/doc/latex/argumentation/README.md +++ b/Master/texmf-dist/doc/latex/argumentation/README.md @@ -4,5 +4,5 @@ The argumentation package provides utility to create abstract argumentation fram For bug reports and feedback, please contact: Lars Bengel <lars.bengel@fernuni-hagen.de> -Version: 1.4 [2024/11/03] +Version: 1.5 [2025/02/09] This package is subject to the LaTeX Project Public License 1.3c
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/argumentation/argumentation-doc.pdf b/Master/texmf-dist/doc/latex/argumentation/argumentation-doc.pdf Binary files differindex f9c4defd431..b3a40661585 100644 --- a/Master/texmf-dist/doc/latex/argumentation/argumentation-doc.pdf +++ b/Master/texmf-dist/doc/latex/argumentation/argumentation-doc.pdf diff --git a/Master/texmf-dist/doc/latex/argumentation/argumentation-doc.tex b/Master/texmf-dist/doc/latex/argumentation/argumentation-doc.tex index 58fa51c0063..ad1f7a6fd02 100644 --- a/Master/texmf-dist/doc/latex/argumentation/argumentation-doc.tex +++ b/Master/texmf-dist/doc/latex/argumentation/argumentation-doc.tex @@ -42,7 +42,7 @@ \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.4 [2024/11/03]} +\date{Version 1.5 [2025/02/09]} \begin{document} \maketitle @@ -227,7 +227,7 @@ To customize the look of the arguments and attacks and for a detailed overview o \newpage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{Documentation for Version 1.4 [2024/11/03]}\label{sec:documentation} +\section{Documentation for Version 1.5 [2025/02/09]}\label{sec:documentation} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The \argumentation package provides an easy way for creating argumentation frameworks\footnote{Dung, P. M. (1995). On the acceptability of arguments and its fundamental role in non-monotonic reasoning, logic programming and n-person games. Artificial intelligence.} in \LaTeX-documents. It builds on the \tikzname package for drawing the argumentation graphs. @@ -548,7 +548,30 @@ Some useful style options for the attacks (and other edges) are listed below: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Beamer}\label{sec:beamer} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Most commands provided by the \argumentation package support \emph{overlay specifications} used for creating presentations with \textsf{beamer}\footnote{\url{https://tug.ctan.org/macros/latex/contrib/beamer/doc/beameruserguide.pdf}}. +To specify overlay information, use \verb|<X>| directly after the command name, where \verb|X| is for instance a number, a list of numbers or any other form of overlay specification (see \textsf{beamer} documentation for more information). +All commands for creating AFs introduced so far support overlay specifications. +\begin{example}~ +\begin{verbatim} +\begin{frame}{Example AF} +\begin{af} + \argument<1>{a} % Argument visible on slide 1 + \argument<1,2>[right=of a1]{b} % Argument visible on slides 2 and 3 + \argument<2-4>[right=of a2]{c} % Argument visible on slides 2 to 4 + + \attack<2->{a2}{a3} % Attack is visible on slide 2 + % and any following slides +\end{af} +\end{frame} +\end{verbatim} +\end{example} + +In accordance with the \textsf{beamer} cover types, the \argumentation package provides the two cover modes: \textsf{transparent} and \textsf{invisible}. +In \textsf{transparent} mode arguments and attacks that are inactive on a slide are rendered in gray, and in \textsf{invisible} mode they are completely invisible on inactive slides. + +\subsubsection{Experimental Features} +\textbf{Warning: The following features are experimental and the performance is not necessarily optimized yet.} If you want to reuse (parts of) previously created argumentation frameworks in some form, the \argumentation package provides some useful commands that can be enabled via the package option $\textsf{beamer}{=}\textsf{true}$. While primarily intended for the use inside the $\textsf{beamer}$ document class when creating presentations, the commands also work in any other document class. Each command required the label of some argumentation framework and a list of argument IDs of that framework and then creates a copy of that framework, with some changes depending on the command.\\ @@ -1071,6 +1094,13 @@ You may use or redefine them at your own discretion. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Version History}\label{sec:history} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\subsection*{[v1.5 2025/02/09]} +\begin{itemize} + \item Added support for beamer overlay specifications to \verb|\argument{ }|, \verb|\attack{ }{ }| and related commands. + \item Added \textsf{covered} parameter for \texttt{af} environment to select between \textit{transparent} and \textit{invisible} rendering of inactive arguments/attacks on slides. + \item Bugfix related to experimental beamer commands. +\end{itemize} + \subsection*{[v1.4 2024/10/31]} \begin{itemize} \item Added functions \verb|\aflabeling|, \verb|\afextension|, \verb|\afreduct| and \verb|\afrestriction| that recreate (parts of) previously created argumentation frameworks. Can be enabled via the package option \textsf{beamer=true}. diff --git a/Master/texmf-dist/tex/latex/argumentation/argumentation.sty b/Master/texmf-dist/tex/latex/argumentation/argumentation.sty index 6633c25a3a9..e7c42ece847 100644 --- a/Master/texmf-dist/tex/latex/argumentation/argumentation.sty +++ b/Master/texmf-dist/tex/latex/argumentation/argumentation.sty @@ -1,9 +1,9 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{argumentation}[2024/11/03 Argumentation] +\ProvidesPackage{argumentation}[2025/02/09 Argumentation] % Author: Lars Bengel % E-Mail: lars.bengel@fernuni-hagen.de -% Version: 1.4 -% Date: 2024/11/03 +% Version: 1.5 +% Date: 2025/02/09 % License: LaTeX Project Public License 1.3c @@ -75,6 +75,18 @@ tiny/.style={node distance=2.3ex,argument size/.style={minimum size=2.6ex,font=\small},attack width/.style={line width=0.03em},caption/.append style={font=\small}}, % Tiny size style for af } +%%% Option for switching beamer cover type in af +\makeatletter +\newif\if@afoverlay +\pgfkeys{/tikz/.cd, + covered/.is choice, + covered/transparent/.code={\@afoverlaytrue}, + covered/invisible/.code={\@afoverlayfalse}, + covered/.default=transparent, + covered=transparent, +} +\makeatother + %%%%%%%%%% Internal Utility Functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \makeatletter @@ -92,6 +104,11 @@ \def\@attacker{#1}% \def\@attacked{#2}% } + +% Dummy command in case the beamer documentclass is not loaded +\ProvideDocumentCommand{ \alt } {r<> m m} {#2} + + \makeatother %%%%%%%%%% Package Options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -207,14 +224,15 @@ \newcounter{@argument} %%% Command for creating arguments -% #1 TikZ parameters (optional) -% #2 unique argument ID (optional) -% #3 argument display name -% #4 ignored -% #5 absolute positioning values (optional) -\NewDocumentCommand { \argument } {O{} d() m dat d()} {% +% #1 beamer overlay specification (optional) +% #2 TikZ parameters (optional) +% #3 unique argument ID (optional) +% #4 argument display name +% #5 ignored +% #6 absolute positioning values (optional) +\NewDocumentCommand { \argument } {D<>{.-} O{} d() m dat d()} {% \stepcounter{@argument} - \IfNoValueTF {#2}{% + \IfNoValueTF {#3}{% \if@alphaidx \edef\@argid{\alph{@argument}} \else\if@numericidx @@ -223,31 +241,48 @@ \PackageError{argumentation}{Missing argument ID}{Must either provide argument ID inside () or activate auto-indexing} \fi\fi }{% - \edef\@argid{#2} + \edef\@argid{#3} } \ifbeamer \if@insideaf - \@make@argument{#1}{\@argid}{#3}{#4}{#5}{\arabic{af}} + \@make@argument{#2}{\@argid}{#4}{#5}{#6}{\arabic{af}} \csname @af@\arabic{af}@arg@\@argid\endcsname{} \else - \@create@argument{#1}{}{\@argid}{#3}{#5} + \@create@argument{#1}{#2}{}{\@argid}{#4}{#6} \fi \else - \@create@argument{#1}{}{\@argid}{#3}{#5} + \@create@argument{#1}{#2}{}{\@argid}{#4}{#6} \fi } %%% Auxilliary command for creating arguments -% #1 TikZ parameters (optional) +% #1 beamer overlay specification (optional) % #2 TikZ parameters (optional) -% #3 unique argument ID (optional) -% #4 argument display name -% #5 absolute positioning value (optional) -\NewDocumentCommand { \@create@argument } {mmmmm} {% - \IfNoValueTF {#5}{% - \node[argument size,argument,#1,#2](#3) {\@arg@style{#4}}; +% #3 TikZ parameters (optional) +% #4 unique argument ID (optional) +% #5 argument display name +% #6 absolute positioning value (optional) +\NewDocumentCommand { \@create@argument } {mmmmmm} {% + \alt<#1>{ + \IfNoValueTF {#6}{% + \node[argument size,argument,#2,#3](#4) {\@arg@style{#5}}; + }{% + \node[argument size,argument,#2,#3](#4) at (#6) {\@arg@style{#5}}; + } }{% - \node[argument size,argument,#1,#2](#3) at (#5) {\@arg@style{#4}}; + \if@afoverlay + \IfNoValueTF {#6}{% + \node[argument size,argument,inactive,#2,#3](#4) {\@arg@style{#5}}; + }{% + \node[argument size,argument,inactive,#2,#3](#4) at (#6) {\@arg@style{#5}}; + } + \else + \IfNoValueTF {#6}{% + \node[argument size,argument,invisible,#2,#3](#4) {\@arg@style{#5}}; + }{% + \node[argument size,argument,invisible,#2,#3](#4) at (#6) {\@arg@style{#5}}; + } + \fi } } @@ -260,11 +295,9 @@ % #5 absolute positioning values % #6 unique AF ID \NewDocumentCommand { \@make@argument } {mmmmmm} {% - %\typeout{CREATED NEW MACRO @af@#6@arg#2} \expandafter\listxadd\csname @arguments@#6\endcsname{#2} \expandafter\global\expandafter\edef\csname @af@#6@arg@#2\endcsname##1{% - %\typeout{RECALLING MACRO @af@#6@arg#2} - \@create@argument{#1}{##1}{#2}{#3}{#5} + \@create@argument{.-}{#1}{##1}{#2}{#3}{#5} } } \fi @@ -274,34 +307,52 @@ %%%%%%%%%%%%%%% Attacks & Support %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \makeatletter %%% Command for creating attacks -% #1 TikZ parameters (optional) -% #2 attacking argument ID -% #3 attacked argument ID -% #4 annotation text (optional) -\NewDocumentCommand { \attack } {O{} m m d()} {% +% #1 beamer overlay specification (optional) +% #2 TikZ parameters (optional) +% #3 attacking argument ID +% #4 attacked argument ID +% #5 annotation text (optional) +\NewDocumentCommand { \attack } {D<>{.-} O{} m m d()} {% \ifbeamer \if@insideaf - \@make@attack{#1}{#2}{#3}{#4}{\arabic{af}} - \csname @af@\arabic{af}@att@#2#3\endcsname{} + \@make@attack{#2}{#3}{#4}{#5}{\arabic{af}} + \csname @af@\arabic{af}@att@#3#4\endcsname{} \else - \@create@attack{#1}{}{#2}{#3}{#4} + \@create@attack{#1}{#2}{}{#3}{#4}{#5} \fi \else - \@create@attack{#1}{}{#2}{#3}{#4} + \@create@attack{#1}{#2}{}{#3}{#4}{#5} \fi } %%% Internal command for creating the attack in TikZ -% #1 TikZ parameters (optional) +% #1 beamer overlay specification (optional) % #2 TikZ parameters (optional) -% #3 attacking argument ID -% #4 attacked argument ID -% #5 annotation text -\NewDocumentCommand { \@create@attack } {mmmmm} {% - \IfNoValueTF{#5}{% - \path(#3) edge [attack,#1,#2] (#4); +% #3 TikZ parameters (optional) +% #4 attacking argument ID +% #5 attacked argument ID +% #6 annotation text +\NewDocumentCommand { \@create@attack } {mmmmmm} {% + \alt<#1>{ + \IfNoValueTF{#6}{% + \path(#4) edge [attack,#2,#3] (#5); + }{% + \path(#4) edge [attack,#2,#3] node[annotation](p_#4_#5){#6} (#5); + } }{% - \path(#3) edge [attack,#1,#2] node[annotation](p_#3_#4){#5} (#4); + \if@afoverlay + \IfNoValueTF{#6}{% + \path(#4) edge [attack,inactive,#2,#3] (#5); + }{% + \path(#4) edge [attack,inactive,#2,#3] node[annotation](p_#4_#5){#6} (#5); + } + \else + \IfNoValueTF{#6}{% + \path(#4) edge [attack,invisible,#2,#3] (#5); + }{% + \path(#4) edge [attack,invisible,#2,#3] node[annotation](p_#4_#5){#6} (#5); + } + \fi } } @@ -315,7 +366,7 @@ \NewDocumentCommand { \@make@attack } {mmmmm} {% \expandafter\listgadd\csname @attacks@#5\endcsname{#2,#3} \expandafter\global\expandafter\edef\csname @af@#5@att@#2#3\endcsname##1{ - \@create@attack{#1}{##1}{#2}{#3}{#4} + \@create@attack{.-}{#1}{##1}{#2}{#3}{#4} } } \fi @@ -323,17 +374,17 @@ %%% Self-attack edge % #1 TikZ parameters (optional) % #2 argument ID -\NewDocumentCommand { \selfattack } {O{} m} {% - \attack[selfattack,#1]{#2}{#2} +\NewDocumentCommand { \selfattack } {D<>{.-} O{} m} {% + \attack<#1>[selfattack,#2]{#3}{#3} } %%% Symmetric attack edges between two arguments % #1 TikZ parameters (optional) % #2 first argument ID % #3 second argument ID -\NewDocumentCommand { \dualattack } {O{} m m} {% - \attack[bend right,#1]{#2}{#3} - \attack[bend right,#1]{#3}{#2} +\NewDocumentCommand { \dualattack } {D<>{.-} O{} m m} {% + \attack<#1>[bend right,#2]{#3}{#4} + \attack<#1>[bend right,#2]{#4}{#3} } %%% Create attack edge with value (DEPRECATED as of v1.4) @@ -341,16 +392,25 @@ % #2 attacking argument ID % #3 attacked argument ID % #4 annotation text -\NewDocumentCommand{ \annotatedattack } {O{}mmm} {% - \attack[#1]{#2}{#3}(#4) +\NewDocumentCommand{ \annotatedattack } {D<>{.-} O{} m m m} {% + \attack<#1>[#2]{#3}{#4}(#5) } %%% Support edge -% #1 TikZ parameters (optional) -% #2 supporting argument ID -% #3 supported argument ID -\NewDocumentCommand { \support } {O{} m m} {% - \path(#2) edge [support=0.35,#1] (#3); +% #1 overlay specification (optional) +% #2 TikZ parameters (optional) +% #3 supporting argument ID +% #4 supported argument ID +\NewDocumentCommand { \support } {D<>{.-} O{} m m} {% + \alt<#1>{% + \path(#3) edge [support=0.35,#2] (#4); + }{% + \if@afoverlay + \path(#3) edge [support=0.35,inactive,#2] (#4); + \else + \path(#3) edge [support=0.35,invisible,#2] (#4); + \fi + } } \makeatother @@ -396,17 +456,35 @@ \fi %%% Creates a node displaying the name of the AF -\NewDocumentCommand { \afname } { O{} D(){caption} m dat d()} {% - \IfNoValueTF {#5}{% - \node[caption,#1](#2){#3}; +% #1 overlay specification (optional) +% #2 TikZ-parameters (optional) +% #3 node identifier (optional) +% #4 node name +% #5 ignored +% #6 node position +\NewDocumentCommand { \afname } { D<>{.-} O{} D(){caption} m dat d()} {% + \alt<#1>{ + \IfNoValueTF {#6}{% + \node[caption,#2](#3){#4}; + }{% + \node[caption,#2](#3) at (#6) {#4}; + } }{% - \node[caption,#1](#2) at (#5) {#3}; + \IfNoValueTF {#6}{% + \node[caption,invisible,#2](#3){#4}; + }{% + \node[caption,invisible,#2](#3) at (#6) {#4}; + } } } %%% Create a text annotation next to another node -\NewDocumentCommand { \annotation } {O{} m m} {% - \node[annotation,above of=#2,#1](an_#2){#3}; +\NewDocumentCommand { \annotation } {D<>{.-} O{} m m} {% + \alt<#1>{% + \node[annotation,above of=#3,#2](an_#3){#4}; + }{% + \node[annotation,above of=#3,invisible,#2](an_#3){#4}; + } } %%% Commands for setting custom tikz-style parameters |