You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have come to a point where I really need a way to have LaTeX automatically break lines formatted as inline listings. I'm using the package minted. Here's a minimal working example:
When compiling with latexmk -lualatex -shell-escape test.tex, the result is as follows:
According to the docs for minted, breaklines and breakanywhere are not available for \mintinline. I'm not sure about breakbytoken, but I'd be open to using it if it could potentially fix my problem.
There are two main issues logged in the minted repository that attempt to address this problem:
I read through both issues and it seems that the only viable workaround for now is to use \Verb instead of \mintinline. However there are a couple of problems with \Verb as far as I can tell:
You cannot set a language (Python, C++) the same way you can with \mintinline
You cannot set a bgcolor, which I like to have to clearly distinguish inline code from surrounding text.
There has got to be a way to achieve this using \mintinline? Any suggestions or ideas?
The text was updated successfully, but these errors were encountered:
I'm working on a complete reimplementation of \mintinline that will support all features from fvextra's \Verb, including line breaking. An initial version is now on GitHub. You can download the new minted.sty and put it in the same directory as your document to experiment with it. The documentation and some other features still have to be updated before a new version is released and uploaded to CTAN.
Warning, I'm crossposting from the LaTeX SE
I have come to a point where I really need a way to have LaTeX automatically break lines formatted as inline listings. I'm using the package
minted
. Here's a minimal working example:When compiling with
latexmk -lualatex -shell-escape test.tex
, the result is as follows:According to the docs for
minted
,breaklines
andbreakanywhere
are not available for\mintinline
. I'm not sure aboutbreakbytoken
, but I'd be open to using it if it could potentially fix my problem.There are two main issues logged in the
minted
repository that attempt to address this problem:I read through both issues and it seems that the only viable workaround for now is to use
\Verb
instead of\mintinline
. However there are a couple of problems with\Verb
as far as I can tell:\mintinline
bgcolor
, which I like to have to clearly distinguish inline code from surrounding text.There has got to be a way to achieve this using
\mintinline
? Any suggestions or ideas?The text was updated successfully, but these errors were encountered: