[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] Colored/shaded code parts in dvi

Subject: [Axiom-developer] Colored/shaded code parts in dvi
Date: Mon, 04 Oct 2004 09:25:09 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616


Somebody interested in the following style code?

It redefines the \nwbegincode and \nwendcode commands of noweb.sty to
achieve shaded code areas in the dvi output.

There is not need to change anything in the .nw/.pamphlet file.

The 'framed' package seems to be a standard package in the latex

But be warned, not every dvi viewer is able to handle colors.

For me it works with

home> kdvi --version
Qt: 3.3.3
KDE: 3.2.3
KViewShell: 0.2

and does not work with

home> xdvi --version
xdvik version 22.40v
Copyright (C) 1990-2002 Paul Vojta and others.

Just put the files below into some directory, go there and say

noweave -n file.nw > file.nw.tex
latex wrapper.tex

Ralf Hemmecke

%%-- BEGIN wrapper.tex -- %%



%%-- END wrapper.tex -- %%

%%-- BEGIN file.nw -- %%
So let us first define the first code part.
<<Code 1>>=
one one
@ %def one

And now the second code part.

<<Code 2>>=
two one two

Putting everything together...
<<Code 1>>
<<Code 2>>
%%-- END file.nw -- %%

reply via email to

[Prev in Thread] Current Thread [Next in Thread]