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?






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

  • 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

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:


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

  • 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

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.

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.