LaTeX调整toc项目中的空间

时间:2009-12-02 22:01:54

标签: text latex adjustment tableofcontents

我正在努力通过以下方式添加自定义toc项目:

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

实际上我的问题是我需要添加一些包含按时间顺序排列日期的项目,如:

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

这看起来不那么好。我想做的是将事件描述调整到某个行位置,如下所示:

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

我尝试使用\ makebox,但似乎不允许在\ addcontentsline {toc} {section} {...}命令中使用它。

有没有人有其他建议?

1 个答案:

答案 0 :(得分:2)

得到了......

\ makebox是一个脆弱的命令,所以我需要保护它:)

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

对不起噪音!

Ovanes