简体   繁体   中英

How to remove the caption label and number (say, "Figure #" ) from one specific figure in revtex4 document of Latex?

I am preparing a report in revtex4 document of Latex. Can someone please help me to remove the Figure label and number of one specific figure in my document. I tried and successfully did using the \usepackage{caption}, but it then led all my figure captions to center hanging indentation. Therefore, I need an alternative to do the same.

My code goes as,

       \documentclass[preprint,aps,prb,floatfix]{revtex4}
       \usepackage[dvips]{epsfig}
       \usepackage[dvips]{graphics}
       \usepackage{amsfonts}
       \usepackage{amssymb}
       \usepackage{bm}
       \usepackage[mathscr]{eucal}
       %\usepackage{caption}
       \makeatletter
       \renewcommand{\fnum@figure}{Figure \thefigure}
       \makeatother


       \begin{document}

          \begin{figure}
            \begin{centering}
            %\captionsetup{labelformat=empty,labelsep=none}
            \includegraphics[width=8.5cm, height=4.75cm, keepaspectratio]{xxx.ps}
            \caption{xxxx}
            \label{xxx}
            \end{centering}
          \end{figure}

       \end{document}

Thank you in advance.

If you only want the caption text without the prefix "Figure #", simply don't use a caption. You can add the text as normal text below the image.

Unrelated to your question, but \centering is a macro and not an environment.

\documentclass[preprint,aps,prb,floatfix]{revtex4}
\usepackage{epsfig}
\usepackage{graphics}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{bm}
\usepackage[mathscr]{eucal}
%\usepackage{caption}
\makeatletter
\renewcommand{\fnum@figure}{Figure \thefigure}
\makeatother


\begin{document}

  \begin{figure}
    \centering
    \includegraphics[width=8.5cm, height=4.75cm, keepaspectratio]{example-image}
    
    xxxx
  \end{figure}

\end{document}

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM