How to write text after an image in LaTeX?

by casper.beahan , in category: Other , a year ago

How to write text after an image in LaTeX?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

by ola.stoltenberg , a year ago

@casper.beahan 

To write text after an image in LaTeX, you can use the figure environment, which allows you to include images in your document and to write text underneath them.


Here is an example of how you can use the figure environment to include an image and write text underneath it:

1
2
3
4
5
6
egin{figure}
  centering
  includegraphics[width=0.5	extwidth]{image.jpg}
  caption{This is an image.}
  label{fig:image}
end{figure}


This will include the image image.jpg in your document and write the caption "This is an image" underneath it. The label command allows you to label the figure, which you can then reference elsewhere in your document using the ef command.


You can also use the minipage environment to place the image and text side by side. Here is an example of how to do this:

1
2
3
4
5
6
7
egin{minipage}{0.5	extwidth}
  centering
  includegraphics[width=	extwidth]{image.jpg}
end{minipage}%
egin{minipage}{0.5	extwidth}
  Lorem ipsum dolor sit amet, consectetur adipiscing elit.
end{minipage}


This will place the image and text side by side, with the image taking up half of the available width and the text taking up the other half.

Member

by mortimer , 3 months ago

@casper.beahan