Graphics, Figures & Tables ⇒ introduce an exception on the package
introduce an exception on the package
I'm using the following package for the position of my figures and tables : \usepackage[small,bf,nooneline,hang]{caption}.
It works very well, but i would like to introduce one exception: i would like to position just one figure with his caption in the center. I tried only "\center", but this isn't working. Do you have an idea how to introduce this exception?
Thank you already.
Evelien
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
introduce an exception on the package
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage[margin=1cm]{geometry}
\usepackage[font=small,label=bf,singlelinecheck=off,format=hang]{caption}
\usepackage{blindtext}
\setlength{\parindent}{0em}
\begin{document}
\blindtext
\begin{figure}[!ht]
\rule{6.4cm}{3.6cm}
\caption{A dummy figure}\label{fig:dummy-1}
\end{figure}
\blindtext
\begin{figure}[!ht]
\captionsetup{singlelinecheck=on}
\centering
\rule{6.4cm}{3.6cm}
\caption{A dummy figure}\label{fig:dummy-2}
\end{figure}
\blindtext
\begin{figure}[!ht]
\rule{6.4cm}{3.6cm}
\caption{A dummy figure}\label{fig:dummy-3}
\end{figure}
\blindtext
\end{document}Best regards
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10