Single Page table of contents

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












8















Is there a way to make a single page table of contents in this style



Introduction ..................................... 1
Next Point ....................................... 2


Without generating it form a LaTex-Document? I printed a bundle of scripts for programming classes that are not writting in latex but i want to have a clean table of contents with a custom of the pages.



Thank you.










share|improve this question






















  • Welcome to TeX.SE!

    – Mico
    Jan 24 at 0:33















8















Is there a way to make a single page table of contents in this style



Introduction ..................................... 1
Next Point ....................................... 2


Without generating it form a LaTex-Document? I printed a bundle of scripts for programming classes that are not writting in latex but i want to have a clean table of contents with a custom of the pages.



Thank you.










share|improve this question






















  • Welcome to TeX.SE!

    – Mico
    Jan 24 at 0:33













8












8








8


3






Is there a way to make a single page table of contents in this style



Introduction ..................................... 1
Next Point ....................................... 2


Without generating it form a LaTex-Document? I printed a bundle of scripts for programming classes that are not writting in latex but i want to have a clean table of contents with a custom of the pages.



Thank you.










share|improve this question














Is there a way to make a single page table of contents in this style



Introduction ..................................... 1
Next Point ....................................... 2


Without generating it form a LaTex-Document? I printed a bundle of scripts for programming classes that are not writting in latex but i want to have a clean table of contents with a custom of the pages.



Thank you.







table-of-contents






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 23 at 22:18









Florian PurshallFlorian Purshall

433




433












  • Welcome to TeX.SE!

    – Mico
    Jan 24 at 0:33

















  • Welcome to TeX.SE!

    – Mico
    Jan 24 at 0:33
















Welcome to TeX.SE!

– Mico
Jan 24 at 0:33





Welcome to TeX.SE!

– Mico
Jan 24 at 0:33










3 Answers
3






active

oldest

votes


















9














The lines of the table of contents are generated using contentsline.
You can also call this macro yourself to create a toc manually.
The general syntax is



contentsline<chapter/section/subsection/subsubsection><title><page>


and if you want these entries to be numbered you should insert numberline<section number> at the start of the second argument.
To use the chapter level heading you need to use a document class that supports it (like book or report).



Here is an example.
I'm numbering only half of the sections to illustrate how this works and what the result looks like.



documentclassarticle

begindocument

section*Table of contents

contentslinesectionIntroduction1
contentslinesubsectionFirst subsection1
contentslinesubsectionSecond subsection3
contentslinesubsectionThird subsection3

contentslinesectionnumberline2First real section5
contentslinesubsectionnumberline2.1First subsection5
contentslinesubsectionnumberline2.2Second subsection6
contentslinesubsectionnumberline2.3Third subsection8

enddocument


output



Here is a version that takes care of the section numbers automatically.



documentclassarticle

newcommand*tocsection[2]%
stepcountersection%
contentslinesectionnumberlinethesection#1#2%

newcommand*tocsubsection[2]%
stepcountersubsection%
contentslinesubsectionnumberlinethesubsection#1#2%


begindocument

section*Table of contents

tocsectionIntroduction1
tocsubsectionFirst subsection1
tocsubsectionSecond subsection3
tocsubsectionThird subsection3
tocsectionFirst real chapter5
tocsubsectionFirst subsection5
tocsubsectionSecond subsection6
tocsubsectionThird subsection8

enddocument


output



In a document class with actual chapters, tocchapter could be implemented in the same way.




If you need to customise the appearance of the toc you can use either titletoc or tocloft.



For instance, if you don't want the to be in boldface and you want them to come with (the dots), you could add the following to your preamble:



usepackagetocloft
renewcommandcftsecfontnormalfont
renewcommandcftsecpagefontnormalfont
renewcommandcftsecleadercftdotfillcftdotsep


If you only use section level headings, this would match the appearance described in your question.




Remark: contentsline takes an additional argument if hyperref is loaded (the target for the hyperlink).
If someone reading this wants to incorporate the above in a document that uses hyperref, you should add an additional after <page>.






share|improve this answer

























  • How would you adapt this solution to the OP's apparent objective of listing a bunch of unnumbered entries in the ToC?

    – Mico
    Jan 24 at 0:36











  • @Mico: I should've considered that. By leaving out numberline… is the answer.

    – Circumscribe
    Jan 24 at 0:44






  • 1





    @mico: see modified answer ↑↑.

    – Circumscribe
    Jan 24 at 1:09


















