gouchaoer2
V2EX  ›  Markdown

gitbook 渲染 pdf 的时候怎么让 code 全部渲染出来没有滑条

By gouchaoer2 at 2020 年 8 月 26 日 · 5995 次点击
gitbook 渲染成 html 或者 pdf 的时候,如果 code 段落太长,就会生成滑条。html 还好可以滑动,但是 pdf 滑条没用,导致渲染不完全。我用对应的 pdf.css 修改了 code 段落自动换行不生成滑条也没用,搞不定了,求救

3 条回复  •  2020-08-26 21:30:05 +08:00
sunjourney
   1
sunjourney  
   2020 年 8 月 26 日
应该有个 pdf 专用的 css,媒体查询里,改那个
gouchaoer2
   2
gouchaoer2  
OP
   2020 年 8 月 26 日
@sunjourney 我改了 pdf.css ,感觉里面的设置有的有用,有的没用,比如我这个:

```
a.gitbook-link{
display: none !important;
}
footer.page-footer{
opacity: 0.1 !important;
font-size: 10px;
}

.markdown-section pre>code{
white-space: inherit !important;
}

```
里面的`opacity: 0.1 !important;`就有用,但是`white-space: inherit !important;`就没用
raaaaaar
   3
raaaaaar  
   2020 年 8 月 26 日 via Android
mdbook 试试? gitbook 那编译速度真的能忍么。。
› Daring Fireball: Markdown
› CommonMark
› MacDown Open Source Markdown Editor
› Marked
› GitHub Flavored Markdown
© 2026 V2EX · 42ms · 3.9.8.5