Tag Info

New answers tagged

3

Your \listLength command doesn't work by pure expansion; you should say \newcommand*{\listLength}[1]{% \setcounter{listlength@cnt}{0}% \forcsvlist{\listlength@add}{#1}% } as the definition of \listLength and then \listLength{\@glo@types}% \addtocounter{mtc}{\value{listlength@cnt}}% in the code. There's a much slicker way with expl3: ...


4

Why the mysterious \IfStr{#2}{} when xparse already provides the infrastructure? \NewDocumentCommand{\FormatLinks}{% s% #1 =* not used yet o% #2 = optional title m% #3 = Mandatory title m% #4 = URL Link }{% \par \hspace*{1.0cm}\href{#4}{#3\IfValueT{#2}{~#2}}% } The problem is that you don't want to do \FormatLinks{\x} but want ...


4

Two things are wrong here: Expansion of \x should be done and not passed as a single argument to \FormatLinks. So, instead of \FormatLinks{\x} use \expandafter\FormatLinks\x since this will leave an expanded \x in the input stream for \FormatLinks to gobble up. You have an empty item in the list (the last item); The empty list item implies that ...


4

Defining a style creates another macro argument layer, so you need to double the #, like this: content/.wrap pgfmath arg={##1}{content("!u")*\p},


4

The (first level) expansion of a macro, whether defined by \def or (indirectly) by \newcommand is exactly the tokens in its replacement text. So in the normal course of events the behaviour is exactly as you ask. However if you use \documentclass{article} \newcommand{\exactly}[1]{#1} \begin{document} \exactly{ugly \verb|{| stuff} \end{document} ...


3

You can tell xstring to do the expansion for you via \fullexpandarg or another lighter setting described in the manual. \documentclass{article} \usepackage{fontspec} \usepackage{xstring} \usepackage{tikz} \usetikzlibrary{positioning,decorations.text} \newcommand{\releasedate}{2015-03-27} \newcommand\manufacturedatetext{% {\fullexpandarg ...



Top 50 recent answers are included