7.1 Picture environment

This section looks only at graphics available without graphics packages, that is, internal to standard LaTeX. Kopka and Daly [3] explain that “Standard LaTeX  does actually contain the means to make primitive drawings on its own”.

The unitlength has to be set before the picture environment can be used. In order that this works in the transformations the length must be 1pt.

\setlength{\unitlength}{1pt}

The \PICalt wrapper on the picture environment allows the creation of an alt tag which is the whole picture command itself. This may be an acceptable way to produce very simple pictures directly in LaTeX. A screenreader user would effectively have to imagine what the picture looked like from the description of the parts. If you can’t do this then neither can they! As a rule of thumb therefore, don’t use the method to encode anything that you get wrong the first time you tried to encode it. All floats such have a caption, label and reference in the text to support navigation. There is an example picture (Figure. 1) below.

\begin{figure}[!hptb]
\noindent
\PICalt{
\begin{picture}(320,100)
\framebox(320,100){Not made earlier!}
\put(0,0){\vector(-1,1){20}}
\put(0,100){\vector(-1,-1){20}}
\put(-320,100){\vector(1,-1){20}}
\put(-320,0){\vector(1,1){20}}
\put(-80,50){\circle{100}}
\put(-240,50){\circle{100}}
\put(-160,50){\oval(100,30)}
\put(-320,50){\line(1,0){80}}
\put(0,50){\line(-1,0){80}}
\qbezier(-240,0)(-160,50)(-80,0)
\end{picture}
}
\caption{Example of picture environment}\label{picture1}
\end{figure}

\begin{picture}(320,100)\framebox(320,100){Not made earlier!} \put(0,0){\vector(-1,1){20}} \put(0,100){\vector(-1,-1){20}} \put(-320,100){\vector(1,-1){20}} \put(-320,0){\vector(1,1){20}} \put(-80,50){\circle{100}} \put(-240,50){\circle{100}} \put(-160,50){\oval(100,30)} \put(-320,50){\line(1,0){80}} \put(0,50){\line(-1,0){80}} \qbezier(-240,0)(-160,50)(-80,0) \end{picture}

Figure 1: Example of picture environment