add a label to a AtBeginSection slide

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











up vote
1
down vote

favorite












I would like to put a ref to one of the slides created with AtBeginSection, is that possible?



In more detail, I abuse



setbeamertemplatebackground canvas%
hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]./symmetry_breaking.pdf


subsection[shorttitle]long title with texorpdfstring$x^2$x2 labelsym


beamertemplateshadingbackgroundblue!01!whitewhite


to manipulate the background image on one AtBeginSubsection slide. And as you see I try to put a label there, such that on the very last slide I can ask "Who spotted the mistake on slide refsym?"



Can I put labels on these auto generated slides?



(Alternatively, I'm also open to a workaround putting the label on the next slide and then do arithmetics to figure out the slide number before.)



EDIT: at the moment my file looks (cut down to a MWE) like this:



documentclassbeamer
usepackagegraphicx

AtBeginSubsection

beginframe<beamer>
tableofcontents[currentsection,currentsubsection]
endframe


begindocument

sectionrecap
subsectionwhat do we want

beginframewhat do we want
beginitemize
item we want it all
enditemize
endframe

setbeamertemplatebackground canvas%
~hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]./symmetry_breaking.png


subsection[problem when you can zip]problem when you can zip labelsym

beamertemplateshadingbackgroundblue!01!whitewhite

beginframe
frametitlezipping solves everything
Lorem ipsum
endframe

subsection1234

beginframe
frametitleconclusion
beginitemize
item headache ahead
item<2-> Bonus points for those who spotted the mistake on slide~refsym
enditemize
endframe

enddocument


and it includes this image just an image (suffered in the conversion, but for what it's worth here, can be any image).



And I build with



rm -f pseyfert.aux pseyfert.toc pseyfert.snm
xelatex pseyfert.tex
xelatex pseyfert.tex
xelatex pseyfert.tex


The last slide looks like this enter image description here and should say "Bonus points for those who spotted the mistake on slide 3"










share|improve this question























  • Unrelated to the problem, but you don't need usepackagegraphicx with beamer.
    – samcarter
    23 mins ago














up vote
1
down vote

favorite












I would like to put a ref to one of the slides created with AtBeginSection, is that possible?



In more detail, I abuse



setbeamertemplatebackground canvas%
hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]./symmetry_breaking.pdf


subsection[shorttitle]long title with texorpdfstring$x^2$x2 labelsym


beamertemplateshadingbackgroundblue!01!whitewhite


to manipulate the background image on one AtBeginSubsection slide. And as you see I try to put a label there, such that on the very last slide I can ask "Who spotted the mistake on slide refsym?"



Can I put labels on these auto generated slides?



(Alternatively, I'm also open to a workaround putting the label on the next slide and then do arithmetics to figure out the slide number before.)



EDIT: at the moment my file looks (cut down to a MWE) like this:



documentclassbeamer
usepackagegraphicx

AtBeginSubsection

beginframe<beamer>
tableofcontents[currentsection,currentsubsection]
endframe


begindocument

sectionrecap
subsectionwhat do we want

beginframewhat do we want
beginitemize
item we want it all
enditemize
endframe

setbeamertemplatebackground canvas%
~hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]./symmetry_breaking.png


subsection[problem when you can zip]problem when you can zip labelsym

beamertemplateshadingbackgroundblue!01!whitewhite

beginframe
frametitlezipping solves everything
Lorem ipsum
endframe

subsection1234

beginframe
frametitleconclusion
beginitemize
item headache ahead
item<2-> Bonus points for those who spotted the mistake on slide~refsym
enditemize
endframe

enddocument


and it includes this image just an image (suffered in the conversion, but for what it's worth here, can be any image).



And I build with



rm -f pseyfert.aux pseyfert.toc pseyfert.snm
xelatex pseyfert.tex
xelatex pseyfert.tex
xelatex pseyfert.tex


The last slide looks like this enter image description here and should say "Bonus points for those who spotted the mistake on slide 3"










share|improve this question























  • Unrelated to the problem, but you don't need usepackagegraphicx with beamer.
    – samcarter
    23 mins ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I would like to put a ref to one of the slides created with AtBeginSection, is that possible?



In more detail, I abuse



setbeamertemplatebackground canvas%
hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]./symmetry_breaking.pdf


