# How do I prevent the section heading from printing 3 times in the ToC

In my quest for bates numbering, all now seems to work with exception of the toc:

The sections look good, as follows:

The LaTeX code I used (using the quickcode.tex document in The first reference to create pdfs 10.pdf and 18.pdf) to make the examples follows:

\documentclass[12pt,letterpaper,fleqn,parskip=half]{scrartcl}
\usepackage{bookman}
\usepackage{lscape}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[demo]{graphicx}
\usepackage[scaled]{helvet}
\usepackage{caption}
\usepackage{xargs}

%---------------------------------------------------------------------
%   % Macro to include PDF document with page numbers in caption and label
%---------------------------------------------------------------------
\newcounter{imagepage}

\makeatletter
\newcommandx{\picTEST}[5][1=0.9, 2=0]
{\pdfximage{#4}
\setcounter{imagepage}{0}
\@whilenum\value{imagepage}<\pdflastximagepages\do{%
\stepcounter{imagepage}
\begin{figure}[h!]
\centering
\includegraphics[width=#1\textwidth,page=\value{imagepage},angle=#2]{#4}
\caption{#5 - Page \arabic{imagepage} of {\the\pdflastximagepages}}
\label{#3\theimagepage}
\end{figure}
\clearpage}}
\makeatother

\usepackage{fmtcount}
\renewcommand{\thesection}{\ORDINALstring{section} POINT}
\renewcommand{\thesubsection}{\arabic{subsection}}

\usepackage{xpatch} \makeatletter
\xpatchcmd{\tableofcontents}{\contentsname \@mkboth}{\LARGE\uppercase\contentsname\@mkboth}{}{}
\makeatother

\begin{document}

\Large
\clearpage
\begingroup
\areaset{\paperwidth}{\paperheight}
\renewcommand{\figurename}{RECORD PAGE}
\picTEST{Transcript1_Label_Page}{10.pdf}{Transcript, September 1, 2010}
\picTEST{Transcript2_Label_Page}{18.pdf}{Transcript, February 23, 2011}

\endgroup

\tableofcontents

\newpage

\setcounter{page}{1}

\section{~}

\subsection{All Cows Eat Grass}

Here is reference to page \ref{Transcript2_Label_Page3} of the included PDF document, proving that:

The grass is greener...
\section{~}


]5

You also get a bunch of errors, so the output is essentially arbitrary.

The command \ORDINALstring is fragile, but, more importantly, it is not fully expandable. So you have to use \ORDINALstringnum{\arabic{section}} after having robustified the fmtcount command:

\usepackage{etoolbox} % loaded by xpatch
\renewcommand{\thesection}{\ORDINALstringnum{\arabic{section}} POINT}
\robustify{\ORDINALstringnum}


You're better to load all packages first, then apply the customizations.

Also note that issuing \Large at the beginning is not the best thing to do. The results will not be satisfying at all. Also using \pdfximage directly doesn't seem very portable.

Finally \uppercase\contentsname is a very good way to look for trouble, as \uppercase is not a macro taking an argument. It should be

\MakeUppercase{\contentsname}


\documentclass[12pt,letterpaper,fleqn,parskip=half]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{lscape}
\usepackage{graphicx}

\usepackage{bookman}
\usepackage[scaled]{helvet}

\usepackage{caption}
\usepackage{xargs}
\usepackage{fmtcount}
\usepackage{xpatch}

%---------------------------------------------------------------------
%   % Macro to include PDF document with page numbers in caption and label
%---------------------------------------------------------------------
\newcounter{imagepage}

\makeatletter
\newcommandx{\picTEST}[5][1=0.9, 2=0]
{\pdfximage{#4}
\setcounter{imagepage}{0}
\@whilenum\value{imagepage}<\pdflastximagepages\do{%
\stepcounter{imagepage}
\begin{figure}[h!]
\centering
\includegraphics[width=#1\textwidth,page=\value{imagepage},angle=#2]{#4}
\caption{#5 - Page \arabic{imagepage} of {\the\pdflastximagepages}}
\label{#3\theimagepage}
\end{figure}
\clearpage}}
\makeatother

\renewcommand{\thesection}{\ORDINALstringnum{\arabic{section}} POINT}
\renewcommand{\thesubsection}{\arabic{subsection}}
\robustify{\ORDINALstringnum}

\makeatletter
\xpatchcmd{\tableofcontents}{\contentsname \@mkboth}{\LARGE\MakeUppercase{\contentsname}\@mkboth}{}{}
\makeatother

\begin{document}

\begingroup
\Large
\areaset{\paperwidth}{\paperheight}
\renewcommand{\figurename}{RECORD PAGE}
\picTEST{Transcript1_Label_Page}{example-image.pdf}{Transcript, September 1, 2010}
\picTEST{Transcript2_Label_Page}{example-image.pdf}{Transcript, February 23, 2011}

\endgroup

\tableofcontents

\newpage

\setcounter{page}{1}

\section{~}

\subsection{All Cows Eat Grass}

Here is reference to page \ref{Transcript2_Label_Page3} of the included PDF document, proving that:

The grass is greener...
\section{~}

\end{document}