[texhax] TikZ and plain TeX [Update: more issues resolved]
Suresh Govindachar
sgovindachar at yahoo.com
Sun Mar 9 17:47:36 CET 2014
% 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"
%
% Regarding my earlier post about some of the issues I was
% having, I got a direct reply that resolved the issue with
% scaling:
%
% Replace curly brackets in \tikzpicture{scale=3}
% by square brackets: \tikzpicture[scale=3]
%
% and also explained the issue with \frac -- need to:
%
% Replace \frac{1}{2}
% with {1\over2}
%
% I was then able to get the thickness option to work by
% using square brackets "everywhere": with both \tikzpicture
% and \scope (see code below).
%
% What is puzzling is that it doesn't seem to matter whether
% ">=stealth" is specified with curly or with square brackets.
%
% So: what's the difference between curly and square brackets,
% when to use which, and why does it matter for line
% thickness but not for arrow style?
%
%
%% 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]
\scope[thick]
\draw (0,0) -- (0,1);
\endscope
\scope[thin]
\draw (1,0) -- (1,1);
\draw (2,0) -- (2,1);
\endscope
% back to the local default of 'ultra thick'
\draw (3,0) -- (3,1);
\endtikzpicture
Stealth arrows with curly brackets:
\tikzpicture{>=stealth}
\draw [->] (0,0) arc [start angle=180, end angle=30, radius=10pt];
\draw [<<-,very thick] (1,0) -- (1.5cm,10pt) -- (2cm,0pt) --
(2.5cm,10pt);
\endtikzpicture
Again but with square brackets:
\tikzpicture[>=stealth]
\draw [->] (0,0) arc [start angle=180, end angle=30, radius=10pt];
\draw [<<-,very thick] (1,0) -- (1.5cm,10pt) -- (2cm,0pt) --
(2.5cm,10pt);
\endtikzpicture
% Another issue is that \footnotesize that I happened to find
% in some example is not recognized
% \foreach \s in {1,2,3}{(i-\s) circle (2pt) node {\footnotesize\s}};
More information about the texhax
mailing list