A high-level package from the LaTeX3 project that provides a powerful mechanism for defining new commands with various types of arguments.

learn more… | top users | synonyms

12
votes
1answer
287 views

Text being output when none should be

I am confused as to why the MWE below produces any black text. As the code is below, the output is: However, if you comment out the \IfStrEq line then it works fine and the black text goes away? ...
1
vote
1answer
826 views

MacTeX 2011, Xetex and Tex Live Utility

I tried several times to play with XeLaTeX (being used to "classical" LaTeX) but since I installed MacTeX 2011 and updated it with TeX Live Utility, I got that kind message : ...
5
votes
1answer
211 views

How can I place a marginnote inside a description (or other list environment)

I have a macro (defined with the xparse package) that creates a marginnote. It works as I would like when prepended to normal paragraph text: \NewDocumentCommand\dates{m g}{% \IfNoValueTF{#2} ...
5
votes
1answer
199 views

Splitting on new lines using \SplitList

What do I pass to \SplitList to get it to split the string on a new line? I've tried \n and \r, but neither of those work. The code I used was \documentclass{article} \usepackage{xparse} ...
3
votes
1answer
528 views

Undefined control sequence with xparse

I just installed the texlive-latex3 package and tried running pdflatex on the following (copied directly from another question posted here): \documentclass{article} \usepackage{xparse} \ExplSyntaxOn ...
8
votes
2answers
2k views

xparse: Define new command with multiple optional parameters

I'd like to define a new command with optional parameters using the xparse package. Please consider the following example: \documentclass{minimal} \usepackage{xparse} ...
10
votes
2answers
275 views

How do I pass an expanded optional argument using expl3/xparse?

I have a command defined using xparse syntax: \DeclareDocumentCommand \foo { O{} m } {} Inside some other command (say, \bar), I want to call this command. The calling command (\bar) has to ...
0
votes
1answer
851 views

XeTeX fails with undefined control sequence in texlive 2012/dev

I'm using XeTeX, and I'm trying to compile a document using the following command: xelatex mydoc.tex I'm getting the following error: ...
2
votes
1answer
795 views

Define a custom align, and align* environment

I would like to redefine both the align and \align* environments such that the first line is shifted up to line up with the list identifier. I attempted to adapt the solution provided at Starred ...
6
votes
2answers
339 views

How can I create an oddly-delimited macro, using xparse?

I have a partial version of this macro working, without xparse, but I needed to tweak it and it got too unwieldy, so I'm trying to use xparse instead. It's admittedly a farfetched macro, but I'm ...
5
votes
1answer
295 views

Using \IfNoValueTF within a TikZ style specification.

In an answer to Flushing PGF commands and local variable Matthew had suggested using \IfNoValueTF within a TikZ \node specification to determine the text. This solution works great for me. However, ...