On Thursday, January 9, 2014 10:13:32 AM HKT, James Harkins wrote:
OK, I'll work around it on my side.
Continuing... I've tried to write a filter for this, but I'm stuck on
choosing strings based on the backend name.
(cdr (assoc
(org-export-backend-name backend)
'((latex . "\"\\footnote") (html . "\"<sup><a"))))
Apparently org-export-backend-name returns neither a symbol nor a string.
What does it return? Or, what is the right way to look up a value based on
the backend name?
hjh
(defun hjh-quote-before-footnote (contents backend info)
"Convert '\"[fn' to the appropriate closing quote per backend."
(when (and (and
(org-export-derived-backend-p backend 'latex 'html)
(plist-get info :with-smart-quotes))
(let ((teststring
(cdr (assoc
(org-export-backend-name backend)
'((latex . "\"\\footnote") (html . "\"<sup><a"))))))
(string-match teststring contents)))
(let ((replacements '((latex . "''[fn") (html . "”[fn")))
(replacement (assoc (org-export-backend-name backend) replacements)))
(replace-match (cdr replacement) nil nil contents))))