Automatic theorem list












2














In my need of writing a list of theorems I wrote the following code:



documentclass[b5paper, twoside, 12pt]{memoir}
% packages
usepackage{amsmath, amsthm, fancyhdr, geometry, hyperref, palatino, titlesec, titletoc}
usepackage[italian]{babel}
usepackage[applemac]{inputenc}
usepackage{lipsum}
newcommand{ospace}[1]{makebox[#1]{}}
% theorem environment definition
newtheoremstyle{mytheorem}{0pt}{10pt}{itshape}{}{scshape}{~--~}{0pt}{}
theoremstyle{mytheorem}
newtheorem{mythm}{hypertarget{thmthesection.themythm}{Theorem}}[section]
renewcommand{themythm}{arabic{mythm}}
newenvironment{thm}[1]{newpagebegin{mythm}#1}{end{mythm}}
numberwithin{equation}{mythm}
counterwithout{equation}{section}
% proof environment definition
makeatletter
renewenvironment{proof}{pushQED{qed}trivlistitem[hskiplabelseptextsc{Dim.}]mbox{}vspace{5pt}\*}{popQED}
makeatother
begin{document}
chapter{Chapter name}
section{Section name}
% list of theorems
textsc{Theorem 1} (Theorem 1 name (optional)) -- hyperlink{thmthesection.1}{itshape{Theorem 1 thesis.}}
vspace{0.5cm}

ospace{-0.6cm}textsc{Theorem 2} (Theorem 2 name (optional)) -- hyperlink{thmthesection.2}{itshape{Theorem 2 thesis.}}

begin{thm}[Theorem 1 name (optional)]
Theorem 1 thesis.
end{thm}

begin{proof}
Theorem 1 proof.
end{proof}

begin{thm}[Theorem 2 name (optional)]
Theorem 2 thesis.
end{thm}

begin{proof}
Theorem 2 proof.
end{proof}
end{document}


And it works fine, but it could be better. What I would like it to do is everytime I add a theorem it should automatically add it to the list at the beginning of the section, without me having to manually copy and paste it. It would also have to keep track of theorem numbering, that is if I already wrote two theorems (lets call them Th_1 and Th_2) and I decide to add a third theorem between the two, then the list should update accordingly (Th_1 stays Th_1, the new theorem becomes Th_2 and Th_2 goes to Th_3).



If this wasn't tricky enough, I would also want the theorems in the list to have clickable links to the actual theorems, like they have in the code above.



I don't know if I've been clear enough in my explanation, if you have any doubt feel free to ask.










share|improve this question
























  • Your explanation is a bit confusing but I think using labels would help with referencing your theorems without having problems manually changing the numbering of the theorems.
    – user1527152
    Dec 13 '18 at 16:15
















2














In my need of writing a list of theorems I wrote the following code:



documentclass[b5paper, twoside, 12pt]{memoir}
% packages
usepackage{amsmath, amsthm, fancyhdr, geometry, hyperref, palatino, titlesec, titletoc}
usepackage[italian]{babel}
usepackage[applemac]{inputenc}
usepackage{lipsum}
newcommand{ospace}[1]{makebox[#1]{}}
% theorem environment definition
newtheoremstyle{mytheorem}{0pt}{10pt}{itshape}{}{scshape}{~--~}{0pt}{}
theoremstyle{mytheorem}
newtheorem{mythm}{hypertarget{thmthesection.themythm}{Theorem}}[section]
renewcommand{themythm}{arabic{mythm}}
newenvironment{thm}[1]{newpagebegin{mythm}#1}{end{mythm}}
numberwithin{equation}{mythm}
counterwithout{equation}{section}
% proof environment definition
makeatletter
renewenvironment{proof}{pushQED{qed}trivlistitem[hskiplabelseptextsc{Dim.}]mbox{}vspace{5pt}\*}{popQED}
makeatother
begin{document}
chapter{Chapter name}
section{Section name}
% list of theorems
textsc{Theorem 1} (Theorem 1 name (optional)) -- hyperlink{thmthesection.1}{itshape{Theorem 1 thesis.}}
vspace{0.5cm}

ospace{-0.6cm}textsc{Theorem 2} (Theorem 2 name (optional)) -- hyperlink{thmthesection.2}{itshape{Theorem 2 thesis.}}

begin{thm}[Theorem 1 name (optional)]
Theorem 1 thesis.
end{thm}

begin{proof}
Theorem 1 proof.
end{proof}

begin{thm}[Theorem 2 name (optional)]
Theorem 2 thesis.
end{thm}

begin{proof}
Theorem 2 proof.
end{proof}
end{document}


And it works fine, but it could be better. What I would like it to do is everytime I add a theorem it should automatically add it to the list at the beginning of the section, without me having to manually copy and paste it. It would also have to keep track of theorem numbering, that is if I already wrote two theorems (lets call them Th_1 and Th_2) and I decide to add a third theorem between the two, then the list should update accordingly (Th_1 stays Th_1, the new theorem becomes Th_2 and Th_2 goes to Th_3).



If this wasn't tricky enough, I would also want the theorems in the list to have clickable links to the actual theorems, like they have in the code above.



I don't know if I've been clear enough in my explanation, if you have any doubt feel free to ask.










share|improve this question
























  • Your explanation is a bit confusing but I think using labels would help with referencing your theorems without having problems manually changing the numbering of the theorems.
    – user1527152
    Dec 13 '18 at 16:15














2












2








2







In my need of writing a list of theorems I wrote the following code:



documentclass[b5paper, twoside, 12pt]{memoir}
% packages
usepackage{amsmath, amsthm, fancyhdr, geometry, hyperref, palatino, titlesec, titletoc}
usepackage[italian]{babel}
usepackage[applemac]{inputenc}
usepackage{lipsum}
newcommand{ospace}[1]{makebox[#1]{}}
% theorem environment definition
newtheoremstyle{mytheorem}{0pt}{10pt}{itshape}{}{scshape}{~--~}{0pt}{}
theoremstyle{mytheorem}
newtheorem{mythm}{hypertarget{thmthesection.themythm}{Theorem}}[section]
renewcommand{themythm}{arabic{mythm}}
newenvironment{thm}[1]{newpagebegin{mythm}#1}{end{mythm}}
numberwithin{equation}{mythm}
counterwithout{equation}{section}
% proof environment definition
makeatletter
renewenvironment{proof}{pushQED{qed}trivlistitem[hskiplabelseptextsc{Dim.}]mbox{}vspace{5pt}\*}{popQED}
makeatother
begin{document}
chapter{Chapter name}
section{Section name}
% list of theorems
textsc{Theorem 1} (Theorem 1 name (optional)) -- hyperlink{thmthesection.1}{itshape{Theorem 1 thesis.}}
vspace{0.5cm}

ospace{-0.6cm}textsc{Theorem 2} (Theorem 2 name (optional)) -- hyperlink{thmthesection.2}{itshape{Theorem 2 thesis.}}

begin{thm}[Theorem 1 name (optional)]
Theorem 1 thesis.
end{thm}

begin{proof}
Theorem 1 proof.
end{proof}

begin{thm}[Theorem 2 name (optional)]
Theorem 2 thesis.
end{thm}

begin{proof}
Theorem 2 proof.
end{proof}
end{document}


And it works fine, but it could be better. What I would like it to do is everytime I add a theorem it should automatically add it to the list at the beginning of the section, without me having to manually copy and paste it. It would also have to keep track of theorem numbering, that is if I already wrote two theorems (lets call them Th_1 and Th_2) and I decide to add a third theorem between the two, then the list should update accordingly (Th_1 stays Th_1, the new theorem becomes Th_2 and Th_2 goes to Th_3).



If this wasn't tricky enough, I would also want the theorems in the list to have clickable links to the actual theorems, like they have in the code above.



I don't know if I've been clear enough in my explanation, if you have any doubt feel free to ask.










share|improve this question















In my need of writing a list of theorems I wrote the following code:



documentclass[b5paper, twoside, 12pt]{memoir}
% packages
usepackage{amsmath, amsthm, fancyhdr, geometry, hyperref, palatino, titlesec, titletoc}
usepackage[italian]{babel}
usepackage[applemac]{inputenc}
usepackage{lipsum}
newcommand{ospace}[1]{makebox[#1]{}}
% theorem environment definition
newtheoremstyle{mytheorem}{0pt}{10pt}{itshape}{}{scshape}{~--~}{0pt}{}
theoremstyle{mytheorem}
newtheorem{mythm}{hypertarget{thmthesection.themythm}{Theorem}}[section]
renewcommand{themythm}{arabic{mythm}}
newenvironment{thm}[1]{newpagebegin{mythm}#1}{end{mythm}}
numberwithin{equation}{mythm}
counterwithout{equation}{section}
% proof environment definition
makeatletter
renewenvironment{proof}{pushQED{qed}trivlistitem[hskiplabelseptextsc{Dim.}]mbox{}vspace{5pt}\*}{popQED}
makeatother
begin{document}
chapter{Chapter name}
section{Section name}
% list of theorems
textsc{Theorem 1} (Theorem 1 name (optional)) -- hyperlink{thmthesection.1}{itshape{Theorem 1 thesis.}}
vspace{0.5cm}

ospace{-0.6cm}textsc{Theorem 2} (Theorem 2 name (optional)) -- hyperlink{thmthesection.2}{itshape{Theorem 2 thesis.}}

begin{thm}[Theorem 1 name (optional)]
Theorem 1 thesis.
end{thm}

begin{proof}
Theorem 1 proof.
end{proof}

begin{thm}[Theorem 2 name (optional)]
Theorem 2 thesis.
end{thm}

begin{proof}
Theorem 2 proof.
end{proof}
end{document}


And it works fine, but it could be better. What I would like it to do is everytime I add a theorem it should automatically add it to the list at the beginning of the section, without me having to manually copy and paste it. It would also have to keep track of theorem numbering, that is if I already wrote two theorems (lets call them Th_1 and Th_2) and I decide to add a third theorem between the two, then the list should update accordingly (Th_1 stays Th_1, the new theorem becomes Th_2 and Th_2 goes to Th_3).



If this wasn't tricky enough, I would also want the theorems in the list to have clickable links to the actual theorems, like they have in the code above.



I don't know if I've been clear enough in my explanation, if you have any doubt feel free to ask.







lists theorems amsthm






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 13 '18 at 15:46









nidhin

3,342927




3,342927










asked Dec 13 '18 at 15:29









Riccardo Mazzarini

404




404












  • Your explanation is a bit confusing but I think using labels would help with referencing your theorems without having problems manually changing the numbering of the theorems.
    – user1527152
    Dec 13 '18 at 16:15


















  • Your explanation is a bit confusing but I think using labels would help with referencing your theorems without having problems manually changing the numbering of the theorems.
    – user1527152
    Dec 13 '18 at 16:15
















Your explanation is a bit confusing but I think using labels would help with referencing your theorems without having problems manually changing the numbering of the theorems.
– user1527152
Dec 13 '18 at 16:15




Your explanation is a bit confusing but I think using labels would help with referencing your theorems without having problems manually changing the numbering of the theorems.
– user1527152
Dec 13 '18 at 16:15










1 Answer
1






active

oldest

votes


















1














The thmtools package has a listoftheorems command that produces a "table of contents" style list of the theorems.
It can be customised in many ways, see the manual, section 1.5.






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%2f464723%2fautomatic-theorem-list%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









    1














    The thmtools package has a listoftheorems command that produces a "table of contents" style list of the theorems.
    It can be customised in many ways, see the manual, section 1.5.






    share|improve this answer


























      1














      The thmtools package has a listoftheorems command that produces a "table of contents" style list of the theorems.
      It can be customised in many ways, see the manual, section 1.5.






      share|improve this answer
























        1












        1








        1






        The thmtools package has a listoftheorems command that produces a "table of contents" style list of the theorems.
        It can be customised in many ways, see the manual, section 1.5.






        share|improve this answer












        The thmtools package has a listoftheorems command that produces a "table of contents" style list of the theorems.
        It can be customised in many ways, see the manual, section 1.5.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 13 '18 at 18:13









        Bordaigorl

        11.9k2556




        11.9k2556






























            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%2f464723%2fautomatic-theorem-list%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 change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents