GeneralSpreading a Figure over 2 pages

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
kal26
Posts: 6
Joined: Wed Aug 27, 2008 11:20 am

Spreading a Figure over 2 pages

Post by kal26 »

Hi All,

I'm busily making my PhD thesis look nice (deadline in a week) and have one figure that is just too big for one page, but I can't seem to make it spread to two. I've tried putting a \pagebreak in the middle of the figure, to no avail. Does anyone have any other suggestions?

Here's the figure code:
\begin{figure}
\begin{footnotesize}
\noindent{\bfseries Relaxation and Post-operative Pain Study: Pre-Admissions Clinic Questionnaire}\\

\begin{enumerate}
\item{\bfseries Personal Information}\\
\begin{itemize}
\item{Full Name}
\item{Patient No.}
\item{Gender: Male/Female}
\item{Age}
\item{Occupation}
\item{Retired (Y/N)}
\item{GP Name}
\item{GP Practice}
\item{GP Contact Details}
\end{itemize}

\item{\bfseries Medical and Pain History}
\begin{itemize}
\item{Where do you feel pain?}
\item{Where do you feel pain most often?}
\item{How long have you had your knee condition?}
\item{What triggered your knee condition?}
\item{Have you had a knee replacement operation before? (Y/N) \\
If yes, which knee?}
\item{Which knee will be operated on this time?}
\item{Do you find that your knee problems interfere with your life? (Y/N)\\
If yes, in what way?}
\item{Do you suffer from an anxiety or depression medical condition? (Y/N) \\
If yes, how does this affect you?}
\item{Do you currently take any form of medication? (Y/N) \\
If yes, what medication? \\
Is this medication to control pain? \\
How often do you take this medication?}
\item{Are you currently undergoing any form of complementary therapy? (Y/N) \\
If yes, what type of therapy? \\
How often do you use this treatment? }
\item{Do you suffer from any form of hearing loss? (Y/N) \\
If yes, how does this affect your hearing? \\
If yes, do you currently wear a hearing device? (Y/N)}
\end{itemize}

\item{\bfseries Relaxation: All Participants}
\begin{itemize}
\item{How do you relax in your free time?}
\item{Where do you find it easiest to relax?}
\item{Do you prefer to be on your own to relax? (Y/N)}
\item{Have you ever used relaxation techniques? (Y/N) \\
If yes, what techniques have you used?}
\item{Do you enjoy the quiet? (Y/N) \\
If yes, when?}
\item{Is your sleep easily disturbed? (Y/N) \\
If yes, by what?}
\item{Do you find yourself easily distracted from tasks? (Y/N) \\
If yes, what distracts you?}
\end{itemize}

