[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: Re: DOCBOOK: Efficiently including images in DocBook
On Wed, Oct 11, 2000 at 07:51:58AM -0400, Norman Walsh wrote: > / Nik Clayton <nik@nothing-going-on.demon.co.uk> was heard to say: > | in a file (call it foo.pdf) and then doing > | > | cp foo.def book.tex > | jade -Vtex-backend .... -t tex -o /dev/stdout book.sgml >> book.tex > | > | which seems to have the desired effect. > > Ok, then I can call the issue closed. Yes? Depends. I can now do: <mediaobject> <imageobject> <imagedata fileref="fig1"> </imageobject> <textobject> <literallayout>+---------------+ | A | +---------------+</literallayout> </textobject> <textobject> <phrase>A picture</phrase> </textobject> </mediaobject> However, in order to do that, I must define a %output.html.images entity, and do <![ %output.html.images; [ (define %graphic-default-extension% "png") ]]> and also a %output.print entity, and do <![ %output.print; [ ;; Norm's stylesheets are smart about working out what sort of ;; object to display. But this bites us. Since we know that the ;; first item is going to be displayable, always use that. (define (find-displayable-object objlist notlist extlist) (let loop ((nl objlist)) (if (node-list-empty? nl) (empty-node-list) (let* ((objdata (node-list-filter-by-gi (children (node-list-first nl)) (list (normalize "videodata") (normalize "audiodata") (normalize "imagedata")))) (filename (data-filename objdata)) (extension (file-extension filename)) (notation (attribute-string (normalize "format") objdata))) (node-list-first nl))))) ;; When selecting a filename to use, don't append the default ;; extension, instead, just use the bare filename, and let TeX ;; work it out. jadetex will use the .eps file, while pdfjadetex ;; will use the .png file automatically. (define (graphic-file filename) (let ((ext (file-extension filename))) (if (or tex-backend ;; TeX can work this out itself (not filename) (not %graphic-default-extension%) (member ext %graphic-extensions%)) filename (string-append filename "." %graphic-default-extension%)))) ]]> And then use Jade's -i option depending on which format we're building. Incidentally, my DSSSL probably sucks :-) So it's possible, but it's not exactly supported out of the box. N -- Internet connection, $19.95 a month. Computer, $799.95. Modem, $149.95. Telephone line, $24.95 a month. Software, free. USENET transmission, hundreds if not thousands of dollars. Thinking before posting, priceless. Somethings in life you can't buy. For everything else, there's MasterCard. -- Graham Reed, in the Scary Devil Monastery
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC