[latexrefman] bitmap file bounding box through PS style cookie
Vincent Belaïche
vincent.belaiche at gmail.com
Mon Nov 1 17:52:37 CET 2021
I made a trial and it works, the file compiles and creates a box
without any compilation error, even though temp.foo contains nothing
else than the %%BoundingBox line.
I think I will rewrite this thing in a more down to earth way,
because, as I said (maybe not being a native speaker) I could not
catch the meaning.
V.
Le dim. 31 oct. 2021 à 23:49, Karl Berry <karl at freefriends.org> a écrit :
>
> Thus you may specify the size of bitmap files in a file with a
> PostScript style @code{%%BoundingBox} line if no other format is
> available.
>
> > I must admit that I cannot understand this. Do it mean that you
> > convert the bitmap file to a postscript file with, say, imagemagick,
> > and then you can edit manually the %BoundingBox line.
> > anything-else meant ?
>
> No, that's not what's meant. I didn't write this, but as I understand it
> the idea (not stated, and not worth going into detail about, seems to
> me) is to suppose there is some unknown image format, say, a ".foo"
> file. The (La)TeX drivers know nothing about the foo format. But you can
> put a line like
> %%BoundingBox: 1 2 3 4
> at the top of your x.foo image file, and the drivers will find it.
>
> That is, the LaTeX graphics package falls back to EPS parsing as a
> default, and the only thing it cares about is finding a %%BoundingBox
> line. So the rest of the file doesn't actually have to be .eps.
>
> I haven't tested any of this. Just my understanding.
>
> Is the kind of trick documented here desirable, futureproof,
> portable, etc… ?
>
> Certainly. It's just a line of text. -k
More information about the latexrefman
mailing list.