4

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

\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}{...} 命令中使用。

有人有其他建议吗?

4

1 回答 1

2

知道了...

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

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

对不起噪音!

欧文斯

于 2009-12-02T22:40:33.060 回答