[XeTeX] preventing hyphenation

Ulrike Fischer news3 at nililand.de
Mon Feb 21 10:22:11 CET 2011


Am Sun, 20 Feb 2011 22:34:14 -0500 schrieb Mike Maxwell:

> On 2/19/2011 12:13 AM, I wrote:
>> In a grammar we're writing, the transcription of a word "xowunʣāy" gets
>> hyphenated immediately after the 'x'. I thought I could prevent this by
 
> After a great deal of pulling of hair, I think I've found what's 
> happening.  I'm recording it here in case it helps anyone (and because 
> one aspect of it seems a bit odd, possibly buggy--although it's beyond 
> my competence to decide that).

> I'm attaching a minimal example after my signature.  

 > What seems odd to me about this (and possibly indicative of a bug) is 
> that the \hyphenate{/xowun/} command only seems to need the slashes 
> around "xowun" if I load the 'listings' package; indeed, without the 
> 'listings' package the command \hyphenate{/xowun/} results in an error 
> msg ("Not a letter", referring to the slash).  Why should the 'listings' 
> package affect how the "/" character is treated by the \hyphenate command?

listings changes the \lccode of certain chars (including the slash,
which has lccode 47 with listings) and TeX now things the slash is a
letter. 

This problematic behaviour has been discussed a year ago
(https://groups.google.com/group/comp.text.tex/browse_thread/thread/4e19fb344add0d18?hl=de,
most importantly see the last posting of Dan Luecking), but I don't
know if someone notified the current maintainer Brooks Moses. 

You can reset the \lccode, then the wrong hyphenation disappears. I
don't know if this will give trouble with listings, but you can
always reset it again to another value.

\documentclass[11pt,letterpaper]{report}
\showthe\lccode`\/

\usepackage{listings}
\showthe\lccode`\/
\begin{document}
\lccode`\/=0
\hyphenation{xowun}
%First para: /xowun/ is erroneously hyphenated:
A suffix: Now is time for good suffixes to come
Applies to nouns.  /xowun/

%\hyphenation{/xowun/}
%Second para: /xowun/ is correctly not hyphenated:
A suffix: Now is time for good suffixes to come
Applies to nouns.  /xowun/

\end{document}


> I'm also unsure why the 'bibtopic' package needs to be loaded (without 
> the 'bibtopic', I get a "Missing \begin{document}" error msg).  

I don't get the message. Did you deleted the aux-file in your tests?


-- 
Ulrike Fischer 



More information about the XeTeX mailing list