[comp.text.tex] Help! Problem with \special in picture environment.

eln272v@monu1.cc.monash.oz ( r lang) (06/29/90)

While writing an emtex driver for gnuplot using the LaTeX picture
environment, I found that items that I \put were being incorrectly placed.

I simplified the TeX file in an attempt to locate the problem.
The problem disappeared when I removed the \special commands.

The following LaTeX input will cause the problem.
The \special{em:message} causes a message to be printed
on the console by the dvi driver.

-----
\documentstyle{article}
\begin{document}
\setlength{\unitlength}{1pt}
\begin{picture}(100,50)(0,0)
\tenrm

\special{em:message}
\put(50,30){x}
\special{em:message}

\special{em:message}
\put(50,20){xxx}
\special{em:message}

\special{em:message}
\put(50,10){xxxxx}
\special{em:message}

\end{picture}
\end{document}
-----

This file should print three rows of x's as shown below
       x
       xxx
       xxxxx

Instead, the following output is produced
        x
         xxx
          xxxxx


Thinking it might be LaTeX, I simplified the TeX file
by converting it to plain TeX as given below.

-----
% test file to show strange behaviour of /special
% when the /special's are removed, the x's are vertically aligned
% when the /special's are present, the x's print in the wrong place

\tenrm

% \put is derived from picmac.tex
\def\put(#1,#2)#3{\raise#2\rlap{\kern#1 #3}\ignorespaces}

\hrule width 50pt height 1pt
\hbox{%
\special{em:message}
\put(50pt,30pt){x}
\special{em:message}

\special{em:message}
\put(50pt,20pt){xxx}
\special{em:message}

\special{em:message}
\put(50pt,10pt){xxxxx}
\special{em:message}
}%

\eject
\bye
-----

This exhibits the same problem.  
Again, removing the \special commands fixes it.

What's going on here!
Given that I want to use \special in the picture environment,
how do I make it work!!!

-- 
Russell Lang   Email: rjl@monu1.cc.monash.edu.au   Phone: (03) 565 3460
Department of Electrical and Computer Systems Engineering
Monash University, Australia