6














You asked,




Is there a way to make a single page table of contents ... [w]ithout generating it [from] a LaTex-Document?




I assume that by "without generating it from a LaTeX document", you mean "without creating a LaTeX document prefaced by a tableofcontents directive". Since you posted your query to this site, I'm also assuming that you are not actually averse to creating this table of contents via a documentclass ... begindocument ... enddocument structure, i.e., via a LaTeX document.



If these assumptions are correct, the following solution may be of interest to you.



enter image description here



documentclassarticle
usepackagetocloft %% used only for 'cftsubsecleader' macro
begindocument

setlengthparindent0pt
obeylines
textbfTable of Contents
smallskip
Introduction cftsubsecleader 1
Next Point cftsubsecleader 2
enddocument





share|improve this answer






























    6














    If you want make manually a ToC just as LaTeX does, it has been already answered, but the question is a duplicate of How to make Table of Contents manually.



    If you want just the example as you posted, it could be using tocloft as Mico showed, or as simple as:



    documentclassarticle
    begindocument
    section*Table of Contents
    setlengthparindent0pt
    Introduction dotfill 1par
    Next Point dotfill 2par
    enddocument


    The dotted line of dotfill is more dense that those of a normal ToC, but you can construct your own dotted line. The below example is a macro with a more sparse dots (bonus: a "WYSIWYG" odd syntax).



    documentclassarticle
    deftoc#1...#2 noindent#1leadershbox to 1emhss.hsshfill#2par
    begindocument
    section*Table of Contents
    toc Introduction...1
    toc Next Point...22
    toc Last Point...312
    enddocument


    mwe



    Of course, if you prefer a more orthodox syntax (e.g. tocIntroduction1) simply define the macro with newcommandtoc[2]... or deftoc#1#2....






    share|improve this answer

























    • Perhaps my solution is a little elaborate for the intended application, and I probably should have found that question…

      – Circumscribe
      Jan 24 at 13:57










    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%2f471569%2fsingle-page-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









    9














    The lines of the table of contents are generated using contentsline.
    You can also call this macro yourself to create a toc manually.
    The general syntax is



    contentsline<chapter/section/subsection/subsubsection><title><page>


    and if you want these entries to be numbered you should insert numberline<section number> at the start of the second argument.
    To use the chapter level heading you need to use a document class that supports it (like book or report).



    Here is an example.
    I'm numbering only half of the sections to illustrate how this works and what the result looks like.



    documentclassarticle

    begindocument

    section*Table of contents

    contentslinesectionIntroduction1
    contentslinesubsectionFirst subsection1
    contentslinesubsectionSecond subsection3
    contentslinesubsectionThird subsection3

    contentslinesectionnumberline2First real section5
    contentslinesubsectionnumberline2.1First subsection5
    contentslinesubsectionnumberline2.2Second subsection6
    contentslinesubsectionnumberline2.3Third subsection8

    enddocument


    output



    Here is a version that takes care of the section numbers automatically.



    documentclassarticle

    newcommand*tocsection[2]%
    stepcountersection%
    contentslinesectionnumberlinethesection#1#2%

    newcommand*tocsubsection[2]%
    stepcountersubsection%
    contentslinesubsectionnumberlinethesubsection#1#2%


    begindocument

    section*Table of contents

    tocsectionIntroduction1
    tocsubsectionFirst subsection1
    tocsubsectionSecond subsection3
    tocsubsectionThird subsection3
    tocsectionFirst real chapter5
    tocsubsectionFirst subsection5
    tocsubsectionSecond subsection6
    tocsubsectionThird subsection8

    enddocument


    output



    In a document class with actual chapters, tocchapter could be implemented in the same way.




    If you need to customise the appearance of the toc you can use either titletoc or tocloft.



    For instance, if you don't want the to be in boldface and you want them to come with (the dots), you could add the following to your preamble:



    usepackagetocloft
    renewcommandcftsecfontnormalfont
    renewcommandcftsecpagefontnormalfont
    renewcommandcftsecleadercftdotfillcftdotsep


    If you only use section level headings, this would match the appearance described in your question.




    Remark: contentsline takes an additional argument if hyperref is loaded (the target for the hyperlink).
    If someone reading this wants to incorporate the above in a document that uses hyperref, you should add an additional after <page>.






    share|improve this answer

























    • How would you adapt this solution to the OP's apparent objective of listing a bunch of unnumbered entries in the ToC?

      – Mico
      Jan 24 at 0:36











    • @Mico: I should've considered that. By leaving out numberline… is the answer.

      – Circumscribe
      Jan 24 at 0:44






    • 1





      @mico: see modified answer ↑↑.

      – Circumscribe
      Jan 24 at 1:09















    9














    The lines of the table of contents are generated using contentsline.
    You can also call this macro yourself to create a toc manually.
    The general syntax is



    contentsline<chapter/section/subsection/subsubsection><title><page>


    and if you want these entries to be numbered you should insert numberline<section number> at the start of the second argument.
    To use the chapter level heading you need to use a document class that supports it (like book or report).



    Here is an example.
    I'm numbering only half of the sections to illustrate how this works and what the result looks like.



    documentclassarticle

    begindocument

    section*Table of contents

    contentslinesectionIntroduction1
    contentslinesubsectionFirst subsection1
    contentslinesubsectionSecond subsection3
    contentslinesubsectionThird subsection3

    contentslinesectionnumberline2First real section5
    contentslinesubsectionnumberline2.1First subsection5
    contentslinesubsectionnumberline2.2Second subsection6
    contentslinesubsectionnumberline2.3Third subsection8

    enddocument


    output



    Here is a version that takes care of the section numbers automatically.



    documentclassarticle

    newcommand*tocsection[2]%
    stepcountersection%
    contentslinesectionnumberlinethesection#1#2%

    newcommand*tocsubsection[2]%
    stepcountersubsection%
    contentslinesubsectionnumberlinethesubsection#1#2%


    begindocument

    section*Table of contents

    tocsectionIntroduction1
    tocsubsectionFirst subsection1
    tocsubsectionSecond subsection3
    tocsubsectionThird subsection3
    tocsectionFirst real chapter5
    tocsubsectionFirst subsection5
    tocsubsectionSecond subsection6
    tocsubsectionThird subsection8

    enddocument


    output



    In a document class with actual chapters, tocchapter could be implemented in the same way.




    If you need to customise the appearance of the toc you can use either titletoc or tocloft.



    For instance, if you don't want the to be in boldface and you want them to come with (the dots), you could add the following to your preamble:



    usepackagetocloft
    renewcommandcftsecfontnormalfont
    renewcommandcftsecpagefontnormalfont
    renewcommandcftsecleadercftdotfillcftdotsep


    If you only use section level headings, this would match the appearance described in your question.




    Remark: contentsline takes an additional argument if hyperref is loaded (the target for the hyperlink).
    If someone reading this wants to incorporate the above in a document that uses hyperref, you should add an additional after <page>.






    share|improve this answer

























    • How would you adapt this solution to the OP's apparent objective of listing a bunch of unnumbered entries in the ToC?

      – Mico
      Jan 24 at 0:36











    • @Mico: I should've considered that. By leaving out numberline… is the answer.

      – Circumscribe
      Jan 24 at 0:44






    • 1





      @mico: see modified answer ↑↑.

      – Circumscribe
      Jan 24 at 1:09













    9












    9








    9







    The lines of the table of contents are generated using contentsline.
    You can also call this macro yourself to create a toc manually.
    The general syntax is



    contentsline<chapter/section/subsection/subsubsection><title><page>


    and if you want these entries to be numbered you should insert numberline<section number> at the start of the second argument.
    To use the chapter level heading you need to use a document class that supports it (like book or report).



    Here is an example.
    I'm numbering only half of the sections to illustrate how this works and what the result looks like.



    documentclassarticle

    begindocument

    section*Table of contents

    contentslinesectionIntroduction1
    contentslinesubsectionFirst subsection1
    contentslinesubsectionSecond subsection3
    contentslinesubsectionThird subsection3

    contentslinesectionnumberline2First real section5
    contentslinesubsectionnumberline2.1First subsection5
    contentslinesubsectionnumberline2.2Second subsection6
    contentslinesubsectionnumberline2.3Third subsection8

    enddocument


    output



    Here is a version that takes care of the section numbers automatically.



    documentclassarticle

    newcommand*tocsection[2]%
    stepcountersection%
    contentslinesectionnumberlinethesection#1#2%

    newcommand*tocsubsection[2]%
    stepcountersubsection%
    contentslinesubsectionnumberlinethesubsection#1#2%


    begindocument

    section*Table of contents

    tocsectionIntroduction1
    tocsubsectionFirst subsection1
    tocsubsectionSecond subsection3
    tocsubsectionThird subsection3
    tocsectionFirst real chapter5
    tocsubsectionFirst subsection5
    tocsubsectionSecond subsection6
    tocsubsectionThird subsection8

    enddocument


    output



    In a document class with actual chapters, tocchapter could be implemented in the same way.




    If you need to customise the appearance of the toc you can use either titletoc or tocloft.



    For instance, if you don't want the to be in boldface and you want them to come with (the dots), you could add the following to your preamble:



    usepackagetocloft
    renewcommandcftsecfontnormalfont
    renewcommandcftsecpagefontnormalfont
    renewcommandcftsecleadercftdotfillcftdotsep


    If you only use section level headings, this would match the appearance described in your question.




    Remark: contentsline takes an additional argument if hyperref is loaded (the target for the hyperlink).
    If someone reading this wants to incorporate the above in a document that uses hyperref, you should add an additional after <page>.






    share|improve this answer















    The lines of the table of contents are generated using contentsline.
    You can also call this macro yourself to create a toc manually.
    The general syntax is



    contentsline<chapter/section/subsection/subsubsection><title><page>


    and if you want these entries to be numbered you should insert numberline<section number> at the start of the second argument.
    To use the chapter level heading you need to use a document class that supports it (like book or report).



    Here is an example.
    I'm numbering only half of the sections to illustrate how this works and what the result looks like.



    documentclassarticle

    begindocument

    section*Table of contents

    contentslinesectionIntroduction1
    contentslinesubsectionFirst subsection1
    contentslinesubsectionSecond subsection3
    contentslinesubsectionThird subsection3

    contentslinesectionnumberline2First real section5
    contentslinesubsectionnumberline2.1First subsection5
    contentslinesubsectionnumberline2.2Second subsection6
    contentslinesubsectionnumberline2.3Third subsection8

    enddocument


    output



    Here is a version that takes care of the section numbers automatically.



    documentclassarticle

    newcommand*tocsection[2]%
    stepcountersection%
    contentslinesectionnumberlinethesection#1#2%

    newcommand*tocsubsection[2]%
    stepcountersubsection%
    contentslinesubsectionnumberlinethesubsection#1#2%


    begindocument

    section*Table of contents

    tocsectionIntroduction1
    tocsubsectionFirst subsection1
    tocsubsectionSecond subsection3
    tocsubsectionThird subsection3
    tocsectionFirst real chapter5
    tocsubsectionFirst subsection5
    tocsubsectionSecond subsection6
    tocsubsectionThird subsection8

    enddocument


    output



    In a document class with actual chapters, tocchapter could be implemented in the same way.




    If you need to customise the appearance of the toc you can use either titletoc or tocloft.



    For instance, if you don't want the to be in boldface and you want them to come with (the dots), you could add the following to your preamble:



    usepackagetocloft
    renewcommandcftsecfontnormalfont
    renewcommandcftsecpagefontnormalfont
    renewcommandcftsecleadercftdotfillcftdotsep


    If you only use section level headings, this would match the appearance described in your question.




    Remark: contentsline takes an additional argument if hyperref is loaded (the target for the hyperlink).
    If someone reading this wants to incorporate the above in a document that uses hyperref, you should add an additional after <page>.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Jan 24 at 1:39

























    answered Jan 23 at 22:42









    CircumscribeCircumscribe

    6,5112938




    6,5112938












    • How would you adapt this solution to the OP's apparent objective of listing a bunch of unnumbered entries in the ToC?

      – Mico
      Jan 24 at 0:36











    • @Mico: I should've considered that. By leaving out numberline… is the answer.

      – Circumscribe
      Jan 24 at 0:44






    • 1





      @mico: see modified answer ↑↑.

      – Circumscribe
      Jan 24 at 1:09

















    • How would you adapt this solution to the OP's apparent objective of listing a bunch of unnumbered entries in the ToC?

      – Mico
      Jan 24 at 0:36











    • @Mico: I should've considered that. By leaving out numberline… is the answer.

      – Circumscribe
      Jan 24 at 0:44






    • 1





      @mico: see modified answer ↑↑.

      – Circumscribe
      Jan 24 at 1:09
















    How would you adapt this solution to the OP's apparent objective of listing a bunch of unnumbered entries in the ToC?

    – Mico
    Jan 24 at 0:36





    How would you adapt this solution to the OP's apparent objective of listing a bunch of unnumbered entries in the ToC?

    – Mico
    Jan 24 at 0:36













    @Mico: I should've considered that. By leaving out numberline… is the answer.

    – Circumscribe
    Jan 24 at 0:44





    @Mico: I should've considered that. By leaving out numberline… is the answer.

    – Circumscribe
    Jan 24 at 0:44




    1




    1





    @mico: see modified answer ↑↑.

    – Circumscribe
    Jan 24 at 1:09





    @mico: see modified answer ↑↑.

    – Circumscribe
    Jan 24 at 1:09











    6














    You asked,




    Is there a way to make a single page table of contents ... [w]ithout generating it [from] a LaTex-Document?




    I assume that by "without generating it from a LaTeX document", you mean "without creating a LaTeX document prefaced by a tableofcontents directive". Since you posted your query to this site, I'm also assuming that you are not actually averse to creating this table of contents via a documentclass ... begindocument ... enddocument structure, i.e., via a LaTeX document.



    If these assumptions are correct, the following solution may be of interest to you.



    enter image description here



    documentclassarticle
    usepackagetocloft %% used only for 'cftsubsecleader' macro
    begindocument

    setlengthparindent0pt
    obeylines
    textbfTable of Contents
    smallskip
    Introduction cftsubsecleader 1
    Next Point cftsubsecleader 2
    enddocument





    share|improve this answer



























      6














      You asked,




      Is there a way to make a single page table of contents ... [w]ithout generating it [from] a LaTex-Document?




      I assume that by "without generating it from a LaTeX document", you mean "without creating a LaTeX document prefaced by a tableofcontents directive". Since you posted your query to this site, I'm also assuming that you are not actually averse to creating this table of contents via a documentclass ... begindocument ... enddocument structure, i.e., via a LaTeX document.



      If these assumptions are correct, the following solution may be of interest to you.



      enter image description here



      documentclassarticle
      usepackagetocloft %% used only for 'cftsubsecleader' macro
      begindocument

      setlengthparindent0pt
      obeylines
      textbfTable of Contents
      smallskip
      Introduction cftsubsecleader 1
      Next Point cftsubsecleader 2
      enddocument





      share|improve this answer

























        6












        6








        6







        You asked,




        Is there a way to make a single page table of contents ... [w]ithout generating it [from] a LaTex-Document?




        I assume that by "without generating it from a LaTeX document", you mean "without creating a LaTeX document prefaced by a tableofcontents directive". Since you posted your query to this site, I'm also assuming that you are not actually averse to creating this table of contents via a documentclass ... begindocument ... enddocument structure, i.e., via a LaTeX document.



        If these assumptions are correct, the following solution may be of interest to you.



        enter image description here



        documentclassarticle
        usepackagetocloft %% used only for 'cftsubsecleader' macro
        begindocument

        setlengthparindent0pt
        obeylines
        textbfTable of Contents
        smallskip
        Introduction cftsubsecleader 1
        Next Point cftsubsecleader 2
        enddocument





        share|improve this answer













        You asked,




        Is there a way to make a single page table of contents ... [w]ithout generating it [from] a LaTex-Document?




        I assume that by "without generating it from a LaTeX document", you mean "without creating a LaTeX document prefaced by a tableofcontents directive". Since you posted your query to this site, I'm also assuming that you are not actually averse to creating this table of contents via a documentclass ... begindocument ... enddocument structure, i.e., via a LaTeX document.



        If these assumptions are correct, the following solution may be of interest to you.



        enter image description here



        documentclassarticle
        usepackagetocloft %% used only for 'cftsubsecleader' macro
        begindocument

        setlengthparindent0pt
        obeylines
        textbfTable of Contents
        smallskip
        Introduction cftsubsecleader 1
        Next Point cftsubsecleader 2
        enddocument






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 24 at 0:32









        MicoMico

        278k30380768




        278k30380768





















            6














            If you want make manually a ToC just as LaTeX does, it has been already answered, but the question is a duplicate of How to make Table of Contents manually.



            If you want just the example as you posted, it could be using tocloft as Mico showed, or as simple as:



            documentclassarticle
            begindocument
            section*Table of Contents
            setlengthparindent0pt
            Introduction dotfill 1par
            Next Point dotfill 2par
            enddocument


            The dotted line of dotfill is more dense that those of a normal ToC, but you can construct your own dotted line. The below example is a macro with a more sparse dots (bonus: a "WYSIWYG" odd syntax).



            documentclassarticle
            deftoc#1...#2 noindent#1leadershbox to 1emhss.hsshfill#2par
            begindocument
            section*Table of Contents
            toc Introduction...1
            toc Next Point...22
            toc Last Point...312
            enddocument


            mwe



            Of course, if you prefer a more orthodox syntax (e.g. tocIntroduction1) simply define the macro with newcommandtoc[2]... or deftoc#1#2....






            share|improve this answer

























            • Perhaps my solution is a little elaborate for the intended application, and I probably should have found that question…

              – Circumscribe
              Jan 24 at 13:57















            6














            If you want make manually a ToC just as LaTeX does, it has been already answered, but the question is a duplicate of How to make Table of Contents manually.



            If you want just the example as you posted, it could be using tocloft as Mico showed, or as simple as:



            documentclassarticle
            begindocument
            section*Table of Contents
            setlengthparindent0pt
            Introduction dotfill 1par
            Next Point dotfill 2par
            enddocument


            The dotted line of dotfill is more dense that those of a normal ToC, but you can construct your own dotted line. The below example is a macro with a more sparse dots (bonus: a "WYSIWYG" odd syntax).



            documentclassarticle
            deftoc#1...#2 noindent#1leadershbox to 1emhss.hsshfill#2par
            begindocument
            section*Table of Contents
            toc Introduction...1
            toc Next Point...22
            toc Last Point...312
            enddocument


            mwe



            Of course, if you prefer a more orthodox syntax (e.g. tocIntroduction1) simply define the macro with newcommandtoc[2]... or deftoc#1#2....






            share|improve this answer

























            • Perhaps my solution is a little elaborate for the intended application, and I probably should have found that question…

              – Circumscribe
              Jan 24 at 13:57













            6












            6








            6







            If you want make manually a ToC just as LaTeX does, it has been already answered, but the question is a duplicate of How to make Table of Contents manually.



            If you want just the example as you posted, it could be using tocloft as Mico showed, or as simple as:



            documentclassarticle
            begindocument
            section*Table of Contents
            setlengthparindent0pt
            Introduction dotfill 1par
            Next Point dotfill 2par
            enddocument


            The dotted line of dotfill is more dense that those of a normal ToC, but you can construct your own dotted line. The below example is a macro with a more sparse dots (bonus: a "WYSIWYG" odd syntax).



            documentclassarticle
            deftoc#1...#2 noindent#1leadershbox to 1emhss.hsshfill#2par
            begindocument
            section*Table of Contents
            toc Introduction...1
            toc Next Point...22
            toc Last Point...312
            enddocument


            mwe



            Of course, if you prefer a more orthodox syntax (e.g. tocIntroduction1) simply define the macro with newcommandtoc[2]... or deftoc#1#2....






            share|improve this answer















            If you want make manually a ToC just as LaTeX does, it has been already answered, but the question is a duplicate of How to make Table of Contents manually.



            If you want just the example as you posted, it could be using tocloft as Mico showed, or as simple as:



            documentclassarticle
            begindocument
            section*Table of Contents
            setlengthparindent0pt
            Introduction dotfill 1par
            Next Point dotfill 2par
            enddocument


            The dotted line of dotfill is more dense that those of a normal ToC, but you can construct your own dotted line. The below example is a macro with a more sparse dots (bonus: a "WYSIWYG" odd syntax).



            documentclassarticle
            deftoc#1...#2 noindent#1leadershbox to 1emhss.hsshfill#2par
            begindocument
            section*Table of Contents
            toc Introduction...1
            toc Next Point...22
            toc Last Point...312
            enddocument


            mwe



            Of course, if you prefer a more orthodox syntax (e.g. tocIntroduction1) simply define the macro with newcommandtoc[2]... or deftoc#1#2....







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 24 at 14:13

























            answered Jan 24 at 2:28









            FranFran

            52.4k6117178




            52.4k6117178












            • Perhaps my solution is a little elaborate for the intended application, and I probably should have found that question…

              – Circumscribe
              Jan 24 at 13:57

















            • Perhaps my solution is a little elaborate for the intended application, and I probably should have found that question…

              – Circumscribe
              Jan 24 at 13:57
















            Perhaps my solution is a little elaborate for the intended application, and I probably should have found that question…

            – Circumscribe
            Jan 24 at 13:57





            Perhaps my solution is a little elaborate for the intended application, and I probably should have found that question…

            – Circumscribe
            Jan 24 at 13:57

















            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%2f471569%2fsingle-page-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 to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?