Fullpage picture in two column layout - latex

I'd like to insert a picture (figure) into a document which is using a two-column layout. However, I want it to take one whole page and not be centered on one of the columns. Currently if I add a [p] modifier to the figure, the whole image lands on the last page, instead in the middle of the document.
How can I force one page to switch back to a single-column layout and insert a single big picture there?

Use the figure* environment. So instead of
\begin{figure}[ht] % I typically use ht
\centering
...
\end{figure}
you should use
\begin{figure*}[ht]
\centering
...
\end{figure*}
This also works for tables (i.e. table*).
Consider this link for more information

It is not elegant, but with float package loaded you can use:
\begin{figure}[H]
\onecolumn\includegraphics{arc}
\end{figure}
\twocolumn
But you have to place this piece of code to exact locetion in source code. Otherwise you'll get pagebreak anywhere in twocolumned page, then page with image image.

To supplement #Crowley's answer, to avoid pagebreak after implementation.
Instead of using \twocolumn, use this package instead \usepackage{multicol}.
Then,
\begin{multicols}{2}
\section Write or place anything you want
\end{multicols}
This works for me!

\usepackage{multicol} in your preamble.
Then
\begin{document}
\begin{multicols}{2}
blah blah blah text
\end{multicols}
\begin{figure}[H]
\includegraphics[width=1\textwidth]{arc}
\end{figure}
\begin{multicols}{2}
blah blah blah text
\end{multicols}
\end{document}
This is ugly, and dirty. and you will need to fiddle with where you figure is in order to get the text balanced, but it is exactly what you asked for.

Related

how we can make a word refer to something like a section or a picture in latex?

how we can make a word refer to something like a section or a picture in latex?
I know how to refer to something by \ref{} but when we use this we see the number of the section or table or picture or ... but I wanna something like \href{}{} to make a word refer to some element like section, table, picture.
You can use an \hyperlink:
\documentclass{article}
\usepackage{hyperref}
\begin{document}
\section{title}
\label{test}
\newpage
\hyperlink{test}{link text}
\end{document}

Latex List of Figures

So i'm trying to hide the label in my cover image.
>\begin{figure}
>\center
>\includegraphics[scale=0.5]{universidade}
>\caption* {Mycaption}
>\end {figure}
This way it's not labeling the figure but its not showing on the list of figures
Help please ;D
You can give the caption package the option labelformat=empty to suppress the Figure 1 etc. labelling:
\usepackage[labelformat=empty]{caption}
You can use square brackets to specify the description for the figure list, and curly brackets for the actual figure caption. So I think you should be able to do the following to supress the caption but still have an entry in the figure list:
\begin{figure}
\center
\includegraphics[scale=0.5]{universidade}
\caption[Mycaption]{}
\end {figure}
There are a couple of options, depending on what yo're after exactly:
\documentclass{article}
\usepackage{graphicx}
\setcounter{topnumber}{3}% Just for this example
\begin{document}
\listoffigures
\begin{figure}
\addcontentsline{lof}{figure}{Example image A}%
\centering
\includegraphics[height=4\baselineskip]{example-image-a}
Example image A
\end{figure}
\begin{figure}
\addcontentsline{lof}{figure}{\protect\numberline{}Example image B}%
\centering
\includegraphics[height=4\baselineskip]{example-image-b}
Example image B
\end{figure}
\begin{figure}
\centering
\includegraphics[height=4\baselineskip]{example-image-c}
\caption{Example image C}
\end{figure}
\end{document}
The figure caption is added using \addcontentsline{lof}{figure}{<caption>}, where <caption> can either contain a blank \numberline{}, or just the regular caption. The above example shows the usage of either.
It would also be possible to have no label shows in the image, but have a numbered entry in the LoF using caption. But it would seem strange to have a numbered entry in the LoF and an unnumbered figure.

Very Wide Tables in LaTeX

