Improve Org to text export

This commit is contained in:
Gerard Vermeulen 2024-01-26 09:59:27 +01:00
parent dbd0ef7ce0
commit bc59dc48bd

View File

@ -3742,15 +3742,17 @@ The following posts provide programming information:
(defun org-yt-export (path desc backend _)
"Export an \"YouTube\" PATH link according to DESC and BACKEND."
(pcase backend
(`html
(format "<iframe
(`ascii
(format "[%s] <https://www.youtube.com/watch?v=%s>" desc path))
(`html
(format "<iframe
frameborder=\"0\" width=\"600\" height=\"450\"
src=\"https://www.youtube.com/embed/%s\"
title=\"%s\"
allowfullscreen></iframe>" path desc))
(`latex
(format "\\href{https://www.youtube.com/watch?v=%s}{%s}" path desc))
(_ path)))
(`latex
(format "\\href{https://www.youtube.com/watch?v=%s}{%s}" path desc))
(_ path)))
(with-eval-after-load 'ol
(org-link-set-parameters
@ -3849,6 +3851,7 @@ define the [[https://orgmode.org/][Org mode]] =kbd= macro in listing
(defun by-backend-kbd-org-macro (keys)
"Help for an org-export backend dependent \"#+macro: kbd\"."
(by-backend
(ascii (format "`kbd(%s)'" keys))
(html (format "@@html:<kbd>%s</kbd>@@" (htmlize-protect-string keys)))
(latex (format "@@latex:\\colorbox{PowderBlue}{\\texttt{%s}}@@" keys)))))
#+end_src