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













4















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 
    TeX



  • differently 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









share|improve this question






















  • You surely don't want exp_not:V, but rather exp_not:N.

    – egreg
    May 10 at 10:52















4















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 
    TeX



  • differently 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









share|improve this question






















  • You surely don't want exp_not:V, but rather exp_not:N.

    – egreg
    May 10 at 10:52













4












4








4








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 
    TeX



  • differently 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









share|improve this question














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 
    TeX



  • differently 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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked May 10 at 10:17









Denis BitouzéDenis Bitouzé

3,70211351




3,70211351












  • 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
















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










2 Answers
2






active

oldest

votes


















3














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





share|improve this answer




















  • 3





    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











  • Too bad TeX and friends are not defined in latex.ltx using DeclareRobustCommand.

    – Denis Bitouzé
    May 10 at 12:35


















5














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.






share|improve this answer























  • 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











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
);



);













draft saved

draft discarded


















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









3














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





share|improve this answer




















  • 3





    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











  • Too bad TeX and friends are not defined in latex.ltx using DeclareRobustCommand.

    – Denis Bitouzé
    May 10 at 12:35















3














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





share|improve this answer




















  • 3





    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











  • Too bad TeX and friends are not defined in latex.ltx using DeclareRobustCommand.

    – Denis Bitouzé
    May 10 at 12:35













3












3








3







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





share|improve this answer















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






share|improve this answer














share|improve this answer



share|improve this answer








edited May 10 at 11:31

























answered May 10 at 10:32









Ian ThompsonIan Thompson

32.6k379158




32.6k379158







  • 3





    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











  • Too bad TeX and friends are not defined in latex.ltx using DeclareRobustCommand.

    – Denis Bitouzé
    May 10 at 12:35












  • 3





    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











  • Too bad TeX and friends are not defined in latex.ltx using DeclareRobustCommand.

    – 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











5














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.






share|improve this answer























  • 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















5














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.






share|improve this answer























  • 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













5












5








5







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.






share|improve this answer













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.







share|improve this answer












share|improve this answer



share|improve this answer










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 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
















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

















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림