TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried to add the fourier function in the figure caption but i failed, any help? enter image description here

\caption{DFT of a signal \mathcal "here" }
share|improve this question
Which error do you get? – Eddy_Em Apr 8 '13 at 10:22
This is the code and i need to put the left equation in the caption in the place which i write "here" in the code \begin{figure}[h] \centering \subfloat{\includegraphics[width=\linewidth]{Data/DFT.png}}\label{pic9} \caption{DFT of a signal \mathcal "here" } \end{figure} – SMH Apr 8 '13 at 10:38
no i download it from the internet – SMH Apr 8 '13 at 10:41
A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). – Jubobs Apr 8 '13 at 10:41
don't use [h] as it makes it very hard for latex to find a good place for the float as it prevents all the usual places. use [htp] or no option at all. – David Carlisle Apr 8 '13 at 11:09
up vote 7 down vote accepted

You need no \subfloat. Just typeset that equation in the $$ in \caption command.




        \caption{DFT of a signal $\mathcal{F}^{-1}\{\log|\mathcal{F}\{x[n]\}|\}$}


enter image description here

share|improve this answer
Your code doesn't seem to match your screenshot: \mathcal{F}^{-\infty}? – Jubobs Apr 8 '13 at 10:56
@Jubobs: Thanks, didn't notice. In the code there was \mathcal{F^{-1}} and it typeset -1 as -\infty. – m0nhawk Apr 8 '13 at 10:58

Your question has little to do with captions, more to do with typesetting mathematical expressions.

Note that you don't need a subfloat in this particular case, since your figure consists of only one element.

enter image description here

\newcommand\abs[1]{\lvert #1 \rvert}
\caption{DFT of a signal $\F^{-1} \{ \log
    \abs{\F \{ x[n]\}} \}$ \label{pic9}}
share|improve this answer
Each usage here of \left and \right is wrong; there's no need to \protect a \label. – egreg Apr 8 '13 at 12:06
@egreg Sorry, I fixed it. I'll learn... one day. I don't know why I added a \protect there either. – Jubobs Apr 8 '13 at 12:19
I'm rather fussy about \left and \right, you know. ;-) – egreg Apr 8 '13 at 12:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.