7

Use count=\n: \documentclass{article} \usepackage{pgf, tikz} \begin{document} \textbf{Comprehensive knowledge storage follows the evolutionary sequence given by} \foreach \x in {letter, word, phrase, paragraph, page, book, library} {\x, }% <----- \textbf{while the access to it follows the reverse order.} \bigskip \textbf{Keywords:} \foreach \x [count=\...


4

Macros in PGF foreach loops are only expanded once but \printKW needs two steps to expand to the list. The can be fixed for all instances of the foreach loop by patching the internal macros. Here I introduce a check whether the macro is expandable and if it is perform a full expansion (expl3 f-type) on it. You also want \makeatletter ... \makeatother ...


1

As you can see in the answer to the question How to change the space between the itemize “items” in LaTeX?, \itemsep is already defined in LaTeX. If you wish, you can combine the exchanging of non-delimited macro-arguments with good old \romannumeral-expansion for defining a macro which checks the toplevel-expansion of \Variety for emptiness and then appends ...


Only top voted, non community-wiki answers of a minimum length are eligible