LyXSetting List of figures as a section

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
ion87
Posts: 4
Joined: Thu Jan 17, 2013 5:32 pm

Setting List of figures as a section

Post by ion87 »

Hey everybody,
I'm using KOMA-Script and my list of figures is after inserting it defined as a chapter. But I'd like to have it as a section.
So I made a lyx code box and made several tries to get it right but I failed everytime!
Can you help me?
I tried the following codes:
  1. Code: Select all

    \newcommand\listoffigures{%
    	\section*{\listoffigurename}%
    		\@mkboth{\MakeUppercase\listoffigurename}%
    				{\MakeUppercase\listoffigurename}%
    	\starttoc{lof}%
    	}
  2. Code: Select all

    \addcontentsline{lof}{section}{List of figures}
    \listoffigures
  3. Code: Select all

    \setcounter{lofdepth}{2}
    \listoffigures
  4. Code: Select all

    \makeatletter
    \renewcommand*\lof@heading{ \section{\refname}}
    \makeatother
    (I thought this might work like bib@heading...
... but every try failed! Unfortunately I don't know much about LaTeX coding so these samples might all be full of mistakes. I copied the most from other forums and edited them.
I'd be very thankful if someone helps me! Thank you! :)
Last edited by cgnieder on Sun Feb 03, 2013 12:18 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.

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

Setting List of figures as a section

Post by kaiserkarl13 »

The first one will fail because \listoffigures is already defined. If you use \renewcommand instead of \newcommand, you might have better luck.
Post Reply