← Prev in month ← Prev in thread
Next in thread → Next in month →

DOCBOOK-APPS: How do you %indent-programlisting-lines for an externalfile?

From
Brian Dellert <>
Date
2001-05-29T08:25:08+00:00
ID
20010528183607.A689@localhost
Thread
DOCBOOK-APPS: How do you %indent-programlisting-lines for an externalfile?
When I convert my docbook to PDF, I want to have all the lines in
<programlisting> blocks indented 8 spaces. To do this, I added this
line to my custom stylesheet.

  (define %indent-programlisting-lines% "        ")

This works fine if the <programlisting> is embedded in the sgml, like
this:

<programlisting>
#!/usr/bin/perl

print "Hello ";
print "World\n";
</programlisting>

However, it doesn't work if the <programlisting> comes from an
external file, like the following. Instead of indenting all the lines,
only the *first* line of the file "source.pl" gets indented.

  <programlisting><inlinegraphic format='linespecific' fileref='source.pl'></inlinegraphic></programlisting>

Any ideas? I've attached sample files. To convert them, I run:

$ jade -t tex -d indent.dsl indent.sgml
$ pdfjadetex indent.tex

Thanks,
Brian
← Prev in month ← Prev in thread
Next in thread → Next in month →