ラテックス:鋳造パッケージを使用して - どのように私はそれがテキスト(改行= true)をラップ作るのですか
質問
イムはたくさんのためのPygments
を使用して、そして私も、ラテックスレポートでこれを使用したいと思います。私はPygmentsと相互作用し、パッケージMinted
を見つけましたが、コメントの一部とコードの一部は、右マージンをオーバーフローします。私は過去にlstlistings' breaklines=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}
解決
を残念ながら、申し訳ありませんが、現時点でまたは予見可能な将来のためにminted
以内に解決策はありません。 breaklines
機能を実装することは非常に困難です。 listings
を使用する代わりに、ここにあなたの最善の解決策かもしれません。デル>
鋳造は今breaklines
オプションを持っています。
他のヒント
鋳造され、あなたがそれをbreaklines
オプションを与える場合は2.0(リリースされたばかりの)ライン壊すん:
\documentclass[10pt]{article}
\usepackage{fancyvrb}
\usepackage{minted}
\begin{document}
\begin{minted}[%
breaklines,
mathescape,
linenos,
numbersep=5pt,
frame=single,
numbersep=5pt,
xleftmargin=0pt,
]{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}
改行の存在が出力に示される方法を制御するための様々な関連オプションもあります。 鋳造のドキュメントにセクション6.3を参照してください。
それはLaTeXのでPygmentsの蛍光ペンを使用するためであるとして、
あなたはtexments
を見ている必要があります。
http://www.ctan.org/tex-archive/macros /ラテックスに/ contrib / texments / の
所属していません StackOverflow