Glossaries: introduce short name only if used more than once within section/chapter/partglossaries: don't print single occurencesUsing the glossaries package for English acronyms in German documentsErrors when using glossaries packageGlossaries: display only long part of acronym in section headline?Ignoring once used glossaries items with full glossaries at each chapterGlossaries header has more above space than other section headingsGlossary per chapter (not by section)glossaries: hyperlink only at the first occurrence in every chapterGlossaries - expand acronyms for first-time use within each chapterAcronyms will only display short version in main text, even the first time they're usedglossaries: acronyms: How to display only the first appearance of an acronym among the Abbreviations if only its short form is used in the text?

Who has more? Ireland or Iceland?

Boss Telling direct supervisor I snitched

Why is my explanation wrong?

I've given my players a lot of magic items. Is it reasonable for me to give them harder encounters?

If nine coins are tossed, what is the probability that the number of heads is even?

Create chunks from an array

What is the purpose of a disclaimer like "this is not legal advice"?

Was it really inappropriate to write a pull request for the company I interviewed with?

How to distinguish easily different soldier of ww2?

What is the oldest European royal house?

School performs periodic password audits. Is my password compromised?

What exactly is the meaning of "fine wine"?

Does the US political system, in principle, allow for a no-party system?

Use Mercury as quenching liquid for swords?

What would be the most expensive material to an intergalactic society?

Is "cogitate" used appropriately in "I cogitate that success relies on hard work"?

What does "rhumatis" mean?

Professor forcing me to attend a conference, I can't afford even with 50% funding

Generating a list with duplicate entries

Why do we call complex numbers “numbers” but we don’t consider 2-vectors numbers?

Why aren't there more Gauls like Obelix?

How do property taxes on school district bonds work?

I am the person who abides by rules but breaks the rules . Who am I

Giving a talk in my old university, how prominently should I tell students my salary?



Glossaries: introduce short name only if used more than once within section/chapter/part


glossaries: don't print single occurencesUsing the glossaries package for English acronyms in German documentsErrors when using glossaries packageGlossaries: display only long part of acronym in section headline?Ignoring once used glossaries items with full glossaries at each chapterGlossaries header has more above space than other section headingsGlossary per chapter (not by section)glossaries: hyperlink only at the first occurrence in every chapterGlossaries - expand acronyms for first-time use within each chapterAcronyms will only display short version in main text, even the first time they're usedglossaries: acronyms: How to display only the first appearance of an acronym among the Abbreviations if only its short form is used in the text?













1















I would like to obtain the following behavior: If an acronym is only used once within a section/chapter/part, at this occurrence only the long name should be used. If however the acronym is used more than one, I want the long-short behavior.



I have the following non working MWE:



documentclassbook
usepackagexparse
ExplSyntaxOn
NewExpandableDocumentCommandfpcompare m m m

% #1 = test to perform
% #2 = text for the true case
% #3 = text for the false case
fp_compare:nTF #1 #2 #3

ExplSyntaxOff

usepackage[acronym,symbols,nomain,toc,sanitizesort,nogroupskip,xindy,numberedsection=autolabel]glossaries-extra
setglossarystylesuper
setabbreviationstyle[acronym]long-short

GlsXtrEnableEntryUnitCountingacronym1section
%renewcommand*glscgls%
%renewcommand*GlscGls%
%renewcommand*glsplcglspl%
%renewcommand*GlsplcGlspl%
%renewcommand*GLScGLS%
%renewcommand*GLSplcGLSpl%


makenoidxglossaries
newacronymwnWNwireless network

glsxtrnewsymbol[description=pi,type=symbols]symb:piensuremathpi%


