-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
\mintline line break too late #400
Comments
The new A more interesting question: given the same code to highlight and line width to typeset, why A slightly simplified example: \documentclass{article}
\usepackage[pass, showframe]{geometry}
\usepackage{minted}
\begin{document}
\noindent
\mintinline[breaklines, breakafter=-/\space\\]{bash}{bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)}
\begin{minted}[breaklines, breakafter=-/\space\\]{bash}
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
\end{minted}
% add "breaksymbolleft="
\begin{minted}[breaklines, breakafter=-/\space\\, breaksymbolleft=]{bash}
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
\end{minted}
\end{document} Update: Compiled using released |
Line break locations depend on hyphenation settings and various penalties related to line breaks. In a If breaks are acceptable at any location, not just at spaces and slashes, then In this case, adding something like \begingroup
\emergencystretch=1em\relax
\mintinline[breaklines, breakafter=-/\space\\,breakanywhereinlinestretch=1em]{bash}{bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)}
\endgroup |
Ah TeX's paragraph-wide settings, again. |
Thx for the quick help. |
When using
\mintinline
with a shell command which has a long url line breaking will kick in too late. Using a minted environment everything is ok.Is there anyway to config \mintineline to break a little bit earlier so that the comment will not go over my margins?
The text was updated successfully, but these errors were encountered: