2

I would like to know how to handle custom data in my genealogytree database.

For the first step I added the new key to the database entries:

p{
  birth- = {1872-10-11},
  death- = {1948-05-14},
  deathage = {75},
}

In the options I set /gtr/database unknown key=save according to p. 157 of the manual which should put the data to /gtr/database/save/deathage.

Now I am wondering how to access those data. How can I check if they custom key is set (\gtrif…?) and how can I print the content in a custom database format?

Edit: Testing with a minimal example makes me believe that my custom data are not available at \grtDBdeathage like other pieces of data.

2

Unknown keys can be saved, but there is no special package support to automatically create macros like \grtDBdeathage.

You can access private keys like /gtr/database/save/deathage as documented in the pgfmanual '82 Key Management', e.g.

\pgfkeysvalueof{/gtr/database/save/deathage}

or

\pgfkeys{/gtr/database/save/deathage/.get=\mymacro}
\mymacro

or

\gtrset{database/save/deathage/.get=\mymacro}
\mymacro
  • Thank you very much for pointing me to the right place! I ended up defining a new database format derived from full and added this part: \pgfkeysifdefined{/gtr/database/save/deathage}{ (\pgfkeysvalueof{/gtr/database/save/deathage})}{} – jœ. Dec 6 '18 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.