-
Notifications
You must be signed in to change notification settings - Fork 3k
生成的pdf有问题,可以不要系统自动生成的那个标题么? #108
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
找了好久没找到这个选项,真是郁闷。 |
提供一种思路:
可选操作(加一个封面) |
我解决了这个问题,现把解决方法共享给大家。 在 latex 文件导言区加入以下代码: % 隐藏原目录名
\renewcommand{\contentsname}{}
% 在 section 前插入分页
\usepackage{titlesec}
\newcommand{\sectionbreak}{\clearpage}
% 章节编号只编号到 subsection
\newcommand\normalsecnumdepth{\setcounter{secnumdepth}{2}}
% 所有层次章节都不编号
\newcommand\specialsecnumdepth{\setcounter{secnumdepth}{-2}}
% toc 到 subsection
\newcommand\normaltocdepth{
\setcounter{tocdepth}{2}
\addtocontents{toc}{\setcounter{tocdepth}{2}}
}
% toc 到 section
\newcommand\specialtocdepth{
\setcounter{tocdepth}{1}
\addtocontents{toc}{\setcounter{tocdepth}{1}}
} 在 \specialsecnumdepth
\specialtocdepth
\section{目录}
\vspace{-36pt} 在 \normaltocdepth 在 \specialtocdepth 之后编译后的 pdf 文件, 无论正文中目录页还是书签栏显示都是正常的. 如下图: |
谢谢 CarlKing5019 童鞋 |
@CarlKing5019 可以共享出来 |
@YuLongjun 我上传了一份到我的 github 里, 可以从 这里 下载. |
你好,请问这个文档下下来之后如何生成pdf版本的呢,是用make pdf命令吗,我试了下但是并没有生成啊,谢谢. |
@McooLewis , 请使用 |
好的,十分感谢. |
pdf 的档案需要更新下了, 4.1 之后提交了不少修正 |
to all: 最新版3.0.0的PDF已发布,根据最新源码生成,并且去掉了多余标题。另外这个步骤并没有CarlKing5019的那么复杂。只需要一步即可: 编辑文件 再执行:
|
我之前的解决方案中, 核心代码也是 优化排版的代码具体来说如下:
|
赞一个, @CarlKing5019 |
已经参考 @CarlKing5019 的方法重新生成了最新的PDF文件 |
赞, @yidao620c |
可以不要系统自动生成的那个标题么?生成pdf的程序有没有可选项可以去掉?要不跟原来的标题冲突了,而且copyright和前言都识别为章节了。
The text was updated successfully, but these errors were encountered: