Tag Info

New answers tagged

2

With just xparse it's too complicated. Using \@ifnextchar is possible, but a jump to expl3 is perhaps better: \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\tab}{m} { % start an itemize (that also provides grouping for nested calls) \begin{itemize} \azpillaga_tab:n { #1 } % finish off \end{itemize} } \seq_new:N ...


2

Here I make the . active inside \tab and restore it when I am done. Inside \tab, the . can become \item if the next token is a not a nested \tab and it becomes \relax if the next token is a nested \tab. I keep track of the nesting level with a simple counter, and only restore the catcode 12 definition of . when the nesting level reaches back to zero. I ...


3

Would something like this work? It just uses the facilities provided by thmtools, which seems to be identical with thm-restate. (I'm not sure about this but the addition of the latter didn't seem necessary for your example.) \documentclass[a4paper]{article} \usepackage{thmtools} \declaretheorem[name=Learning Goal]{goal} \declaretheorem[ name=Learning ...



Top 50 recent answers are included