Hyperlink only Section Number in Table of ContentsDisable hyperlinks in minitoc while the hyperlinks are enabled in ToCWrong page number in table of contentsIndex in table of contents without page numberHide section number but keep in table of contentsPage number resets on Table of ContentsText next to page number in table of contentsTable of Contents link to first section does not work correctlyHelp! Table of Contents - odd behaviorModifying Table of contents (TOC)Actual page number and Contents page number do not matchChange section numbering for appendix

Neighboring nodes in the network

Today is the Center

What reasons are there for a Capitalist to oppose a 100% inheritance tax?

What about the virus in 12 Monkeys?

What does it mean to describe someone as a butt steak?

How to take photos in burst mode, without vibration?

In Romance of the Three Kingdoms why do people still use bamboo sticks when papers are already invented?

Assassin's bullet with mercury

Alternative to sending password over mail?

Why is Collection not simply treated as Collection<?>

Why doesn't H₄O²⁺ exist?

A reference to a well-known characterization of scattered compact spaces

What exploit are these user agents trying to use?

Is it canonical bit space?

Can one be a co-translator of a book, if he does not know the language that the book is translated into?

Is the Joker left-handed?

Anagram holiday

How to draw the figure with four pentagons?

In a spin, are both wings stalled?

Doing something right before you need it - expression for this?

Is "remove commented out code" correct English?

I Accidentally Deleted a Stock Terminal Theme

Is there a hemisphere-neutral way of specifying a season?

Is it legal for company to use my work email to pretend I still work there?



Hyperlink only Section Number in Table of Contents


Disable hyperlinks in minitoc while the hyperlinks are enabled in ToCWrong page number in table of contentsIndex in table of contents without page numberHide section number but keep in table of contentsPage number resets on Table of ContentsText next to page number in table of contentsTable of Contents link to first section does not work correctlyHelp! Table of Contents - odd behaviorModifying Table of contents (TOC)Actual page number and Contents page number do not matchChange section numbering for appendix













1















I'm trying to get my table of contents to hyperlink only the section numbering and the page number, like this:



Table of contents example



But I've only managed to get the page number to link with



 linktocpage = true


can anyone help with getting the section numbering (but not the titles) hyperlinked as well? Thanks.










share|improve this question






















  • Part of the solution is given by tex.stackexchange.com/questions/145601/…

    – John Kormylo
    Sep 12 '15 at 22:53















1















I'm trying to get my table of contents to hyperlink only the section numbering and the page number, like this:



Table of contents example



But I've only managed to get the page number to link with



 linktocpage = true


can anyone help with getting the section numbering (but not the titles) hyperlinked as well? Thanks.










share|improve this question






















  • Part of the solution is given by tex.stackexchange.com/questions/145601/…

    – John Kormylo
    Sep 12 '15 at 22:53













1












1








1








I'm trying to get my table of contents to hyperlink only the section numbering and the page number, like this:



Table of contents example



But I've only managed to get the page number to link with



 linktocpage = true


can anyone help with getting the section numbering (but not the titles) hyperlinked as well? Thanks.










share|improve this question














I'm trying to get my table of contents to hyperlink only the section numbering and the page number, like this:



Table of contents example



But I've only managed to get the page number to link with



 linktocpage = true


can anyone help with getting the section numbering (but not the titles) hyperlinked as well? Thanks.







table-of-contents






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 12 '15 at 21:28









James McMillanJames McMillan

755




755












  • Part of the solution is given by tex.stackexchange.com/questions/145601/…

    – John Kormylo
    Sep 12 '15 at 22:53

















  • Part of the solution is given by tex.stackexchange.com/questions/145601/…

    – John Kormylo
    Sep 12 '15 at 22:53
















Part of the solution is given by tex.stackexchange.com/questions/145601/…

– John Kormylo
Sep 12 '15 at 22:53





Part of the solution is given by tex.stackexchange.com/questions/145601/…

– John Kormylo
Sep 12 '15 at 22:53










3 Answers
3






active

oldest

votes


















4














I couldn't figure out how to treat sections different than chapters, even though argument #1 contains either "chapter" or "section" (or
"part" or ...). String compares just weren't working. Let me know if you want the page numbers to be linked as well.



documentclassbook

letstdnumberlinenumberline
letstdcontentslinecontentsline
usepackagehyperref

begindocument
renewcommandcontentsline[4]%
bgroup
edefanchorname#4
defnumberline#1stdnumberlinehyperlinkanchorname#1
stdcontentsline#1#2#3
egroup

tableofcontents

chapterOne

sectionFirst section

sectionSecond section

enddocument





