Onecolumn / Twocolumn
Closed this issue · 4 comments
Is there an easy way to make an image and some text one page full width and then go back to the two column approach?
I see we make tables full page width. Is there a way to do that with the text too?
This is what I have used in the past. Some adjustment was made to fit my header/footer setup. It floats in a full-page image on the following page. No switching of columns required.
Sorry for the lack of a MWE.
I did pull out a bunch of code from MyIncludeGraphics that was specific to my situation, so hopefully I didn't pull out too much.
MyIncludeGraphics was a wrapper for tcbincludegraphics, part of the tcolorbox package. It's specifically for including graphics in a way that makes them easy to manipulate, and it streamlined a few things for me as I used it. The wrapper let me forget about the "blank" parameter and only pass the parameters that were useful to the situations I encountered. Interesting bits of text include:
- float*=!t : reserves the space across the full width of the page
- width=\textwidth : stretches the image across the full page
- height=\textheight-6pt : possibly something specific to my headers and footers. This was necessary for the image to "fit" on the page. Without it, the image would get kicked to the end of the chapter.
- \afterpage{\clearpage} : clears out the page so the floating elements can be placed. Without this, the image gets kicked to the end of the chapter.
You could easily wrap all of this into a "\MyFullPageImage" function. I only had a few full-page images and never got around to it.
% using \RequirePackage because this code was in a class
\RequirePackage {stfloats} % full-page-width floats in two-column layout
\RequirePackage {afterpage} % insert commands to run after a page finishes
\NewDocumentCommand{\MyIncludeGraphics}{ O{} m }
{
\tcbincludegraphics[blank,#1]{#2}
}
\MyIncludeGraphics[float*=!t, width=\textwidth, height=\textheight-6pt]{path/to-file}
\afterpage{\clearpage}
I'm hoping to have a this sort of layout
-Start of page
Words that stretch the whole page
Image that fits the text width
Column A Column B
-End Page
That code kicks the words off the page for the image but it does work for the image so thank you!
\twocolumn[{%
\section{The Character Card}
\normalsize Character cards are the main component players will be using during the game to control their miniatures. Below is a breakdown of all the different parts of a Character card starting with the front
}]{}
\MyIncludeGraphics[float*=!t, width=\textwidth, height=\textheight-6pt]{fullCard.png}
\subsubsection{left:}
Role, Unit Count, Height, and Energy
\subsubsection{right:}
Name, Personality Trait, Race and Faction
\afterpage{\clearpage}
The code I gave before was for a full-page image only.
For something that works with other text, use a figure*
environment. The !t
option floats to the top, and !b
floats to the bottom. Everything inside the figure will be the full width of the page.
\RequirePackage {stfloats} % full-page-width floats in two-column layout
\begin{figure*}[!t]
% words that stretch the whole page
\tcbincludegraphics[blank]{path/to-file}
\end{figure*}
% continue with two-column text
Setting up a tcolorbox with the float*=!t
option would be even better because you can then adjust all of the layout of the floated content once and reuse it.
Thank you @BrianCriswell !!! That is exactly what I needed.