2

Say I want to typeset a novel in a format close to the general standard (something like A5 format with top/bottom margins 2cm and margins 2cm & 2.5cm in the spine/non-spine sides of the book --- I don't know the correct term for the latter). What happens with the standard settings is that I get lots of overfull \hboxes. Some can be corrected using \-s, but others simply cannot. I know what TeX wants me to do in this case is to reword the text; however, when I typeset someone else's novel, that's kinda not an option.

So what do I do in this specific case where rewording the text is simply not possible? In some other posts, it is suggested to increase the \tolerance. It makes the layout a bit more ugly at some places, so that solution is not very satisfactory. But are there really any alternatives? If not, what would you set \tolerance to in the above case? (FYI, I tried with \tolerance=1600, mostly as an experiment. It's definitely not ugly.)

EDIT: On a side note, I'm using XeLaTeX with Linux Libertine O. But that shouldn't be a problem, right?

Habi
  • 7,694
Gaussler
  • 12,801
  • 2
    Have you tried the microtype package? – Astrinus Jan 06 '15 at 08:28
  • Yes, I always use it. The problem is there nevertheless. – Gaussler Jan 06 '15 at 08:42
  • with LuaTeX, you can detect overfull boxes and typeset given paragraph again with different values of tolerance and other parameters – michal.h21 Jan 06 '15 at 10:00
  • 1
    I'd try increasing \emergencystretch before I tried changing \tolerance – David Carlisle Jan 06 '15 at 11:04
  • If you are needing to manually add \- are the hyphenation patterns in use suitable for the language? – David Carlisle Jan 06 '15 at 11:07
  • You could try \sloppy for the whole document or delimit the offending regions in \begin{sloppypar}...\end{sloppypar}. The downside may be wider interword spacing than is otherwise prudent. – Steven B. Segletes Jan 06 '15 at 11:22
  • @DavidCarlisle, yes I have loaded them. But XeLaTeX apparently sometimes ignores that. – Gaussler Jan 06 '15 at 12:08
  • @Gaussler yes but what I was getting at is that depending on the novel style the general language hyphenation patterns may not be suitable if the author is using dialect or ancient (or very modern) forms so a custom hyphenation pattern (or at least a long list of hyphenation exceptions) may be meeded – David Carlisle Jan 06 '15 at 12:15
  • 1
    @Gaussler but you know the score by now: without an MWE impossible to give any detailed suggestions of changes to parameters. – David Carlisle Jan 06 '15 at 12:16
  • @DavidCarlisle Well, the language problem is not there in the concrete novels I typeset. But my settings are more or less standard (and vary BTW), so I don't think a MWE really makes sense. But which value of \emergencystretch would you recommend? – Gaussler Jan 06 '15 at 15:12
  • @Gaussler big enough so you get no overfull boxes but small enough that the stretched white space doesn't make you cry:-) it depends:-) \textwidth will ensure that there are no overfull boxes so long as each non-hyphenatable unit is smaller than textwidth but it says you can have a line with two words one at each end and almost textwidth of space in between... (but unlike changing tolerance emergencystretch is not consulted in the initial pass so if there is a good setting it's not used and it is only used if it was going to make an overfull box) – David Carlisle Jan 06 '15 at 15:18
  • 1
    @Gaussler: With a one-column document, you can probably manage with just \emergystretch=.5em. – morbusg Apr 07 '15 at 07:12

1 Answers1

1

I'm typesetting a novel in LaTeX. The microtype package works well with pdflatex. If you don't use it, you won't benefit from it's features like Expansion, Kerning, Spacing and Tracking. (XeTeX does support Protrusion now) Here's a link to the TeX-stackexchange post regarding that issue.. Is microtype fully supported now by XeLaTeX? If not, how can I keep myself up-to-date?

You will also notice differences using different fonts. I've found some work more poorly than others. I'm using newcent "New Century Schoolbook". It's already prepackaged in TeXlive.

You can adjust the possible hyphenation of words in someone else's novel.

\usepackage{hyphenat}
\hyphenation{divis-ible hy-phenate hyphe-nate always indivisible master-piece}
\begin{document}
Now this word is not \nohyphens{divisible}. This word is now divisible again.

You can also justify with \sloppy if you'd settle for a more apparently squashed or stretched line than perfection, then return to \fussy justification when you only want the best standards available.

user12711
  • 2,753
  • 1
    In fact, I switched to LuaLaTeX since then, which supports more features in microtype. – Gaussler Mar 24 '15 at 11:09
  • 1
    Just a note for users holding back from switching to LuaTeX/XeTeX based purely on the options available in [tag:microtype]; The only thing setting them apart from pdfTeX in that regard is font expansion, which one could actually consider bad typography! – morbusg Apr 07 '15 at 07:09