在 Latex 中隐藏 Toc 的条目
我想知道如何隐藏目录中的某个部分,但又不会丢失文档正文中的部分编号。例如,在这个 tex 文件中,我丢失了 hide
的编号,并且所有序列都被损坏:
\documentclass{article}
\begin{document}
\tableofcontents
\section{uno}
\section{dos}
\section*{hide}
\section{tres}
\end{document}
I would like to know how I can hide a section from the table of contents but without loosing the section number in the body of the document. For example, in this tex file I loose the number for hide
, and all the sequences are damaged:
\documentclass{article}
\begin{document}
\tableofcontents
\section{uno}
\section{dos}
\section*{hide}
\section{tres}
\end{document}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为您正在寻找
或将其变成命令:
编辑:
好的,我想我明白现在想要什么(而且它比我给出的答案更有意义)。下面是一个命令,您可以使用它来禁止向目录中添加节、小节等。这个想法是暂时禁用
\addcontentsline
。I think you are looking for
or make it into a command:
EDIT:
Okay, I think I understand what is wanted now (and it makes more sense then the answer I gave). Here is a command that you can use to suppress adding a section, subsection, etc. to the TOC. The idea is to temporarily disable
\addcontentsline
.只是想说谢谢伊万斯的伟大提示!
(我只是在谷歌上搜索与我的自定义 (Sub)Appendix{} 命令类似的内容:
也许这对其他人也有用......)
Just wanted to say thanks for Ivans great hint!
(I was just googling for something similar for my customized (Sub)Appendix{} commands:
Maybe this is useful for someone else, too...)
刚刚从类似的问题来到这里。上面的答案没有'不太有效,因为它给出了一些格式问题,但是 类似的解决方案 似乎成功了
have just come here from a similar question. The answer above didn't quite work as it gave some formatting issues, but a similar solution seemed to do the trick