3

I wish my long thesis could have an automatic ''table of conclusions'' where all key findings are listed with links to where they appear.

Does anything like this exist in LaTeX? Imagine:

 \finding[The answer was 42.]{42 was the answer to the great question.}

Table of Conclusions

Chap 1:

The answer was 42. . . . . . p. 10

  • 4
    Do these \findings have a number associated with them? If not, what should happen when you have no findings in Chapter 2, but findings in both Chapter 1 and 3? Should one just not print Chap 2:? – Werner Jan 10 '16 at 07:46
  • A great package would allow skipping chapters, numbering, and ordering by appearance or some importance metric. – Jonathan Abbott Jan 10 '16 at 16:58
  • 3
    A great user would supply the community with minimal working example (MWE) that we can use as a playground so we don't have to create something from scratch. – Werner Jan 10 '16 at 18:19
  • 1
    @JonathanAbbott: You're invited by heart to provide such a package and upload to CTAN such that anybody can gain benefit of it... –  Jan 10 '16 at 18:50

1 Answers1

3

The request is quite straight forward for easy setups, using tocloft and its \newlistof command.

The \findings command is similar to \chapter etc. The starred version does just print the finding text (3rd. argument), without number,the optional argument is used for the List of Conclusions and the 3rd one is the always displayed one.

\documentclass{book}

\usepackage{xparse}
\usepackage{tocloft}

\newcommand{\listfindingsname}{List of conclusions}

\newlistof[chapter]{findings}{fin}{\listfindingsname}


\NewDocumentCommand{\findings}{so+m}{%
  \IfBooleanTF{#1}{%
    {\bfseries #3}%
  }{%
    \refstepcounter{findings}%
    {\bfseries\thefindings\ #3}%
    \IfValueTF{#2}{%
      \addcontentsline{fin}{findings}{\protect\numberline{\thefindings~}#2}%
    }{%
      \addcontentsline{fin}{findings}{\protect\numberline{\thefindings~}#3}%
    }%
  }%
}

\usepackage{hyperref}
\begin{document}
\tableofcontents
\listoffindings

\chapter{What should a new user do on TeX.SX}

\findings{He shall provide a MWE}

\chapter{Why should he provide a MWE}

\findings[To ease the work of users here]{To ease the work of users here in order to find some solution and not have to do wild guesses about the request}

\chapter{What do we do with users not providing a MWE}

\findings*{We post a simple solution and keep the better one for us ;-)}


\end{document}

enter image description here