[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Syntax highlighting in published output
From: |
Eric Schulte |
Subject: |
Re: [Orgmode] Syntax highlighting in published output |
Date: |
Sun, 25 Jan 2009 07:59:42 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Jan Seeger <address@hidden> 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.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode