8 Sep 00:54 2014

### Tikz and Latex math mode

Good afternoon all,
I am trying to (1) draw diagrams and position them, and
(2) fit these gracefully inside $$..$$ structures.
I seem to have settled (1) below, but (2) still eludes me.
I have not managed  to find sections of the manual covering such things -
perhaps I don't recognize them! And I looked in the archives
without success.

Cheers
Greg Bennett
%-- Start code
%% This is tikz-try.tex
%% Can I draw tableau diagrams ?
%% This will need tikz and, later, math mode in LaTeX when
%% I need to take functions of diagrams.

%% The diagrams consist of rows of boxes, left aligned, one under the other
%% always with non-increasing lengths. They correspond to the partition
%% of integers.

%% Thus 4 = 2+1+1 leads to a diagram with row1 having 2 (empty) square boxes,
%% row 2 has 1, and row 3 has 1.

%% Since the bottom line of each row doubles as the top line of the row beneath it,
%% and since tha right side of, e.g., the first box is the left side of the second,
%% I really only need to draw a sequence of left, bottom shapes - reverse Ls,
%% and then (1) draw a top line, and (2) draw the left sides for the first box in
%% each row.

\documentclass{article}
\usepackage{tikz}
\begin{document}

%% Flexibility suggests that the code for a row take 3 arguments:
%% x,y for the top left of its initial box to allow arbitrary placement,
%% n for the number of cells. Here goes!

