I was making an article and everything was going alright, when suddenly I got an error:
The error:
Arithmetic overflow. \calc@Acount
l.78 ...qwe dqweqwrwf qewrfrQ aRF EFCas drfFR}{62}
My article looks ike this:
\documentclass [a4paper] {article}
\usepackage [magyar]{babel}
\usepackage {t1enc}
\usepackage [utf8]{inputenc}
\usepackage {calc}
\usepackage{ifthen}
\usepackage {tikz}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows}
\usepackage[nomessages]{fp}
\usepackage{xparse}
\title{teszt}
\newcommand*{\getlength}[2]{%
% Convert to `cm` and round to two fractional digits:
\pgfmathsetmacro#1{round(3.51459804*#2)/100.0}%
}
\newcommand {\barany}[2] {
%
\newlength{\myoszzhosz}
\newlength{\oszsormag}
\newlength{\osszsormag}
\newcount{\szeles}
\newlength{\sormag}
\szeles=#2
\the\szeles
\settowidth{\sormag}{drfesga}
%
%
\settowidth{\myoszzhosz}{#1}
\getlength{\valueoszhosz}{\myoszzhosz}
\getlength{\valuesormag}{\sormag}
\setlength{\oszsormag}{\myoszzhosz/\szeles}
\setlength{\osszsormag}{\oszsormag*\sormag}
%
\begin{tikzpicture}[scale=0.5,>=stealth]
\draw [shift={(0,1)}][domain=270:90] plot ({cos(\x)}, {sin(\x)});
\draw [shift={(2,1)}][domain=0:180] plot ({cos(\x)}, {sin(\x)});
\draw [shift={(4,1)}][domain=360:180] plot ({cos(\x)}, {sin(\x)});
\draw [shift={(6,1)}][domain=270:450] plot ({cos(\x)}, {sin(\x)});
\node[\textwidth=#2pt] at (2,0) {#1};
\end{tikzpicture}
}
\begin{document}
\barany{ptn kthkthkt hkthkthk thktfa dsgrf gadf gagag fagaga gadfgfdag fdaarfgg adasad
fggdfgrgdhfb brhgfhb}{62}
\end{document}
Can you help me somehow?
\setlength{\osszsormag}{\oszsormag*\sormag}
) but without really knowing what you want to do it's hard to suggest a better way. – Joseph Wright♦ Dec 22 '14 at 9:23\textwidth=
should betext width =
in the node key, and that all the\newlength
commands should be outside your macro definition, not inside it, and that there should be%
at the end of most of the lines, but really there is far too much code with too little explanation of its intention to be able to debug it easily. – David Carlisle Dec 22 '14 at 11:32