Skip to content
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

breaklines does not work #2 #329

Closed
damnms opened this issue May 11, 2022 · 4 comments
Closed

breaklines does not work #2 #329

damnms opened this issue May 11, 2022 · 4 comments

Comments

@damnms
Copy link

damnms commented May 11, 2022

Unfortunately, i am facing again a problem with breaklines and breakanywhere.
I have "Hello world \mintinline{bash}|openwrt-22.03.0-rc1-mvebu-cortexa9-cznic_turris-omnia-sysupgrade.img.gz|" and use \setminted[bash]{breaklines, breakanywhere}, but unfortunately that mintinline goes way over the page.
Anyone an idea what to do, so it is broken anywhere?

@muzimuzhi
Copy link

muzimuzhi commented May 11, 2022

According to the doc, breakanywhere does not apply to \mintinline. Related: #31

minted/source/minted.dtx

Lines 1024 to 1025 in d46f1ba

% \item[breakafter (string) (\meta{none})]
% Break lines after specified characters, not just at spaces, when \texttt{breaklines=true}. Does not apply to |\mintinline|.

@damnms
Copy link
Author

damnms commented May 11, 2022

thanks for that information. any idea how to workaround that? can i somehow specify a "breakafter='*' ", like "break on each char" or so? i tested the #31 hint from one person but unfortunately, it did not act like he mentioned.

@gpoore
Copy link
Owner

gpoore commented May 11, 2022

@damnms For a case like this, I'd suggest \Verb from fvextra, which minted loads internally:

Hello world \Verb[breaklines,breakanywhere]|openwrt-22.03.0-rc1-mvebu-cortexa9-cznic_turris-omnia-sysupgrade.img.gz|

\Verb has some capabilities that currently don't exist with \mintinline.

@amine-aboufirass
Copy link

@gpoore can I assign specific languages, such as python or cpp with \Verb and get the correct syntax highlighting? Also can I assign a bgcolor using a command similar to \setmintedinline{bgcolor=bg}?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants