LyXModifying the text that appears in the TOC and list of figur

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
insipidtoast
Posts: 128
Joined: Wed Jul 04, 2012 5:34 pm

Modifying the text that appears in the TOC and list of figur

Post by insipidtoast »

Is there a way to modify the table of contents and list of figures the Lyx way? So I can just click on the text in the table of contents and start typing extra words?

Especially for the list of figures, I need to add credit information such as the websites I got the figures from. I'm not going to write all the source information in the text, but I am willing to write that info at the beginning of the book in the list of figures section.

Is there an easy way to do this?

Or should I just let Lyx poorly format those sections, and then at the end go back and insert my own TOC and list of figures MANUALLY so I can actually get them to say what I want?
FYI:
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Modifying the text that appears in the TOC and list of figur

Post by kaiserkarl13 »

There is an optional argument to the \caption command that gives the caption as it appears in the list of [float name]s. For example,

Code: Select all

\begin{figure}
\framebox{Image here}
\caption[Me standing with the Chancellor]{Me standing with the Chancellor.  Photo by I. M. A. Photographer.}
\end{figure}
Will have the part in brackets in the list of figures and the part in braces as part of the actual caption.

By the way, your proposed scheme seems backwards: one typically includes citations, cross-references, etc. in the real caption but not in the "condensed" caption for the list of figures/tables/etc. Not putting photo credits on the page on which the photo appears could also be construed as plagiarism (or at least improper citation practice).
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Modifying the text that appears in the TOC and list of figur

Post by cgnieder »

kaiserkarl13 wrote:Not putting photo credits on the page on which the photo appears could also be construed as plagiarism (or at least improper citation practice).
I don't think this is a problem if the credits can be found easily. In German school textbooks it is very common to have a list of credits for all the photos somewhere on the first few pages and not where the photos appear...

Regards
site moderator & package author
insipidtoast
Posts: 128
Joined: Wed Jul 04, 2012 5:34 pm

Modifying the text that appears in the TOC and list of figur

Post by insipidtoast »

Exactly.. Who wants to see something like "http://latex-community.org/forum/viewtopic.php?f=19&t=21446" on the page of a book below a picture? Looks awful to me.

How does

Code: Select all

 \begin{figure}
    \framebox{Image here}
    \caption[Me standing with the Chancellor]{Me standing with the Chancellor.  Photo by I. M. A. Photographer.}
    \end{figure}
this translate to lyx? I try entering an ERT box within the caption box, and put something in brackets and it just ends up showing up in the text and in the list of figures. I only want "http://latex-community.org/forum/viewtopic.php?f=19&t=21446" to show up in the list of figures - not under the image in the body of the document.
FYI:
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Modifying the text that appears in the TOC and list of figur

Post by scottkosty »

insipidtoast wrote: How does

Code: Select all

 \begin{figure}
    \framebox{Image here}
    \caption[Me standing with the Chancellor]{Me standing with the Chancellor.  Photo by I. M. A. Photographer.}
    \end{figure}
this translate to lyx? I try entering an ERT box within the caption box, and put something in brackets and it just ends up showing up in the text and in the list of figures. I only want "http://latex-community.org/forum/viewtopic.php?f=19&t=21446" to show up in the list of figures - not under the image in the body of the document.
No ERT is needed. Make sure your cursor is in the caption box (anywhere is fine, I think). Then go to Insert > Short Title.
insipidtoast
Posts: 128
Joined: Wed Jul 04, 2012 5:34 pm

Re: Modifying the text that appears in the TOC and list of f

Post by insipidtoast »

OH, Scottkosty...YOU ARE THE MAN!

Thank you very much. That little feature also solves the problem I was having with the section titles being too big in the table of contents.

Big points for you! :D :mrgreen: :D
FYI:
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
Post Reply