TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using clrscode to typeset my algorithms. This package provides the \proc command in order to typeset the name of a procedure with some nice small-caps.

In a text paragraph I refer to some procedure name and unfortunately it is very long and the \proc command prevents it from breaking.

How can I force it to break the line or emulate the look&feel of \proc?

EDIT: This is an example piece of LaTeX code, where the procedure name does not break for me:



Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Duis nec nisi mollis augue pulvinar condimentum sed quis dolor.
$\proc{Some-Very-Long-Proc-Name-That-Does-Not-Break}(E, P, Q)$.
Nam libero metus, vehicula vitae euismod a, scelerisque eget neque.
Morbi tristique tincidunt urna ut tempor.
Vestibulum sapien justo, pulvinar a porttitor eget, vestibulum a quam.
share|improve this question
As far as I can see, \proc doesn't prevent line breaks. Can you give a minimal working example (MWE)? – egreg Sep 12 '11 at 21:57
@egreg: I've added an example that doesn't work for me. – Jasiu Sep 12 '11 at 22:50
up vote 1 down vote accepted

TeX breaks inline math only after relation or operation symbols. In that case the argument of \proc is treated as a function name and should not be split across lines, from a mathematician's point of view.

However, in tough cases where no alternative is feasible, you can say


specifying with \- the preferred points where the name can be split. I'd prefer this "manual" way than relying on the automatic hyphenation.

share|improve this answer

Your Answer


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.