Graphics, Figures & TablesMake LaTeX leave a picture alone

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
john1923
Posts: 4
Joined: Thu Apr 16, 2009 4:17 pm

Make LaTeX leave a picture alone

Post by john1923 »

I am new to LaTeX and so far very impressed.

However

I have a full A4 figure that I made using Perl and Inkscape. It is absolutely beautiful and I don't want it re-sized.

I want to insert it unmodified into the final document, preferably in between two pages of text, but at the end would also be ok.

I also understand that I have written "figure 4" on the figure so there is no way for LaTeX to link to it but I can manually change it... or could I have some kind of LaTeX caption positioned at a specific point above the figure without resizing the picture.

As you can see I am not sure how to approach this problem so I appreciate any help.

Thankyou in advance

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
corderin
Posts: 77
Joined: Sun Dec 14, 2008 2:27 pm

Re: Make LaTeX leave a picture alone

Post by corderin »

Try with:


\begin{figure}[p]
%the option p, places the figure alone in a page
\centering
\includegraphics{your_figure.eps}
\caption[Short caption for the index of figures]{Caption under the figure.} \label{fig:your_figure}
\end{figure}

Regards
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Make LaTeX leave a picture alone

Post by localghost »

john1923 wrote:I have a full A4 figure that I made using Perl and Inkscape. It is absolutely beautiful and I don't want it re-sized.
In the case the file is in PDF format, try the pdfpages package to include the whole page into your document.


Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
john1923
Posts: 4
Joined: Thu Apr 16, 2009 4:17 pm

Re: Make LaTeX leave a picture alone

Post by john1923 »

Thankyou to both of you for the quick replies to a novice question

pdfpages works perfectly and I can save my figure as a PDF then include it in the LaTex Document, it works for now.

However it would be nice if I could make LaTeX show the picture in the background then put the figure caption over it, so the pic is not resized and it is in the middle.

Cordin's code is very similar to what I already tried, It doesn't re-size the pic but it doesn't put it in the middle either, half the figure pokes off the edge of the page.
corderin
Posts: 77
Joined: Sun Dec 14, 2008 2:27 pm

Make LaTeX leave a picture alone

Post by corderin »

To become the caption over the figure just insert the \caption line over the \includegraphics line...

For vertical centering try \vspace*{x cm} over the figure environment maybe using float package (\usepackage{float}) in order to employ the H option this way:

Code: Select all

\newpage

% vertical alignment
\vspace*{5 cm}

\begin{figure}[H]
%the option H, places the figure just where the code is written
\centering
\caption[Short caption for the index of figures]{Caption over the figure.} \label{fig:your_figure}
\includegraphics{your_figure.eps}
\end{figure}

\newpage
john1923
Posts: 4
Joined: Thu Apr 16, 2009 4:17 pm

Re: Make LaTeX leave a picture alone

Post by john1923 »

Thankyou Corderin

The /vspace is good I hadn't heard of that and it's companion /hspace lets me put the picure in the middle of the page.

But the code puts the caption over (as in above) the picture. The figure is a full page so the caption won't fit. I want to put the caption in a transparent box over the figure. So the caption is in front of the figure. and the figure is behind the caption, potentially obscured.

Is this possible?

Thankyou for all of your help.
corderin
Posts: 77
Joined: Sun Dec 14, 2008 2:27 pm

Make LaTeX leave a picture alone

Post by corderin »

John, here is a tricky way to solve your problem, and it works fine:


Code: Select all

\begin{figure}[h]
	\centering
		\includegraphics[width=0.4\textwidth]{sa.eps}
%with vspace you can place the caption over the figure
\vspace*{-1cm}	\caption[Sistema de automatización: estructura funcional]{Estructura funcional de un sistema de automatización.}	\label{fig:sa}
\end{figure}
The result is attached.
Attachments
trick.JPG
trick.JPG (7.43 KiB) Viewed 5649 times
Post Reply