1

I'm trying to get separate images from eqnarray lines. Problem is that I can't properly insert starting/closing image \specials for tex4ht. Lets consider a minimal example (plain tex):

\def\startpic{\special{t4ht++math.png}}
\def\stoppic{\special{t4ht+}}

\newif\ifnotfirstcr
\everycr{\ifnotfirstcr\noalign{\stoppic}\fi}

$$\halign{%
  \startpic
  a#&b#&c#\cr
  \global\notfirstcrtrue 
  1&2\cr 1\cr
}$$
\bye

I add closing image tex4ht tag (\stoppic) to \everycr (if its not a first \cr). And starting image tex4ht tag (\startpic) at the start of \halign line template.

After compiling TeX and running tex4ht on created .dvi file I get warnings:

--- warning --- Improper groups in \special{t4ht+}... idv[1]
--- warning --- Improper groups in \special{t4ht+}... idv[1]
--- warning --- Improper groups in \special{t4ht+}... idv[1]
--- warning --- Improper groups in \special{t4ht+}... idv[2]
--- warning --- Improper groups in \special{t4ht+}... idv[2]

Problem is that special1 14 't4ht++math.png' and special1 15 't4ht+' are not in the same DVI file group level.

[
d4 -41497562
d3 1572864
                <------------------ should be here: special1 14 't4ht++math.png'
[
[
special1 14 't4ht++math.png'                    <------- instead of here
fd1 0 11374260171 655360 655360 0 5 '' 'cmr10'
fn0
(a1)
]
[
r3 655362
(b2)
]
]
special1 5 't4ht+'
d3 786432
                <------------------ should be here: special1 14 't4ht++math.png'
[
[
special1 14 't4ht++math.png'                    <------- instead of here
(a1)
]
]
special1 5 't4ht+'
]

Maybe I'm adding \stoppic in a wrong place, but I tried \halign line template to write like: \startpic a#&b#&c# \stoppic\cr, but I get the same warnings. Maybe anybody could advise how to properly add t4ht++ and t4ht++ specials to DVI within \halign?

  • You might want to add the keyword "plain tex", but then \halign is a dead giveaway. – John Kormylo Sep 27 '14 at 2:28
  • do you want every table cell as standalone picture, or may whole table be converted into one picture? – michal.h21 Oct 31 '14 at 12:53
  • I want every equation of eqnarray make as a separate picture. Standard eqnarray is made via \halign. So answering your question is: I want every table cell as standalone picture – Linuxss Oct 31 '14 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.