How to change scantokens to tl_rescan:?How do I use the sin function in LaTeX3How do I register the prefix of...

Colliding particles and Activation energy

Python "triplet" dictionary?

Pulling the rope with one hand is as heavy as with two hands?

Asahi Dry Black beer can

Minimum value of 4 digit number divided by sum of its digits

What does "rf" mean in "rfkill"?

Why does the Betti number give the measure of k-dimensional holes?

Confusion about capacitors

When did stoichiometry begin to be taught in U.S. high schools?

Past Perfect Tense

"ne paelici suspectaretur" (Tacitus)

Transfer over $10k

How can Republicans who favour free markets, consistently express anger when they don't like the outcome of that choice?

Examples of non trivial equivalence relations , I mean equivalence relations without the expression " same ... as" in their definition?

Is thermodynamics only applicable to systems in equilibrium?

Why does processed meat contain preservatives, while canned fish needs not?

How to determine the actual or "true" resolution of a digital photograph?

How does a Swashbuckler rogue "fight with two weapons while safely darting away"?

Weird result in complex limit

Pressure to defend the relevance of one's area of mathematics

What does 「再々起」mean?

Is it cheaper to drop cargo drop than to land it?

In the time of the mishna, were there Jewish cities without courts?

Do I have an "anti-research" personality?



How to change scantokens to tl_rescan:?


How do I use the sin function in LaTeX3How do I register the prefix of my expl3 package?How will the LaTeX3 format look?How can I iterate over a newline-delimited text file?LaTeX3 clist_sort:Nn — How has this function been implemented?How to let an xparse defined command?How to modify a single item in l3seq/l3clistHow to return a value from a function in LaTeX3How to compare different data types in LaTeX3How to display string variable without hanging texworks













0















After reading the documentation, reviewing the forum and seeing the comments, I have tried to move a code that I have using scantokens to tl_rescan:.



I want to save the result in a variable and then execute them, with scantokens works OK, but I use several times :D which is not recommended.



With tl_rescan: I do not achieve the expected result and I can not configure newlinechar (which only appears twice in the documentation), I have searched for examples but I have not found any to be able to adapt.



This is my sample file:



documentclass{article}
usepackage{filecontentsdef}
usepackage[enable-debug]{expl3}
usepackage{xparse}
ExplSyntaxOn
debug_on:n{check-declarations,deprecation,check-expressions}
% myscantokens
NewDocumentCommand{myscantokens}{+m}
{
group_begin:
tl_set:Nn l_tmpa_tl {#1}
tl_put_right:Nx l_tmpb_tl %
{
tex_newlinechar:D = 13
tex_everyeof:D = { exp_not:N }
exp_not:N scantokens exp_after:wN { l_tmpa_tl }
tex_newlinechar:D = 10 scan_stop:
}
l_tmpb_tl
group_end:
}

% mytlrescan
tl_new:N l_tmpc_tl
cs_generate_variant:Nn tl_set_rescan:Nnn { NnV }
NewDocumentCommand{mytlrescan}{+m}
{
group_begin:
tl_set:Nn l_tmpa_tl {#1}
tl_set_rescan:NnV l_tmpb_tl { } l_tmpa_tl
tl_put_right:Nx l_tmpc_tl %
{
tex_newlinechar:D = 13
tex_everyeof:D = { exp_not:N }
l_tmpb_tl
tex_newlinechar:D = 10 scan_stop:
}
l_tmpc_tl
group_end:
}
ExplSyntaxOff
pagestyle{empty} % only for example
begin{document}
section{Default texttt{textbackslash filecontentsexec}}

begin{filecontentsdef*}{jobname.tmp}{macroA}
Test environment with verb+filecontentsdef*+. verb+macroA+ its global.par
begin{verbatim}
A verbatim
end{verbatim}
end{filecontentsdef*}
filecontentsexecmacroA

section{Using texttt{textbackslash scantokens}}
myscantokens{macroA}

section{Using texttt{textbackslash tl_rescan:nn}}
mytlrescan{macroA}
end{document}


And so it looks:
output result



How do I configure {setup} in tl_rescan: to get the expected result?



regards









share



























    0















    After reading the documentation, reviewing the forum and seeing the comments, I have tried to move a code that I have using scantokens to tl_rescan:.



    I want to save the result in a variable and then execute them, with scantokens works OK, but I use several times :D which is not recommended.



    With tl_rescan: I do not achieve the expected result and I can not configure newlinechar (which only appears twice in the documentation), I have searched for examples but I have not found any to be able to adapt.



    This is my sample file:



    documentclass{article}
    usepackage{filecontentsdef}
    usepackage[enable-debug]{expl3}
    usepackage{xparse}
    ExplSyntaxOn
    debug_on:n{check-declarations,deprecation,check-expressions}
    % myscantokens
    NewDocumentCommand{myscantokens}{+m}
    {
    group_begin:
    tl_set:Nn l_tmpa_tl {#1}
    tl_put_right:Nx l_tmpb_tl %
    {
    tex_newlinechar:D = 13
    tex_everyeof:D = { exp_not:N }
    exp_not:N scantokens exp_after:wN { l_tmpa_tl }
    tex_newlinechar:D = 10 scan_stop:
    }
    l_tmpb_tl
    group_end:
    }

    % mytlrescan
    tl_new:N l_tmpc_tl
    cs_generate_variant:Nn tl_set_rescan:Nnn { NnV }
    NewDocumentCommand{mytlrescan}{+m}
    {
    group_begin:
    tl_set:Nn l_tmpa_tl {#1}
    tl_set_rescan:NnV l_tmpb_tl { } l_tmpa_tl
    tl_put_right:Nx l_tmpc_tl %
    {
    tex_newlinechar:D = 13
    tex_everyeof:D = { exp_not:N }
    l_tmpb_tl
    tex_newlinechar:D = 10 scan_stop:
    }
    l_tmpc_tl
    group_end:
    }
    ExplSyntaxOff
    pagestyle{empty} % only for example
    begin{document}
    section{Default texttt{textbackslash filecontentsexec}}

    begin{filecontentsdef*}{jobname.tmp}{macroA}
    Test environment with verb+filecontentsdef*+. verb+macroA+ its global.par
    begin{verbatim}
    A verbatim
    end{verbatim}
    end{filecontentsdef*}
    filecontentsexecmacroA

    section{Using texttt{textbackslash scantokens}}
    myscantokens{macroA}

    section{Using texttt{textbackslash tl_rescan:nn}}
    mytlrescan{macroA}
    end{document}


    And so it looks:
    output result



    How do I configure {setup} in tl_rescan: to get the expected result?



    regards









    share

























      0












      0








      0








      After reading the documentation, reviewing the forum and seeing the comments, I have tried to move a code that I have using scantokens to tl_rescan:.



      I want to save the result in a variable and then execute them, with scantokens works OK, but I use several times :D which is not recommended.



      With tl_rescan: I do not achieve the expected result and I can not configure newlinechar (which only appears twice in the documentation), I have searched for examples but I have not found any to be able to adapt.



      This is my sample file:



      documentclass{article}
      usepackage{filecontentsdef}
      usepackage[enable-debug]{expl3}
      usepackage{xparse}
      ExplSyntaxOn
      debug_on:n{check-declarations,deprecation,check-expressions}
      % myscantokens
      NewDocumentCommand{myscantokens}{+m}
      {
      group_begin:
      tl_set:Nn l_tmpa_tl {#1}
      tl_put_right:Nx l_tmpb_tl %
      {
      tex_newlinechar:D = 13
      tex_everyeof:D = { exp_not:N }
      exp_not:N scantokens exp_after:wN { l_tmpa_tl }
      tex_newlinechar:D = 10 scan_stop:
      }
      l_tmpb_tl
      group_end:
      }

      % mytlrescan
      tl_new:N l_tmpc_tl
      cs_generate_variant:Nn tl_set_rescan:Nnn { NnV }
      NewDocumentCommand{mytlrescan}{+m}
      {
      group_begin:
      tl_set:Nn l_tmpa_tl {#1}
      tl_set_rescan:NnV l_tmpb_tl { } l_tmpa_tl
      tl_put_right:Nx l_tmpc_tl %
      {
      tex_newlinechar:D = 13
      tex_everyeof:D = { exp_not:N }
      l_tmpb_tl
      tex_newlinechar:D = 10 scan_stop:
      }
      l_tmpc_tl
      group_end:
      }
      ExplSyntaxOff
      pagestyle{empty} % only for example
      begin{document}
      section{Default texttt{textbackslash filecontentsexec}}

      begin{filecontentsdef*}{jobname.tmp}{macroA}
      Test environment with verb+filecontentsdef*+. verb+macroA+ its global.par
      begin{verbatim}
      A verbatim
      end{verbatim}
      end{filecontentsdef*}
      filecontentsexecmacroA

      section{Using texttt{textbackslash scantokens}}
      myscantokens{macroA}

      section{Using texttt{textbackslash tl_rescan:nn}}
      mytlrescan{macroA}
      end{document}


      And so it looks:
      output result



      How do I configure {setup} in tl_rescan: to get the expected result?



      regards









      share














      After reading the documentation, reviewing the forum and seeing the comments, I have tried to move a code that I have using scantokens to tl_rescan:.



      I want to save the result in a variable and then execute them, with scantokens works OK, but I use several times :D which is not recommended.



      With tl_rescan: I do not achieve the expected result and I can not configure newlinechar (which only appears twice in the documentation), I have searched for examples but I have not found any to be able to adapt.



      This is my sample file:



      documentclass{article}
      usepackage{filecontentsdef}
      usepackage[enable-debug]{expl3}
      usepackage{xparse}
      ExplSyntaxOn
      debug_on:n{check-declarations,deprecation,check-expressions}
      % myscantokens
      NewDocumentCommand{myscantokens}{+m}
      {
      group_begin:
      tl_set:Nn l_tmpa_tl {#1}
      tl_put_right:Nx l_tmpb_tl %
      {
      tex_newlinechar:D = 13
      tex_everyeof:D = { exp_not:N }
      exp_not:N scantokens exp_after:wN { l_tmpa_tl }
      tex_newlinechar:D = 10 scan_stop:
      }
      l_tmpb_tl
      group_end:
      }

      % mytlrescan
      tl_new:N l_tmpc_tl
      cs_generate_variant:Nn tl_set_rescan:Nnn { NnV }
      NewDocumentCommand{mytlrescan}{+m}
      {
      group_begin:
      tl_set:Nn l_tmpa_tl {#1}
      tl_set_rescan:NnV l_tmpb_tl { } l_tmpa_tl
      tl_put_right:Nx l_tmpc_tl %
      {
      tex_newlinechar:D = 13
      tex_everyeof:D = { exp_not:N }
      l_tmpb_tl
      tex_newlinechar:D = 10 scan_stop:
      }
      l_tmpc_tl
      group_end:
      }
      ExplSyntaxOff
      pagestyle{empty} % only for example
      begin{document}
      section{Default texttt{textbackslash filecontentsexec}}

      begin{filecontentsdef*}{jobname.tmp}{macroA}
      Test environment with verb+filecontentsdef*+. verb+macroA+ its global.par
      begin{verbatim}
      A verbatim
      end{verbatim}
      end{filecontentsdef*}
      filecontentsexecmacroA

      section{Using texttt{textbackslash scantokens}}
      myscantokens{macroA}

      section{Using texttt{textbackslash tl_rescan:nn}}
      mytlrescan{macroA}
      end{document}


      And so it looks:
      output result



      How do I configure {setup} in tl_rescan: to get the expected result?



      regards







      macros expl3 latex3





      share












      share










      share



      share










      asked 1 min ago









      Pablo González LPablo González L

      1,0751921




      1,0751921






















          0






          active

          oldest

          votes












          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%2f488175%2fhow-to-change-scantokens-to-tl-rescan%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          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%2f488175%2fhow-to-change-scantokens-to-tl-rescan%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

          El tren de la libertad Índice Antecedentes "Porque yo decido" Desarrollo de la...

          Puerta de Hutt Referencias Enlaces externos Menú de navegación15°58′00″S 5°42′00″O /...

          Castillo d'Acher Características Menú de navegación