Conditional Styling latex on items

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I am trying to create an agenda (headlines) frame for my presentation slides.
I am reducing redundancy, and define the itemized frame once, and reuse it. But each time, i want a different item in the list, to be emboldened or highlighted.



I have managed that in the following way: I define a command, and reuse it, by giving a parameter.



Definition:



beginframe
beginitemize
ifnum #1=1
item textbfIntroduction
else
item Introduction
fi
ifnum #1=2
item textbfResearch Questions
else
item Research Questions
fi
enditemize
endframe


Use:



agenda1
# the intro slides ...
agenda2
# the R.Q. slides ...
# agenda3...


The problem is that this method is also redundant. Each header is written twice. Is there a more efficient way to set the Bold style (or any style) based on the number parameter?
(Since I do not know how to accurately phrase the question, i understand that this might have a duplicate question)










share|improve this question



























    up vote
    1
    down vote

    favorite












    I am trying to create an agenda (headlines) frame for my presentation slides.
    I am reducing redundancy, and define the itemized frame once, and reuse it. But each time, i want a different item in the list, to be emboldened or highlighted.



    I have managed that in the following way: I define a command, and reuse it, by giving a parameter.



    Definition:



    beginframe
    beginitemize
    ifnum #1=1
    item textbfIntroduction
    else
    item Introduction
    fi
    ifnum #1=2
    item textbfResearch Questions
    else
    item Research Questions
    fi
    enditemize
    endframe


    Use:



    agenda1
    # the intro slides ...
    agenda2
    # the R.Q. slides ...
    # agenda3...


    The problem is that this method is also redundant. Each header is written twice. Is there a more efficient way to set the Bold style (or any style) based on the number parameter?
    (Since I do not know how to accurately phrase the question, i understand that this might have a duplicate question)










    share|improve this question

























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am trying to create an agenda (headlines) frame for my presentation slides.
      I am reducing redundancy, and define the itemized frame once, and reuse it. But each time, i want a different item in the list, to be emboldened or highlighted.



      I have managed that in the following way: I define a command, and reuse it, by giving a parameter.



      Definition:



      beginframe
      beginitemize
      ifnum #1=1
      item textbfIntroduction
      else
      item Introduction
      fi
      ifnum #1=2
      item textbfResearch Questions
      else
      item Research Questions
      fi
      enditemize
      endframe


      Use:



      agenda1
      # the intro slides ...
      agenda2
      # the R.Q. slides ...
      # agenda3...


      The problem is that this method is also redundant. Each header is written twice. Is there a more efficient way to set the Bold style (or any style) based on the number parameter?
      (Since I do not know how to accurately phrase the question, i understand that this might have a duplicate question)










      share|improve this question















      I am trying to create an agenda (headlines) frame for my presentation slides.
      I am reducing redundancy, and define the itemized frame once, and reuse it. But each time, i want a different item in the list, to be emboldened or highlighted.



      I have managed that in the following way: I define a command, and reuse it, by giving a parameter.



      Definition:



      beginframe
      beginitemize
      ifnum #1=1
      item textbfIntroduction
      else
      item Introduction
      fi
      ifnum #1=2
      item textbfResearch Questions
      else
      item Research Questions
      fi
      enditemize
      endframe


      Use:



      agenda1
      # the intro slides ...
      agenda2
      # the R.Q. slides ...
      # agenda3...


      The problem is that this method is also redundant. Each header is written twice. Is there a more efficient way to set the Bold style (or any style) based on the number parameter?
      (Since I do not know how to accurately phrase the question, i understand that this might have a duplicate question)







      beamer conditionals






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 17 mins ago









      samcarter

      79.2k787253




      79.2k787253










      asked 1 hour ago









      Makan Tayebi

      1065




      1065




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          2
          down vote













          You can use alert for this purpose.



          MWE:



          documentclassbeamer
          begindocument
          frame%
          setbeamercolornormal textfg=gray,bg=
          setbeamercoloralerted textfg=black,bg= %color
          setbeamerfontalerted textseries=bfseries %font
          usebeamercolornormal text
          beginitemize
          item alert<+>Introduction
          item alert<+>Research Questions
          item alert<+>Other things
          enditemize

          enddocument


          enter image description hereenter image description here






          share|improve this answer




















          • You could simply the code a bit by using beginitemize[<alert@+>], then you would not have to repeat alert<+> for each item. I would suggest to use beginframe...endframe instead of frame, this syntax only works because of legacy reasons.
            – samcarter
            5 mins ago


















          up vote
          1
          down vote













          enter image description here



          documentclassbeamer

          AtBeginSection
          beginframe
          tableofcontents[currentsection]
          endframe


          begindocument

          sectionIntroduction
          beginframe
          abc
          endframe

          sectionResearch Questions
          beginframe
          abc
          endframe

          sectionSummary
          beginframe
          abc
          endframe

          enddocument


          enter image description 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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            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%2f457238%2fconditional-styling-latex-on-items%23new-answer', 'question_page');

            );

            Post as a guest






























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            2
            down vote













            You can use alert for this purpose.



            MWE:



            documentclassbeamer
            begindocument
            frame%
            setbeamercolornormal textfg=gray,bg=
            setbeamercoloralerted textfg=black,bg= %color
            setbeamerfontalerted textseries=bfseries %font
            usebeamercolornormal text
            beginitemize
            item alert<+>Introduction
            item alert<+>Research Questions
            item alert<+>Other things
            enditemize

            enddocument


            enter image description hereenter image description here






            share|improve this answer




















            • You could simply the code a bit by using beginitemize[<alert@+>], then you would not have to repeat alert<+> for each item. I would suggest to use beginframe...endframe instead of frame, this syntax only works because of legacy reasons.
              – samcarter
              5 mins ago















            up vote
            2
            down vote













            You can use alert for this purpose.



            MWE:



            documentclassbeamer
            begindocument
            frame%
            setbeamercolornormal textfg=gray,bg=
            setbeamercoloralerted textfg=black,bg= %color
            setbeamerfontalerted textseries=bfseries %font
            usebeamercolornormal text
            beginitemize
            item alert<+>Introduction
            item alert<+>Research Questions
            item alert<+>Other things
            enditemize

            enddocument


            enter image description hereenter image description here






            share|improve this answer




















            • You could simply the code a bit by using beginitemize[<alert@+>], then you would not have to repeat alert<+> for each item. I would suggest to use beginframe...endframe instead of frame, this syntax only works because of legacy reasons.
              – samcarter
              5 mins ago













            up vote
            2
            down vote










            up vote
            2
            down vote









            You can use alert for this purpose.



            MWE:



            documentclassbeamer
            begindocument
            frame%
            setbeamercolornormal textfg=gray,bg=
            setbeamercoloralerted textfg=black,bg= %color
            setbeamerfontalerted textseries=bfseries %font
            usebeamercolornormal text
            beginitemize
            item alert<+>Introduction
            item alert<+>Research Questions
            item alert<+>Other things
            enditemize

            enddocument


            enter image description hereenter image description here






            share|improve this answer












            You can use alert for this purpose.



            MWE:



            documentclassbeamer
            begindocument
            frame%
            setbeamercolornormal textfg=gray,bg=
            setbeamercoloralerted textfg=black,bg= %color
            setbeamerfontalerted textseries=bfseries %font
            usebeamercolornormal text
            beginitemize
            item alert<+>Introduction
            item alert<+>Research Questions
            item alert<+>Other things
            enditemize

            enddocument


            enter image description hereenter image description here







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 24 mins ago









            nidhin

            43838




            43838











            • You could simply the code a bit by using beginitemize[<alert@+>], then you would not have to repeat alert<+> for each item. I would suggest to use beginframe...endframe instead of frame, this syntax only works because of legacy reasons.
              – samcarter
              5 mins ago

















            • You could simply the code a bit by using beginitemize[<alert@+>], then you would not have to repeat alert<+> for each item. I would suggest to use beginframe...endframe instead of frame, this syntax only works because of legacy reasons.
              – samcarter
              5 mins ago
















            You could simply the code a bit by using beginitemize[<alert@+>], then you would not have to repeat alert<+> for each item. I would suggest to use beginframe...endframe instead of frame, this syntax only works because of legacy reasons.
            – samcarter
            5 mins ago





            You could simply the code a bit by using beginitemize[<alert@+>], then you would not have to repeat alert<+> for each item. I would suggest to use beginframe...endframe instead of frame, this syntax only works because of legacy reasons.
            – samcarter
            5 mins ago











            up vote
            1
            down vote













            enter image description here



            documentclassbeamer

            AtBeginSection
            beginframe
            tableofcontents[currentsection]
            endframe


            begindocument

            sectionIntroduction
            beginframe
            abc
            endframe

            sectionResearch Questions
            beginframe
            abc
            endframe

            sectionSummary
            beginframe
            abc
            endframe

            enddocument


            enter image description here






            share|improve this answer
























              up vote
              1
              down vote













              enter image description here



              documentclassbeamer

              AtBeginSection
              beginframe
              tableofcontents[currentsection]
              endframe


              begindocument

              sectionIntroduction
              beginframe
              abc
              endframe

              sectionResearch Questions
              beginframe
              abc
              endframe

              sectionSummary
              beginframe
              abc
              endframe

              enddocument


              enter image description here






              share|improve this answer






















                up vote
                1
                down vote










                up vote
                1
                down vote









                enter image description here



                documentclassbeamer

                AtBeginSection
                beginframe
                tableofcontents[currentsection]
                endframe


                begindocument

                sectionIntroduction
                beginframe
                abc
                endframe

                sectionResearch Questions
                beginframe
                abc
                endframe

                sectionSummary
                beginframe
                abc
                endframe

                enddocument


                enter image description here






                share|improve this answer












                enter image description here



                documentclassbeamer

                AtBeginSection
                beginframe
                tableofcontents[currentsection]
                endframe


                begindocument

                sectionIntroduction
                beginframe
                abc
                endframe

                sectionResearch Questions
                beginframe
                abc
                endframe

                sectionSummary
                beginframe
                abc
                endframe

                enddocument


                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 18 mins ago









                samcarter

                79.2k787253




                79.2k787253



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f457238%2fconditional-styling-latex-on-items%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    What does second last employer means? [closed]

                    Installing NextGIS Connect into QGIS 3?

                    One-line joke