Does LaTeX redefine [some] TeX primitives?What is the difference between TeX and LaTeX?How is char processed...
Can an SPI slave start a transmission in full-duplex mode?
Did WWII Japanese soldiers engage in cannibalism of their enemies?
Does a code snippet compile? Or does it gets compiled?
Do other countries guarantee freedoms that the United States does not have?
Why should public servants be apolitical?
In the movie Harry Potter and the Order or the Phoenix, why didn't Mr. Filch succeed to open the Room of Requirement if it's what he needed?
Can I call myself an assistant professor without a PhD
Why couldn't soldiers sight their own weapons without officers' orders?
Shabbat clothing on shabbat chazon
What is the best way to cause swarm intelligence to be destroyed?
Is TA-ing worth the opportunity cost?
I want to copy my HOME folder to a USB flash drive but I can't. I accidentally removed Python 3 and lost many important stuff
Can a College of Swords bard use Blade Flourishes multiple times in a turn?
During the Space Shuttle Columbia Disaster of 2003, Why Did The Flight Director Say, "Lock the doors."?
What is a "Genuine Geraldo interviewee"?
Yajilin minicubes: the Hullabaloo, the Brouhaha, the Bangarang
Colleagues speaking another language and it impacts work
Could one become a successful researcher by writing some really good papers while being outside academia?
How do we avoid CI-driven development...?
How does The Fools Guild make its money?
English - Acceptable use of parentheses in an author's name
Why does this Pokémon I just hatched need to be healed?
Blocking people from taking pictures of me with smartphone
Looking for a new job because of relocation - is it okay to tell the real reason?
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:
documentclass{article}
begin{document}
In text mode, we obtain char"5. In math mode, we also obtain $char"5$.
end{document}
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:
documentclass{article}
begin{document}
In text mode, we obtain char"5. In math mode, we also obtain $char"5$.
end{document}
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:
documentclass{article}
begin{document}
In text mode, we obtain char"5. In math mode, we also obtain $char"5$.
end{document}
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:
documentclass{article}
begin{document}
In text mode, we obtain char"5. In math mode, we also obtain $char"5$.
end{document}
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 8 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