Merge branch 'maint'
This commit is contained in:
commit
4788a58e71
|
@ -1323,20 +1323,6 @@ CONTENTS is nil. INFO is a plist holding contextual information."
|
||||||
(when (eq (org-element-type prev) 'footnote-reference)
|
(when (eq (org-element-type prev) 'footnote-reference)
|
||||||
org-latex-footnote-separator))
|
org-latex-footnote-separator))
|
||||||
(cond
|
(cond
|
||||||
;; Use \footnotemark if reference is within an item's tag.
|
|
||||||
((eq (org-element-type (org-export-get-parent-element footnote-reference))
|
|
||||||
'item)
|
|
||||||
(if (org-export-footnote-first-reference-p footnote-reference info)
|
|
||||||
"\\footnotemark"
|
|
||||||
;; Since we can't specify footnote number as an optional
|
|
||||||
;; argument within an item tag, some extra work has to be done
|
|
||||||
;; when the footnote has already been referenced. In that
|
|
||||||
;; case, set footnote counter to the desired number, use the
|
|
||||||
;; footnotemark, then set counter back to its original value.
|
|
||||||
(format
|
|
||||||
"\\setcounter{footnote}{%s}\\footnotemark\\setcounter{footnote}{%s}"
|
|
||||||
(1- (org-export-get-footnote-number footnote-reference info))
|
|
||||||
(org-latex--get-footnote-counter footnote-reference info))))
|
|
||||||
;; Use \footnotemark if the footnote has already been defined.
|
;; Use \footnotemark if the footnote has already been defined.
|
||||||
((not (org-export-footnote-first-reference-p footnote-reference info))
|
((not (org-export-footnote-first-reference-p footnote-reference info))
|
||||||
(format "\\footnotemark[%s]{}"
|
(format "\\footnotemark[%s]{}"
|
||||||
|
@ -1610,7 +1596,7 @@ contextual information."
|
||||||
(trans "$\\boxminus$ ")))
|
(trans "$\\boxminus$ ")))
|
||||||
(tag (let ((tag (org-element-property :tag item)))
|
(tag (let ((tag (org-element-property :tag item)))
|
||||||
;; Check-boxes must belong to the tag.
|
;; Check-boxes must belong to the tag.
|
||||||
(and tag (format "[%s] "
|
(and tag (format "[{%s}] "
|
||||||
(concat checkbox
|
(concat checkbox
|
||||||
(org-export-data tag info)))))))
|
(org-export-data tag info)))))))
|
||||||
(concat counter "\\item" (or tag (concat " " checkbox))
|
(concat counter "\\item" (or tag (concat " " checkbox))
|
||||||
|
|
|
@ -4050,7 +4050,8 @@ significant."
|
||||||
(let ((foundp (funcall find-headline path parent)))
|
(let ((foundp (funcall find-headline path parent)))
|
||||||
(when foundp (throw 'exit foundp))))
|
(when foundp (throw 'exit foundp))))
|
||||||
(let ((parent-hl (org-export-get-parent-headline link)))
|
(let ((parent-hl (org-export-get-parent-headline link)))
|
||||||
(cons parent-hl (org-export-get-genealogy parent-hl))))
|
(if (not parent-hl) (list (plist-get info :parse-tree))
|
||||||
|
(cons parent-hl (org-export-get-genealogy parent-hl)))))
|
||||||
;; No destination found: return nil.
|
;; No destination found: return nil.
|
||||||
(and (not match-title-p) (puthash path nil link-cache))))))))
|
(and (not match-title-p) (puthash path nil link-cache))))))))
|
||||||
|
|
||||||
|
|
|
@ -1642,7 +1642,14 @@ Another text. (ref:text)
|
||||||
(should-not
|
(should-not
|
||||||
(org-test-with-parsed-data "[[target]]"
|
(org-test-with-parsed-data "[[target]]"
|
||||||
(org-export-resolve-fuzzy-link
|
(org-export-resolve-fuzzy-link
|
||||||
(org-element-map tree 'link 'identity info t) info))))
|
(org-element-map tree 'link 'identity info t) info)))
|
||||||
|
;; Match fuzzy link even when before first headline.
|
||||||
|
(should
|
||||||
|
(eq 'headline
|
||||||
|
(org-test-with-parsed-data "[[hl]]\n* hl"
|
||||||
|
(org-element-type
|
||||||
|
(org-export-resolve-fuzzy-link
|
||||||
|
(org-element-map tree 'link 'identity info t) info))))))
|
||||||
|
|
||||||
(ert-deftest test-org-export/resolve-id-link ()
|
(ert-deftest test-org-export/resolve-id-link ()
|
||||||
"Test `org-export-resolve-id-link' specifications."
|
"Test `org-export-resolve-id-link' specifications."
|
||||||
|
|
Loading…
Reference in New Issue