Text FormattingLatex adding extra page

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
singlebinary
Posts: 12
Joined: Fri Mar 12, 2010 5:43 pm

Latex adding extra page

Post by singlebinary »

Here is what I would like:
The section begins towards the end of the page, say Page 1. Here it manages three lines before it goes over. On Page 2, I want to add a longtable. The table begins on page 2 and ends half way on page 3. The text from page 1 continues on page 3 after the table ends.

What is happening:
The section begins as it should on Page 1. However the table instead of beginning on page 2 begins on Page 3. Page 2 is blank. The table ends half way on page 3 as usual. The text continues from page 1 on page 3 after the table ends as I want.

How do I remove the blank page that latex is adding?

Thank you!

Code: Select all


\section{Identified lines}

Table 6.1 shows the wavelength positions of the identified neutral atomic lines. The first column lists the wavelength position of the neutral atomic line as it is listed in Vienna Atomic Line Database (VALD)(Kupka et al., 2000). The second line position was calculated using 

\input{tables/table6_1}

\noindent the SPLOT task in IRAF \footnote{IRAF is distributed by the National Optical Astronomy Observatories, which are operated by the As- sociation of Universities for Research in Astronomy, Inc., under cooperative agreement with the National Science Foundation}. The last column is the oscillator strength, log(gf) for each line. Log(gf) is a dimensionless quantity that states the strength of a transition. More negative log(gf) is, the weaker is the transition. As stated in Section 4.3, the wavelength position of atomic lines are calculated in air.



Recommended reading 2024:

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

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

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: Latex adding extra page

Post by kaiserkarl13 »

It is absolutely impossible to answer your question without a minimal working example. TeX typesets the page depending on the full content. We need to see the \include'd file to see what's happening.

My suspicion is that you've enclosed your longtable environment inside a table environment, which you should not do. Longtable and supertabular provide their own numbers, and should not be included inside a floating environment like table.
php1ic
Posts: 192
Joined: Wed Jan 28, 2009 8:17 pm

Latex adding extra page

Post by php1ic »

When you use \include{file} latex actually caries out

Code: Select all

\clearpage \input{file} \clearpage
Try changing your \include{} to \input{}
singlebinary
Posts: 12
Joined: Fri Mar 12, 2010 5:43 pm

Latex adding extra page

Post by singlebinary »

Thanks for your suggestions. I do not have any \include instead I have used \input as you can see below. Ok, the code looks like the following (see below).

Code: Select all


\section{Identified lines}

Table 6.1 shows the wavelength positions of the identified neutral atomic lines. The first column lists the wavelength position of the neutral atomic line as it is listed in Vienna Atomic Line Database (VALD)(Kupka et al., 2000). The second line position was calculated using 

\input{tables/table6_1}