%%%\pagebreak (Didn't work! But would like the break to go here)

\item{\bfseries Musical Experience: Experimental Participants Only}
\begin{itemize}
\item{Do you play a musical instrument? (Y/N) \\
If yes, what instrument(s)? \\
How long have you been playing? \\
Do you still play your musical instrument? (Y/N) }
\item{Have you ever had formal instrumental music lessons? (Y/N) \\
If yes, on what instrument(s)? \\
For how long did you undertake formal instrumental music lessons? }
\end{itemize}

\item{\bfseries Musical Preferences}
\begin{itemize}
\item{What types of music do you like? \\
Please give an example}
\item{ What is your favourite type of music? \\
Please give an example}
\item{What types of music do you dislike? \\
Please give an example}
\item{Do you regularly listen to music? (Y/N) \\
If yes, when do you listen? \\
What format is your listening in? (e.g. tapes, CDs, radio, live music)}
\item{How many hours per day or hours per week do you spend listening to music?}
\item{What type of listening do you use (active, passive or both)?}
\end{itemize}
\end{enumerate}
\end{footnotesize}

Thanks so much for the help - this thesis is my first attempt at LaTeX and it has been a huge learning curve!

Looking forward to some support,

Kal26

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

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

Spreading a Figure over 2 pages

Post by localghost »

I wonder anyway why you use a figure environment for this simple list. Since you don't use a caption, you should simply omit the figure environment.

Instead of the footnotesize environment you should use switches to change the font size.

Code: Select all

\footnotesize
...
\normalsize
You can learn more about that by reading lshort.


Best regards and welcome to the board
Thorsten¹
kal26
Posts: 6
Joined: Wed Aug 27, 2008 11:20 am

Re: Spreading a Figure over 2 pages

Post by kal26 »

My apologies - I think I missed the last part out of the figure when I pasted in the code. It should end:

\caption{Pre-Admissions Clinic Questionnaire}
\label{fig:pacquestionnaire}
\end{figure}

I have kept it in a figure environment because it is in an appendix which has no text, only graphics and tables, therefore it needs to stay together and not get broken up by floats, and it needs to be references in the main text of the thesis. If it remains as a figure, is there any way I can break it up?

Will try the switches for changing font size.

Thanks so much for your quick reply.

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

Spreading a Figure over 2 pages

Post by localghost »

Well, with these explanations your intentions are clarified. I suggest to take a look at the caption package. It not only lets you customize your float captions but also allows to split floats with a trick. Search the documentation for the \ContinuedFloat command. In case of further upcoming questions, feel free to ask.
kal26
Posts: 6
Joined: Wed Aug 27, 2008 11:20 am

Re: Spreading a Figure over 2 pages

Post by kal26 »

That's brilliant and is looking great - thank you so much. For anyone else with a similar problem, http://www.signalsguru.net/articles/lat ... exfig.html has a good \ContinuedFloat tutorial.

Only problem: I was using an \begin{enumerate} environment which I wanted to continue across the pages. In the second half, it now begins counting again at 1, rather than continuing to 4 and 5. How do I get this to continue counting from before or specify that it starts at 4, not at 1.

Many thanks indeed,

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

Spreading a Figure over 2 pages

Post by localghost »

kal26 wrote:[...] Only problem: I was using an \begin{enumerate} environment which I wanted to continue across the pages. In the second half, it now begins counting again at 1, rather than continuing to 4 and 5. How do I get this to continue counting from before or specify that it starts at 4, not at 1. [...]
That's a job for enumitem. It customizes the list environments and lets you resume enumerated lists.

Code: Select all

\begin{enumerate}[resume]
  ...
\end{enumerate}
kal26
Posts: 6
Joined: Wed Aug 27, 2008 11:20 am

Re: Spreading a Figure over 2 pages

Post by kal26 »

Grand, that nearly works, but now it does items 1, 2 and 3 on one page and then starts again with 3 and 4 on the next page (not 4 and 5 which I want). I've compiled a number of times, but with no change. Thank you for your patience.

Here's the code I'm using:

\begin{figure}
\begin{footnotesize}
\noindent{\bfseries Relaxation and Post-operative Pain Study: Pre-Admissions Clinic Questionnaire}\\
\begin{enumerate}
\item{\bfseries Personal Information}\\ %% Item 1
\begin{itemize}
\item{Full Name}
\end{itemize}

\item{\bfseries Medical and Pain History} % % Item 2
\begin{itemize}
\item{Where do you feel pain?}
\end{itemize}

\item{\bfseries Relaxation} % % Item 3
\begin{itemize}
\item{Distraction}
\end{itemize}
\end{enumerate}
\end{footnotesize}
\end{figure}

\begin{figure}
\ContinuedFloat
\begin{footnotesize}
\begin{enumerate}[resume]
\item{\bfseries Experience} % % Should be item 4 but comes out as item 3
\begin{itemize}
\item{what experience}
\end{itemize}

\item{\bfseries Preferences} % % Should be 5 but comes out as 4
\begin{itemize}
\item{What preference }
\end{itemize}
\end{enumerate}
\caption{Pre-Admissions Clinic Questionnaire}
\label{fig:pacquestionnaire}
\end{footnotesize}
\end{figure}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Spreading a Figure over 2 pages

Post by localghost »

I can't comprehend this effect. I built a MWE as the following code shows.

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage[centering,includeheadfoot,margin=2cm]{geometry}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{enumitem}
\usepackage{txfonts}

\parindent0em

\begin{document}
  \begin{figure}[!ht]
    \footnotesize
    \noindent
    \textbf{Relaxation and Post-operative Pain Study: Pre-Admissions Clinic Questionnaire}\\
    \begin{enumerate}
      \item \textbf{Personal Information}  % Item 1
        \begin{itemize}
          \item Full Name
        \end{itemize}
      \item \textbf{Medical and Pain History}  % Item 2
        \begin{itemize}
          \item Where do you feel pain?
        \end{itemize}
      \item \textbf{Relaxation}  % Item 3
        \begin{itemize}
          \item Distraction
        \end{itemize}
    \end{enumerate}
    \normalsize
    \caption{Pre-Admissions Clinic Questionnaire}\label{fig:pacquestionnaire}
  \end{figure}

  \begin{figure}[!ht]
    \ContinuedFloat
    \footnotesize
    \begin{enumerate}[resume]
      \item \textbf{Experience}  % Should be item 4 but comes out as item 3
        \begin{itemize}
          \item what experience
        \end{itemize}
      \item \textbf{Preferences}  % Should be 5 but comes out as 4
        \begin{itemize}
          \item What preference
        \end{itemize}
    \end{enumerate}
    \normalsize
    \caption{Pre-Admissions Clinic Questionnaire (cont.)}\label{fig:pacquestionnaire-cont}
  \end{figure}
\end{document}
The result is presented in the attachment. As you can see, it works fine. The changes I made leave the result untouched. Your original code did the same.
Attachments
olatex_85048.pdf
Resulting PDF of the given code
(28.26 KiB) Downloaded 1129 times
renateb
Posts: 1
Joined: Thu Oct 16, 2008 1:40 pm

Re: Spreading a Figure over 2 pages

Post by renateb »

I also used continuedfloat, but i have 4 figure with 6 sublfloats inside each figure.

The problem is that every figure is numbered the same (4.3), subfloats are ok with a, b, c etc.

How can i solve this problem?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Spreading a Figure over 2 pages

Post by localghost »

Simply remove \ContinuedFloat from the figure environments.


Best regards and welcome to the board
Thorsten¹
Post Reply