我使用Pygments
做了很多事情,我也想在我的乳膠報告中使用它。我發現與Pygments交互的包Minted
,但一些註釋和一些代碼溢出了右邊距。過去我使用過lstlistings'breaklines=true
,但是我沒有看到使用Minted軟件包獲得該功能的方法,有什麼想法?乳膠:使用鑄造包裝 - 我如何使它包裝文本(linebreaks = true)
\documentclass[10pt]{article}
\usepackage{fancyvrb}
\usepackage{minted}
\begin{document}
\begin{minted}[mathescape,
linenos,
numbersep=5pt,
frame=single,
numbersep=5pt,
xleftmargin=0,
]{python}
class Run(BaseModel):
"""
Run: unique Tool and multiple Inputs
Status:
Running => jobs are pending or runing and not all jobs have been completed
Paused => workers querying for 'Running' Runs won't get this Run until we change status again
Done => all jobs have completed and have a result_status = 'Done'
Incomplete => No results (inputs) have been associated with the Run
"""
name = models.CharField(max_length = 150,
unique=True)
tool = models.ForeignKey('Tool')
tags = models.ManyToManyField(RunTag, related_name="model_set")
\end{minted}
\end{document}
謝謝您的明確答案康拉德。 儘管如此,我對所製作的結果非常滿意,因此我不必再仔細檢查輸出結果。 – Paddie
您目前是否有任何活動在minted中實施'breaklines'功能? – eckes
我只想重複@eckes問題 –