Contents
- 1 How many parameters are there in a LaTeX macro?
- 2 How to redefine the command \\ vector in latex?
- 3 How to use ewcommand \\ vector in latex?
- 4 What’s the difference between a latex and a TEX command?
- 5 What’s the difference between Tex core and format?
- 6 Is there any way I can define a variable in latex?
How many parameters are there in a LaTeX macro?
LaTeX Macros. There can be at most 9 parameters. They are referred to in the definition of command by #1, #2 ,…, #9 . To redefine an already existing command, one has to use renewcommand . The command providecommand defines the command only if it does not already exist; otherwise, it does not change its meaning.
How to redefine the command \\ vector in latex?
The command \\vector is already defined in LaTeX, and using ewcommand {\\vector}… generates an error message. Therefore we have to use enewcommand to redefine it. WARNING: redefining commands should be done with great care: since a given command might be used in various LaTeX constructions, the effect can exceed our expectations.
When to use curly brackets in LaTeX macros?
Here are a few examples: Since we might use \\R as index etc., it does not hurt to put one extra pair of curly brackets around it (the outer pair is part of the ewcommand syntax, and will be stripped when the replacement of \\R by its meaning takes place).
How to use ewcommand \\ vector in latex?
Since we might use \\R as index etc., it does not hurt to put one extra pair of curly brackets around it (the outer pair is part of the ewcommand syntax, and will be stripped when the replacement of \\R by its meaning takes place). The command \\vector is already defined in LaTeX, and using ewcommand {\\vector}… generates an error message.
What’s the difference between a latex and a TEX command?
In LaTeX commands are all about giving a structure to the content of your document (e.g. sections, emphasis, tables, indices, etc.). In LaTeX you just say \\section {…} instead of: selecting a larger font, a different font style, and inserting appropriate spaces before and after the section heading.
How to define macro for colored text stack?
Or are you trying to do something more general, such that \\somecolorname {foo} behaves the same as extcolor {somecolorname} {foo}? That latter case is probably not a good idea…
What’s the difference between Tex core and format?
TeX is both a program (which does the typesetting, tex-core) and format (a set of macros that the engine uses, plain-tex ). Looked at in either way, TeX gives you the basics only. If you read the source for The TeXBook, you’ll see that Knuth wrote more macros to be able to typeset the book, and made a format for that.
Is there any way I can define a variable in latex?
Similarly you have access to ewcounter for things like section and figure numbers which should increment throughout the document. I’ve used this one in the past to provide code samples that were numbered separatly of other figures…