7

I am a tikz beginning. Here is a figure I am working on. I cannot avoid the "Dimension too large" error.

\documentclass{standalone}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
  \begin{tikzpicture}[x=2cm,y=2cm,scale=0.75]
    \coordinate [label=below:$O$](O) at (0,0); 
    \coordinate [label=below:$A$](A) at (0,-1); 
    \coordinate [label=below:$D$](D) at (-1.1,-1); 
    \coordinate [label=below:$E$] (E) at (1,-1); 
    \coordinate [label=0:$B$](B) at (15:1); 
    \coordinate [label=180:$C$](C) at (140:1);
    \draw (0,0) circle (1);
\draw (C) -- (O) -- (B);
    \draw (C) -- (A) -- (B);
    \draw (D) -- (E);
    \tkzMarkAngle[label=$124^{\circ}$,dist=0.35,arc=l,size=0.2,color=black,fill=none](B,O,C)
    \tkzMarkAngle[arc=l,size=0.3,color=black](A,C,O)
  \end{tikzpicture}
\end{document}

I find it works if I change "scale=0.75" to "scale=1". But I want to keep the figure small.

  • 1
    Since you are producing a standalone file presumably for later inclusion in a document, you can keep scale=1 in the standalone file and then reduce the dimensions using the argument for \includegraphics. – Gonzalo Medina Feb 20 '14 at 14:36
  • But then the character size will be too small. – CY Aries Feb 20 '14 at 14:51
  • Nice answer. In my case I had the same problem with size=0.25 and it got solved by adding the units, i.e., size=0.25cm. It does not work in the question's example, but it may help somebody else. – loved.by.Jesus Nov 25 '16 at 16:09

2 Answers2

6

The problem comes from the value used in size in the second \tkzMarkAngle; increase a little the value for that option (the error disappears using 0.3099999, but I used 0.33 in my example):

\documentclass{standalone}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
  \begin{tikzpicture}[x=2cm,y=2cm,scale=0.75]
    \coordinate [label=below:$O$](O) at (0,0); 
    \coordinate [label=below:$A$](A) at (0,-1); 
    \coordinate [label=below:$D$](D) at (-1.1,-1); 
    \coordinate [label=below:$E$] (E) at (1,-1); 
    \coordinate [label=0:$B$](B) at (15:1); 
    \coordinate [label=180:$C$](C) at (140:1);
    \draw (0,0) circle (1);
    \draw (C) -- (O) -- (B);
    \draw (C) -- (A) -- (B);
    \draw (D) -- (E);
    \tkzMarkAngle[label=$124^{\circ}$,dist=0.35,arc=l,size=0.2,color=black,fill=none](B,O,C)
    \tkzMarkAngle[arc=l,size=0.33,color=black](A,C,O)
  \end{tikzpicture}
\end{document}

enter image description here

Gonzalo Medina
  • 505,128
  • @CYAries I guess that the math parser gets in trouble with 0.3 and the scaling factor (perhaps something gets too close to a value in which some function becomes unbounded in the evaluation of a trigonometric function involved in the calculation of the arc). – Gonzalo Medina Feb 20 '14 at 15:24
3

The problem comes from the "decorate" action. I asked a question about this here : how-to-put-a-mark. If you remove in the file tkz-obj-angles.tex the option postaction={decorate} in the next code, you can avoid the error but it's not a fine solution

  \path [\tkz@mkcolor,postaction={decorate},/tkzmkangle/.cd,#1]%
(#3)--++(\tkz@dirOne:\tkz@size) arc(\tkz@dirOne:\tkz@dirTwo:\tkz@size)--cycle; 

I need to modify the macro but I have not yet found the right way to do this.

You have a possibility to avoid the error with different option. I think your options are strange. Why [x=2cm,y=2cm,scale=0.75] and not [x=1.75cm,y=1.75cm] ?

\documentclass{standalone}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
  \begin{tikzpicture}[x=1.75cm,y=1.75cm]
    \coordinate [label=below:$O$](O) at (0,0); 
    \coordinate [label=below:$A$](A) at (0,-1); 
    \coordinate [label=below:$D$](D) at (-1.1,-1); 
    \coordinate [label=below:$E$] (E) at (1,-1); 
    \coordinate [label=0:$B$](B) at (15:1); 
    \coordinate [label=180:$C$](C) at (140:1);
    \draw (0,0) circle (1);
\draw (C) -- (O) -- (B);
    \draw (C) -- (A) -- (B);
    \draw (D) -- (E);
    \tkzMarkAngle[label=$124^{\circ}$,dist=0.35,arc=l,size=0.2,color=black,fill=none](B,O,C)
    \tkzMarkAngle[arc=l,size=0.3,color=black](A,C,O)
  \end{tikzpicture}
\end{document}

enter image description here

Alain Matthes
  • 95,075