Stop Sphinx from Hyphenating

前端 未结 2 911
一向
一向 2021-01-21 01:52

I have a similar question to this, except for Sphinx and RST. Namely, I would like to prevent text from being hyphenated at the end of the line.

For example I want this:

2条回答
  •  悲&欢浪女
    2021-01-21 02:52

    Hyphenation is implemented by the stylesheet basic.css in the Sphinx theme "basic".

    div.body p, div.body dd, div.body li, div.body blockquote {
        -moz-hyphens: auto;
        -ms-hyphens: auto;
        -webkit-hyphens: auto;
        hyphens: auto;
    }
    

    You can override these styles with your own. See my answer to How do I customize Sphinx RtD Theme default search settings?

    Your theme may have JavaScript or other styles that implement hyphenation.

    For PDF output, see https://tex.stackexchange.com/a/5039

提交回复
热议问题