Is there a way to have a table in LaTeX that spans multiple pages width-wise, rather than length-wise? As far as I can tell, both longtable and supertabular will break tables over multiple pages, but only by breaking between rows and I need to break between columns. Even better would be if it were possible to have a few columns repeated at on each page.
I am using this not so nice and manually configured code to split a too wide tabular:
\usepackage{tikz}
\newsavebox{\boxFinal}
\begin{lrbox}{\boxFinal}
\scalebox{0.6}{
\begin{tabular}{...}
...
\end{tabular}
}
\end{lrbox}
\begin{table}[htb]
\centering
\begin{tikzpicture}
\clip (0,-\dp\boxFinal) rectangle (0.5\wd\boxFinal,\ht\boxFinal);
\pgftext[left,base]{\usebox{\boxFinal}};
\end{tikzpicture}
\label{table_test1}\caption{Part 1 of 2.}
\end{table}
\begin{table}[htb]
\centering
\begin{tikzpicture}
\clip (0.5\wd\boxFinal,-\dp\boxFinal) rectangle
(\wd\boxFinal,\ht\boxFinal); \pgftext[left,base]{\usebox{\boxFinal}};
\end{tikzpicture}
\label{table_test2}\caption{Part 2 of 2.}
\end{table}
There is usually a need to manually correct split offsets. You can do this by adding or subtracting from 0.5\wd\boxFinal value.
The idea was taken from http://www.latex-community.org/forum/viewtopic.php?f=5&t=2867
I've been yanking my hair out with this same problem off and on for a week. I think that this may not be entirely possible in a non-hacky sort of way.
One possible hackly solution is to use the dpfloat package: http://www.ctan.org/tex-archive/help/Catalogue/entries/dpfloat.html
Unfortunately, you'd be creating multiple tables and breaking them manually, but at least the end result should look okay. Also, this will look much better if you ditch vertical rules in your tables as per the sage guidance in the booktabs package (which you will have to google because apparently I, as a new user, don't have enough reputation to post a link to the booktabs pdf manual).
A good solution would be to rotate the whole table 90 degrees counterclockwise, thus having more room for it.
Preamble \usepackage{pdflscape}
\newpage
\thispagestyle{empty}
\begin{landscape}
\begin{table}
...
\end{table}
\end{landscape}

TOC and figure side by side in a slide

I want to put a figure and the TOC side by side in one slide where it would look like
TOC Figure
I have tried to include them each in a minipage respectively and then put them both in a figure environment. But the result does not look good, for the TOC is formatted as a paragraph, instead of an itemize look. So, does anybody have a better solution? Thanks in advance.
PS
I use beamer for creating slides.
Have you tried the following:
\frame{
\begin{columns}
\column{.5\textwidth}
\tableofcontents
\column{.5\textwidth}
\begin{figure}[h]
\centering
HERE-FIGURE
\caption{Testfigure}
\label{fig:a}
\end{figure}
\end{columns}
}
That worked just fine for me.

LaTeX hyperref link goes to wrong page

I am trying to create a reference to a float that doesn't use a caption. If I include \label{foo} within the float and reference it using \pageref{foo}, the correct page number is displayed in my pdf document but the hyperlink created by the hyperref package links to a different page (the first page of the section). If I include a caption before the label in the float, the hyperref link goes to the correct page.
Is there a way to get the hyperref link to work correctly without including a caption in the float? Or else is there a way to suppress the display of a caption so I can include one without it being shown?
Below is a minimal example. If I process it using pdflatex, I get three pages. The "figure" is shown on the second page, and the third page says, correctly, "See figure on page 2." But the hyperlink on the '2' says "Go to page 1", and if I click it it takes me to page 1.
If I put an empty \caption{} before the \label{foo}, then the hyperlink works correctly, but I don't want to show a caption for my float.
\documentclass[11pt]{memoir}
\usepackage{hyperref}
\begin{document}
some text
\clearpage
\begin{figure}
a figure
\label{foo}
\end{figure}
more text
\clearpage
See figure on page \pageref{foo}.
\end{document}
The \label command references the last invocation of \refstepcounter. \caption recognises that it is in a figure environment and calls \refstepcounter{figure}. You can call \refstepcounter by yourself.
To avoid skipping a number in the series of figures, you may create an own, meaningless counter with \newcounter{dummy}. The result:
\documentclass{scrreprt}
\usepackage{hyperref}
\newcounter{dummy}
\begin{document}
\chapter{First}
\newpage
\begin{figure}
{\Huge FIGURE}
\refstepcounter{dummy}
\label{fig:figure}
\end{figure}
\chapter{Second}
Goto \pageref{fig:figure}
\end{document}
Creates an hyperlink to the end of the figure. (works on my machine :-)
Note than \ref{fig:figure} is meaningless.
Right before the label, use \phantomsection, like so:
\documentclass{memoir}
\usepackage{hyperref}
\begin{document}
some text
\clearpage
\begin{figure}
a figure
\phantomsection
\label{foo}
\end{figure}
more text
\clearpage
See figure on page \pageref{foo}.
\end{document}
:)
Loading the caption package should suppress caption output of empty captions. The labels for floats are always determined by the caption command preceding the label command.

Resources