General ⇒ I am getting footnote in TOC
I am getting footnote in TOC
Hello,
I have the following line in my thesis:
\chapter[ABC]{ABC}\protect\symbolfootnote[1]{Results from this work have been presented.......}}
The problem is that I am getting this footnote in TOC. I don't want to have it there. Can anybody help me?
Regards,
Farrukh
I have the following line in my thesis:
\chapter[ABC]{ABC}\protect\symbolfootnote[1]{Results from this work have been presented.......}}
The problem is that I am getting this footnote in TOC. I don't want to have it there. Can anybody help me?
Regards,
Farrukh
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Stefan Kottwitz
- Site Admin
- Posts: 10322
- Joined: Mon Mar 10, 2008 9:44 pm
I am getting footnote in TOC
Hi Farrukh,
I've tested this code line and the footnote does not get into the toc, it appears only on the chapter page. Please check if you've given us the right code, because the braces are not matching. I could test it after removing the last closing brace. Perhaps post a minimal working example that shows the problem.
Btw. that's not a WinEdt issue, I will move that topic to LaTeX/General later.
Stefan
I've tested this code line and the footnote does not get into the toc, it appears only on the chapter page. Please check if you've given us the right code, because the braces are not matching. I could test it after removing the last closing brace. Perhaps post a minimal working example that shows the problem.
Btw. that's not a WinEdt issue, I will move that topic to LaTeX/General later.
Stefan
LaTeX.org admin
Re: I am getting footnote in TOC
Sorry for the missing braces. Following is the line that I have in my thesis:
\chapter[Yeast ........... pathways]{Mevalonate ..................\emph{Yeast}\protect\symbolfootnote[1]{Results from this work have been presented...........}
this places a footnote in the text as well as in TOC.
Regards.
\chapter[Yeast ........... pathways]{Mevalonate ..................\emph{Yeast}\protect\symbolfootnote[1]{Results from this work have been presented...........}
this places a footnote in the text as well as in TOC.
Regards.
- Stefan Kottwitz
- Site Admin
- Posts: 10322
- Joined: Mon Mar 10, 2008 9:44 pm
I am getting footnote in TOC
Hi Farrukh,
this code is different to the first, in the first posting the footnote was outside the chapter title, because {ABC} was closed by a brace. Here it's inside now. Just a remark. But the error can still not be reproduced. To understand why, try this minimal working example:
I didn't change your line, I've just completed it to make it compilable. Compile this and check if the footnote is appearing only where it should be.
Stefan
this code is different to the first, in the first posting the footnote was outside the chapter title, because {ABC} was closed by a brace. Here it's inside now. Just a remark. But the error can still not be reproduced. To understand why, try this minimal working example:
Code: Select all
\documentclass[a4paper,10pt]{book}
\long\def\symbolfootnote[#1]#2{\begingroup\def\thefootnote{\fnsymbol{footnote}}
\footnote[#1]{#2}\endgroup}
\begin{document}
\tableofcontents
\chapter[Yeast ........... pathways]{Mevalonate ..................\emph{Yeast}\protect\symbolfootnote[1]{Results from this work have been presented...........}}
text
\end{document}
Stefan
LaTeX.org admin
I am getting footnote in TOC
Hi Stefan,
In your given example the short chapter title was taken in TOC and error was not reproduced. While I am displaying long chapter titles in TOC.
Hereby I paste the minimal code to reproduce the problem.
In your given example the short chapter title was taken in TOC and error was not reproduced. While I am displaying long chapter titles in TOC.
Hereby I paste the minimal code to reproduce the problem.
Code: Select all
\documentclass[a4paper,10pt]{book}
%\documentclass[envcountsame,envcountchap,oneside]{svmono-sab}
\long\def\symbolfootnote[#1]#2{\begingroup\def\thefootnote{\fnsymbol{footnote}}
\footnote[#1]{#2}\endgroup}
%%%%%% To take long chapter names in toc
\makeatletter
\def\@chapter[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
{\protect\numberline{\thechapter}#2}%
\else
\addcontentsline{toc}{chapter}{#2}%
\fi
\else
\addcontentsline{toc}{chapter}{#2}%
\fi
\chaptermark{#1}%
\addtocontents{lof}{\protect\addvspace{10\p@}}%
\addtocontents{lot}{\protect\addvspace{10\p@}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
\makeatother
%%%%%%% End To take long chapter names in toc
\begin{document}
\tableofcontents
\chapter[Yeast ........... pathways]{Mevalonate ..................\emph{Yeast}\protect\symbolfootnote[1]{Results from this work have been presented...........}}
text
\end{document}
- Stefan Kottwitz
- Site Admin
- Posts: 10322
- Joined: Mon Mar 10, 2008 9:44 pm
I am getting footnote in TOC
Hi Farrukh,
here the cause can be seen in the definition of \@chapter. Consider these lines:
#2 is the long title including the footnote. #1 would be the short title without footnote, #1 is used in the original definition of book.cls. The same applies to the other \addcontentsline{toc}{chapter}{#2} calls.
Stefan
here the cause can be seen in the definition of \@chapter. Consider these lines:
Code: Select all
\addcontentsline{toc}{chapter}%
{\protect\numberline{\thechapter}#2}%
Stefan
LaTeX.org admin
Re: I am getting footnote in TOC
Hi,
Thanks for your prompt reply. Is there some solution to it? I want to keep long titles in TOC but still avoid footnotes in TOC.
Farrukh
Thanks for your prompt reply. Is there some solution to it? I want to keep long titles in TOC but still avoid footnotes in TOC.
Farrukh
I am getting footnote in TOC
You can disable your footnote command before including the TOC file:
Code: Select all
\begin{document}
\begingroup
\long\def\symbolfootnote[#1]#2{}
\tableofcontents
\endgroup
- Stefan Kottwitz
- Site Admin
- Posts: 10322
- Joined: Mon Mar 10, 2008 9:44 pm
I am getting footnote in TOC
You could disable the footnote command temporarily:
Stefan
Code: Select all
{\long\def\symbolfootnote[#1]#2{}
\tableofcontents}
LaTeX.org admin
Re: I am getting footnote in TOC
It worked!!!! Thanks for the great help.
Have a nice week ahead.
Farrukh
Have a nice week ahead.
Farrukh