GeneralReferences appears TWICE in ToC???

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
scheydec
Posts: 9
Joined: Sat Oct 16, 2010 10:43 pm

References appears TWICE in ToC???

Post by scheydec »

Hi all,

I'm using TeXShop with BibTeX and apacite for the style to write a dissertation, and for some strange reason, "References" is appearing twice in my Table of Contents (with the same page number for each entry).

At the end of my main .tex document, I have

Code: Select all

 \bibliographystyle{apacite}
\bibliography{dissrefs,dissrefsfixes}
I'm using two files for the Bibliography because one is neatly generated by Zotero, but the other (dissrefsfixes) has to be manually edited for oddball citations. FYI, taking out the second item and making it just

Code: Select all

\bibliography{dissrefs}
doesn't help.

This is a .tex file and related .sty and .cls files that have been handed down in my department, so I didn't create it. I've just added a few bits here and there to make it suit my needs. But I _think_ I understand what everything does, and I've searched all over for anything that might be generating the second References entry in the ToC.

Here is the header of my document:

Code: Select all

\documentclass{myschooldiss}
\usepackage{url}   %this allows us to cite URLs in the text
\usepackage{graphicx}  %allows for graphic to float when doing jou or doc style
\usepackage{amssymb}  %use formatting tools  for math symbols
\raggedright
\parindent=2.2em
\usepackage{booktabs}             %% Nicely formatted tables
\heavyrulewidth=.05em             %% Set some rule widths for booktabs
\lightrulewidth=.02em
\cmidrulewidth=.01em
\usepackage{tabularx}
\newcolumntype{Y}{>{\raggedright\arraybackslash}X}
\usepackage{topcapt}              %% Be able to put captions above tables 
\usepackage{chngpage}             %% Be able to change margins on the fly for big tables
\usepackage{longtable}            %% For tables that go over sereral pages
\usepackage{apacite}              % Cite APA style
\usepackage[toc,page]{appendix}   % Better appendix          
\renewcommand{\appendixpagename}{Appendix}
\renewcommand{\appendixtocname}{Appendix}
\usepackage{enumitem}
\setenumerate{itemsep=0ex,parsep=0ex}
\setitemize{itemsep=0ex,parsep=0ex}
\usepackage{engord}    % For ordinals 1st 2nd etc, use {\engordnumber{1}}

\newcommand{\bibnodot}[1]{} % Now you can include \bibnodot in an
                            %% entry in the .bib file to prevent a period,
                            %% for example after the string ?''

\setcounter{secnumdepth}{0}     % Don't print section numbers

\title{My Title}

% Fill in here as appropriate.  Separate multiple names with \and  
\author{My Name}
\supervisor{My Advisor}
\gradchair{My Grad Chair}
%\committee{One Professor \and Another Professor}

% Change to \copyrightfalse if you DON'T want to generate a copyright page.
\copyrighttrue 
 \copyrightyear{2010}  % Defaults to the current year if undefined.

\department{My Department}


%%%%%%%%%%%%%%%%%%%  Now for the front matter %%%%%%%%%%%%%%%%%%%%%%%%%

% Front matter elements are required to appear in a specific order.  In this
% section you define the parts of your front matter, and the style will
% automatically put them in the proper order.


% Declare the sections that you use.  Only Abstract is obligatory.  
%
\abstractfile{Abstract}
\acknowledgementsfile{Acknow}
% \dedicationfile{dedication}
% ALTERNATELY, if you have a really short Dedication (no more than one
% paragraph) you can place it in the main file, with the command
% \dedication{...}, INSTEAD of using \dedicationfile.
\dedication{\center
This is where \\
the dedication goes.
}
% \prefacefile{preface}

\begin{document}
% The following command now generates all your starting pages:
\FrontMatter
Any idea what might be causing the problem? It's driving me buggy! Even a hack to get rid of it would be fine, because I can't submit my dissertation until I get this fixed!

Thanks!
Last edited by scheydec on Sun Nov 21, 2010 7:53 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
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

References appears TWICE in ToC???

Post by localghost »

Do you know anybody else here on the board who has the used document class at hand [1]? At the moment the problem is incomprehensible.

[1] View topic: Avoidable mistakes


Thorsten
scheydec
Posts: 9
Joined: Sat Oct 16, 2010 10:43 pm

Re: References appears TWICE in ToC???

Post by scheydec »

I asked the person who gave me the file (and thus was the last person to use it), and he didn't have the problem.

What kind of text should I be looking for in a file? In other words, what generates the entries in the ToC?

Thanks!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: References appears TWICE in ToC???

Post by localghost »

Obviously you didn't understand what I have written and you haven't read the important information I referred you to. Please do so and you will know what I mean. Otherwise this will come to nothing.
scheydec
Posts: 9
Joined: Sat Oct 16, 2010 10:43 pm

Re: References appears TWICE in ToC???

Post by scheydec »

I did read it before I even posted, and I thought I was complying. Please don't flame me because I'm new to LaTeX and to this forum.

What am I violating? I thought I provided an example. Is it because I said I'm using TeXShop? I thought my problem was more general than the package I'm using.

Sorry if I'm causing problems, but I'm just desperate to get this fixed.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

References appears TWICE in ToC???

Post by localghost »

scheydec wrote:I did read it before I even posted, and I thought I was complying. Please don't flame me because I'm new to LaTeX and to this forum. […]
Then there are many things you didn't understand. And flaming would look much different. And even new members should be able to read the essential topics of this board.
scheydec wrote:[…] What am I violating? I thought I provided an example. Is it because I said I'm using TeXShop? I thought my problem was more general than the package I'm using. […]
The content behind the link I gave you as well as the Board Rules clearly describe what to do in your case. Nobody in this forum has the special document class that you are using at hand. So you have to upload it as attachment to the forum server or give a link where to find it. I hope I have now been clear enough. Shouldn't be too hard to understand.
scheydec
Posts: 9
Joined: Sat Oct 16, 2010 10:43 pm

References appears TWICE in ToC???

Post by scheydec »

Sorry! I thought the code I put in was enough, and didn't realize the distinct meaning of "document class". I think I understand now - you want my .cls file, so I'm attaching it.

I'm also attaching the log file, although there's nothing I see in there. Let me know if there's anything else I should attach. (apacite is a standard package, so I'm not attaching that)
myschooldiss.cls
CLS file
(15.75 KiB) Downloaded 383 times
My-Proposal.log
Most recent log file, for result with 2 entries for Bibliography in ToC
(12.29 KiB) Downloaded 386 times
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

References appears TWICE in ToC???

Post by frabjous »

It looks like both apacite and the documentclass insert the table of contents in the TOC. Obviously you don't want them both doing it. Try changing:

Code: Select all

\usepackage{apacite}
to

Code: Select all

\usepackage[notocbib]{apacite} 
That should prevent apacite from doing it.
scheydec
Posts: 9
Joined: Sat Oct 16, 2010 10:43 pm

Re: References appears TWICE in ToC???

Post by scheydec »

That works!! Thank you, thank you, THANK YOU!!!

I had no idea that there were 'switches' or whatever you call them that could be used with the usepackage.

Thanks again!
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

References appears TWICE in ToC???

Post by frabjous »

You should read the apacite package documentation. It is available on CTAN (and quite likely is already on your harddrive somewhere).

Let me also remind to mark the thread as solved, according to the Board Rules, before Thorsten has to.
Post Reply