siefkenj / unified-latex

Utilities for parsing and manipulating LaTeX ASTs with the Unified.js framework
MIT License
90 stars 23 forks source link

Potential parsing issue #7

Closed kylebutts closed 2 years ago

kylebutts commented 2 years ago

Hi there, super excited about this!

I wanted to point out a potential bug. In beamer documents, it's common to use \begin{frame}{title} or \begin{frame}{title}{subtitle}. This doesn't work in the latex-parser-playground.

This code:

\documentclass{beamer}

\begin{document}

\begin{frame}{Title}

  \begin{itemize}
    Test
  \end{itemize}

\end{frame}

\end{document}

results in this:

\documentclass{beamer}

\begin{document}
    \begin{frame}
        {Title}

        \begin{itemize}
            Test
        \end{itemize}
    \end{frame}
\end{document}

Notice how the {Title} is on a separate line

siefkenj commented 2 years ago

This isn't a bug per se, but there are no Beamer definitions in unified-latex-ctan. If you wanted to make some and submit a PR, I'd be greatful!

kylebutts commented 2 years ago

Let me look in that package and see if I can orient myself around that!

siefkenj commented 2 years ago

This should be fixed in v1.1.0 thanks to #11