mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-15 17:00:45 +00:00
Fix problems with internal links for LateX export.
This commit is contained in:
parent
1e3198b821
commit
5b6a8a55e8
@ -1,3 +1,15 @@
|
||||
2008-10-10 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* org-export-latex.el (org-export-latex-subcontent): Add labels to
|
||||
sections, to make internal links work.
|
||||
(org-export-latex-fontify-headline): Do not remove all text
|
||||
properties, to make sure that target properties survive this
|
||||
process.
|
||||
|
||||
* org-exp.el (org-export-preprocess-string): Change sequence of
|
||||
modifications, to make sure links are prepared before the LaTeX
|
||||
conversions do happen.
|
||||
|
||||
2008-10-09 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* org-attach.el (org-attach-delete-all): Renamed from
|
||||
|
@ -1457,10 +1457,6 @@ on this string to produce the exported version."
|
||||
(org-export-remove-comment-blocks-and-subtrees)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;; Find matches for radio targets and turn them into internal links
|
||||
(org-export-mark-radio-links)
|
||||
|
||||
@ -1481,15 +1477,6 @@ on this string to produce the exported version."
|
||||
(org-export-concatenate-multiline-emphasis))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;; Remove special table lines
|
||||
(when org-export-table-remove-special-lines
|
||||
(org-export-remove-special-table-lines))
|
||||
|
@ -543,31 +543,36 @@ and its content."
|
||||
(defun org-export-latex-subcontent (subcontent num)
|
||||
"Export each cell of SUBCONTENT to LaTeX.
|
||||
If NUM, export sections as numerical sections."
|
||||
(let ((heading (org-export-latex-fontify-headline
|
||||
(cdr (assoc 'heading subcontent))))
|
||||
(level (- (cdr (assoc 'level subcontent))
|
||||
org-export-latex-add-level))
|
||||
(occur (number-to-string (cdr (assoc 'occur subcontent))))
|
||||
(content (cdr (assoc 'content subcontent)))
|
||||
(subcontent (cadr (assoc 'subcontent subcontent))))
|
||||
(let* ((heading (org-export-latex-fontify-headline
|
||||
(cdr (assoc 'heading subcontent))))
|
||||
(level (- (cdr (assoc 'level subcontent))
|
||||
org-export-latex-add-level))
|
||||
(occur (number-to-string (cdr (assoc 'occur subcontent))))
|
||||
(content (cdr (assoc 'content subcontent)))
|
||||
(subcontent (cadr (assoc 'subcontent subcontent)))
|
||||
(label (org-get-text-property-any 0 'target heading)))
|
||||
(cond
|
||||
;; Normal conversion
|
||||
((<= level org-export-latex-sectioning-depth)
|
||||
(let ((sec (nth (1- level) org-export-latex-sectioning)))
|
||||
(insert (format (if num (car sec) (cdr sec)) heading) "\n"))
|
||||
(when label (insert (format "\\label{%s}\n" label)))
|
||||
(insert (org-export-latex-content content))
|
||||
(cond ((stringp subcontent) (insert subcontent))
|
||||
((listp subcontent) (org-export-latex-sub subcontent))))
|
||||
;; At a level under the hl option: we can drop this subsection
|
||||
((> level org-export-latex-sectioning-depth)
|
||||
(cond ((eq org-export-latex-low-levels 'description)
|
||||
(insert (format "\\begin{description}\n\n\\item[%s]\n\n" heading))
|
||||
(insert (format "\\begin{description}\n\n\\item[%s]%s\n\n"
|
||||
heading
|
||||
(if label (format "\\label{%s}" label) "")))
|
||||
(insert (org-export-latex-content content))
|
||||
(cond ((stringp subcontent) (insert subcontent))
|
||||
((listp subcontent) (org-export-latex-sub subcontent)))
|
||||
(insert "\\end{description}\n"))
|
||||
((stringp org-export-latex-low-levels)
|
||||
(insert (format org-export-latex-low-levels heading) "\n")
|
||||
(when label (insert (format "\\label{%s}\n" label)))
|
||||
(insert (org-export-latex-content content))
|
||||
(cond ((stringp subcontent) (insert subcontent))
|
||||
((listp subcontent) (org-export-latex-sub subcontent)))))))))
|
||||
@ -767,7 +772,8 @@ links, keywords, lists, tables, fixed-width"
|
||||
(org-export-latex-special-chars
|
||||
(plist-get org-export-latex-options-plist :sub-superscript))
|
||||
(org-export-latex-links)
|
||||
(org-trim (buffer-substring-no-properties (point-min) (point-max)))))
|
||||
; (org-trim (buffer-substring-no-properties (point-min) (point-max)))))
|
||||
(org-trim (buffer-string))))
|
||||
|
||||
(defun org-export-latex-quotation-marks ()
|
||||
"Export quotation marks depending on language conventions."
|
||||
@ -1071,6 +1077,9 @@ If TIMESTAMPS, convert timestamps, otherwise delete them."
|
||||
(expand-file-name raw-path))))
|
||||
(radiop (insert (format "\\hyperref[%s]{%s}"
|
||||
(org-solidify-link-text raw-path) desc)))
|
||||
((not type)
|
||||
(insert (format "\\hyperref[%s]{%s}"
|
||||
(org-solidify-link-text raw-path) desc)))
|
||||
(path (insert (format "\\href{%s}{%s}" path desc)))
|
||||
(t (insert "\\texttt{" desc "}")))))))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user