subsection[shorttitle]long title with texorpdfstring$x^2$x2 labelsym


beamertemplateshadingbackgroundblue!01!whitewhite


to manipulate the background image on one AtBeginSubsection slide. And as you see I try to put a label there, such that on the very last slide I can ask "Who spotted the mistake on slide refsym?"



Can I put labels on these auto generated slides?



(Alternatively, I'm also open to a workaround putting the label on the next slide and then do arithmetics to figure out the slide number before.)



EDIT: at the moment my file looks (cut down to a MWE) like this:



documentclassbeamer
usepackagegraphicx

AtBeginSubsection

beginframe<beamer>
tableofcontents[currentsection,currentsubsection]
endframe


begindocument

sectionrecap
subsectionwhat do we want

beginframewhat do we want
beginitemize
item we want it all
enditemize
endframe

setbeamertemplatebackground canvas%
~hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]./symmetry_breaking.png


subsection[problem when you can zip]problem when you can zip labelsym

beamertemplateshadingbackgroundblue!01!whitewhite

beginframe
frametitlezipping solves everything
Lorem ipsum
endframe

subsection1234

beginframe
frametitleconclusion
beginitemize
item headache ahead
item<2-> Bonus points for those who spotted the mistake on slide~refsym
enditemize
endframe

enddocument


and it includes this image just an image (suffered in the conversion, but for what it's worth here, can be any image).



And I build with



rm -f pseyfert.aux pseyfert.toc pseyfert.snm
xelatex pseyfert.tex
xelatex pseyfert.tex
xelatex pseyfert.tex


The last slide looks like this enter image description here and should say "Bonus points for those who spotted the mistake on slide 3"










share|improve this question















I would like to put a ref to one of the slides created with AtBeginSection, is that possible?



In more detail, I abuse



setbeamertemplatebackground canvas%
hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]./symmetry_breaking.pdf


subsection[shorttitle]long title with texorpdfstring$x^2$x2 labelsym


beamertemplateshadingbackgroundblue!01!whitewhite


to manipulate the background image on one AtBeginSubsection slide. And as you see I try to put a label there, such that on the very last slide I can ask "Who spotted the mistake on slide refsym?"



Can I put labels on these auto generated slides?



(Alternatively, I'm also open to a workaround putting the label on the next slide and then do arithmetics to figure out the slide number before.)



EDIT: at the moment my file looks (cut down to a MWE) like this:



documentclassbeamer
usepackagegraphicx

AtBeginSubsection

beginframe<beamer>
tableofcontents[currentsection,currentsubsection]
endframe


begindocument

sectionrecap
subsectionwhat do we want

beginframewhat do we want
beginitemize
item we want it all
enditemize
endframe

setbeamertemplatebackground canvas%
~hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]./symmetry_breaking.png


subsection[problem when you can zip]problem when you can zip labelsym

beamertemplateshadingbackgroundblue!01!whitewhite

beginframe
frametitlezipping solves everything
Lorem ipsum
endframe

subsection1234

beginframe
frametitleconclusion
beginitemize
item headache ahead
item<2-> Bonus points for those who spotted the mistake on slide~refsym
enditemize
endframe

enddocument


and it includes this image just an image (suffered in the conversion, but for what it's worth here, can be any image).



And I build with



rm -f pseyfert.aux pseyfert.toc pseyfert.snm
xelatex pseyfert.tex
xelatex pseyfert.tex
xelatex pseyfert.tex


The last slide looks like this enter image description here and should say "Bonus points for those who spotted the mistake on slide 3"







beamer ref






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 3 hours ago

























asked 3 hours ago









pseyfert

15819




15819











  • Unrelated to the problem, but you don't need usepackagegraphicx with beamer.
    – samcarter
    23 mins ago
















  • Unrelated to the problem, but you don't need usepackagegraphicx with beamer.
    – samcarter
    23 mins ago















Unrelated to the problem, but you don't need usepackagegraphicx with beamer.
– samcarter
23 mins ago




Unrelated to the problem, but you don't need usepackagegraphicx with beamer.
– samcarter
23 mins ago










2 Answers
2






active

oldest

votes

















up vote
2
down vote













This is an ad hoc proposal. As Skillmon pointed out, there was an unnecessary expandafter.



documentclassbeamer
usepackagegraphicx

AtBeginSubsection

beginframe<beamer>
ifxmylabelempty
else
labelmylabel
fi
tableofcontents[currentsection,currentsubsection]
endframe


xdefmylabelempty
begindocument

sectionrecap
subsectionwhat do we want

beginframewhat do we want
beginitemize
item we want it all
enditemize
endframe

xdefmylabelsym
setbeamertemplatebackground canvas%
~hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]./symmetry_breaking.png



