There is one problem that currently seems insolvable to me. I am typesetting a book in Russian language and I noticed that, in some cases, an overfull box appears which cannot be solved via manual hyphenation or linebreak or even emergencystretch, because an em-dash is causing it. Due to the typesetting rules, the em-dash MUST stay at the end of the line if the line is about to break at this point, which is why moving it to the beginning of the next line cannot be considered.
I tried applying microtype, but it seems not being able to condense the em-dash ONLY in case it is positioned at the end of the line AND is causing an overfull. Or to condense it at all, to be honest. If I re-define the width of the em-dash-symbol, the same problem will occur at other positions in the book.
Changing the width of the text body didn't bring the desired effect either, because same situation came up as described above.
Here comes the MWE:
Code: Select all
\documentclass[fontsize=11pt,russian,open=any]{scrbook}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}
\usepackage{fancyhdr}
\usepackage[paperwidth=14.2cm, paperheight=20.4cm, top=1cm, bottom=1.3cm, twoside, inner=1.0cm, outer=1.2cm, bindingoffset=0.5cm, footskip=0.65cm, headsep=0cm, headheight=0cm, voffset=0pt, hoffset=0pt]{geometry}
\usepackage[kerning=true,tracking=true,spacing=true,selected=true,babel=true,stretch=10,shrink=10]{microtype}
\deffootnote[1.5em]{0.5em}{0em}{
\textsuperscript{\thefootnotemark}}
\setlength{\parindent}{1.25em}
\setlength{\emergencystretch}{1pt}
\frenchspacing
\righthyphenmin=2
\renewcommand{\baselinestretch}{0.9}
\clubpenalty=10000
\widowpenalty=10000
\flushbottom
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[EC,OC]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\begin{document}
Когда его вопль, отражаясь испуганной белкой от пустых котлов и голых стен, замер, завязнув в тягучей темноте, снова воцарилась тишина, нарушить которую было не в силах даже потрескивание дров в одиноком камине. Конечно, надо было бы пойти бросить в него ещё несколько поленьев, но за это время эти подонки смогут улизнуть или спрятаться получше!..
--- Да. Его так зовут. Забавно, правда? Царство Костей. Костей~--- правитель Царства Костей.
Агафон насупился, поколебался несколько секунд между <<Именно секрет>> и <<А тебе зачем?>>, но вздохнул подавленно, махнул рукой и признался.
--- В Царство Костей,~--- с надеждой вскинул на него глаза Иван~--- уж не вспомнит ли дед ещё что-нибудь полезное?
--- Ну хорошо. А как насчёт неразговаривания с набитым ртом?~--- не сдавался Костей.
\end{document}
If you take a closer look at the screenshot you'll see that sometimes even the hyphenation symbol is protruding into the margin, which also causes an overfull vbox:
http://imageshack.us/photo/my-images/12/96357038.jpg/
I'd like to know how to handle these overfull boxes. Is there a way to narrow those symbols depending on their position in text or something like this?
Thanks in advance!