Emacs htmlize in batch mode?
Date : March 29 2020, 07:55 AM
this one helps. Does using the first one with -nw work? that should prevent an X window being opened, but there should still be enough of the 'GUI' part of emacs present to be able to initialise the faces system. It's still not as elegant as -batch (it'll fail if run from a non-terminal process, eg crontab) but it'll be less irritating.
|
In Emacs, How to export Links to a clickable link, when htmlize emacs buffer?
Date : March 29 2020, 07:55 AM
help you fix your problem for @Andreas 's hints, I add following code to htmlize.el. Currently the org-link can be htmlized to clickable link. The code was shared on github: (defun expand-org-link (&optional buffer)
"Change [[url][shortname]] to [[url] [shortname]] by adding a space between url and shortname"
(goto-char (point-min))
(while (re-search-forward "\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]"
nil t)
(let ((url (match-string 1))
(link-text (match-string 3)))
(delete-region (match-beginning 0) (match-end 0))
(insert "[[" url "] [" link-text "]]"))))
(defun shrink-org-link (&optional buffer)
"Change [[url] [shortname]] to [[url][shortname]], remove the space between url and shortname"
(goto-char (point-min))
(while (re-search-forward "\\[\\[\\([^][]+\\)\\] \\(\\[\\([^][]+\\)\\]\\)?\\]"
nil t)
(let ((url (match-string 1))
(link-text (match-string 3)))
(delete-region (match-beginning 0) (match-end 0))
(insert "[[" url "][" link-text "]]"))))
(defun transform-org-link ()
"transform htmlized <span> to <a>"
(goto-char (point-min))
(while (re-search-forward "\\[\\[<span \\([^>]+\\)>\\([^][]+\\)</span>\\] \\[\\([^][]+\\)\\]\\]"
nil t)
(let ((style (match-string 1))
(url (match-string 2))
(link-text (match-string 3)))
(delete-region (match-beginning 0) (match-end 0))
(insert "<a " style " href=\"" url "\">" link-text "</a>"))))
|
org-mode highlighting using minted for latex and htmlize for html
Tag : latex , By : Matt Logan
Date : March 29 2020, 07:55 AM
To fix this issue I'm trying to rewrite some document from latex in org-mode. , You can patch the file _mapping.py in ../pygments/lexers/, line 193: 'NasmLexer': ('pygments.lexers.asm', 'NASM', ('nasm','asm'), ('*.asm', '*.ASM'), ('text/x-nasm',)),
|
how to disable background attribution in htmlize.el when exporting html
Date : March 29 2020, 07:55 AM
should help you out omg, at last using the command M-x htmlize-buffer, i found it may be due to the variable py-number-face and py-variable-name-face. then I just set them to nil at .emacs file.
|
How to get htmlize.el work for project publishing in Emacs org-mode?
Tag : emacs , By : Francis
Date : March 29 2020, 07:55 AM
|