latexer icon indicating copy to clipboard operation
latexer copied to clipboard

Environment auto-completion is overzealous and creates \end{} when one already exists

Open engnadeau opened this issue 8 years ago • 1 comments

Useful Info

  • latexer 0.3.0
  • Beamer presentation

Expected Behaviour

Beginning with:

\begin{columns}
    \begin{column}{0.5\textwidth}

    \end{column}
\end{columns}

Paste the following :

\begin{block}{A vs. B \citep{cite-example}}
    \begin{itemize}
              \item View volumes instead of slices
              \item Enhanced comprehension of the anatomy
    \end{itemize}
\end{block}

Expect the following :

\begin{columns}
    \begin{column}{0.5\textwidth}
    \begin{block}{A vs. B \citep{cite-example}}
    \begin{itemize}
              \item View volumes instead of slices
              \item Enhanced comprehension of the anatomy
    \end{itemize}
    \end{block}
    \end{column}
\end{columns}

Actual Behaviour

Get the following :

\begin{columns}
    \begin{column}{0.5\textwidth}
    \end{column}    \begin{block}{A vs. B \citep{cite-example}}
    \begin{itemize}
              \item View volumes instead of slices
              \item Enhanced comprehension of the anatomy
    \end{itemize}
    \end{block}
    \end{column}
\end{columns}

Notice the extra \end{column} that pops up right before the \begin{block}{A vs. B \citep{cite-example}} at the top, even though there exists an \end{column} already.

engnadeau avatar Jul 23 '16 17:07 engnadeau

Additionally, is there a way to remove the opening '{' and closing '}'. As a workaround to the issue reported above, for an 'enumerate', I simply type {enumerate} and let the autocomplete do its magic. However, what is produced is

{begin{enumerate} \item ... end{enumerate}}

I don't need the {} surrounding the 'begin' and the 'end' commands. Is there a config for this?

vitasiku avatar Aug 01 '17 11:08 vitasiku