This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem with centering images using DSSSLstylesheets?


Nik,

> Of course, this is only half the problem.  It might be that Jade (or
> OpenJade) isn't spitting out the correct TeX macros.  I don't know that
> much about TeX, but your best bet might be to get someone who does to
> write a small post-processor that takes the .tex file from (Open)Jade,
> pinpoints all the areas where external graphics are pulled in, and
> inserts the necessary TeX code to align the images for you.
>
> Sorry I can't be more helpful.

You were *very* helpful... so thank you!  You pointed me in the right
direction for where I had to go.

I needed to get *all* graphics centered, so what I wound up doing was
two brutal hacks directly to Norm's files (sorry, Norm!).

First, in 'print/db31.dsl', I added a 'quadding' line to mediaobject:

  (element mediaobject
    (make paragraph
      quadding: 'center
      ($mediaboject$)))

This centered 172 of my 175 graphics.  Annoyingly three would not
center although I could find *nothing* different about the DocBook
code.  So I went into 'print/dbgraph.dsl'... under (define $graphic$ fileref..
there is a (let statement that has a conditional for 'graphic-align'. 
I commented out those 6 lines (I said this was a *brutal* hack!) and
put in a final line of:

  (graphic-align 'center))

That fixed it and *all* my graphics were centered.  So... problem solved
for the moment... although it now hardcodes all my graphics to be centered.

FYI, this was done with DB 4.1/openjade 1.3/jadetex 3.3/DSSSL 1.62

Thanks for the help,
Dan

-- 
Dan York, Director of Training        dyork@e-smith.com
Ph: +1-613-751-4401  Mobile: +1-613-263-4312 Fax: +1-613-564-7739 
e-smith, inc. 150 Metcalfe St., Suite 1500, Ottawa,ON K2P 1P1 Canada
http://www.e-smith.com/            open source, open mind

------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-apps-request@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]