From: "Eric Schulte" <schulte.eric@gmail.com>
To: Jan Seeger <jan.seeger@thenybble.de>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: Syntax highlighting in published output
Date: Sun, 25 Jan 2009 07:59:42 -0800 [thread overview]
Message-ID: <87mydfv0k1.fsf@gmail.com> (raw)
In-Reply-To: <873af7mn54.wl%jan.seeger@thenybble.de> (Jan Seeger's message of "Sun, 25 Jan 2009 16:16:39 +0100")
Jan Seeger <jan.seeger@thenybble.de> 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
prev parent reply other threads:[~2009-01-25 15:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-25 15:16 Syntax highlighting in published output Jan Seeger
2009-01-25 15:59 ` Eric Schulte [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mydfv0k1.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=jan.seeger@thenybble.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).