From ce2441a8452797318d9b98aa5e8f316586fc190c Mon Sep 17 00:00:00 2001 From: mmatera Date: Sun, 9 May 2021 19:56:07 -0300 Subject: [PATCH 1/2] fix nand and nor latex symbols --- mathics/doc/doc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mathics/doc/doc.py b/mathics/doc/doc.py index c647d28f51..ce1ae6809f 100644 --- a/mathics/doc/doc.py +++ b/mathics/doc/doc.py @@ -251,8 +251,8 @@ def repl_list(match): text, [ ("$", r"\$"), - ("\u22bc", "nand"), # \barwedge isn't working - ("\u22bd", "nor"), # \vebarr isn't working + ("\u22bc", r"$\not\land$"), + ("\u22bd", r"$\not\lor$"), ("\u03c0", r"$\pi$"), ("\u2265", r"$\ge$"), ("\u2264", r"$\le$"), From 320af624f13596493ddfb8ae3fafc43b27e51086 Mon Sep 17 00:00:00 2001 From: mmatera Date: Sun, 9 May 2021 23:05:48 -0300 Subject: [PATCH 2/2] removing lstinline in latex documentation of operators --- mathics/doc/doc.py | 4 ++-- mathics/doc/tex/mathics.tex | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mathics/doc/doc.py b/mathics/doc/doc.py index ce1ae6809f..a864ddbb47 100644 --- a/mathics/doc/doc.py +++ b/mathics/doc/doc.py @@ -173,7 +173,7 @@ def escape_latex_code(text): text = escape_latex_output(text) escape_char = get_latex_escape_char(text) - return "\\lstinline%s%s%s" % (escape_char, text, escape_char) + return "%s%s%s" % (escape_char, text, escape_char) def escape_latex(text): @@ -216,7 +216,7 @@ def repl(match): text = r"\ " + text[1:] if text.endswith(" "): text = text[:-1] + r"\ " - return "\\code{\\lstinline%s%s%s}" % (escape_char, text, escape_char) + return "\\code{%s%s%s}" % (escape_char, text, escape_char) else: # treat double '' literaly return "''" diff --git a/mathics/doc/tex/mathics.tex b/mathics/doc/tex/mathics.tex index 1c083277df..864141100a 100644 --- a/mathics/doc/tex/mathics.tex +++ b/mathics/doc/tex/mathics.tex @@ -199,7 +199,7 @@ \end{minipage}% } -\newcommand{\code}[1]{\hbadness=10000{\ttfamily #1}} +\newcommand{\code}[1]{\hbadness=10000{#1}} \newcommand{\codevar}[1]{{\rmfamily #1}} \newcommand{\console}[1]{\hbadness=10000{\ttfamily #1}}