Creacting automated equation list of symbols using glossary











up vote
0
down vote

favorite












I want to define a macro to add an automated symbol explanation under an equation. I have to use pre-defined glossary entries because the glsentrycurrent does not allow to add new glossaries in the document. To add the automated legend I define the newcommand addLegeds which should basically loop over all comma separated strings passed as an argument and check if they have been used befor. If all of them were used befor no legend should be added. The macro works exept that as soon as I use the gls or glsdesc macros, I get the following errors:



Argument of @tempc has an extra }. addLegends{test1,test2} 
File ended while scanning use of @tempc.
Missing endcsname inserted. addLegends{test1,test2}
Paragraph ended before @tempc was complete. addLegends{test1,test2}
Undefined control sequence. addLegends{test1,test2}


The following macro has been used:



makeatletter
newififshowleg
newcommand{addLegends}[1]{%
showlegfalse
@for@tempa:=#1do{%
ifnumequal{glsentrycurrcount{@tempa}}{0}{showlegtrue}{}}%
ifshowleg %
with: %
begin{conditions} %
@for@tempb:=#1do{ %
ifnumequal{glsentrycurrcount{@tempb}}{0}{ %
gls{@tempb} & glsdesc{@tempb}\ %
}{}}%
end{conditions} %
else fi %
}
makeatother


And this is a reduced version of the latex document:



usepackage[toc]{glossaries}
glsenableentrycount
% MACRO
newglossaryentry{test1}{name={test1},description={TEST1}}
newglossaryentry{test2}{name={test2},description={TEST2}}

begin{document}
addLegends{test1,test2}
begin{end}


Does anybody know what is causing the error?



Thanks,
Markus









share







New contributor




mboe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    up vote
    0
    down vote

    favorite












    I want to define a macro to add an automated symbol explanation under an equation. I have to use pre-defined glossary entries because the glsentrycurrent does not allow to add new glossaries in the document. To add the automated legend I define the newcommand addLegeds which should basically loop over all comma separated strings passed as an argument and check if they have been used befor. If all of them were used befor no legend should be added. The macro works exept that as soon as I use the gls or glsdesc macros, I get the following errors:



    Argument of @tempc has an extra }. addLegends{test1,test2} 
    File ended while scanning use of @tempc.
    Missing endcsname inserted. addLegends{test1,test2}
    Paragraph ended before @tempc was complete. addLegends{test1,test2}
    Undefined control sequence. addLegends{test1,test2}


    The following macro has been used:



    makeatletter
    newififshowleg
    newcommand{addLegends}[1]{%
    showlegfalse
    @for@tempa:=#1do{%
    ifnumequal{glsentrycurrcount{@tempa}}{0}{showlegtrue}{}}%
    ifshowleg %
    with: %
    begin{conditions} %
    @for@tempb:=#1do{ %
    ifnumequal{glsentrycurrcount{@tempb}}{0}{ %
    gls{@tempb} & glsdesc{@tempb}\ %
    }{}}%
    end{conditions} %
    else fi %
    }
    makeatother


    And this is a reduced version of the latex document:



    usepackage[toc]{glossaries}
    glsenableentrycount
    % MACRO
    newglossaryentry{test1}{name={test1},description={TEST1}}
    newglossaryentry{test2}{name={test2},description={TEST2}}

    begin{document}
    addLegends{test1,test2}
    begin{end}


    Does anybody know what is causing the error?



    Thanks,
    Markus









    share







    New contributor




    mboe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I want to define a macro to add an automated symbol explanation under an equation. I have to use pre-defined glossary entries because the glsentrycurrent does not allow to add new glossaries in the document. To add the automated legend I define the newcommand addLegeds which should basically loop over all comma separated strings passed as an argument and check if they have been used befor. If all of them were used befor no legend should be added. The macro works exept that as soon as I use the gls or glsdesc macros, I get the following errors:



      Argument of @tempc has an extra }. addLegends{test1,test2} 
      File ended while scanning use of @tempc.
      Missing endcsname inserted. addLegends{test1,test2}
      Paragraph ended before @tempc was complete. addLegends{test1,test2}
      Undefined control sequence. addLegends{test1,test2}


      The following macro has been used:



      makeatletter
      newififshowleg
      newcommand{addLegends}[1]{%
      showlegfalse
      @for@tempa:=#1do{%
      ifnumequal{glsentrycurrcount{@tempa}}{0}{showlegtrue}{}}%
      ifshowleg %
      with: %
      begin{conditions} %
      @for@tempb:=#1do{ %
      ifnumequal{glsentrycurrcount{@tempb}}{0}{ %
      gls{@tempb} & glsdesc{@tempb}\ %
      }{}}%
      end{conditions} %
      else fi %
      }
      makeatother


      And this is a reduced version of the latex document:



      usepackage[toc]{glossaries}
      glsenableentrycount
      % MACRO
      newglossaryentry{test1}{name={test1},description={TEST1}}
      newglossaryentry{test2}{name={test2},description={TEST2}}

      begin{document}
      addLegends{test1,test2}
      begin{end}


      Does anybody know what is causing the error?



      Thanks,
      Markus









      share







      New contributor




      mboe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I want to define a macro to add an automated symbol explanation under an equation. I have to use pre-defined glossary entries because the glsentrycurrent does not allow to add new glossaries in the document. To add the automated legend I define the newcommand addLegeds which should basically loop over all comma separated strings passed as an argument and check if they have been used befor. If all of them were used befor no legend should be added. The macro works exept that as soon as I use the gls or glsdesc macros, I get the following errors:



      Argument of @tempc has an extra }. addLegends{test1,test2} 
      File ended while scanning use of @tempc.
      Missing endcsname inserted. addLegends{test1,test2}
      Paragraph ended before @tempc was complete. addLegends{test1,test2}
      Undefined control sequence. addLegends{test1,test2}


      The following macro has been used:



      makeatletter
      newififshowleg
      newcommand{addLegends}[1]{%
      showlegfalse
      @for@tempa:=#1do{%
      ifnumequal{glsentrycurrcount{@tempa}}{0}{showlegtrue}{}}%
      ifshowleg %
      with: %
      begin{conditions} %
      @for@tempb:=#1do{ %
      ifnumequal{glsentrycurrcount{@tempb}}{0}{ %
      gls{@tempb} & glsdesc{@tempb}\ %
      }{}}%
      end{conditions} %
      else fi %
      }
      makeatother


      And this is a reduced version of the latex document:



      usepackage[toc]{glossaries}
      glsenableentrycount
      % MACRO
      newglossaryentry{test1}{name={test1},description={TEST1}}
      newglossaryentry{test2}{name={test2},description={TEST2}}

      begin{document}
      addLegends{test1,test2}
      begin{end}


      Does anybody know what is causing the error?



      Thanks,
      Markus







      glossaries loops





      share







      New contributor




      mboe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      mboe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      mboe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 2 mins ago









      mboe

      1




      1




      New contributor




      mboe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      mboe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      mboe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.



























          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',
          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
          });


          }
          });






          mboe is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462658%2fcreacting-automated-equation-list-of-symbols-using-glossary%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          mboe is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          mboe is a new contributor. Be nice, and check out our Code of Conduct.













          mboe is a new contributor. Be nice, and check out our Code of Conduct.












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





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f462658%2fcreacting-automated-equation-list-of-symbols-using-glossary%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

          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

          Calculate evaluation metrics using cross_val_predict sklearn

          Insert data from modal to MySQL (multiple modal on website)