Generalinserting figure

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
omkardpd
Posts: 86
Joined: Sun Feb 24, 2008 7:23 am

inserting figure

Post by omkardpd »

Hi,

I have a pdf file with a one page diagram, and I am trying to insert this file in my file that I am creating through Texmaker. But the digram is not getting centered in the pdf file that I create using Texmaker. Probably I am using wrong command. Is this the case?

The commands that I am using are
\begin{figure}[htp]
\begin{center}
\includegraphics{chart}
\end{center}
\caption{Process Flow Chart}
\end{figure}

Thank you,

Omkar

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

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

inserting figure

Post by Stefan Kottwitz »

Hi Omkar,

that could should work and center the diagram. Instead of the center environment I prefer \centering:

Code: Select all

\begin{figure}[htp]
\centering
\includegraphics{chart}
\caption{Process Flow Chart}
\end{figure}
center produces additional vertical space.
Does your diagram has a margin inside, that may cause the not-centered look?

Stefan
Post Reply