* Ox-HTML hover for certain languages
@ 2013-10-21 23:28 R. Michael Weylandt <michael.weylandt@gmail.com>
2013-10-22 16:21 ` Rick Frankel
0 siblings, 1 reply; 2+ messages in thread
From: R. Michael Weylandt <michael.weylandt@gmail.com> @ 2013-10-21 23:28 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
Around line 270 of Ox-html.el, there's CSS which gives certain code blocks in the resulting HTML a hover-over window saying what language they encode. Not all Babel-supported languages appear however: is there any reason for this? (E.g. perl is hard-coded but no python)
I suppose one could pull all the sources from the #+BEGIN_SRC XYZ blocks and generate this on demand, using a lookup table for known languages and a basic capitalization scheme for unknown languages.
I'm not much of an elisp user, but would be happy to try my hand at a patch if this would be of interest.
Michael
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Ox-HTML hover for certain languages
2013-10-21 23:28 Ox-HTML hover for certain languages R. Michael Weylandt <michael.weylandt@gmail.com>
@ 2013-10-22 16:21 ` Rick Frankel
0 siblings, 0 replies; 2+ messages in thread
From: Rick Frankel @ 2013-10-22 16:21 UTC (permalink / raw)
To: emacs-orgmode
On 2013-10-21 19:28, R. Michael Weylandt <michael.weylandt@gmail.com>
wrote:
> Around line 270 of Ox-html.el, there's CSS which gives certain code
> blocks in the resulting HTML a hover-over window saying what language
> they encode. Not all Babel-supported languages appear however: is
> there any reason for this? (E.g. perl is hard-coded but no python)
Never noticed that before. IMHO, it's ugly and broken in a number of
browser which don't handle the "content" attribute very well (firefox
on solaris and IE 8 are bad for different reasons, looks ok on Chrome)
and should be removed entirely instead of trying to keep up w/
babel. I can't say why the list is limited to the specific set of
languages, but since this is part of a defconst for the default inline
styles, it pretty much needs to be hard-coded.
Note that you can easily add other languages via `html-head-extra'.
I've been thinking about how to cleanup the whole inine css/javascript
thing since it makes for bloated (but standalone) html documents, and
in the case of inline css, is broken in batch export due to the use of
htmlize (see `org-html-html-htmlize-output-type').
rick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-22 16:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-21 23:28 Ox-HTML hover for certain languages R. Michael Weylandt <michael.weylandt@gmail.com>
2013-10-22 16:21 ` Rick Frankel
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.