# Tag Info

15

You can temporally disable the \clearpage (and/or \cleardoublepage) command which generates the page break at the beginning of the second \listof... command: \listoffigures \begingroup \let\clearpage\relax \listoftables \endgroup You might need to manually adjust the spacing before the second headline. However without a minimal example that shows your ...

14


13


13

If I understand your requirements correctly, the following simple code will do (feel free to change the lengths and settings according to your needs): \documentclass{article} \usepackage{titletoc} \usepackage{lipsum} \titlecontents{section} [0cm]{\raggedleft\parshape 1 1cm \dimexpr\linewidth-3cm\relax} ...

12


11

tocloft provides \cftsetpnumwidth{<len>} which sets the value of \@pnumwidth to <len>, so you could just execute \cftsetpnumwidth{3em}% 3em width for page numbers after loading tocloft (see 2.3 Typesetting the entries, p 8 of the tocloft documentation):

10

The width of \hbox{$\mkern10000mu.\mkern10000mu$} is 16003.67247pt when the font used by LaTeX is at 14.4pt; when you ask for 17.28pt size, the box becomes 19204.52904pt wide, which is more than \maxdimen and so everything goes awry. Notice that \fontsize{18}{18}\selectfont (the \selectfont is implicitly done when the formula begins) chooses, with the ...

10


10

You can try the following: \documentclass{book} \usepackage[svgnames]{xcolor} \newcounter{chapcntr} \setcounter{chapcntr}{-1} \newcommand*\toccolor{% \ifcase\value{chapcntr}% \color{red}%----- 0 -- \or \color{blue}%---- 1 -- \or \color{green}%--- 2 -- \or \color{cyan}%---- 3 -- \else \color{black}%-- default \fi} ...

9

I figured it out by using: \setlength{\cftbeforetoctitleskip}{-3em} Which didn't work before since I forgot to change Z to toc: \cftbeforeZtitleskip to \cftbeforetoctitleskip I believe Z can be changed to other things, other than 'toc'

9

Some packages and macros check whether \chapter is defined or not in order to take some action; for example, to typeset the bibliography as a chapter (book and report classes) or as a section (article class). The test they perform is based on \@ifundefined, something like \@ifundefined{chapter} {\section*{\refname}} {\chapter*{\bibname}} It's ...

8

Here are some broad-stroke suggestions: Rather use the following order/code to include your appendix: \clearpage \phantomsection \addcontentsline{toc}{chapter}{Appendices} \include{JaccardCode} It will ensure correct hyper-referencing from the bookmarks panel in your PDF viewer. \phantomsection is provided by hyperref. A similar approach should be used ...

8

The following table (taken from the tocloft documentation) lists the standard values for the indent and numwidth: You can use \cftsetindents to control the indent and numwidth values for the entries; the syntax is \cftsetindents{<entry>}{<indent>}{<numwidth>} To include the paragraphs, you will have to change the counters tocdepth ...

8

There's really no need to define a new command for the chapter in the appendices section; just before the appendices you can redefine the \@chapter command (defined in report.cls), to include the appendices in the new list instead of including them in the ToC; here's an example of such a redefinition; note that the second mandatory argument of \newlistof ...

8

See "7.4. Partial lists" in titletoc package, it may be what you want. And I guess minitoc may also solve this problem itself. I'm not sure. For user-defined floats, I could only hack into titletoc. Luckily, it's not very difficult. And I think this feature should be added into titletoc. \documentclass{article} \usepackage{float,titletoc} ...

8

amsart and tocloft are not compatible. You can either use another document class or, if you want to continue using amsart, you'll need to redefine \l@section, \l@subsection, and \l@subsubsection, \tocsection, \tocsubsection, and \tocsubsubsection; something along these lines: \documentclass[11pt]{amsart} \makeatletter ...

8

Loading tocloft with the titles option (see p.7 of the manual for details) is a good start. As there also seems to be an incompatibility between the \tableofcontents definition of the standard classes and fncychap, I use an unnumbered \contentsname chapter plus a "bare" ToC. \documentclass{book} \usepackage[Glenn]{fncychap} \usepackage[titles]{tocloft} ...

7

book defines the ToC-related sectioning commands as follows: \newcommand*\l@chapter[2]{% \ifnum \c@tocdepth >\m@ne \addpenalty{-\@highpenalty}% \vskip 1.0em \@plus\p@ \setlength\@tempdima{1.5em}% \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth \leavevmode \bfseries ...

7

At the start of the appendix, a redefinition of \cftchappresnum must be forwarded to the .toc file. I have appended the definition of \appendix to do so. \documentclass{book} \usepackage{tocloft,calc} \renewcommand{\cftchappresnum}{\chaptername\space} \setlength{\cftchapnumwidth}{\widthof{\textbf{Appendix~999~}}} \makeatletter \g@addto@macro\appendix{% ...

7


7

The package tocloft supports this indirect. However this modification allows all settings by tocloft \documentclass{book} \usepackage{tocloft} \makeatletter \renewcommand{\numberline}[1]{% \setbox0\hbox{#1\quad}% \hb@xt@\wd0{\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb} \makeatother \begin{document} \tableofcontents \chapter{foo} \section{bar} ...

7

In simple cases like this one it actually is a one-liner to call a macro for each element of a comma-separated list: \forcsvlist{\cftpagenumbersoff}{subsection,section} is all you need. The \forcsvlist{<handler>}{<csv list>} command is provided by the etoolbox package. It takes as first argument a handler, which has to be a macro (or sequence of ...

7


7

In this specific example, you need to remove the spurious space contained in your \addcontentsline definition: \addcontentsline{toc}{section} {% <------ Required \numberline{Problem 4.}Let $T$ be a tree with $n > 1$ nodes. What is the maximum number of degrees one vertex $T$ can have? What his the minimum number of degree one vertex $T$ can ...

7

Here's one possibility which enables you to use all of tocloft features for subfigure entries when using the subcaption package; in particular, you can suppress the page numbers and the leaders (the dots from the entry to the page number): \documentclass{article} \usepackage[list=true]{subcaption} \usepackage{tocloft} \setcounter{lofdepth}{2} ...

6

The right way to do it should be to use \addtocontents{toc}{\cftpagenumbersoff{chapter}} instead of \cftpagenumbersoff{chapter} and \addtocontents{toc}{\cftpagenumberson{chapter}} instead of \cftpagenumberson{chapter} In fact, the following MWE \documentclass[twoside]{book} \usepackage[utf8]{inputenc} \usepackage[T2A]{fontenc} ...

6

The label information is all in the aux file, so you can extract it something like this: \documentclass{article} \usepackage{hyperref} \long\def\findlabel#1#2\findlabel{% \ifx\newlabel#1\lablist\expandafter{\the\lablist\showlabel#2}\fi} %hyerref has 4 felds in each label culd use them but don't here \def\showlabel#1#2{% \par \noindent Label: ...

6


6

You had the right idea, but you need to add your changes to the TOC itself rather than in the main document (and because of this you need to \protect some of the commands.) Note that this solution won't look very nice if your appendices have sections. \documentclass{report} \usepackage{tocloft} \begin{document} \tableofcontents \chapter{A chapter} ...

6

The default behaviour in report with or without tocloft is to add a vertical space of 10pt in the ToC, LoF and LoT whenever you use \chapter. If you use \chapter* for a similar chapter look-and-feel but no numbering, no entry is written to the ToC and this space is dropped. There are many ways to insert this "missing" gap, the easiest of which would just be ...

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