Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 20e17bc5 authored by PERESSONI Romain's avatar PERESSONI Romain
Browse files

compose-publish.el: added color link

parent dd373941
No related branches found
No related tags found
1 merge request!3compose-publish.el: added color link
......@@ -170,6 +170,23 @@ undesirable behavior."
(prefix-all-lines "#+HTML_HEAD_EXTRA: " body)
"\n#+HTML_HEAD_EXTRA: \\)</div>\n"))
;; To include easy color links in org-mode
;; now simply use [[color:red][text to be in red]]
;; https://orgmode.org/worg/org-faq.html#org64ae339
(org-add-link-type
"color"
(lambda (path)
(message (concat "color "
(progn (add-text-properties
0 (length path)
(list 'face `((t (:foreground ,path))))
path) path))))
(lambda (path desc format)
(cond
((eq format 'html)
(format "<span style=\"color:%s;\">%s</span>" path desc))
((eq format 'latex)
(format "{\\color{%s}%s}" path desc)))))
;; fullpath from relative path
;; http://xahlee.info/emacs/emacs/elisp_relative_path.html
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment