modular macro list structure to iterate itLoop within another loop in LaTeXIterate over space-separated...

How should I handle players who ignore the session zero agreement?

What incentives do banks have to gather up loans into pools (backed by Ginnie Mae)and selling them?

Is using an 'empty' metaphor considered bad style?

Does every functor from Set to Set preserve products?

Words and Words with "ver-" Prefix

How do I append a character to the end of every line in an Excel cell?

Why zero tolerance on nudity in space?

Cat is tipping over bed-side lamps during the night

Can you tell from a blurry photo if focus was too close or too far?

Why avoid shared user accounts?

How can I get my players to come to the game session after agreeing to a date?

How can I play a serial killer in a party of good PCs?

Numbers with a minus sign in a matrix not aligned with the numbers without minus sign

Is it possible to grant users sftp access without shell access? If yes, how is it implemented?

Why was Lupin comfortable with saying Voldemort's name?

Why are the books in the Game of Thrones citadel library shelved spine inwards?

SET NOCOUNT Error in handling SQL call after upgrade

Early credit roll before the end of the film

Gear reduction on large turbofans

What would be the rarity of this magic item(s)?

Increment each digit in a number to form a new number

False written accusations not made public - is there law to cover this?

How to play electric guitar and bass as a duet

How would an AI self awareness kill switch work?



modular macro list structure to iterate it


Loop within another loop in LaTeXIterate over space-separated listDefine and iterate a list of itemsIterate through list to generate referencesList all macro callsHow to change the list structure indentation?Writing modular classesDefine macro for sequence/list/tuple macrosStarting a newline in the list structureHow to get the below List structure in TeX4Htiterate over newline-separated list













0















Based on the Wipet's answer, and with the same learning spirit, about the iterate loop "for", it's interesting to find out how the proposed "for loop" could be more modular. I want to pass, as an argument, the iterable list purposed in the above example.



documentclass[a4paper]{article}
usepackage{pst-solides3d}

%%% FOR LOOP %%%
makeatletter
longdeffor#1in#2#3{expandafterdefcsname b:string#1endcsname{#3}%
@forinA#1#2;}
longdef@forinA#1#2;{ifx#2else
def#1{#2}csname b:string#1endcsname expandafter@forinAexpandafter#1fi}
%%%%%%%%%%%%%%%%%%
makeatother

%% Variables%%
pgfmathparse{1.2}edeflinkLength{pgfmathresult}
pgfmathparse{0.2}edefjointRadio{pgfmathresult}
pgfmathparse{0.6}edefjointLength{pgfmathresult}

newcommand{iterating}{
%%% point's structure %%%
fori in {%
0 0 0;% N°0
0 0 0;% N°1
0 0 linkLength;% N°2
0 0 jointLength;% N°3
0 {jointLength*0.5} {linkLength + jointRadio};% N°4
}
{%
ipar
%... call to several macros
}%
}
begin{document}

iterating

end{document}


The code behavior is correct for my purpose.



0 0 0
0 0 0
0 0 1.2
0 0 0.6
0 0.6*0.5 1.2+ 0.2


This list, is an implicit list, with several variables and arithmetic operation in each component. So the main idea is passing the list as a macro, something like newcommand{list}{0 0 0;0 0 0;0 0 linkLength;0 0 jointLength;0 {jointLength*0.5} {linkLength + jointRadio}} and call it as fori in list. I don't understand which modifications be needed in for declaration to reach this behavior.
(i realize that this behavior could be reached using foreach statement but i need to understand how could be done)



Any ideas, will be well received.









