[texhax] TikZ and plain TeX [got many, but not all, examples to work

Jim Diamond Jim.Diamond at acadiau.ca
Sun Mar 9 18:08:49 CET 2014


On Sat, Mar  8, 2014 at 23:51 (-0800), Suresh Govindachar wrote:


> % I was able to get the expected output from many of the
> % examples in the TikZ manual by adding the ''\usetikzlibrary{}''
> % line shown below.
> %
> % I writing in plain TeX using MikTeX Windows 7, 64 bit;
> % compiling with the command "pdftex foo.tex"
> %
> % However, there still remain some issues illustrated in the code below:
> %
> %     1) ultra thick option doesn't work
> %     2) scaling option doesn't work
> %     3) the example on page 44 doesn't even compile:
> %        error message is about \frac on line 70
> %              ! Undefined control sequence.
> %% Plain TeX file
> \input tikz.tex
> \usetikzlibrary{intersections,arrows,angles,quotes,calc,decorations.pathmorphing,backgrounds,positioning,fit,petri}

> \baselineskip=12pt
> \hsize=6.3truein
> \vsize=8.7truein


> \tikzpicture{ultra thick}
> \draw (0,0) -- (0,1);
> \scope{thin}
> \draw (1,0) -- (1,1);
> \draw (2,0) -- (2,1);
> \endscope
> % adding following line does not help:
> % \scope{ultra thick}
>          \draw (3,0) -- (3,1);
> % \endscope
> \endtikzpicture

> will repeat vertical lines, but with scaling -- scaling has no effect:

> \tikzpicture{scale=30}

Try

\tikzpicture[scale=30]

and see if that works better for you.


\frac is a latex-ism.  Try replacing each of the \frac{1}{2} instances
with {1\over2}
You can probably find some web page somewhere describing why latex
people find \over so offensive.

No (immediate) idea about ultra thick.


Glad to see someone else using tikz with plain TeX.  Given a bug that
was introduced into the output routines years ago by a change to tikz,
and the lack of interest by (apparently) anyone but me, I was under
the impression that I was the only plain TeX tikz user.

Cheers.

                                Jim



More information about the texhax mailing list