Greg Bennett | 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.

Comments and Latex code follows.

Thanks in advance for any and all advice and assistance.

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.


%% 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.

\draw (4,-1) node {$ = $};
\draw (9,-1) node {$ + $};

%% That looks about right

%% 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(
\draw (4,-1) node {$ = $};
\draw (9,-1) node {$ + $};

%% 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 code
Slashdot TV.  
Video for Nerds.  Stuff that matters.
pgf-users mailing list
pgf-users <at>
Paul BOURDET | 7 Sep 13:41 2014

Problem using plain TeX and the circuits package.


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 ?

Thank you for your answers

Paul Bourdet
Slashdot TV.  
Video for Nerds.  Stuff that matters.
pgf-users mailing list
pgf-users <at>
Xavier | 27 Aug 18:09 2014

TikZ bug in ConTeXt


Anyone could help me with this bug:
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.

Thanks in advance,
Slashdot TV.  
Video for Nerds.  Stuff that matters.
pgf-users mailing list
pgf-users <at>
Anuschka Schaffner | 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:

\draw [help lines] (0,0) grid (3,2);
\pgftransformnonlinear{\pgfpointcurvilinearbezierpolar\pgf <at> x\pgf <at> y}%
\draw (0,-30pt) grid [step=10pt] (80pt,30pt);
% Add a "barb":
\draw [blue, very thick] (20pt,10pt) -- (0,0) -- (20pt,-10pt);
\draw[red, very thick]
(0mm,20mm) .. controls (11mm,20mm) and (20mm,11mm) .. (20mm,0mm);

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
anything about this low level commands and was just trying...)

Do you have any suggestions?

Thanks and all the best,

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.
Andy | 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





	\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]


%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}$};

