This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Aligning TeX-formulas included as EPS or PNG
- From: Doug du Boulay <ddb at owari dot msl dot titech dot ac dot jp>
- To: Steffen Glückselig <glueckselig at gungfu dot de>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Wed, 26 Jan 2005 14:58:50 +0900 (JST)
- Subject: Re: [docbook-apps] Aligning TeX-formulas included as EPS or PNG
On Saturday 22 January 2005 20:34, Steffen Glückselig wrote:
> I'd like to align formulas included as inlinemediaobjects vertically
with
> the line of the surrounding text. E.g. formulas with subscript get
> misaligned to the top.
>
> How could I do this? Is there some automatism, like a script that would
do
> this for me?
Hi Steffen,
I discovered this about 3 days ago.
if you use the dbtexmath stuff with dvi2bitmap-0.13b2 :
given markup like this:
<inlineequation><alt role='tex'>\( (\Matrix{W}_1,\Vector{w}_1)\) </alt>
</inlineequation>
combined with an appropriate math.xsl customization, can lead to a
tex math file with the contents:
\documentclass[leqno,11pt]{revtex4}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{concmath}
\newcommand{\Vector}[1]{\mathbf{#1}}
\newcommand{\Matrix}[1]{\mathbf{#1}}
\pagestyle{empty}
\begin{document}
\allowdisplaybreaks
\noindent\special{dvi2bitmap mark}
\special{dvi2bitmap outputfile equations/2.1-inl-11.png}
\( (\Matrix{W}_1,\Vector{w}_1)\) \newpage
which with a Makefile containing the following
IMAGEFORMAT=-T png
DVIOPT= ${IMAGEFORMAT} --magnification=2 --scale=2 --font-mode=ibmvga \
--resolution=110 --colors=foreground=50/50/50
latexequations: tex-math-equations.tex
-latex tex-math-equations.tex
${DVI2BITMAP} ${DVIOPT} --verbose=quiet --query=bitmaps
tex-math-inlines | \
awk '{printf "img[src=\"%s\"]
{margin-bottom:%dpx;}\n",$$2,$$6-$$4}' > \
inline-equations.css
then include the inline-equations.css as an extra stylesheet for your
document
Thats the general idea anyway.
cool or what?
hope it helps
Doug