I have a document in LaTeX in which I have to use a lot of code over and over again. Is it possible to define this code somewhere with a shortcut so that I can call it up by only using the shortcut in the real code? I also want to be able to use it in all environments.
An example to make my question more understandable:
- repeated code:
acbdbad - shortcut:
\a - Real code:
dakjmdka \a dkqjdk \a dqksjf \a
Is there also a name for this? This is probably something quite straightforward but I'm new to Latex and I have no idea what it is called, so it's hard to find on the web.
Thank you in advance!
\newcommand\a{acbdbad}– Sean Allred Dec 29 '13 at 19:35\newcommand\myshortcut{abcdbad}, but as Sean says it may depend on the use case. Edit: How does algorithms come into this, by the way? – Torbjørn T. Dec 29 '13 at 19:37\a, so some care should be taken. See http://tex.stackexchange.com/questions/19111/short-names-for-macros – Torbjørn T. Dec 29 '13 at 19:41