How to add Hebrew hyphenruls?

Jürgen Spitzmüller spitz at lyx.org
Mon Mar 21 16:02:41 UTC 2022


Am Montag, dem 21.03.2022 um 15:53 +0000 schrieb tush via lyx-users:
> I am writing a document in Hebrew. Choosing "Hebrew" as the
> document's language together with Language Package Automatic (and
> ticking "Use Non TeX font") adds the following to the preamble:
> 
> \usepackage{polyglossia}
> \setdefaultlanguage{hebrew}
> \setotherlanguage{english}
> (which is correct)
> 
> Now I want to add some Hebrew hyphenation rules. For that one should
> add after the above three lines the rules as an hyphenrules
> environment, like the following:
> 
> \begin{hyphenrules}{hebrew}
> \hyphenation{או-פ-ט-י-מ-ליות}
> \end{hyphenrules}
> 
> These kind of rules should appear after loading polyglossia.
> 
> How can I tell LyX about those hyphenrules? If I insert it to the
> document preamble via the document settings dialogue, then the rules
> are called before​ polyglossia and I get an error.
> 
> Any idea or suggestion for that?

With a reasonably new LaTeX version:

\AddToHook{package/polyglossia/after}{%
 \begin{hyphenrules}{hebrew}
 \hyphenation{או-פ-ט-י-מ-ליות}
 \end{hyphenrules}
}

Otherwise:

\usepackage{etoolbox}
\AtEndPreamble{%
 \begin{hyphenrules}{hebrew}
 \hyphenation{או-פ-ט-י-מ-ליות}
 \end{hyphenrules}
}

HTH,
Jürgen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20220321/6767b22a/attachment-0001.asc>


More information about the lyx-users mailing list