Question

I am struggling with custom toc items added via:

\addcontentsline{toc}{section}{Some text here}

Actually my problem is that I need to add some items which contain chronological date periods like:

12/1/2005 - 3/3/2006 Some event.........................................1
10/10/2005 - 11/30/2005 Some other event................................2

This looks not so nice. What I would like to do is adjusting event description to some line position to look like:

12/1/2005 - 3/3/2006     Some event.....................................1
10/10/2005 - 11/30/2005  Some other event...............................2

I tried to use \makebox but as it seems it is not allowed to be used within \addcontentsline{toc}{section}{...} command.

Does anyone have other suggestions?

Was it helpful?

Solution

Got it...

\makebox is a fragile command, so I need to protect it :)

\addcontentsline{toc}{section}{\protect\makebox[2cm][l]{date here} Description here}

Sorry for noise!

Ovanes

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top