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 wonder if there is any automatic approach to detect hanging text all throughout the 200-page thesis, mostly due to hyphenation issues. Consider the output below, there is like a subtle hanging text (yellow), which I think would be a very tedious task in a thesis last-minute situation to check and to look for such irksome typesetting flukes. The same issue will pop up each time you do some text edit, and will continue to be bothersome if you seek a perfect right-margin-typesetting text, it is like a moving target. I wonder where in the log file, one can read hints pointing out to these lines? or may be a package to detect them?

Example

enter image description here

Update

MWE

\documentclass{scrartcl}
\usepackage[english]{babel}
\usepackage{fontspec}
\usepackage{libertine}

\begin{document}
In summary, IL-17 can be produced by innate and adaptive cells, but more profoundly from innate sentinel cells of the immune system. 
The nTh17 is a novel subset that is thymic-\hspace{0pt}dependent and shows a distinct developmental pathway from iTh17 cells that are derived from naive T cells.

In summary, IL-17 can be produced by innate and adaptive cells, but more profoundly from innate sentinel cells of the immune system. 
The nTh17 is a novel subset that is thymic"-dependent and shows a distinct developmental pathway from iTh17 cells that are derived from naive T cells.
\end{document}

Output
enter image description here

Question
What is the shorthand equivalent to writing thymic-\hspace{0pt}dependent in LaTeX? or is there any way to set this kind of hyphenation globally for all already hyphenated words?

share|improve this question
4  
Those are overfull boxes in the log file. –  Juri Robl May 19 at 9:46
    
unfortunately, not helpful, sometimes misleading or unnoticeable may be, e.g., Overfull \hbox (0.11844pt too wide) in paragraph at lines 2819--2837, I checked these lines and were very acceptable, is there any threshold no. above which it is worth checking in PDF?, besides, I guess it is impractical, I got many of these overfull mesges, but fine with them, some belong to tables, or other floats but not text. –  doctorate May 19 at 9:50
5  
If you think .11pt is acceptable, set \hfuzz=.12pt and then TeX will not tell you about those, and just tell you about unacceptable ones –  David Carlisle May 19 at 9:59
    
1  
by default tex doesn't hyphenate hyphenated words, most babel languages have a shortcut such as "- for an explicit hyphen that allows hyphenation or you can use -\hspace{0pt}dependent which will also allow hyphenation –  David Carlisle May 19 at 10:07

1 Answer 1

up vote 11 down vote accepted

Class option draft/\overfullrule

The class option draft of the standard classes (article, report, book) sets \setlength{\overfullrule}{5pt}. Then the overfull \hboxes are much more easier to find on a page, because they get a black rule, whose width is controlled by \overfullrule.

Also some other classes set \overfullrule if option draft is given, e.g. memoir, KOMA-Script classes. If another class does not provide such an option or if someone do not want to use a global option draft, because it is also seen by the packages, \overfullrule can be set manually, see above.

Ignore small overfull warnings/\hfuzz

Settings to \hfuzz to ignore small overfull \hbox values are already covered in the comments and the cited answer.

Own babel shorthands

Package babel allows the definition of personal shorthands. Example, modified from the documentation:

\usepackage[english]{babel}[2014/03/24]% v3.9k
\useshorthands*{"}
\defineshorthand{"-}{\babelhyphen{hard}}
...
thymic"-dependent
share|improve this answer
    
what about KOMA-script class? –  doctorate May 19 at 11:14
    
@doctorate the KOMA classes act the same in this respect –  cgnieder May 19 at 11:19
    
apart from detection, I am fine with -\hspace{0pt}, pls read updated question, any idea? –  doctorate May 19 at 12:04

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.