background preloader

LaTeX Document Structure

Facebook Twitter

How to add extra space to the table of contents, list of figures and tables | texblog. The tocloft package implements a number of commands to customize the table of contents, list of figures and list of tables. One of these commands provided by the package adds whitespace before entries. This is particularly neat for short documents, but might also improve the readability in longer content lists. However, it has its limitations and I will therefore introduce a more flexible approach allowing conditional addition of whitespace.

Lets assume we have the following chapters and sections in our thesis. Let’s add some whitespace between sections to spread the contents more evenly over the entire page. Frankly, it doesn’t look great. Much better, but now we get extra whitespace after “Introduction” because this chapter has no sections. The solution is to “conditionally” add whitespace depending on whether a chapter sections or not. We would like to have additional whitespace before the first section of a chapter. Before: After: And possibly lots of other cool stuff. Like this: Changing the table of contents indent of appendices • Page Layout. Re: Changing the table of contents indent of appendices by gmedina on Wed Mar 16th, 2011 Here's one possible solution, assuming that you are not using and will not use \paragraph.

Copy the code between the %%%%%%%%%%%%%%% lines in the preamble of your document: Code: Select all • Open in writeLaTeX \documentclass{article} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\newcounter{mysection}\renewcommand\themysection{\Alph{mysection}} % Writes the entry in the ToC with the required indentation\newcommand\ToToC[1]{% \addcontentsline{toc}{section} {\hspace*{4em}\appendixname~\themysection\hspace*{1em}#1}} \setcounter{secnumdepth}{4}\setcounter{tocdepth}{3}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\begin{document} \end{document} After the \appendix command, use the \mysection command instead of the standard \section command and immediately after, use the \ToToC command to include the entry in the Table of Contents. No space in table of contents • General. Ok, thank you! Edit: By the way, I tried putting in a new line for the sections, like so: Code: Select all • Open in writeLaTeX \makeatletter\renewcommand*\l@section{\@dottedtocline{1}{0em}{1.5em}}\renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.8em}}\renewcommand*\l@subsubsection{\@dottedtocline{3}{4.3em}{3.2em}}\makeatother But that removed the bold face from the sections.

Can I do that and still have bold face somehow? Also, if anyone knows a good place to start learning about .sty files and creating new commands and other advanced features of tex and latex---I would like to know about it. Table of contents - Question about indent lengths in ToC. Package titlesec. Using mdframed with multicol causes some sort of overflow. Positioning - Horizontal lines touching the multicol column separator rule. Color - Is it possible to define a multicolumn environment with a background colour. Header footer - fancyhdr equivalent in ConTeXt. Rules - How can I make a bold \hrule. Increasing nesting in sub headings with LaTeX. How to set \subsubsubsection in my document • General. The code in the first post does not work since all the subsubsubsection stuff should be in between the \makeatletter and \makeatother commands. By the way, the \bf command is obsolete and \subsubsubsectionmark is not needed, since no pagestyle contains that command (not at least the standard ones).

Before introducing a new sectioning command in an article, in my opinion, one should consider other alternatives: 1) Move to the book or report classes. The \chapter command provides a new level.2) Use \part.3) Try \paragraph.4) Reorganize the document. If finally one really needs a new numbered level behaving like \section and like, the simplest approach is to redefine \paragraph and increment the counters secnumdepth and tocdeph, as the following example shows: Code: Select all • Open in writeLaTeX \documentclass[a4paper]{article}\usepackage[english]{babel}\usepackage{blindtext} \stepcounter{secnumdepth}\stepcounter{tocdepth} \end{document}

How to Activate \subsubsubsection in LaTeX.