New answers tagged

2

Based on Time calculations: \documentclass{article} \usepackage{} \def\InitialStartTime{09:00} \newcount\hours \newcount\minutes \def\gettime#1:#2\relax#3#4{\def#3{#1}\def#4{#2}} \newcommand{\add}[2]{% \expandafter\gettime#1\relax{\hrs}{\mins} \expandafter\gettime#2\relax{\addhrs}{\addmins}% \hours=\hrs\relax \advance\hours by \addhrs\...


1

I'm not certain what result you're trying to achieve. Do you want something like this? \documentclass{article} \usepackage{calc} \usepackage{tikz} \usepackage{xstring} \usepackage{etoolbox} \newcommand{\drawbubble}[3]{% % \renewcommand{\rowlng}{\arabic{rowlng}}% % \renewcommand{\rowh}{\arabic{nrrows}}% \node [draw, rounded corners, thick, black] at ...


1

lualatex solution. Just pass everything as one argument [1] and split on comma. That is all \documentclass{article} \IfFileExists{luatex85.sty}{\usepackage{luatex85}}{} \ifdefined\HCode \usepackage[utf8]{luainputenc} \usepackage[T1]{fontenc} \else \usepackage{fontspec} \fi \usepackage{luacode} \begin{luacode*} function dostuff(arg) local str="\\begin{...


2

expl3 has several features; in this case, \seq_use:Nn seems to be the best choice. We start enumerate, split the argument at commas (or the character specified in the optional argument, issue \item and then hand each element of the sequence, with ,\item between them. A trailing period ends the job. \documentclass{article} \usepackage{xparse} \...


6

Using expl3 (the upcoming LaTeX 3 ;-)) this is pretty easy, by using a \seq variable, storing the comma separate list and expanding it with \seq_map_inline:Nn Since expl3 is pretty stable meanwhile and no really new feature of expl3 is used the following code should work even with an older version of expl3 (I loaded xparse to use \NewDocumentCommand, but a \...



Top 50 recent answers are included