From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: LaTeX and syntax highlighting Date: Wed, 11 Feb 2009 15:10:32 +0100 Message-ID: References: <87tz7dkngu.fsf@kassiopeya.MSHEIMNETZ> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LXFnV-00012s-L2 for emacs-orgmode@gnu.org; Wed, 11 Feb 2009 09:10:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LXFnT-000126-Dr for emacs-orgmode@gnu.org; Wed, 11 Feb 2009 09:10:40 -0500 Received: from [199.232.76.173] (port=60480 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LXFnR-00011t-Nt for emacs-orgmode@gnu.org; Wed, 11 Feb 2009 09:10:38 -0500 Received: from mail-ew0-f20.google.com ([209.85.219.20]:36089) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LXFnR-0001fy-BH for emacs-orgmode@gnu.org; Wed, 11 Feb 2009 09:10:37 -0500 Received: by ewy13 with SMTP id 13so339113ewy.18 for ; Wed, 11 Feb 2009 06:10:36 -0800 (PST) In-Reply-To: <87tz7dkngu.fsf@kassiopeya.MSHEIMNETZ> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastian Rose Cc: emacs-orgmode Org-Mode On Feb 2, 2009, at 1:55 PM, Sebastian Rose wrote: > Hi all, > > > > > I just discovered writing LaTeX through OrgMode. It's _really_ great! > > > > Only missing thingy is just something like htmlize.el to hihglight =20 > code > syntax. Currently my codes look like this here: > > > \begin{codeblock} > \openbrace \variable{action}: \dqstring{newMap}, > \doindent \variable{instance}: INSTANZ\_NAME, \comment{/* =20 > Instanzname dieser VMap */} > \doindent \variable{x}: INT\_X, \comment{/* X-Wert in Pixeln der =20 > gew=FCnschten Zoomstufe */} > \doindent \variable{y}: INT\_Y, \comment{/* Y-Wert in Pixeln der =20 > gew=FCnschten Zoomstufe */} > \doindent \variable{z}: INT\_Z, \comment{/* Gew=FCnschte Zoomstufe */} > \doindent \variable{rID}: AKTUELLES\_STANDARD\_HIGHLIGHT, > \doindent \variable{type}: TYPE \comment{/* Aktiver Hotel-Typ-Filter =20= > */} > \closebrace > \end{codeblock} > > > In my headers I include my /home/sebastian/develop/lib/latex/code.tex > which does all the formating and stuff (uses the `ifthen' package for > the indentation stuff) and simply sets some faces and defines the > environment `codeblock'. I wonder if it wouldn't be easy to extend > htmlize.el to do this formating for me. > > > While this is nice to have, since I can use syntaxhighlighting in > headlines this way (document code), I found out about listings.el, =20 > which > seems to be part of the texlive distibution (at least I can =20 > `usepackage' > it here without extra installations). > > See > = http://www.ctan.org/tex-archive/macros/latex/contrib/listings/listings.pdf= > > It supports refs to linenumbers, supports lots of languages and so on. > > > > With the listings package we could convert > > #+begin_src emacs-lisp > ... > #+end_src > > > to > > > \begin{lstlisting}[language=3DLisp] > \dots > \end{lstlisting} > This is not hard to implement, the biggest obstacle being a list translating Emacs major mode names used for htmlize into the language names used by the listings package. Would you like to make such a list? - Carsten