Tag Info

Hot answers tagged

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} ...


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

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

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 ...


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 ...



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