2

I have some trouble with inserting a picture in latex the way I want. I want it to look like this.

enter image description here

However I've tried implement this using the code below

\begin{figure}[H]
\begin{center}
\begin{tabular}{l}\includegraphics[width=0.1\textwidth]{Basic}\end{tabular}%
\hspace{1em}%
\textrm{Basic event type}
\caption{Circle}
\end{center}
\end{figure}

This however result in

enter image description here

I want to remove the caption number "Figure 1:" and also center it beneath the picture. And I can't seem to get it to work. Can anyone help me with this?

Kind Regards Carl

13
  • 1
    Welcome to TeX.SE. Please don't use \begin{center}....\end{center} in a figure environment
    – user31729
    Commented Feb 21, 2017 at 9:04
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Commented Feb 21, 2017 at 9:05
  • Do you really want a caption or only a writing under the circle?
    – CarLaTeX
    Commented Feb 21, 2017 at 9:20
  • Hi there, thanks! I guess that I want more or less only the writing, it doesn't have to be caption.
    – Carl
    Commented Feb 21, 2017 at 9:37
  • 1
    @user1129682 As you can read in lockstep's answer of the link I added \begin{center} ... \end{center} inside a figure environment will result in (generally unwanted) additional vertical space. BTW, please choose a more creative nickname, rather than the automatic user1129682 :):):)
    – CarLaTeX
    Commented Feb 21, 2017 at 11:18

2 Answers 2

1

I think you don't really want a caption but a simple image with a writing after it, so I suggest to you the following solution.

Of course you don't have to use \usepackage{mwe} (I've added it only to have the blind text and an example figure) and you have to substitute example-image-1x1 for the name of your actual picture Basic).

\documentclass{article}
\usepackage{graphicx}
\usepackage{array}
\usepackage{mwe} % only to create blind text and example-image
\begin{document}
\blindtext
\begin{center}
    \begin{tabular}{m{.1\textwidth}l}
        \includegraphics[width=0.1\textwidth]{example-image-1x1} & \textrm{Basic event type}\\
        \multicolumn{1}{c}{\textrm{Circle}} & \\
    \end{tabular}
\end{center}
\blindtext
\end{document}

enter image description here

3
  • This is exactly what I wanted, thank you so much! :) And thanks to everyone else to, so many good inputs (Y)
    – Carl
    Commented Feb 22, 2017 at 9:17
  • @Carl You're welcome! We are almost namesake, too (almost because I'm a female and my name is Carla)!
    – CarLaTeX
    Commented Feb 22, 2017 at 9:22
  • @Carl On a side note: As long as you are not doing a brochure or something like that, it is good style to always label and name your figures.
    – Bananguin
    Commented Apr 11, 2017 at 6:22
0

The caption is centered just like everything else. Once you put the \caption macro outside the center-environment it will be left aligned. You also could put it inside a \parbox

\parbox{\linewidth}{\caption{Circle}}

The parbox would be centered, but is 100% wide, so it won't actually be moved. Its content is left aligned.

I have not played too much with \caption, maybe you can't nest it in arbitrary constucts. Should you run into problems you can look into \captionof from the capt-of package.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .