LyXRemove Figure x.x from Captions

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Remove Figure x.x from Captions

Post by AleCes »

Hello everybody,

I'd like to remove the standard text "Figure x.x" from captions inside floats.

Minimal example:

Code: Select all

\documentclass[a5paper,oneside]{book}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text,Numbers=OldStyle]{Junicode}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{float}
\usepackage{graphicx}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth

\newcommand{\noun}[1]{\textsc{#1}}

\@ifundefined{date}{}{\date{}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.

\usepackage{xunicode}
\begin{document}

\chapter{}

\begin{figure}[H]


\begin{centering}
\caption{Caption}

\par\end{centering}

\end{figure}

\end{document}

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

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Remove Figure x.x from Captions

Post by Johannes_B »

What are you going to do? If you don't want the object numbered, you can't reference it. Well, you don't need a caption now.

Code: Select all

\documentclass{article}
\begin{document}
\begin{figure}
	\rule{4cm}{5cm}
	\caption{Caption}
I am kind of a caption, because i am not numbered. But i am here
with the pic, which is just a black rectangle.
\end{figure}
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Re: Remove Figure x.x from Captions

Post by AleCes »

Hello Johannes_B, no, I don't need a reference, I just want to put a tagline below the picture, that's it! :P

P.S. Is there any LyX specific code/option to get this done?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Remove Figure x.x from Captions

Post by Johannes_B »

I don't use LyX so i can't be sure, but inserting normal text should do the trick (see the example above).
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Re: Remove Figure x.x from Captions

Post by AleCes »

OK, thanks the easiest way is always the best one! :D
Post Reply