24 questions linked to/from What exactly do \csname and \endcsname do?
267 views

### What is the command \csname used for? [duplicate]

Maybe a stupid question...but I often see the usage of \csname in code -- especially in packages. Can someone explain what its purpose is? As far as I see it generates a new command based on an ...
1k views

### Why doesn't \makeatletter work inside \newcommand?

After hours of banging my brain against my skull, I narrowed down an issue I'm having to the fact that \makeatletter doesn't work inside \newcommand. Commands that I call after \makeatletter are ...
1k views

### Scalable If/Then Structure

I am trying to make some math fact equation sheets that are based on random number generation. I have quite a bit of learning to do... but this is where I think should start: Use random numbers to ...
465 views

### What if I use a \def name starting with “if”

Following this answer to Is it possible to use some sort of internationalization in LaTeX? I'm setting up my own dictionaries. When compiling the files I get this error: ! Use of \if doesn't match ...
2k views

### How can I combine two text strings to represent the name of a command?

I want to combine one command with a text string to represent a second command. In MatLab it would be possible to concatenate these two strings into one string and evaluate this new string. However I ...
908 views

### Define macro for sequence/list/tuple macros

I would like to define a macro for defining further macros to display sequences/lists/tuples of elements by specifying the following parameters: The name of the new command. What to display for an ...
3k views

### Are LaTeX's label names case-sensitive? Can label names contain spaces?

According to Guide to LaTeX, 4th edition, when creating a \label{name}, The keyword name may be any combination of letters, numbers, or symbols. Is the name of a label case-sensitive? Can the name ...
620 views

### ConTeXt: How do you create your own commands?

There seems to be a Current and Standard way to define new (core) commands in ConTeXt. For example, an e-mail by Wolfgang states: Many of the \define... and \setup... commands are now auto ...
875 views

### Expanding macros within \csname

I have some macros that expand to some text but when used together they should expand to something completely different. In this example: \foo -> x \bar -> y \foo\bar -> Hello World Doing it with \...
4k views

### Define a new command with parameters inside newcommand

2k views

### Concatenate two strings to make a new command

I took some habits with my sciences reports so I developed some personalized commands. First, I define in the preamble all the variables that I need like this: \newcommand{\cvba}{Cv_{\beta/\alpha}} ...
1k views

### Need help to understand xkeyval example

I found an "easy" example how to use xkeyval here using the following code: \ProvidesPackage{myemph}[2011/03/12 v1.0 a test package] \providecommand\my@emphstyle{\em} % Note that the argument must ...
194 views

### Wrap text to quote it later in the same document

I was wondering if there's a way to do the following: to wrap an excerpt of text in an environment and to label it; to quote it (entirely) later in the same document, via a \ref command or similar. ...