discuss: SGML image bug
Subject:
SGML image bug
From:
Charles Curley ####@####.####
Date:
25 Dec 2001 03:48:27 -0000
Message-Id: <20011224194958.A13786@trib.com>
I appear to have hit a bug in jade or in docbook or in the LDP
stylesheet. Or something.
I decided to try inserting a graphic into my HOWTO, more as an
experiment than as anything else. I did like so:
<listitem>
<informalfigure float="0">
<mediaobject>
<imageobject>
<imagedata fileref="tomsrtbt.png" format="png">
</imageobject>
<imageobject>
<imagedata fileref="tomsrtbt.eps" format="eps">
</imageobject>
</mediaobject>
</informalfigure>
<para>
<ulink url="http://www.toms.net/rb">tomsrtbt</ulink>, <quote>The most Linux on 1 floppy disk.</quote> Tom also has links to other small disties.</para>
</listitem>
The problem is that I cannot generate both a postscript and a PDF
version. If I have the png imageobject first, as above, I get the png
image in the .tex output, which is fine for PDF generation but not for
postscript generation. If I have the eps imageobject first, I get the
eps image in the .tex output, which breaks PDF generation but not
postscript generation.
I have openjade-1.3-13 and jadetex-3.3-1.
My makefile is attached.
--
-- C^2
The world's most effective anti-virus software: Linux.
Looking for fine software and/or web pages?
http://w3.trib.com/~ccurley
# a makefile for generating the Bare Metal Recovery HOW-TO
# Time-stamp: <2001-12-24 19:26:36 ccurley Makefile>
# All the scripts we incorporate into the HOWTO
SCRIPTS = cooked/back.up.all cooked/back.up.all.ssh cooked/dev.hda cooked/get.tester cooked/make.dev.hda cooked/make.fdisk cooked/restore.all cooked/restore.all.ssh cooked/restore.metadata cooked/restore.tester cooked/save.metadata
ILLOS = tomsrtbt_120_172
# The install directory. This will be mirrored to the web server
INSTALL = /home/ccurley/public_html/public/$(DOCUMENT)
# The base name of the document
DOCUMENT = Linux-Complete-Backup-and-Recovery-HOWTO
# Some style sheet selections. Note the escapes for the \ and the #.
indexdsl = -d /usr/share/sgml/docbook/dsssl-stylesheets/ldp.dsl
dslhtml = -d /usr/share/sgml/docbook/dsssl-stylesheets/ldp.dsl\\\#html
dslprint = -d /usr/share/sgml/docbook/dsssl-stylesheets/ldp.dsl\\\#print
cooked:
mkdir cooked $(DOCUMENT) $(DOCUMENT).junk
clean:
-rm -r $(DOCUMENT) $(DOCUMENT).[a-r]* $(DOCUMENT).[t-z]* $(DOCUMENT).smooth.html cooked *.eps
mkdir cooked $(DOCUMENT) $(DOCUMENT).junk
cooked/back.up.all: scripts/back.up.all
./buildscript back.up.all
cooked/back.up.all.ssh: scripts/back.up.all.ssh
./buildscript back.up.all.ssh
cooked/dev.hda: scripts/dev.hda
./buildscript dev.hda
cooked/get.tester: scripts/get.tester
./buildscript get.tester
cooked/make.dev.hda: scripts/make.dev.hda
./buildscript make.dev.hda
cooked/make.fdisk: scripts/make.fdisk
./buildscript make.fdisk
cooked/restore.all: scripts/restore.all
./buildscript restore.all
cooked/restore.all.ssh: scripts/restore.all.ssh
./buildscript restore.all.ssh
cooked/restore.metadata: scripts/restore.metadata
./buildscript restore.metadata
cooked/restore.tester: scripts/restore.tester
./buildscript restore.tester
cooked/save.metadata: scripts/save.metadata
./buildscript save.metadata
scripts: $(SCRIPTS)
tomsrtbt.eps: tomsrtbt.png
convert tomsrtbt.png tomsrtbt.eps
illos: tomsrtbt.eps
$(DOCUMENT): $(DOCUMENT).sgml $(SCRIPTS)
rm -r $(DOCUMENT).junk
mv $(DOCUMENT) $(DOCUMENT).junk
mkdir $(DOCUMENT)
cd $(DOCUMENT) ; /usr/bin/jade -t sgml -i html $(indexdsl) $(dslhtml) ../$(DOCUMENT).sgml
cp -rp *.png $(DOCUMENT)
# this target makes is easier to type as a target name. OK, I'm lazy.
html: $(DOCUMENT)
chunky: $(DOCUMENT)
$(DOCUMENT).smooth.html: $(DOCUMENT).sgml $(SCRIPTS)
/usr/bin/jade -V nochunks -t sgml -i html $(indexdsl) $(dslhtml) $(DOCUMENT).sgml > $(DOCUMENT).smooth.html
smooth: $(DOCUMENT).smooth.html
$(DOCUMENT).rtf: $(DOCUMENT).sgml $(SCRIPTS)
jade -t rtf -V rtf-backend $(dslprint) $(DOCUMENT).sgml
rtf: $(DOCUMENT).rtf
$(DOCUMENT).tex: $(DOCUMENT).sgml $(SCRIPTS) $(SCRIPTS) illos
jade -t tex -V tex-backend $(dslprint) $(DOCUMENT).sgml
tex: $(DOCUMENT).tex
# It seems to be necessary to run this thrice in order to get the TOC
# to work correctly. I don't understand it either.
$(DOCUMENT).dvi: $(DOCUMENT).tex $(SCRIPTS)
jadetex $(DOCUMENT).tex
jadetex $(DOCUMENT).tex
jadetex $(DOCUMENT).tex
dvi: $(DOCUMENT).dvi
$(DOCUMENT).ps: $(DOCUMENT).dvi $(SCRIPTS)
dvips -f $(DOCUMENT).dvi -o $(DOCUMENT).ps # -The 1.5cm,3cm ?? We don't need this, but non-US might.
ps: $(DOCUMENT).ps
# $(DOCUMENT).pdf: $(DOCUMENT).ps $(SCRIPTS)
# ps2pdf $(DOCUMENT).ps
# It seems to be necessary to run this thrice in order to get the TOC
# to work correctly, and to get the TOC into to the bookmarks panel on
# the left side of the acroread reader. I don't understand it either.
$(DOCUMENT).pdf: $(DOCUMENT).tex $(SCRIPTS) illos
pdfjadetex $(DOCUMENT).tex
pdfjadetex $(DOCUMENT).tex
pdfjadetex $(DOCUMENT).tex
pdf: $(DOCUMENT).pdf
all: html smooth rtf tex dvi ps pdf
ship: all
rm -r $(INSTALL)
cp -rp $(DOCUMENT) $(INSTALL)/
cp -p $(DOCUMENT).pdf $(DOCUMENT).ps *.png $(INSTALL)/
bzip2 -9 $(INSTALL)/$(DOCUMENT).ps
bzip2 -9 $(INSTALL)/$(DOCUMENT).pdf
tar -cvf $(DOCUMENT).smooth.html.tar $(DOCUMENT).smooth.html *.png
bzip2 -9 $(DOCUMENT).smooth.html.tar
mv $(DOCUMENT).smooth.html.tar.bz2 $(INSTALL)/
tar -cvf $(DOCUMENT).chunky.html.tar $(DOCUMENT)
bzip2 -9 $(DOCUMENT).chunky.html.tar
mv $(DOCUMENT).chunky.html.tar.bz2 $(INSTALL)/
cd .. ; tar -cvf $(DOCUMENT).tar $(DOCUMENT)/README `find $(DOCUMENT)/scripts ! -name "*~" ! -type d ` $(DOCUMENT)/$(DOCUMENT).sgml $(DOCUMENT)/buildscript $(DOCUMENT)/Makefile $(DOCUMENT)/*.png
cd .. ; bzip2 -9 $(DOCUMENT).tar
cd .. ; mv $(DOCUMENT).tar.bz2 $(INSTALL)/
ls -l $(INSTALL)
install: ship
--> -->
<type 'exceptions.IOError'> | Python 2.5.2: /usr/bin/python Sat Jun 29 12:51:47 2024 |
A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
/opt/ezmlm-browse-0.20/main.py in main() |
424
|
425 if path is not None:
|
426 main_path(path)
|
427 else:
|
428 main_form()
|
global main_form = <function main_form at 0x8df4c6c> |
/opt/ezmlm-browse-0.20/main.py in main_form() |
378 except ImportError:
|
379 die(ctxt, "Invalid command")
|
380 module.do(ctxt)
|
381
|
382 def main():
|
module = <module 'commands.showmsg' from '/opt/ezmlm-browse-0.20/commands/showmsg.pyc'>, module.do = <function do at 0x8dfc72c>, global ctxt = {'cmd': 'showmsg', 'threadidx': 0, 'HTTP_X_FORWA...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'} |
/opt/ezmlm-browse-0.20/commands/showmsg.py in do(ctxt={'cmd': 'showmsg', 'threadidx': 0, 'HTTP_X_FORWA...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}) |
18 write(html('msg-pager') % ctxt)
|
19 write('<hr>')
|
20 sub_showmsg(ctxt, ctxt[MSGNUM])
|
21 write('<hr>')
|
22 write(html('msg-pager') % ctxt)
|
global sub_showmsg = <function sub_showmsg at 0x8df41ec>, ctxt = {'cmd': 'showmsg', 'threadidx': 0, 'HTTP_X_FORWA...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, global MSGNUM = 'msgnum' |
/opt/ezmlm-browse-0.20/globalfns.py in sub_showmsg(ctxt={'cmd': 'showmsg', 'threadidx': 0, 'HTTP_X_FORWA...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, msgnum=1980) |
229 format_timestamp(ctxt, ctxt)
|
230 write(html('msg-header') % ctxt)
|
231 rec_showpart(ctxt, msg, 0)
|
232 write(html('msg-footer') % ctxt)
|
233 ctxt.pop()
|
global rec_showpart = <function rec_showpart at 0x8df41b4>, ctxt = {'cmd': 'showmsg', 'threadidx': 0, 'HTTP_X_FORWA...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, msg = <email.message.Message instance at 0x8e51dac> |
/opt/ezmlm-browse-0.20/globalfns.py in rec_showpart(ctxt={'cmd': 'showmsg', 'threadidx': 0, 'HTTP_X_FORWA...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, part=<email.message.Message instance at 0x8e51dac>, partnum=3) |
205 else:
|
206 for p in part.get_payload():
|
207 partnum = rec_showpart(ctxt, p, partnum+1)
|
208 else:
|
209 write(html('msg-sep') % ctxt)
|
partnum = 3, global rec_showpart = <function rec_showpart at 0x8df41b4>, ctxt = {'cmd': 'showmsg', 'threadidx': 0, 'HTTP_X_FORWA...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, p = <email.message.Message instance at 0x8e51fec> |
/opt/ezmlm-browse-0.20/globalfns.py in rec_showpart(ctxt={'cmd': 'showmsg', 'threadidx': 0, 'HTTP_X_FORWA...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, part=<email.message.Message instance at 0x8e51fec>, partnum=4) |
208 else:
|
209 write(html('msg-sep') % ctxt)
|
210 sub_showpart(ctxt, part)
|
211 return partnum
|
212
|
global sub_showpart = <function sub_showpart at 0x8df4144>, ctxt = {'cmd': 'showmsg', 'threadidx': 0, 'HTTP_X_FORWA...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, part = <email.message.Message instance at 0x8e51fec> |
/opt/ezmlm-browse-0.20/globalfns.py in sub_showpart(ctxt={'cmd': 'showmsg', 'threadidx': 0, 'HTTP_X_FORWA...HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate'}, part=<email.message.Message instance at 0x8e51fec>) |
164 type = ctxt[TYPE] = part.get_content_type()
|
165 ctxt[FILENAME] = part.get_filename()
|
166 template = html('msg-' + type.replace('/', '-'))
|
167 if not template:
|
168 template = html('msg-' + type[:type.find('/')])
|
global template = <function template at 0x8dece9c>, global html = <function html at 0x8deced4>, type = 'application/pgp-signature', type.replace = <built-in method replace of str object at 0x8e55e20> |
/opt/ezmlm-browse-0.20/globalfns.py in html(name='msg-application-pgp-signature') |
40
|
41 def html(name):
|
42 return template(name + '.html')
|
43
|
44 def xml(name):
|
global template = <function template at 0x8dece9c>, name = 'msg-application-pgp-signature' |
/opt/ezmlm-browse-0.20/globalfns.py in template(filename='msg-application-pgp-signature.html') |
31 except IOError:
|
32 if not _template_zipfile:
|
33 _template_zipfile = zipfile.ZipFile(sys.argv[0])
|
34 try:
|
35 f = _template_zipfile.open(n).read()
|
global _template_zipfile = None, global zipfile = <module 'zipfile' from '/usr/lib/python2.5/zipfile.pyc'>, zipfile.ZipFile = <class zipfile.ZipFile at 0x8d85a7c>, global sys = <module 'sys' (built-in)>, sys.argv = ['-c', '/opt/ezmlm-browse-0.20'] |
/usr/lib/python2.5/zipfile.py in __init__(self=<zipfile.ZipFile instance at 0x8e0034c>, file='-c', mode='r', compression=0, allowZip64=False) |
337 self.filename = file
|
338 modeDict = {'r' : 'rb', 'w': 'wb', 'a' : 'r+b'}
|
339 self.fp = open(file, modeDict[mode])
|
340 else:
|
341 self._filePassed = 1
|
self = <zipfile.ZipFile instance at 0x8e0034c>, self.fp = None, builtin open = <built-in function open>, file = '-c', modeDict = {'a': 'r+b', 'r': 'rb', 'w': 'wb'}, mode = 'r' |
<type 'exceptions.IOError'>: [Errno 2] No such file or directory: '-c'
args =
(2, 'No such file or directory')
errno =
2
filename =
'-c'
message =
''
strerror =
'No such file or directory'