From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Syntax highlighting in published output Date: Sun, 25 Jan 2009 07:59:42 -0800 Message-ID: <87mydfv0k1.fsf@gmail.com> References: <873af7mn54.wl%jan.seeger@thenybble.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LR7O0-0001Q5-I6 for emacs-orgmode@gnu.org; Sun, 25 Jan 2009 10:59:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LR7O0-0001Pl-0R for emacs-orgmode@gnu.org; Sun, 25 Jan 2009 10:59:00 -0500 Received: from [199.232.76.173] (port=50873 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LR7Nz-0001Pa-Rb for emacs-orgmode@gnu.org; Sun, 25 Jan 2009 10:58:59 -0500 Received: from rv-out-0708.google.com ([209.85.198.250]:40682) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LR7Ny-0006gD-Ie for emacs-orgmode@gnu.org; Sun, 25 Jan 2009 10:58:58 -0500 Received: by rv-out-0708.google.com with SMTP id k29so6506001rvb.6 for ; Sun, 25 Jan 2009 07:58:57 -0800 (PST) In-Reply-To: <873af7mn54.wl%jan.seeger@thenybble.de> (Jan Seeger's message of "Sun, 25 Jan 2009 16:16:39 +0100") 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: Jan Seeger Cc: Org Mode List Jan Seeger writes: > Hello List! > > I was just wondering if org-mode can do (programming language) syntax highlighting like muse > when publishing to HTML or similar. If yes, how? > Hi Jan, If you would like to include an entire file as highlighted html you can use the include directive as described here http://orgmode.org/manual/Include-files.html If you just want to highlight a small snippet of code you can place the code in a source code block as follows --8<---------------cut here---------------start------------->8--- #+begin_src emacs-lisp (defun foo (a b) (if (> a b) (* a b) (foo (foo (- b a) a) (- a b)))) #+end_src --8<---------------cut here---------------end--------------->8--- Best -- Eric > > Greetings, > Jan > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode