› Daring Fireball: Markdown
› CommonMark
› MacDown Open Source Markdown Editor
› Marked
› GitHub Flavored Markdown
gouchaoer2
V2EX  ›  Markdown

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

  •  
  •   gouchaoer2 · Aug 26, 2020 · 6110 views
    This topic created in 2270 days ago, the information mentioned may be changed or developed.
    gitbook 渲染成 html 或者 pdf 的时候,如果 code 段落太长,就会生成滑条。html 还好可以滑动,但是 pdf 滑条没用,导致渲染不完全。我用对应的 pdf.css 修改了 code 段落自动换行不生成滑条也没用,搞不定了,求救

    3 replies  •  2020-08-26 21:30:05 +08:00
    sunjourney
    sunjourney
    Aug 26, 2020
    1
    应该有个 pdf 专用的 css,媒体查询里,改那个
    gouchaoer2
    gouchaoer2
    OP
    Aug 26, 2020
    2
    @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
    raaaaaar
    Aug 26, 2020 via Android
    3
    mdbook 试试? gitbook 那编译速度真的能忍么。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2109 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 01:51 · PVG 09:51 · LAX 17:51 · JFK 20:51
    ♥ Do have faith in what you're doing.