Linked Questions

0 votes
1 answer
129 views

why is ispackageloaded named with an @? [duplicate]

I suppose there is some reason why the command \@ifpackageloaded is not just called \ifpackageloaded But with the @ one has some additional work: \makeatletter \@ifpackageloaded{geometry} { ...
user2609605's user avatar
2 votes
1 answer
213 views

Why prefer the letter @ in command names? [duplicate]

I am editing a class-file (extension .cls) created by several authors to format a thesis according to my university standards. In that file, there are many command (re)definitions. For example, the ...
Jonathan H's user avatar
  • 1,000
0 votes
0 answers
73 views

Names for def, newcommand and newenvironment [duplicate]

I am defining some custom commands for latex documents. Do names for \def, \newcommand, and \newenvironment not accept - and _ ?
Veak's user avatar
  • 1
0 votes
0 answers
39 views

What are the common used notation for identifiers in commands? [duplicate]

I notice that some characters are not allowed in \def\... what are the common rule to separate words in LaTeX command? camelCase? kebab-case? snake_case? other? For example how should the command ...
nowox's user avatar
  • 1,375
31 votes
4 answers
4k views

Why does the LaTeX kernel define \usepackage *and* \RequirePackage?

The ubiquitous \usepackage command is used to load packages in the preamble of a document; the command syntax is \usepackage[<package-option-list>]{<package-list>}[<version>] ...
lockstep's user avatar
  • 250k
36 votes
2 answers
8k views

What are coding conventions in LaTeX?

What do I mean by Convention? First of all, allow me to clear myself about the word 'conventions. As most of you already know, coding conventions are a set of guidelines for a specific programming ...
Pouya's user avatar
  • 7,249
6 votes
1 answer
2k views

\def\Command#1{\def\command{#1}} - Why?

I am dealing with a proprietary .cls file, which has a lot of constructions that work like this: a capitalized Macro (made-up, not existing in the packages loaded) is def'ed to be the lower-case ...
bukwyrm's user avatar
  • 267
0 votes
2 answers
247 views

In Latex's commands, why do we only use lowercase?

In Latex's commands, I see that all the commands are in lowercase? This is very difficult to distinguish the words? Why don't we use CamelCase? Is there a reason for that?
Leonard Neon's user avatar
14 votes
1 answer
724 views

What practices are there regarding the use or avoidance of "internal" TeX or LaTeX commands?

What practices are there regarding the use or avoidance of "internal" TeX or LaTeX commands? (About "command" vs "macro", there is some discussion in this TeX.SX answer, though I don't know whether ...
Lover of Structure's user avatar
8 votes
1 answer
591 views

Commands with Capital letters in their name

A topic that appear over and over is to explain the difference about commands such as \operatorname vs. \DeclareMathOperator. So far I've seen discussions about using one or the other, but no one ...
Dox's user avatar
  • 5,729
2 votes
0 answers
2k views

What is the use of @ and @@ in variables names in TeX/LaTeX? [duplicate]

Possible Duplicate: Why do LaTeX internal commands have an @ in them? What do \makeatletter and \makeatother do? What is the difference between \myname and \my@name while writing a .cls file? I ...
Carel's user avatar
  • 978
1 vote
0 answers
403 views

How to learn LaTeX internals?

I've read the LaTeX Companion and the TeXbook, but I am still struggling to understand how LaTeX works. How \DeclareOption works? Why should I end some lines with %? How penalty works? Where \if@...
nowox's user avatar
  • 1,375