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 have continuously come up with the problem of overfull hboxes because sometimes I write and/or in my papers. For example, this phrase:

To design and implement a biofeedback system for alerting patients and/or health care providers about their current fall risk index.

I know you can set the word providers to the correct hyphenation by using \hyphenation{pro-vid-ers} and carry on, but I wish this was done automatically by babel (as it does it with almost everything else). My guess is that the and/or part is messing with its capabilities of line breaking.

So, just to be safe: What is the correct way to typeset and/or? Should it be and or or does LaTeX have any specific way to deal with this?

UPDATE

MWE:

\documentclass[a4paper,twoside,11pt,openright]{report}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}    
\usepackage[english]{babel}
\usepackage{mathptmx}
\usepackage[outer=25mm,inner=35mm,vmargin=20mm,includehead,includefoot,headheight=15pt,showframe]{geometry}
\usepackage{enumitem}    

\begin{document}

\begin{itemize}[itemsep=0pt,leftmargin=\parindent]
    \item To design and implement a biofeedback system for alerting patients and/or health care providers about their current fall risk index.
\end{itemize}

\end{document}
share|improve this question
    
Would and/ \unskip or work? If so, I would just put it in a \def. –  Steven B. Segletes May 30 '13 at 13:43
    
@StevenB.Segletes Unfortunately it doesn't work. –  Mario S. E. May 30 '13 at 13:47
    
How does 'and/or' cause a problem here? –  jon May 30 '13 at 14:05
    
@jon I'm not sure about it. I feel it causes it because I have seen this before with some other cases where 'and/or' is present. According to egreg "provider" and "providers" slip through the hyphenation algorithm of babel –  Mario S. E. May 30 '13 at 14:06
    
Ah, I did not know about problems with the hyphenation of provider(s). (Note, though, that I think one should avoid hyphenating a word [only in English?] on the final syllable outside of rare cases.) As for 'and/or' that is the correct way to write the term, though it too should be avoided outside rare cases; it is a convenient shorthand that can usually be better expressed in formal prose. E.g., the 8th Admendment: 'cruel and unusual punishment [shall not be] inflicted]'. Surely the point is not that 'cruel or unusual' punishment is OK..? Or would it be better as 'cruel and/or unusual'? –  jon May 30 '13 at 14:24
show 4 more comments

2 Answers 2

up vote 8 down vote accepted

The LaTeX kernel provides \slash for this case, so

and\slash or

is the answer. But, please, avoid this ugly and unnecessary locution.

The definition of \slash is

% latex.ltx, line 467:
\def\slash{/\penalty\exhyphenpenalty} % a `/' that acts like a `-'

The problem you are experiencing and that's summarized in the MWE, has nothing to do with the "hyphenation" of "and/or". The problem is that somehow the word "provider" (and also "providers") slips through the hyphenation patterns for (American) English and so TeX is unable to hyphenate it.

It's not even in the hyphenation exception list stored on CTAN and in TeX distribution as ushyphex.tex. So you have to manually add a hyphenation for it to your document preamble:

\hyphenation{pro-vid-er pro-vid-ers}

would be correct according to Merriam-Webster.

How to find this information? If you compile you document and look in the log file, you'll find

Overfull \hbox (3.02989pt too wide) in paragraph at lines 14--16
[]\T1/ptm/m/n/10.95 To de-sign and im-ple-ment a biofeed-back sys-tem for alert
-ing pa-tients and/or health care providers

The Overfull \hbox messages always show the hyphenation points TeX is able to find for the words in the problematic line, so the difficulty with "provider" is self-evident.

For technical/scientific documents, it can be recommended to load the American English hyphenation exception dictionary:

\input{ushyph}

in the preamble will do. If some words still give problems, add hyphenation exceptions yourself as indicated.

share|improve this answer
    
+1 for "locution" –  Steven B. Segletes May 30 '13 at 13:54
    
I'm sorry, still not working... The only thing that seems to work is to use the \hyphenation command –  Mario S. E. May 30 '13 at 13:54
    
@MarioS.E. -- Without a minimal example it is hard to see whether TeX would break at the and\slash or or thinks that would lead to too bad a paragraph.... (And it does break on a basic \documentclass[12pt]{article} document with nothing else loaded.) –  jon May 30 '13 at 13:58
    
I'm adding the MWE :) –  Mario S. E. May 30 '13 at 14:00
1  
@barbarabeeton This seems to be a candidate for inclusion in ushyphex.tex –  egreg May 30 '13 at 15:10
add comment

You hit another point: English is usually translated with \righthyphenmin=3 as the length of „or“ is smaller than 3. Using \righthyphenmin=2 additionally to the egreg's solution should solve your problem.

share|improve this answer
    
TeX won't hyphenate a "word" containing / (past the slash). –  egreg May 30 '13 at 14:54
    
You are right. Nevertheless, this is the mechanism jon refers to. \righthyphenmin is set to 3 in English while it's usually 2 in German. This honours the fact that in English hyphenation is easier to avoid than in other languages, e.g, German. Despite this fact, it may be just a convention. –  Keinstein May 31 '13 at 16:43
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.