* PATCH: programming language indicators in HTML export
@ 2016-03-14 14:16 Robert Klein
2016-03-14 15:59 ` Rasmus
2016-05-09 11:01 ` Robert Klein
0 siblings, 2 replies; 11+ messages in thread
From: Robert Klein @ 2016-03-14 14:16 UTC (permalink / raw)
To: emacs-orgmode
Hi,
any thoughts about this?
Best regards
Robert
Author: Robert Klein <roklein@roklein.de> 2016-03-14 14:43:46
Committer: Robert Klein <roklein@roklein.de> 2016-03-14 14:43:46
Parent: dd9be3a6ea4ff561248b1f6658194fd153b5821c (Fix docstring typo)
Branch: maint
Follows: release_8.3.4
Precedes:
support more programming languages in CSS
The standard CSS for HTML export only supported a couple of
programming languages to have a language name "hover" on src
blocks. This patch adds all languages supported per Org
manual, those from org.el's org-babel-load-languages-alist,
additional language identifiers in ob-*.el and languages
which have a) an emacs mode and b) are supported by the LaTeX
listings package. Additional a language "conf" is supported
for generic configuraiton files; an emacs mode exists for
this, but for LaTeX listings a language " " has to be faked.
As this patch is for HTML, this is no impediment.
Thanks for reporting the missing support to Tianxian XIONG.
------------------------------- lisp/ox-html.el
------------------------------- index de2e5d9..e4a4c38 100644
@@ -314,13 +314,96 @@ for the JavaScript code in this tag.
border: 1px solid black;
}
pre.src:hover:before { display: inline;}
- pre.src-sh:before { content: 'sh'; }
- pre.src-bash:before { content: 'sh'; }
+ /* Languages per Org manual */
+ pre.src-asymptote:before { content: 'Asymptote'; }
+ pre.src-awk:before { content: 'Awk'; }
+ pre.src-C:before { content: 'C'; }
+ /* pre.src-C++ doesn't work in CSS */
+ pre.src-clojure:before { content: 'Clojure'; }
+ pre.src-css:before { content: 'CSS'; }
+ pre.src-D:before { content: 'D'; }
+ pre.src-ditaa:before { content: 'ditaa'; }
+ pre.src-dot:before { content: 'Graphviz'; }
+ pre.src-calc:before { content: 'Emacs Calc'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
- pre.src-R:before { content: 'R'; }
- pre.src-perl:before { content: 'Perl'; }
- pre.src-java:before { content: 'Java'; }
- pre.src-sql:before { content: 'SQL'; }
+ pre.src-fortran:before { content: 'Fortran'; }
+ pre.src-gnuplot:before { content: 'gnuplot'; }
+ pre.src-haskell:before { content: 'Haskell'; }
+ pre.src-java:before { content: 'Java'; }
+ pre.src-js:before { content: 'Javascript'; }
+ pre.src-latex:before { content: 'LaTeX'; }
+ pre.src-ledger:before { content: 'Ledger'; }
+ pre.src-lisp:before { content: 'Lisp'; }
+ pre.src-lilypond:before { content: 'Lilypond'; }
+ pre.src-matlab:before { content: 'MATLAB'; }
+ pre.src-mscgen:before { content: 'Mscgen'; }
+ pre.src-ocaml:before { content: 'Objective Caml'; }
+ pre.src-octave:before { content: 'Octave'; }
+ pre.src-org:before { content: 'Org mode'; }
+ pre.src-oz:before { content: 'OZ'; }
+ pre.src-plantuml:before { content: 'Plantuml'; }
+ pre.src-processing:before { content: 'Processing.js'; }
+ pre.src-python:before { content: 'Python'; }
+ pre.src-R:before { content: 'R'; }
+ pre.src-ruby:before { content: 'Ruby'; }
+ pre.src-sass:before { content: 'Sass'; }
+ pre.src-scheme:before { content: 'Scheme'; }
+ pre.src-screen:before { content: 'Gnu Screen'; }
+ pre.src-sed:before { content: 'Sed'; }
+ pre.src-sh:before { content: 'shell'; }
+ pre.src-sql:before { content: 'SQL'; }
+ pre.src-sqlite:before { content: 'SQLite'; }
+ /* additional languages in org.el's org-babel-load-languages alist */
+ pre.src-forth:before { content: 'Forth'; }
+ pre.src-io:before { content: 'IO'; }
+ pre.src-J:before { content: 'J'; }
+ pre.src-makefile:before { content: 'Makefile'; }
+ pre.src-maxima:before { content: 'Maxima'; }
+ pre.src-perl:before { content: 'Perl'; }
+ pre.src-picolisp:before { content: 'Pico Lisp'; }
+ pre.src-scala:before { content: 'Scala'; }
+ pre.src-shell:before { content: 'Shell Script'; }
+ pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
+ /* additional language identifiers per \"defun org-babel-execute\"
+ in ob-*.el */
+ pre.src-cpp:before { content: 'C++'; }
+ pre.src-abc:before { content: 'ABC'; }
+ pre.src-coq:before { content: 'Coq'; }
+ pre.src-groovy:before { content: 'Groovy'; }
+ /* additional language identifiers from org-babel-shell-names in
+ ob-shell.el: ob-shell is the only babel language using a lambda
to put
+ the execution function name together. */
+ pre.src-bash:before { content: 'bash'; }
+ pre.src-csh:before { content: 'csh'; }
+ pre.src-ash:before { content: 'ash'; }
+ pre.src-dash:before { content: 'dash'; }
+ pre.src-ksh:before { content: 'ksh'; }
+ pre.src-mksh:before { content: 'mksh'; }
+ pre.src-posh:before { content: 'posh'; }
+ /* Additional Emacs modes also supported by the LaTeX listings
package */
+ pre.src-ada:before { content: 'Ada'; }
+ pre.src-asm:before { content: 'Assembler'; }
+ pre.src-caml:before { content: 'Caml'; }
+ pre.src-delphi:before { content: 'Delphi'; }
+ pre.src-html:before { content: 'HTML'; }
+ pre.src-idl:before { content: 'IDL'; }
+ pre.src-mercury:before { content: 'Mercury'; }
+ pre.src-metapost:before { content: 'MetaPost'; }
+ pre.src-modula-2:before { content: 'Modula-2'; }
+ pre.src-pascal:before { content: 'Pascal'; }
+ pre.src-ps:before { content: 'PostScript'; }
+ pre.src-prolog:before { content: 'Prolog'; }
+ pre.src-simula:before { content: 'Simula'; }
+ pre.src-tcl:before { content: 'tcl'; }
+ pre.src-tex:before { content: 'TeX'; }
+ pre.src-plain-tex:before { content: 'Plain TeX'; }
+ pre.src-verilog:before { content: 'Verilog'; }
+ pre.src-vhdl:before { content: 'VHDL'; }
+ pre.src-xml:before { content: 'XML'; }
+ pre.src-nxml:before { content: 'XML'; }
+ /* add a generic configuration mode; LaTeX export needs an additional
+ (add-to-list 'org-latex-listings-langs '(conf \" \")) in .emacs */
+ pre.src-conf:before { content: 'Configuration File'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: programming language indicators in HTML export
2016-03-14 14:16 PATCH: programming language indicators in HTML export Robert Klein
@ 2016-03-14 15:59 ` Rasmus
2016-03-14 19:25 ` Robert Klein
2016-05-09 11:01 ` Robert Klein
1 sibling, 1 reply; 11+ messages in thread
From: Rasmus @ 2016-03-14 15:59 UTC (permalink / raw)
To: emacs-orgmode
Hi Robert,
Thanks for the patch.
Robert Klein <roklein@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?
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".
Thanks,
Rasmus
--
Nothing's wrong with an email that ends in a minor key
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: programming language indicators in HTML export
2016-03-14 15:59 ` Rasmus
@ 2016-03-14 19:25 ` Robert Klein
2016-03-15 14:24 ` Rasmus
0 siblings, 1 reply; 11+ messages in thread
From: Robert Klein @ 2016-03-14 19:25 UTC (permalink / raw)
To: emacs-orgmode
Hi Rasmus,
Rasmus <rasmus@gmx.us> wrote:
> Hi Robert,
>
> Thanks for the patch.
>
> Robert Klein <roklein@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
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: programming language indicators in HTML export
2016-03-14 19:25 ` Robert Klein
@ 2016-03-15 14:24 ` Rasmus
2016-03-15 14:35 ` Robert Klein
0 siblings, 1 reply; 11+ messages in thread
From: Rasmus @ 2016-03-15 14:24 UTC (permalink / raw)
To: emacs-orgmode
Hi Robert,
Robert Klein <roklein@roklein.de> writes:
>> 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...
Fair point.
> Anyway, my patch is basically for those who don't roll their own CSS to
> have things mostly working out of the box.
Seems good to me.
Robert, do you have a copyright assignment of changes to Emacs? I think
the change is too long (in line count) for a TINYCHANGE.
Thanks,
Rasmus
--
And I faced endless streams of vendor-approved Ikea furniture. . .
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: programming language indicators in HTML export
2016-03-15 14:24 ` Rasmus
@ 2016-03-15 14:35 ` Robert Klein
0 siblings, 0 replies; 11+ messages in thread
From: Robert Klein @ 2016-03-15 14:35 UTC (permalink / raw)
To: emacs-orgmode
Hi Rasmus,
On Tue, 15 Mar 2016 15:24:00 +0100
Rasmus <rasmus@gmx.us> wrote:
[rest deleted]
> Robert, do you have a copyright assignment of changes to Emacs? I
> think the change is too long (in line count) for a TINYCHANGE.
I signed the FSF papers in April 2015. On top of the sheet there is the
number "RT: 1006989".
Do you need a copy of the PDF?
Thanks and best regards,
Robert
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: programming language indicators in HTML export
2016-03-14 14:16 PATCH: programming language indicators in HTML export Robert Klein
2016-03-14 15:59 ` Rasmus
@ 2016-05-09 11:01 ` Robert Klein
2016-05-09 20:05 ` Nicolas Goaziou
1 sibling, 1 reply; 11+ messages in thread
From: Robert Klein @ 2016-05-09 11:01 UTC (permalink / raw)
To: emacs-orgmode
Hi,
anyone willing to commit this patch I sent back in march?
Best regards
Robert
On Mon, 14 Mar 2016 15:16:05 +0100
Robert Klein <roklein@roklein.de> wrote:
>
> Author: Robert Klein <roklein@roklein.de> 2016-03-14 14:43:46
> Committer: Robert Klein <roklein@roklein.de> 2016-03-14 14:43:46
> Parent: dd9be3a6ea4ff561248b1f6658194fd153b5821c (Fix docstring typo)
> Branch: maint
> Follows: release_8.3.4
> Precedes:
>
> support more programming languages in CSS
>
> The standard CSS for HTML export only supported a couple of
> programming languages to have a language name "hover" on src
> blocks. This patch adds all languages supported per Org
> manual, those from org.el's org-babel-load-languages-alist,
> additional language identifiers in ob-*.el and languages
> which have a) an emacs mode and b) are supported by the LaTeX
> listings package. Additional a language "conf" is supported
> for generic configuraiton files; an emacs mode exists for
> this, but for LaTeX listings a language " " has to be faked.
> As this patch is for HTML, this is no impediment.
>
> Thanks for reporting the missing support to Tianxian XIONG.
>
> ------------------------------- lisp/ox-html.el
> ------------------------------- index de2e5d9..e4a4c38 100644
> @@ -314,13 +314,96 @@ for the JavaScript code in this tag.
> border: 1px solid black;
> }
> pre.src:hover:before { display: inline;}
> - pre.src-sh:before { content: 'sh'; }
> - pre.src-bash:before { content: 'sh'; }
> + /* Languages per Org manual */
> + pre.src-asymptote:before { content: 'Asymptote'; }
> + pre.src-awk:before { content: 'Awk'; }
> + pre.src-C:before { content: 'C'; }
> + /* pre.src-C++ doesn't work in CSS */
> + pre.src-clojure:before { content: 'Clojure'; }
> + pre.src-css:before { content: 'CSS'; }
> + pre.src-D:before { content: 'D'; }
> + pre.src-ditaa:before { content: 'ditaa'; }
> + pre.src-dot:before { content: 'Graphviz'; }
> + pre.src-calc:before { content: 'Emacs Calc'; }
> pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
> - pre.src-R:before { content: 'R'; }
> - pre.src-perl:before { content: 'Perl'; }
> - pre.src-java:before { content: 'Java'; }
> - pre.src-sql:before { content: 'SQL'; }
> + pre.src-fortran:before { content: 'Fortran'; }
> + pre.src-gnuplot:before { content: 'gnuplot'; }
> + pre.src-haskell:before { content: 'Haskell'; }
> + pre.src-java:before { content: 'Java'; }
> + pre.src-js:before { content: 'Javascript'; }
> + pre.src-latex:before { content: 'LaTeX'; }
> + pre.src-ledger:before { content: 'Ledger'; }
> + pre.src-lisp:before { content: 'Lisp'; }
> + pre.src-lilypond:before { content: 'Lilypond'; }
> + pre.src-matlab:before { content: 'MATLAB'; }
> + pre.src-mscgen:before { content: 'Mscgen'; }
> + pre.src-ocaml:before { content: 'Objective Caml'; }
> + pre.src-octave:before { content: 'Octave'; }
> + pre.src-org:before { content: 'Org mode'; }
> + pre.src-oz:before { content: 'OZ'; }
> + pre.src-plantuml:before { content: 'Plantuml'; }
> + pre.src-processing:before { content: 'Processing.js'; }
> + pre.src-python:before { content: 'Python'; }
> + pre.src-R:before { content: 'R'; }
> + pre.src-ruby:before { content: 'Ruby'; }
> + pre.src-sass:before { content: 'Sass'; }
> + pre.src-scheme:before { content: 'Scheme'; }
> + pre.src-screen:before { content: 'Gnu Screen'; }
> + pre.src-sed:before { content: 'Sed'; }
> + pre.src-sh:before { content: 'shell'; }
> + pre.src-sql:before { content: 'SQL'; }
> + pre.src-sqlite:before { content: 'SQLite'; }
> + /* additional languages in org.el's org-babel-load-languages alist
> */
> + pre.src-forth:before { content: 'Forth'; }
> + pre.src-io:before { content: 'IO'; }
> + pre.src-J:before { content: 'J'; }
> + pre.src-makefile:before { content: 'Makefile'; }
> + pre.src-maxima:before { content: 'Maxima'; }
> + pre.src-perl:before { content: 'Perl'; }
> + pre.src-picolisp:before { content: 'Pico Lisp'; }
> + pre.src-scala:before { content: 'Scala'; }
> + pre.src-shell:before { content: 'Shell Script'; }
> + pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
> + /* additional language identifiers per \"defun org-babel-execute\"
> + in ob-*.el */
> + pre.src-cpp:before { content: 'C++'; }
> + pre.src-abc:before { content: 'ABC'; }
> + pre.src-coq:before { content: 'Coq'; }
> + pre.src-groovy:before { content: 'Groovy'; }
> + /* additional language identifiers from org-babel-shell-names in
> + ob-shell.el: ob-shell is the only babel language using a lambda
> to put
> + the execution function name together. */
> + pre.src-bash:before { content: 'bash'; }
> + pre.src-csh:before { content: 'csh'; }
> + pre.src-ash:before { content: 'ash'; }
> + pre.src-dash:before { content: 'dash'; }
> + pre.src-ksh:before { content: 'ksh'; }
> + pre.src-mksh:before { content: 'mksh'; }
> + pre.src-posh:before { content: 'posh'; }
> + /* Additional Emacs modes also supported by the LaTeX listings
> package */
> + pre.src-ada:before { content: 'Ada'; }
> + pre.src-asm:before { content: 'Assembler'; }
> + pre.src-caml:before { content: 'Caml'; }
> + pre.src-delphi:before { content: 'Delphi'; }
> + pre.src-html:before { content: 'HTML'; }
> + pre.src-idl:before { content: 'IDL'; }
> + pre.src-mercury:before { content: 'Mercury'; }
> + pre.src-metapost:before { content: 'MetaPost'; }
> + pre.src-modula-2:before { content: 'Modula-2'; }
> + pre.src-pascal:before { content: 'Pascal'; }
> + pre.src-ps:before { content: 'PostScript'; }
> + pre.src-prolog:before { content: 'Prolog'; }
> + pre.src-simula:before { content: 'Simula'; }
> + pre.src-tcl:before { content: 'tcl'; }
> + pre.src-tex:before { content: 'TeX'; }
> + pre.src-plain-tex:before { content: 'Plain TeX'; }
> + pre.src-verilog:before { content: 'Verilog'; }
> + pre.src-vhdl:before { content: 'VHDL'; }
> + pre.src-xml:before { content: 'XML'; }
> + pre.src-nxml:before { content: 'XML'; }
> + /* add a generic configuration mode; LaTeX export needs an
> additional
> + (add-to-list 'org-latex-listings-langs '(conf \" \")) in .emacs
> */
> + pre.src-conf:before { content: 'Configuration File'; }
>
> table { border-collapse:collapse; }
> caption.t-above { caption-side: top; }
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: programming language indicators in HTML export
2016-05-09 11:01 ` Robert Klein
@ 2016-05-09 20:05 ` Nicolas Goaziou
2016-05-10 5:19 ` Robert Klein
0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2016-05-09 20:05 UTC (permalink / raw)
To: Robert Klein; +Cc: emacs-orgmode
Hello,
Robert Klein <roklein@roklein.de> writes:
> anyone willing to commit this patch I sent back in march?
This patch actually felt through the cracks. Sorry about that. Would you
mind sending it again, using git format-patch so I can apply it?
Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: programming language indicators in HTML export
2016-05-09 20:05 ` Nicolas Goaziou
@ 2016-05-10 5:19 ` Robert Klein
2016-05-10 9:55 ` Rasmus
2016-05-10 20:22 ` Nicolas Goaziou
0 siblings, 2 replies; 11+ messages in thread
From: Robert Klein @ 2016-05-10 5:19 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 401 bytes --]
Hi,
Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Hello,
>
> Robert Klein <roklein@roklein.de> writes:
>
> > anyone willing to commit this patch I sent back in march?
>
> This patch actually felt through the cracks. Sorry about that. Would
> you mind sending it again, using git format-patch so I can apply it?
>
Please find the patch attached.
Thank you very much.
Best regards
Robert
[-- Attachment #2: 0001-support-more-programming-languages-in-CSS.patch --]
[-- Type: text/x-patch, Size: 5949 bytes --]
From ccedae3c29077c56b9c7325a3911a841c11add2d Mon Sep 17 00:00:00 2001
From: Robert Klein <roklein@roklein.de>
Date: Mon, 14 Mar 2016 14:43:46 +0100
Subject: [PATCH] support more programming languages in CSS
The standard CSS for HTML export only supported a couple of
programming languages to have a language name "hover" on src
blocks. This patch adds all languages supported per Org
manual, those from org.el's org-babel-load-languages-alist,
additional language identifiers in ob-*.el and languages
which have a) an emacs mode and b) are supported by the LaTeX
listings package. Additional a language "conf" is supported
for generic configuraiton files; an emacs mode exists for
this, but for LaTeX listings a language " " has to be faked.
As this patch is for HTML, this is no impediment.
Thanks for reporting the missing support to Tianxian XIONG.
---
lisp/ox-html.el | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 89 insertions(+), 6 deletions(-)
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index a05fa2d..7653c43 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -314,13 +314,96 @@ for the JavaScript code in this tag.
border: 1px solid black;
}
pre.src:hover:before { display: inline;}
- pre.src-sh:before { content: 'sh'; }
- pre.src-bash:before { content: 'sh'; }
+ /* Languages per Org manual */
+ pre.src-asymptote:before { content: 'Asymptote'; }
+ pre.src-awk:before { content: 'Awk'; }
+ pre.src-C:before { content: 'C'; }
+ /* pre.src-C++ doesn't work in CSS */
+ pre.src-clojure:before { content: 'Clojure'; }
+ pre.src-css:before { content: 'CSS'; }
+ pre.src-D:before { content: 'D'; }
+ pre.src-ditaa:before { content: 'ditaa'; }
+ pre.src-dot:before { content: 'Graphviz'; }
+ pre.src-calc:before { content: 'Emacs Calc'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
- pre.src-R:before { content: 'R'; }
- pre.src-perl:before { content: 'Perl'; }
- pre.src-java:before { content: 'Java'; }
- pre.src-sql:before { content: 'SQL'; }
+ pre.src-fortran:before { content: 'Fortran'; }
+ pre.src-gnuplot:before { content: 'gnuplot'; }
+ pre.src-haskell:before { content: 'Haskell'; }
+ pre.src-java:before { content: 'Java'; }
+ pre.src-js:before { content: 'Javascript'; }
+ pre.src-latex:before { content: 'LaTeX'; }
+ pre.src-ledger:before { content: 'Ledger'; }
+ pre.src-lisp:before { content: 'Lisp'; }
+ pre.src-lilypond:before { content: 'Lilypond'; }
+ pre.src-matlab:before { content: 'MATLAB'; }
+ pre.src-mscgen:before { content: 'Mscgen'; }
+ pre.src-ocaml:before { content: 'Objective Caml'; }
+ pre.src-octave:before { content: 'Octave'; }
+ pre.src-org:before { content: 'Org mode'; }
+ pre.src-oz:before { content: 'OZ'; }
+ pre.src-plantuml:before { content: 'Plantuml'; }
+ pre.src-processing:before { content: 'Processing.js'; }
+ pre.src-python:before { content: 'Python'; }
+ pre.src-R:before { content: 'R'; }
+ pre.src-ruby:before { content: 'Ruby'; }
+ pre.src-sass:before { content: 'Sass'; }
+ pre.src-scheme:before { content: 'Scheme'; }
+ pre.src-screen:before { content: 'Gnu Screen'; }
+ pre.src-sed:before { content: 'Sed'; }
+ pre.src-sh:before { content: 'shell'; }
+ pre.src-sql:before { content: 'SQL'; }
+ pre.src-sqlite:before { content: 'SQLite'; }
+ /* additional languages in org.el's org-babel-load-languages alist */
+ pre.src-forth:before { content: 'Forth'; }
+ pre.src-io:before { content: 'IO'; }
+ pre.src-J:before { content: 'J'; }
+ pre.src-makefile:before { content: 'Makefile'; }
+ pre.src-maxima:before { content: 'Maxima'; }
+ pre.src-perl:before { content: 'Perl'; }
+ pre.src-picolisp:before { content: 'Pico Lisp'; }
+ pre.src-scala:before { content: 'Scala'; }
+ pre.src-shell:before { content: 'Shell Script'; }
+ pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
+ /* additional language identifiers per \"defun org-babel-execute\"
+ in ob-*.el */
+ pre.src-cpp:before { content: 'C++'; }
+ pre.src-abc:before { content: 'ABC'; }
+ pre.src-coq:before { content: 'Coq'; }
+ pre.src-groovy:before { content: 'Groovy'; }
+ /* additional language identifiers from org-babel-shell-names in
+ ob-shell.el: ob-shell is the only babel language using a lambda to put
+ the execution function name together. */
+ pre.src-bash:before { content: 'bash'; }
+ pre.src-csh:before { content: 'csh'; }
+ pre.src-ash:before { content: 'ash'; }
+ pre.src-dash:before { content: 'dash'; }
+ pre.src-ksh:before { content: 'ksh'; }
+ pre.src-mksh:before { content: 'mksh'; }
+ pre.src-posh:before { content: 'posh'; }
+ /* Additional Emacs modes also supported by the LaTeX listings package */
+ pre.src-ada:before { content: 'Ada'; }
+ pre.src-asm:before { content: 'Assembler'; }
+ pre.src-caml:before { content: 'Caml'; }
+ pre.src-delphi:before { content: 'Delphi'; }
+ pre.src-html:before { content: 'HTML'; }
+ pre.src-idl:before { content: 'IDL'; }
+ pre.src-mercury:before { content: 'Mercury'; }
+ pre.src-metapost:before { content: 'MetaPost'; }
+ pre.src-modula-2:before { content: 'Modula-2'; }
+ pre.src-pascal:before { content: 'Pascal'; }
+ pre.src-ps:before { content: 'PostScript'; }
+ pre.src-prolog:before { content: 'Prolog'; }
+ pre.src-simula:before { content: 'Simula'; }
+ pre.src-tcl:before { content: 'tcl'; }
+ pre.src-tex:before { content: 'TeX'; }
+ pre.src-plain-tex:before { content: 'Plain TeX'; }
+ pre.src-verilog:before { content: 'Verilog'; }
+ pre.src-vhdl:before { content: 'VHDL'; }
+ pre.src-xml:before { content: 'XML'; }
+ pre.src-nxml:before { content: 'XML'; }
+ /* add a generic configuration mode; LaTeX export needs an additional
+ (add-to-list 'org-latex-listings-langs '(conf \" \")) in .emacs */
+ pre.src-conf:before { content: 'Configuration File'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
--
2.6.6
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: PATCH: programming language indicators in HTML export
2016-05-10 5:19 ` Robert Klein
@ 2016-05-10 9:55 ` Rasmus
2016-05-10 19:07 ` Robert Klein
2016-05-10 20:22 ` Nicolas Goaziou
1 sibling, 1 reply; 11+ messages in thread
From: Rasmus @ 2016-05-10 9:55 UTC (permalink / raw)
To: emacs-orgmode
Robert Klein <roklein@roklein.de> writes:
> Hi,
>
> Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>
>> Hello,
>>
>> Robert Klein <roklein@roklein.de> writes:
>>
>> > anyone willing to commit this patch I sent back in march?
>>
>> This patch actually felt through the cracks. Sorry about that. Would
>> you mind sending it again, using git format-patch so I can apply it?
>>
>
> Please find the patch attached.
I wonder if it would be possible (or even desirable) to build this part of
the css header automatically? It may be too prone to unexpected bugs.
Rasmus
--
The Kids call him Billy the Saint
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: programming language indicators in HTML export
2016-05-10 9:55 ` Rasmus
@ 2016-05-10 19:07 ` Robert Klein
0 siblings, 0 replies; 11+ messages in thread
From: Robert Klein @ 2016-05-10 19:07 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
Hi,
Rasmus <rasmus@gmx.us> wrote:
> Robert Klein <roklein@roklein.de> writes:
>
> > Hi,
> >
> > Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> >
> >> Hello,
> >>
> >> Robert Klein <roklein@roklein.de> writes:
> >>
> >> > anyone willing to commit this patch I sent back in march?
> >>
> >> This patch actually felt through the cracks. Sorry about that.
> >> Would you mind sending it again, using git format-patch so I can
> >> apply it?
> >>
> >
> > Please find the patch attached.
>
> I wonder if it would be possible (or even desirable) to build this
> part of the css header automatically? It may be too prone to
> unexpected bugs.
>
basically same answer I gave last time; when you want JS to create the
CSS you still have to map the source block identifier to ``readable''
text elsewhere. You'd just move the static from org-modes basic CSS
into org-mode.
I think the patch is a bonus for those, that don't roll their own CSS
(e.g. Tianxian Xiong, who first gave me the idea).
Any automated solution would be error-prone, too, and depend on:
- what's the Emacs mode for editing (or is there one at all)?
- is there an ob-<language> module for running the code?
- for LaTeX export: is the language supported by
- the LaTeX listings package (and what is its name there?)?
- or the pygments library (for those using the LaTeX minted package)?
One example I use for documentation is `conf' source blocks for
`generic' configuration files. For LaTeX export I have to add
(add-to-list 'org-latex-listings-langs '(conf " "))
to my .emacs, as the listings package doesn't support a `configuration'
language.
It's a hack, but it works. I don't see a general solution (even if
restricted to the CSS header).
I see my patch as a `best effort' for getting things working out of the
box. Anyone rolling his own CSS will probably pick his 2 to 5
languages and be happy with them.
Best regards
Robert
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: programming language indicators in HTML export
2016-05-10 5:19 ` Robert Klein
2016-05-10 9:55 ` Rasmus
@ 2016-05-10 20:22 ` Nicolas Goaziou
1 sibling, 0 replies; 11+ messages in thread
From: Nicolas Goaziou @ 2016-05-10 20:22 UTC (permalink / raw)
To: Robert Klein; +Cc: emacs-orgmode
Hello,
Robert Klein <roklein@roklein.de> writes:
> Please find the patch attached.
Applied. Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-05-10 20:23 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-14 14:16 PATCH: programming language indicators in HTML export Robert Klein
2016-03-14 15:59 ` Rasmus
2016-03-14 19:25 ` Robert Klein
2016-03-15 14:24 ` Rasmus
2016-03-15 14:35 ` Robert Klein
2016-05-09 11:01 ` Robert Klein
2016-05-09 20:05 ` Nicolas Goaziou
2016-05-10 5:19 ` Robert Klein
2016-05-10 9:55 ` Rasmus
2016-05-10 19:07 ` Robert Klein
2016-05-10 20:22 ` Nicolas Goaziou
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.