很简单,我想在我正在撰写的文章开头呈现待办事项列表。但是,我正在使用 siamltex 文档类,这似乎有点碍事。
以下是 MWE:
\documentclass[draft]{siamltex}
\usepackage{todonotes}
\begin{document}
\listoftodos
I love cats. Cats are great. I wish I could write my thesis on cats. \todo{Mention again how amazing cats are.}
I wish I could be a cat. They just eat, sleep, poop, and sometimes vomit. And then there's the petting. It's like a 24/7 massage. \todo[inline]{Schedule a massage for yourself pronto.}
\end{document}
我必须使用 siamltex 文档类,因此简单地更改类不是一个选择。
作为参考,这里是.tdo 文件:
\contentsline {todo}{Mention again how amazing cats are.}{1}{section*.2}
\contentsline {todo}{Schedule a massage for yourself pronto.}{1}{section*.3}
答案1
类siamltex
设置tocdepth
为 0,但您需要将其设置为 1。还有一个小问题,因为部分标题是内联设置的。我不会担心标题的缩进,因为这只是草稿。
\documentclass{siamltex}
\usepackage{todonotes}
\usepackage{xpatch}
\usepackage{hyperref}
\makeatletter
\xpatchcmd{\listoftodos}{\@starttoc}{\mbox{}\par\@starttoc}{}{}
\makeatother
\setcounter{tocdepth}{1}
\begin{document}
\listoftodos
\bigskip
I love cats. Cats are great. I wish I could write my
thesis on cats. \todo{Mention again how amazing cats are.}
I wish I could be a cat. They just eat, sleep, poop, and
sometimes vomit. And then there's the petting. It's like
a 24/7 massage. \todo[inline]{Schedule a massage for yourself pronto.}
\end{document}