[texhax] [Tex Help] How can (La)TeX break word with underscores (_) at arbitary place?

Hartmut Henkel hartmut_henkel at gmx.de
Thu Oct 19 00:14:59 CEST 2006


On Wed, 18 Oct 2006, Wei_Hu at mtk.com.tw wrote:

> A macro named 'SECONDARY_EXTSRAM_LARGEPOOL_NORMAL', (La)TeX doesn't
> know how to break this string at the page margin. The final result I
> got shown below:

you could wrap the name by an \url{} macro like:

\documentclass{article}
\usepackage{url}
\begin{document}

a aaaa aaaaaa aaaaaaaaa aaaaaaaaaaaa
\url{SECONDARY_EXTSRAM_LARGEPOOL_NORMAL}
\end{document}

This happens to allow hyphenations also after underscores. And checking
url.sty shows you which other characters also allow this.

Regards, Hartmut


More information about the texhax mailing list