Does LaTeX redefine [some] TeX primitives?What is the difference between TeX and LaTeX?How is char processed in math mode?Why is there no mudimendef primitive?What is the difference between empty and @empty?Why isn't everything expandable?Creating new primitivesInput/Output primitives of TeXKnuth “Some Implementations of TeX”…Commands in TeX which are different in LaTeXHow to make commands defined by def behave as strings?Should different TeX implementations (e.g. MiKTeX's and TeX Live's) produce identical DVI files?Different file opened by openin (was: between 2017 and 2018)
Word or idiom defining something barely functional
SQL Minimum Row count
How to display a duet in lyrics?
What method to use in a batch apex in order to get authentication token from a remote server?
Plausibility of Ice Eaters in the Arctic
Generator for parity?
What is a "Genuine Geraldo interviewee"?
Is multiplication of real numbers uniquely defined as being distributive over addition?
Why are physicists so interested in irreps if in their non-block-diagonal form they mix all components of a vector?
Does a code snippet compile? Or does it gets compiled?
What happen if I gain the control of aura that enchants an opponent's creature? Would the aura stay attached?
English - Acceptable use of parentheses in an author's name
Sierpinski turtle triangle
Infeasibility in mathematical optimization models
A question about 'reptile and volatiles' to describe creatures
Pretty heat maps
Geometric programming: Why are the constraints defined to be less than/equal to 1?
Yajilin minicubes: the Hullabaloo, the Brouhaha, the Bangarang
Why can I log in to my Facebook account with a misspelled email/password?
Acceptable to cut steak before searing?
Why does Intel's Haswell chip allow multiplication to be twice as fast as addition?
What is the idiomatic way of saying “he is ticklish under armpits”?
Are there any differences in causality between linear and logistic regression?
Reusing story title as chapter title
Does LaTeX redefine [some] TeX primitives?
What is the difference between TeX and LaTeX?How is char processed in math mode?Why is there no mudimendef primitive?What is the difference between empty and @empty?Why isn't everything expandable?Creating new primitivesInput/Output primitives of TeXKnuth “Some Implementations of TeX”…Commands in TeX which are different in LaTeXHow to make commands defined by def behave as strings?Should different TeX implementations (e.g. MiKTeX's and TeX Live's) produce identical DVI files?Different file opened by openin (was: between 2017 and 2018)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I read in "What is the difference between TeX and LaTeX?" that LaTeX is a collection of macros (an extension) built on top of TeX. Supposedly, TeX primitives should then behave in LaTeX the same way they do in TeX. However, it seems it is not always the case. In "How is char processed in math mode?", it is explained why char
behaves in text mode differently from math mode. But this is only in TeX. In LaTeX, however, char
behaves identically in text and math modes, as it can be seen from the following example:
documentclassarticle
begindocument
In text mode, we obtain char"5. In math mode, we also obtain $char"5$.
enddocument
In TeX, the result is different:
In text mode, we obtain char"5. In math mode, we obtain $char"5$.
bye
It seems that some TeX primitives (at least one: char
) are redefined in LaTeX. I would like to know whether TeX primitives must be redefined in LaTeX. If yes, why? Are there other TeX primitives that are redefined in LaTeX? Are not TeX and LaTeX expected to produce the same result on such a simple piece of code (as in the example)?
tex-core
New contributor
add a comment |
I read in "What is the difference between TeX and LaTeX?" that LaTeX is a collection of macros (an extension) built on top of TeX. Supposedly, TeX primitives should then behave in LaTeX the same way they do in TeX. However, it seems it is not always the case. In "How is char processed in math mode?", it is explained why char
behaves in text mode differently from math mode. But this is only in TeX. In LaTeX, however, char
behaves identically in text and math modes, as it can be seen from the following example:
documentclassarticle
begindocument
In text mode, we obtain char"5. In math mode, we also obtain $char"5$.
enddocument
In TeX, the result is different:
In text mode, we obtain char"5. In math mode, we obtain $char"5$.
bye
It seems that some TeX primitives (at least one: char
) are redefined in LaTeX. I would like to know whether TeX primitives must be redefined in LaTeX. If yes, why? Are there other TeX primitives that are redefined in LaTeX? Are not TeX and LaTeX expected to produce the same result on such a simple piece of code (as in the example)?
tex-core
New contributor
add a comment |
I read in "What is the difference between TeX and LaTeX?" that LaTeX is a collection of macros (an extension) built on top of TeX. Supposedly, TeX primitives should then behave in LaTeX the same way they do in TeX. However, it seems it is not always the case. In "How is char processed in math mode?", it is explained why char
behaves in text mode differently from math mode. But this is only in TeX. In LaTeX, however, char
behaves identically in text and math modes, as it can be seen from the following example:
documentclassarticle
begindocument
In text mode, we obtain char"5. In math mode, we also obtain $char"5$.
enddocument
In TeX, the result is different:
In text mode, we obtain char"5. In math mode, we obtain $char"5$.
bye
It seems that some TeX primitives (at least one: char
) are redefined in LaTeX. I would like to know whether TeX primitives must be redefined in LaTeX. If yes, why? Are there other TeX primitives that are redefined in LaTeX? Are not TeX and LaTeX expected to produce the same result on such a simple piece of code (as in the example)?
tex-core
New contributor
I read in "What is the difference between TeX and LaTeX?" that LaTeX is a collection of macros (an extension) built on top of TeX. Supposedly, TeX primitives should then behave in LaTeX the same way they do in TeX. However, it seems it is not always the case. In "How is char processed in math mode?", it is explained why char
behaves in text mode differently from math mode. But this is only in TeX. In LaTeX, however, char
behaves identically in text and math modes, as it can be seen from the following example:
documentclassarticle
begindocument
In text mode, we obtain char"5. In math mode, we also obtain $char"5$.
enddocument
In TeX, the result is different:
In text mode, we obtain char"5. In math mode, we obtain $char"5$.
bye
It seems that some TeX primitives (at least one: char
) are redefined in LaTeX. I would like to know whether TeX primitives must be redefined in LaTeX. If yes, why? Are there other TeX primitives that are redefined in LaTeX? Are not TeX and LaTeX expected to produce the same result on such a simple piece of code (as in the example)?
tex-core
tex-core
New contributor
New contributor
edited 6 hours ago
siracusa
7,8212 gold badges18 silver badges35 bronze badges
7,8212 gold badges18 silver badges35 bronze badges
New contributor
asked 8 hours ago
spyglass007spyglass007
333 bronze badges
333 bronze badges
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
LaTeX redefines the primitives input
, end
, -
, /
, underline
and, in some contexts, par
. It does not redefine char
, but it uses different math codes.
In plain TeX we see
mathcode`^^E="023A % lnot
but LaTeX doesn't assign a mathcode to ^^E
(ASCII 5), so the value is as initially, that is, 5.
When TeX processes char<number>
in math mode, it uses the mathcode of the character, just as if the character was directly input. So in plain TeX you get character "3A
in family 2 (lnot
); in LaTeX you get character "5
in family 0.
Redefined primitives
input
is redefined to allowinput<filename>
;end
is redefined to mark the end of environments;-
and/
are redefined for technical reasons;underline
is redefined to be also used in text mode.
As far as par
is concerned, the redefinitions are essential for list-like environments.
Why does plain TeX assign a math code to ASCII 5?
Because Knuth used extended character sets and his keyboard allowed to directly input ¬ and other characters. So he found it convenient to set math codes for the extended character set.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
spyglass007 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f503599%2fdoes-latex-redefine-some-tex-primitives%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
LaTeX redefines the primitives input
, end
, -
, /
, underline
and, in some contexts, par
. It does not redefine char
, but it uses different math codes.
In plain TeX we see
mathcode`^^E="023A % lnot
but LaTeX doesn't assign a mathcode to ^^E
(ASCII 5), so the value is as initially, that is, 5.
When TeX processes char<number>
in math mode, it uses the mathcode of the character, just as if the character was directly input. So in plain TeX you get character "3A
in family 2 (lnot
); in LaTeX you get character "5
in family 0.
Redefined primitives
input
is redefined to allowinput<filename>
;end
is redefined to mark the end of environments;-
and/
are redefined for technical reasons;underline
is redefined to be also used in text mode.
As far as par
is concerned, the redefinitions are essential for list-like environments.
Why does plain TeX assign a math code to ASCII 5?
Because Knuth used extended character sets and his keyboard allowed to directly input ¬ and other characters. So he found it convenient to set math codes for the extended character set.
add a comment |
LaTeX redefines the primitives input
, end
, -
, /
, underline
and, in some contexts, par
. It does not redefine char
, but it uses different math codes.
In plain TeX we see
mathcode`^^E="023A % lnot
but LaTeX doesn't assign a mathcode to ^^E
(ASCII 5), so the value is as initially, that is, 5.
When TeX processes char<number>
in math mode, it uses the mathcode of the character, just as if the character was directly input. So in plain TeX you get character "3A
in family 2 (lnot
); in LaTeX you get character "5
in family 0.
Redefined primitives
input
is redefined to allowinput<filename>
;end
is redefined to mark the end of environments;-
and/
are redefined for technical reasons;underline
is redefined to be also used in text mode.
As far as par
is concerned, the redefinitions are essential for list-like environments.
Why does plain TeX assign a math code to ASCII 5?
Because Knuth used extended character sets and his keyboard allowed to directly input ¬ and other characters. So he found it convenient to set math codes for the extended character set.
add a comment |
LaTeX redefines the primitives input
, end
, -
, /
, underline
and, in some contexts, par
. It does not redefine char
, but it uses different math codes.
In plain TeX we see
mathcode`^^E="023A % lnot
but LaTeX doesn't assign a mathcode to ^^E
(ASCII 5), so the value is as initially, that is, 5.
When TeX processes char<number>
in math mode, it uses the mathcode of the character, just as if the character was directly input. So in plain TeX you get character "3A
in family 2 (lnot
); in LaTeX you get character "5
in family 0.
Redefined primitives
input
is redefined to allowinput<filename>
;end
is redefined to mark the end of environments;-
and/
are redefined for technical reasons;underline
is redefined to be also used in text mode.
As far as par
is concerned, the redefinitions are essential for list-like environments.
Why does plain TeX assign a math code to ASCII 5?
Because Knuth used extended character sets and his keyboard allowed to directly input ¬ and other characters. So he found it convenient to set math codes for the extended character set.
LaTeX redefines the primitives input
, end
, -
, /
, underline
and, in some contexts, par
. It does not redefine char
, but it uses different math codes.
In plain TeX we see
mathcode`^^E="023A % lnot
but LaTeX doesn't assign a mathcode to ^^E
(ASCII 5), so the value is as initially, that is, 5.
When TeX processes char<number>
in math mode, it uses the mathcode of the character, just as if the character was directly input. So in plain TeX you get character "3A
in family 2 (lnot
); in LaTeX you get character "5
in family 0.
Redefined primitives
input
is redefined to allowinput<filename>
;end
is redefined to mark the end of environments;-
and/
are redefined for technical reasons;underline
is redefined to be also used in text mode.
As far as par
is concerned, the redefinitions are essential for list-like environments.
Why does plain TeX assign a math code to ASCII 5?
Because Knuth used extended character sets and his keyboard allowed to directly input ¬ and other characters. So he found it convenient to set math codes for the extended character set.
edited 7 hours ago
answered 7 hours ago
egregegreg
761k90 gold badges1987 silver badges3337 bronze badges
761k90 gold badges1987 silver badges3337 bronze badges
add a comment |
add a comment |
spyglass007 is a new contributor. Be nice, and check out our Code of Conduct.
spyglass007 is a new contributor. Be nice, and check out our Code of Conduct.
spyglass007 is a new contributor. Be nice, and check out our Code of Conduct.
spyglass007 is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f503599%2fdoes-latex-redefine-some-tex-primitives%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown