V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Daring Fireball: Markdown
CommonMark
MacDown Open Source Markdown Editor
Marked
GitHub Flavored Markdown
gouchaoer2
V2EX  ›  Markdown

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

  •  
  •   gouchaoer2 · Aug 26, 2020 · 5725 views
    This topic created in 2081 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
        1
    sunjourney  
       Aug 26, 2020
    应该有个 pdf 专用的 css,媒体查询里,改那个
    gouchaoer2
        2
    gouchaoer2  
    OP
       Aug 26, 2020
    @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  
       Aug 26, 2020 via Android
    mdbook 试试? gitbook 那编译速度真的能忍么。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1470 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 16:57 · PVG 00:57 · LAX 09:57 · JFK 12:57
    ♥ Do have faith in what you're doing.