share



























    0















    Based on the Wipet's answer, and with the same learning spirit, about the iterate loop "for", it's interesting to find out how the proposed "for loop" could be more modular. I want to pass, as an argument, the iterable list purposed in the above example.



    documentclass[a4paper]{article}
    usepackage{pst-solides3d}

    %%% FOR LOOP %%%
    makeatletter
    longdeffor#1in#2#3{expandafterdefcsname b:string#1endcsname{#3}%
    @forinA#1#2;}
    longdef@forinA#1#2;{ifx#2else
    def#1{#2}csname b:string#1endcsname expandafter@forinAexpandafter#1fi}
    %%%%%%%%%%%%%%%%%%
    makeatother

    %% Variables%%
    pgfmathparse{1.2}edeflinkLength{pgfmathresult}
    pgfmathparse{0.2}edefjointRadio{pgfmathresult}
    pgfmathparse{0.6}edefjointLength{pgfmathresult}

    newcommand{iterating}{
    %%% point's structure %%%
    fori in {%
    0 0 0;% N°0
    0 0 0;% N°1
    0 0 linkLength;% N°2
    0 0 jointLength;% N°3
    0 {jointLength*0.5} {linkLength + jointRadio};% N°4
    }
    {%
    ipar
    %... call to several macros
    }%
    }
    begin{document}

    iterating

    end{document}


    The code behavior is correct for my purpose.



    0 0 0
    0 0 0
    0 0 1.2
    0 0 0.6
    0 0.6*0.5 1.2+ 0.2


    This list, is an implicit list, with several variables and arithmetic operation in each component. So the main idea is passing the list as a macro, something like newcommand{list}{0 0 0;0 0 0;0 0 linkLength;0 0 jointLength;0 {jointLength*0.5} {linkLength + jointRadio}} and call it as fori in list. I don't understand which modifications be needed in for declaration to reach this behavior.
    (i realize that this behavior could be reached using foreach statement but i need to understand how could be done)



    Any ideas, will be well received.









    share

























      0












      0








      0








      Based on the Wipet's answer, and with the same learning spirit, about the iterate loop "for", it's interesting to find out how the proposed "for loop" could be more modular. I want to pass, as an argument, the iterable list purposed in the above example.



      documentclass[a4paper]{article}
      usepackage{pst-solides3d}

      %%% FOR LOOP %%%
      makeatletter
      longdeffor#1in#2#3{expandafterdefcsname b:string#1endcsname{#3}%
      @forinA#1#2;}
      longdef@forinA#1#2;{ifx#2else
      def#1{#2}csname b:string#1endcsname expandafter@forinAexpandafter#1fi}
      %%%%%%%%%%%%%%%%%%
      makeatother

      %% Variables%%
      pgfmathparse{1.2}edeflinkLength{pgfmathresult}
      pgfmathparse{0.2}edefjointRadio{pgfmathresult}
      pgfmathparse{0.6}edefjointLength{pgfmathresult}

      newcommand{iterating}{
      %%% point's structure %%%
      fori in {%
      0 0 0;% N°0
      0 0 0;% N°1
      0 0 linkLength;% N°2
      0 0 jointLength;% N°3
      0 {jointLength*0.5} {linkLength + jointRadio};% N°4
      }
      {%
      ipar
      %... call to several macros
      }%
      }
      begin{document}

      iterating

      end{document}


      The code behavior is correct for my purpose.



      0 0 0
      0 0 0
      0 0 1.2
      0 0 0.6
      0 0.6*0.5 1.2+ 0.2


      This list, is an implicit list, with several variables and arithmetic operation in each component. So the main idea is passing the list as a macro, something like newcommand{list}{0 0 0;0 0 0;0 0 linkLength;0 0 jointLength;0 {jointLength*0.5} {linkLength + jointRadio}} and call it as fori in list. I don't understand which modifications be needed in for declaration to reach this behavior.
      (i realize that this behavior could be reached using foreach statement but i need to understand how could be done)



      Any ideas, will be well received.









      share














      Based on the Wipet's answer, and with the same learning spirit, about the iterate loop "for", it's interesting to find out how the proposed "for loop" could be more modular. I want to pass, as an argument, the iterable list purposed in the above example.



      documentclass[a4paper]{article}
      usepackage{pst-solides3d}

      %%% FOR LOOP %%%
      makeatletter
      longdeffor#1in#2#3{expandafterdefcsname b:string#1endcsname{#3}%
      @forinA#1#2;}
      longdef@forinA#1#2;{ifx#2else
      def#1{#2}csname b:string#1endcsname expandafter@forinAexpandafter#1fi}
      %%%%%%%%%%%%%%%%%%
      makeatother

      %% Variables%%
      pgfmathparse{1.2}edeflinkLength{pgfmathresult}
      pgfmathparse{0.2}edefjointRadio{pgfmathresult}
      pgfmathparse{0.6}edefjointLength{pgfmathresult}

      newcommand{iterating}{
      %%% point's structure %%%
      fori in {%
      0 0 0;% N°0
      0 0 0;% N°1
      0 0 linkLength;% N°2
      0 0 jointLength;% N°3
      0 {jointLength*0.5} {linkLength + jointRadio};% N°4
      }
      {%
      ipar
      %... call to several macros
      }%
      }
      begin{document}

      iterating

      end{document}


      The code behavior is correct for my purpose.



      0 0 0
      0 0 0
      0 0 1.2
      0 0 0.6
      0 0.6*0.5 1.2+ 0.2


      This list, is an implicit list, with several variables and arithmetic operation in each component. So the main idea is passing the list as a macro, something like newcommand{list}{0 0 0;0 0 0;0 0 linkLength;0 0 jointLength;0 {jointLength*0.5} {linkLength + jointRadio}} and call it as fori in list. I don't understand which modifications be needed in for declaration to reach this behavior.
      (i realize that this behavior could be reached using foreach statement but i need to understand how could be done)



      Any ideas, will be well received.







      macros lists pst-solides3d literate-programming





      share












      share










      share



      share










      asked 2 mins ago









      Rene ValenzuelaRene Valenzuela

      114




      114






















          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%2f477066%2fmodular-macro-list-structure-to-iterate-it%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%2f477066%2fmodular-macro-list-structure-to-iterate-it%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

          Can't compile dgruyter and caption packagesLaTeX templates/packages for writing a patent specificationLatex...

          Schneeberg (Smreczany) Bibliografia | Menu...

          Hans Bellmer Spis treści Życiorys | Upamiętnienie | Przypisy | Bibliografia | Linki zewnętrzne |...