The 'problem' is hyperref
-- it tries to create bookmarks automatically, writing pdf string
content to the bookmarks. Apparently \printdate
does not provide such pdf string
content. The usage of bookmarks can be prevented with bookmarks=false
option to hyperref
.
A working solution, however, not with 'correct' date formatting in the bookmarks, is to use \texorpdfstring{\printdate{...}}{...}
, where the 2nd argument content goes to the bookmark and the first one is for the section title/ToC.
\documentclass[english]{report}
\usepackage{verbatim}
\usepackage{isodate}
\usepackage{hyperref}
\usepackage{bookmark}
\newcommand{\printdatetitle}[1]{%
\texorpdfstring{\printdate{#1}}{#1}%
}
\makeatletter
%\providecommand{\@nil}
\makeatother
\dateinputformat{tex}
\begin{document}
\tableofcontents
\chapter{First}
\section{\printdatetitle{2014/1/3}}
\end{document}
If you opt for option 1. (showing only section titles), you could use hideallsubsections
option which shows only sections. Maybe it will fix your spacing problem (you should have given a MWE to allow testing).
\begin{frame}
\frametitle{Table of Contents}
\tableofcontents[hideallsubsections]
\end{frame}
This option fits well with a presentation at every new section of its detailed contents. Here is a code for that (to put just after \begin{document}
which use hideothersubections
:
\AtBeginSection[]{
\begin{frame}{Outline}
\small \tableofcontents[currentsection, hideothersubsections]
\end{frame}
}
If you opt for option 2. (having a big table of contents on several slides), you could decide to put only one section per slide:
\tableofcontents[sections={1}]
You could also be interested in showing the whole table of contents on two columns. Here is an example:
\begin{frame}{Plan}
\begin{columns}[t]
\begin{column}{5cm}
\tableofcontents[sections={1-4},currentsection, hideothersubsections]
\end{column}
\begin{column}{5cm}
\tableofcontents[sections={5-8},currentsection,hideothersubsections]
\end{column}
\end{columns}
\end{frame}
And there is the allowframebreaks
option to display a classic talbe of contents on several slides:
\begin{frame}[allowframebreaks]
\tableofcontents
\end{frame}
Best Answer
Here's one possibility, using the
titlesec
package; before each\section
, some commands can be used:\undefds
suppresses previous dates and subtitles;\sectiondate{<text>}
assigns<text>
as the date for the following\section
, and\sectionsubtitle{<text>}
assigns<text>
as the subtitle for the following\section
.Since
titlesec
was used, somre restrictions apply (See About memoir and titlesec incompatibility). The code:An image of the result: