From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Fedora 9 (Linux) Installation
Date: Tue, 8 Jul 2008 19:04:44 -0400 (EDT) [thread overview]
Message-ID: <alpine.DEB.1.00.0807081858550.29911@nqv-yncgbc> (raw)
In-Reply-To: <E1KFFXh-0006I3-00@ms2.city.ac.uk>
On Sat, 5 Jul 2008, abbg770@city.ac.uk wrote:
> Ok now that's out of the way i've got a few questions regarding ConTeXt
> itself.
These got ignored in the heap on installation hints.
> 1. Is there an equivalent of the listing package?
No, but read on ...
> Take a look at
> listing-sample.pdf. It's also highly customizable, allowing me to change
> the colour etc. For instance here is my setup.
>
> \lstset{breaklines=true, showlines=true, % showing line numbers
> numbers=left, % where to show line numbers
> numberstyle=\scriptsize\sffamily\color{gray}, % numbersep=10pt, %
> stepnumber=1, % how often to show the line number on the left
> language=Java, % specifiy the language basicstyle=\scriptsize\ttfamily, %
> print whole listing small keywordstyle=\bfseries\color{eclipsekeyword}, %
> underlined bold black keywords identifierstyle=, % nothing happens
> commentstyle=\color{eclipsecomment}, % white comments, if you use
> commentstyle=\color{white}, it doesn't display the PRODID for the VCALENDAR
> stringstyle=\ttfamily, % typewriter type for strings
> showstringspaces=false, % no special string spaces frame=single, % bottom
> of listing gets a rule, use frame=single if you want awhole frame around it
> backgroundcolor=\color{white}, use frame=b for line a the bottom only
> backgroundcolor=\color{white}, tabsize=4, showspaces=false,
> showstringspaces=false}
>
> \lstset{morecomment=[s][\color{eclipsejavadoc}]{/**}{*/}}%,
> % morecomment=[s][\color{red}]{/*-}{*/}}
>
> And including the source code.
>
> \lstinputlisting[
>
> caption={CalendarExtractor.java},
>
> label=lst:CalendarExtractor.java]
>
> {source/CalendarExtractor.java}
Context does have a pretty printer, which comes for support for C, Java,
Javascript, pascal, eiffel, metapost and tex. It is not as configurable as
listings, but has most of the features.
In MKII, writing a module for pretty printing files was a pain. Now, with
luatex, things are much easier. The new tex and mp pretty printers are
written in lua, and are much easier to read (and write).
Part of the interface is documented here:
http://wiki.contextgarden.net/Verbatim_text
> 2. Can someone please tell me if a book is being planned, I'd hate to print
> out the documentation and then come to realize that, say, two months down
> the line a book is available.
Don't worry. Print out the doucumentation and get it bound so that it
lasts :) A book is planned, but the effort is still in the planning stage.
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2008-07-08 23:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-05 21:43 abbg770
2008-07-06 7:03 ` Taco Hoekwater
2008-07-06 7:12 ` Patrick Gundlach
2008-07-06 7:37 ` Arthur Reutenauer
2008-07-06 23:31 ` Mojca Miklavec
2008-07-08 23:04 ` Aditya Mahajan [this message]
2008-07-06 22:28 abbg770
2008-07-06 22:48 ` Hans Hagen
2008-07-06 23:31 abbg770
2008-07-07 7:32 ` Hans Hagen
2008-07-06 23:53 abbg770
2008-07-07 15:04 abbg770
2008-07-11 18:14 abbg770
2008-07-11 20:46 ` Taco Hoekwater
2008-07-11 20:49 ` Taco Hoekwater
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.1.00.0807081858550.29911@nqv-yncgbc \
--to=adityam@umich.edu \
--cc=ntg-context@ntg.nl \
/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.
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 NNTP newsgroup(s).