fix latex escaping

* src/ltlvisit/print.cc: Property output the double
quotes in latex mode, not only sclatex.
* src/misc/escape.cc: Fix LaTeX escape to work in math mode.
* src/tests/latex.test: Add a test.
* wrap/python/tests/formulas.ipynb: Adjust expected output
* NEWS: Mention the fix.
This commit is contained in:
Alexandre Duret-Lutz 2015-08-13 17:25:00 +02:00
parent 21ff2d0415
commit 2eab0344b9
5 changed files with 14 additions and 9 deletions

View file

@ -416,8 +416,8 @@ namespace spot
{
// Spin 6 supports atomic propositions such as (a == 0)
// as long as they are enclosed in parentheses.
if (kw_ == sclatex_kw || kw_ == sclatex_kw)
escape_latex(os_ << "``\\mathit{", str) << "\\textrm{''}}";
if (kw_ == sclatex_kw || kw_ == latex_kw)
escape_latex(os_ << "``\\mathit{", str) << "}\\textrm{''}";
else if (kw_ != spin_kw)
os_ << '"' << str << '"';
else if (!full_parent_)