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

breakbefore and breakafter not work for excessive sequence of same characters #27

Open
muzimuzhi opened this issue Sep 27, 2024 · 2 comments

Comments

@muzimuzhi
Copy link

\documentclass{article}
\usepackage{fvextra}

\begin{document}

\begin{Verbatim}[breaklines,breakafter=-]
-------------------------------------------------------------------------------
\end{Verbatim}

\begin{Verbatim}[breaklines,breakafter=-,breakbefore=-]
-------------------------------------------------------------------------------
\end{Verbatim}

% only `breakanywhere` succeeds
\begin{Verbatim}[breaklines,breakanywhere]
-------------------------------------------------------------------------------
\end{Verbatim}

\end{document}

image

@gpoore
Copy link
Owner

gpoore commented Sep 27, 2024

For cases like this, you need breakbeforeinrun and breakafterinrun to allow breaks within runs of identical characters.

It looks like some unnecessary breaks are inserted...it might be possible to improve things so that those are prevented.

@muzimuzhi
Copy link
Author

Thanks! breakafter=-,breakafterinrun works like a charm.

I also noticed that the docs of breakbeforeinrun and breakafterinrun in minted is misleading and different from those in fvextra. I've opened gpoore/minted#408 to fix it.

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

No branches or pull requests

2 participants