Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

生成的PDF档中有很多“\newpage” #162

Closed
Hagb opened this issue May 21, 2018 · 10 comments
Closed

生成的PDF档中有很多“\newpage” #162

Hagb opened this issue May 21, 2018 · 10 comments

Comments

@Hagb
Copy link
Contributor

Hagb commented May 21, 2018

No description provided.

@mytbk
Copy link
Contributor

mytbk commented May 21, 2018

还真的是这样。
当初加\newpage是为了LaTeX生成的时候在某些地方开新页,但是我一直觉得这不是一个好的做法。

@mytbk
Copy link
Contributor

mytbk commented May 21, 2018

我用Arch的pandoc,发现\newpage被翻译成了\textbackslash{}newpage

@tonghuix
Copy link
Contributor

tonghuix commented May 21, 2018

确实,新版本的 pandoc 并没有很好的解释 \newpage 标签。

我们需要找一个新的办法替代这种硬编码的换页方式。

@mytbk
Copy link
Contributor

mytbk commented May 21, 2018

刚刚推了个新的pdf模板:
https://github.com/beijinglug/fsfs-zh/tree/kill-newpage

@mytbk
Copy link
Contributor

mytbk commented May 21, 2018

在一个Ubuntu 16.04的机器上生成了一份pdf,感觉还行:
https://wehack.space/vimacs/fsfs-zh.pdf

@mytbk
Copy link
Contributor

mytbk commented May 21, 2018

在仔细对比了一下,发现这么改了之后,每一节的编号没了。

@tonghuix
Copy link
Contributor

我觉得编号没有是件好事!!因为原书也没有!

@mytbk
Copy link
Contributor

mytbk commented May 22, 2018

原书是有的。
原书和现在发布的最新版在章节编号上也是不一样的,原书是分为几个part,文章按顺序编号。

@mytbk
Copy link
Contributor

mytbk commented May 22, 2018

我先把这个修改合进master并发个release,看一下是什么效果,其他的问题以后再修复。

@mytbk mytbk closed this as completed May 22, 2018
@tonghuix
Copy link
Contributor

@mytbk 我在 Debian Buster 下面生成的新 PDF 已经传到 release 里面了。目前编号也出现了。

关于如何生成原书的编号,咱们可能还需要再研究一下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants