From ad63eb8f4d7d02c9864d5caded0b4f2ee9f54133 Mon Sep 17 00:00:00 2001 From: TEC Date: Mon, 23 Aug 2021 18:18:33 +0800 Subject: [PATCH] oc-csl: Prevent ' from being a LaTeX active char * lisp/oc-csl.el (org-cite-csl-finalizer): The hanging LaTeX package we're using also affects punctuation and makes `,.'"`?!:;' active characters throughout the entire document. That means a LaTeX snippet like \(f'(x)\) will now make the document fail to compile. See for more information. Adding the [notquote] option stops \(f'(x)\) from being an issue. In time it could be worth looking into replacing the hanging package with some use of \parshape. --- lisp/oc-csl.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/oc-csl.el b/lisp/oc-csl.el index 617bddb7e..36a885641 100644 --- a/lisp/oc-csl.el +++ b/lisp/oc-csl.el @@ -595,7 +595,7 @@ (defun org-cite-csl-finalizer (output _keys _files _style _backend info) (goto-char (match-beginning 0)) (let ((re (rx "\\usepackage" (opt "[" (*? nonl) "]") "{hanging}"))) (unless (re-search-backward re nil t) - (insert "\\usepackage{hanging}\n")))) + (insert "\\usepackage[notquote]{hanging}\n")))) (buffer-string)))) -- 2.32.0