From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Klein Subject: Re: PATCH: programming language indicators in HTML export Date: Mon, 9 May 2016 13:01:23 +0200 Message-ID: <20160509130123.5c47ca74@pckr186.mpip-mainz.mpg.de> References: <20160314151605.214621e9@pckr150.mpip-mainz.mpg.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aziwN-000461-Vi for emacs-orgmode@gnu.org; Mon, 09 May 2016 07:01:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aziwK-0008Lv-MU for emacs-orgmode@gnu.org; Mon, 09 May 2016 07:01:31 -0400 Received: from gate1.mpip-mainz.mpg.de ([194.95.63.248]:32063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aziwJ-0008LU-VS for emacs-orgmode@gnu.org; Mon, 09 May 2016 07:01:28 -0400 Received: from [10.20.2.71] (port=59808 helo=vmmail1.mpip-mainz.mpg.de) by gate1.mpip-mainz.mpg.de with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1aziwG-00066V-0M for emacs-orgmode@gnu.org; Mon, 09 May 2016 13:01:24 +0200 Received: from pckr186.mpip-mainz.mpg.de ([10.20.70.26]) by vmmail1.mpip-mainz.mpg.de with esmtps (TLSv1:AES128-SHA:128) (Exim 4.72) (envelope-from ) id 1aziwG-0005SK-0P for emacs-orgmode@gnu.org; Mon, 09 May 2016 13:01:24 +0200 In-Reply-To: <20160314151605.214621e9@pckr150.mpip-mainz.mpg.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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 wrote: > > Author: Robert Klein 2016-03-14 14:43:46 > Committer: Robert Klein 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; }