Sphinx automodule, no text wrap in class name (latexpdf)

会有一股神秘感。 提交于 2021-02-10 22:42:19

问题


I'm generating pdf using make latexpdf of Sphinx. This mostly works fine but I have a quite deep folder structure for my project resulting in class names that do not fit on the page. Anyone who knows how I can tackle this?

Here is a screenshot of the problem:

screenshot


回答1:


Hi I hope you found the solution if not add the code below in the preamble of your conf.py

\makeatletter
\renewcommand{\pysigline}[1]{%
                                            
\setlength{\py@argswidth}{\dimexpr\labelwidth+\linewidth\relax}%

\item[{\parbox[t]{\py@argswidth}{\raggedright#1}}]}

 \renewcommand{\pysiglinewithargsret}[1]{%
                                           
 \setlength{\py@argswidth}{\dimexpr\labelwidth+\linewidth\relax}%

 \item[{\parbox[t]{\py@argswidth}{\raggedright#1}}]}
                                            
\makeatother


来源:https://stackoverflow.com/questions/60393710/sphinx-automodule-no-text-wrap-in-class-name-latexpdf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!