TheNetAdmin / zjuthesis

Zhejiang University Graduation Thesis LaTeX Template
https://thenetadmin.github.io/zjuthesis
MIT License
2.49k stars 597 forks source link

如何让外文翻译部分的标题不出现在目录中 #384

Closed cxzhou35 closed 3 months ago

cxzhou35 commented 4 months ago

操作系统

MacOS

TeX 套件

TeXLive 2021 或更新的版本

TeX Compiler

XeTeX

zjuthesis 版本号

v10.0.1

MajorFormat

general

Degree

undergraduate

Type

thesis

Period

proposal

BlindReview

false

GradLevel

master

问题描述

学院要求目录页外文翻译部分不需要二级标题; 目录中的三、外文翻译下面什么都不需要,直接接四、外文原文

我现在的做法是把外文翻译部分的section改成section*,这样不会自动加入toc,但是参考文献还是会显示,我看了这部分的tex源码,对应的是

\begingroup
    \linespreadsingle{}
    \printbibliography[title={外文翻译参考文献}]
\endgroup

这部分我该如何不让它加入到目录中?

编译日志

No response

代码

No response

截图

image

其他信息

No response

Tyfan0321 commented 3 months ago

在第一个不需要显示的章节前添加 \addtocontents{toc}{\protect\setcounter{tocdepth}{0}}。这将设置目录深度为0,之后的所有章节都不会被添加到目录中,同时这不会影响标题编号

cxzhou35 commented 3 months ago

非常感谢!