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
\documentclass[10pt,a4paper]{article}
\usepackage[breaklinks,colorlinks,urlcolor=blue,citecolor=blue,linkcolor=blue,bookmarks]{hyperref}
\usepackage{caption}
\DeclareCaptionLabelSeparator{pipe}{~\textbf{\textbar}~}
\captionsetup{font=small,margin=2em,labelfont=bf,labelsep=pipe,figurename=Figure,tablename=Table}
\begin{document}
example example example
\end{document}
I expect the default processing result of the tex-fmt to be as follows:
\documentclass[10pt,a4paper]{article}
\usepackage[breaklinks,colorlinks,urlcolor=blue,citecolor=blue,linkcolor=blue,
bookmarks]{hyperref}
\usepackage{caption}
\DeclareCaptionLabelSeparator{pipe}{~\textbf{\textbar}~}
\captionsetup{font=small,margin=2em,labelfont=bf,labelsep=pipe,
figurename=Figure,tablename=Table}
\begin{document}
example example example
\end{document}
But the actual situation is that tex-fmt gives a warning message:
WARN: tex-fmt test.tex: Line 2 (2). Line cannot be wrapped. \usepackage[breaklinks,colorlinks,urlcolor=blue,citecolor=blue,linkcolor=blue,bookmarks]{hyperref}
WARN: tex-fmt test.tex: Line 5 (5). Line cannot be wrapped. \captionsetup{font=small,margin=2em,labelfont=bf,labelsep=pipe,figurename=Figure,tablename=Table}
The text was updated successfully, but these errors were encountered:
Hi @cnkjw, currently tex-fmt doesn't consider commas , to be valid wrapping points, it only searches for spaces.
I see that this could be useful in the preamble, but tex-fmt isn't yet "preamble-aware". I'm working on this for a re-wrapping feature (#64) so maybe I can look into enabling wrapping at commas when in the preamble as part of that.
For LaTeX code, automatic wrapping may indeed be a challenge. I have found that the wrap feature often fails when using latexindent, so I am currently trying out the great new project, tex-fmt. I look forward to the early realization of this feature.
I have the following code:
I expect the default processing result of the
tex-fmt
to be as follows:But the actual situation is that
tex-fmt
gives a warning message:The text was updated successfully, but these errors were encountered: