Hello LaTeX users,
Do you know whether it is possible to use "string variables"
to simplify some LaTeX code. For instance, one could write
something that looks like:
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
That is a fundamental property of LaTeX: string macros. I'm sure you saw it already:
\newcommand{\mystr}{hello}
Then use \mystr in the text. You can have many such macros, and you can build macros of macros. But names can only contain letters, uppercase and lowercase, no numbers.
Yes, it looks different to a simple Str="...", as it's classic LaTeX syntax. But it serves exactly the purpose, looks the same in the text except the backslash.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p