3
votes
1answer
50 views

How to select all occurrences of a specified word in a string and append another word to each of them?

When using infix-RPN package, we can use \infixtoRPN to convert infix expression to RPN expression. The output of the conversion can be retrieved by invoking \RPN. \infixtoRPN{cos(x)+sin(x)}, for ...
3
votes
2answers
310 views

Number of \ (backslash) characters in a string

I'm trying to built a code that counts the number of \ in a string. My code can work with any other symbols (for example, if I need to count the number of 'a's, that works). I already tried to modify ...
6
votes
1answer
8k views

Using string variable with LaTeX

I would like to define one variable containing some text that can be changed locally. The following code gives one example of the featuring I'm looking for. \documentclass{article} ...
3
votes
4answers
715 views

Generating dummy text programatically using TeX/LaTeX

As part of an attempt to debug another problem, I have a need for a TeX/LaTeX command that generates some dummy text in place. I know of lipsum and blindtext, but they are not what they want. What I ...
2
votes
1answer
1k views

How to pass a \def parameter to an inner command (StrSubstitute)?

I'm attempting to create 2 macros to simulate an array list as in Java for example. I'm using xstring StrSubstitute for this purpose, but I'm having a problem. Below is the code, it's a bit long as it ...