\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,
\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
\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
\node [stage, below of=comfarmoutput, yshift=-2mm] (commfarms) {Labor and
\node [market, below of=commfarms, yshift=-2mm] (modlandmkt) {Modern Land
\node [stage, below of=modlandmkt, yshift=-2mm] (commland) {Commercial Land
\node [sector, below of=commland, yshift=-6mm] (modfood) {Modern Food
\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};

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

% 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] (tradfoodmkt) -- (consdemand);
\path[line] (MLK) -- (manfmkt);
\path[line] (SLK) -- (servicesmkt);
\path[line] (MFLK) -- (modfoodret);
\path[line] (TLK) -- (tradfoodret);
\path[line] (tradfarmoutput) -- (TLK);
\path[line][->>,very thick] (manuf) |- (factorinc);
\path[line][->>,very thick] (modfood) |- (factorinc);
\path[line][->>,very thick] (serv) |- (factorinc);
\path[line][->>,very thick] (tradfood) |- (factorinc);
\path[line][->>,very thick] (factorinc) |- (consdemand);
%\draw[->] (manuf) -- (manuf -| consdemand);



% 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
%  2/14/90   correct entries to table of contents
%  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 'References' added to Table of Contents 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)
%\copyrightpage		(make a copyright page)
%\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}
%\director{the principal advisor's name}
%\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)
%\ifcopyright		(Add a copyright notice? (Set by \copyrightpage)
%\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)
%\ifafterpreface (afterpreface sections pagenumber must be at topright
%               corner. If user has chosen a header then it must be
%               (Produce a List of figures? The default is to do so.)
%               (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.

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





% 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
%\ <at> normalsize

\ <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.)

% use Table of Contents rather than default of Contents
%\def\tableofcontents {
%  \ <at> restonecolfalse
%  \if <at> twocolumn
%    \ <at> restonecoltrue\onecolumn
%  \fi
%  \chapter*{Table of Contents\ <at> mkboth{TABLE OF CONTENTS}{TABLE OF
%  \ <at> starttoc{toc}
%  \if <at> restonecol
%    \twocolumn
%  \fi

% single space bibliography, quotations and verse.
\renewenvironment{thebibliography}[1] {
  \ <at> mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}
  \list{\ <at> biblabel{\ <at> arabic\c <at> enumiv}} {
    \settowidth\labelwidth{\ <at> biblabel{#1}}
    \ <at> openbib <at> code
    \let\p <at> enumiv\ <at> empty
    \renewcommand\theenumiv{\ <at> arabic\c <at> enumiv}
  \ <at> clubpenalty \clubpenalty
  %\sfcode`\.\ <at> m
} {
  \def\ <at> noitemerr {
    \ <at> latex <at> warning{Empty `thebibliography` environment}

% This pageheadings will place numbers at top righthand corners
\def\ps <at> topright {
  \let\ <at> mkboth\ <at> gobbletwo
  \def\ <at> oddhead{\rm\hfil\thepage}
  \let\ <at> evenhead\ <at> oddhead
  \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 =\

% 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}

% 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] {
    \ <at> bsphack\ <at> floatpenalty -\ <at> Mii
    \ <at> floatpenalty-\ <at> Miii
  \def\ <at> captype{#1}
    \ <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{
    \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}

% User commands
  \phdtrue\def\ <at> degree{Doctor Of Philosophy}
  \def\ <at> initials{Ph.D.}
  \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{
  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\ifcopyright		\copyrightfalse
\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 {
    \null\nobreak\vskip 10bp {
      \def\baselinestretch{1}\ <at> normalsize
      \centering\Large\bf\uppercase\expandafter{\bf\ <at> title}
    \vskip 4ex plus 2ex minus 2ex {
      \ifdraft {
        DRAFT VERSION CREATED ON \uppercase\expandafter{\today}\\
        A \ifphd{DISSERTATION}\else{THESIS}\fi\ \\
        BY \\
% probably want to add space.
% \vskip 36bp minus 36bp
        \vskip 2ex plus 2ex minus 2ex
        \ <at> author\par
        \vskip 2ex plus 2ex minus 2ex
%       \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
}% end titlep

\newcommand\copyrightp {
  \bf\large\copyright\ \ <at> author\ \ \ <at> year\ \\

\def\descriptionlist#1 {
  \list{} {

\def\unnumberedsection#1 {

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

% Title page

% Copywrite page




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

    \ <at> acknowledgements\fi   


% \pagenumbering{roman}     


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

    \ <at> dedication\fi   

% An abstract to be bound into the thesis
%    \pagestyle{plain}
%    \pagenumbering{roman}
%    \addcontentsline{toc}{chapter}{Abstract}
%    \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
% body of the thesis.
%  \pagenumbering{roman}
%  \ifpreface {
%    \unnumberedsection{Preface}
%    \ <at> preface
%  } \fi
%  \ifacknowledgements
%    \unnumberedsection{Acknowledgements}
%    \ <at> acknowledgements
%  \fi
%  \ifdedication 
%    \unnumberedsection{Dedication}
%    \ <at> dedication
%   \fi

%    \pagenumbering{roman}
    \ifabstract {
    \null\vskip -20bp
    \begin{center} {
    \vskip 8bp
    \ <at> abstract



  \ifabbreviationspage {
    \ <at> normalsize
    \unnumberedsection{List of Abbreviations}
    \ <at> abbreviations
  } \fi
  \ifextra {
%   \chapter*{}
    \ <at> extra
  } \fi
  \c <at> page0 % set page counter so that next is 1

\def\vita {
  \ <at> normalsize


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

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

% Redefine appendix to print Appendix []. ... page # in table of contents.
  \advance\hangindent\ <at> tempdima
  \hbox{Appendix #1. }

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

\renewcommand\listoffigures {
  \ <at> restonecolfalse
  \if <at> twocolumn
    \ <at> restonecoltrue
  \chapter* {
    List of Figures
  \addcontentsline{toc}{chapter}{List of Figures}
  \ <at> starttoc{lof}
  \if <at> restonecol\twocolumn\fi

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

      \ <at> mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
      \list{\ <at> biblabel{\ <at> arabic\c <at> enumiv}}%
           {\settowidth\labelwidth{\ <at> biblabel{#1}}%
            \ <at> openbib <at> code
            \let\p <at> enumiv\ <at> empty
            \renewcommand\theenumiv{\ <at> arabic\c <at> enumiv}}%
      \ <at> clubpenalty \clubpenalty
      \sfcode`\.\ <at> m}
     {\def\ <at> noitemerr
       {\ <at> latex <at> warning{Empty `thebibliography' environment}}%

View this message in context:
Sent from the PGF and TikZ mailing list archive at

Want fast and easy access to all the code in your enterprise? Index and
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.
Susan Dittmar | 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:

\pgfpagesdeclarelayout{switch 2}
         logical pages=2,%
         physical height=\pgfpageoptionheight,%
         physical width=\pgfpageoptionwidth,%
         resized width=\pgfpageoptionwidth,%
         resized height=\pgfpageoptionheight,%
         %%% execute shipout after placing this page! %%%
         resized width=\pgfpageoptionwidth,%
         resized height=\pgfpageoptionheight,%
\pgfpagesuselayout{switch 2}[a4paper]
page one
page two

Thanks for any help,


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

"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
Michael Hallgren | 24 Apr 15:08 2014

Problem compiling the PGF manual from CVS


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

! LuaTeX error .../generic/pgf/graphdrawing/lua/pgf/gd/routing/library.lua:26: m
odule '' not found:
        no field package.preload['']
        [kpse lua searcher] file not found: ''
        [kpse C searcher] file not found: ''
        no file '/usr/local/lib/lua/5.2/'
        no file '/usr/local/lib/lua/5.2/'
        no file './'
        [oberdiek.luatex.kpse_module_loader]-eroux Search failed
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.
<argument> ...drawing library '\pgf <at> temp ' not found}}') end}
l.102 ...yered,examples,force,phylogenetics,routing}

Known problem?


p, li { white-space: pre-wrap; }
Start Your Social Network Today - Download eXo Platform
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
pgf-users mailing list
pgf-users <at>
Christoph Weyer | 3 Apr 15:35 2014

TikZ 3.0 & preview


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:




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):
  \ <at> ifpackageloaded{preview}{%
    \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:
  \ <at> ifpackageloaded{preview}{%
    \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%

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

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)
 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)
   dvips.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
  pgfsys.sty    2013/11/30 v3.0.0 (rcs-revision 1.47)
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)
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)
 preview.sty    2010/02/14 11.87 (AUCTeX/preview-latex)


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

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

Matthias Nagel | 17 Mar 11:03 2014

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


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:


% If the TikZ library 'shapes' is loaded, compilation fails

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

The error message is

! Missing \endcsname inserted
<to be read again>
\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
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
pgf-users mailing list
pgf-users <at>
Suresh Govindachar | 17 Mar 06:26 2014

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

%% Plain TeX file
\input tikz.tex
\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


   \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, 

   \path ($ (P) - (F) $);
   \path ($ (Q) - (F) $);
   \path ($ (P) - (Q) $);

   \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}

   \pgfmathadd{\dax}{\day}  \xdef\dada{\pgfmathresult}
   \pgfmathadd{\dbx}{\dby}  \xdef\dbdb{\pgfmathresult}
   \pgfmathadd{\dcx}{\dcy}  \xdef\dcdc{\pgfmathresult}

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

   \pgfmathadd{\dbdb}{\dcdc}   \xdef\dbpdc{\pgfmathresult}
   \pgfmathsubtract{\dbpdc}{\dada} \xdef\dbpdcmda{\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)
         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-%       \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 } };



Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
Suresh Govindachar | 16 Mar 23:52 2014

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

%% Plain TeX file
\input tikz.tex
\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


   % 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)}
               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]
           arc [start angle=-60, delta angle=-60, radius=\s];

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

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

\draw [dashed]
     let \p1 = ($ (Q) - (F) $),
         \n1 = {veclen(\x1, \y1)}
           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)}
               arc [start angle=-120, end angle=-60, radius=\n1];

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

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



Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
pgf-users mailing list
pgf-users <at>