0

I got another error as below

TeX capacity exceeded, sorry [input stack size=5000]. [...ial,right= of m0] (A1B1C1) {$A_1B_1C_1$};]

Here is the code

\documentclass[12pt, a4paper, oneside]{standalone} % Paper size, default font size and one-sided paper
\usepackage{algorithm2e}
\usepackage{pdfpages}
\usepackage{listings}
\usepackage{parcolumns}
\usepackage{enumerate}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DRAWING PETRI NETS & DIAGRAMS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{pgf}
\usepackage{tikz}
\usepackage{makecell}
     \usetikzlibrary{arrows,shapes,automata,petri,positioning,calc,fit,backgrounds,shapes.arrows,shapes.geometric,chains,matrix}
\tikzset{
    data/.style={
        ellipse,
        thick,
        draw=black,
        minimum width = 2cm,
    },
    place/.style={
        circle,
        thick,
        draw=blue,
        fill=blue!20,
        minimum size=6mm,
    },
    transition/.style={
        rectangle,
        thick,
        draw=black,
        fill=black!50,
        minimum size=6mm
    },
    transitionH/.style={
        rectangle,
        thick,
        fill=black,
        minimum width=6mm,
        minimum height=2mm
    },
    transitionHW/.style={
        rectangle,
        thick,
        draw=black,
        minimum width=6mm,
        minimum height=2mm
    },
    transitionV/.style={
        rectangle,
        thick,
        fill=black,
        minimum width=2mm,
        minimum height=6mm
    },
    transitionVW/.style={
        rectangle,
        thick,
        draw=black,
        minimum width=2mm,
        minimum height=6mm
    },
    terminal/.style={
        rounded rectangle,
        thick,
        draw=black
    },
    status/.style={
        circle,
        thick,
        draw=black,
        minimum size=15mm
    },
    decision/.style={
        diamond,
        aspect = 2,
        thick,
        draw=black
    },
    block/.style={
        rectangle,
        thick,
        draw=black,
        minimum width = 2cm,
        rounded corners
    },
    borderE/.style={
        ellipse,
        thick,
        draw=black
    },
    borderRd/.style={
        rectangle,
        thick,
        draw=gray,
        dashed,
        rounded corners= 5mm
    },
    %double arrow
    arrowD/.style={
        double arrow,
        fill = black,
        double arrow head extend=1mm,
        double arrow head indent =.5mm,
        minimum width=3mm,
        minimum height=7mm,
        inner ysep=0.5mm
    }
}     

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% VIETNAMESE MACROS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\usepackage[vietnam]{babel}
\usepackage[utf8]{vietnam}

\begin{document}
        %if need link to inside, use ``remember picture''
    \begin{tikzpicture}[node distance=1cm,>=stealth',bend angle=25,auto,initial text={}]
        \node [data,initial] (M0) {
            \begin{tikzpicture}
                \node (m0) {\begin{tabular}{c} $M_0$ \\ \_ \\ \_ \end{tabular}};
                \node [data, initial,right= of m0] (A1B1C1) {$A_1B_1C_1$};
            \end{tikzpicture}
        };        
    \end{tikzpicture}  

\end{document}

But when i remove the initial in \node [data, initial,right= of m0] (A1B1C1) {$A_1B_1C_1$}; everything is okie. (see the image without the red arrow)

I want that arrow, and I dont know why it got error like that.

PS: In case you wonder about the nested tikzpicture, because I want to create nested node. Acording to this nested node

enter image description here

7
  • 2
    Your document runs without error in texlive 2014 Commented Jun 21, 2014 at 12:23
  • and only uses 48 input stack slots: ` 48i,13n,67p,407b,1225s stack positions out of 5000i,500n,10000p,200000b,80000s ` Commented Jun 21, 2014 at 12:24
  • @DavidCarlisle I got that error with LaTeXTools + Sublime. I will retry on TexMaker, I am on Mac.
    – thuanle
    Commented Jun 21, 2014 at 12:25
  • It seems an error in texlive 2013. I will try update and test again. Thanks for pointing out.
    – thuanle
    Commented Jun 21, 2014 at 12:32
  • I get no error in TL 2013, but the code goes into an infinite loop with TL 2012.
    – egreg
    Commented Jun 21, 2014 at 18:10

1 Answer 1

1

This is an answer for the red arrow. (I didn't get an error as in David's comments and using pdflatex.)

The trick is setting every initial by arrow at the right place:

% preamble as in the question
\begin{document}
    \begin{tikzpicture}[node distance=1cm,>=stealth',bend angle=25,auto,initial text={}]
        \node [data,initial] (M0) {
            \begin{tikzpicture}
                \node (m0) {\begin{tabular}{c} $M_0$ \\ \_ \\ \_ \end{tabular}};
                \tikzstyle{every initial by arrow}=[red]
                \node [data,initial,right= of m0] (A1B1C1) {$A_1B_1C_1$};
            \end{tikzpicture}
        };        
    \end{tikzpicture}  
\end{document}

or

\begin{document}
        %if need link to inside, use ``remember picture''
    \begin{tikzpicture}[node distance=1cm,>=stealth',bend angle=25,auto,initial text={}]
        \node [data,initial] (M0) {
            \begin{tikzpicture}[every initial by arrow/.style=red]
                \node (m0) {\begin{tabular}{c} $M_0$ \\ \_ \\ \_ \end{tabular}};
                \node [every initial by arrow/.style=red,data,initial,right= of m0] (A1B1C1) {$A_1B_1C_1$};
            \end{tikzpicture}
        };        
    \end{tikzpicture}  
\end{document}

Result

1
  • thanks for answering. I am downloading the new MacTeX 2014 so will try again. But the main question is about the error. So, can't vote for your post.
    – thuanle
    Commented Jun 21, 2014 at 13:40

Not the answer you're looking for? Browse other questions tagged .