Org-mode mailing list
 help / color / mirror / Atom feed
From: Timothy <>
Subject: [PATCH] org-cite: prevent ' from being an active char in LaTeX export
Date: Mon, 23 Aug 2021 18:27:59 +0800
Message-ID: <> (raw)

[-- Attachment #1: Type: text/plain, Size: 750 bytes --]

Hi All,

This is a band-aid over the issue raised in

      I’ve come across an issue with the `hanging’ package we’re currently using for
      LaTeX exports — it also affects punctuation, and makes `,.’“`?!:;’ active
      characters throughout the entire document. That means a LaTeX snippet like:
      f’(x) Will now fail to compile ☹. See…

By just adding the [notquote] option, ’ is no longer an active char, and so
f’(x) no longer breaks documents. Long-term, I still think that getting rid of
all this active char stuff would be a good idea, by switching out hanging for
use of `\parshape' if possible.

All the best,

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-oc-csl-Prevent-from-being-a-LaTeX-active-char.patch --]
[-- Type: text/x-patch, Size: 1358 bytes --]

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"))))

             reply	other threads:[~2021-08-23 10:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23 10:27 Timothy [this message]
2021-08-26  8:24 ` Timothy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ \
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:

AGPL code for this site: git clone