\newcommand{\drawrow}[3]{% x1, y1, n
\foreach \shift in {1,...,#3}{
\draw[line width=1pt] ( #1 + \shift,#2)--(#1 + \shift, #2 - 1);
\draw[line width=1pt] (#1 + \shift,#2 - 1)--(-1 + #1 + \shift, #2 - 1);
}
}

\newcommand{\drawleft}[2]{%x1, y1
\draw[line width=1pt] (#1,#2)--(#1, #2 - 1);
}

%% Now the top row
\newcommand{\toprow}[3]{%x1, y1, n
\draw[line width=1pt] (#1,#2)--(#1+#3,#2); % top line
\drawleft{#1}{#2}; % close the first box on the left
\drawrow{#1}{#2}{#3}; % draw the rest of the reverse-L shapes
}

%% and then other rows
\newcommand{\otherrow}[3]{%x1, y1, n
\drawleft {#1}{-1*#2}; % left close this row
\drawrow{#1}{-1*#2}{#3}; % draw the reverse-L shapes
}

%% Here (I hope) and some diagrams side by side
%% with some symbols too.

\begin{tikzpicture}[scale=0.5]
\toprow{1}{0}{2};
\otherrow{1}{1}{1};
\otherrow{1}{2}{1};
\draw (4,-1) node {$=$};
\toprow{6}{0}{1};
\otherrow{6}{1}{1};
\otherrow{6}{2}{1};
\draw (9,-1) node {$+$};
\toprow{11}{0}{2};
\otherrow{11}{1}{1};
\end{tikzpicture}

%% Now I need to wrap the left diagram as an argument to a function D
%% since the result is D(first diagram) = second diagram + third diagram.

%% Try putting the whole thing inside math delimiters:
$$D = \left( \begin{tikzpicture}[scale=0.5] \toprow{1}{0}{2}; \otherrow{1}{1}{1}; \otherrow{1}{2}{1}; \end{tikzpicture} \right) \begin{tikzpicture}[scale=0.5] \draw (4,-1) node { = }; \toprow{6}{0}{1}; \otherrow{6}{1}{1}; \otherrow{6}{2}{1}; \draw (9,-1) node { + }; \toprow{11}{0}{2}; \otherrow{11}{1}{1}; \end{tikzpicture}$$

%% Well that's not quite right in two ways. The diagrams need to be lowered
%% relative to the parentheses, and those need to become a bit smaller.
%%

\end{document}
%--End code
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users

7 Sep 13:41 2014

### Problem using plain TeX and the circuits package.

Hi,

when I tried to reproduce the electric schema p.574 of the manual with the code

\tikz [circuit ee IEC] {
\node (R1) [resistor,point up,ohm=5] at (3,1) {};
\node (R2) [resistor,ohm=10k]
at (0,0) {};
\draw (R2) -| (R1);
}

I noticed this problem :

• the use of \mathrm in the package code make impossible the use of the option "ohm=xx" ;

Is there a way to overrun this ?

Paul Bourdet
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users

27 Aug 18:09 2014

### TikZ bug in ConTeXt

Hi,

Anyone could help me with this bug: http://www.ntg.nl/pipermail/ntg-context/2014/077374.html
It seems that ConTeXt does not change the TikZ color. I don't know it it's context or tikz bug.

Can anyone test it?
I use context minimals.

Xavier
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users

6 Aug 14:01 2014

### pgf 3.0 manual nonlineartransformations example

Dear all,

today I installed MacTeX2014 on my computer, mainly because of pgf 3.0.
I want to explore this cool new nonlineartransformation feature and
started by testing the examples from the manual (starting p. 1057).
By surrounding the \def\polartransformation with a pair of \makeatletter
\makeatother I was able to get the polar transformation working.

Now I am stuck with the examples regarding the curvilinear library...
I am getting an error
"! Undefined control sequence.
<argument> \pgf
l.14	\draw (0,-30pt) grid [step=10pt] (80pt,30pt);
?"
with the following code:

\documentclass[tikz]{standalone}
\usepgfmodule{nonlineartransformations}
\usetikzlibrary{curvilinear}
\begin{document}
\begin{tikzpicture}
\draw [help lines] (0,0) grid (3,2);
{
\pgfsetcurvilinearbeziercurve
{\pgfpoint{0mm}{20mm}}
{\pgfpoint{11mm}{20mm}}
{\pgfpoint{20mm}{11mm}}
{\pgfpoint{20mm}{0mm}}
\pgftransformnonlinear{\pgfpointcurvilinearbezierpolar\pgf <at> x\pgf <at> y}%
\draw (0,-30pt) grid [step=10pt] (80pt,30pt);
\draw [blue, very thick] (20pt,10pt) -- (0,0) -- (20pt,-10pt);
}
\draw[red, very thick]
(0mm,20mm) .. controls (11mm,20mm) and (20mm,11mm) .. (20mm,0mm);
\end{tikzpicture}
\end{document}

This is working, however, with the \polartransformation in effect (and
eliminated \pgfsetcurvilinearbeziercurve{}{}{}{} and curvilinear library).

Reading the manual, I would expect the \pgfpointcurvilinearbezierpolar
to have two arguments {}{}, missing in the code. But just putting \pgf <at> x
and \pgf <at> y there doesn't do the trick. (Don't laugh at me, I don't know

Do you have any suggestions?

Thanks and all the best,
Anuschka

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.

17 Jul 22:52 2014

### document class change causes tikz errors

I have a flowchart that works in the article document class, but when I
change document class to mnthesis, it does not recognize tikZ.  Any ideas?
Does the document class file (mnthesis.cls) have to inside the Latex program
file to be activated, or does it just need to be in the same folder as the
test1.tex file?  Here is a file of my flow chart (test1.tex).  Next is a
file of the 'mnthesis.cls' file.  Any help is appreciated.

% thesis.tex: Primary TeX control file for thesis.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[11pt, oneside]{article} % change to 'mnthesis' to run U of M
thesis document
\usepackage{epsfig,epic,eepic,units}
\usepackage{hyperref}
\usepackage{url}
\usepackage{longtable}
\usepackage{mathrsfs}
\usepackage{multirow}
\usepackage{bigstrut}
\usepackage{amssymb}
\usepackage{graphicx}

\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{float}
\usepackage{booktabs}
\usepackage{chngcntr}
\usepackage{pgfplots}  %pgfplots.sourceforge.net\pgfplots.pdf
\pgfplotsset{compat=1.8}
\usepackage{rotating}
\usepackage{pdfpages}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes}

\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.shapes}
\usetikzlibrary{patterns}
\usetikzlibrary{calc}
\usetikzlibrary{decorations.text}
\usetikzlibrary{decorations.footprints}
\usetikzlibrary{decorations.fractals}
\usetikzlibrary{shapes.gates.logic.IEC}
\usetikzlibrary{shapes.gates.logic.US}
\usetikzlibrary{fit,chains}
\usetikzlibrary{positioning}
\usepgflibrary{shapes}
\usetikzlibrary{scopes}

\counterwithin{table}{section}
\counterwithin{figure}{section}

\begin{document}

\begin{figure}
\caption{Flowchart of Zambian Modeled Economy}
\tikzstyle{demand} = [draw, rectangle, fill=blue!50, text width=29em, text
centered, minimum height=10mm, node distance=4em]
\tikzstyle{market} = [draw, diamond, fill=blue!50, text width=2em, text
centered, minimum height=12mm, node distance=4em]
\tikzstyle{stage} = [draw, rectangle, fill=blue!50, text width=5em, text
centered, minimum height=8mm, node distance=4em]
\tikzstyle{sector}=[draw, circle, fill=red!50,minimum height=20mm, text
width=4em, text centered]
\tikzstyle{line} = [draw, -stealth, thick]

\begin{tikzpicture}
\footnotesize

%Consumer Demand
\node [demand] (consdemand) {Consumer Demand\\$y_{m}$$\leq$$q_{m}$
\hspace{12mm}     $y_{s}$=$q_{s}$ \hspace{16mm}    $y_{r}$=$q_{r}$
\hspace{12mm}  $y_{d}$=$q_{d}$};

%Manufacturing
\node [market, below of=consdemand, yshift=-25, xshift=-40mm] (manfmkt)
{Manf Market};
\node [stage, below of=manfmkt, yshift=-18mm] (MLK) {Labor and Capital};
\node [sector, below of=MLK, yshift=-104mm] (manuf) {Manu-facturing};
\node [stage, left of=manfmkt, xshift=-13mm,yshift=0mm] (imex2) {Imports,
Exports};
\node [stage, left of=manuf, yshift=-15mm, xshift=-24mm] (factorinc) {HH
Factor Income};

%Modern Food Channel
\node [market, below of=consdemand, yshift=-9mm, xshift=-14mm] (modfoodmkt)
{Modern Food Mkt};
\node [stage, below of=modfoodmkt, yshift=-2mm] (modfoodret) {Modern Food
Ret};
\node [stage, below of=modfoodret, yshift=-2mm] (MFLK) {Labor and Capital};
\node [market, below of=MFLK, yshift=-2mm] (WSfoodmkt) {WSale Output};
\node [stage, below of=WSfoodmkt, yshift=-2mm] (processors) {Processors};
\node [market, below of=processors, yshift=-2mm] (comfarmoutput) {Com Farm
Output($Y_{c}$)};
\node [stage, below of=comfarmoutput, yshift=-2mm] (commfarms) {Labor and
Capital};
\node [market, below of=commfarms, yshift=-2mm] (modlandmkt) {Modern Land
Mkt};
\node [stage, below of=modlandmkt, yshift=-2mm] (commland) {Commercial Land
($H_{c}$)};
\node [sector, below of=commland, yshift=-6mm] (modfood) {Modern Food
Channel};
\node [stage, left of=comfarmoutput, xshift=-39mm,yshift=0mm] (imex1)
{Imports, Exports};

%Services Channel
\node [market, below of=consdemand, yshift=-9mm, xshift=13mm] (servicesmkt)
{Services Market};
\node [stage, below of=servicesmkt, yshift=-18mm] (SLK) {Labor and Capital};
\node [sector, below of=SLK, yshift=-103mm] (serv) {Services};

\node [market, below of=consdemand, yshift=-9mm, xshift=40mm] (tradfoodmkt)
Food Ret};
\node [stage, below of=tradfoodret, yshift=-2mm] (TLK) {Labor and Capital};
Output($Y_{h}$)};
\node [stage, below of=tradfarmoutput, yshift=-2mm] (SHfarms) {Labor and
Capital};
\node [stage, below of=tradlandmkt, yshift=-2mm] (smallholderland)
{Smallholder Land ($H_{h}$)};
\node [sector, below of=smallholderland, yshift=-6mm] (tradfood)

% Path Lines
\path [line][<->] (comfarmoutput) -- (imex1);
\path [line] [<->] (imex1) -- (imex2);
\path [line] [<->] (imex2) -- (manfmkt);
\path[line] (manfmkt) -- (consdemand);
\path[line] (modfoodmkt) -- (consdemand);
\path[line] (servicesmkt) -- (consdemand);
\path[line] (MLK) -- (manfmkt);
\path[line] (SLK) -- (servicesmkt);
\path[line] (MFLK) -- (modfoodret);
\path[line][->>,very thick] (manuf) |- (factorinc);
\path[line][->>,very thick] (modfood) |- (factorinc);
\path[line][->>,very thick] (serv) |- (factorinc);
\path[line][->>,very thick] (factorinc) |- (consdemand);
%\draw[->] (manuf) -- (manuf -| consdemand);

\end{tikzpicture}
\end{figure}
\end{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% mnthesis.cls: mnthesis document class (Latex)
% Les Clowney ----- modified by K. Thorne for UofMinn
%
%  5/12/89   make version for University of Minnesota
%  11/23/89  modifications for 11-pt version for UofM
%  3/25/94   add in signature and abstract signature pages. -Jeff Nelson
%  5/4/2005  Modify to latex2e class format from old style format - BPS
%  5/24/2007 Fix the title and abstract page formatting. - BPS
% 11/17/2009 Fixed ordering of acknowledgments and abstract as required - PP
% 11/17/2009 Note: Table of content and list of Figures are ok in 'draft'
format, not in 'final' (which is default) - PP
% 5/21/2010 Added Dedication - EB
% 5/24/2010 Added section to correctly give M.S. thesis or Ph.D.
dissertation - EB
% 11/23/2010 Fixed the issue with restarting the numbering of pages if both
Acknowledgement and Dedication pages are present
%            If Dedication page alone is present please uncomment line 406
- Sriram Doraiswamy
% 11/23/2010 Fixed the problem where additional pages of Acknowledgement
were not correctly numbered - Sriram Doraiswamy
% 11/25/2010 Name of the advisor and Master of Arts or Science appears
properly - Sriram Doraiswamy

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Summary of New Commands (many are not used outside of the style file)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%The following are primarily for the titlepage et al....
%\draft			(this invokes the macro \draftrue)
%\figurespage		(make a page for list of figures)
%\tablespage		(make a page for list of tables)
%\title{thesis title}	(this is defined by the report style)
%\author{author's name}	(this is defined by the report style)
%\phd			(if invoked then \phdtrue is set.)
%\degree{degree type}	(Default "Master of Science")
%
%\words{words in abstract}
%\abstract{the body of the abstract}
%\acknowledgements{the body of the acknowledgments}
%\dedication{the body of the dedication}
%\submissionyear{year of submission to the Graduate School}
%\submissionmonth{month of submission to the Graduate School}
%(The default dates used will be those at which the document was prepared)
%\begin-end{vita}  (begin single spacing after this point for the vita)
%
%       ******* Booleans *******
%\ifpagestyletopright	(invoke \pagestyle{topright})
%\ifdraft		(Will do some things differently if draft. Set by \draft)
%\ifabstract		(set if command \abstract invoked)
%\ifpreface		(set if command \preface invoked)
%\ifextra		(set if command \extra invoked)
%\ifacknowledgements	(set by \acknowledgements)
%\ifabstract		(set by \abstract)
%\iffigures
%\iftables
%\ifafterpreface (afterpreface sections pagenumber must be at topright
%               corner. If user has chosen a header then it must be
overridden.)
%               (Produce a List of figures? The default is to do so.)
%\tablestrue
%               (Produce a List of tables?)
%\begin/end{descriptionlist} (Basically a modified  \description.)
%\fullpagefigure Creates a figure where the page is a vbox whose
%                height is \textheight.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Redefine the way that LaTeX starts up so that its simpler to use.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{report.cls}\relax
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PAGE LAYOUT
% We need 1" (~72pt) margins except on binding edge, where it is 1 1/2".
% They are a bit larger to handle lines with overfull boxes.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% My Definitions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setlength{\paperheight}{11.0in}
\setlength{\paperwidth}{8.5in}

%\setlength{\oddsidemargin}{1.937cm}  % default -> 2.0 cm odd side
%\setlength{\oddsidemargin}{0.55in} % final version to grad school
\setlength{\oddsidemargin}{0.55in}
\setlength{\evensidemargin}{0.1in} % default -> 3.4 cm even side
%\setlength{\evensidemargin}{0.1in} % default -> 3.4 cm even side

%\setlength{\topmargin}{0.75in}
\setlength{\topmargin}{0.25in}

\setlength{\marginparsep}{0in}
\setlength{\marginparwidth}{0in}

\setlength{\textwidth}{5.75in}
%\setlength{\textheight}{8.25in}
\setlength{\textheight}{7.85in}

\setlength{\footskip}{0.4in}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Documentstyle Modifications
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\brokenpenalty=10000 % Do not break pages at hyphens.

% use baselinestretch of 2.0 for 10 pt
% use baselinestretch of 1.6 for 11 pt
%
\def\baselinestretch{1.6}
%\ <at> normalsize
%\def\baselinestretch{1.2}

\ <at> addtoreset{equation}{chapter} % Set things up so that the equation,
% thefigure, and thetable counters are reset by incrementing
% thechapter. (The others are correct in the report style.)

%\def\tableofcontents {
%  \ <at> restonecolfalse
%  \if <at> twocolumn
%    \ <at> restonecoltrue\onecolumn
%  \fi
CONTENTS}}
%  \ <at> starttoc{toc}
%  \if <at> restonecol
%    \twocolumn
%  \fi
%}

% single space bibliography, quotations and verse.
\renewenvironment{thebibliography}[1] {
\chapter*{References}
\ <at> mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}
\list{\ <at> biblabel{\ <at> arabic\c <at> enumiv}} {
\settowidth\labelwidth{\ <at> biblabel{#1}}
\leftmargin\labelwidth
\ <at> openbib <at> code
\usecounter{enumiv}
\let\p <at> enumiv\ <at> empty
\renewcommand\theenumiv{\ <at> arabic\c <at> enumiv}
}
\sloppy
\clubpenalty4000
\ <at> clubpenalty \clubpenalty
\widowpenalty4000
\sfcode\.=1000\relax
%\sfcode\.\ <at> m
} {
\def\ <at> noitemerr {
\ <at> latex <at> warning{Empty thebibliography environment}
}
\endlist
}

\def\ps <at> topright {
\let\ <at> mkboth\ <at> gobbletwo
\def\ <at> evenfoot{}
\def\ <at> oddfoot{}
}

%  ***** Verbatim listing macro ****
%  Code from the TeXbook for inputting a file and listing it verbatim in
%  \tt mode. Will not properly handle tabs.  This code hasn't been
%  rigorously tested so it should be used cautiously.  Note that the
%  left quote. "", is redefined when the macro is finally used or 
%  isn't properly handled.
\def\uncatcodespecials{\def\do##1{\catcode##1=12 }\dospecials}
\def\setupverbatim {
\tt \def\par{\leavevmode\endgraf}\catcode\=\active
\obeylines \uncatcodespecials \obeyspaces
} {
\obeyspaces\global\let =\
}
\def\listing#1{
\par\begingroup\setupverbatim\input#1
\endgroup
}

% This is in limbo right now...make heading and subheading as in Scribe.
\ <at> startsection{donothing}{donothing}{\z <at> }
{-3.25ex plus -1ex minus -.2ex}{1.5ex plus .2ex}
{\centering\large\bf}
}

% Single Space Figures, Tables, and Footnotes
% Redefine the macro used for floats (including figures and tables) so
% that single spacing is used.  (Note \def\figure{\ <at> float{figure}set
% single spacing} doesn't work because figure has an optional argument)
\def\ <at> xfloat#1[#2] {
\ifhmode
\ <at> bsphack\ <at> floatpenalty -\ <at> Mii
\else
\ <at> floatpenalty-\ <at> Miii
\fi
\def\ <at> captype{#1}
\ifinner
\ <at> parmoderr\ <at> floatpenalty\z <at>
\else\ <at> next\ <at> currbox\ <at> freelist {
\ <at> tempcnta\csname ftype <at> #1\endcsname
\multiply\ <at> tempcnta\ <at> xxxii\advance\ <at> tempcnta\sixt <at>  <at> n
\ <at> tfor \ <at> tempa :=#2\do {
\if\ <at> tempa h\advance\ <at> tempcnta \ <at> ne\fi
\if\ <at> tempa t\advance\ <at> tempcnta \tw <at> \fi
\if\ <at> tempa b\advance\ <at> tempcnta 4\relax\fi
\if\ <at> tempa p\advance\ <at> tempcnta 8\relax\fi
}
\global\count\ <at> currbox\ <at> tempcnta
} \ <at> fltovf\fi
\global\setbox\ <at> currbox\vbox\bgroup
\def\baselinestretch{1}\ <at> normalsize
\boxmaxdepth\z <at>

% leave captions indented, I hope
% \hsize\columnwidth
\ <at> parboxrestore
}

% Single space footnotes.
\long\def\ <at> footnotetext#1{
\insert\footins{
\def\baselinestretch{1}\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep
\splitmaxdepth \dp\strutbox \floatingpenalty \ <at> MM
\hsize\columnwidth \ <at> parboxrestore
\edef\ <at> currentlabel{\csname p <at> footnote\endcsname\ <at> thefnmark}
\ <at> makefntext {
\rule{\z <at> }{\footnotesep}
\ignorespaces
#1\strut
}
}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% User commands
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\draft{\drafttrue}
\def\figurespage{\figurestrue}
\def\tablespage{\tablestrue}
\def\phd{
\phdtrue\def\ <at> degree{Doctor Of Philosophy}
\def\ <at> initials{Ph.D.}
}
\def\ms{
\phdfalse\def\ <at> degree{Master Of Science}
\def\ <at> initials{M.S.}
}
\long\def\abstract#1{\abstracttrue\gdef\ <at> abstract{#1}}
\long\def\preface#1{\prefacetrue\gdef\ <at> preface{#1}}
\long\def\extra#1{\extratrue\gdef\ <at> extra{#1}}
\long\def\acknowledgements#1{\acknowledgementstrue\gdef\ <at> acknowledgements{#1}}
\long\def\dedication#1{\dedicationtrue\gdef\ <at> dedication{#1}}
\def\abbreviations#1{\abbreviationspagetrue\gdef\ <at> abbreviations{#1}}

\def\initials#1{\gdef\ <at> initials{#1}}
\def\degree#1{\phdfalse\gdef\ <at> degree{#1}}
\def\program#1{\gdef\ <at> program{#1}}
\def\words#1{\gdef\ <at> words{#1}}
\def\campus#1{\gdef\ <at> campus{#1}}
\def\director#1{\gdef\ <at> director{#1}}
\def\words#1{\gdef\ <at> words{#1}}
\def\approvals#1{\gdef\ <at> approvals{#1}}
\def\submissionmonth#1{\gdef\ <at> month{#1}}
\def\submissionyear#1{\gdef\ <at> year{#1}}

% defaults
\def\ <at> initials{Ph.D.}
\def\ <at> degree{Doctor of Philosophy}
\def\ <at> campus{University of Minnesota}
\def\ <at> title{}
\def\ <at> author{}
\def\ <at> program{}
\def\ <at> words{34}
\def\ <at> director{}
\def\ <at> words{}
\def\ <at> month{
\ifcase\the\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
}
\def\ <at> year{\number\the\year}

% conditionals and defaults
\newif\ifdraft			\draftfalse
\newif\ifafterpreface		\afterprefacefalse
\newif\iffigures		\figuresfalse
\newif\iftables			\tablesfalse
\newif\ifabstract		\abstractfalse
\newif\ifpreface		\prefacefalse
\newif\ifextra			\extrafalse
\newif\ifacknowledgements	\acknowledgementsfalse
\newif\ifdedication		\dedicationfalse
\newif\ifabbreviationspage	\abbreviationspagefalse
\newif\ifphd			\phdfalse
\newif\ifpagestyletopright	\pagestyletoprighttrue

\newcommand\titlep {
\vbox to \textheight {
\parskip0pt
\parindent0pt
\typeout{Title}
\null\nobreak\vskip 10bp {
\def\baselinestretch{1}\ <at> normalsize
\centering\Large\bf\uppercase\expandafter{\bf\ <at> title}
\par\nobreak
}
\vskip 4ex plus 2ex minus 2ex {
\centering\bf
\ifdraft {
DRAFT VERSION CREATED ON \uppercase\expandafter{\today}\\
}\else
A \ifphd{DISSERTATION}\else{THESIS}\fi\ \\
SUBMITTED TO THE FACULTY OF THE GRADUATE SCHOOL \\
OF THE UNIVERSITY OF MINNESOTA \\
BY \\
% probably want to add space.
% \vskip 36bp minus 36bp
\vskip 2ex plus 2ex minus 2ex
\ <at> author\par
\nobreak
\vskip 2ex plus 2ex minus 2ex
IN PARTIAL FULFILLMENT OF THE REQUIREMENTS \\
FOR THE DEGREE OF\\
%       \ifphd{Doctor of Philosophy}\else{Master of Science}\fi\ \\
\ifphd{Doctor of Philosophy}\else \ <at> degree          \fi\ \\
\vskip 1ex plus 1ex minus 1ex
\ <at> director\par
\vskip 1ex plus 1ex minus 1ex
\ <at> month, \ <at> year\\
\fi %close ifdraft
}
}
\newpage
}% end titlep

\null\vfil
\begin{center}
\bf\large\copyright\ \ <at> author\ \ \ <at> year\ \\
\end{center}
\vfil\newpage
}

\def\desclabel#1{{\bf#1\hfill}}
\def\descriptionlist#1 {
\list{} {
\settowidth\labelwidth{#1}
\leftmargin\labelwidth
\let\makelabel\desclabel
}
}
\let\enddescriptionlist=\endlist

\def\unnumberedsection#1 {
\chapter*{#1}
\typeout{#1}
}

% The signature, title, copywrite, and abstract pages
\newcommand\beforepreface {
%  \ifabstract {
\ifacknowledgements {
\c <at> page1 % set page counter so that next is 1
\pagestyle{empty}

% Title page
\titlep

% Copywrite page

%Acknowledgements

\pagenumbering{roman}
\pagestyle{plain}
\ifacknowledgements

\unnumberedsection{Acknowledgements}

%    \null\vskip -20bp
%    \begin{center} {
%    }
%    \large\bf\
%    Acknowledgements
%    \end{center}
%    \vskip 8bp

\ <at> acknowledgements\fi
\vfil\newpage
}

%Dedication

% \pagenumbering{roman}
\ifdedication

\unnumberedsection{Dedication}

%    \null\vskip -20bp
%    \begin{center} {
%    }
%    \large\bf\
%    Dedication
%    \end{center}
%    \vskip 8bp

\ <at> dedication\fi
\vfil\newpage

% An abstract to be bound into the thesis
%    \pagestyle{plain}
%    \pagenumbering{roman}
%    \null\vskip -20bp
%    \begin{center} {
%      \large\bf\expandafter{\ <at> title} \large
%      \vskip 8bp
%      by \ <at> author \\
%      %Under the supervision of \ <at> director
%      \vskip 8bp
%    }
%    \large\bf\
%    Abstract
%    \end{center}
%    \vskip 8bp
%    \ <at> abstract
%  } \fi
%  \typeout{Abstract}
%  %\eject
}

\newcommand\afterpreface {
% Insert all of the text between the title (and copyright) pages and the
main
% body of the thesis.
%  \pagenumbering{roman}
%  \ifpreface {
%    \unnumberedsection{Preface}
%    \ <at> preface
%  } \fi
%  \ifacknowledgements
%    \unnumberedsection{Acknowledgements}
%    \ <at> acknowledgements
%  \fi
%  \ifdedication
%    \unnumberedsection{Dedication}
%    \ <at> dedication
%   \fi

\pagestyle{plain}
%    \pagenumbering{roman}
\ifabstract {
\null\vskip -20bp
\begin{center} {
}
\large\bf\
Abstract
\end{center}
\vskip 8bp
\ <at> abstract
\fi
\typeout{Abstract}
}

\tableofcontents
\iftables
\listoftables
\fi

\iffigures
\listoffigures
\fi

\ifabbreviationspage {
\def\baselinestretch{1}
\ <at> normalsize
\unnumberedsection{List of Abbreviations}
\ <at> abbreviations
} \fi
\ifextra {
%   \chapter*{}
\typeout{extra}
\newpage
\ <at> extra
} \fi
\newpage
\afterprefacetrue
\c <at> page0 % set page counter so that next is 1
\pagenumbering{arabic}
\pagestyle{topright}
}

\def\vita {
\unnumberedsection{Vita}
\bgroup\def\baselinestretch{1}
\ <at> normalsize
}

\def\endvita{\egroup}

% Fullpage floats:
\def\fullpagefigure {
\ <at> float{figure}[p]
\vbox to \textheight
\bgroup
}
\def\endfullpagefigure{\egroup\end <at> float}

\def\fullpagetable {
\ <at> float{table}[p]
\vbox to \textheight
\bgroup
}
\def\endfullpagetable{\egroup\end <at> float}

\def\appnumberline#1{
\hbox{Appendix #1. }
}

\renewcommand\appendix {
\par
\setcounter{chapter}{0}
\setcounter{section}{0}
\def\ <at> chapapp{Appendix}
\def\thechapter{\Alph{chapter}}
% Redefine  <at> chapter  so that appnumberline (ratherline) is used.
\def\ <at> chapter[##1]##2 {
\ifnum \c <at> secnumdepth >\m <at> ne
\refstepcounter{chapter}
\typeout{\ <at> chapapp\space\thechapter.}
{\protect \appnumberline{\thechapter}##1}
\else
\fi
\chaptermark{##1}
% Don't add extra space to lists of figures and tables after chapters.
\if <at> twocolumn
\else
\fi
}
}

\renewcommand\listoffigures {
\ <at> restonecolfalse
\if <at> twocolumn
\ <at> restonecoltrue
\onecolumn
\fi
\chapter* {
List of Figures
\ <at> mkboth{LIST OF FIGURES}{LIST OF FIGURES}
}
\ <at> starttoc{lof}
\if <at> restonecol\twocolumn\fi
}

\renewcommand\listoftables {
\ <at> restonecolfalse
\if <at> twocolumn
\ <at> restonecoltrue
\onecolumn
\fi
\chapter* {
List of Tables
\ <at> mkboth{LIST OF TABLES}{LIST OF TABLES}
}
\ <at> starttoc{lot}
\if <at> restonecol\twocolumn\fi
}

\renewcommand{\bibname}{References}
\renewenvironment{thebibliography}[1]
{\chapter*{\bibname}%
\ <at> mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
\list{\ <at> biblabel{\ <at> arabic\c <at> enumiv}}%
{\settowidth\labelwidth{\ <at> biblabel{#1}}%
\leftmargin\labelwidth
\ <at> openbib <at> code
\usecounter{enumiv}%
\let\p <at> enumiv\ <at> empty
\renewcommand\theenumiv{\ <at> arabic\c <at> enumiv}}%
\sloppy
\clubpenalty4000
\ <at> clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode\.\ <at> m}
{\def\ <at> noitemerr
{\ <at> latex <at> warning{Empty thebibliography' environment}}%
\endlist}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

--
View this message in context: http://pgf-and-tikz.10981.n7.nabble.com/document-class-change-causes-tikz-errors-tp4780.html
Sent from the PGF and TikZ mailing list archive at Nabble.com.

------------------------------------------------------------------------------
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds

14 May 13:23 2014

### pgfpages: reordering of pages

Hi folks,

I use pgfpages a lot, but there's one feature I would like to use which I don't
know how to access (or whether it's possible at all): Is there a way to place a
shipout command between the created logical pages? I would like to use this for
example for the creation of booklets.

Here's a short non-working example. It creates two logical pages (A4), which I
would like pgfpages to output unchanged, but with their order reversed:

\documentclass[a4paper]{scrartcl}
\usepackage[a4paper,margin=5mm]{geometry}
\usepackage{pgfpages}
\pgfpagesdeclarelayout{switch 2}
{
\edef\pgfpageoptionheight{\the\paperwidth}
\edef\pgfpageoptionwidth{\the\paperheight}
\def\pgfpageoptionborder{0pt}
}
{
\pgfpagesphysicalpageoptions
{%
logical pages=2,%
physical height=\pgfpageoptionheight,%
physical width=\pgfpageoptionwidth,%
}
\pgfpageslogicalpageoptions{2}
{%
resized width=\pgfpageoptionwidth,%
resized height=\pgfpageoptionheight,%
center=\pgfpoint{.5\pgfphysicalwidth}{.5\pgfphysicalheight},%
}%
\pgfpageslogicalpageoptions{1}
{%
resized width=\pgfpageoptionwidth,%
resized height=\pgfpageoptionheight,%
center=\pgfpoint{.5\pgfphysicalwidth}{.5\pgfphysicalheight},%
}%
}
\pgfpagesuselayout{switch 2}[a4paper]
\begin{document}
page one
\newpage
page two
\end{document}

Thanks for any help,

Susan

PS: I know that pdfpages could be an alternative, but for several reasons I
would love to stick to pgfpages for this project.

------------------------------------------------------------------------------
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
http://p.sf.net/sfu/SauceLabs

24 Apr 15:08 2014

### Problem compiling the PGF manual from CVS

Hi,

Attempting to build the PGF manual from fresh CVS sources, I die as
follows:

! LuaTeX error .../generic/pgf/graphdrawing/lua/pgf/gd/routing/library.lua:26: m
no file '/usr/local/lib/lua/5.2/pgf.so'
no file './pgf.so'
stack traceback:
[C]: in function 'require'
.../generic/pgf/graphdrawing/lua/pgf/gd/routing/library.lua:26: in main chunk
[C]: in function 'require'
[\directlua]:1: in function 'lookup'
[\directlua]:1: in function 'pgf_lookup_and_require'
[\directlua]:1: in main chunk.
\fi
l.102 ...yered,examples,force,phylogenetics,routing}

?

Known problem?

Cheers,
mh

p, li { white-space: pre-wrap; }
------------------------------------------------------------------------------
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users

3 Apr 15:35 2014

### TikZ 3.0 & preview

Hello,

I have a problem with the new TikZ 3.0, it produces the same "error" by
using MikTeX or an updated TeXLive.

The following document:

\documentclass{article}

\usepackage{tikz}
\usepackage[delayed,tightpage]{preview}

\listfiles
\begin{document}
\begin{preview}
XXX
\end{preview}
\end{document}

Produces the following error:
! Undefined control sequence.
\ <at> EveryShipout <at> Output ...EveryShipout <at> Org <at> Shipout
\box \ <at> cclv
l.11 \end{document}

If the preview package is active, then there will be no error.

There is a hack of handling the preview package in the file
pgfutil-latex.def (in line 136):
\AtBeginDocument{
\let\pgf <at> temp\pr <at> shipout%
\let\pr <at> shipout\ <at> EveryShipout <at> Shipout%
\let\ <at> EveryShipout <at> Org <at> Shipout\pgf <at> temp%
}{}%
}

if I change this into:
\AtBeginDocument{
\let\pgf <at> temp\pr <at> shipout%
\let\pr <at> shipout\ <at> EveryShipout <at> Shipout%
\ifPreview%
\let\ <at> EveryShipout <at> Org <at> Shipout\pgf <at> temp%
\fi%
}{}%
}

everything works like expected. But I'm unsure if than something else is
broken, since I'm really unsure if this is really a solution for the
problem above.

Best regards
Christoph

Here is my file list:
*File List*
article.cls    2007/10/19 v1.4h Standard LaTeX document class
size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
tikz.sty    2013/12/13 v3.0.0 (rcs-revision 1.142)
pgf.sty    2013/12/18 v3.0.0 (rcs-revision 1.14)
pgfrcs.sty    2013/12/20 v3.0.0 (rcs-revision 1.28)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
pgfrcs.code.tex
pgfcore.sty    2010/04/11 v3.0.0 (rcs-revision 1.7)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg
dvips.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
pgfsys.sty    2013/11/30 v3.0.0 (rcs-revision 1.47)
pgfsys.code.tex
pgfsyssoftpath.code.tex    2013/09/09  (rcs-revision 1.9)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
pgfcore.code.tex
pgfcomp-version-0-65.sty    2007/07/03 v3.0.0 (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v3.0.0 (rcs-revision 1.1)
pgffor.sty    2013/12/13 v3.0.0 (rcs-revision 1.25)
pgfkeys.sty
pgfkeys.code.tex
pgfmath.sty
pgfmath.code.tex
pgffor.code.tex
tikz.code.tex
preview.sty    2010/02/14 11.87 (AUCTeX/preview-latex)
prtightpage.def
supp-pdf.mkii
***********

--

--
Institute of Telematics
Hamburg University of Technology
Schwarzenbergstrasse 95
21073 Hamburg, Germany

Tel.: (+49) 40 42878-3375
Fax:  (+49) 40 42878-2581

------------------------------------------------------------------------------

17 Mar 11:03 2014

### Incompatible library "graphs" and "shapes"? -> Compilation error.

Hello,

I need to use the TikZ libraries "graphs" and "shapes" in the same document. But they seem to be incompatible. Here is a minimal example that makes active use of the "graphs" library, but does not need the "shapes" library. Anyway, the compilation fails as soon as the "shapes" library is loaded.

This is the minimal example:

\documentclass{minimal}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage{tikz}

% If the TikZ library 'shapes' is loaded, compilation fails
\usetikzlibrary{shapes,matrix,graphs}
%\usetikzlibrary{matrix,graphs}

\begin{document}
\begin{tikzpicture}
\matrix { \node(foo) {foo}; \\ \node(bar) {bar}; \\ };
\graph[use existing nodes] { foo -> bar; };
\end{tikzpicture}
\end{document}

The error message is

! Missing \endcsname inserted
\tikz <at> lg1
l.17 \graph[use existing nodes] { foo -> bar; };

I use the package versions that are bundled with my LaTeX distribution. This is to say:

- MikTex 2.9
- pgf 2008/01/15 v2.10 (rcs-revision 1.12)
- tikzlibraryshapes.code.tex 2008/01/09 v2.10 (rcs-revision 1.1)
- tikzlibrarymatrix.code.tex 2008/06/18 v2.10 (rcs-revision 1.2)
- tikzlibrarygraphs.code.tex 2010/10/23 v2.10 (rcs-revision 1.1)

Any ideas?

Best regards, Matthias Nagel
------------------------------------------------------------------------------
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users

17 Mar 06:26 2014

### \pgfmath<operation> works -- but \tikzmath does not


%% Plain TeX file
\input tikz.tex
\usetikzlibrary{mindmap,intersections,arrows,angles}
\usetikzlibrary{quotes,calc,decorations.pathmorphing}
\usetikzlibrary{backgrounds,positioning,fit,petri}
\usetikzlibrary{math}
\baselineskip=12pt
\hsize=6.5truein
\vsize=9.0truein
\parskip 6pt

The following calculates the angle PFQ.  Use of pgfmath<operation>
results in the expected answer of 60 degrees.  However, use of
tikzmath{} results in error message: Runaway argument?  ! Paragraph
ended before ... was complete.

\vskip 0.5in

\noindent
\tikzpicture

\coordinate [label=above:$\bf P$]  (P) at (-3cm,  0cm);
\coordinate [label=above:$\bf Q$]  (Q) at ( 3cm,  0cm);
\coordinate [label=above:$\bf F$]  (F) at ( 0cm,
-5.19615242270663188056cm);

\path ($(P) - (F)$);
\pgfgetlastxy{\cx}{\cy}
\path ($(Q) - (F)$);
\pgfgetlastxy{\bx}{\by}
\path ($(P) - (Q)$);
\pgfgetlastxy{\ax}{\ay}

\pgfmathdivide{\ax}{100.0} \xdef\sax{\pgfmathresult}
\pgfmathdivide{\ay}{100.0} \xdef\say{\pgfmathresult}
\pgfmathdivide{\bx}{100.0} \xdef\sbx{\pgfmathresult}
\pgfmathdivide{\by}{100.0} \xdef\sby{\pgfmathresult}
\pgfmathdivide{\cx}{100.0} \xdef\scx{\pgfmathresult}
\pgfmathdivide{\cy}{100.0} \xdef\scy{\pgfmathresult}

\pgfmathmultiply{\sax}{\sax} \xdef\dax{\pgfmathresult}
\pgfmathmultiply{\sbx}{\sbx} \xdef\dbx{\pgfmathresult}
\pgfmathmultiply{\scx}{\scx} \xdef\dcx{\pgfmathresult}
\pgfmathmultiply{\say}{\say} \xdef\day{\pgfmathresult}
\pgfmathmultiply{\sby}{\sby} \xdef\dby{\pgfmathresult}
\pgfmathmultiply{\scy}{\scy} \xdef\dcy{\pgfmathresult}

\pgfmathsqrt{\dbdb} \xdef\db{\pgfmathresult}
\pgfmathsqrt{\dcdc} \xdef\dc{\pgfmathresult}

\pgfmathmultiply{\db}{\dc}   \xdef\dbtdc{\pgfmathresult}
\pgfmathmultiply{\dbtdc}{2.0}   \xdef\dbtdcpdbtdc{\pgfmathresult}
\pgfmathdivide{\dbpdcmda}{\dbtdcpdbtdc}   \xdef\cosangle{\pgfmathresult}
\pgfmathacos{\cosangle}   \xdef\anglef{\pgfmathresult}

\path let \p1 = ($(F) - (P)$),
\p2 = (P)
in
coordinate [label=left:$\bf Quarter PF\ \anglef$]
(quarterpf) at ( {\x2 + 0.25*\x1}, {\y2 + 0.25*\y1} );

%-remove_me_for_error_message-% \tikzmath
%-remove_me_for_error_message-% {
%-remove_me_for_error_message-%       real \dbx; %, \dby, \dbdb, \db,
\dcx, \dcy, \dcdc, \dc, \dax, \daay, \dada, \da;
%-remove_me_for_error_message-%
%-remove_me_for_error_message-%       \dbx = \bx/100.0 * \bx/100.0;
%-remove_me_for_error_message-%     % \dby = \by/100.0 * \by/100.0;
%-remove_me_for_error_message-%     % \dbdb = \dbx + \dby;
%-remove_me_for_error_message-%     % \db   = sqrt( \dbdb );
%-remove_me_for_error_message-%     %
%-remove_me_for_error_message-%     % \dbx = \bx/100.0 * \bx/100.0;
%-remove_me_for_error_message-%     % \dby = \by/100.0 * \by/100.0;
%-remove_me_for_error_message-%     % \dbdb = \dbx + \dby;
%-remove_me_for_error_message-%     % \db   = sqrt( \dbdb );
%-remove_me_for_error_message-%     %
%-remove_me_for_error_message-%     % \dcx = \cx/100.0 * \cx/100.0;
%-remove_me_for_error_message-%     % \dcy = \cy/100.0 * \cy/100.0;
%-remove_me_for_error_message-%     % \dcdc = \dcx + \dcy;
%-remove_me_for_error_message-%     % \dc   = sqrt( \dcdc );
%-remove_me_for_error_message-%     %
%-remove_me_for_error_message-%     % \dax = \ax/100.0 * \ax/100.0;
%-remove_me_for_error_message-%     % \daay = \ay/100.0 * \ay/100.0;
%-remove_me_for_error_message-%     % \dada = \dax + \daay;
%-remove_me_for_error_message-%     % \da   = sqrt( \dada );
%-remove_me_for_error_message-%     %
%-remove_me_for_error_message-%     % \anglef = acos( ( \dbdb + \dcdc -
\dada ) / ( 2.0*\db*\dc ) );
%-remove_me_for_error_message-% }

\draw ($(F) + (0, -0.5cm)$)
node (example-align) [draw, align=left]
{  \bf{angle PFQ:  \anglef } };

\endtikzpicture

\bye

------------------------------------------------------------------------------
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
http://p.sf.net/sfu/13534_NeoTech

16 Mar 23:52 2014

### Circular arcs defined by an 'X' -- plain TeX (and TikZ)


%% Plain TeX file
\input tikz.tex
\usetikzlibrary{mindmap,intersections,arrows,angles}
\usetikzlibrary{quotes,calc,decorations.pathmorphing}
\usetikzlibrary{backgrounds,positioning,fit,petri}
\baselineskip=12pt
\hsize=6.5truein
\vsize=9.0truein
\parskip 6pt

% Here's the question on
% "Circular arcs defined by an 'X' -- plain TeX (and TikZ)":

Consider three points P, Q, and F, with F being below the line
joining P and Q.  So the two lines PF and QF would form a distorted
V', and extending these two lines would result in a distorted X'.
Introduce 5 points into the shorter of the two segments PF and QF,
so that this shorter segment is divided into six equal sub-segments.

Need to use these 5 points to draw circular arcs in {\bf TikZ} and
{\bf plain \TeX} ({\bf not} latex).

I can illustrate what needs to be done for the special case of P, Q
and F being (-3,  0), (3,  0), and (0, -3*sqrt(3)).

Would like pointers to extending this to the general case.

\vskip 0.5in

\noindent
\tikzpicture

% Input: 3 noncollinear points P, Q, and F, with F below PQ
\coordinate [label=above:$\bf P$]  (P) at (-3,  0);
\coordinate [label=above:$\bf Q$]  (Q) at ( 3,  0);
\coordinate [label=right:$\bf F$]  (F) at ( 0, -5.196);

% All of the following need to be derived

% P' is on PF extended so that F is the mid-point of PFP'
\coordinate  (Pp) at ( 3, -10.392); % Pp is P-prime or P'

% Q' is on QF extended so that F is the mid-point of Q'FQ
\coordinate  (Qp) at (-3, -10.392);

\draw [ultra thick]  (P) -- (F);
\draw [ultra thick]  (Q) -- (F);
\draw [dashed]       (F) -- (Pp);
\draw [dashed]       (F) -- (Qp);

% The various angles in the code below such as 30 and the
% various start-angles are for the specific values of
% the input P, Q, and F.

% foreach of 5 equi-spaced points on the smaller of PF or QF
\foreach \s in {1,2,...,5}
{
\coordinate (left)  at ({-(6-\s)*sin(30)}, {-\s*cos(30)});
\coordinate (right) at ({ (6-\s)*sin(30)}, {-\s*cos(30)});

% the start and end angles below are chosen so that the
% arc is inside the V formed by PFQ
\draw [ultra thick]
let \p1 = ($(F) - (left)$),
\n1 = {veclen(\x1, \y1)}
in
(left)
arc [start angle=120, end angle=60, radius=\n1];

% For general P, Q, and F, the delta-angles below could be
% anything that makes the picture look OK.
\draw [dashed]
(left)
arc [start angle=-60, delta angle=-60, radius=\s];

\draw [dashed]
(right)
arc [start angle=-120, delta angle=60, radius=\s];
}

\draw [dashed]
let \p1 = ($(P) - (F)$),
\n1 = {veclen(\x1, \y1)}
in
(F)
arc [start angle=-60, delta angle=-60, radius=\n1];

\draw [dashed]
let \p1 = ($(Q) - (F)$),
\n1 = {veclen(\x1, \y1)}
in
(F)
arc [start angle=-120, delta angle=60, radius=\n1];

\def\sa{ atan( ((-6-\s)*1.732/2)/(3-\s/2) ) }
\def\ea{ 120 }

% foreach of 5 equi-spaced points on the smaller of FP' or FQ'
\foreach \s in {1,2,...,5}
{
\coordinate (left)  at ({-(\s)*sin(30)}, {-(6+\s)*cos(30)});
\coordinate (right) at ({ (\s)*sin(30)}, {-(6+\s)*cos(30)});
\draw [very thick]
let \p1 = ($(F) - (left)$),
\n1 = {veclen(\x1, \y1)}
in
(left)
arc [start angle=-120, end angle=-60, radius=\n1];

\draw [dashed]
let \p1 = ($(P) - (left)$),
\n1 = {veclen(\x1, \y1)}
in
(left)
arc [start angle={\sa}, delta angle={-\ea - \sa},

\draw [dashed]
let \p1 = ($(Q) - (left)$),
\n1 = {veclen(\x1, \y1)}
in
(right)
arc [start angle={-180-\sa}, delta angle={\ea + \sa},
}

\endtikzpicture

\bye


------------------------------------------------------------------------------
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
`