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.

1 Answer 1

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
1
  • 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, 2018 at 20:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .