5

I'm creating a problem bank and each problem is named using a list (e.g., \item Parametric particle trajectory). I'd like to auto-generate a list of problem names from this list and I;d like that list to appear at the beginning of the document. Is there anyway to get LaTeX to do this?

I could create a new environment if that's necessary; I'm just not sure how to proceed.

6

You could use \addcontentsline{}{}{} to add this to the table of contents:

enter image description here

Using the hyperref package make these click able links.

Code:

\documentclass{book}
\usepackage{lipsum}
\usepackage{hyperref}

\newcommand*{\Item}[1][]{%
    \item \textbf{#1}%
    \addcontentsline{toc}{section}{#1}
}%

\begin{document}
\tableofcontents
\chapter{Questions}
\begin{enumerate}
\Item[Parametric particle trajectory]
    \lipsum[1]
\Item[Non-parametric particle trajectory]
    \lipsum[1]
\end{enumerate}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy