Graphics, Figures & TablesHow to insert figures followed by text

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
mazatlanmexico
Posts: 10
Joined: Thu Jul 15, 2010 5:01 pm

How to insert figures followed by text

Post by mazatlanmexico »

Hi:
I am still new using latex but I am able to insert figures and tables without a problem but this one is a bit more challenging. I am trying to insert a 1.5 inches figure at the beginning of the page followed by some text and then another 1.5 inches figure after the text. I could find the way to insert the image but with the picture attached you can see what I am trying to accomplish. Thanks


Edit by localghost: No external links! Attachments go onto the forum server (see Board Rules).
Attachments
SamplePic.jpg
SamplePic.jpg (17.45 KiB) Viewed 3492 times
Last edited by mazatlanmexico on Sat Jul 17, 2010 8:28 pm, edited 1 time in total.

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to insert figures followed by text

Post by localghost »

See the code below. Replace the \rule commands with your images.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[includeheadfoot,margin=2cm]{geometry}
\usepackage{babel}

\begin{document}
  \rule{1.5in}{1.5in}\hfill Title here between two figures\hfill\rule{1.5in}{1.5in}
\end{document}
As soon as the problem is solved, please act according to Section 3 of the Board Rules (last two paragraphs).


Best regards
Thorsten
mazatlanmexico
Posts: 10
Joined: Thu Jul 15, 2010 5:01 pm

How to insert figures followed by text

Post by mazatlanmexico »

Thanks for the prompt reply localghost,
The name of my figures are: bar.jpg and I replaced \hrule with my picture name
but my pictures get printed one on the left upper corner and one on the right lower corner and the text between them dissappears. Also,Since I am going to put the title between
the 2 figures,do I still need to have \maketitle in my document?

Code: Select all

\documentclass[11pt]{article}
\usepackage{longtable,verbatim}
\usepackage{longtable,pdflscape,graphicx}
\usepackage{fmtcount,hyperref} % displaying latex counters
\usepackage[hmargin=1in,vmargin=1in]{geometry}
[color=#0040FF]\title{United States Department of the Interior}[/color]\begin{document}
\includegraphics{bar.jpg}{1.5in}{1.5in}\hfill Title here between twofigures\includegraphics{bar.jpg}{1.5in}{1.5in}
[color=#FF0040]\maketitle[/color]
{end{document}
mazatlanmexico
Posts: 10
Joined: Thu Jul 15, 2010 5:01 pm

Re: How to insert figures followed by text

Post by mazatlanmexico »

Please disregard my last message, its all good now. One last thing that I would like to ask though,is there a way to align the text between the figures to the middle of the figures. The text gets printed between the bottom part of the figures. Thanks
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

How to insert figures followed by text

Post by gmedina »

Hi,

two possible solutions:

1) Using minipages:

Code: Select all

\documentclass{article}
\usepackage[hmargin=1in,vmargin=1in]{geometry}

\newlength\mylen
\setlength\mylen{\textwidth}
\addtolength\mylen{-3in}

\begin{document}

\noindent\begin{minipage}{1.5in}
  \rule{1.5in}{1.5in}
\end{minipage}
\begin{minipage}{\mylen}
  \centering
  Title here between two figures
\end{minipage}
\begin{minipage}{1.5in}
  \rule{1.5in}{1.5in}
\end{minipage}

\end{document}
2) Using \raisebox to manually change the vertical alignment:

Code: Select all

\documentclass{article}
\usepackage[hmargin=1in,vmargin=1in]{geometry}

\begin{document}

\noindent\rule{1.5in}{1.5in}\hfill\raisebox{0.65in}{Title here between two figures}\hfill\rule{1.5in}{1.5in}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
mazatlanmexico
Posts: 10
Joined: Thu Jul 15, 2010 5:01 pm

Re: How to insert figures followed by text

Post by mazatlanmexico »

Thanks gmedina:
I'll go with \raisebox for now. Thanks again for your help.
Post Reply