liam@cs.qmc.ac.uk (William Roberts) (04/21/86)
Summary:
Expires:
Sender:
Xpath: ukc eagle
You don't need a pre-processor to turn
.BM xsize ysize
into .fl
.nr x \n(.o+\n(.i
\!V\n(nl
\!H\nx
\!x B file-name
A Ditroff macro will do it perfectly well! A little care with
the \ are necessary, but what you want is probably:
.de BM
.fl
.nr x \\n(.o+\\n(.i
\\!V\\n(nl
\\!H\\nx
\\!x B filename
..
I didn't know you could use \n commands in \! - that is a
really useful feature for this sort of thing.
NOTE: this will blow any post-processor that doesn't know about
your B device control command. If you want to extend the
capabilities of you postprocessor, USE A COMMENT CONVENTION!
Changing the "x B filename" bit into "#B filename" doesn't make
life too hard for the postprocessor, and guarantees that your
files can be sensibly handled by other peoples' postprocessors.
Since Ditroff doesn't know about your bitmaps, you have to
leave a space for it anyway.
--
William Roberts ARPA: liam@UK.AC.qmc.cs
Queen Mary College UUCP: liam@qmc-cs.UUCP
LONDON, UKcaret@basser.oz (Neil Russell) (04/28/86)
In article <139@cs.qmc.ac.uk>, liam@cs.qmc.ac.uk (William Roberts) writes: > You don't need a pre-processor to turn > .BM xsize ysize > into .fl > etc No, but you should not need to know the size of the bitmap. This is the whole point of the pre-processor. Anyhow, I have done some research and found that the transparent mode command leaves a bit to be desired. Try: bit ... | troff -ms | ... .KS .BM filename .KE and your bitmap commands come out as text, via a diversion. It turns out that there has been a command added to DItroff to do this sort of thing: .cf filename which copies the contents of the named file directly to the output, after it adds some nice positioning commands. True, I have to mess with nasty tmp files for my pre-processor to talk to the print driver, but it works. I can't post the sources to this to the net, since it contains V8 code, to take the bitmaps. But maybe if there is any demand, I could post a censored version. Neil Russell ..!seismo!munnari!basser.oz!caret (tictoc is not ticking)