Tag Info

6

The problem is in the way that you redefine \@chapter, which is incompatible with hyperref. You can see this immediately if you comment out the line loading hyperref, just before \begin{document}. The hyperref package plays a lot with everything containing references; lines in the table of contents are just one such thing. It achieves this by redefining ...

4

This is actually due to an incorrect use of your timing in setting the \pagestyle. Since the ToC is set under the front page style, and the main document should be processed under main, you should use \chapter{Logical foundation} \pagestyle{main} rather than the other way around. That is, you chapter is first set (the heading; this actually includes a ...

3

The question is still unclear to me, but I understood it this way: Add a bookmark to the ToC Don't add a ToC entry in the ToC itself. This can be achieved, for example, bu manually adding the bookmark with a dest=toc::label (or use a different name.). Use \hypertarget{toc::label}{} with an empty anchor just before \tableofcontents* will define the ...

2

You have disabled the entries in the table of contents by using the star form of the \section command. Remove the star and specify that sections should not be numbered via counter secnumdepth. Also level chapter is not available for class article. Example: \documentclass[a4paper, 12pt]{article} \setcounter{secnumdepth}{0} \begin{document} ...

2

My possible solution uses the tocloft facilities to generate a \listof... for the enums and items counters (autodefined by \newlistof). In addition, \xapptocmd from xpatch writes the \listofenums and \listofitems entries by using \addcontentsline. There is one backdraw so far: It's not possible to define a title for the \listof... entry. ...

2

Instead of trying to get the expanded authorlist in the toc, you could pass only the cite key and then call the database again in the toc: \documentclass{memoir} \usepackage{databib} \newcommand\printauthorlist{} \DeclareRobustCommand\printauthorlist[1]{% \DTLforeachbibentry[\DTLbibfieldiseq{CiteKey}{#1}]{data}{\DTLformatauthorlist}} \begin{document} ...

2

In your preamble, try the command \setcounter{tocdepth}{0} Note that the answer to this question explains what number to use in the command argument if you want to change the depth displayed in the table of contents later.

2

The easiest way is to use tocloft: \documentclass[a4paper]{book} \usepackage[titles]{tocloft} \setcounter{tocdepth}{0} \setlength{\cftbeforechapskip}{0pt} \begin{document} \tableofcontents \chapter{One} \section{Aaaaa} \section{Bbbbb} \chapter{Two} \section{Ccccc} \section{Ddddd} \section{Eeeee} \chapter{Three} \section{Fffff} \section{Ggggg} ...

1

I think the following source code gives the results that you want: \documentclass{beamer} \usetheme{Luebeck} \setbeamercovered{transparent} \usepackage{totcount} % Get the last number of a counter \regtotcounter{section} \usepackage{etoolbox} \makeatletter \patchcmd{\beamer@sectionintoc}{\vskip1.5em}{\vskip0.5em}{}{} \makeatother \AtBeginSection{% \frame{% ...

1

The \DTLformatauthorlist seems to be meant just for printing immediately the current author list. I propose to get its definition and convert it to another macro with an argument, which we extract from the database in expandable form with \DTLbibfieldlet. The same macro should be used for the title and the temporary macros should be expanded (once) ...

1

I've never done this with lists, but I've done it with drafts of textbooks in order to provide easy links from exercises to their answers in the back of the book. For me, I used the newfile package, which allowed me to essentially duplicate the TOC, LOT, and LOF mechanisms for exercises. For each exercise, I printed the exercise itself on the current page, ...

1

\documentclass{article} \usepackage{tabularx} \makeatletter \newcommand*{\tocdotfill}{% \leaders\hbox{% $\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$% }\hfill\kern\z@ } \makeatother \begin{document} \noindent \begin{tabularx}{\linewidth}{lXr} A & Hello world \dotfill & 1\\ B & Foobar \tocdotfill & 2\\ \end{tabularx} ...

1

Since no example is given, I just loaded the mathptmx package for Times font and redefined the apparent class default \sfdefault to be \rmdefault. \documentclass{abntex2} \usepackage{blindtext} \usepackage{mathptmx} \renewcommand{\sfdefault}{\rmdefault} % No serif fonts, use roman (times) \begin{document} \tableofcontents \section{First section} ...

1

This should work, but could require some adjustment according to settings made by the class you are using. \documentclass{report} \usepackage{chngcntr} \usepackage{listings} \AtBeginDocument{% the counter is defined later \counterwithout{lstlisting}{chapter}% } \makeatletter \renewcommand{\l@lstlisting}[2]{% ...

1

There is simpler solution to your problem with the chapternumbering. The listings package provides the \lstset command to configure the output. The numberbychapter=false option does exactly whats advertised. The Code: \documentclass{scrbook} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{xcolor} ...

1

Is this what you were looking for? Note: the last line doesn't fit inside \textwidth. \documentclass[11pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[frenchb]{babel} \usepackage[T1]{fontenc} \usepackage{tikz} \begin{document} \begin{figure} \includegraphics[width=\linewidth]{example-image-a} \caption{dummy figure} \end{figure} ...

1

I can only imagine that you want this, though in this case the title seems to be quite short. \documentclass{scrreprt} \usepackage[T1]{fontenc} \usepackage[italian]{babel} \usepackage{arsclassica} \newcommand*{\Chapter}[2]{% \chapter[\textit{#2}]{#1}% \begingroup \raggedright\Large\itshape #2\par \endgroup \nobreak\vspace{\glueexpr \bigskipamount*3 ...

Only top voted, non community-wiki answers of a minimum length are eligible