\maketitle
is a command, which 'disables' itself right before the end of the macro (well, it is \relax
ed then). As such, a further call to this macro will provide nothing. By using a patch command, this \let\maketitle\relax
can be catched and a \addcontentsline
command injected instead, which will do the ToC entry then.
I further introduced a titlecounter
counter, which is automatically refstepped, so that \label
should also work. The format of the ToC entry is quite simple at the moment -- change at will.
Mico had an important objection: There should be a \clearpage
right at the start of the \maketitle
command, which will shipout possible floats from the preceeding article. However, I restricted this behaviour to the 2nd etc. \maketitle
.
\documentclass[journal]{IEEEtran}
\usepackage{etoolbox}%
\usepackage{xpatch}
\usepackage{blindtext}
\makeatletter
\newcounter{titlecounter}
\xpretocmd{\maketitle}{\ifnumgreater{\value{titlecounter}}{1}}{\clearpage}{}{} % Well, this is lazy at the end ;-)
\xpatchcmd{\maketitle}{\let\maketitle\relax\let\@maketitle\relax}{\refstepcounter{titlecounter}\addcontentsline{toc}{section}{\protect{\numberline{\thetitlecounter}{\@title~ \@author}}}}{\typeout{Patching was successful}}{\typeout{patching failed}}%
\makeatother
\begin{document}
\onecolumn
\tableofcontents
\twocolumn
% Title and Author information Paper 1
\title{Title 1}
\author{Author 1}
% Make the title area
\maketitle
\blindtext[10]
%$ Paper Content
% Title and Author information Paper 2
\title{Title 2}
\author{Author 2}
% Make the title area
\maketitle
\blindtext[20]
%$ Paper Content
\end{document}

Version with level indentation
Use \setlength{\articlesectionindent}{10pt}
(or any other appropiate value), in order to get the indentation of levels relative to the title toc entry.
The resetting of sections etc. is done with the command \@addtoreset{section}{titlecounter}
, i.e. each time the titlecounter
is stepped, the sections are reset (and consecutively the subsections etc. as well)
\documentclass[journal]{IEEEtran}
\usepackage{etoolbox}%
\usepackage{xpatch}
\usepackage{blindtext}
\usepackage{tocloft}%
\newlength{\articlesectionshift}%
\setlength{\articlesectionshift}{10pt}%
\addtolength{\cftsecindent}{\articlesectionshift}%
\makeatletter
\newcounter{titlecounter}
\xpretocmd{\maketitle}{\ifnumgreater{\value{titlecounter}}{1}}{\clearpage}{}{} % Well, this is lazy at the end ;-)
\xpatchcmd{\maketitle}{\let\maketitle\relax\let\@maketitle\relax}{\refstepcounter{titlecounter}\begingroup
\addtocontents{toc}{\begingroup\addtolength{\cftsecindent}{-\articlesectionshift}}%
\addcontentsline{toc}{section}{\protect{\numberline{\thetitlecounter}{\@title~ \@author}}}%
\addtocontents{toc}{\endgroup}}{\typeout{Patching was successful}}{\typeout{patching failed}}%
\@addtoreset{section}{titlecounter}
\makeatother
\begin{document}
\onecolumn
\tableofcontents
\twocolumn
% Title and Author information Paper 1
\title{Title 1}
\author{Author 1}
% Make the title area
\maketitle
\section{First}
\subsection{First subsection of 1st section}%
\subsection{2nd subsection of 1st section}%
\subsection{3rd subsection of 1st section}%
\subsection{4th subsection of 1st section}%
\blindtext[10]
\section{Two}
\subsection{First subsection of 2nd section}%
% Title and Author information Paper 2
\title{Title 2}
\author{Author 2}
% Make the title area
\maketitle
\section{First from second paper}
\subsection{First subsection of 2nd section of 2nd article}%
\blindtext[20]
%$ Paper Content
\end{document}

** Warning ** Both versions will fail in conjunction with hyperref
package. It's some issue with the \footnotemark
command.
This did the job for me. Although not completely. But for all practical purposes, it is close enough.
\AtBeginSubsection[]{
\frame<beamer>{
\frametitle{Outline}
\tableofcontents[currentsection,currentsubsection,sectionstyle=show/hide,subsectionstyle=show/shaded/hide,subsubsectionstyle=show/show/shaded/shaded]}
}
Best Answer
Sorry, I've found an answer to this question eventually: in the comment to https://tex.stackexchange.com/a/3329/3897: I should use
\setcounter{maxsecnumdepth}{3}
, notsecnumdepth
.Or, even better,
\setsecnumdepth{subsection}
as said in https://tex.stackexchange.com/a/33458/3897.