# Suppress hyphenation marking in selnolig

The selnolig package is inserting hyphenation marks at any possible point. How do I suppress this behaviour?

\documentclass{article}

\usepackage{fontspec}
\usepackage[english]{selnolig}

\begin{document}

Th­ese com­prise the ff, fi, fl, ffi, and ffl lig­a­tures as well as
the ft and fft lig­a­tures. Other f-lig­a­tures, such as fb, fh, fj
and fk, are sup­pressed glob­ally, while ex­cep­tions are made for
names and words of non-English/Ger­man ori­gin, such as Kafka and fjord.

\end{document}


Edit: (Just to sum up the comment section)
I obtained the sample text from http://ctan.org/pkg/selnolig (directly on the site and not the PDF file containing the package's user guide). The text from CTANs descriptor page contains these 'invisible' hyphenation points.
They get printed out when you compile text that git copied from the CTAN descriptor page with LuaLaTex (They are not inserted by LuaLaTex). The selnolig package was unrelated to the problem.

• Just for the record: The selnolig package does not insert any hyphenation marks. This may be verified in two ways: (i) don't load the package at all and rerun your MWE; and (ii) insert \selnoligoff immediately after \begin{document} and then recompile. In both cases, the hyphenation marks show up even though selnolig is not active.
– Mico
May 7 '17 at 14:40
• I noticed that the two sentences in your posting do occur in the abstract of the user guide of the selnolig package. However, if one cuts and pastes the sentences directly from the pdf file into your example code and recompiles, no spurious hyphenation marks show up. Please state where and how you obtained the two sentences shown in your posting.
– Mico
May 7 '17 at 14:44
• I just found the package today and copied some text from the documentation to try it out. (i) hyphenation marks don't show up (ii) they still show up; If I type text myself everything works as expected. But why dose it come to this artefact when text is copied from the documentation? May 7 '17 at 15:48
• @Mico it seems to be related to fontspec, indeed selnolig appears to be innocent regarding displaying the hyphens. With this MWE: pdflatex without fontspec: no hyphens. xelatex with or without fontspec: no hyphens. lualatex without fontspec: no hyphens. lualatex with fontspec: hyphens are displayed. May 7 '17 at 16:13
• @Georg - Many thanks for providing this clarification. Indeed, I too can now reproduce the issue you've encountered, by copying and pasting the sentences from ctan.org/pkg/selnolig. As the unwanted-hyphenation-point issue can be reproduced with or without selnolig being loaded, one has to conclude that these invisible hyphenation points are already contained in the text provided at ctan.org/pkg/selnolig. That said, I don't have the faintest idea how they got there, but I'm pretty sure it wasn't me. I wouldn't even know how to insert them in the first place...
– Mico
May 7 '17 at 16:42

This is a copy-pasting artefact. In the question the words appear with invisible breakpoints (such as those inserted by ctan). When reprocessed these get converted to hyphens. This can be shown with a hex viewer on the source file:

65 67 69 6e 7b 64 6f 63 75 6d 65 6e 74 7d 0a 54  egin{document}.T
68 c2 ad 65 73 65 20 63 6f 6d c2 ad 70 72 69 73  h..ese com..pris


The c2 ad character is UTF-8 for SOFT HYPHEN.

The solution is to type the text yourself :)

MWE:

\documentclass{article}
\usepackage{fontspec}
\usepackage[english]{selnolig}

\begin{document}
% copied from question
Th­ese com­prise the ff, fi, fl, ffi, and ffl lig­a­tures

% typed manually
These comprise the ff, fi, fl, ffi, and ffl ligatures
\end{document}


Result:

• @Mico I found out in chat that ctan is to blame - sorry for the confusion, edited. May 7 '17 at 16:44