7
votes
3answers
4k views

How to define macros with numbers in them? [duplicate]

Possible Duplicate: Definining commands/abbreviations that contain numbers How can I define macros as \text1,\text2...\text3 which, when invoked will produce text with different widths?
7
votes
2answers
3k views

Number in name of commands? [duplicate]

Possible Duplicate: Definining commands/abbreviations that contain numbers I wanted to know if it was possible to define a new command with a name that contains numbers? e.g. ...
1
vote
1answer
682 views

difficulty using \newcommand with previously specified new commands [duplicate]

Possible Duplicate: Definining commands/abbreviations that contain numbers I'm having some difficulty with setting a command using \newcommand. The command I'm trying to create is as ...
2
votes
1answer
125 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 ...
0
votes
1answer
134 views

\newcomand causes failure [duplicate]

im new to Latex, so pleas make explenation easy ;) im working with latest latex version on miktex i tried some \newcommand today and caused an error with this command: \newcommand{\N0}{ n_{0} }. when ...
1
vote
1answer
57 views

How do I create a newcommand which outputs a letter with an index? [duplicate]

When I use \newcommand{\F1}{$\mathrm{F}_1$} I get the Missing \begin{document}. error and missing $ inserted if I move it inside the document. How do I define a macro so that \F1 would expand to ...
1
vote
1answer
54 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 ...
0
votes
0answers
38 views

Why this macros doesn't work? [duplicate]

ALL i create this macro in my TeX file: \newcommand{\f2t}[2]{\label{#1}\footnote{\hyperref[#1]{#2}}} This macro is in order to return to text from the footnote when the reader click the footnote. ...
0
votes
0answers
14 views

LaTeX compilation error [duplicate]

Given below is the snippet of the code for a small sample and I am finding that there are errors during the compilation of the code. Not sure why it is happening. I am getting errors in line # 6. ...
15
votes
2answers
4k views

Command/macro name cannot include numbers and symbols

I would like put picture into table, and my idea is define new command as below> \newcommand{\EJ471}{\includegraphics[scale=0.150]{EJ_471.jpg}} But compiler reports an error. If I use the command ...
8
votes
4answers
4k views

tikz foreach index in variable name

I want to have a set of variables holding numerical values (e.g., cnt1, cnt2, cnt3) and access them based on the foreach index. For example: \foreach \i in {1,...,5} { ...
9
votes
3answers
1k views

Numbers in Newcommand

I have some thousands of special text lines specifically numbered. 001001=aaaaaaaa 001002=bbbbbbbb 001003=cccccccc 002001=dddddddd 002002=mmmmmmmm 002003=jjjjjjjj 003001=uuuuuuuu 003002=iiiiiiii ...
4
votes
1answer
263 views

Numbers in \newcommand not working

I am trying to use the chosen solution shown here, for being able to use numbers in the alias I need for \newcommand. (That one is not able to use numbers in the alias directly strikes me as ... well, ...
3
votes
2answers
230 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 ...
1
vote
2answers
669 views

Regarding variable names and values of variables inside macros

I have to questions that I'd like to solve since I'm trying to build up a macro for my examination duties here. The first one is: is there a way to include numbers in the definition of variables? Say ...

15 30 50 per page