usepackagexstring
renewcommand*gls[1]%
IfEqglscategory#1acronym%to apply this to acronym only (and not symbols as well)
fpcompareglsentrycurrcount#1 > 1glsentrydesc#1cgls#1% fpcompare to detect how often used
%
cgls#1%
%
%
renewcommand*Gls[1]%
IfEqglscategory#1acronym%
fpcompareglsentrycurrcount#1 > 1Glsentrydesc#1cgls#1%
%
cgls#1%
%
%
renewcommand*glspl[1]%
IfEqglscategory#1acronym%
fpcompareglsentrycurrcount#1 > 1glsentryplural#1cglspl#1%
%
cglspl#1%
%
%
renewcommand*Glspl[1]%
IfEqglscategory#1acronym%
fpcompareglsentrycurrcount#1 > 1Glsentryplural#1cglspl#1%
%
cglspl#1%
%
%
renewcommand*GLS[1]%
IfEqglscategory#1acronym%
fpcompareglsentrycurrcount#1 > 1GLSentrydesc#1cgls#1%
%
cgls#1%
%
%
renewcommand*GLSpl[1]%
IfEqglscategory#1acronym%
fpcompareglsentrycurrcount#1 > 1GLSentryplural#1cglspl#1%
%
cglspl#1%
%
%

begindocument
sectionA
glswn\
glsplwn\
glsplwn\
glsplwn\
count: glsentrycurrcountwn\
glssymb:pi
sectionB

glsplwn\
count: glsentrycurrcountwn

sectionC
Glsplwn\
glswn\
count: glsentrycurrcountwn
enddocument


which produces:



enter image description here



I however, would have expected/wanted a count of 4 in section A, and in section C, that at first the full description is printed instead of WNs



How to make this work reliably?










share|improve this question

















This question has an open bounty worth +50
reputation from bonanza ending ending at 2019-03-13 08:37:01Z">in 4 days.


This question has not received enough attention.


