Make hyperref macro customizable

This was a request by Martin G. Skjaeveland
This commit is contained in:
Carsten Dominik 2010-01-20 10:27:45 +01:00
parent 3ddd5ac49c
commit cae0c63c48
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2010-01-20 Carsten Dominik <carsten.dominik@gmail.com>
* org-latex.el (org-export-latex-hyperref-format): New option.
(org-export-latex-links): Use `org-export-latex-hyperref-format'.
2010-01-18 Carsten Dominik <carsten.dominik@gmail.com>
* org-ctags.el (org-ctags-enable): Change order of functions.

View File

@ -277,6 +277,13 @@ markup defined, the first one in the association list will be used."
:group 'org-export-latex
:type 'string)
(defcustom org-export-latex-hyperref-format "\\href{%s}{%s}"
"A printf format string to be applied to hyperref links.
The format must contain two %s instances. The first will be filled with
the link, the second with the link description."
:group 'org-export-latex
:type 'string)
(defcustom org-export-latex-tables-verbatim nil
"When non-nil, tables are exported verbatim."
:group 'org-export-latex
@ -1750,7 +1757,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
;; a LaTeX issue, but we here implement a work-around anyway.
(setq path (org-export-latex-protect-amp path)
desc (org-export-latex-protect-amp desc)))
(insert (format "\\href{%s}{%s}" path desc)))
(insert (format org-export-latex-hyperref-format path desc)))
(t (insert "\\texttt{" desc "}")))))))