Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

figure wider than textwidth: how to do it?

5,144 views
Skip to first unread message

tge...@gmail.com

unread,
May 6, 2011, 6:07:12 AM5/6/11
to
Hello,

I am busy writing up my PhD thesis. I am doing a PhD in cell biology
so I have lots of microscope images. These images, if included at
LaTeX's normal textwidth will be too small to be informative so I need
to include them as large as possible: about 19 cm in width. I do not
want to broaden the text to 19 cm. I like the easy to read narrow
textwidth. How can I instruct LaTeX to broaden the textwidth for these
microscope images?

As the images are large they really mess up LaTeX's automatic place
setting and text flow so I've positioned them all the back of each
chapter. So I guess a minipage environment may work but I don't want
to sit and fiddle for each image to get it just right. If I wanted to
fiddle I would still be using Word and pulling out my hair in
frustration. There is a complication: there are many images
interspersed in the text which need not be 19 cm wide where textwidth
would do nicely (and a broader image would just look stupid) so the
fix needs options.

Anyone have any ideas?

I'm thinking the construction of image Plates for each page:

\vfill

\hspace{-.2\textwidth}\begin{minipage}[c]{1.4\textwidth}
\begin{figure}[h!}
\centering
\includegraphics[scale=1]{foo}%could use [x\textheight] for
tall images...
\caption{A really wide picture.}\label{fig.foo}
\end{figure}
\end{minipage}

\vfill

\newpage

On problem here I can see is that the caption is still going to be the
normal \textwidth and the image has no reason to scale to
1.4\textwidth... So how do I fix this? Can a \addtolength{\textwidtht}
{2x} \addtolength{\hoffset}{-x} be employed in the minipage only?

Comments? Suggestions?

thanks

Sebastian Schubert

unread,
May 6, 2011, 6:22:00 AM5/6/11
to
Hi,

tge...@gmail.com wrote:

> Hello,
>
> I am busy writing up my PhD thesis. I am doing a PhD in cell biology
> so I have lots of microscope images. These images, if included at
> LaTeX's normal textwidth will be too small to be informative so I need
> to include them as large as possible: about 19 cm in width. I do not
> want to broaden the text to 19 cm. I like the easy to read narrow
> textwidth. How can I instruct LaTeX to broaden the textwidth for these
> microscope images?

...

> Anyone have any ideas?

The koma script packages offer the environement addmargin, which can be used
for your purposes.

HTH
Sebastian

Enrico Gregorio

unread,
May 6, 2011, 6:30:42 AM5/6/11
to
<"tge...@gmail.com"> wrote:

====
\begin{figure}[htbp]
\centering
\makebox[\textwidth]{%
\includegraphics[width=19cm]{foo}%
}
\caption{A really wide picture}\label{fig.foo}
\end{figure}
====

I wouldn't widen the caption.

Don't use "[h!]", as this will make very difficult for LaTeX to place
the figure, especially if it's very large. It's also wrong to put a
figure environment inside a minipage; maybe the other way around:

\begin{figure}[htbp]
\centering
\makebox[\textwidth]{%
\begin{minipage}{19cm}
\centering
\includegraphics[width=\textwidth]{foo}
\caption{A really wide picture}\label{fig.foo}
\end{minipage}%
}
\end{figure}

In this way the caption will be widened.

The \makebox[\textwidth]{...} keeps LaTeX happy, as it won't
"see" any overfull line.

Ciao
Enrico

Jean-Côme Charpentier

unread,
May 6, 2011, 6:33:01 AM5/6/11
to
Le 06/05/2011 12:07, tge...@gmail.com a écrit :
> Hello,

Hi,

> [...]
> Anyone have any ideas?

Yes... if I understand what you want. Don't use minipage : figure
inside figure isn't allowed and you have to indicate the width. I prefer
\makebox here.

> I'm thinking the construction of image Plates for each page:

Then, just say "p" rather than h! and \clearpage to be sure that
there is only one image per page.

> [snip code]


>
> On problem here I can see is that the caption is still going to be the
> normal \textwidth and the image has no reason to scale to
> 1.4\textwidth... So how do I fix this? Can a \addtolength{\textwidtht}
> {2x} \addtolength{\hoffset}{-x} be employed in the minipage only?

It's complicated for nothing.

> Comments? Suggestions?

Code.

Text before
\newpage
\begin{figure}[p]
\centering
\makebox[0pt][c]{%
\includegraphics{foo}% scale=1 is useless


}
\caption{A really wide picture.}\label{fig.foo}
\end{figure}

