Tag Info

New answers tagged

4

\documentclass{article} \begin{document} \makeatletter% don't use @ for commands intended for document use.... \newcommand\@newitems{\begin{itemize}\@itemsi} \def\@itemsi#1{% \ifx\stopitems#1% \end{itemize}\expandafter\@gobble \else \item#1\expandafter \fi \@itemsi} This is the output I'm getting using this code \@newitems {Fruits} ...


4

Recursive Approach See also the giggles at the bottom for a generic implementation. :) \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \quark_new:N \StopItems \cs_new:Nn \milap_new_items: { \begin{itemize} \milap_next_item:n } \cs_new:Nn \milap_next_item:n { \tl_if_eq:nnTF {#1} {\StopItems} { \end{itemize} } { \item #1 ...


2

Taken from iterate over commaseparated list Add this to your preamble and call inside document with \documentclass{article} \usepackage{etoolbox} \makeatletter \newcommand\makeitemize[1]{% \begin{itemize} \forcsvlist{\makeitemize@item}{#1} \end{itemize} } \newcommand\makeitemize@item[1]{\item #1} \makeatother \begin{document} \makeitemize{A,B,C} ...



Top 50 recent answers are included