问题
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:
回答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