\clearpage
Text after

Jean-Côme Charpentier

Marc van Dongen

unread,
May 6, 2011, 6:42:58 AM5/6/11
to
On May 6, 11:07 am, "tgen...@gmail.com" <tgen...@gmail.com> wrote:

> [ extra wide figures ]

Howsagoin,

Not sure if this is what you want. In the following, I'm setting up
the default width to the sum of textwidth and margin sizes. You can
override the width to a different width by passing an optional
argument to the myfigure environment. Obviously, this is a simple
solution but it may be generalised. For example, you can add a
parameter for a picture file name and use the first argument of the
environment to define the width of the picture.

\documentclass{article}

\usepackage{lipsum}
\newlength{\totalwidth}
\setlength{\totalwidth}{\oddsidemargin}
\addtolength{\totalwidth}{\textwidth}
\addtolength{\totalwidth}{\evensidemargin}

\newenvironment{myfigure}[1][\totalwidth]{%
\begin{figure}[tbp]
\hspace{-\leftmargin}% amount of space you want to go into the left
margin
\begin{minipage}[t]{#1}}
{\end{minipage}%
\end{figure}}

\begin{document}
\begin{myfigure}
\lipsum[2]
\caption{It works.}
\end{myfigure}
\begin{myfigure}[10cm]
\lipsum[1]
\caption{This also works.}
\end{myfigure}
\lipsum[1-3]
\end{document}

Regards,


Marc van Dongen

Herbert Schulz

unread,
May 6, 2011, 8:44:02 AM5/6/11
to
In article
<1a5e3183-95c4-4c26...@35g2000yqy.googlegroups.com>,
"tge...@gmail.com" <tge...@gmail.com> wrote:

Howdy,

Simply use \makebox[\textwidth][c]{your material} which will center the
material no matter what the width of that material.

Good Luck,
Herb Schulz

Peter Wilson

unread,
May 6, 2011, 1:47:57 PM5/6/11
to

Try the adjustwidth environment. It's built in to the memoir class
otherwise available in the changepage package.

Peter W.


Mico Loretan

unread,
May 6, 2011, 5:34:39 PM5/6/11
to
On May 6, 1:47 pm, Peter Wilson <herries.pr...@earthlink.net> wrote:

Another way to gain more space, without having to worry about
resetting various text margins, is to load the rotating package and to
display the image in a sidewaysfigure environment, i.e., something
like

\begin{sidewayfigure}
\caption{bla bla}
\includegraphics[width=\textwidth]{foo}

\bigskip
Some explanations and comments associated with foo
\end{sidewaysfigure}

That way, you'd easily get more than 19 centimeters of total width for
the image. Be aware, though, that each sideways-figure (and -table)
must reside on a page of its own.

Sincerely,

Mico

Peter Flynn

unread,
May 6, 2011, 7:17:49 PM5/6/11
to
On 06/05/11 11:07, tge...@gmail.com wrote:
> Hello,
>
> I am busy writing up my PhD thesis. I am doing a PhD in cell biology
> so I have lots of microscope images. These images, if included at
> LaTeX's normal textwidth will be too small to be informative so I need
> to include them as large as possible: about 19 cm in width. I do not
> want to broaden the text to 19 cm. I like the easy to read narrow
> textwidth. How can I instruct LaTeX to broaden the textwidth for these
> microscope images?
>
> As the images are large they really mess up LaTeX's automatic place
> setting and text flow so I've positioned them all the back of each
> chapter. So I guess a minipage environment may work but I don't want
> to sit and fiddle for each image to get it just right. If I wanted to
> fiddle I would still be using Word and pulling out my hair in
> frustration. There is a complication: there are many images
> interspersed in the text which need not be 19 cm wide where textwidth
> would do nicely (and a broader image would just look stupid) so the
> fix needs options.
>
> Anyone have any ideas?

Can't you just use the geometry package's \newgeometry at the end of
each chapter to widen the text width to what you want, add the figures,
and then use it again to set it back for the next chapter?

///Peter

tge...@gmail.com

unread,
May 7, 2011, 5:28:17 AM5/7/11
to
Hello all,

Thanks for the advice. I will test it out and see which of the
solutions work the best and get back to you.

Kind regards

GL

unread,
May 7, 2011, 8:35:04 AM5/7/11
to

Yes or switch to landscape for your pages of floats...

Taofeeq Omotolani

unread,
Sep 30, 2021, 5:02:25 AM9/30/21
to
0 new messages