cmhughes / latexindent.pl

Perl script to add indentation (leading horizontal space) to LaTeX files. It can modify line breaks before, during and after code blocks; it can perform text wrapping and paragraph line break removal. It can also perform string-based and regex-based substitutions/replacements. The script is customisable through its YAML interface.
GNU General Public License v3.0
884 stars 84 forks source link

Beamer items with overlay specifications not treated as items #307

Closed jameswhqi closed 2 years ago

jameswhqi commented 2 years ago

original .tex code

\begin{itemize}
\item One
\item<2-> Two
\item Three
\item <4-> Four
\end{itemize}

yaml settings

defaultIndent: "  "

actual/given output

\begin{itemize}
  \item One
        \item<2-> Two
  \item Three
  \item <4-> Four
\end{itemize}

desired or expected output

\begin{itemize}
  \item One
  \item<2-> Two
  \item Three
  \item <4-> Four
\end{itemize}
cmhughes commented 2 years ago

Hello, Thanks for this.

As of https://github.com/cmhughes/latexindent.pl/commit/2f407617f4ab81156af85b2a1e541c78e6718099 I've adjusted the fineTuning field so that your output will be as desired, and users can tweak the canBeFollowedBy field.

This will be part of the next release.

Thanks again!

cmhughes commented 2 years ago

This needs to stay open until released :)

cmhughes commented 2 years ago

Implemented at https://github.com/cmhughes/latexindent.pl/releases/tag/V3.13.3, upload to ctan imminent.