LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-29-2009, 12:10 AM   #1
titanium_geek
Senior Member
 
Registered: May 2002
Location: Horsham Australia
Distribution: elementary os 5.1
Posts: 2,479

Rep: Reputation: 50
LaTeX: don't want to *force* page break, just make the text respect the footer


Ok. So, here is a screenshot of what is happening:

http://www.flickr.com/photos/32343725@N00/3767441785/

As you can see the text is floating past the page number "2".

This is the code:

Code:
\documentclass[a4paper,12pt]{article}

\usepackage{array}
\usepackage[pdftex]{graphicx}
\usepackage{cite}
\usepackage{multirow}

\setlength{\hsize}{16cm}
\setlength{\textwidth}{\hsize}
\setlength{\vsize}{22cm}
\setlength{\textheight}{\vsize}
\setlength{\parskip}{5mm}
\setlength{\parindent}{0cm}
\setlength{\hoffset}{-2cm}
\setlength{\voffset}{-1cm}

\title{\rule{0.6\linewidth}{1pt}
\ \\
Computer Systems 2 \\
Journal\\
\\
\rule[3mm]{0.6\linewidth}{1pt}
}

\author{Student
%your name here 
\vspace*{15ex}
}

\begin{document}

\maketitle
%\thispagestyle{empty}

\begin{verbatim}
<snip>
\end{verbatim}



\newpage
\thispagestyle{plain}
\section{Tutorial One}
%you might want to add some thoughts here.
%Adding the date of your tutorial might be helpful also.

\section{Practical One}
%Add the date of your prac here. 


\subsection{Understanding Python}
%Section 7.1 on Prac 1


\subsection{Knowing FTP and SVN}
%Section 7.2 on Prac 1

\subsection{Understanding the Mutual Update Problem}
%Section 7.3  on Prac 1

%%%%%%
<snip> (just multiple \section stuff) 

%%%%%%%
\section{Final Thoughts}

%%%%%%%

\end{document}
I don't want to force a \pagebreak because eventually each heading will have text filled into it and that will mess with the formatting. (Right?) Trying to Google this just turns up results for \pagebreak and I don't know what else to google.

I'm using TeXshop on MacOSX.

Please tell me if you think I should just leave the formatting alone and fix it when the document is finished. This is sucky though because I was hoping to share the document as a template.

Thanks!

titanium_geek
 
Old 07-29-2009, 06:36 AM   #2
Matz
Member
 
Registered: Oct 2006
Distribution: Kubuntu 9.04, Debian Etch
Posts: 178

Rep: Reputation: 31
I guess this problem will get fixed once the text inside sections and subsections is inserted. LaTeX cannot places the titles properly because there so many floating objects (titles) and so little text. That is my diagnosis. Hope it helps
 
Old 07-29-2009, 08:30 AM   #3
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Your title gets error
Code:
! LaTeX Error: There's no line here to end.
using: LaTeX2e <2005/12/01>

Better:
Code:
\title{\rule{0.6\linewidth}{1pt}\\
\vspace*{2ex}
Computer Systems 2 \\
Journal\\
\vspace*{2ex}
\rule[3mm]{0.6\linewidth}{1pt}
}
However - it is doubtful that this is the cause of your output anomaly.
Even with the error, pdf output I get from your file does not show the page overrun that you see.

For me - "final thoughts" is half-way down page 2 ... the footer should be at the bottom. It is not clear from your picture how the page is filled up. However, when fill the sections with lorem ipsum to bulk it out, or even just vertical space, the page size is honored.

This means that the trouble is either in your viewer or TeXshop.
Unless you've been playing around with custom page styles?
 
Old 07-30-2009, 04:17 AM   #4
titanium_geek
Senior Member
 
Registered: May 2002
Location: Horsham Australia
Distribution: elementary os 5.1
Posts: 2,479

Original Poster
Rep: Reputation: 50
Thanks Simon! Title Error fixed.

There are a total of 13 sections, I snipped from the code for readability.

No custom pagestyles.

Matz, your diagnosis looks like the correct one- copy-pasting various size lorem-ipsum text under each section and bingo, no evil page footer violations.

Thanks, both!

titanium_geek
 
  


Reply

Tags
format, latex, text



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LaTeX to HTML - all on one page jantman Linux - Software 1 12-03-2008 09:12 AM
Page break command gubak Linux - Newbie 1 03-13-2007 04:27 AM
SNORT Rule for netbios brute force break-in SnortUser Linux - Security 1 02-12-2004 02:28 PM
HTML page break? patpawlowski Programming 4 02-12-2004 10:30 AM
Make Screen respect bash aliases VxJasonxV Linux - Software 8 02-05-2004 03:00 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration