Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am compiling a LaTeX document on Ubuntu and I am getting those warnings, errors, or whatever. Any idea about them?

Package hyperref Warning: Height of page (\paperheight) is invalid (0.0pt),
(hyperref)                using 11in.
Underfull \hbox (badness 10000) has occurred while \output is active
Underfull \vbox (badness 10000) has occurred while \output is active []
LaTeX Warning: `h' float specifier changed to `ht'.
share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

Package hyperref Warning: Height of page (\paperheight) is invalid (0.0pt), (hyperref) using 11in.

Obviously your class doesn't define \paperheight, so you have to do it by yourself or rely on defaults.

For example, to get A4 paper, use:

\setlength{\paperheight}{297mm}
\setlength{\paperwidth}{210mm}

For letter paper:

\setlength{\paperheight}{11in}
\setlength{\paperwidth}{8.5in}

Underfull \hbox (badness 10000) has occurred while \output is active

Underfull \vbox (badness 10000) has occurred while \output is active []

Have a look at: What are underfull hboxes and vboxes and how can I get rid of them?

LaTeX Warning: 'h' float specifier changed to 'ht'.

You used a placement option h for a float (table or figure). If LaTeX cannot place it right there because of too less space, it moves it to the top of the next page and issues that warning.

Usually h is too strict. This way you don't allow top, bottom or page placement. Use at least ht instead, or relax it to htbp or even !htbp if you like. If you really need it to be exactly "here", use the H option together with the float package. There are further ways. But adding placement options is usually fine.

share|improve this answer
    
Thanks Stefan, you did me a great favour :-) –  Promather Dec 12 '10 at 20:05
    
One question though, why do I have to hard code constants in the TeX file (297mm, etc.)? A4, letter, etc., are all very famous, shouldn't there be any constant for them? –  Promather Dec 12 '10 at 20:07
1  
Commonly classes define supported paper sizes. For example, presentation classes (powerdot, beamer, slides, seminar) don't need paper sizes such as A4 or letter; poster classes use very large sizes, flashcard/business card sizes very small instead. But you're right: a place where standard sizes are defined would be good. The geometry package defines a lot of such sizes, and I guess most people just use that, if not class options. –  Stefan Kottwitz Dec 12 '10 at 20:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.