LyX ⇒ Issue with TOC - 'Appendix' rows
Issue with TOC - 'Appendix' rows
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.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Re: Issue with TOC - 'Appendix' rows
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
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
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 302 times
-
- Posts: 707
- Joined: Tue Mar 25, 2008 5:02 pm
Issue with TOC - 'Appendix' rows
\setlength{}
in it is the part that fixes it, that plus \usepackage{tocloft}
.)Re: Issue with TOC - 'Appendix' rows
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
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 224 times