[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Syntax highlighting for examples in Texinfo?
From: |
Bradley M. Kuhn |
Subject: |
Syntax highlighting for examples in Texinfo? |
Date: |
Fri, 5 Jan 2001 16:43:14 -0500 |
User-agent: |
Mutt/1.2.5i |
Frequently, in Texinfo documents, program examples are given.
These days, many people have gotten comfortable editing code with some sort
of "font-locking"; where color coding is used to highlight keywords.
I believe this sort of highlighting can really help learning, too. For
example, if you aren't sure what all the keywords in a language are, it'd be
really helpful if the tutorial highlighted the keywords in a particular way,
such as with color.
Many output formats that Texinfo targets now support color. It would be
nice if output could generate color on those devices (such as Emacs' info
browser and PDF files).
At the Texinfo level, of course, we'd need various tags that can be used for
marking up code.
A few possible ideas are:
address@hidden' a keyword in a programming language
address@hidden' a literal string in a programming language
address@hidden' an operator in a programming language
address@hidden' a data type in a programming language
address@hidden' a variable in a programming language (different
from @var, of course)
I think just using @code{} or putting program in @example{} environments is
useful, but not particularly descriptive. I'd like to be able to mark-up
code so then PDF formatters and other color-enabled formatters can use
color. Non-color formatters could perhaps do something interesting, too.
Thoughts on this idea?
--
Bradley M. Kuhn - http://www.ebb.org/bkuhn
pgp5iQb7yrH7Q.pgp
Description: PGP signature
- Syntax highlighting for examples in Texinfo?,
Bradley M. Kuhn <=