You could do this in LuaLaTeX, which lets you (for the most part) simply copy and paste in Hebrew in your document body. You do need a language tag (such as \begin{otherlanguage}{hebrew}
) when switching between left-to-right and right-to-left paragraphs, sections, and tables. Modulo a few bugs noted below, it mostly just works.
Latest Answer
This version has a few improvements over the others. It redefines most, but not all, of the glyph substitutions of the original font. If the rendering problems are not as important as making all vowels and only vowels the same color, you might prefer my first answer below.
\documentclass{article}
\tracinglostchars=3 % Panic if a font does not contain the character we need.
\usepackage[svgnames]{xcolor}
\usepackage{ luacode, luatexbase, luacolor }
\usepackage{inputnormalization}
% The input should be normalized to NFD form in order to correctly display
% ligatures.
\Uinputnormalization=2
\usepackage[bidi=basic, layout=sectioning.tabular, english]{babel}
\usepackage{fontspec}
\usepackage{microtype}
\usepackage{newunicodechar}
\babelprovide[import=he, onchar=fonts ids]{hebrew}
\begin{luacode*}
fonts.handlers.otf.addfeature {
-- Currently unused.
name = "xdsh", -- Disable unwanted shuruk and holam male ligatures. Happens too late to add color.
type ="multiple",
data = {
[0xfb35] = { 0x05d5, 0x05bc },
[0xfb4b] = { 0x05d5, 0x05b9 },
},
}
fonts.handlers.otf.addfeature {
name = "xalt",
type = "chainsubstitution",
lookups = {
{
type = "substitution", -- 1
data = {
["sheva"] = "sheva_for_finalkaf",
["qamats"] = "qamats_for_finalkaf",
},
},
{
type = "substitution", -- 2
data = {
["holamhaser"] = "holam",
},
},
{
type = "substitution", -- 3
data = {
[ "hiriq"] = "hiriqmem",
},
},
{
type = "substitution", -- 4
data = {
["ayin"] = "ayin.alt",
},
},
},
data = {
rules = {
{
before = { {"finalkaf"} }, -- This needs to work for final kaf with tafa, too.
current = { {"sheva", "qamats"} },
lookups = { 1 },
},
{
current = { {"holamhaser"} },
lookups = { 2 },
},
{
before = { { "finalmem", "finalmem.wide" } }, -- Should allow intervening vowels and taamim.
current = { {"hiriq"} },
after = { { "patah", "qamats" } },
lookups = { 3 },
},
{
current = { {"ayin"} },
-- Should support many other combinations, including accents between the ayin and an accent below.
after = { { "atnah", "tipeha", "yetiv", "tevir", "atnahhafukh",
"munah", "mahapakh", "merkha", "merkhakefula", "darga",
"yerahbenyomo", "dehi", "sheva", "hatafsegol",
"hatafpatah", "hatafqamats", "hiriq", "tsere", "segol",
"patah", "qamats", "qubuts", "meteg", "qamatsqatan",
"hatafsegol_meteg", "hatafpatah_meteg",
"hatafqamats_meteg" } },
lookups = { 4 },
},
},
},
}
fonts.handlers.otf.addfeature {
name = "xlig", -- User-defined replacement ligatures
type = "ligature",
data = {
["vavvav"] = { "vav", "vav" },
["vavyod"] = { "vav", "yod" },
["yodyod"] = { "yod", "yod" },
-- Of the dagesh ligatures, only vav, zayin, yod and nun are defined in
-- Taamey Ashkenaz of which vavdagesh, AKA shuruk, is intentionally
-- omitted.
["zayindagesh"] = { "zayin", "dagesh" },
["yoddagesh"] = { "yod", "dagesh" },
["nundagesh"] = { "nun", "dagesh" },
-- vavholam is intentionally omitted.
-- None of the rafe ligatures are defined in Taamey Ashkenaz
["shinshindot.thin"] = { "shin.thin", "shindot" },
["shinsindot.thin"] = { "shin.thin", "sindot" },
["zayindagesh.thin"] = { "zayin.thin", "dagesh" },
["yoddagesh.thin"] = { "yod.thin", "dagesh" },
["nundagesh.thin"] = { "nun.thin", "dagesh" },
["hatafsegol_meteg"] = { "hatafsegol", "zerojoin", "meteg" },
["hatafpatah_meteg"] = { "hatafmatah", "zerojoin", "meteg" },
["hatafqamats_meteg"] = { "hatafqamats", "zerojoin", "meteg" },
["aleflamed"] = { "alef", "zerojoin", "lamed" },
},
}
fonts.handlers.otf.addfeature {
name = "xkrn", -- custom kern
type = "pair",
data = {
["vav"] = {
["holam"] = { -- AKA holam male
false, { 300, 0, 0, 0 } -- Tuned for Taamey Ashkenaz
},
},
},
}
\end{luacode*}
\defaultfontfeatures{ Scale=MatchUppercase }
% Taamey Ashkenaz and other Culmus fonts with Taamim are available, libre, at:
% https://culmus.sourceforge.io/taamim/index.html
% If you want Hebrew letters that slant from left to right rather than right
% to left, replace the ItalicFont= and BoldItalicFont= features with
% AutoFakeSlant = 0.15
\defaultfontfeatures[TaameyAshkenaz]{
RawFeature = {-ccmp,+xlig,+xalt,+xkrn},
UprightFont = *-Medium,
BoldFont = *-Bold,
ItalicFont = *-MediumOblique,
BoldItalicFont = *-BoldOblique,
Extension = .ttf }
\babelfont{rm}
[Scale=1.0, Language=Default]{TaameyAshkenaz}
\babelfont[english]{rm}
[Language=Default]{TeX Gyre Schola}
\newcommand\niqqudcolor{DarkOrange}
\newcommand\taameycolor{DarkCyan}
% In order to make shuruk behave differently from dagesh, we need some state:
\makeatletter
\newif\ifafter@vav@
\after@vav@false
\newcommand\DeclareHeBase[1]{\newunicodechar{#1}{\after@vav@false #1}}
\DeclareHeBase{^^^^05d0} % alef
\DeclareHeBase{^^^^05d1} % bet
\DeclareHeBase{^^^^05d2} % gimel
\DeclareHeBase{^^^^05d3} % dalet
\DeclareHeBase{^^^^05d4} % he
\newunicodechar{^^^^05d5}{\after@vav@true ^^^^05d5} % vav
\DeclareHeBase{^^^^05d6} % zayin
\DeclareHeBase{^^^^05d7} % het
\DeclareHeBase{^^^^05d8} % tet
\DeclareHeBase{^^^^05d9} % yod
\DeclareHeBase{^^^^05da} % final qof
\DeclareHeBase{^^^^05db} % qof
\DeclareHeBase{^^^^05dc} % lamed
\DeclareHeBase{^^^^05dd} % final mem
\DeclareHeBase{^^^^05de} % mem
\DeclareHeBase{^^^^05df} % final nun
\DeclareHeBase{^^^^05e0} % nun
\DeclareHeBase{^^^^05e1} % samekh
\DeclareHeBase{^^^^05e2} % ayin
\DeclareHeBase{^^^^05e3} % final pe
\DeclareHeBase{^^^^05e4} % pe
\DeclareHeBase{^^^^05e5} % final tsadi
\DeclareHeBase{^^^^05e6} % tsadi
\DeclareHeBase{^^^^05e7} % qof
\DeclareHeBase{^^^^05e8} % resh
\DeclareHeBase{^^^^05e9} % shin
\DeclareHeBase{^^^^05ea} % tav
\DeclareHeBase{^^^^00a0} % non-breaking space
\DeclareHeBase{^^^^25cc} % dotted circle
%Omitted: base letters that do not appear in NFD-normalized Biblical Hebrew.
% U+05BC needs to be check whether it is a dagesh, mapiq or shuruq:
\newunicodechar{^^^^05bc}{%
\ifafter@vav@%
{\textcolor{\niqqudcolor}{^^^^05bc}}%
\else\textcolor{Red}{^^^^05bc}%
\fi%
}
\newcommand\DeclareTaamey[1]{\newunicodechar{#1}{\textcolor{\taameycolor}{#1}}}
\DeclareTaamey{^^^^0591} % etnahta
\DeclareTaamey{^^^^0592} % segol
\DeclareTaamey{^^^^0593} % shalshelet
\DeclareTaamey{^^^^0594} % zakef qatan
\DeclareTaamey{^^^^0595} % zakef gadol
\DeclareTaamey{^^^^0596} % tipcha
\DeclareTaamey{^^^^0597} % revia
\DeclareTaamey{^^^^0598} % zarqa
\DeclareTaamey{^^^^0599} % pashta
\DeclareTaamey{^^^^059a} % yehiv
\DeclareTaamey{^^^^059b} % tevir
\DeclareTaamey{^^^^059c} % qeresh
\DeclareTaamey{^^^^059d} % weresh muqdam
\DeclareTaamey{^^^^059e} % gershayim
\DeclareTaamey{^^^^059f} % qarney para
\DeclareTaamey{^^^^05a0} % telishah gedola
\DeclareTaamey{^^^^05a1} % pazer
\DeclareTaamey{^^^^05a2} % atnah hafukh
\DeclareTaamey{^^^^05a3} % munah
\DeclareTaamey{^^^^05a4} % mahapakh
\DeclareTaamey{^^^^05a5} % merkha
\DeclareTaamey{^^^^05a6} % merkha kefula
\DeclareTaamey{^^^^05a7} % darga
\DeclareTaamey{^^^^05a8} % qadma
\DeclareTaamey{^^^^05a9} % telisha qetana
\DeclareTaamey{^^^^05aa} % yerah ben yomo
\DeclareTaamey{^^^^05ab} % ole
\DeclareTaamey{^^^^05ac} % iluy
\DeclareTaamey{^^^^05ad} % dehi
\DeclareTaamey{^^^^05ae} % zinor
\DeclareTaamey{^^^^05c0} % paseq
\DeclareTaamey{^^^^05c3} % sof pasuq
\DeclareTaamey{^^^^05c4} % upper dot
\DeclareTaamey{^^^^05c5} % lower dot
\DeclareTaamey{^^^^05f3} % geresh
\DeclareTaamey{^^^^05f4} % gershayim
\newcommand\DeclareNiqqud[1]{\newunicodechar{#1}{\textcolor{\niqqudcolor}{#1}}}
\DeclareNiqqud{^^^^05b0} % sheva
\DeclareNiqqud{^^^^05b1} % hataf segol
\DeclareNiqqud{^^^^05b2} % hataf paqah
\DeclareNiqqud{^^^^05b3} % hataf qamats
\DeclareNiqqud{^^^^05b4} % hiriq
\DeclareNiqqud{^^^^05b5} % tsere
\DeclareNiqqud{^^^^05b6} % segol
\DeclareNiqqud{^^^^05b7} % patah
\DeclareNiqqud{^^^^05b8} % qamatz
\DeclareNiqqud{^^^^05b9} % holam
\DeclareNiqqud{^^^^05ba} % holam haser
\DeclareNiqqud{^^^^05bb} % qubuts
\DeclareNiqqud{^^^^05bd} % meteg
\DeclareNiqqud{^^^^05c7} % qamats qatan
% Alphabetic presentation forms that need special handling
%\DeclareNiqqud{^^^^fb4b}
%\DeclareNiqqud{^^^^fb35}
% Intentionally not colored: shin dot, sin dot, rafe, maqaf, nun hafukha
\makeatother
% Improves layout of paragraphs with long, un-hyphenatable words:
\emergencystretch=3em
\begin{document}
\begin{otherlanguage}{hebrew}
\section*{קדושים}
\noindent
וּֽבְקֻצְרְכֶם֙ אֶת־קְצִ֣יר אַרְצְכֶ֔ם לֹ֧א תְכַלֶּ֛ה פְּאַ֥ת שָׂדְךָ֖ לִקְצֹ֑ר וְלֶ֥קֶט קְצִֽירְךָ֖ לֹ֥א תְלַקֵּֽט׃
וְכַרְמְךָ֙ לֹ֣א תְעוֹלֵ֔ל וּפֶ֥רֶט כַּרְמְךָ֖ לֹ֣א תְלַקֵּ֑ט לֶֽעָנִ֤י וְלַגֵּר֙ תַּעֲזֹ֣ב אֹתָ֔ם אֲנִ֖י יְהֹוָ֥ה אֱלֹהֵיכֶֽם׃
וְלֹֽא־תִשָּׁבְע֥וּ בִשְׁמִ֖י לַשָּׁ֑קֶר וְחִלַּלְתָּ֛ אֶת־שֵׁ֥ם אֱלֹהֶ֖יךָ אֲנִ֥י יְהֹוָֽה׃
לֹֽא־תַעֲשֹׁ֥ק אֶת־רֵֽעֲךָ֖ וְלֹ֣א תִגְזֹ֑ל לֹֽא־תָלִ֞ין פְּעֻלַּ֥ת שָׂכִ֛יר אִתְּךָ֖ עַד־בֹּֽקֶר׃
לֹא־תְקַלֵּ֣ל חֵרֵ֔שׁ וְלִפְנֵ֣י עִוֵּ֔ר לֹ֥א תִתֵּ֖ן מִכְשֹׁ֑ל וְיָרֵ֥אתָ מֵּאֱלֹהֶ֖יךָ אֲנִ֥י יְהֹוָֽה׃
לֹא־תַעֲשׂ֥וּ עָ֙וֶל֙ בַּמִּשְׁפָּ֔ט לֹא־תִשָּׂ֣א פְנֵי־דָ֔ל וְלֹ֥א תֶהְדַּ֖ר פְּנֵ֣י גָד֑וֹל בְּצֶ֖דֶק תִּשְׁפֹּ֥ט עֲמִיתֶֽךָ׃
לֹא־תֵלֵ֤ךְ רָכִיל֙ בְּעַמֶּ֔יךָ לֹ֥א תַעֲמֹ֖ד עַל־דַּ֣ם רֵעֶ֑ךָ אֲנִ֖י יְהֹוָֽה׃
לֹֽא־תִשְׂנָ֥א אֶת־אָחִ֖יךָ בִּלְבָבֶ֑ךָ הוֹכֵ֤חַ תּוֹכִ֙יחַ֙ אֶת־עֲמִיתֶ֔ךָ וְלֹא־תִשָּׂ֥א עָלָ֖יו חֵֽטְא׃
לֹֽא־תִקֹּ֤ם וְלֹֽא־תִטֹּר֙ אֶת־בְּנֵ֣י עַמֶּ֔ךָ וְאָֽהַבְתָּ֥ לְרֵעֲךָ֖ כָּמ֑וֹךָ אֲנִ֖י יְהֹוָֽה׃
\end{otherlanguage}
This is followed by, {הַגָּ֣ר אִתְּכֶ֗ם וְאָהַבְתָּ֥ לוֹ֙ כָּמ֔וֹךָ}.
\end{document}

So, you will notice that ayin now usually displays with a shallow descender when it should, but not always. It won’t work if the ayin has a dagesh, holam or rafa. A final kaf will now display vowels in the correct position, unless it also has a rafe. And that the pashta between a dalet and a holam male displays too far to the right.
All of this is because I haven’t implemented any patterns that would require more than one-token lookahead or lookbehind.
First Answer
\documentclass{article}
\tracinglostchars=3 % Panic if a font does not contain the character we need.
\usepackage[svgnames]{xcolor}
\usepackage{luacolor}
\usepackage{inputnormalization}
% The code to set combining characters active assumes input in decomposed form.
% Setting input normalization should suffice for all real-world cases. If,
% for some reason, you need to generate Hebrew text programmatically, please
% avoid generating any codepoints such as YOD WITH HIRIQ. (Which is also
% not valid NFC since Unicode 3.0.)
\Uinputnormalization=2
\usepackage[bidi=basic, layout=sectioning.tabular, english]{babel}
\usepackage{fontspec}
\usepackage{microtype}
\usepackage{newunicodechar}
\babelprovide[import=he, onchar=fonts ids]{hebrew}
\defaultfontfeatures{ Ligatures=TeX, Scale=MatchUppercase }
% Taamey Ashkenaz and other Culmus fonts with Taamim are available, libre, at:
% https://culmus.sourceforge.io/taamim/index.html
% If you want Hebrew letters that slant from left to right rather than right
% to left, replace the ItalicFont= and BoldItalicFont= features with
% AutoFakeSlant = 0.15
\defaultfontfeatures[TaameyAshkenaz]{
UprightFont = *-Medium,
BoldFont = *-Bold,
ItalicFont = *-MediumOblique,
BoldItalicFont = *-BoldOblique,
Extension = .ttf }
\babelfont{rm}
[Scale=1.0, Language=Default]{TeX Gyre Schola}
\babelfont[hebrew]{rm}
[Language=Default]{TaameyAshkenaz}
\newcommand\niqqudcolor{DarkOrange}
\newcommand\taameycolor{DarkCyan}
\newcommand\DeclareTaamey[1]{\newunicodechar{#1}{\textcolor{\taameycolor}{#1}}}
\DeclareTaamey{^^^^0591} % etnahta
\DeclareTaamey{^^^^0592} % segol
\DeclareTaamey{^^^^0593} % shalshelet
\DeclareTaamey{^^^^0594} % zakef qatan
\DeclareTaamey{^^^^0595} % zakef gadol
\DeclareTaamey{^^^^0596} % tipcha
\DeclareTaamey{^^^^0597} % revia
\DeclareTaamey{^^^^0598} % zarqa
\DeclareTaamey{^^^^0599} % pashta
\DeclareTaamey{^^^^059a} % yehiv
\DeclareTaamey{^^^^059b} % tevir
\DeclareTaamey{^^^^059c} % qeresh
\DeclareTaamey{^^^^059d} % weresh muqdam
\DeclareTaamey{^^^^059e} % gershayim
\DeclareTaamey{^^^^059f} % qarney para
\DeclareTaamey{^^^^05a0} % telishah gedola
\DeclareTaamey{^^^^05a1} % pazer
\DeclareTaamey{^^^^05a2} % atnah hafukh
\DeclareTaamey{^^^^05a3} % munah
\DeclareTaamey{^^^^05a4} % mahapakh
\DeclareTaamey{^^^^05a5} % merkha
\DeclareTaamey{^^^^05a6} % merkha kefula
\DeclareTaamey{^^^^05a7} % darga
\DeclareTaamey{^^^^05a8} % qadma
\DeclareTaamey{^^^^05a9} % telisha qetana
\DeclareTaamey{^^^^05aa} % yerah ben yomo
\DeclareTaamey{^^^^05ab} % ole
\DeclareTaamey{^^^^05ac} % iluy
\DeclareTaamey{^^^^05ad} % dehi
\DeclareTaamey{^^^^05ae} % zinor
\DeclareTaamey{^^^^05c0} % paseq
\DeclareTaamey{^^^^05c3} % sof pasuq
\DeclareTaamey{^^^^05c4} % upper dot
\DeclareTaamey{^^^^05c5} % lower dot
\DeclareTaamey{^^^^05f3} % geresh
\DeclareTaamey{^^^^05f4} % gershayim
\newcommand\DeclareNiqqud[1]{\newunicodechar{#1}{\textcolor{\niqqudcolor}{#1}}}
\DeclareNiqqud{^^^^05b0} % sheva
\DeclareNiqqud{^^^^05b1} % hataf segol
\DeclareNiqqud{^^^^05b2} % hataf paqah
\DeclareNiqqud{^^^^05b3} % hataf qamats
\DeclareNiqqud{^^^^05b4} % hiriq
\DeclareNiqqud{^^^^05b5} % tsere
\DeclareNiqqud{^^^^05b6} % segol
\DeclareNiqqud{^^^^05b7} % patah
\DeclareNiqqud{^^^^05b8} % qamatz
\DeclareNiqqud{^^^^05b9} % holam
\DeclareNiqqud{^^^^05ba} % holam haser
\DeclareNiqqud{^^^^05bb} % qubuts
\DeclareNiqqud{^^^^05bd} % meteg
\DeclareNiqqud{^^^^05c7} % qamats qatan
% Intentionally not colored: shin dot, sin dot, dagesh/mapiq, rafe, maqaf, nun hafukha
% Improves layout of paragraphs with long, un-hyphenatable words:
\emergencystretch=3em
\begin{document}
\begin{otherlanguage}{hebrew}
\section*{קדושים}
\noindent
וּֽבְקֻצְרְכֶם֙ אֶת־קְצִ֣יר אַרְצְכֶ֔ם לֹ֧א תְכַלֶּ֛ה פְּאַ֥ת שָׂדְךָ֖ לִקְצֹ֑ר וְלֶ֥קֶט קְצִֽירְךָ֖ לֹ֥א תְלַקֵּֽט׃
וְכַרְמְךָ֙ לֹ֣א תְעוֹלֵ֔ל וּפֶ֥רֶט כַּרְמְךָ֖ לֹ֣א תְלַקֵּ֑ט לֶֽעָנִ֤י וְלַגֵּר֙ תַּעֲזֹ֣ב אֹתָ֔ם אֲנִ֖י יְהֹוָ֥ה אֱלֹהֵיכֶֽם׃
וְלֹֽא־תִשָּׁבְע֥וּ בִשְׁמִ֖י לַשָּׁ֑קֶר וְחִלַּלְתָּ֛ אֶת־שֵׁ֥ם אֱלֹהֶ֖יךָ אֲנִ֥י יְהֹוָֽה׃
לֹֽא־תַעֲשֹׁ֥ק אֶת־רֵֽעֲךָ֖ וְלֹ֣א תִגְזֹ֑ל לֹֽא־תָלִ֞ין פְּעֻלַּ֥ת שָׂכִ֛יר אִתְּךָ֖ עַד־בֹּֽקֶר׃
לֹא־תְקַלֵּ֣ל חֵרֵ֔שׁ וְלִפְנֵ֣י עִוֵּ֔ר לֹ֥א תִתֵּ֖ן מִכְשֹׁ֑ל וְיָרֵ֥אתָ מֵּאֱלֹהֶ֖יךָ אֲנִ֥י יְהֹוָֽה׃
לֹא־תַעֲשׂ֥וּ עָ֙וֶל֙ בַּמִּשְׁפָּ֔ט לֹא־תִשָּׂ֣א פְנֵי־דָ֔ל וְלֹ֥א תֶהְדַּ֖ר פְּנֵ֣י גָד֑וֹל בְּצֶ֖דֶק תִּשְׁפֹּ֥ט עֲמִיתֶֽךָ׃
לֹא־תֵלֵ֤ךְ רָכִיל֙ בְּעַמֶּ֔יךָ לֹ֥א תַעֲמֹ֖ד עַל־דַּ֣ם רֵעֶ֑ךָ אֲנִ֖י יְהֹוָֽה׃
לֹֽא־תִשְׂנָ֥א אֶת־אָחִ֖יךָ בִּלְבָבֶ֑ךָ הוֹכֵ֤חַ תּוֹכִ֙יחַ֙ אֶת־עֲמִיתֶ֔ךָ וְלֹא־תִשָּׂ֥א עָלָ֖יו חֵֽטְא׃
לֹֽא־תִקֹּ֤ם וְלֹֽא־תִטֹּר֙ אֶת־בְּנֵ֣י עַמֶּ֔ךָ וְאָֽהַבְתָּ֥ לְרֵעֲךָ֖ כָּמ֑וֹךָ אֲנִ֖י יְהֹוָֽה׃
\end{otherlanguage}
This is followed by,
הַגָּ֣ר אִתְּכֶ֗ם וְאָהַבְתָּ֥ לוֹ֙ כָּמ֔וֹךָ.
\end{document}

What this does not handle correctly, at least with this particular font, are shuruk and holam male. In this font, they are mapped to the contextual compositions וּ (U+FB35) and וֹ (U+FB4B). Decomposition causes the colors to be ignored. Disabling the contextual compositions breaks other rendering. Canonical normalization does not convert to the precomposed form.
In order to fix this, you could intercept the list of glyph nodes in a more complex way through a Lua callback.
Second Answer
Here’s another version that fixes shuruk and holam male. I think the handling of לוֹ֙ (lamed vav holam pashta) leaves a little something to be desired. (Edit: because one of the many default font substitutions that I did not copy over replaces pashta with qadma to the left of a lamed.)
\documentclass{article}
\tracinglostchars=3 % Panic if a font does not contain the character we need.
\usepackage[svgnames]{xcolor}
\usepackage{ luacode, luatexbase, luacolor }
\usepackage{inputnormalization}
% The input should be normalized to NFD form in order to correctly display
% ligatures.
\Uinputnormalization=2
\usepackage[bidi=basic, layout=sectioning.tabular, english]{babel}
\usepackage{fontspec}
\usepackage{microtype}
\usepackage{newunicodechar}
\babelprovide[import=he, onchar=fonts ids]{hebrew}
\begin{luacode*}
fonts.handlers.otf.addfeature {
name = "xalt",
type = "chainsubstitution",
lookups = {
{
type = "substitution",
data = {
["sheva"] = "sheva_for_finalkaf",
["qamats"] = "qamats_for_finalkaf",
},
},
},
data = {
rules = {
{
before = { {"finalkaf"} },
current = { {"sheva", "qamats"} },
lookups = { 1 },
},
},
},
}
fonts.handlers.otf.addfeature {
name = "xlig", -- User-defined replacement ligatures
type = "ligature",
data = {
["vavvav"] = { "vav", "vav" },
["vavyod"] = { "vav", "yod" },
["yodyod"] = { "yod", "yod" },
-- Of the dagesh ligatures, only vav, zayin, yod and nun are defined in
-- Taamey Ashkenaz of which vavdagesh, AKA shuruk, is intentionally
-- omitted.
["zayindagesh"] = { "zayin", "dagesh" },
["yoddagesh"] = { "yod", "dagesh" },
["nundagesh"] = { "nun", "dagesh" },
-- vavholam is intentionally omitted.
-- None of the rafe ligatures are defined in Taamey Ashkenaz
["shinshindot.thin"] = { "shin.thin", "shindot" },
["shinsindot.thin"] = { "shin.thin", "sindot" },
["zayindagesh.thin"] = { "zayin.thin", "dagesh" },
["yoddagesh.thin"] = { "yod.thin", "dagesh" },
["nundagesh.thin"] = { "nun.thin", "dagesh" },
["hatafsegol_meteg"] = { "hatafsegol", "zerojoin", "meteg" },
["hatafpatah_meteg"] = { "hatafmatah", "zerojoin", "meteg" },
["hatafqamats_meteg"] = { "hatafqamats", "zerojoin", "meteg" },
["aleflamed"] = { "alef", "zerojoin", "lamed" },
},
}
fonts.handlers.otf.addfeature {
name = "xkrn", -- custom kern
type = "pair",
data = {
["vav"] = {
["holam"] = { -- AKA holam male
false, { 300, 0, 0, 0 } -- Tuned for Taamey Ashkenaz
},
},
},
}
\end{luacode*}
\defaultfontfeatures{ Scale=MatchUppercase }
% Taamey Ashkenaz and other Culmus fonts with Taamim are available, libre, at:
% https://culmus.sourceforge.io/taamim/index.html
% If you want Hebrew letters that slant from left to right rather than right
% to left, replace the ItalicFont= and BoldItalicFont= features with
% AutoFakeSlant = 0.15
\defaultfontfeatures[TaameyAshkenaz]{
UprightFont = *-Medium,
BoldFont = *-Bold,
ItalicFont = *-MediumOblique,
BoldItalicFont = *-BoldOblique,
RawFeature={-ccmp, -calt, +xalt, +xlig, +xkrn},
Extension = .ttf }
\babelfont{rm}
[Scale=1.0, Language=Default]{TaameyAshkenaz}
\babelfont[english]{rm}
[Language=Default]{TeX Gyre Schola}
\newcommand\niqqudcolor{DarkOrange}
\newcommand\taameycolor{DarkCyan}
% In order to make shuruk behave differently from dagesh, we need some state:
\makeatletter
\newif\ifafter@vav@
\after@vav@false
\newcommand\DeclareHeBase[1]{\newunicodechar{#1}{\after@vav@false #1}}
\DeclareHeBase{^^^^05d0} % alef
\DeclareHeBase{^^^^05d1} % bet
\DeclareHeBase{^^^^05d2} % gimel
\DeclareHeBase{^^^^05d3} % dalet
\DeclareHeBase{^^^^05d4} % he
\newunicodechar{^^^^05d5}{\after@vav@true ^^^^05d5} % vav
\DeclareHeBase{^^^^05d6} % zayin
\DeclareHeBase{^^^^05d7} % het
\DeclareHeBase{^^^^05d8} % tet
\DeclareHeBase{^^^^05d9} % yod
\DeclareHeBase{^^^^05da} % final qof
\DeclareHeBase{^^^^05db} % qof
\DeclareHeBase{^^^^05dc} % lamed
\DeclareHeBase{^^^^05dd} % final mem
\DeclareHeBase{^^^^05de} % mem
\DeclareHeBase{^^^^05df} % final nun
\DeclareHeBase{^^^^05e0} % nun
\DeclareHeBase{^^^^05e1} % samekh
\DeclareHeBase{^^^^05e2} % ayin
\DeclareHeBase{^^^^05e3} % final pe
\DeclareHeBase{^^^^05e4} % pe
\DeclareHeBase{^^^^05e5} % final tsadi
\DeclareHeBase{^^^^05e6} % tsadi
\DeclareHeBase{^^^^05e7} % qof
\DeclareHeBase{^^^^05e8} % resh
\DeclareHeBase{^^^^05e9} % shin
\DeclareHeBase{^^^^05ea} % tav
\DeclareHeBase{^^^^00a0} % non-breaking space
\DeclareHeBase{^^^^25cc} % dotted circle
%Omitted: base letters that do not appear in NFD-normalized Biblical Hebrew.
% U+05BC needs to be check whether it is a dagesh, mapiq or shuruq:
\newunicodechar{^^^^05bc}{%
\ifafter@vav@%
{\textcolor{\niqqudcolor}{^^^^05bc}}%
\else{^^^^05bc}%
\fi%
}
\newcommand\DeclareTaamey[1]{\newunicodechar{#1}{\textcolor{\taameycolor}{#1}}}
\DeclareTaamey{^^^^0591} % etnahta
\DeclareTaamey{^^^^0592} % segol
\DeclareTaamey{^^^^0593} % shalshelet
\DeclareTaamey{^^^^0594} % zakef qatan
\DeclareTaamey{^^^^0595} % zakef gadol
\DeclareTaamey{^^^^0596} % tipcha
\DeclareTaamey{^^^^0597} % revia
\DeclareTaamey{^^^^0598} % zarqa
\DeclareTaamey{^^^^0599} % pashta
\DeclareTaamey{^^^^059a} % yehiv
\DeclareTaamey{^^^^059b} % tevir
\DeclareTaamey{^^^^059c} % qeresh
\DeclareTaamey{^^^^059d} % weresh muqdam
\DeclareTaamey{^^^^059e} % gershayim
\DeclareTaamey{^^^^059f} % qarney para
\DeclareTaamey{^^^^05a0} % telishah gedola
\DeclareTaamey{^^^^05a1} % pazer
\DeclareTaamey{^^^^05a2} % atnah hafukh
\DeclareTaamey{^^^^05a3} % munah
\DeclareTaamey{^^^^05a4} % mahapakh
\DeclareTaamey{^^^^05a5} % merkha
\DeclareTaamey{^^^^05a6} % merkha kefula
\DeclareTaamey{^^^^05a7} % darga
\DeclareTaamey{^^^^05a8} % qadma
\DeclareTaamey{^^^^05a9} % telisha qetana
\DeclareTaamey{^^^^05aa} % yerah ben yomo
\DeclareTaamey{^^^^05ab} % ole
\DeclareTaamey{^^^^05ac} % iluy
\DeclareTaamey{^^^^05ad} % dehi
\DeclareTaamey{^^^^05ae} % zinor
\DeclareTaamey{^^^^05c0} % paseq
\DeclareTaamey{^^^^05c3} % sof pasuq
\DeclareTaamey{^^^^05c4} % upper dot
\DeclareTaamey{^^^^05c5} % lower dot
\DeclareTaamey{^^^^05f3} % geresh
\DeclareTaamey{^^^^05f4} % gershayim
\newcommand\DeclareNiqqud[1]{\newunicodechar{#1}{\textcolor{\niqqudcolor}{#1}}}
\DeclareNiqqud{^^^^05b0} % sheva
\DeclareNiqqud{^^^^05b1} % hataf segol
\DeclareNiqqud{^^^^05b2} % hataf paqah
\DeclareNiqqud{^^^^05b3} % hataf qamats
\DeclareNiqqud{^^^^05b4} % hiriq
\DeclareNiqqud{^^^^05b5} % tsere
\DeclareNiqqud{^^^^05b6} % segol
\DeclareNiqqud{^^^^05b7} % patah
\DeclareNiqqud{^^^^05b8} % qamatz
\DeclareNiqqud{^^^^05b9} % holam
\DeclareNiqqud{^^^^05ba} % holam haser
\DeclareNiqqud{^^^^05bb} % qubuts
\DeclareNiqqud{^^^^05bd} % meteg
\DeclareNiqqud{^^^^05c7} % qamats qatan
% Alphabetic presentation forms that need special handling
%\DeclareNiqqud{^^^^fb4b}
%\DeclareNiqqud{^^^^fb35}
% Intentionally not colored: shin dot, sin dot, rafe, maqaf, nun hafukha
\makeatother
% Improves layout of paragraphs with long, un-hyphenatable words:
\emergencystretch=3em
\begin{document}
\begin{otherlanguage}{hebrew}
\section*{קדושים}
\noindent
וּֽבְקֻצְרְכֶם֙ אֶת־קְצִ֣יר אַרְצְכֶ֔ם לֹ֧א תְכַלֶּ֛ה פְּאַ֥ת שָׂדְךָ֖ לִקְצֹ֑ר וְלֶ֥קֶט קְצִֽירְךָ֖ לֹ֥א תְלַקֵּֽט׃
וְכַרְמְךָ֙ לֹ֣א תְעוֹלֵ֔ל וּפֶ֥רֶט כַּרְמְךָ֖ לֹ֣א תְלַקֵּ֑ט לֶֽעָנִ֤י וְלַגֵּר֙ תַּעֲזֹ֣ב אֹתָ֔ם אֲנִ֖י יְהֹוָ֥ה אֱלֹהֵיכֶֽם׃
וְלֹֽא־תִשָּׁבְע֥וּ בִשְׁמִ֖י לַשָּׁ֑קֶר וְחִלַּלְתָּ֛ אֶת־שֵׁ֥ם אֱלֹהֶ֖יךָ אֲנִ֥י יְהֹוָֽה׃
לֹֽא־תַעֲשֹׁ֥ק אֶת־רֵֽעֲךָ֖ וְלֹ֣א תִגְזֹ֑ל לֹֽא־תָלִ֞ין פְּעֻלַּ֥ת שָׂכִ֛יר אִתְּךָ֖ עַד־בֹּֽקֶר׃
לֹא־תְקַלֵּ֣ל חֵרֵ֔שׁ וְלִפְנֵ֣י עִוֵּ֔ר לֹ֥א תִתֵּ֖ן מִכְשֹׁ֑ל וְיָרֵ֥אתָ מֵּאֱלֹהֶ֖יךָ אֲנִ֥י יְהֹוָֽה׃
לֹא־תַעֲשׂ֥וּ עָ֙וֶל֙ בַּמִּשְׁפָּ֔ט לֹא־תִשָּׂ֣א פְנֵי־דָ֔ל וְלֹ֥א תֶהְדַּ֖ר פְּנֵ֣י גָד֑וֹל בְּצֶ֖דֶק תִּשְׁפֹּ֥ט עֲמִיתֶֽךָ׃
לֹא־תֵלֵ֤ךְ רָכִיל֙ בְּעַמֶּ֔יךָ לֹ֥א תַעֲמֹ֖ד עַל־דַּ֣ם רֵעֶ֑ךָ אֲנִ֖י יְהֹוָֽה׃
לֹֽא־תִשְׂנָ֥א אֶת־אָחִ֖יךָ בִּלְבָבֶ֑ךָ הוֹכֵ֤חַ תּוֹכִ֙יחַ֙ אֶת־עֲמִיתֶ֔ךָ וְלֹא־תִשָּׂ֥א עָלָ֖יו חֵֽטְא׃
לֹֽא־תִקֹּ֤ם וְלֹֽא־תִטֹּר֙ אֶת־בְּנֵ֣י עַמֶּ֔ךָ וְאָֽהַבְתָּ֥ לְרֵעֲךָ֖ כָּמ֑וֹךָ אֲנִ֖י יְהֹוָֽה׃
\end{otherlanguage}
This is followed by, {הַגָּ֣ר אִתְּכֶ֗ם וְאָהַבְתָּ֥ לוֹ֙ כָּמ֔וֹךָ}.
\end{document}
