Closed koppor closed 1 year ago
Thanks for this.
Have you seen https://latexindentpl.readthedocs.io/en/latest/sec-fine-tuning.html?highlight=Href#lst-finetuning4
Let me know if it helps!
Do you really want huge set to wrap? It slows down everything and may give undesirable results...
Any luck with the above?
If we use
defaultIndent: ' '
modifyLineBreaks:
textWrapOptions:
columns: 79
huge: wrap
verbatimEnvironments:
markdown: 1
fineTuning:
trailingComments:
notPreceededBy: (?:(?<!pape)) # <!--- NEW BIT
then the output is
For end users, installing Node.js can be tedious. Therefore, for each
supported template, a separate GitHub repository is offered. In that
repository, default \verb+paper-*.tex+ files are offered. For the
\LNCS\ template,\footnote{\url{https://github.com/latextemplates/LNCS}}
\href{https://github.com/latextemplates/LNCS/blob/main/paper.tex}{\texttt{pape
% r.tex}} uses the Computer Modern font, \texttt{microtype} configuration,
\texttt{listings} configuration (including \JSON\ support),
\texttt{pdfcomment}\footnote{\url{https://ctan.org/pkg/pdfcomment}} for
\acro{TODO} marking, and \LaTeX{} examples. To reduce the size of the
\verb+.tex+ file, no hints on writing a paper are included.
reference: https://latexindentpl.readthedocs.io/en/latest/sec-fine-tuning.html#lst-href2
If we use
defaultIndent: ' '
modifyLineBreaks:
textWrapOptions:
columns: 79
# huge: wrap # <!---- COMMENTED OUT
verbatimEnvironments:
markdown: 1
fineTuning:
trailingComments:
notPreceededBy: (?:(?<!pape))
then we receive
For end users, installing Node.js can be tedious. Therefore, for each
supported template, a separate GitHub repository is offered. In that
repository, default \verb+paper-*.tex+ files are offered. For the \LNCS\
template,\footnote{\url{https://github.com/latextemplates/LNCS}}
\href{https://github.com/latextemplates/LNCS/blob/main/paper.tex}{\texttt{pape%
r.tex}} uses the Computer Modern font, \texttt{microtype} configuration,
\texttt{listings} configuration (including \JSON\ support),
\texttt{pdfcomment}\footnote{\url{https://ctan.org/pkg/pdfcomment}} for
\acro{TODO} marking, and \LaTeX{} examples. To reduce the size of the
\verb+.tex+ file, no hints on writing a paper are included.
I recommended not changing huge
, reference: https://latexindentpl.readthedocs.io/en/latest/sec-the-m-switch.html#text-wrap-huge-tabstop-and-separator
TLDR:
%
are moved to the end of the paragraph - and not kept.I have URLs in the paper, which are longer than 80chars. latexindent hard wraps them (which is "OKish")
To keep the URLs be working, I added
%
at the end of each line. When calling latexindent again, it moves the%
down to the paragraph.original .tex code
yaml settings
actual/given output
desired or expected output
anything else
For me, it would be OK, if
\href
and\url
parameters would not be wrapped at all. Or moved to the beginning of the next line (if too long) and then NOT wrapped any more. -- Maybe, this can be configured, too?wrapUrls: 0
(no wrapping of urls,1
behavior: just as now)