From b1b65c7a3a864a1607d1be144e5eb186cd78a5cb Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Sun, 13 Feb 2022 08:09:59 +1100 Subject: Suppress space for single letter commands like \H --- latexfmt.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/latexfmt.hs b/latexfmt.hs index b7473ce..1dd6a88 100644 --- a/latexfmt.hs +++ b/latexfmt.hs @@ -25,7 +25,7 @@ toStr (Wrd w) = do else print w when (w == "(") suppress when (T.last w == '.') printnl -toStr (Cmd c) = if T.length c > 0 && isCtrl (T.head c) +toStr (Cmd c) = if T.length c > 0 && isCtrl (T.head c) || T.length c == 1 then print' $ "\\" `T.append` c else do printnl' -- cgit v1.2.3