LyX ⇒ Issue with TOC - 'Appendix' rows
Issue with TOC - 'Appendix' rows
Hi!
I'm writing my dissertation with Lyx.
I put the TOC and everything works fine except one thing.
In the TOC the 'Appendix' line overwrites the title of the Appendix (see below).
Does anyone know how to fix this please?
THANKS!
RT
I'm writing my dissertation with Lyx.
I put the TOC and everything works fine except one thing.
In the TOC the 'Appendix' line overwrites the title of the Appendix (see below).
Does anyone know how to fix this please?
THANKS!
RT
NEW: TikZ book now 40% off at Amazon.com for a short time.

-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Re: Issue with TOC - 'Appendix' rows
Hi ritaly,
I think a MWE would help here. See http://www.latex-community.org/forum/vi ... =37&t=5838
You don't happen to have any negative space (e.g. \hspace{-2cm}, do you?
Thanks,
Scott
I think a MWE would help here. See http://www.latex-community.org/forum/vi ... =37&t=5838
You don't happen to have any negative space (e.g. \hspace{-2cm}, do you?
Thanks,
Scott
-
- Posts: 707
- Joined: Tue Mar 25, 2008 5:02 pm
Issue with TOC - 'Appendix' rows
The problem is that the table of contents assumes your chapter/section/etc. entries are "well-behaved" (numbers or letters, having a reasonable width). When you redefined "thesection," it gets messed up. The documentation for the tocloft package will explain why your document failed as well as why the following document will do what I suspect you were looking for:
Code: Select all
\documentclass{article}
\usepackage{tocloft}
\begin{document}
\author{me}
\title{ho, hum}
\tableofcontents
\section{Hello}
\appendix
\let\oldsection\thesection
\renewcommand{\thesection}{Appendix~\oldsection}
\addtocontents{toc}{\setlength{\cftsecnumwidth}{18ex}}
\section{Haha}
\end{document}
Re: Issue with TOC - 'Appendix' rows
Hi guys!
Thank you very much to both of you! Sorry for not being precise but I'm new in this forum (even if I'm not new to Lyx).
- Attached you can find a minimal working file containing the issue (you can see it in page 1).
- kaiserkarl13, thanks! But do you know how to fix it?
Also, the issue is slightly deeper since my dissertation contains 3 chapters. Each chapter has a distinct Appendix. I tried to put each chapter has a 'child' document in a Lyx file but when creating the TOC the numbers do not reflect the number of the chapters (MWE needed?).
Any idea how this could work please?
MANY THANKS IN ADVANCE!!
RT
Thank you very much to both of you! Sorry for not being precise but I'm new in this forum (even if I'm not new to Lyx).
- Attached you can find a minimal working file containing the issue (you can see it in page 1).
- kaiserkarl13, thanks! But do you know how to fix it?
Also, the issue is slightly deeper since my dissertation contains 3 chapters. Each chapter has a distinct Appendix. I tried to put each chapter has a 'child' document in a Lyx file but when creating the TOC the numbers do not reflect the number of the chapters (MWE needed?).
Any idea how this could work please?
MANY THANKS IN ADVANCE!!
RT
- Attachments
-
- example.lyx
- (2.64 KiB) Downloaded 307 times
-
- Posts: 707
- Joined: Tue Mar 25, 2008 5:02 pm
Issue with TOC - 'Appendix' rows
I don't think you actually ran my example. It DOES fix it, unless I missed something. (The line with
\setlength{}
in it is the part that fixes it, that plus \usepackage{tocloft}
.)Re: Issue with TOC - 'Appendix' rows
Hi kaiserkarl13!
First of all thanks again for your code. You're right it does fix it. I run in with TexShop and I see it does work. However, I'm not sure how to 'import' it in a standard Lyx file. I tried to copy and paste it in the preamble but it doesn't work. What am I doing wrong?
THANKS a million again for this!!
Ciao,
RT
First of all thanks again for your code. You're right it does fix it. I run in with TexShop and I see it does work. However, I'm not sure how to 'import' it in a standard Lyx file. I tried to copy and paste it in the preamble but it doesn't work. What am I doing wrong?
THANKS a million again for this!!
Ciao,
RT
Re: Issue with TOC - 'Appendix' rows
Btw,
In the meanwhile I've found a nice example (I think it can be adapted quite easily) that does what I need in Lyx. It's attached.
Thanks again to all of you for your suggestions!!
RT
In the meanwhile I've found a nice example (I think it can be adapted quite easily) that does what I need in Lyx. It's attached.
Thanks again to all of you for your suggestions!!
RT
- Attachments
-
- suthesis-lyx.zip
- (114.21 KiB) Downloaded 229 times