Text Formattingaddtocontentsline question -short-

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Faust
Posts: 55
Joined: Thu Oct 29, 2009 12:45 pm

addtocontentsline question -short-

Post by Faust »

Ok, I'm using: \addcontentsline{toc}{section}{\numberline{}Curriculum Vitae}

cause, obviously, I have enclosed it. Now I want it to show in the ToC with the current sectionmark to (its section 3 of the appendix). How do I do that?
Last edited by Faust on Thu Nov 26, 2009 10:36 pm, edited 1 time in total.

Recommended reading 2024:

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

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

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

addtocontentsline question -short-

Post by gmedina »

Hi,

please, when posting a question provide all the relevant information needed. In your case, a skeleton of the relevant parts of your document (showing the document class used, packages related to the problem, relevant portions of the actual code, etc.) would be necessary.

Also, provide a brief, clear and as precisely as possible description of your problem.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Faust
Posts: 55
Joined: Thu Oct 29, 2009 12:45 pm

Re: addtocontentsline question -short-

Post by Faust »

Alright, sorry.

It's a report, two-side. About 50 pages. But I just want to know what argument I should use with the \addtocontentsline command to get the chapternumber in the ToC aswell, not just the phrase 'curriculum vitae' and page number.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

addtocontentsline question -short-

Post by gmedina »

Perhaps I wasn't clear enough. When I wrote "a skeleton..." I meant something in the spirit of a minimal working example (MWE).

Without this MWE is really hard to provide effective help. For example, the following MWE behaves as desired (at least, from your description so far):

Code: Select all

\documentclass[twoside]{report}

\begin{document}
\tableofcontents

\appendix
\chapter{Appendix}
\section{First section of the Appendix}
\section{Second section of the Appendix}
\section{Curriculum Vitae}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Faust
Posts: 55
Joined: Thu Oct 29, 2009 12:45 pm

Re: addtocontentsline question -short-

Post by Faust »

Solved it, I used:

\addtocounter{section}{1}
\addcontentsline{toc}{section}{\numberline\thesection{Curriculum Vitae}}

Works like a charm.
Post Reply