2

I followed the instructions for the genealogytree package to create a Hungarian language library. I tested it but I now want to use the library. What do I need to do? I have TeXLive on a Fedora Liux system. I have copied gtrlang.hungarian.code.tex to /usr/share/texlive/texmf-dist/tex/latex/genealogytree and ran texhash but I still get Package genealogytree Error: The library 'lang.hungarian' is unknown..

js bibra
  • 21,280
  • It is rather hard to debug this. Did you try to put the library file in the same directory as the file which you are compiling? –  Nov 29 '19 at 21:10
  • Yes. genealogytree cannot find it in the current (working) directory, and this is why I tried to put it in the TeXLive dist directory. I ran texhash and I do see the file in the appropriate ls-R file, but the error persists. Unfortunately, the docs of genealogytree don't give indication what to do. – Máté Wierdl Nov 29 '19 at 21:36
  • Indeed. I tried to add a library and failed as well. In the code you find \IfFileExists{gtrlib.\pgfkeyscurrentname.code.tex}%, so there might be some confusion between gtrlib and gtrlang but just renaming the file accordingly does not fix the issue. –  Nov 29 '19 at 22:15
  • 1
    You shouldn't install into /usr/share/texlive regardless. That's for DNF to manage. Instead, use the value of TEXMFLOCAL (needs texhash) or TEXMFHOME (no need for texhash). – cfr Nov 29 '19 at 22:22
  • @Schrödinger'scat Does it work for, say, Danish? (I know I could test, but then I'd have to remember how to make a minimal example for the package.) – cfr Nov 29 '19 at 22:24
  • Have you tried adding \makeatletter\gtr@add@library{lang.hungarian}{gtrlang.hungarian.code.tex}\makeatother after loading the package and before setting the language, in the preamble? – cfr Nov 29 '19 at 22:29
  • 1
    @cfr I copied cp /usr/local/texlive/2019/texmf-dist/tex/latex/genealogytree/gtrlang.german.code.tex gtrlang.bavarian.code.tex (of course in my local directory) and tried to load bavarian. Didn't work. \makeatletter \input{gtrlang.bavarian.code.tex} \makeatother does work, so I think it could be a bug. –  Nov 29 '19 at 22:35
  • @MátéWierdl What happens if you copy your language file to gtrlib.lang.hungarian.code.tex? –  Nov 29 '19 at 22:41
  • @Schrödinger'scat I followed the instructions in genealogytree-languages.pdf for testing a new language with bavarian created as you described (I think) and the test document provided compiled fine (and includes output for bavarian). However, I'm not sure that custom languages can be used out-of-the-box in the same way as those provided by the package. – cfr Nov 30 '19 at 02:36
  • However, I'm not sure that's actually testing the same thing ... ? – cfr Nov 30 '19 at 02:57
  • I am not sure it's a bug @Schrödinger'scat. It seems to be broken by design .... – cfr Nov 30 '19 at 03:35
  • @cfr I'd like to encourage you to add an answer. There is a great demand for Welsh genealogy trees. ;-) –  Nov 30 '19 at 03:47
  • @cfr For me the following works: 1. in the same folder as the .tex file: cp /usr/local/texlive/2019/texmf-dist/tex/latex/genealogytree/gtrlang.german.code.tex gtrlib.lang.bavarian.code.tex. 2. In gtrlib.lang.bavarian.code.tex replace language@/german/.code by language@/bavarian/.code. 3. put \gtrset{language=bavarian} in the preamble. Then it does translate e.g. dates to German/Bavarian. –  Nov 30 '19 at 03:59
  • @Schrödinger'scat I replaced all the germans, but I didn't use gtrlib. However, I don't understand why yours worked. Maybe it is a bug, then. – cfr Dec 01 '19 at 00:55
  • @cfr In your case the file name is gtrlang.bavarian.code.tex and it works? –  Dec 01 '19 at 01:01
  • @Schrödinger'scat The language test file compiles, yes. But that doesn't mean it works for real, no. It passes the packages test compilation. That's all. – cfr Dec 01 '19 at 01:04
  • @cfr In my case it does work, I think. At least it successfully replaced February by the Bavarian word Februar in a date. –  Dec 01 '19 at 01:11
  • Consider submitting a pull request to Thomas F. Sturm. I did so for Danish: https://github.com/T-F-S/genealogytree/pull/2 – meide Dec 05 '19 at 06:14

0 Answers0