Manually creating a basic beamer toc












3














For some applications, e.g. Links in mindmap as table of contents in beamer the default beamer table of contents is not flexible enough



How to manually recreate a basic beamer toc as starting point for crazy things?










share|improve this question



























    3














    For some applications, e.g. Links in mindmap as table of contents in beamer the default beamer table of contents is not flexible enough



    How to manually recreate a basic beamer toc as starting point for crazy things?










    share|improve this question

























      3












      3








      3







      For some applications, e.g. Links in mindmap as table of contents in beamer the default beamer table of contents is not flexible enough



      How to manually recreate a basic beamer toc as starting point for crazy things?










      share|improve this question













      For some applications, e.g. Links in mindmap as table of contents in beamer the default beamer table of contents is not flexible enough



      How to manually recreate a basic beamer toc as starting point for crazy things?







      beamer table-of-contents






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 12 '18 at 14:47









      samcarter

      85.8k794275




      85.8k794275






















          1 Answer
          1






          active

          oldest

          votes


















          3














          The following code produces a rudimentary toc with much less functionality than the origional beamer toc, but it really just meant as a starting point for more complicate things that would not be possible with the default toc.



          documentclass{beamer}

          usepackage{tikz}

          setbeamercolor{subsection in toc}{fg=black}

          % total number of sections %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          usepackage{totcount}
          newcounter{totalsection}
          regtotcounter{totalsection}
          AtBeginDocument{%
          pretocmd{section}{refstepcounter{totalsection}}{}{}%
          }%

          % number of subsections per section %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          usepackage{xcntperchap}
          RegisterCounters{section}{subsection}
          newcounter{totalsubsection}
          setcounter{totalsubsection}{0}

          % creating automatic label %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
          % based on https://tex.stackexchange.com/a/386557/36296
          AtBeginSection{label{sec:thesection}}
          AtBeginSubsection{label{subsec:thesection:thesubsection}}
          newcounter{currentsub}
          newcounter{totsection}

          % custom toc
          newcommand{mytoc}{%
          begingroup%
          usebeamerfont{section in toc}%
          usebeamercolor[fg]{section in toc}%
          setcounter{totsection}{numbertotvalue{totalsection}}%
          foreach i in {1,...,thetotsection}{%
          hyperlink{sec:thesection}{nameref{sec:i}}%
          setcounter{currentsub}{ObtainTrackedValueExp[i]{section}{subsection}}%
          par%
          begingroup
          usebeamerfont{subsection in toc}%
          usebeamercolor[fg]{subsection in toc}%
          ifnumthecurrentsub>0%
          foreach j in {1,...,thecurrentsub}{%
          hspace{1cm}hyperlink{subsec:i:j}{nameref{subsec:i:j}}%
          par%
          }%
          fi%
          endgroup
          vfill
          }% loop over i
          endgroup
          }

          title{Some Title}

          begin{document}

          begin{frame}
          mytoc
          end{frame}

          section{Section 1}
          subsection{Subsection 1a}
          frame{}
          subsection{Subsection 1b}
          frame{}
          subsection{Subsection 1c}
          frame{}

          section{Section 2}
          frame{}

          section{Section 3}
          subsection{Subsection 3a}
          frame{}
          subsection{Subsection 3b}
          frame{}
          subsection{Subsection 3c}
          frame{}

          end{document}


          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',
            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%2f464532%2fmanually-creating-a-basic-beamer-toc%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









            3














            The following code produces a rudimentary toc with much less functionality than the origional beamer toc, but it really just meant as a starting point for more complicate things that would not be possible with the default toc.



            documentclass{beamer}

            usepackage{tikz}

            setbeamercolor{subsection in toc}{fg=black}

            % total number of sections %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
            usepackage{totcount}
            newcounter{totalsection}
            regtotcounter{totalsection}
            AtBeginDocument{%
            pretocmd{section}{refstepcounter{totalsection}}{}{}%
            }%

            % number of subsections per section %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
            usepackage{xcntperchap}
            RegisterCounters{section}{subsection}
            newcounter{totalsubsection}
            setcounter{totalsubsection}{0}

            % creating automatic label %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
            % based on https://tex.stackexchange.com/a/386557/36296
            AtBeginSection{label{sec:thesection}}
            AtBeginSubsection{label{subsec:thesection:thesubsection}}
            newcounter{currentsub}
            newcounter{totsection}

            % custom toc
            newcommand{mytoc}{%
            begingroup%
            usebeamerfont{section in toc}%
            usebeamercolor[fg]{section in toc}%
            setcounter{totsection}{numbertotvalue{totalsection}}%
            foreach i in {1,...,thetotsection}{%
            hyperlink{sec:thesection}{nameref{sec:i}}%
            setcounter{currentsub}{ObtainTrackedValueExp[i]{section}{subsection}}%
            par%
            begingroup
            usebeamerfont{subsection in toc}%
            usebeamercolor[fg]{subsection in toc}%
            ifnumthecurrentsub>0%
            foreach j in {1,...,thecurrentsub}{%
            hspace{1cm}hyperlink{subsec:i:j}{nameref{subsec:i:j}}%
            par%
            }%
            fi%
            endgroup
            vfill
            }% loop over i
            endgroup
            }

            title{Some Title}

            begin{document}

            begin{frame}
            mytoc
            end{frame}

            section{Section 1}
            subsection{Subsection 1a}
            frame{}
            subsection{Subsection 1b}
            frame{}
            subsection{Subsection 1c}
            frame{}

            section{Section 2}
            frame{}

            section{Section 3}
            subsection{Subsection 3a}
            frame{}
            subsection{Subsection 3b}
            frame{}
            subsection{Subsection 3c}
            frame{}

            end{document}


            enter image description here






            share|improve this answer




























              3














              The following code produces a rudimentary toc with much less functionality than the origional beamer toc, but it really just meant as a starting point for more complicate things that would not be possible with the default toc.



              documentclass{beamer}

              usepackage{tikz}

              setbeamercolor{subsection in toc}{fg=black}

              % total number of sections %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
              usepackage{totcount}
              newcounter{totalsection}
              regtotcounter{totalsection}
              AtBeginDocument{%
              pretocmd{section}{refstepcounter{totalsection}}{}{}%
              }%

              % number of subsections per section %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
              usepackage{xcntperchap}
              RegisterCounters{section}{subsection}
              newcounter{totalsubsection}
              setcounter{totalsubsection}{0}

              % creating automatic label %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
              % based on https://tex.stackexchange.com/a/386557/36296
              AtBeginSection{label{sec:thesection}}
              AtBeginSubsection{label{subsec:thesection:thesubsection}}
              newcounter{currentsub}
              newcounter{totsection}

              % custom toc
              newcommand{mytoc}{%
              begingroup%
              usebeamerfont{section in toc}%
              usebeamercolor[fg]{section in toc}%
              setcounter{totsection}{numbertotvalue{totalsection}}%
              foreach i in {1,...,thetotsection}{%
              hyperlink{sec:thesection}{nameref{sec:i}}%
              setcounter{currentsub}{ObtainTrackedValueExp[i]{section}{subsection}}%
              par%
              begingroup
              usebeamerfont{subsection in toc}%
              usebeamercolor[fg]{subsection in toc}%
              ifnumthecurrentsub>0%
              foreach j in {1,...,thecurrentsub}{%
              hspace{1cm}hyperlink{subsec:i:j}{nameref{subsec:i:j}}%
              par%
              }%
              fi%
              endgroup
              vfill
              }% loop over i
              endgroup
              }

              title{Some Title}

              begin{document}

              begin{frame}
              mytoc
              end{frame}

              section{Section 1}
              subsection{Subsection 1a}
              frame{}
              subsection{Subsection 1b}
              frame{}
              subsection{Subsection 1c}
              frame{}

              section{Section 2}
              frame{}

              section{Section 3}
              subsection{Subsection 3a}
              frame{}
              subsection{Subsection 3b}
              frame{}
              subsection{Subsection 3c}
              frame{}

              end{document}


              enter image description here






              share|improve this answer


























                3












                3








                3






                The following code produces a rudimentary toc with much less functionality than the origional beamer toc, but it really just meant as a starting point for more complicate things that would not be possible with the default toc.



                documentclass{beamer}

                usepackage{tikz}

                setbeamercolor{subsection in toc}{fg=black}

                % total number of sections %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                usepackage{totcount}
                newcounter{totalsection}
                regtotcounter{totalsection}
                AtBeginDocument{%
                pretocmd{section}{refstepcounter{totalsection}}{}{}%
                }%

                % number of subsections per section %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                usepackage{xcntperchap}
                RegisterCounters{section}{subsection}
                newcounter{totalsubsection}
                setcounter{totalsubsection}{0}

                % creating automatic label %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                % based on https://tex.stackexchange.com/a/386557/36296
                AtBeginSection{label{sec:thesection}}
                AtBeginSubsection{label{subsec:thesection:thesubsection}}
                newcounter{currentsub}
                newcounter{totsection}

                % custom toc
                newcommand{mytoc}{%
                begingroup%
                usebeamerfont{section in toc}%
                usebeamercolor[fg]{section in toc}%
                setcounter{totsection}{numbertotvalue{totalsection}}%
                foreach i in {1,...,thetotsection}{%
                hyperlink{sec:thesection}{nameref{sec:i}}%
                setcounter{currentsub}{ObtainTrackedValueExp[i]{section}{subsection}}%
                par%
                begingroup
                usebeamerfont{subsection in toc}%
                usebeamercolor[fg]{subsection in toc}%
                ifnumthecurrentsub>0%
                foreach j in {1,...,thecurrentsub}{%
                hspace{1cm}hyperlink{subsec:i:j}{nameref{subsec:i:j}}%
                par%
                }%
                fi%
                endgroup
                vfill
                }% loop over i
                endgroup
                }

                title{Some Title}

                begin{document}

                begin{frame}
                mytoc
                end{frame}

                section{Section 1}
                subsection{Subsection 1a}
                frame{}
                subsection{Subsection 1b}
                frame{}
                subsection{Subsection 1c}
                frame{}

                section{Section 2}
                frame{}

                section{Section 3}
                subsection{Subsection 3a}
                frame{}
                subsection{Subsection 3b}
                frame{}
                subsection{Subsection 3c}
                frame{}

                end{document}


                enter image description here






                share|improve this answer














                The following code produces a rudimentary toc with much less functionality than the origional beamer toc, but it really just meant as a starting point for more complicate things that would not be possible with the default toc.



                documentclass{beamer}

                usepackage{tikz}

                setbeamercolor{subsection in toc}{fg=black}

                % total number of sections %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                usepackage{totcount}
                newcounter{totalsection}
                regtotcounter{totalsection}
                AtBeginDocument{%
                pretocmd{section}{refstepcounter{totalsection}}{}{}%
                }%

                % number of subsections per section %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                usepackage{xcntperchap}
                RegisterCounters{section}{subsection}
                newcounter{totalsubsection}
                setcounter{totalsubsection}{0}

                % creating automatic label %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                % based on https://tex.stackexchange.com/a/386557/36296
                AtBeginSection{label{sec:thesection}}
                AtBeginSubsection{label{subsec:thesection:thesubsection}}
                newcounter{currentsub}
                newcounter{totsection}

                % custom toc
                newcommand{mytoc}{%
                begingroup%
                usebeamerfont{section in toc}%
                usebeamercolor[fg]{section in toc}%
                setcounter{totsection}{numbertotvalue{totalsection}}%
                foreach i in {1,...,thetotsection}{%
                hyperlink{sec:thesection}{nameref{sec:i}}%
                setcounter{currentsub}{ObtainTrackedValueExp[i]{section}{subsection}}%
                par%
                begingroup
                usebeamerfont{subsection in toc}%
                usebeamercolor[fg]{subsection in toc}%
                ifnumthecurrentsub>0%
                foreach j in {1,...,thecurrentsub}{%
                hspace{1cm}hyperlink{subsec:i:j}{nameref{subsec:i:j}}%
                par%
                }%
                fi%
                endgroup
                vfill
                }% loop over i
                endgroup
                }

                title{Some Title}

                begin{document}

                begin{frame}
                mytoc
                end{frame}

                section{Section 1}
                subsection{Subsection 1a}
                frame{}
                subsection{Subsection 1b}
                frame{}
                subsection{Subsection 1c}
                frame{}

                section{Section 2}
                frame{}

                section{Section 3}
                subsection{Subsection 3a}
                frame{}
                subsection{Subsection 3b}
                frame{}
                subsection{Subsection 3c}
                frame{}

                end{document}


                enter image description here







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Dec 12 '18 at 16:14

























                answered Dec 12 '18 at 14:47









                samcarter

                85.8k794275




                85.8k794275






























                    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.





                    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%2f464532%2fmanually-creating-a-basic-beamer-toc%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

                    Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

                    ComboBox Display Member on multiple fields

                    Is it possible to collect Nectar points via Trainline?