Linked Questions

86
votes
6answers
26k views

Defining commands/abbreviations that contain numbers

I tend to use \newcommand to define macros for symbols I use often, e.g. \newcommand{\hankel}{H^{(1)}_0}. One inconvenience of this approach is the fact that command names cannot include numbers. ...
7
votes
1answer
7k views

pgfplotstableread fails to read the input file

I am trying to typeset two different tables in a moderately large document. The data for the tables are written as comma-separated values in two different .csv files. I am including the different ...
6
votes
2answers
317 views

How to define a command to make new commands with numbers in the name

I'd like to create a command which is currently beyond my capabilities so I was wondering if anyone around here could help me out. What I'm looking to do is define a new command similar to the ...
3
votes
2answers
508 views

How to create counters with index?

I need to create counters with names like mycounter1, mycounter2,... Basically this should be a counter-valued data array. The code like \newcounter{index} \newcounter{\csname mycounter\the\value{...
3
votes
1answer
733 views

Can new command end with a number? [duplicate]

Possible Duplicate: \newcommand name cannot include numbers, e.g., \Mycomand123 I am trying to define commands \s1, \s2, etc. Right now the the substitution is very simple but the idea would be ...
3
votes
1answer
534 views

Tables as commands

I have to do a little work but I have to use frequently the same settings for a table and I put the following code \newcommand{\tab41}[4]{\begin{center} \begin{tabular}{|c|l||c|l||c|l||c|l|} \hline (...
2
votes
1answer
439 views

How to create another styling format like \emph

I read how to change \emph and changed it to \DeclareTextFontCommand{\emph}{\bfseries}. Now I want to create another command like \secondstyleformat which I can configure aswell. Such a format could ...
2
votes
1answer
178 views

LaTeX commands starting with a numeral [duplicate]

Possible Duplicate: Definining commands/abbreviations that contain numbers newcommand name cannot include numbers for example \Mycomand123 It seems like command names starting with a numeral ...
1
vote
1answer
88 views

Workaround that allows the use of digits as part of counter names?

I tried to define indexed counters, such as x1, x2, . . . etc, by defining them like this : \newcount\x1, \newcount\x2, . . . etc, but it didn't work. Is there a workaround for this in TeX or LaTeX ? ...
1
vote
2answers
7k views

How to write $\pi_1$ [duplicate]

I am writing an article and I need to write the fundamental group. For that we use $\pi_1\left(X,x_0\right)$. However I am arriving at the following error: Use of \pi doesn't match its definition. ...
1
vote
2answers
105 views

Use Labels to show equations

I want to be able to create many equations, say $a+b=c$ and $c+d=e$, save the equation as a variable but not have the equation be displayed. I simply want to have the ability to use the label/variable ...
1
vote
1answer
70 views

about newcommand [duplicate]

I have trying to use new command to represent math, and this is what I type in: \\ \newcommand\fpi2[2][\pi][2]{frac{#1}{#2}}\\ \newcommand\mylim[2][x]{lim_{#1\to #2}} I'm trying to create a new ...
1
vote
1answer
138 views

Numbering macros [duplicate]

Possible Duplicate: \newcommand name cannot include numbers, e.g., \Mycomand123 I'm trying something that I thought would be simple \def\test{Hello} \def\test2{Hello again} \test \test2 Since I ...
1
vote
1answer
294 views

Use of ___ doesn’t match its definition [duplicate]

I am returning to LaTeX after a bit of a hiatus. Currently running Mac OS High Sierra (10.13.16) and TexShop 4.26. In the past, I have used the following definition command % In pre-amble \def\m3{m$...
1
vote
0answers
50 views

Defining command \old| [duplicate]

I want to let the command \old| refer to the command \| (which produces the output ||.) So I do: \let\old|\| LaTeX complains "Missing $ inserted." How can I fix it?

15 30 50 per page