[Tex/LaTex] newcommand for creating shortcut

auctexemacsmacros

I use newcommand in my preambles for creating shortcuts. For every sentence/complicated-technical-long-word, I create a newcommand such as:

\newcommand{\e}{some very long technical term\xspace}

And in the body I use \e each time I want to write this term.

But I am not 100% happy with it.

Question 1 : Is there a better solution for this kind of job?

One problem of my solution: I don't want to have to use the character \ (because it not easy to type it with a French keyboard) so I am using the macro call in Emacs+Auctex (C-c Ret) which give me \es{} where the cursor is inside brackets. But I have no argument to give and I have to move the cursor manually each time.

Question 2: Is it possible to modify the macro call in Auctex (C-c Ret) to remove the brackets for some commands? (to obtain \es and not \es{})

Best Answer

As mentioned in the comments, it is probably best to use your editor's facilities. Anyway here is one possible, more general, solution to your question 1. It might not be pretty as I'm not actually professional TeX user.

If you use XeLaTeX or LuaLaTeX you could define one of the unused character, that don't have any special use in latex, to be a second control character. For example in Finnish/Swedish keyboard there is a currency sign (¤) shift+4 that I have never heard anyone using anywhere. It is in more convenient place than backslash.

%\RequirePackage{luatex85}%currently required when using luatex and standalone
\documentclass[varwidth=160mm]{standalone}

\catcode`\¤=0%defines ¤ to be a control character

\def\deo{Deoxyribonucleotide}
¤def¤lsaa{Lentokonesuihkuturbiinimoottoriapumekaanikkoaliupseerioppilas}
¤def¤gtov{Grundstücksverkehrsgenehmigungszuständigkeitsübertragungsverordnung}

\begin{document}
¤deo

\lsaa

¤gtov
\end{document}

working example

I don't know if this is possible to achieve with pdflatex. Maybe you could redefine one of the rarely used ascii characters without bad consequences.