John Goche <
johng...@googlemail.com> wrote:
> [...]does not give me a large enough size even when I use the \Huge
> directive.
> [...]I see the dvipng command has a wonderful
> -D flag which gives enough support for this
> [...]I would like my images to be exactly square,
> with adequate _padding_ added as needed. For this I have tried
> enclosing the text in a fancybox but I still don't know how
> to make the fancybox square
> or of a specified size with the math centered within it.
You're using these images in an html document with an <img> tag???
If that's right, then I think you could use my program
http://www.forkosh.com/mathtex.html for all of this.
You can read the details at its homepage there, or just look
at the sample page I put at
http://www.forkosh.com/mathtest.html
and see its page source.
The base expression for the sample is \frac{a}{\sqrt{1+a^2}}
embedded in the tag
<img src="
http://www.forkosh.dreamhost.com/mathtex.cgi?
\png\frac{a}{\sqrt{1+a^2}}" align="absmiddle">
That \png tells mathtex to generate a png rather than
its default gif. Then change the base expression to
\png\color{blue}\frac{a}{\sqrt{1+a^2}}
and mathtex automatically includes the color package.
Then add
\png\dpi{300}\color{blue}\frac{a}{\sqrt{1+a^2}}
and mathtex automatically uses that -D switch when it runs dvipng.
Finally, to square it off, use height and width attributes
in the html <img> tag, so the whole end result becomes
<img src="
http://www.forkosh.dreamhost.com/mathtex.cgi?
\png\dpi{300}\color{blue}\frac{a}{\sqrt{1+a^2}}"
height=100 width=100 align="absmiddle">
You can see all that being done in the page source.
I didn't try to pad it off with a box, but that ought to
work with mathtex if it works for you.
It seems to me like the one trick you missed was
trying to square off the image within latex rather
than just using those html height and width attributes.
That ought to work with any other solution besides mathtex
that's been mentioned in this thread, too.
If you want to use mathtex and are just doing a few hundred images,
feel free to use that cgi at
forkosh.dreamhost.com,
in which case you don't need anything installed on your server.
If you're doing thousands, please install the gpl'ed program
yourself (see its homepage cited above for details).
--
John Forkosh ( mailto:
j...@f.com where j=john and f=forkosh )