Closed naveen521kk closed 3 years ago
Further looking, the format of language.def
should be according to the comment below.
% The five parameters for \addlanguage are:
% language, patterns file, exceptions file, left- and right-hyphen minima
For language.dat
it should be
<name> <file>
= <synonyms-1>
= <synonyms-2>
...
There's language.dat.lua
need to check what should be done there.
it's something like for the same hyphen-indic
-- from hyphen-indic:
['assamese'] = {
loader = 'loadhyph-as.tex',
lefthyphenmin = 1,
righthyphenmin = 1,
synonyms = { },
patterns = 'hyph-as.pat.txt',
hyphenation = '',
},
['bengali'] = {
loader = 'loadhyph-bn.tex',
lefthyphenmin = 1,
righthyphenmin = 1,
synonyms = { },
patterns = 'hyph-bn.pat.txt',
hyphenation = '',
},
['gujarati'] = {
loader = 'loadhyph-gu.tex',
lefthyphenmin = 1,
righthyphenmin = 1,
synonyms = { },
patterns = 'hyph-gu.pat.txt',
hyphenation = '',
},
['hindi'] = {
loader = 'loadhyph-hi.tex',
lefthyphenmin = 1,
righthyphenmin = 1,
synonyms = { },
patterns = 'hyph-hi.pat.txt',
hyphenation = '',
},
['kannada'] = {
loader = 'loadhyph-kn.tex',
lefthyphenmin = 1,
righthyphenmin = 1,
synonyms = { },
patterns = 'hyph-kn.pat.txt',
hyphenation = '',
},
['malayalam'] = {
loader = 'loadhyph-ml.tex',
lefthyphenmin = 1,
righthyphenmin = 1,
synonyms = { },
patterns = 'hyph-ml.pat.txt',
hyphenation = '',
},
['marathi'] = {
loader = 'loadhyph-mr.tex',
lefthyphenmin = 1,
righthyphenmin = 1,
synonyms = { },
patterns = 'hyph-mr.pat.txt',
hyphenation = '',
},
['oriya'] = {
loader = 'loadhyph-or.tex',
lefthyphenmin = 1,
righthyphenmin = 1,
synonyms = { },
patterns = 'hyph-or.pat.txt',
hyphenation = '',
},
['pali'] = {
loader = 'loadhyph-pi.tex',
lefthyphenmin = 1,
righthyphenmin = 2,
synonyms = { },
patterns = 'hyph-pi.pat.txt',
hyphenation = '',
},
['panjabi'] = {
loader = 'loadhyph-pa.tex',
lefthyphenmin = 1,
righthyphenmin = 1,
synonyms = { },
patterns = 'hyph-pa.pat.txt',
hyphenation = '',
},
['tamil'] = {
loader = 'loadhyph-ta.tex',
lefthyphenmin = 1,
righthyphenmin = 1,
synonyms = { },
patterns = 'hyph-ta.pat.txt',
hyphenation = '',
},
['telugu'] = {
loader = 'loadhyph-te.tex',
lefthyphenmin = 1,
righthyphenmin = 1,
synonyms = { },
patterns = 'hyph-te.pat.txt',
hyphenation = '',
},
execute AddHyphen name=afrikaans lefthyphenmin=1 righthyphenmin=2 file=loadhyph-af.tex file_patterns=hyph-af.pat.txt usenglish=hyph-af.hyp.txt
I found the parameter usenglish
to be a bit weird and unexpected. Shouldn't it be file_exceptions
instead of usenglish
.
I could see that it is in language.dat.lua
-- from hyphen-afrikaans:
['afrikaans'] = {
loader = 'loadhyph-af.tex',
lefthyphenmin = 1,
righthyphenmin = 2,
synonyms = { },
patterns = 'hyph-af.pat.txt',
hyphenation = 'hyph-af.hyp.txt',
},
wherein other places hyphenation
is the file_exceptions
parameter in the tlpdb
file.
@norbusan can you help?
That is indeed strange, can you send me an email and/or the TL list to remind me, in currently in the mountains
Oh, I was using an old texlive.tlpdb
for a reference locally, getting the latest one that was fixed. Anyway, I will send you an email with the file I have.
Also, have a nice time!
This is fixed in #5
Currently, we just copy the default
language.dat
andlanguage.def
and it creates an error because of missing files and asking over at mailing list, it looks like we should create it like how we do for*.fmts
and*.maps
. See https://tug.org/pipermail/tldistro/2021q2/000415.html.It's about parsing
texlive.tlpdb
, theexecute AddHyphen
sections from them. For example, in a package calledhyphen-indic
this is the sectionthe corresponding
language.def
should beand for
language.dat
is should beAfter parsing the file should be saved as
<package-name>.def
and<package-name>.dat
, and the hook needs to be updated so that these are added saved aslanguage.*
and loaded accordingly.