From 70e308f2f9673cdf13bb42be4ad9b68265c02df1 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 12 Jan 2013 10:21:19 -0800 Subject: Escape `|` as `\vert` in LaTeX math. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids a clash with highlighting-kate's macros, which redefine | as a short verbatim delimiter. Thanks to Björn Peemöller for raising this issue. --- tests/Tests/Writers/LaTeX.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/Tests/Writers/LaTeX.hs b/tests/Tests/Writers/LaTeX.hs index 16e0c3f23..33d6ecc78 100644 --- a/tests/Tests/Writers/LaTeX.hs +++ b/tests/Tests/Writers/LaTeX.hs @@ -32,4 +32,8 @@ tests = [ testGroup "code blocks" [ "in footnotes" =: note (para "hi" <> codeBlock "hi") =?> "\\footnote{hi\n\n\\begin{Verbatim}\nhi\n\\end{Verbatim}\n}" ] + , testGroup "math" + [ "escape |" =: para (math "\\sigma|_{\\{x\\}}") =?> + "$\\sigma\\vert _{\\{x\\}}$" + ] ] -- cgit v1.2.3