[l2h] Handling complex macros...

Avinash Chopde avinash@acm.org
Sat, 02 Jun 2001 09:58:01 -0400


I'm sure there is a easy workaround for this problem - I've a very
complex \diatop def, and latex2html reports it will only be handled if
it is processed by latex. I did put the use of the macro in {makeimage}
but that did not bring in the definition - then I put the definition
in between a {makeimage} and used \gdef instead of \def - but that
did not work too!

What is the correct way to do this, so I can use \diatop in
my {makeimage}?

Example document that fails:

\documentclass{article}

\usepackage{html} % from standard latex2html package

\def\diatop[#1|#2]{{\setbox1=\hbox{{#1{}}}\setbox2=\hbox{{#2{}}}%
	\dimen0=\ifdim\wd1>\wd2\wd1\else\wd2\fi%
	\dimen1=\ht2\advance\dimen1by-1ex%
	\setbox1=\hbox to1\dimen0{\hss#1\hss}%
	\rlap{\raise1\dimen1\box1}%
	\hbox to1\dimen0{\hss#2\hss}}}%
%e.g. of use: \diatop[\'|{\=o}] gives u macron acute

\begin{document}

\begin{makeimage} \diatop[\a=|\d r] \end{makeimage}

\end{document}



-- 
Avinash Chopde
e-mail: avinash@acm.org
http://www.aczone.com/