I have a problem with table of contents. I have changed the numbers of sections, that instead of numbers I have words, lets say "Dodatok A". But now, when the "number" of section is longer, the title of section and the "Dodatok A" are crossing, so it is not readable. Is there any way how to adjust the width of box for the number of section? I put here a picture with a part of table of contents, where you can see the problem. Thank you.
\documentclass[12pt,a4paper]{article}
\usepackage[slovak]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{palatino,verbatim}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{amsmath}
\usepackage{pstricks}
\usepackage{wrapfig}
\usepackage{epsfig}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{color}
\linespread{1.3}
\usepackage[total={17cm,25cm}, top=2.5cm, bottom=2.5cm, left=3.5cm, right=2cm, includefoot]{geometry}
\usepackage{xr}
\usepackage{float}
\usepackage{hyperref}
\usepackage{pdfpages}
\usepackage{calc,etoolbox}
\usepackage[titletoc,toc,title]{appendix}
\numberwithin{equation}{section}
\begin{document}
\tableofcontents
some sections, subsections, figures etc.
\setcounter{section}{0}
\setcounter{subsection}{0}
\renewcommand\thesection{Dodatok \Alph{section}}
\setcounter{figure}{0}
\setcounter{equation}{0}
\renewcommand\thefigure{\Alph{section}\arabic{figure}}
\renewcommand\theequation{\Alph{section}\arabic{equation}}
\section{Kalibračná symetria pre elektromagnetizmus}
text text
\end{document}


articlecompared tobookand/orreport.article.clsdefines\l@sectiondifferently to that ofbook.clsandreport.clsand therefore requires different treatment. – Werner May 09 '13 at 16:30epsfigas it is deprecated. – Werner May 09 '13 at 16:31