Hi Rasmus, Rasmus <ras...@gmx.us> wrote:
> Hi Robert, > > Thanks for the patch. > > Robert Klein <rokl...@roklein.de> writes: > > > any thoughts about this? > > Remind me, would this only show up when hovering above the block with > the mouse when using this setup? Yes. > > The patch would make the default html header a bit longer, which may > or may not be an issue. Perhaps more importantly, it also does not > deal with new languages. Maybe it would be possible to add a bit of > JS that would look up the language based on the class of the block in > question? > > E.g. the block > > #+BEGIN_SRC rsgrs > > #+END_SRC > > would have class "src-rsgrs". This happens already, but the JS would also have to create the corresponding CSS code (that's what I hardcoded in the patch). However you'd still need a mapping from src block identifier to pleasantly readable text, e.g. js -> "Javascript", sql -> "SQL", emacs-lisp -> "Emacs Lisp", ps -> "PostScript" etc. When you have all those it's not that much different from static CSS anymore... There's no perfect solution, unfortunately, but src blocks have a lot of limits for each language: - is there an Emacs mode for editing? - is there org-babel code for executing? - is the language supported by the LaTeX listings package? - or by the pygments library (for the LaTeX minted package)? Anyway, my patch is basically for those who don't roll their own CSS to have things mostly working out of the box. Best regards Robert > > Thanks, > Rasmus >