From c67332f8250010bd5ea19b3927561fd87d77e91c Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Mon, 9 Dec 2024 12:09:15 +0100 Subject: [PATCH] Fix LaTeX rendering of strong next Fix #597. * spot/tl/print.cc: Fix rendering of X[!]. * doc/tl/spotltl.sty: Add a \StrongX definition. * tests/core/latex.test: Add a test case. * NEWS: Mention the issue. --- NEWS | 3 +++ doc/tl/spotltl.sty | 1 + spot/tl/print.cc | 4 ++-- tests/core/latex.test | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 0afe8a878..e0aba4488 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ New in spot 2.12.1.dev (not yet released) - to_finite() was dealing incorrectly with edges that were both alive and dead. (Issue #596.) + - LaTeX output of the X[!] operator with broken in both + LaTeX and self-contained LaTeX mode. (Issue #597) + New in spot 2.12.1 (2024-09-23) Bug fixes: diff --git a/doc/tl/spotltl.sty b/doc/tl/spotltl.sty index b8178ee6b..e4b612b20 100644 --- a/doc/tl/spotltl.sty +++ b/doc/tl/spotltl.sty @@ -12,6 +12,7 @@ \newcommand{\F}{\mathsf{F}} % eventually \newcommand{\G}{\mathsf{G}} % always \newcommand{\X}{\mathsf{X}} % next +\newcommand{\StrongX}{\mathsf{X^{[!]}}} % strong next % The \mathbin tells TeX to adjust spacing for binary operators \newcommand{\M}{\mathbin{\mathsf{M}}} % strong release \newcommand{\R}{\mathbin{\mathsf{R}}} % release diff --git a/spot/tl/print.cc b/spot/tl/print.cc index ef998ba86..bb5c5c068 100644 --- a/spot/tl/print.cc +++ b/spot/tl/print.cc @@ -273,7 +273,7 @@ namespace spot "\\SereEqual{", "\\SereGoto{", "\\FirstMatch", - "\\StrongX", + "\\StrongX ", }; const char* sclatex_kw[] = { @@ -318,7 +318,7 @@ namespace spot "^{=", "^{\\to", "\\mathsf{first\\_match}", - "\\textcircled{\\mathsf{X}}", + "\\mathsf{X^{[!]}}", }; static bool diff --git a/tests/core/latex.test b/tests/core/latex.test index 4101e25bb..c2218b4d3 100755 --- a/tests/core/latex.test +++ b/tests/core/latex.test @@ -37,6 +37,7 @@ a U b W c R (d & e) M f {a*;(b;c)[:*3..4];(c;d)[:+];d}! G(uglyname->Fuglierlongname42) "#foo/$bar$" U "baz~yes^no" +X[!]XX[!]a | G[2:4!]b EOF (