GeneralProblem with custom table of contents

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
MK2014
Posts: 2
Joined: Sun Nov 02, 2014 2:06 pm

Problem with custom table of contents

Post by MK2014 »

Hello, I have a problem. I have a custom list of definitions defined by commands

Code: Select all

\newcommand{\listdefinice}{Seznam definic}
\newlistof{defi}{def}{\listdefinice}
\newcommand{\defi}[1]{%
  \refstepcounter{definice}
  \underline{Definice \thedefinice.: (#1)}\par\noindent
  \addcontentsline{def}{defi}
  {\protect\numberline{\thedefinice} #1}\par
}
However, it is not working, it writes only "Seznam definic" and nothing more(i have 10 definitions in my file). What am I doing wrong?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Problem with custom table of contents

Post by Stefan Kottwitz »

Welcome to the forum!

Would it be possible for you to post a Infominimal working example, i.e. something that we can test and compile? It could be a reduced copy of the original document. So we could verify and provide specific help.

Stefan
LaTeX.org admin
MK2014
Posts: 2
Joined: Sun Nov 02, 2014 2:06 pm

Re: Problem with custom table of contents

Post by MK2014 »

I think I just figured out what was the problem. I think that the problem was, that since I am writing the document via writelatex.org and the command to add to list makes a temp file where it archives the list(or at least should from what I have understood from the documentation), it could not, because it does not have sufficient rights to do so on the server. I have solved it by adding the items to an existing table of contents and it worked.
Post Reply