20 April 2010

Thesis margins

What's the point of having two thousand readers if I can't ask a question like this once in a while?

I'm working on the final version of my dissertation -- the one I'll submit to the graduate school next week. The dissertation manual states that no text may appear in the margin area.

LaTeX, on the other hand, keeps wanting to put some pieces of mathematics, which appear inline, in the margins. (Presumably this is because this is "better" than the alternative of having very long inter-word spaces.)

Two questions:
- is there some way to check that nothing's sticking out in the margin? (I thought this is what "overfull \hbox" meant, but the line numbers where those appear aren't the ones where I have this problem.) There are some things that are just barely sticking out into the margin, and with thousands of lines total I don't trust my eye.
- once I find all the places where text protrudes into the margin, is there some way around this other than just inserting \newline every time this problem occurs? This creates its own problems.

I surely can't be the only person who's had this problem, but Google is failing me.

12 comments:

Unknown said...

It's worth checking exactly how strict your powers that be will check your margins.

At my university, apparently, things sticking a tiny bit into the margin are not a problem. Apparently some of the margin gets chopped off when putting the thesis onto microfiche, but if you don't pass that point, nobody will put up a big fuss.

Michael Lugo said...

The consensus seems to be that the powers that be won't be too strict. I've asked around a bit, although it's hard because the only people who know are people who have already graduated and aren't here any more. But I know there are some issues, and I feel like this problem must have been solved before.

Luca said...

If you type \sloppy at the beginning of the latex file then nothing sticks out of the margins, although some lines might contain unsightly excessive white space.

Michael Lugo said...

Luca,

thanks! That's what I wanted. As it turns out, there were few enough errors that I essentially was able to fix them by hand in the half-hour it took to get your answer. But running with \sloppy will give me some peace of mind, at least.

Zac Harmany said...

Is there a draft option for the particular document class you are using? See more on that option here: http://bit.ly/9a706I

Basically it puts a black bar in the margins where things push out.

Zac Harmany said...

Also, following up on Luca's comment, you can use the sloppypar environment if it is only in a few problem areas. See more here: http://handyfloss.wordpress.com/category/latex-for-non-masochists/page/2/

Cheers!

Unknown said...

Okay, arguably a geek solution, but this should work. Not for the faint of heart, though.

1. Convert the document into a set of pictures, 1 for page. Same resolution.
2. Split the pictures at the margins, from left and right. You probably would need to find one representative page, and calculate the number of pixels that you need to strip. from each side.
3. Examine which margin images are not fully white. You can probably use a histogram or some sort of colour analysis if you feel too lazy to examine them all manually.

I believe this can be done in 15 lines of of bash scripting and imagemagick incantations, and an hour of your time. Good luck, and please post a sample script if you choose this method.

Anonymous said...

I had a 300 page thesis, and I just went ahead and manually hyphenated lines where this issue was there... most of my problematic lines were because of technical words or compound words that LATeX did not know how to hyphenate...

Anonymous said...

to help with manual strategy: you can use draft option, which puts black boxes into the output wherever there are over- or underfull box-type issues; just remember to deactivate this option afterwards!!

Anonymous said...

As a typography nerd, please use the \begin{sloppypar} approach. If not, you'll make all paragraphs look worse for no good reasons, even the ones that didn't stick out.

AlfC said...

are we crazy with rules nowadays?
margins are exactly for that.

so if something has to stick out a bit it doesn't stick out of the physical support (paper).

Anonymous said...

check latex's geometry package.