Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
anurag1fundoo
Posts: 8 Joined: Thu Oct 13, 2011 2:23 am
Post
by anurag1fundoo » Sat Jan 21, 2012 11:45 pm
Hi,
I am trying to modify my table of contents to produce Bold face heading for section (or chapter heading) headings but not for subsection headings. Also, I want to introduce dots after each subsection heading till the page number to the right. Now, following is my preamble which generates dotted lines but not the boldface chapter or section headings which I want. Instead it generates everything in same font with dots. Could anyone please help me with this ? thanks.
Code: Select all
\documentclass[letterpaper,11pt]{article}
\usepackage{graphicx,subfigure}
\usepackage{amssymb}
\usepackage{enumerate}
\usepackage{upgreek}
\usepackage{float}
\usepackage[bf]{caption}
\usepackage{fullpage}
\usepackage{verbatim}
\usepackage{cite}
\usepackage{tocstyle}
\usepackage{microtype}
\renewcommand{\contentsname}{Table of Contents}
\setlength{\parskip}{1ex}
\parindent 0in
Last edited by
Stefan Kottwitz on Sun Jan 22, 2012 12:01 am, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.
Stefan Kottwitz
Site Admin
Posts: 10345 Joined: Mon Mar 10, 2008 9:44 pm
Post
by Stefan Kottwitz » Sun Jan 22, 2012 12:06 am
Hi,
if you don't load tocstyle, by removing this line
you would get bold section entries and dots for the subsection entries.
Stefan
LaTeX.org admin
anurag1fundoo
Posts: 8 Joined: Thu Oct 13, 2011 2:23 am
Post
by anurag1fundoo » Sun Jan 22, 2012 1:36 am
If I don't load tocstyle package then I get this error.
! Undefined control sequence.
l.3 \tocstyle@set@width
{unum}{toc}{}{19.46669pt}
?
Stefan Kottwitz
Site Admin
Posts: 10345 Joined: Mon Mar 10, 2008 9:44 pm
Post
by Stefan Kottwitz » Sun Jan 22, 2012 1:43 am
Compile another time, this should be caused by the .toc file which would be overwritten if you finished the first compiler run.
Or delete the .toc file, and compile again, two times.
Stefan
LaTeX.org admin
anurag1fundoo
Posts: 8 Joined: Thu Oct 13, 2011 2:23 am
Post
by anurag1fundoo » Sun Jan 22, 2012 2:15 am
Did the compilation but each time it gives the same error.
I also deleted the .toc file and tried compiling it. still same problem.
Stefan Kottwitz
Site Admin
Posts: 10345 Joined: Mon Mar 10, 2008 9:44 pm
Post
by Stefan Kottwitz » Sun Jan 22, 2012 3:07 am
Then remove the .aux file too, as there can still be the old tocstyle commands, and compile.
Stefan
LaTeX.org admin
anurag1fundoo
Posts: 8 Joined: Thu Oct 13, 2011 2:23 am
Post
by anurag1fundoo » Mon Jan 23, 2012 6:49 pm
I don't know how to close this post or let the users know that this post has already been taken care of. I request the moderators to please mark this post as read to benefit other users.
Stefan Kottwitz
Site Admin
Posts: 10345 Joined: Mon Mar 10, 2008 9:44 pm
Post
by Stefan Kottwitz » Mon Jan 23, 2012 6:55 pm
Hi,
nice to see that you take care of proper marking as solved! This helps us to see the still open questions.
You almost made it the right way, choosing the checkmark as topic icon - but it's the icon of the first post, the question, which matters.
Just edit your first post in this thread (the question) and choose the checkmark symbol as topic icon.
Thanks!
Stefan
LaTeX.org admin