I didn't know the \numexpr command and it is really a much cleaner way to round a number. Thanks for that! But my problem remains the same:
I want to avoid using \value and instead just use the counters name. There are just two types of formulas I want to use:
1. (a+b)/2
2. (a+b+c)/2
All ...
Search found 4 matches
- Sun May 23, 2010 9:20 am
- Forum: General
- Topic: Parsing a String using Regular Expressions in LaTeX?!
- Replies: 3
- Views: 5181
- Sat May 22, 2010 9:50 pm
- Forum: General
- Topic: Parsing a String using Regular Expressions in LaTeX?!
- Replies: 3
- Views: 5181
Parsing a String using Regular Expressions in LaTeX?!
Hi everyone! This is the code I have:
I have two counters defined
\newcounter{a}
\newcounter{b}
and a formula
(a+b)/2
given to the following command (as #1).
\expandafter\parseValue#1
\setcounter{c}{((\value{\a}+\value{\b})*10/\value{divisor}+5)/10}
The command "parses" the formula (#1 ...
I have two counters defined
\newcounter{a}
\newcounter{b}
and a formula
(a+b)/2
given to the following command (as #1).
\expandafter\parseValue#1
\setcounter{c}{((\value{\a}+\value{\b})*10/\value{divisor}+5)/10}
The command "parses" the formula (#1 ...
- Sun May 16, 2010 1:54 pm
- Forum: General
- Topic: executing commands by string
- Replies: 3
- Views: 2465
Re: executing commands by string
I was looking for the second solution.
Thanks Joseph!
Thanks Joseph!
- Sat May 15, 2010 3:15 pm
- Forum: General
- Topic: executing commands by string
- Replies: 3
- Views: 2465
executing commands by string
That is my code:
\def\Name{Patrick}
I now want to execute the command "Name" not by writing \Name, but by using a function such like:
\execute{Name}
Does anyone know such a function in (La)TeX?
I know I could just use any Scripting Language.
I know I could just write a backslash and the ...
\def\Name{Patrick}
I now want to execute the command "Name" not by writing \Name, but by using a function such like:
\execute{Name}
Does anyone know such a function in (La)TeX?
I know I could just use any Scripting Language.
I know I could just write a backslash and the ...