LaTeX-Utilities icon indicating copy to clipboard operation
LaTeX-Utilities copied to clipboard

Feature Request: Formatting simple lists as itemize environments

Open amelio-vazquez-reina opened this issue 5 years ago • 2 comments

Say we have a list of several items:

- Foo
- Bar
- Baz

I'd like to be able to select that text, and then use the "surround and apply macro" feature to convert that into a list, e.g.:

\begin{itemize}
\item Foo
\item Bar
\item Baz
\end{itemize}

Is that available already? if not, any way to define it myself?

amelio-vazquez-reina avatar Dec 14 '19 21:12 amelio-vazquez-reina

Sorry for the late response, I'm currently working on improving the pasting experience from other sources, and have added something similar to this but of a very rudamentry nature:

https://github.com/tecosaur/LaTeX-Utilities/blob/05065143a90d56a0a131c07f804f885c4469da8a/src/components/paster.ts#L374-L375

This turns

• foo
• bar
• baz

into

\begin{itemize}
\item foo
\item bar
\item baz
\end{itemize}

But a proper lists-to-itemize module is on my todo list :+1:

tecosaur avatar Dec 21 '19 08:12 tecosaur

NB: I probably won't be getting to this soon, so if you want to see it sooner please send a PR! (PRs are very much appreciated)

tecosaur avatar Dec 21 '19 08:12 tecosaur