I'm used to using my own shorthands while typesetting papers, say I use
\newcommand{\f}{\frac} \newcommand{\e}{\epsilon}
Recently it became important to me to make my source files readable for other people, so this shorthands are undesirable. Is there any way to replace all occurrences of shorhands defined by \newcommand by the full name? For example
\lim_{\e\to0} \f{\sin{\e}}{\e}=0
should be replaced by
\lim_{\epsilon\to0} \frac{\sin{\epsilon}}{\epsilon}=0
So I could type with my usual shorhands, but could also easily make a copy of my source file with all shorthands expanded.
sedsubstitutions will help you. – Phelype Oleinik Jun 20 '19 at 15:53\eto a latex defined macro such as\sectionor\documentclass– David Carlisle Jun 20 '19 at 16:02sedis, but if you have to be smart to use it this is probably not the solution I'm looking for. – Weather Report Jun 20 '19 at 16:36\fracand\epsilon, but not\fand\e. There is also the problem you have just stumbled upon. I just don't recommend doing it.sedis a command line tool for text manipulation. You can dosed -e 's/\\e/\\epsilon/g' <filename>and it will replace all occurrences of\eby\epsilon. – Phelype Oleinik Jun 20 '19 at 18:08\epsilonpsilon. – Teepeemm Jun 21 '19 at 00:27\einstead of\epsilonpsilon:-) – Phelype Oleinik Jun 21 '19 at 02:30