TeX and LaTeX differently expl3-x-written (exhaustive expansion) to an auxiliary fileexpl3-strategy to automatically update the title of a document, depending on its contentTeX macro and command expansion?When is the aux file read and written?Warnings ignored if written in a custom auxiliary file (but not if written in .aux file)expl3 property lists and expansionChanging case when writing in auxiliary fileexpl3, LaTeX3, LaTeX2e, and TeXMath functions and expansion issuesHow to use exp_not:N and exp_after:wN to prevent the expansion of input in a expl3 list?Protected expansion in expl3expl3 sequence name replaced by s__seq when written to the .aux file
Was the dragon prowess intentionally downplayed in S08E04?
How do I know which cipher suites can be disabled?
In season 17 does LoN buff work against season journey set rewards?
How does Ctrl+c and Ctrl+v work?
What color to choose as "danger" if the main color of my app is red
Developers demotivated due to working on same project for more than 2 years
How to rename multiple files in a directory at the same time
God-Pharaoh's Statue and Finale Of Promise
Why are goodwill impairments on the statement of cash-flows of GE?
Cuban Primes
Single word that parallels "Recent" when discussing the near future
Why did Varys remove his rings?
Will consteval functions allow template parameters dependent on function arguments?
Will the volt, ampere, ohm or other electrical units change on May 20th, 2019?
Could there be something like aerobatic smoke trails in the vacuum of space?
Why does SSL Labs now consider CBC suites weak?
Which creature is depicted in this Xanathar's Guide illustration of a war mage?
What is this weird d12 for?
Why are lawsuits between the President and Congress not automatically sent to the Supreme Court
It is as easy as A B C, Figure out U V C from the given relationship
Why did the metro bus stop at each railway crossing, despite no warning indicating a train was coming?
Why commonly or frequently used fonts sizes are even numbers like 10px, 12px, 16px, 24px, or 32px?
Windows 10 lock screen - display my own random images
What metal is most suitable for a ladder submerged in an underground water tank?
TeX and LaTeX differently expl3-x-written (exhaustive expansion) to an auxiliary file
expl3-strategy to automatically update the title of a document, depending on its contentTeX macro and command expansion?When is the aux file read and written?Warnings ignored if written in a custom auxiliary file (but not if written in .aux file)expl3 property lists and expansionChanging case when writing in auxiliary fileexpl3, LaTeX3, LaTeX2e, and TeXMath functions and expansion issuesHow to use exp_not:N and exp_after:wN to prevent the expansion of input in a expl3 list?Protected expansion in expl3expl3 sequence name replaced by s__seq when written to the .aux file
As pointed out by the following MCE, TeX and LaTeX are expl3-written to an auxiliary file:
the same way when no manipulation is involved (
iow_now:Nn) (but that is useless for my real use case):LaTeX
TeXdifferently when exhaustive expansion is involved (
iow_now:Nx):protect LaTeX
Tkern -.1667emlower .5exhbox Ekern -.125emX@
Why this difference and how to get protect TeX instead of Tkern -.1667emlower .5exhbox Ekern -.125emX@?
documentclassarticle
usepackagexparse
ExplSyntaxOn
iow_new:N g_output_stream
iow_open:Nn g_output_stream c_sys_jobname_str.sbj
iow_now:Nn g_output_stream LaTeX
iow_now:Nn g_output_stream TeX
iow_now:Nx g_output_stream exp_not:VLaTeX
iow_now:Nx g_output_stream exp_not:VTeX
iow_close:N g_output_stream
ExplSyntaxOff
begindocument
enddocument
expansion expl3 auxiliary-files
add a comment |
As pointed out by the following MCE, TeX and LaTeX are expl3-written to an auxiliary file:
the same way when no manipulation is involved (
iow_now:Nn) (but that is useless for my real use case):LaTeX
TeXdifferently when exhaustive expansion is involved (
iow_now:Nx):protect LaTeX
Tkern -.1667emlower .5exhbox Ekern -.125emX@
Why this difference and how to get protect TeX instead of Tkern -.1667emlower .5exhbox Ekern -.125emX@?
documentclassarticle
usepackagexparse
ExplSyntaxOn
iow_new:N g_output_stream
iow_open:Nn g_output_stream c_sys_jobname_str.sbj
iow_now:Nn g_output_stream LaTeX
iow_now:Nn g_output_stream TeX
iow_now:Nx g_output_stream exp_not:VLaTeX
iow_now:Nx g_output_stream exp_not:VTeX
iow_close:N g_output_stream
ExplSyntaxOff
begindocument
enddocument
expansion expl3 auxiliary-files
You surely don't wantexp_not:V, but ratherexp_not:N.
– egreg
May 10 at 10:52
add a comment |
As pointed out by the following MCE, TeX and LaTeX are expl3-written to an auxiliary file:
the same way when no manipulation is involved (
iow_now:Nn) (but that is useless for my real use case):LaTeX
TeXdifferently when exhaustive expansion is involved (
iow_now:Nx):protect LaTeX
Tkern -.1667emlower .5exhbox Ekern -.125emX@
Why this difference and how to get protect TeX instead of Tkern -.1667emlower .5exhbox Ekern -.125emX@?
documentclassarticle
usepackagexparse
ExplSyntaxOn
iow_new:N g_output_stream
iow_open:Nn g_output_stream c_sys_jobname_str.sbj
iow_now:Nn g_output_stream LaTeX
iow_now:Nn g_output_stream TeX
iow_now:Nx g_output_stream exp_not:VLaTeX
iow_now:Nx g_output_stream exp_not:VTeX
iow_close:N g_output_stream
ExplSyntaxOff
begindocument
enddocument
expansion expl3 auxiliary-files
As pointed out by the following MCE, TeX and LaTeX are expl3-written to an auxiliary file:
the same way when no manipulation is involved (
iow_now:Nn) (but that is useless for my real use case):LaTeX
TeXdifferently when exhaustive expansion is involved (
iow_now:Nx):protect LaTeX
Tkern -.1667emlower .5exhbox Ekern -.125emX@
Why this difference and how to get protect TeX instead of Tkern -.1667emlower .5exhbox Ekern -.125emX@?
documentclassarticle
usepackagexparse
ExplSyntaxOn
iow_new:N g_output_stream
iow_open:Nn g_output_stream c_sys_jobname_str.sbj
iow_now:Nn g_output_stream LaTeX
iow_now:Nn g_output_stream TeX
iow_now:Nx g_output_stream exp_not:VLaTeX
iow_now:Nx g_output_stream exp_not:VTeX
iow_close:N g_output_stream
ExplSyntaxOff
begindocument
enddocument
expansion expl3 auxiliary-files
expansion expl3 auxiliary-files
asked May 10 at 10:17
Denis BitouzéDenis Bitouzé
3,70211351
3,70211351
You surely don't wantexp_not:V, but ratherexp_not:N.
– egreg
May 10 at 10:52
add a comment |
You surely don't wantexp_not:V, but ratherexp_not:N.
– egreg
May 10 at 10:52
You surely don't want
exp_not:V, but rather exp_not:N.– egreg
May 10 at 10:52
You surely don't want
exp_not:V, but rather exp_not:N.– egreg
May 10 at 10:52
add a comment |
2 Answers
2
active
oldest
votes
If we do showTeX, the result is
TeX=macro:
->Tkern -.1667emlower .5exhbox Ekern -.125emX@.
On the other hand, the result of showLaTeX is
> LaTeX=macro:
->protect LaTeX .
Now LaTeX is defined in latex.ltx using DeclareRobustCommand, and as @egreg has pointed out, MakeRobust can protect an existing macro in the same way.
documentclassarticle
MakeRobustTeX
usepackagexparse
ExplSyntaxOn
iow_new:N g_output_stream
iow_open:Nn g_output_stream c_sys_jobname_str.sbj
iow_now:Nn g_output_stream LaTeX
iow_now:Nn g_output_stream TeX
iow_now:Nx g_output_stream exp_not:VLaTeX
iow_now:Nx g_output_stream exp_not:VTeX
iow_close:N g_output_stream
ExplSyntaxOff
begindocument
enddocument
3
MakeRobustTeXis the correct way to do the same thing.
– egreg
May 10 at 10:51
Thanks, @egreg. I have updated the answer.
– Ian Thompson
May 10 at 11:31
Too badTeXand friends are not defined inlatex.ltxusingDeclareRobustCommand.
– Denis Bitouzé
May 10 at 12:35
add a comment |
You don't want exp_not:V, but rather exp_not:N
documentclassarticle
usepackagexparse
ExplSyntaxOn
iow_new:N g_output_stream
iow_open:Nn g_output_stream c_sys_jobname_str.sbj
iow_now:Nn g_output_stream LaTeX
iow_now:Nn g_output_stream TeX
iow_now:Nx g_output_stream exp_not:N LaTeX
iow_now:Nx g_output_stream exp_not:N TeX
iow_close:N g_output_stream
ExplSyntaxOff
begindocument
enddocument
The auxiliary file will have
LaTeX
TeX
LaTeX
TeX
What's the difference? In this case exp_not:V does a one step expansion, which is not desired here, because LaTeX and TeX are not variables, but parameterless functions. Recall that V stands for variable and is used to get its value, not subject to further expansion.
I should have mentioned that what is written to the auxiliary file is in fact (only) the replacement text (that may containTeX) of a token list. Hence, if I'm right,exp_not:Nis useless in my use case: I asked this new question in order to explain why and a bit further my aim.
– Denis Bitouzé
May 10 at 14:50
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
);
);
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%2f490125%2ftex-and-latex-differently-expl3-x-written-exhaustive-expansion-to-an-auxilia%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If we do showTeX, the result is
TeX=macro:
->Tkern -.1667emlower .5exhbox Ekern -.125emX@.
On the other hand, the result of showLaTeX is
> LaTeX=macro:
->protect LaTeX .
Now LaTeX is defined in latex.ltx using DeclareRobustCommand, and as @egreg has pointed out, MakeRobust can protect an existing macro in the same way.
documentclassarticle
MakeRobustTeX
usepackagexparse
ExplSyntaxOn
iow_new:N g_output_stream
iow_open:Nn g_output_stream c_sys_jobname_str.sbj
iow_now:Nn g_output_stream LaTeX
iow_now:Nn g_output_stream TeX
iow_now:Nx g_output_stream exp_not:VLaTeX
iow_now:Nx g_output_stream exp_not:VTeX
iow_close:N g_output_stream
ExplSyntaxOff
begindocument
enddocument
3
MakeRobustTeXis the correct way to do the same thing.
– egreg
May 10 at 10:51
Thanks, @egreg. I have updated the answer.
– Ian Thompson
May 10 at 11:31
Too badTeXand friends are not defined inlatex.ltxusingDeclareRobustCommand.
– Denis Bitouzé
May 10 at 12:35
add a comment |
If we do showTeX, the result is
TeX=macro:
->Tkern -.1667emlower .5exhbox Ekern -.125emX@.
On the other hand, the result of showLaTeX is
> LaTeX=macro:
->protect LaTeX .
Now LaTeX is defined in latex.ltx using DeclareRobustCommand, and as @egreg has pointed out, MakeRobust can protect an existing macro in the same way.
documentclassarticle
MakeRobustTeX
usepackagexparse
ExplSyntaxOn
iow_new:N g_output_stream
iow_open:Nn g_output_stream c_sys_jobname_str.sbj
iow_now:Nn g_output_stream LaTeX
iow_now:Nn g_output_stream TeX
iow_now:Nx g_output_stream exp_not:VLaTeX
iow_now:Nx g_output_stream exp_not:VTeX
iow_close:N g_output_stream
ExplSyntaxOff
begindocument
enddocument
3
MakeRobustTeXis the correct way to do the same thing.
– egreg
May 10 at 10:51
Thanks, @egreg. I have updated the answer.
– Ian Thompson
May 10 at 11:31
Too badTeXand friends are not defined inlatex.ltxusingDeclareRobustCommand.
– Denis Bitouzé
May 10 at 12:35
add a comment |
If we do showTeX, the result is
TeX=macro:
->Tkern -.1667emlower .5exhbox Ekern -.125emX@.
On the other hand, the result of showLaTeX is
> LaTeX=macro:
->protect LaTeX .
Now LaTeX is defined in latex.ltx using DeclareRobustCommand, and as @egreg has pointed out, MakeRobust can protect an existing macro in the same way.
documentclassarticle
MakeRobustTeX
usepackagexparse
ExplSyntaxOn
iow_new:N g_output_stream
iow_open:Nn g_output_stream c_sys_jobname_str.sbj
iow_now:Nn g_output_stream LaTeX
iow_now:Nn g_output_stream TeX
iow_now:Nx g_output_stream exp_not:VLaTeX
iow_now:Nx g_output_stream exp_not:VTeX
iow_close:N g_output_stream
ExplSyntaxOff
begindocument
enddocument
If we do showTeX, the result is
TeX=macro:
->Tkern -.1667emlower .5exhbox Ekern -.125emX@.
On the other hand, the result of showLaTeX is
> LaTeX=macro:
->protect LaTeX .
Now LaTeX is defined in latex.ltx using DeclareRobustCommand, and as @egreg has pointed out, MakeRobust can protect an existing macro in the same way.
documentclassarticle
MakeRobustTeX
usepackagexparse
ExplSyntaxOn
iow_new:N g_output_stream
iow_open:Nn g_output_stream c_sys_jobname_str.sbj
iow_now:Nn g_output_stream LaTeX
iow_now:Nn g_output_stream TeX
iow_now:Nx g_output_stream exp_not:VLaTeX
iow_now:Nx g_output_stream exp_not:VTeX
iow_close:N g_output_stream
ExplSyntaxOff
begindocument
enddocument
edited May 10 at 11:31
answered May 10 at 10:32
Ian ThompsonIan Thompson
32.6k379158
32.6k379158
3
MakeRobustTeXis the correct way to do the same thing.
– egreg
May 10 at 10:51
Thanks, @egreg. I have updated the answer.
– Ian Thompson
May 10 at 11:31
Too badTeXand friends are not defined inlatex.ltxusingDeclareRobustCommand.
– Denis Bitouzé
May 10 at 12:35
add a comment |
3
MakeRobustTeXis the correct way to do the same thing.
– egreg
May 10 at 10:51
Thanks, @egreg. I have updated the answer.
– Ian Thompson
May 10 at 11:31
Too badTeXand friends are not defined inlatex.ltxusingDeclareRobustCommand.
– Denis Bitouzé
May 10 at 12:35
3
3
MakeRobustTeX is the correct way to do the same thing.– egreg
May 10 at 10:51
MakeRobustTeX is the correct way to do the same thing.– egreg
May 10 at 10:51
Thanks, @egreg. I have updated the answer.
– Ian Thompson
May 10 at 11:31
Thanks, @egreg. I have updated the answer.
– Ian Thompson
May 10 at 11:31
Too bad
TeX and friends are not defined in latex.ltx using DeclareRobustCommand.– Denis Bitouzé
May 10 at 12:35
Too bad
TeX and friends are not defined in latex.ltx using DeclareRobustCommand.– Denis Bitouzé
May 10 at 12:35
add a comment |
You don't want exp_not:V, but rather exp_not:N
documentclassarticle
usepackagexparse
ExplSyntaxOn
iow_new:N g_output_stream
iow_open:Nn g_output_stream c_sys_jobname_str.sbj
iow_now:Nn g_output_stream LaTeX
iow_now:Nn g_output_stream TeX
iow_now:Nx g_output_stream exp_not:N LaTeX
iow_now:Nx g_output_stream exp_not:N TeX
iow_close:N g_output_stream
ExplSyntaxOff
begindocument
enddocument
The auxiliary file will have
LaTeX
TeX
LaTeX
TeX
What's the difference? In this case exp_not:V does a one step expansion, which is not desired here, because LaTeX and TeX are not variables, but parameterless functions. Recall that V stands for variable and is used to get its value, not subject to further expansion.
I should have mentioned that what is written to the auxiliary file is in fact (only) the replacement text (that may containTeX) of a token list. Hence, if I'm right,exp_not:Nis useless in my use case: I asked this new question in order to explain why and a bit further my aim.
– Denis Bitouzé
May 10 at 14:50
add a comment |
You don't want exp_not:V, but rather exp_not:N
documentclassarticle
usepackagexparse
ExplSyntaxOn
iow_new:N g_output_stream
iow_open:Nn g_output_stream c_sys_jobname_str.sbj
iow_now:Nn g_output_stream LaTeX
iow_now:Nn g_output_stream TeX
iow_now:Nx g_output_stream exp_not:N LaTeX
iow_now:Nx g_output_stream exp_not:N TeX
iow_close:N g_output_stream
ExplSyntaxOff
begindocument
enddocument
The auxiliary file will have
LaTeX
TeX
LaTeX
TeX
What's the difference? In this case exp_not:V does a one step expansion, which is not desired here, because LaTeX and TeX are not variables, but parameterless functions. Recall that V stands for variable and is used to get its value, not subject to further expansion.
I should have mentioned that what is written to the auxiliary file is in fact (only) the replacement text (that may containTeX) of a token list. Hence, if I'm right,exp_not:Nis useless in my use case: I asked this new question in order to explain why and a bit further my aim.
– Denis Bitouzé
May 10 at 14:50
add a comment |
You don't want exp_not:V, but rather exp_not:N
documentclassarticle
usepackagexparse
ExplSyntaxOn
iow_new:N g_output_stream
iow_open:Nn g_output_stream c_sys_jobname_str.sbj
iow_now:Nn g_output_stream LaTeX
iow_now:Nn g_output_stream TeX
iow_now:Nx g_output_stream exp_not:N LaTeX
iow_now:Nx g_output_stream exp_not:N TeX
iow_close:N g_output_stream
ExplSyntaxOff
begindocument
enddocument
The auxiliary file will have
LaTeX
TeX
LaTeX
TeX
What's the difference? In this case exp_not:V does a one step expansion, which is not desired here, because LaTeX and TeX are not variables, but parameterless functions. Recall that V stands for variable and is used to get its value, not subject to further expansion.
You don't want exp_not:V, but rather exp_not:N
documentclassarticle
usepackagexparse
ExplSyntaxOn
iow_new:N g_output_stream
iow_open:Nn g_output_stream c_sys_jobname_str.sbj
iow_now:Nn g_output_stream LaTeX
iow_now:Nn g_output_stream TeX
iow_now:Nx g_output_stream exp_not:N LaTeX
iow_now:Nx g_output_stream exp_not:N TeX
iow_close:N g_output_stream
ExplSyntaxOff
begindocument
enddocument
The auxiliary file will have
LaTeX
TeX
LaTeX
TeX
What's the difference? In this case exp_not:V does a one step expansion, which is not desired here, because LaTeX and TeX are not variables, but parameterless functions. Recall that V stands for variable and is used to get its value, not subject to further expansion.
answered May 10 at 10:57
egregegreg
741k8919423274
741k8919423274
I should have mentioned that what is written to the auxiliary file is in fact (only) the replacement text (that may containTeX) of a token list. Hence, if I'm right,exp_not:Nis useless in my use case: I asked this new question in order to explain why and a bit further my aim.
– Denis Bitouzé
May 10 at 14:50
add a comment |
I should have mentioned that what is written to the auxiliary file is in fact (only) the replacement text (that may containTeX) of a token list. Hence, if I'm right,exp_not:Nis useless in my use case: I asked this new question in order to explain why and a bit further my aim.
– Denis Bitouzé
May 10 at 14:50
I should have mentioned that what is written to the auxiliary file is in fact (only) the replacement text (that may contain
TeX) of a token list. Hence, if I'm right, exp_not:N is useless in my use case: I asked this new question in order to explain why and a bit further my aim.– Denis Bitouzé
May 10 at 14:50
I should have mentioned that what is written to the auxiliary file is in fact (only) the replacement text (that may contain
TeX) of a token list. Hence, if I'm right, exp_not:N is useless in my use case: I asked this new question in order to explain why and a bit further my aim.– Denis Bitouzé
May 10 at 14:50
add a comment |
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%2f490125%2ftex-and-latex-differently-expl3-x-written-exhaustive-expansion-to-an-auxilia%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
You surely don't want
exp_not:V, but ratherexp_not:N.– egreg
May 10 at 10:52