aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2022-02-13 08:09:59 +1100
committerJustin Bedo <cu@cua0.org>2022-02-13 08:09:59 +1100
commitb1b65c7a3a864a1607d1be144e5eb186cd78a5cb (patch)
treedc148514caa36734475f63205fac9905995eb653
parent3c265bb513f9c10a106c06e86a01c5b67b680d40 (diff)
Suppress space for single letter commands like \H
-rw-r--r--latexfmt.hs2
1 files changed, 1 insertions, 1 deletions
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'