This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: examples in the gsl-manual ..
On Tue, Apr 22, 2003 at 08:05:08PM +0100, Brian Gough wrote:
> Manoj Warrier writes:
> > Can one cut and paste the examples and provide them for download
> > as part of the GSL project (or as a independent project under the
> > GPL)?
>
> I've looked at the texinfo sources for the GNU C Library and
> there they generate the examples in the manual from example .c
> files automatically in the Makefile. We should use the same
> method. I will write a perl script to handle it for the next
> release.
Texinfo provides a useful command for this, ` at verbatiminclude',
which allow to include a file exactly as it is, no need to scape
braces or whatever. To use the content of the source file `foo.c' in
a Texinfo example, you just write
@example
@verbatiminclude foo.c
@end example
The advantage of this is that you can compile and execute `foo.c' to
make sure that your example works, include `foo.c' in the tarball, and
still have it as part of the Texinfo documentation.
Best wishes.
Jose
--
Jose M. Perez-Jorda
Departamento de Quimica Fisica
Universidad de Alicante
Apartado 99
E 03080 Alicante
SPAIN
FAX: (34) 965903537
PHONE: (34) 965909667
Email: jmpj at ua dot es