Hot answers tagged

3

Two bugs in elsarticle. The first one is that it doesn't take into account that \numberline{Appendix A} will make an overfull box, as it doesn't fit in the allotted 1.5em space. The second one is related to babel. The class does \def\appendixname{Appendix }, but when babel is loaded, \appendixname will not have a trailing space. Fixes Tested with and ...


2

Something like this perhaps (The special table design is left to the O.P. -- it depends on personal tastes) I've defined a simple key-value interface that takes the relevant entries as values and typesets. Since all is set in a group and preset to be empty, the default values are all empty. I also added a .lob file to be generated, i.e. a list of ...


2

There are many ways to achieve this, one way which preserves the capability to click the links allows coloured links before the table of contents is to use { \hypersetup{hidelinks} \tableofcontents }. Pay attention to the curly brackets around the code, this puts the \hypersetup together with the table of contents inside a group, so it will not effect ...


2

\documentclass{book} \begin{document} \frontmatter \chapter{intro} something \chapter{acknowledgements} somebody \tableofcontents \mainmatter \chapter{start here} the real stuff \chapter{more stuff} \ldots \end{document}


2

You can patch the macro in tocbasic.sty: \documentclass[ dottedtoc, hidelinks, headinclude, footinclude=true, listof=totoc, bibliography=totoc ]{scrbook} \usepackage[pdfspacing, linedheaders]{classicthesis} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[babel, style=english]{csquotes} \usepackage{regexpatch} \makeatletter \...


2

The \contentsname is redefined by babel at the begin of the document, so \renewcommand\contentsname before \begin{document} is too early. Either push this after \begin{document} or use \AtBeginDocument{...} (as has been done here in the code) Another way: Use\addto\captionsbritish (since british is the language setting here!) \documentclass[a4paper,12pt]{...


2

Here is a solution. However to have part name in small caps and boldface, you need a font which has bold small caps. I used garamondx for this. \documentclass{report} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[showframe]{geometry} \usepackage[newparttoc]{titlesec} \usepackage{garamondx} \usepackage{titletoc} \usepackage{titleps} \...


2

Below is a very special use-case for your scenario. I'm sure it'll need more work if you're using hyperref or other ToC-related packages. The idea is to update the macro that sets every ToC-related entry to condition specifically on whether it's setting the LoF or the LoT. Here's what your typical .toc would look like: \contentsline {chapter}{List of ...


1

refcount allows you to extract page references in an expandable way. The following method uses the \label-\ref system to set a \label on the first page of the LoF/LoT and then add the entries to the ToC where they are needed, expanding the page number using \getpagerefnumber: \documentclass{book} \usepackage{refcount} \begin{document} \frontmatter \...


1

\documentclass{scrbook} \usepackage{etoolbox} \def\masterieslist{} \def\printmasteries{\appto\masterieslist{\end{enumerate}}\masterieslist} \let\originalchapter\chapter \def\chapter#1#{\chapteraux{#1}} \def\chapteraux#1#2{\originalchapter#1{#2}% \expandafter\ifstrempty\expandafter{\masterieslist} {\eappto\masterieslist{\par Lesson \arabic{chapter} -- ...


1

Like this? \documentclass{report} \usepackage[newparttoc]{titlesec} \usepackage{titletoc} \usepackage{titleps} \usepackage{stackengine} \usepackage{fmtcount} % For part number in written form \renewcommand{\thepart}{\Numberstring{part}} \titleclass{\part}{top} \titleformat{\part}[display]{\centering\normalfont\large}{\partname\hspace{4pt}\thepart}{0pt}{\...


1

David Carlisle had the right solution. \addtocounter{table}{-1} before the longtable and \refstepcounter{table}\label{mylabel} worked perfectly.


1

One of the (IMO) best ways to fix something like this is to make the space above \part and \chapter entries flexible, that usually solves the problem. Otherwise use the \addtocontents{toc}{\protect\newpage} \part{title} Not sure what you mean by "but I would prefer a solution, that avoid such a page break in the header" \setlength{\cftbeforepartskip}{2....



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