I am looking for a scheme that integrates well withglossaries-extra and if possible works with the gls commands and its friends




















    1















    I would like to obtain the following behavior: If an acronym is only used once within a section/chapter/part, at this occurrence only the long name should be used. If however the acronym is used more than one, I want the long-short behavior.



    I have the following non working MWE:



    documentclassbook
    usepackagexparse
    ExplSyntaxOn
    NewExpandableDocumentCommandfpcompare m m m

    % #1 = test to perform
    % #2 = text for the true case
    % #3 = text for the false case
    fp_compare:nTF #1 #2 #3

    ExplSyntaxOff

    usepackage[acronym,symbols,nomain,toc,sanitizesort,nogroupskip,xindy,numberedsection=autolabel]glossaries-extra
    setglossarystylesuper
    setabbreviationstyle[acronym]long-short

    GlsXtrEnableEntryUnitCountingacronym1section
    %renewcommand*glscgls%
    %renewcommand*GlscGls%
    %renewcommand*glsplcglspl%
    %renewcommand*GlsplcGlspl%
    %renewcommand*GLScGLS%
    %renewcommand*GLSplcGLSpl%


    makenoidxglossaries
    newacronymwnWNwireless network

    glsxtrnewsymbol[description=pi,type=symbols]symb:piensuremathpi%


    usepackagexstring
    renewcommand*gls[1]%
    IfEqglscategory#1acronym%to apply this to acronym only (and not symbols as well)
    fpcompareglsentrycurrcount#1 > 1glsentrydesc#1cgls#1% fpcompare to detect how often used
    %
    cgls#1%
    %
    %
    renewcommand*Gls[1]%
    IfEqglscategory#1acronym%
    fpcompareglsentrycurrcount#1 > 1Glsentrydesc#1cgls#1%
    %
    cgls#1%
    %
    %
    renewcommand*glspl[1]%
    IfEqglscategory#1acronym%
    fpcompareglsentrycurrcount#1 > 1glsentryplural#1cglspl#1%
    %
    cglspl#1%
    %
    %
    renewcommand*Glspl[1]%
    IfEqglscategory#1acronym%
    fpcompareglsentrycurrcount#1 > 1Glsentryplural#1cglspl#1%
    %
    cglspl#1%
    %
    %
    renewcommand*GLS[1]%
    IfEqglscategory#1acronym%
    fpcompareglsentrycurrcount#1 > 1GLSentrydesc#1cgls#1%
    %
    cgls#1%
    %
    %
    renewcommand*GLSpl[1]%
    IfEqglscategory#1acronym%
    fpcompareglsentrycurrcount#1 > 1GLSentryplural#1cglspl#1%
    %
    cglspl#1%
    %
    %

    begindocument
    sectionA
    glswn\
    glsplwn\
    glsplwn\
    glsplwn\
    count: glsentrycurrcountwn\
    glssymb:pi
    sectionB

    glsplwn\
    count: glsentrycurrcountwn

    sectionC
    Glsplwn\
    glswn\
    count: glsentrycurrcountwn
    enddocument


    which produces:



    enter image description here



    I however, would have expected/wanted a count of 4 in section A, and in section C, that at first the full description is printed instead of WNs



    How to make this work reliably?










    share|improve this question

















    This question has an open bounty worth +50
    reputation from bonanza ending ending at 2019-03-13 08:37:01Z">in 4 days.


    This question has not received enough attention.


    I am looking for a scheme that integrates well withglossaries-extra and if possible works with the gls commands and its friends


















      1












      1








      1








      I would like to obtain the following behavior: If an acronym is only used once within a section/chapter/part, at this occurrence only the long name should be used. If however the acronym is used more than one, I want the long-short behavior.



      I have the following non working MWE:



      documentclassbook
      usepackagexparse
      ExplSyntaxOn
      NewExpandableDocumentCommandfpcompare m m m

      % #1 = test to perform
      % #2 = text for the true case
      % #3 = text for the false case
      fp_compare:nTF #1 #2 #3

      ExplSyntaxOff

      usepackage[acronym,symbols,nomain,toc,sanitizesort,nogroupskip,xindy,numberedsection=autolabel]glossaries-extra
      setglossarystylesuper
      setabbreviationstyle[acronym]long-short

      GlsXtrEnableEntryUnitCountingacronym1section
      %renewcommand*glscgls%
      %renewcommand*GlscGls%
      %renewcommand*glsplcglspl%
      %renewcommand*GlsplcGlspl%
      %renewcommand*GLScGLS%
      %renewcommand*GLSplcGLSpl%


      makenoidxglossaries
      newacronymwnWNwireless network

      glsxtrnewsymbol[description=pi,type=symbols]symb:piensuremathpi%


      usepackagexstring
      renewcommand*gls[1]%
      IfEqglscategory#1acronym%to apply this to acronym only (and not symbols as well)
      fpcompareglsentrycurrcount#1 > 1glsentrydesc#1cgls#1% fpcompare to detect how often used
      %
      cgls#1%
      %
      %
      renewcommand*Gls[1]%
      IfEqglscategory#1acronym%
      fpcompareglsentrycurrcount#1 > 1Glsentrydesc#1cgls#1%
      %
      cgls#1%
      %
      %
      renewcommand*glspl[1]%
      IfEqglscategory#1acronym%
      fpcompareglsentrycurrcount#1 > 1glsentryplural#1cglspl#1%
      %
      cglspl#1%
      %
      %
      renewcommand*Glspl[1]%
      IfEqglscategory#1acronym%
      fpcompareglsentrycurrcount#1 > 1Glsentryplural#1cglspl#1%
      %
      cglspl#1%
      %
      %
      renewcommand*GLS[1]%
      IfEqglscategory#1acronym%
      fpcompareglsentrycurrcount#1 > 1GLSentrydesc#1cgls#1%
      %
      cgls#1%
      %
      %
      renewcommand*GLSpl[1]%
      IfEqglscategory#1acronym%
      fpcompareglsentrycurrcount#1 > 1GLSentryplural#1cglspl#1%
      %
      cglspl#1%
      %
      %

      begindocument
      sectionA
      glswn\
      glsplwn\
      glsplwn\
      glsplwn\
      count: glsentrycurrcountwn\
      glssymb:pi
      sectionB

      glsplwn\
      count: glsentrycurrcountwn

      sectionC
      Glsplwn\
      glswn\
      count: glsentrycurrcountwn
      enddocument


      which produces:



      enter image description here



      I however, would have expected/wanted a count of 4 in section A, and in section C, that at first the full description is printed instead of WNs



      How to make this work reliably?










      share|improve this question
















      I would like to obtain the following behavior: If an acronym is only used once within a section/chapter/part, at this occurrence only the long name should be used. If however the acronym is used more than one, I want the long-short behavior.



      I have the following non working MWE:



      documentclassbook
      usepackagexparse
      ExplSyntaxOn
      NewExpandableDocumentCommandfpcompare m m m

      % #1 = test to perform
      % #2 = text for the true case
      % #3 = text for the false case
      fp_compare:nTF #1 #2 #3

      ExplSyntaxOff

      usepackage[acronym,symbols,nomain,toc,sanitizesort,nogroupskip,xindy,numberedsection=autolabel]glossaries-extra
      setglossarystylesuper
      setabbreviationstyle[acronym]long-short

      GlsXtrEnableEntryUnitCountingacronym1section
      %renewcommand*glscgls%
      %renewcommand*GlscGls%
      %renewcommand*glsplcglspl%
      %renewcommand*GlsplcGlspl%
      %renewcommand*GLScGLS%
      %renewcommand*GLSplcGLSpl%


      makenoidxglossaries
      newacronymwnWNwireless network

      glsxtrnewsymbol[description=pi,type=symbols]symb:piensuremathpi%


      usepackagexstring
      renewcommand*gls[1]%
      IfEqglscategory#1acronym%to apply this to acronym only (and not symbols as well)
      fpcompareglsentrycurrcount#1 > 1glsentrydesc#1cgls#1% fpcompare to detect how often used
      %
      cgls#1%
      %
      %
      renewcommand*Gls[1]%
      IfEqglscategory#1acronym%
      fpcompareglsentrycurrcount#1 > 1Glsentrydesc#1cgls#1%
      %
      cgls#1%
      %
      %
      renewcommand*glspl[1]%
      IfEqglscategory#1acronym%
      fpcompareglsentrycurrcount#1 > 1glsentryplural#1cglspl#1%
      %
      cglspl#1%
      %
      %
      renewcommand*Glspl[1]%
      IfEqglscategory#1acronym%
      fpcompareglsentrycurrcount#1 > 1Glsentryplural#1cglspl#1%
      %
      cglspl#1%
      %
      %
      renewcommand*GLS[1]%
      IfEqglscategory#1acronym%
      fpcompareglsentrycurrcount#1 > 1GLSentrydesc#1cgls#1%
      %
      cgls#1%
      %
      %
      renewcommand*GLSpl[1]%
      IfEqglscategory#1acronym%
      fpcompareglsentrycurrcount#1 > 1GLSentryplural#1cglspl#1%
      %
      cglspl#1%
      %
      %

      begindocument
      sectionA
      glswn\
      glsplwn\
      glsplwn\
      glsplwn\
      count: glsentrycurrcountwn\
      glssymb:pi
      sectionB

      glsplwn\
      count: glsentrycurrcountwn

      sectionC
      Glsplwn\
      glswn\
      count: glsentrycurrcountwn
      enddocument


      which produces:



      enter image description here



      I however, would have expected/wanted a count of 4 in section A, and in section C, that at first the full description is printed instead of WNs



      How to make this work reliably?







      glossaries glossaries-extra






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 3 at 17:51







      bonanza

















      asked Mar 3 at 17:45









      bonanzabonanza

      7171625




      7171625






      This question has an open bounty worth +50
      reputation from bonanza ending ending at 2019-03-13 08:37:01Z">in 4 days.


      This question has not received enough attention.


      I am looking for a scheme that integrates well withglossaries-extra and if possible works with the gls commands and its friends








      This question has an open bounty worth +50
      reputation from bonanza ending ending at 2019-03-13 08:37:01Z">in 4 days.


      This question has not received enough attention.


      I am looking for a scheme that integrates well withglossaries-extra and if possible works with the gls commands and its friends






















          1 Answer
          1






          active

          oldest

          votes


















          0














          You could make acronyms section-specific by giving them section-specific names. Of course you could easily automate this:



          documentclassbook
          usepackage[xindy,style=long,numberline,savewrites=true,acronym,nomain]glossaries
          usepackagepgffor

          makeglossaries
          glsenableentrycount

          %create a separate acrony for each section
          letoldnewacronymnewacronym renewcommandnewacronym[3]foreach n in 0,...,10oldnewacronymcn-#1#2#3

          %%patch all the commands to use the within-section version of the acronym
          letoldcglscgls renewcommandcgls[1]oldcglssarabicsection-#1
          letoldcglsplcglspl renewcommandcglspl[1]oldcglsplsarabicsection-#1
          letoldcGlsplcGlspl renewcommandcGlspl[1]oldcGlsplsarabicsection-#1

          newacronymwnWNwireless network

          begindocument
          sectionA
          cglswn\
          cglsplwn\
          cglsplwn\
          cglsplwn\
          count: glsentrycurrcounts1-wn\

          sectionB
          cglsplwn\
          count: glsentrycurrcounts2-wn

          sectionC
          cGlsplwn\
          cglswn\
          count: glsentrycurrcounts3-wn
          enddocument


          Basically, when the acronym wn is defined, it creates separate acronyms for each section, naming them s1-wn and so on. Now when the acronym is called within section X, it "redirects" and uses sX-wn. The result:



          enter image description here



          Of course this would need some more tweaking:



          1. So far it only works for sections, not chapters, but that should be straighforward

          2. It is hard-wired to work for up to 10 sections. You could increase that number, introduce a new counter, or do some .aux-file-magic to automatize this to work for any number of chapters/section/subsections

          3. It also needs some further tweaking to deal with symbols and so on.

          4. I haven't tried it with glossaries-extra so far, because I don't have that installed.

          5. I don't now how you want your list of abbreviations to appear. So for now my proposal ignores this, as did your question.

          Credits: Part of my solution is taken from here






          share|improve this answer
























            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%2f477581%2fglossaries-introduce-short-name-only-if-used-more-than-once-within-section-chap%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            You could make acronyms section-specific by giving them section-specific names. Of course you could easily automate this:



            documentclassbook
            usepackage[xindy,style=long,numberline,savewrites=true,acronym,nomain]glossaries
            usepackagepgffor

            makeglossaries
            glsenableentrycount

            %create a separate acrony for each section
            letoldnewacronymnewacronym renewcommandnewacronym[3]foreach n in 0,...,10oldnewacronymcn-#1#2#3

            %%patch all the commands to use the within-section version of the acronym
            letoldcglscgls renewcommandcgls[1]oldcglssarabicsection-#1
            letoldcglsplcglspl renewcommandcglspl[1]oldcglsplsarabicsection-#1
            letoldcGlsplcGlspl renewcommandcGlspl[1]oldcGlsplsarabicsection-#1

            newacronymwnWNwireless network

            begindocument
            sectionA
            cglswn\
            cglsplwn\
            cglsplwn\
            cglsplwn\
            count: glsentrycurrcounts1-wn\

            sectionB
            cglsplwn\
            count: glsentrycurrcounts2-wn

            sectionC
            cGlsplwn\
            cglswn\
            count: glsentrycurrcounts3-wn
            enddocument


            Basically, when the acronym wn is defined, it creates separate acronyms for each section, naming them s1-wn and so on. Now when the acronym is called within section X, it "redirects" and uses sX-wn. The result:



            enter image description here



            Of course this would need some more tweaking:



            1. So far it only works for sections, not chapters, but that should be straighforward

            2. It is hard-wired to work for up to 10 sections. You could increase that number, introduce a new counter, or do some .aux-file-magic to automatize this to work for any number of chapters/section/subsections

            3. It also needs some further tweaking to deal with symbols and so on.

            4. I haven't tried it with glossaries-extra so far, because I don't have that installed.

            5. I don't now how you want your list of abbreviations to appear. So for now my proposal ignores this, as did your question.

            Credits: Part of my solution is taken from here






            share|improve this answer





























              0














              You could make acronyms section-specific by giving them section-specific names. Of course you could easily automate this:



              documentclassbook
              usepackage[xindy,style=long,numberline,savewrites=true,acronym,nomain]glossaries
              usepackagepgffor

              makeglossaries
              glsenableentrycount

              %create a separate acrony for each section
              letoldnewacronymnewacronym renewcommandnewacronym[3]foreach n in 0,...,10oldnewacronymcn-#1#2#3

              %%patch all the commands to use the within-section version of the acronym
              letoldcglscgls renewcommandcgls[1]oldcglssarabicsection-#1
              letoldcglsplcglspl renewcommandcglspl[1]oldcglsplsarabicsection-#1
              letoldcGlsplcGlspl renewcommandcGlspl[1]oldcGlsplsarabicsection-#1

              newacronymwnWNwireless network

              begindocument
              sectionA
              cglswn\
              cglsplwn\
              cglsplwn\
              cglsplwn\
              count: glsentrycurrcounts1-wn\

              sectionB
              cglsplwn\
              count: glsentrycurrcounts2-wn

              sectionC
              cGlsplwn\
              cglswn\
              count: glsentrycurrcounts3-wn
              enddocument


              Basically, when the acronym wn is defined, it creates separate acronyms for each section, naming them s1-wn and so on. Now when the acronym is called within section X, it "redirects" and uses sX-wn. The result:



              enter image description here



              Of course this would need some more tweaking:



              1. So far it only works for sections, not chapters, but that should be straighforward

              2. It is hard-wired to work for up to 10 sections. You could increase that number, introduce a new counter, or do some .aux-file-magic to automatize this to work for any number of chapters/section/subsections

              3. It also needs some further tweaking to deal with symbols and so on.

              4. I haven't tried it with glossaries-extra so far, because I don't have that installed.

              5. I don't now how you want your list of abbreviations to appear. So for now my proposal ignores this, as did your question.

              Credits: Part of my solution is taken from here






              share|improve this answer



























                0












                0








                0







                You could make acronyms section-specific by giving them section-specific names. Of course you could easily automate this:



                documentclassbook
                usepackage[xindy,style=long,numberline,savewrites=true,acronym,nomain]glossaries
                usepackagepgffor

                makeglossaries
                glsenableentrycount

                %create a separate acrony for each section
                letoldnewacronymnewacronym renewcommandnewacronym[3]foreach n in 0,...,10oldnewacronymcn-#1#2#3

                %%patch all the commands to use the within-section version of the acronym
                letoldcglscgls renewcommandcgls[1]oldcglssarabicsection-#1
                letoldcglsplcglspl renewcommandcglspl[1]oldcglsplsarabicsection-#1
                letoldcGlsplcGlspl renewcommandcGlspl[1]oldcGlsplsarabicsection-#1

                newacronymwnWNwireless network

                begindocument
                sectionA
                cglswn\
                cglsplwn\
                cglsplwn\
                cglsplwn\
                count: glsentrycurrcounts1-wn\

                sectionB
                cglsplwn\
                count: glsentrycurrcounts2-wn

                sectionC
                cGlsplwn\
                cglswn\
                count: glsentrycurrcounts3-wn
                enddocument


                Basically, when the acronym wn is defined, it creates separate acronyms for each section, naming them s1-wn and so on. Now when the acronym is called within section X, it "redirects" and uses sX-wn. The result:



                enter image description here



                Of course this would need some more tweaking:



                1. So far it only works for sections, not chapters, but that should be straighforward

                2. It is hard-wired to work for up to 10 sections. You could increase that number, introduce a new counter, or do some .aux-file-magic to automatize this to work for any number of chapters/section/subsections

                3. It also needs some further tweaking to deal with symbols and so on.

                4. I haven't tried it with glossaries-extra so far, because I don't have that installed.

                5. I don't now how you want your list of abbreviations to appear. So for now my proposal ignores this, as did your question.

                Credits: Part of my solution is taken from here






                share|improve this answer















                You could make acronyms section-specific by giving them section-specific names. Of course you could easily automate this:



                documentclassbook
                usepackage[xindy,style=long,numberline,savewrites=true,acronym,nomain]glossaries
                usepackagepgffor

                makeglossaries
                glsenableentrycount

                %create a separate acrony for each section
                letoldnewacronymnewacronym renewcommandnewacronym[3]foreach n in 0,...,10oldnewacronymcn-#1#2#3

                %%patch all the commands to use the within-section version of the acronym
                letoldcglscgls renewcommandcgls[1]oldcglssarabicsection-#1
                letoldcglsplcglspl renewcommandcglspl[1]oldcglsplsarabicsection-#1
                letoldcGlsplcGlspl renewcommandcGlspl[1]oldcGlsplsarabicsection-#1

                newacronymwnWNwireless network

                begindocument
                sectionA
                cglswn\
                cglsplwn\
                cglsplwn\
                cglsplwn\
                count: glsentrycurrcounts1-wn\

                sectionB
                cglsplwn\
                count: glsentrycurrcounts2-wn

                sectionC
                cGlsplwn\
                cglswn\
                count: glsentrycurrcounts3-wn
                enddocument


                Basically, when the acronym wn is defined, it creates separate acronyms for each section, naming them s1-wn and so on. Now when the acronym is called within section X, it "redirects" and uses sX-wn. The result:



                enter image description here



                Of course this would need some more tweaking:



                1. So far it only works for sections, not chapters, but that should be straighforward

                2. It is hard-wired to work for up to 10 sections. You could increase that number, introduce a new counter, or do some .aux-file-magic to automatize this to work for any number of chapters/section/subsections

                3. It also needs some further tweaking to deal with symbols and so on.

                4. I haven't tried it with glossaries-extra so far, because I don't have that installed.

                5. I don't now how you want your list of abbreviations to appear. So for now my proposal ignores this, as did your question.

                Credits: Part of my solution is taken from here







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 12 mins ago

























                answered 2 days ago









                sheßsheß

                2,10111433




                2,10111433



























                    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%2f477581%2fglossaries-introduce-short-name-only-if-used-more-than-once-within-section-chap%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

                    Isabella Eugénie Boyer Biographie | Références | Menu de navigationmodifiermodifier le codeComparator to Compute the Relative Value of a U.S. Dollar Amount – 1774 to Present.

                    Lioubotyn Sommaire Géographie | Histoire | Population | Notes et références | Liens externes | Menu de navigationlubotin.kharkov.uamodifier« Recensements et estimations de la population depuis 1897 »« Office des statistiques d'Ukraine : population au 1er janvier 2010, 2011 et 2012 »« Office des statistiques d'Ukraine : population au 1er janvier 2011, 2012 et 2013 »Informations officiellesCartes topographiquesCarte routièrem

                    Mpande kaSenzangakhona Biographie | Références | Menu de navigationmodifierMpande kaSenzangakhonavoir la liste des auteursm