Dynamic Object Definition in LaTeX: Define and Call Objects with Custom Commands
Tired of manually defining dozens of similar LaTeX commands for objects like chair1, chair2, etc.?
This macro lets you dynamically create and manage object families (e.g., chairs, tables, equations) with long and short names, all while keeping your code clean and scalable.
- Define once:
\InitNuevoObjeto{chair}creates\defineChair{key}{long}{short}. - Use anywhere: Call
\chair{1}for the long name or\chair{1!}for the short version. - No limits: Works for any object type (e.g.,
\InitNuevoObjeto{table},\InitNuevoObjeto{equation}).