Hi, Thanks for comments.
Nicolas Goaziou <m...@nicolasgoaziou.fr> writes: >> Though perhaps there’s a more efficient way to get the first >> footnote-reference to a given definition than trawling through with >> org-export--footnote-reference-map. > > Couldn't you refer to the definition instead of the first reference ? > There is a function grabbing it and it is unique for a given label. > Also, not that `org-export-get-footnote-definition' doesn't return the > definition itself, only its contents. Therefore the reference are > different and there is no possible ambiguity. Yeah that's much better. Thanks! >> + (format "\\footnote{%s%s}" (org-trim (org-export-data def info)) >> + (if (catch 'exit >> + (org-export--footnote-reference-map >> + (lambda (f) >> + (let ((l (org-element-property :label f))) >> + (when (and l label >> + (not (eq f footnote-reference)) >> + (string= label l)) >> + (throw 'exit t)))) >> + (plist-get info :parse-tree) info)) >> + (org-latex--label footnote-reference info t t) >> + "")) > > I'm not sure to understand the logic here. You seem to add a label to > all references sharing a given label but the first one. Intuitively, > I think it should be the opposite. > > Besides, in this branch of the `cond', all footnote references are the > first for their their label. > > Wouldn't it be sufficient to use > > (format "\\footnote{%s%s}" > (org-trim (org-export-data def info)) > (org-latex--label def info t t)) The GOAL is to make "pretty" latex and not clutter every footnote with labels. I think the logic is better now, but it uses the plain org-export-map rather than org-export--footnote-reference-map. I guess that’s anyway more clean and org-export-get-footnote-definition should do the necessary caching. Rasmus -- Governments should be afraid of their people
>From 8b7534d16b611fa4f55df59ce4e2521b5c525cc0 Mon Sep 17 00:00:00 2001 From: Rasmus <ras...@gmx.us> Date: Sun, 22 May 2016 15:10:16 +0200 Subject: [PATCH] ox-html: Find preamble-spec case-insensitively * ox-html.el (org-html--build-pre/postamble): Find the spec based on the language case-insensitively. Note that the default org-html-preamble-format and org-export-default-language are incompatible. --- lisp/ox-html.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index a05fa2d..3d4e5da 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1854,10 +1854,11 @@ communication channel." (format "<p class=\"validation\">%s</p>\n" validation-link)))) (t (format-spec - (or (cadr (assoc + (or (cadr (assoc-string (plist-get info :language) (eval (intern - (format "org-html-%s-format" type))))) + (format "org-html-%s-format" type))) + t)) (cadr (assoc "en" -- 2.8.2