开发者

LaTeX adjusting space in toc items

开发者 https://www.devze.com 2022-12-12 22:46 出处:网络
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 period开发者_S

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 period开发者_StackOverflows 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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消