Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to obtain a table of contents like this one:

Table of contents

But I haven't found yet how to instruct LaTeX to format a table of contents like this. I have also tried a different approach giving up the table of contents and using instead an ordinary table. But also with tables I wasn't able to reproduce this kind of index.

UPDATE: I've tried to use the suggestions provided and I put them together into:

\documentclass{book}

\makeatletter
\newcommand*\l@chapterinfo{\@nodottedtocline{0}{0.0em}{1.5em}}

\def\@nodottedtocline#1#2#3#4#5{%
  \ifnum #1>\c@tocdepth \else
    \vskip \z@ \@plus.2\p@
    {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
     \parindent #2\relax\@afterindenttrue
     \interlinepenalty\@M
     \leavevmode
     \@tempdima #3\relax
     \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
     {#4}\nobreak
     \leaders\hbox{$\m@th
        \mkern \@dotsep mu\hbox{\,}\mkern \@dotsep
        mu$}\hfill
     \nobreak
     \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor }%
     \par}%
  \fi}

\makeatother

\def\chapterinfo#1{%
    \addcontentsline{toc}{chapterinfo}{%
    \noexpand\numberline{}#1}%

}

\begin{document}
\tableofcontents

\chapter{First conference}
\chapterinfo{\textit{\textbf{Some place, 12 may 2014}}}
\chapterinfo{Lorem ipsum dolor sit amet, consectetur adipiscing elit.}
But I haven't found yet how to instruct LaTex to format a table of contents ike this. I have also tried a different approach giving up the table of contents and using instead an ordinary table. 

\chapter{Second conference}
\chapterinfo{\textit{\textbf{Some place, 22 may 2014}}}
\chapterinfo{Pellentesque pellentesque hendrerit urna, et commodo metus rhoncus ut. Praesent eget magna nec leo rhoncus congue nec non leo.}
But I haven't found yet how to instruct LaTex to format a table of contents like this. I have also tried a different approach giving up the table of contents and using instead an ordinary table. But also with tables I wasn't able to reproduce this kind of index.

\end{document}

But:

  • How do I suppress the number before the title of the conference?
  • How do I put "Some place" in the right side?
  • How do I suppress "Chapter x" in the following pages?

I wasn't able to find how to use this tip:

\let\Chapter\chapter \def\chapter#1#2{\Chapter{#1}\chapterinfo{#2}}

Where can I find some documentation about it?

share|improve this question
    
Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Christian Hupfer Jun 7 at 12:39
3  
Table of Contents with additional description of entries covers the descriptors-per-sectional-unit part... –  Werner Jun 7 at 13:57
    
I thought you wanted the number before the conference? (It is there in the example you posted.) –  cfr Jun 15 at 22:00

1 Answer 1

Here is one solution. The strategy is to define a custom command \conference that allows you to include the location info, description, etc. This then adds some commands \infoa and \infob in the .toc file so that it is available when the contents line is typeset.

Finally, the conference is typeset as a chapter (but this could be a section if you prefer) without or with a star (to suppress the number as you mention). The format of the contents page is controlled with the titletoc package, with the numbers and pages hanging out in the margins with \llap and \rlap. (The choice of fonts etc. needs to be fixed, but I sort of matched your example.)

If you don't like the formatting of the chapters, then you can use the titlesec package to customize these.

I have used a few other useful packages like etoolbox for delaying expansion and suffix for defining starred commands.

\documentclass{book}
\usepackage{titletoc}           % For custom toc formatting
%\usepackage{titlesec}          % If you want control of the chapter look
\usepackage{etoolbox}           % For \csuse
\usepackage{suffix}             % For defining starred commands

%% These are just for convenience: they could be used directly in the
%% \titlecontents command.
\def\confloc{\textit{\infoa}}                % Formatting of location
\def\confinfo{\normalsize\textsf{\infob}}    % Formatting of info
\def\confpage{Pag.~\thecontentspage}         % Formatting of page

\titlecontents{chapter}                      % Use section if you prefer
  [0pt]
  {\large}                                   % Overall font
  {\llap{\thecontentslabel.\hspace{0.5em}}}  % Numbered label before title
  {}                                         % Unnumbered label
  {\hfill\confloc%                           % After label (loc and page)
   \rlap{\hspace{1em}\confpage}}
  [\vspace{\baselineskip}                    % Below the entry.
   \confinfo\csuse{par}                      % Can't use \par directly
   \vspace{\baselineskip}]

%% Usage: \conference[location and date]{Title}{Description}
%%        \conference*[location and date]{Title}{Description}
\newcommand{\conference}[3][]{               % Numbered version
  \addtocontents{toc}{
    \csdef{infoa}{#1}
    \csdef{infob}{#3}
  }
  \chapter{#2}                              % Could use sections etc. here
}

% Starred version
\WithSuffix\newcommand{\conference}*[3][]{  % Unnumbered starred version
    \addtocontents{toc}{
    \csdef{infoa}{#1}
    \csdef{infob}{#3}
  }
  \chapter*{#2}                             % Could use sections etc. here
  \addcontentsline{toc}{chapter}{#2}
}

% Change the name from Chapter to Conference
\renewcommand{\chaptername}{Conference}

\begin{document}
\tableofcontents
\conference[Some place, 12 may 2014]%
           {First conference}%
           {Lorem ipsum dolor sit amet, consectetur adipiscing elit.}%
But I haven't found yet how to instruct LaTex to format a table of contents
like this. I have also tried a different approach giving up the table of
contents and using instead an ordinary table.

\conference*[Some place, 22 may 2014]%
            {Second conference}%
            {Pellentesque pellentesque hendrerit urna, et commodo metus
             rhoncus ut. Praesent eget magna nec leo rhoncus congue nec non
             leo.}%
But I haven't found yet how to instruct LaTex to format a table of contents
like this. I have also tried a different approach giving up the table of
contents and using instead an ordinary table. But also with tables I wasn't
able to reproduce this kind of index.

\end{document}

Here is the result:

Sample ToC table from code

The first conference has a number and the \chaptername which I have changed to Conference:

First chapter (numbered)

The second conference has no number of Chapter label since it is typeset as an unnumbered chapter with the \chapter* command.

Second chapter (no number)

References

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.