\noindent the SPLOT task in IRAF \footnote{IRAF is distributed by the National Optical Astronomy Observatories, which are operated by the As- sociation of Universities for Research in Astronomy, Inc., under cooperative agreement with the National Science
I will try to explain exactly what I need. As seen in the figure, I would like to move the table to that blank page and wrap the table with the text. Latex is not letting me wrap the text around the table.

Boy! how do I upload an image so you all can see??

Code of the input table:

Code: Select all


{
\begin{center}
\begin{longtable}{ c c c c }
%Here is the caption, the stuff in [] is the table of contents entry,
%the stuff in {} is the title that will appear on the first page of the
%table.
\caption{Atomic Lines in M dwarfs spectra} \label{label} \\

%This is the header for the first page of the table...
\hline \hline \\[-2ex]
   	\multicolumn{1}{c}{VALD Wavelength} &
    	 \multicolumn{1}{l}{IRAF Wavelength} &
	\multicolumn{1}{c}{Atomic Line} &
	\multicolumn{1}{l}{log (gf)} \\[0.5ex] \hline
   \\[-1.8ex]
\endfirsthead

%This is the header for the remaining page(s) of the table...
\caption{Atomic Lines in M dwarfs } \\
\hline \hline \\[-2ex]
   	\multicolumn{1}{c}{VALD Wavelength} &
    	 \multicolumn{1}{l}{IRAF Wavelength} &
	\multicolumn{1}{c}{Atomic Line} &
	\multicolumn{1}{c}{log (gf)} \\[0.5ex] \hline
   \\[-1.8ex]
\endhead

\multicolumn{3}{l}{{Continued on Next Page\ldots}} \\
\endfoot

%This is the footer for the last page of the table...
  \\[-1.8ex] \hline \hline
\endlastfoot


% data begins here...
  11690.220 ...
.
.
.
.		
\end{longtable}
\end{center}
}
Yep! That's part of my thesis! :-)
php1ic
Posts: 192
Joined: Wed Jan 28, 2009 8:17 pm

Re: Latex adding extra page

Post by php1ic »

Sorry singlebinary, I mis-read your first post.

If I compile the code you posted (You have missed off the closing footnote bracket) I get the first paragraph then the table then the next paragraph without any blank pages or unexpected page breaks.

It may be something to do with either the document class or other packages that conflict with the longtable package. Can you post a MWE.
singlebinary
Posts: 12
Joined: Fri Mar 12, 2010 5:43 pm

Latex adding extra page

Post by singlebinary »

Thanks for your response. I am sure what is meant by MWE. I believe you mean the code of the main document. Skip the personal information such as author{}, advisorname{} and so forth..they are filled out when I run the code.

Code: Select all

\documentclass[letterpaper,12pt]{UCF_report}
\usepackage{amssymb} %% additional symbols and fonts
\usepackage{amsmath}
%\usepackage{eqnarray}
\usepackage{enumitem}
\usepackage{graphicx}  %% for including graphics
\usepackage[hmargin={1in,1in},top=1.25in,bottom=1in]{geometry} %% Sets up margins
% \usepackage{subeqnarray} %% subsequations, numbered with letters, like (1.1a), (1.1b), etc
% \usepackage{subfig}  %% enables multiple figures in a table-like form with separate captions
\usepackage{mathrsfs} %% additional scripted letters in math mode
\usepackage{aalongtable}
\usepackage{threeparttable}
\usepackage{natbib}
\bibpunct{(}{)}{;}{a}{,}{,}
\usepackage[pdftex,colorlinks=true,linkcolor=black,citecolor=black,bookmarksnumbered=true,urlcolor=blue]{hyperref}  %% hyperlinks  %% and bookmarks

% \makeatletter
% \@ifundefined{pdfoutput}\ % Definitely not using pdftex.
% {% Standard TeX
% \usepackage[dvips]{graphicx,color}
% }
% {\ % Running pdftex.
%   \ifnum\pdfoutput=0\relax% Are we outputting pdf?
%     \ % No it is dvi output
%     \usepackage[dvips]{graphicx,color}
%   \fi
%   \ifnum\pdfoutput=1\relax% Are we outputting pdf?
%     \ % Yes it is pdf output
%     \usepackage[pdftex]{graphicx,color}
%   \fi
% }
% \makeatother

%  \usepackage{eps2pdf}
%\include{definitions} %% if you have any user defined functions place them in the file "definitions.tex"

% \captionsetup[table]{position=top}  %% to make sure table captions are at the top
% \captionsetup[subtable]{position=top}

\title{}
%% the space without \tilde (~) is the place where the line will be broken

\author{}

\prevdegreei{}  %% first degree
\prevdegreeii{}  %% second degree (optional)
\prevdegreeiii{}   %% third degree (optional)

\thesisname{dissertation}  %% dissertation or thesis choose yours
\degreename{Doctor of Philosophy} %% choose yours or cange to: Master of Science/Arts
\departmentsname{Department of Physics} %% mine is Mathematics
\collegename{College of Sciences} %% mine is Science
\termname{Summer} %% it is Summer, Fall or, most likely, Spring

\advisername{}

\begin{document}

\thispagestyle{empty}
\maketitle

\doublespacing  %% it makes double spaced lines, if you want singlespaced use "\singlespacing"

%\include{abstract}  %% abstract, dedication and acknowledgments goes to this file,  see "abstrac.tex"

% \pdfbookmark[0]{TABLE OF CONTENTS}{tableofcontents}  %% manually ads a bookmark
\tableofcontents

%\listoffigures

%\listoftables

%\include{listofsymbols}

\newpage

 \pagenumbering{arabic} %% just to set page numbering to regula arabic
 \setcounter{page}{1}  %% and start from page number 1 on the first page of the firs chapter
\include{chapter_1.1}  %% your chapters are in separate file -- much easier to navigate through the text
\include{chapter_2.1}  %% everytime u use include it starts at the top of the new page, so it's good for chapters
%\include{table1}
\include{chapter_3.1.1}
\include{chapter_4.1.1}
\include{chapter_5.1.1}
\include{chapter_6.1.1}

% \appendix  %% just makes "Chapter" to be called "Appendix"

% \include{appendix_A}  
% \include{appendix_B}  %% you may have more than one appendix, use letters to distinguish among them

%\bibliographystyle{alpha} %% you can choose different bibliography style and the rest ia all automatic, is-alpha, alpha, unsrt, amsalpha
\bibliographystyle{plainnat}
\bibliography{bibitems} %% this is your database with literature

\end{document}
torbjorn t.
Posts: 162
Joined: Wed Jun 17, 2009 10:18 pm

Re: Latex adding extra page

Post by torbjorn t. »

Post Reply