share|improve this answer
































    0














    Set up hyperref:



    usepackagehyperref
    hypersetuplinktoc = all


    Formulate every section, subsection, etc. to be included in the TOC as



    section[textcolorblackNAME]NAME


    To color your text this way you will need



    usepackagexcolor


    The text in the TOC will be visually indistinguishable from ordinary text, but will remain part of the link i.e. clickable. This is an utterly ridiculous hack as the option should be, but is not included in hyperref e.g.



    hypersetuplinktoc = numpage


    Dots (if included in the TOC) aren't part of the link in any case, with no obvious customization available. Hyperref has room for improvement.






    share|improve this answer
































      0














      has anyone figure this out? I'm searching all over the internet and nobody seems to have a solution





      share























        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%2f267274%2fhyperlink-only-section-number-in-table-of-contents%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        4














        I couldn't figure out how to treat sections different than chapters, even though argument #1 contains either "chapter" or "section" (or
        "part" or ...). String compares just weren't working. Let me know if you want the page numbers to be linked as well.



        documentclassbook

        letstdnumberlinenumberline
        letstdcontentslinecontentsline
        usepackagehyperref

        begindocument
        renewcommandcontentsline[4]%
        bgroup
        edefanchorname#4
        defnumberline#1stdnumberlinehyperlinkanchorname#1
        stdcontentsline#1#2#3
        egroup

        tableofcontents

        chapterOne

        sectionFirst section

        sectionSecond section

        enddocument





        share|improve this answer





























          4














          I couldn't figure out how to treat sections different than chapters, even though argument #1 contains either "chapter" or "section" (or
          "part" or ...). String compares just weren't working. Let me know if you want the page numbers to be linked as well.



          documentclassbook

          letstdnumberlinenumberline
          letstdcontentslinecontentsline
          usepackagehyperref

          begindocument
          renewcommandcontentsline[4]%
          bgroup
          edefanchorname#4
          defnumberline#1stdnumberlinehyperlinkanchorname#1
          stdcontentsline#1#2#3
          egroup

          tableofcontents

          chapterOne

          sectionFirst section

          sectionSecond section

          enddocument





          share|improve this answer



























            4












            4








            4







            I couldn't figure out how to treat sections different than chapters, even though argument #1 contains either "chapter" or "section" (or
            "part" or ...). String compares just weren't working. Let me know if you want the page numbers to be linked as well.



            documentclassbook

            letstdnumberlinenumberline
            letstdcontentslinecontentsline
            usepackagehyperref

            begindocument
            renewcommandcontentsline[4]%
            bgroup
            edefanchorname#4
            defnumberline#1stdnumberlinehyperlinkanchorname#1
            stdcontentsline#1#2#3
            egroup

            tableofcontents

            chapterOne

            sectionFirst section

            sectionSecond section

            enddocument





            share|improve this answer















            I couldn't figure out how to treat sections different than chapters, even though argument #1 contains either "chapter" or "section" (or
            "part" or ...). String compares just weren't working. Let me know if you want the page numbers to be linked as well.



            documentclassbook

            letstdnumberlinenumberline
            letstdcontentslinecontentsline
            usepackagehyperref

            begindocument
            renewcommandcontentsline[4]%
            bgroup
            edefanchorname#4
            defnumberline#1stdnumberlinehyperlinkanchorname#1
            stdcontentsline#1#2#3
            egroup

            tableofcontents

            chapterOne

            sectionFirst section

            sectionSecond section

            enddocument






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Sep 13 '15 at 0:36

























            answered Sep 13 '15 at 0:30









            John KormyloJohn Kormylo

            46.5k22672




            46.5k22672





















                0














                Set up hyperref:



                usepackagehyperref
                hypersetuplinktoc = all


                Formulate every section, subsection, etc. to be included in the TOC as



                section[textcolorblackNAME]NAME


                To color your text this way you will need



                usepackagexcolor


                The text in the TOC will be visually indistinguishable from ordinary text, but will remain part of the link i.e. clickable. This is an utterly ridiculous hack as the option should be, but is not included in hyperref e.g.



                hypersetuplinktoc = numpage


                Dots (if included in the TOC) aren't part of the link in any case, with no obvious customization available. Hyperref has room for improvement.






                share|improve this answer





























                  0














                  Set up hyperref:



                  usepackagehyperref
                  hypersetuplinktoc = all


                  Formulate every section, subsection, etc. to be included in the TOC as



                  section[textcolorblackNAME]NAME


                  To color your text this way you will need



                  usepackagexcolor


                  The text in the TOC will be visually indistinguishable from ordinary text, but will remain part of the link i.e. clickable. This is an utterly ridiculous hack as the option should be, but is not included in hyperref e.g.



                  hypersetuplinktoc = numpage


                  Dots (if included in the TOC) aren't part of the link in any case, with no obvious customization available. Hyperref has room for improvement.






                  share|improve this answer



























                    0












                    0








                    0







                    Set up hyperref:



                    usepackagehyperref
                    hypersetuplinktoc = all


                    Formulate every section, subsection, etc. to be included in the TOC as



                    section[textcolorblackNAME]NAME


                    To color your text this way you will need



                    usepackagexcolor


                    The text in the TOC will be visually indistinguishable from ordinary text, but will remain part of the link i.e. clickable. This is an utterly ridiculous hack as the option should be, but is not included in hyperref e.g.



                    hypersetuplinktoc = numpage


                    Dots (if included in the TOC) aren't part of the link in any case, with no obvious customization available. Hyperref has room for improvement.






                    share|improve this answer















                    Set up hyperref:



                    usepackagehyperref
                    hypersetuplinktoc = all


                    Formulate every section, subsection, etc. to be included in the TOC as



                    section[textcolorblackNAME]NAME


                    To color your text this way you will need



                    usepackagexcolor


                    The text in the TOC will be visually indistinguishable from ordinary text, but will remain part of the link i.e. clickable. This is an utterly ridiculous hack as the option should be, but is not included in hyperref e.g.



                    hypersetuplinktoc = numpage


                    Dots (if included in the TOC) aren't part of the link in any case, with no obvious customization available. Hyperref has room for improvement.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Jul 23 '17 at 20:48

























                    answered Jul 23 '17 at 20:41









                    user139780user139780

                    12




                    12





















                        0














                        has anyone figure this out? I'm searching all over the internet and nobody seems to have a solution





                        share



























                          0














                          has anyone figure this out? I'm searching all over the internet and nobody seems to have a solution





                          share

























                            0












                            0








                            0







                            has anyone figure this out? I'm searching all over the internet and nobody seems to have a solution





                            share













                            has anyone figure this out? I'm searching all over the internet and nobody seems to have a solution






                            share











                            share


                            share










                            answered 8 mins ago









                            EvanEvan

                            11




                            11



























                                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%2f267274%2fhyperlink-only-section-number-in-table-of-contents%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

                                How should I use the fbox command correctly to avoid producing a Bad Box message?How to put a long piece of text in a box?How to specify height and width of fboxIs there an arrayrulecolor-like command to change the rule color of fbox?What is the command to highlight bad boxes in pdf?Why does fbox sometimes place the box *over* the graphic image?how to put the text in the boxHow to create command for a box where text inside the box can automatically adjust?how can I make an fbox like command with certain color, shape and width of border?how to use fbox in align modeFbox increase the spacing between the box and it content (inner margin)how to change the box height of an equationWhat is the use of the hbox in a newcommand command?

                                Doxepinum Nexus interni Notae | Tabula navigationis3158DB01142WHOa682390"Structural Analysis of the Histamine H1 Receptor""Transdermal and Topical Drug Administration in the Treatment of Pain""Antidepressants as antipruritic agents: A review"

                                inputenc: Unicode character … not set up for use with LaTeX The Next CEO of Stack OverflowEntering Unicode characters in LaTeXHow to solve the `Package inputenc Error: Unicode char not set up for use with LaTeX` problem?solve “Unicode char is not set up for use with LaTeX” without special handling of every new interesting UTF-8 characterPackage inputenc Error: Unicode character ² (U+B2)(inputenc) not set up for use with LaTeX. acroI2C[I²C]package inputenc error unicode char (u + 190) not set up for use with latexPackage inputenc Error: Unicode char u8:′ not set up for use with LaTeX. 3′inputenc Error: Unicode char u8: not set up for use with LaTeX with G-BriefPackage Inputenc Error: Unicode char u8: not set up for use with LaTeXPackage inputenc Error: Unicode char ́ (U+301)(inputenc) not set up for use with LaTeX. includePackage inputenc Error: Unicode char ̂ (U+302)(inputenc) not set up for use with LaTeX. … $widehatleft (OA,AA' right )$Package inputenc Error: Unicode char â„¡ (U+2121)(inputenc) not set up for use with LaTeX. printbibliography[heading=bibintoc]Package inputenc Error: Unicode char − (U+2212)(inputenc) not set up for use with LaTeXPackage inputenc Error: Unicode character α (U+3B1) not set up for use with LaTeXPackage inputenc Error: Unicode characterError: ! Package inputenc Error: Unicode char ⊘ (U+2298)(inputenc) not set up for use with LaTeX