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
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
====
\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
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
> [ 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
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
Try the adjustwidth environment. It's built in to the memoir class
otherwise available in the changepage package.
Peter W.
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
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
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
Yes or switch to landscape for your pages of floats...