General ⇒ Makeatletter and makeatother
Makeatletter and makeatother
This might seem a very generic question to ask, but I need some help in order to understand what \makeatletter and \makeatother means. From what I read, I guess it should be used only in the preamble, when we need to change specific parameters of class files (.cls). And because we can't change these class files, we should use the piece of code whose behaviour we need changed, between \makeatletter and \makeatother. I also understood that using \makeatletter and \makeatother can be a kind of replacement for some packages. How do I know in which circumstances I should use those commands? Is there any guide you could recommend me to read? Any article on the internet? I haven't found information clear enough for me, about these commands. They seem a little confusing... I have “The LaTeX Companion”, I read it several times and I don’t get much information about this in that book. I’m sorry for such a generic question. I also don’t have a MWE to provide, I’m sorry… But I wanted to understand this; I’m guessing these are very useful commands and I might need them later, when fine-tuning my LaTeX file.
Thank you so much,
Lucia
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Makeatletter and makeatother
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Makeatletter and makeatother
There are a couple of sections on internal commands in the FAQ: \@ and @ in macro names and \spacefactor complaints.Lucia wrote:How do I know in which circumstances I should use those commands? Is there any guide you could recommend me to read? Any article on the internet?
There's also a brief mention on internal commands in my LaTeX tutorial in the section on commands.
I think there tends not to be much mention of \makeatletter and \makeatother in documentation as it's better to discourage people from using internal commands in their document.
Regards
Nicola Talbot
Creating a Minimal Example: http://www.dickimaw-books.com/latex/minexample/
Re: Makeatletter and makeatother
Thanks again,
Lucia
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Makeatletter and makeatother
Re: Makeatletter and makeatother
Indeed, another good explanation.
Thank you so much,
Lucia