texlive[76182] Master: fodot (29aug25)
commits+karl at tug.org
commits+karl at tug.org
Fri Aug 29 23:29:39 CEST 2025
Revision: 76182
https://tug.org/svn/texlive?view=revision&revision=76182
Author: karl
Date: 2025-08-29 23:29:39 +0200 (Fri, 29 Aug 2025)
Log Message:
-----------
fodot (29aug25)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/fodot/
trunk/Master/texmf-dist/doc/latex/fodot/README.md
trunk/Master/texmf-dist/doc/latex/fodot/fodot-doc.pdf
trunk/Master/texmf-dist/doc/latex/fodot/fodot-doc.tex
trunk/Master/texmf-dist/tex/latex/fodot/
trunk/Master/texmf-dist/tex/latex/fodot/fodot.sty
trunk/Master/tlpkg/tlpsrc/fodot.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/fodot/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fodot/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/fodot/README.md 2025-08-29 21:29:39 UTC (rev 76182)
@@ -0,0 +1,19 @@
+fodot.sty
+
+Copyright 2025 Christian Fleiner
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3c
+of this license or (at your option) any later version.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3c 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(s) of this work is/are Christian Fleiner
+
+This work consists of the files fodot.sty, fodot-doc.tex, and fodot-doc.pdf.
+
+The fodot LaTeX package allows easy construction of DMN decision tables.
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/latex/fodot/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/fodot/fodot-doc.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/fodot/fodot-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fodot/fodot-doc.pdf 2025-08-29 21:28:00 UTC (rev 76181)
+++ trunk/Master/texmf-dist/doc/latex/fodot/fodot-doc.pdf 2025-08-29 21:29:39 UTC (rev 76182)
Property changes on: trunk/Master/texmf-dist/doc/latex/fodot/fodot-doc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/fodot/fodot-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fodot/fodot-doc.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/fodot/fodot-doc.tex 2025-08-29 21:29:39 UTC (rev 76182)
@@ -0,0 +1,330 @@
+\documentclass{article}
+
+\usepackage{hyperref}
+\usepackage{fodot}
+
+\newcommand{\pkg}[1]{\texttt{#1}}
+
+\begin{document}
+
+\title{The package \pkg{fodot}\thanks{This document corresponds to the
+version 0.0.1 of \pkg{fodot}, at the date of 2025/08/29.}}
+\author{Christian Fleiner \\ \texttt{christian.fleiner at kuleuven.be}}
+
+\maketitle
+
+\begin{abstract}
+The package \pkg{fodot} provides helpful commands to work with the \fodot language in \LaTeX including syntax highlighting in listings.
+\end{abstract}
+
+
+\section{Contributing}
+Contributions are always welcome. The project is hosted at \url{https://gitlab.com/EAVISE/CFL/fodot-latex}.
+
+\section{Description}
+In the following, the capabilities of the package are described and illustrated. The \fodot language itself is not introduced. \fodot\footnote{\url{https://docs.idp-z3.be/en/stable/introduction.html}} is the technical implementation of \fodott\footnote{\url{https://fo-dot.readthedocs.io/en/latest/FO-dot.html}} used in the reasoning engine IDP-Z3\footnote{\url{https://idp-z3.be/}}. Please refer to the official documentation to learn more.
+
+\subsection{Commands}
+The following commands are currently supported:
+\begin{enumerate}
+ \item Type \verb|\fodot| for: \fodot. \textit{(partial implementation of \fodott)}
+ \item Type \verb|\fodott| for: \fodott. \textit{(formal knowledge representation language)}
+\end{enumerate}
+
+
+\subsection{FODOT Syntax Highlighting}
+
+There are two styles to highlight \fodot code in listings.
+\fodot code must be always copied in ASCII format.
+\texttt{fodot} replaces operators with their UTF-8 symbol.
+\texttt{fodotASCII} keeps the ASCII representations.
+
+There are a few bugs that require workarounds:
+\begin{itemize}
+ \item \verb|*| is somehow not recognized. Replace \verb|*| with \texttt{TIMES} in listing.
+ \item \verb|=<| is highlighted but not replaced (while \verb|<=| would work). Instead, replace \verb|=<| with \verb|=<| in listing (not relevant for \texttt{fodotASCII})
+\end{itemize}
+
+The syntax highlighter does not support patterns to highlight URLs.
+
+See the following templates for each style:
+\begin{quote}
+ \verb|\begin{lstlisting}[style=fodot]| \\
+ \ldots \\
+ \verb|\end{lstlisting}|
+\end{quote}
+
+\begin{quote}
+ \verb|\begin{lstlisting}[style=fodotASCII]| \\
+ \ldots \\
+ \verb|\end{lstlisting}|
+\end{quote}
+
+\subsubsection{Examples: Fodot Style}
+\textbf{Code snippet A}
+\begin{lstlisting}[style=fodot]
+vocabulary {
+ // this is a single-line comment
+ type Method := {Nail, Glue, Screw}
+ type Wall := {Brick, Wood, Tile}
+ [this is an annotation]
+ type Difficulty := {1..3}
+
+ /*
+ this is a block comment
+ */
+ wall : () -> Wall
+ method: () -> Method
+ hole : () -> Bool
+ weight: () -> Int
+ difficulty : () -> Difficulty
+}
+theory {
+ weight() > 0.
+ method() = Nail => weight() =< 25.
+ method() = Screw => weight() =< 40.
+ method() = Glue => weight() =< 15.
+
+ hole() <=> method() = Nail | method() = Screw.
+ wall() = Tile => ~hole().
+
+ { difficulty() = 1 <- method() = Glue.
+ difficulty() = 2 <- method() = Nail.
+ difficulty() = 3 <- method() = Screw.}
+}
+display {
+ view() = expanded.
+}
+
+\end{lstlisting}
+\newpage
+\textbf{Code Snippet B}
+\begin{lstlisting}[style=fodot]
+ at prefix we: <http://www.example.org/whatever#>.
+ vocabulary V {
+ @prefix se: <http://www.example.org/somethingelse#_url>.
+ type T
+ type T := {c1, c2, c3}
+ type T := constructed from {c1, c2(T1, f:T2)}
+ type T := {1,2,3} <: Int
+ type T := {1..3} <: Int
+ type we::T
+ type <http://www.example.org/foo#Type>
+
+ p : () -> Bool
+ p1, p2 : T1 TIMES T2 -> Bool
+ f: total T -> T
+ f: T * T -> T (domain: p, codomain: q)
+ f: partial TTIMEST -> T
+ f1, f2: Concept[T1->T2] -> T
+
+ [this is the intended meaning of p]
+ p : () -> Bool
+
+ var x in T
+ import W
+ }
+
+ theory T:V {
+ (~p1()&p2() | p3() => p4() <=> p5()) <= p6().
+ p(f1(f2())).
+ f1() < f2() =< f3() = f4() >= f5() > f6().
+ f() ~= c.
+ !x,y in T: p(x,y).
+ !x in p, (y,z) in q: q(x,x) | p(y) | p(z).
+ ?x in Concept[()->Bool]: $(x)().
+ ?x: p(x). # if var x declared in voc
+ ?>1 x in T: p(x).
+
+ f() in {1,2,3}.
+ f() = #{xinT: p(x)}.
+ f() = min{ f(x) | x in T: p(x) }.
+ f() = sum{{ f(x) | x in T: p(x) }}.
+ if p1() then p2() else p3().
+ f1() = if p() then f2() else f3().
+
+ p := {1,2,3}.
+ p(#2020-01-01) is enumerated.
+ p(#TODAY) is not enumerated.
+
+ { p(1). }
+ { (co-induction)
+ !xinT: p1(x) <- p2(x).
+ f(1)=1.
+ !x: f(x)=1 <- p(x).
+ !x: f(x):=1 <- p(x).
+ }
+
+ [this is the intended meaning of the rule]
+ p().
+ }
+
+ structure S:V {
+ p := false.
+ p := {1,2,3}.
+ p := {0..9, 100}.
+ p := {#2021-01-01}.
+ p := {(1,2), (3,4)}.
+ p := {
+ 1 2
+ 3 4
+ }.
+
+ f := 1.
+ f := {->1} .
+ f := {1->1, 2->2}.
+ f := {(1,2)->3} else 2.
+ f :> {(1,2)->3}.
+ }
+
+ display {
+ goal_symbol := {`p1, `p2}.
+ hide(`p).
+ expand := {`p}.
+ view() = expanded.
+ optionalPropagation().
+ }
+
+ procedure main() {
+ pretty_print(model_check (T,S))
+ pretty_print(model_expand (T,S))
+ pretty_print(model_propagate(T,S))
+ pretty_print(minimize(T,S, term="cost()"))
+ }
+\end{lstlisting}
+\newpage
+\subsubsection{Examples: FodotASCII Style}
+\textbf{Code Snippet A}
+\begin{lstlisting}[style=fodotASCII]
+vocabulary {
+ // this is a single-line comment
+ type Method := {Nail, Glue, Screw}
+ type Wall := {Brick, Wood, Tile}
+ [this is an annotation]
+ type Difficulty := {1..3}
+
+ /*
+ this is a block comment
+ */
+ wall : () -> Wall
+ method: () -> Method
+ hole : () -> Bool
+ weight: () -> Int
+ difficulty : () -> Difficulty
+}
+theory {
+ weight() > 0.
+ method() = Nail => weight() =< 25.
+ method() = Screw => weight() =< 40.
+ method() = Glue => weight() =< 15.
+
+ hole() <=> method() = Nail | method() = Screw.
+ wall() = Tile => ~hole().
+
+ { difficulty() = 1 <- method() = Glue.
+ difficulty() = 2 <- method() = Nail.
+ difficulty() = 3 <- method() = Screw.}
+}
+display {
+ view() = expanded.
+}
+
+\end{lstlisting}
+\newpage
+\textbf{Code Snippet B}
+\begin{lstlisting}[style=fodotASCII]
+
+ at prefix we: <http://www.example.org/whatever#>.
+ vocabulary V {
+ @prefix se: <http://www.example.org/somethingelse#_url>.
+ type T
+ type T := {c1, c2, c3}
+ type T := constructed from {c1, c2(T1, f:T2)}
+ type T := {1,2,3} <: Int
+ type T := {1..3} <: Int
+ type we::T
+ type <http://www.example.org/foo#Type>
+
+ p : () -> Bool
+ p1, p2 : T1 TIMES T2 -> Bool
+ f: total T -> T
+ f: T * T -> T (domain: p, codomain: q)
+ f: partial TTIMEST -> T
+ f1, f2: Concept[T1->T2] -> T
+
+ [this is the intended meaning of p]
+ p : () -> Bool
+
+ var x in T
+ import W
+ }
+
+ theory T:V {
+ (~p1()&p2() | p3() => p4() <=> p5()) <= p6().
+ p(f1(f2())).
+ f1() < f2() =< f3() = f4() >= f5() > f6().
+ f() ~= c.
+ !x,y in T: p(x,y).
+ !x in p, (y,z) in q: q(x,x) | p(y) | p(z).
+ ?x in Concept[()->Bool]: $(x)().
+ ?x: p(x). # if var x declared in voc
+ ?>1 x in T: p(x).
+
+ f() in {1,2,3}.
+ f() = #{xinT: p(x)}.
+ f() = min{ f(x) | x in T: p(x) }.
+ f() = sum{{ f(x) | x in T: p(x) }}.
+ if p1() then p2() else p3().
+ f1() = if p() then f2() else f3().
+
+ p := {1,2,3}.
+ p(#2020-01-01) is enumerated.
+ p(#TODAY) is not enumerated.
+
+ { p(1). }
+ { (co-induction)
+ !xinT: p1(x) <- p2(x).
+ f(1)=1.
+ !x: f(x)=1 <- p(x).
+ !x: f(x):=1 <- p(x).
+ }
+
+ [this is the intended meaning of the rule]
+ p().
+ }
+
+ structure S:V {
+ p := false.
+ p := {1,2,3}.
+ p := {0..9, 100}.
+ p := {#2021-01-01}.
+ p := {(1,2), (3,4)}.
+ p := {
+ 1 2
+ 3 4
+ }.
+
+ f := 1.
+ f := {->1} .
+ f := {1->1, 2->2}.
+ f := {(1,2)->3} else 2.
+ f :> {(1,2)->3}.
+ }
+
+ display {
+ goal_symbol := {`p1, `p2}.
+ hide(`p).
+ expand := {`p}.
+ view() = expanded.
+ optionalPropagation().
+ }
+
+ procedure main() {
+ pretty_print(model_check (T,S))
+ pretty_print(model_expand (T,S))
+ pretty_print(model_propagate(T,S))
+ pretty_print(minimize(T,S, term="cost()"))
+ }
+\end{lstlisting}
+
+\end{document}
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/latex/fodot/fodot-doc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/fodot/fodot.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fodot/fodot.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/fodot/fodot.sty 2025-08-29 21:29:39 UTC (rev 76182)
@@ -0,0 +1,156 @@
+\ProvidesPackage{fodot}
+
+\usepackage{listings}
+\usepackage{xcolor}
+\usepackage{amssymb}
+\usepackage{xspace}
+
+
+\newcommand{\fodot}{FO($\cdot$)\xspace}
+\newcommand{\fodott}{FO[$\cdot$]\xspace}
+
+\definecolor{block}{rgb}{0.2, 0.0, 0.667}
+\definecolor{builtin}{rgb}{0.667, 0.0, 0.133}
+\definecolor{annotation}{rgb}{0.0, 0.133, 0.667}
+\definecolor{controls}{rgb}{0.525, 0.231, 0.0}
+
+\definecolor{darkgreen}{rgb}{0.0, 0.5, 0.0}
+\definecolor{violet}{rgb}{0.5, 0.2, 1.0}
+
+\lstdefinelanguage{fodot}{
+ morekeywords={vocabulary, theory, structure, procedure, display}, % blocks
+ morekeywords=[2]{Bool, Int, Date, Real, Concept, true, false}, % types
+ % morekeywords=[3]{\~, !, ?, =, \~=, \>=, =\<, :=, \<:, :\>, -\>, \<-, =\>, \<, \>, \<=\>, \*, in, not in, \|, \&}, %operators , doesnt seem to work, instead see literate environment
+ morekeywords=[4]{type, total, partial, domain, codomain, constructed, from, declared, @prefix, import, var, if, then, else}, %controls and more
+ morekeywords=[5]{min, max, sum, abs}, % built-in functions
+ sensitive=true, % case sensitivity
+ morecomment=[l]{//}, % line comment
+ morecomment=[s]{/*}{*/}, % block comment
+ morecomment=[s]{[}{]}, % block comment
+ morestring=[b]", % string delimiter
+ morestring=[b]',
+ morestring=[s]{'''}{'''},
+ morestring=[s]{"""}{"""},
+ % morestring=[s]{<http}{>}, % uncomment, if url highliting is desired
+ morestring=[s]{[}{]}, % comment, if Concepts with [] are used
+ literate=
+ % datatype replacements
+ {Bool}{{\textcolor{red}{$\mathbb{B}$}}}1
+ {Int}{{\textcolor{red}{$\mathbb{Z}$}}}1
+ {Real}{{\textcolor{red}{$\mathbb{R}$}}}1
+ % operator replacements / comment if url should be highlighted instead
+ {|}{{\textcolor{red}{$\lor$}}}1
+ {&}{{\textcolor{red}{$\land$}}}1
+ {:}{{\textcolor{red}:}}1
+ {<}{{\textcolor{red}<}}1
+ {>}{{\textcolor{red}>}}1
+ {!}{{\textcolor{red}{$\forall$}}}1
+ {?}{{\textcolor{red}{$\exists$}}}1
+ {~}{{\textcolor{red}{$\neg$}}}1
+ {~=}{{\textcolor{red}{$\neq$}}}2
+ {>=}{{\textcolor{red}{$\geq$}}}1
+ % {=<}{{\textcolor{red}{$\leq$}}}1 % doesnt seem to work, see special replacement =<
+ {:=}{{\textcolor{red}{$\triangleq$}}}2
+ {<:}{{\textcolor{red}{$\subseteq$}}}2
+ {:>}{{\textcolor{red}{$\supseteq$}}}2
+ {<-}{{\textcolor{red}{$\leftarrow$}}}2
+ {->}{{\textcolor{red}{$\rightarrow$}}}2
+ {=}{{\textcolor{red}{=}}}1
+ {=>}{{\textcolor{red}{$\Rightarrow$}}}2
+ {<=}{{\textcolor{red}{$\Leftarrow$}}}2
+ {<=>}{{\textcolor{red}{$\Leftrightarrow$}}}3
+ % special replacements
+ {=<}{{\textcolor{red}{$\leq$}}}1
+ {\#}{{{\textcolor{violet}{\#}}}}1 % # does not seem to work as keyword
+ {TIMES}{{{\textcolor{red}{$\times$}}}}1 % * does not seem to work as keyword or literal to replace
+}
+
+
+\lstdefinelanguage{fodotASCII}{
+ morekeywords={vocabulary, theory, structure, procedure, display}, % blocks
+ morekeywords=[2]{Bool, Int, Date, Real, Concept, true, false}, % types
+ morekeywords=[3]{\~, !, ?, =, \~=, \>=, =\<, :=, \<:, :\>, -\>, \<-, =\>, \<, \>, \<=\>, \*, in, not in, \|, \&}, %operators , doesnt seem to work, instead see literate environment
+ morekeywords=[4]{type, total, partial, domain, codomain, constructed, from, declared, @prefix, import, var, if, then, else}, %controls and more
+ morekeywords=[5]{min, max, sum, abs}, % built-in functions
+ sensitive=true, % case sensitivity
+ morecomment=[l]{//}, % line comment
+ morecomment=[s]{/*}{*/}, % block comment
+ morecomment=[s]{[}{]}, % block comment
+ morestring=[b]", % string delimiter
+ morestring=[b]',
+ morestring=[s]{'''}{'''},
+ morestring=[s]{"""}{"""},
+ % morestring=[s]{<http}{>}, % uncomment, if url highliting is desired
+ morestring=[s]{[}{]}, % comment, if Concepts with [] are used
+ literate=
+ % % operator replacements / comment if url should be highlighted instead
+ {|}{{\textcolor{red}{|}}}1
+ {\&}{{\textcolor{red}{\&}}}1
+ {:}{{\textcolor{red}:}}1
+ {<}{{\textcolor{red}<}}1
+ {>}{{\textcolor{red}>}}1
+ {!}{{\textcolor{red}{!}}}1
+ {?}{{\textcolor{red}{?}}}1
+ {~}{{\textcolor{red}{$\sim$}}}1
+ {~=}{{\textcolor{red}{$\sim=$}}}2
+ {>=}{{\textcolor{red}{>=}}}1
+ {=<}{{\textcolor{red}{=<}}}1
+ {:=}{{\textcolor{red}{:=}}}2
+ {<:}{{\textcolor{red}{<:}}}2
+ {:>}{{\textcolor{red}{:>}}}2
+ {<-}{{\textcolor{red}{<-}}}2
+ {->}{{\textcolor{red}{->}}}2
+ {=}{{\textcolor{red}{=}}}1
+ {=>}{{\textcolor{red}{=>}}}2
+ {<=}{{\textcolor{red}{<=}}}2
+ {<=>}{{\textcolor{red}{<=>}}}3
+ % % special replacements
+ {\#}{{{\textcolor{violet}{\#}}}}1 % # does not seem to work as keyword
+ {TIMES}{{{\textcolor{red}{$\times$}}}}1 % * does not seem to work as keyword or literal to replace
+}
+
+
+
+% % Setup listings
+\lstdefinestyle{fodot}{
+ language=fodot,
+ basicstyle=\ttfamily\small,
+ commentstyle=\color{darkgreen}\itshape,
+ keywordstyle=\color{block}\bfseries,
+ keywordstyle=[2]\color{builtin}\bfseries,
+ keywordstyle=[3]\color{red}\bfseries,
+ keywordstyle=[4]\color{controls}\bfseries,
+ keywordstyle=[5]\color{violet}\bfseries,
+ stringstyle=\color{annotation},
+ showstringspaces=false,
+ breaklines=true,
+ numberstyle=\tiny\color{gray},
+ numbers=left,
+ stepnumber=1,
+ numbersep=5pt,
+ backgroundcolor=\color{white},
+}
+
+
+
+% Setup listings
+\lstdefinestyle{fodotASCII}{
+ language=fodotASCII,
+ basicstyle=\ttfamily\small,
+ commentstyle=\color{darkgreen}\itshape,
+ keywordstyle=\color{block}\bfseries,
+ keywordstyle=[2]\color{builtin}\bfseries,
+ keywordstyle=[3]\color{red}\bfseries,
+ keywordstyle=[4]\color{controls}\bfseries,
+ keywordstyle=[5]\color{violet}\bfseries,
+ stringstyle=\color{annotation},
+ showstringspaces=false,
+ breaklines=true,
+ numberstyle=\tiny\color{gray},
+ numbers=left,
+ stepnumber=1,
+ numbersep=5pt,
+ backgroundcolor=\color{white},
+}
+
+\endinput
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/tex/latex/fodot/fodot.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2025-08-29 21:28:00 UTC (rev 76181)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2025-08-29 21:29:39 UTC (rev 76182)
@@ -364,7 +364,7 @@
flowchart flowfram fltpoint
fmp fmtcount
fn2end fnbreak fncychap fncylab fnpara fnpct fnspe fntproof fnumprint
- foekfont foilhtml foliono fonetika
+ fodot foekfont foilhtml foliono fonetika
font-change font-change-xetex
fontawesome fontawesome5 fontawesome6 fontawesome7 fontawesomescaled
fontaxes fontbook fontch fontinst
Modified: trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc 2025-08-29 21:28:00 UTC (rev 76181)
+++ trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc 2025-08-29 21:29:39 UTC (rev 76182)
@@ -111,6 +111,7 @@
depend fixdif
depend fixmath
depend fnspe
+depend fodot
depend formal-grammar
depend fouridx
depend freealign
Added: trunk/Master/tlpkg/tlpsrc/fodot.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list.