Tagged Questions
3
votes
2answers
35 views
Package xparse \SplitList last token
I need to create a macro to render lists with a variable number of arguments (1+), e.g.
\mylist{1,2,3} should expand to $\tilde{1}$--$\tilde{2}$--$\tilde{3}$. I'm trying to use xparse and \SplitList, ...
5
votes
1answer
41 views
How to redefine \str_if_eq:xxTF for backward compatibility
I just updated all the packages for TeXLive 2012 today and it appears that \str_if_eq:xxTF has been deprecated.
How do I define a macro so that I can use the latest TeX Live but still be able to run ...
4
votes
2answers
77 views
New command and the corresponding star counterpart with xparse
The following works as expected:
\newcommand{\engl}[2]{#1 (en. \textsl{#2})\index{en-ro}{#2}}
However, what I want to achieve would be a * version of it which only adds to the indices, without the ...
1
vote
1answer
109 views
Redefine existing command
My question is whether I can redefine an existing command for example \multicolumn and make the required arguments optional, without loosing the content of multicolumn? Another option would be to get ...
3
votes
1answer
99 views
Passing environment to \luatexluaescapestring fails
Can anyone explain why the macro \makequesone below fails and/or suggest a fix? The verbatim option works (as in the MWE) but I would like the content of the argument to be able to contain relatively ...
0
votes
1answer
78 views
Defect of measuring into the count of alphabet width
Question:
Why in the example below I get (with CM at 10pt) \alphabet=342.93138pt and
\myalphabetwidth=342.6536pt why I have this difference between the
two measures? What is the more correct?
...
3
votes
1answer
150 views
Support for the punctuation symbols into a macro for characters count
Question about this macro:
Is possible to have a higher precision with this macro by adding some punctuation symbols like ,.;:?!'() into the final count of the characters?
...
11
votes
3answers
390 views
Latex dynamic macro definition
I am trying to dynamically define variables. What I want to do is be able to define a person in the following way \definePerson{MrTestKey}{Mr Test}{0400 000 000}{mr@test.com} and then subsequently ...
6
votes
3answers
250 views
\NewDocumentCommand with constructed csname
In the spirit of my previous questions Defining \xthinspace: Thin space only if not followed by certain characters and Ellipses & Correct Space Factor, I’m trying to define a generic \xspace-like ...
6
votes
1answer
109 views
On pitfalls of robust commands
These days, I’m more and more defining robust commands, e.g., using \newrobustcmd (etoolbox package) or \NewDocumentCommand (xparse package). Robust commands seem advantageous to me in many respects ...
8
votes
2answers
282 views
Why using a backslash in command definitions?
I want to know the reasoning behind the (La)TeX inferface for defining commands with leading backslashes. I see why a backslash has to be used to call (expand) a command (macro), but I do not ...
4
votes
2answers
224 views
Passing multiple arguments from ProcessList (xparse) to a macro. Result to be used in tabular
I am making a macro that will take user input of a grading scheme and place it into a tabular environment. I would like the syntax to be as simple as possible and decided on:
\tabulate{ eval1,%1 ; ...
-12
votes
2answers
635 views
Stringified commands to macros sequence
First, what is the proper terminology for a "string" in TeX/LaTeX that is an argument for a macro? e.g., \macro{somestring} Obviously somestring is a token, set of tokens, string, argument, etc. I ...
3
votes
4answers
206 views
Writing a multiple option command for a package
I am a newbie at LaTeX programming, so please be patient. :-)
I am writing a .sty file which I want to include a command \dan which is overloaded with three separate versions depending on whether ...
7
votes
2answers
979 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}
...
5
votes
1answer
232 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, ...