subsection[problem when you can zip]problem when you can zip

xdefmylabelempty
beamertemplateshadingbackgroundblue!01!whitewhite

beginframe
frametitlezipping solves everything
Lorem ipsum
endframe

subsection1234

beginframe
frametitleconclusion
beginitemize
item headache ahead
item<2-> Bonus points for those who spotted the mistake on
slide~refsym
enditemize
endframe

enddocument





share|improve this answer





























    up vote
    2
    down vote













    Add a command with which you can choose to label the next subsection added with AtBeginSubsection to your code:



    documentclassbeamer
    usepackagegraphicx

    newififLabelSubSec
    newcommandLabelSubSec[1]
    %
    globalLabelSubSectrue
    gdefSubSecLabel#1%


    AtBeginSubsection
    %
    beginframe<beamer>
    ifLabelSubSec
    globalLabelSubSecfalse
    labelSubSecLabel%
    fi
    tableofcontents[currentsection,currentsubsection]
    endframe%


    setcountersecnumdepth2

    begindocument

    sectionrecap
    subsectionwhat do we want

    beginframewhat do we want
    beginitemize
    item we want it all
    enditemize
    endframe

    setbeamertemplatebackground canvas%
    ~hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]example-image-duck


    LabelSubSecsym
    subsection[problem when you can zip]problem when you can zip

    beamertemplateshadingbackgroundblue!01!whitewhite

    beginframe
    frametitlezipping solves everything
    Lorem ipsum
    endframe

    subsection1234

    beginframe
    frametitleconclusion
    beginitemize
    item headache ahead
    item<2-> Bonus points for those who spotted the mistake on slide~refsym
    enditemize
    endframe

    enddocument





    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%2f452005%2fadd-a-label-to-a-atbeginsection-slide%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













      This is an ad hoc proposal. As Skillmon pointed out, there was an unnecessary expandafter.



      documentclassbeamer
      usepackagegraphicx

      AtBeginSubsection

      beginframe<beamer>
      ifxmylabelempty
      else
      labelmylabel
      fi
      tableofcontents[currentsection,currentsubsection]
      endframe


      xdefmylabelempty
      begindocument

      sectionrecap
      subsectionwhat do we want

      beginframewhat do we want
      beginitemize
      item we want it all
      enditemize
      endframe

      xdefmylabelsym
      setbeamertemplatebackground canvas%
      ~hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]./symmetry_breaking.png



      subsection[problem when you can zip]problem when you can zip

      xdefmylabelempty
      beamertemplateshadingbackgroundblue!01!whitewhite

      beginframe
      frametitlezipping solves everything
      Lorem ipsum
      endframe

      subsection1234

      beginframe
      frametitleconclusion
      beginitemize
      item headache ahead
      item<2-> Bonus points for those who spotted the mistake on
      slide~refsym
      enditemize
      endframe

      enddocument





      share|improve this answer


























        up vote
        2
        down vote













        This is an ad hoc proposal. As Skillmon pointed out, there was an unnecessary expandafter.



        documentclassbeamer
        usepackagegraphicx

        AtBeginSubsection

        beginframe<beamer>
        ifxmylabelempty
        else
        labelmylabel
        fi
        tableofcontents[currentsection,currentsubsection]
        endframe


        xdefmylabelempty
        begindocument

        sectionrecap
        subsectionwhat do we want

        beginframewhat do we want
        beginitemize
        item we want it all
        enditemize
        endframe

        xdefmylabelsym
        setbeamertemplatebackground canvas%
        ~hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]./symmetry_breaking.png



        subsection[problem when you can zip]problem when you can zip

        xdefmylabelempty
        beamertemplateshadingbackgroundblue!01!whitewhite

        beginframe
        frametitlezipping solves everything
        Lorem ipsum
        endframe

        subsection1234

        beginframe
        frametitleconclusion
        beginitemize
        item headache ahead
        item<2-> Bonus points for those who spotted the mistake on
        slide~refsym
        enditemize
        endframe

        enddocument





        share|improve this answer
























          up vote
          2
          down vote










          up vote
          2
          down vote









          This is an ad hoc proposal. As Skillmon pointed out, there was an unnecessary expandafter.



          documentclassbeamer
          usepackagegraphicx

          AtBeginSubsection

          beginframe<beamer>
          ifxmylabelempty
          else
          labelmylabel
          fi
          tableofcontents[currentsection,currentsubsection]
          endframe


          xdefmylabelempty
          begindocument

          sectionrecap
          subsectionwhat do we want

          beginframewhat do we want
          beginitemize
          item we want it all
          enditemize
          endframe

          xdefmylabelsym
          setbeamertemplatebackground canvas%
          ~hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]./symmetry_breaking.png



          subsection[problem when you can zip]problem when you can zip

          xdefmylabelempty
          beamertemplateshadingbackgroundblue!01!whitewhite

          beginframe
          frametitlezipping solves everything
          Lorem ipsum
          endframe

          subsection1234

          beginframe
          frametitleconclusion
          beginitemize
          item headache ahead
          item<2-> Bonus points for those who spotted the mistake on
          slide~refsym
          enditemize
          endframe

          enddocument





          share|improve this answer














          This is an ad hoc proposal. As Skillmon pointed out, there was an unnecessary expandafter.



          documentclassbeamer
          usepackagegraphicx

          AtBeginSubsection

          beginframe<beamer>
          ifxmylabelempty
          else
          labelmylabel
          fi
          tableofcontents[currentsection,currentsubsection]
          endframe


          xdefmylabelempty
          begindocument

          sectionrecap
          subsectionwhat do we want

          beginframewhat do we want
          beginitemize
          item we want it all
          enditemize
          endframe

          xdefmylabelsym
          setbeamertemplatebackground canvas%
          ~hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]./symmetry_breaking.png



          subsection[problem when you can zip]problem when you can zip

          xdefmylabelempty
          beamertemplateshadingbackgroundblue!01!whitewhite

          beginframe
          frametitlezipping solves everything
          Lorem ipsum
          endframe

          subsection1234

          beginframe
          frametitleconclusion
          beginitemize
          item headache ahead
          item<2-> Bonus points for those who spotted the mistake on
          slide~refsym
          enditemize
          endframe

          enddocument






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 hours ago

























          answered 2 hours ago









          marmot

          59.3k463128




          59.3k463128




















              up vote
              2
              down vote













              Add a command with which you can choose to label the next subsection added with AtBeginSubsection to your code:



              documentclassbeamer
              usepackagegraphicx

              newififLabelSubSec
              newcommandLabelSubSec[1]
              %
              globalLabelSubSectrue
              gdefSubSecLabel#1%


              AtBeginSubsection
              %
              beginframe<beamer>
              ifLabelSubSec
              globalLabelSubSecfalse
              labelSubSecLabel%
              fi
              tableofcontents[currentsection,currentsubsection]
              endframe%


              setcountersecnumdepth2

              begindocument

              sectionrecap
              subsectionwhat do we want

              beginframewhat do we want
              beginitemize
              item we want it all
              enditemize
              endframe

              setbeamertemplatebackground canvas%
              ~hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]example-image-duck


              LabelSubSecsym
              subsection[problem when you can zip]problem when you can zip

              beamertemplateshadingbackgroundblue!01!whitewhite

              beginframe
              frametitlezipping solves everything
              Lorem ipsum
              endframe

              subsection1234

              beginframe
              frametitleconclusion
              beginitemize
              item headache ahead
              item<2-> Bonus points for those who spotted the mistake on slide~refsym
              enditemize
              endframe

              enddocument





              share|improve this answer


























                up vote
                2
                down vote













                Add a command with which you can choose to label the next subsection added with AtBeginSubsection to your code:



                documentclassbeamer
                usepackagegraphicx

                newififLabelSubSec
                newcommandLabelSubSec[1]
                %
                globalLabelSubSectrue
                gdefSubSecLabel#1%


                AtBeginSubsection
                %
                beginframe<beamer>
                ifLabelSubSec
                globalLabelSubSecfalse
                labelSubSecLabel%
                fi
                tableofcontents[currentsection,currentsubsection]
                endframe%


                setcountersecnumdepth2

                begindocument

                sectionrecap
                subsectionwhat do we want

                beginframewhat do we want
                beginitemize
                item we want it all
                enditemize
                endframe

                setbeamertemplatebackground canvas%
                ~hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]example-image-duck


                LabelSubSecsym
                subsection[problem when you can zip]problem when you can zip

                beamertemplateshadingbackgroundblue!01!whitewhite

                beginframe
                frametitlezipping solves everything
                Lorem ipsum
                endframe

                subsection1234

                beginframe
                frametitleconclusion
                beginitemize
                item headache ahead
                item<2-> Bonus points for those who spotted the mistake on slide~refsym
                enditemize
                endframe

                enddocument





                share|improve this answer
























                  up vote
                  2
                  down vote










                  up vote
                  2
                  down vote









                  Add a command with which you can choose to label the next subsection added with AtBeginSubsection to your code:



                  documentclassbeamer
                  usepackagegraphicx

                  newififLabelSubSec
                  newcommandLabelSubSec[1]
                  %
                  globalLabelSubSectrue
                  gdefSubSecLabel#1%


                  AtBeginSubsection
                  %
                  beginframe<beamer>
                  ifLabelSubSec
                  globalLabelSubSecfalse
                  labelSubSecLabel%
                  fi
                  tableofcontents[currentsection,currentsubsection]
                  endframe%


                  setcountersecnumdepth2

                  begindocument

                  sectionrecap
                  subsectionwhat do we want

                  beginframewhat do we want
                  beginitemize
                  item we want it all
                  enditemize
                  endframe

                  setbeamertemplatebackground canvas%
                  ~hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]example-image-duck


                  LabelSubSecsym
                  subsection[problem when you can zip]problem when you can zip

                  beamertemplateshadingbackgroundblue!01!whitewhite

                  beginframe
                  frametitlezipping solves everything
                  Lorem ipsum
                  endframe

                  subsection1234

                  beginframe
                  frametitleconclusion
                  beginitemize
                  item headache ahead
                  item<2-> Bonus points for those who spotted the mistake on slide~refsym
                  enditemize
                  endframe

                  enddocument





                  share|improve this answer














                  Add a command with which you can choose to label the next subsection added with AtBeginSubsection to your code:



                  documentclassbeamer
                  usepackagegraphicx

                  newififLabelSubSec
                  newcommandLabelSubSec[1]
                  %
                  globalLabelSubSectrue
                  gdefSubSecLabel#1%


                  AtBeginSubsection
                  %
                  beginframe<beamer>
                  ifLabelSubSec
                  globalLabelSubSecfalse
                  labelSubSecLabel%
                  fi
                  tableofcontents[currentsection,currentsubsection]
                  endframe%


                  setcountersecnumdepth2

                  begindocument

                  sectionrecap
                  subsectionwhat do we want

                  beginframewhat do we want
                  beginitemize
                  item we want it all
                  enditemize
                  endframe

                  setbeamertemplatebackground canvas%
                  ~hspace.8textwidthincludegraphics[width=.2paperwidth,height=paperheight]example-image-duck


                  LabelSubSecsym
                  subsection[problem when you can zip]problem when you can zip

                  beamertemplateshadingbackgroundblue!01!whitewhite

                  beginframe
                  frametitlezipping solves everything
                  Lorem ipsum
                  endframe

                  subsection1234

                  beginframe
                  frametitleconclusion
                  beginitemize
                  item headache ahead
                  item<2-> Bonus points for those who spotted the mistake on slide~refsym
                  enditemize
                  endframe

                  enddocument






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 2 hours ago

























                  answered 2 hours ago









                  Skillmon

                  18k11636




                  18k11636



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f452005%2fadd-a-label-to-a-atbeginsection-slide%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Comments

                      Popular posts from this blog

                      Long meetings (6-7 hours a day): Being “babysat” by supervisor

                      Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

                      Confectionery