Graphics, Figures & TablesNeed help with \listoffigures

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Gohstgamer
Posts: 3
Joined: Sat Nov 25, 2017 2:02 pm

Need help with \listoffigures

Post by Gohstgamer »

Hi there,

Im writing a document with document class article. I d'like to have the \listoffigures at the end of the document, that I've managed to do so. But I'd like to have the same formating for the Titel as if I've use for \section. Can anyone tell me either how to remove the \listoffigures title entirely or how to include an automatic numbering bevor the title?

Now it looks like this:
4. Sources
< some text >

List of figures
< some text >

5. Materials
< some text >

I'd like that it looks like this:
4. Sources
< some text >

5. List of figures
< some text >

6. Materials
< some text >

(I've made no changes to \section command)

Greets Simon

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

Gohstgamer
Posts: 3
Joined: Sat Nov 25, 2017 2:02 pm

Need help with \listoffigures

Post by Gohstgamer »

I've found my trouble maker, I had included \usepackage{tocbibind}, through that I've got an empty space into my Tableofcontents because I used \renewcommand{\listfigurename}{}. This is a working exmaple:

Code: Select all

\begin{filecontents}{\jobname.bib}
\@online{ bk:test,
  author={Saputello},
  title={Was ist ein vollständiges Minimalbeispiel oder kurz VM und wie
    erstelle ich dieses?},
  url={http://texwelt.de/wissen/fragen/569/was-ist-ein-vollstandiges-minimalbeispiel-oder-kurz-vm-und-wie-erstelle-ich-dieses}
}
\end{filecontents}
\listfiles
\documentclass[a4paper]{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber]{biblatex}
\addbibresource{\jobname.bib}
\usepackage[demo]{graphicx}
\usepackage{wrapfig}

\begin{document}
	\tableofcontents
	\pagebreak

\begin{wrapfigure}{r}{0.31\textwidth}
	\vspace{-16pt}
	\centering
	\includegraphics[width=0.3\textwidth]{images/LevelShifter.JPG}
	\caption{Levelshifter}
	\vspace{-15pt}
\end{wrapfigure}
Das ist ein Beispiel aus \textsuperscript{\cite{bk:test}}.
\pagebreak

\section{Literaturverzeichnis}
\printbibliography[heading = none]
\section{Abbildungsverzeichnis}
\renewcommand{\listfigurename}{}
\vspace{-24pt}
\listoffigures
\end{document}
Gohstgamer
Posts: 3
Joined: Sat Nov 25, 2017 2:02 pm

Need help with \listoffigures

Post by Gohstgamer »

That was a suggestion of an other user, out of an other Forumhttp://golatex.de/viewtopic,p,97196.html#97196, which seems nicer to me:

Code: Select all

\documentclass[a4paper]{article} 
\usepackage[ngerman]{babel} 
\usepackage[utf8]{inputenc} 
\usepackage{biblatex} 
\usepackage[demo]{graphicx} 
\usepackage{wrapfig} 
\usepackage{tocbibind} 

\addbibresource{biblatex-examples.bib} 

% Quelle: https://tex.stackexchange.com/questions/150608 
\renewcommand{\listoffigures}{ 
   \begingroup 
   \tocsection 
   \tocfile{\listfigurename}{lof} 
   \endgroup 
} 

\begin{document} 
\tableofcontents 
\pagebreak 

\begin{wrapfigure}{r}{0.31\textwidth} 
   \vspace{-16pt} 
   \centering 
   \includegraphics[width=0.3\textwidth]{images/LevelShifter.JPG} 
   \caption{Levelshifter} 
   \vspace{-15pt} 
\end{wrapfigure} 
Das ist ein Beispiel aus \textsuperscript{\cite{markey}}. 
\pagebreak 

\printbibliography[heading=bibnumbered, title=Literaturverzeichnis] 
\listoffigures 
\end{document}
Post Reply