# How disable hyphenation but keep my hyphenation rules

I have text and my own hyphenation table

\hyphenation{al-a ko-ta mie-ć mu-si}


How do I disable hyphenation and I still use my own hyphenation? I'm not only add hyphenation. I must DELETE all hyphenation and AFTER add my own.

Maybe I must create my own hyphenation file? New definition language?

\documentclass[a4paper, 12pt]{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setotherlanguage{polish}
\begin{document}

\hyphenation{al-a ko-ta mie-ć mu-si}

Tu sa inne zdania i nawet bardzo długaśne. Łojej, Ala żółtego kota mieć musi, a nie żabę.

\end{document}


I compile with xelatex, but my question is for any tex/latex/lualatex etc –

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – yo' Dec 10 '14 at 9:33
• It's not clear why you'd want to override all the hyphenation patterns. – egreg Dec 10 '14 at 11:52
• Because i use specyfic word, and polish,english hyphen is wrong. I need use only my own hyphenation, no from system – bardzo Dec 10 '14 at 12:08

Just activate nohyphenation and you're done. In the example, \parbox{0pt} forces TeX to hyphenate as much as possible.

\documentclass[a4paper, 12pt]{article}
\usepackage{fontspec}
\usepackage{polyglossia}

\begin{document}
\hyphenrules{nohyphenation}
\hyphenation{al-a ko-ta mie-ć mu-si}
\lefthyphenmin=1 \righthyphenmin=1

\parbox{0pt}{Tu sa inne zdania i nawet bardzo długaśne.
Łojej, Ala żółtego kota mieć musi, a nie żabę.}

\end{document}


If you need to support other languages, here's the scheme:

\documentclass[a4paper, 12pt]{article}
\usepackage{fontspec}
\usepackage{polyglossia}

\setmainfont{Linux Libertine O} % a font with support for Greek

\setmainlanguage{english}
\setotherlanguage{polish}
\setotherlanguage{greek}

\newenvironment{fantasylanguage}
{\hyphenrules{nohyphenation}\lefthyphenmin=1 \righthyphenmin=1 }
{}

\begin{hyphenrules}{nohyphenation}
\hyphenation{al-a ko-ta mie-ć mu-si}
\end{hyphenrules}

\begin{document}

\begin{fantasylanguage}
\parbox{0pt}{\hspace{0pt}Łojej, Ala żółtego kota mieć musi, a nie żabę.}
\end{fantasylanguage}

\medskip

\begin{greek}
θaλb εcπdδ
\end{greek}

\end{document}


• If I disable lang (i use 3) all characters no latin disapears ;( I must use characters outside latin set. I use greek letters put θaλb εcπdδ and – bardzo Dec 10 '14 at 13:09
• @bardzo The font you're using doesn't support Greek; it has nothing to do with hyphenation. Please, add information to your question, or open a new one; I answered the question as is. – egreg Dec 10 '14 at 13:12
• My font have greek chars. Yours answer is not working – bardzo Dec 10 '14 at 13:16
• @bardzo I can't know what font you're using; your example has no font choice, so Latin Modern is selected, which doesn't support Greek. Please, be careful before saying “your answer is not working”, which is definitely false. – egreg Dec 10 '14 at 13:18
• ok, meybe You are right, I check it – bardzo Dec 10 '14 at 13:19