# Listings Package causes normal text to hyphenate at forward slashes

MWE:

\documentclass{article}

\usepackage{listings}

\begin{document}

IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII hardware/software

\end{document}


This results in this output:

If \usepackage{listings} is commented out, the hyphenation rules return to normal:

And just to note, in the actual environment I'm working in, it will also hyphenate between hard•ware, while with listings enabled, it hyphenates hardware/•software, as in the first image:

Two questions:

1. Why is this happening?

2. Is there a way to disable this? I don't really want this behaviour just because I'm typing code occasionally in a document.

listings changes the \lccode of the slash to 47. This looks like a bug to me. Write to the maintainer.

As a workaround you can set it back to 0:

\documentclass{article}
\usepackage{listings}
\lccode\/=0
\begin{document}

IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII hardware/software

\end{document}
`
• Thank you. It looks like this same bug has been talked about before (but with the tilde) here, and was reported three years ago. I'll try reporting again. – trekky0623 Jan 16 at 14:58