Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the database processor outside a tree #24

Closed
mikkelee opened this issue Nov 26, 2018 · 4 comments
Closed

Using the database processor outside a tree #24

mikkelee opened this issue Nov 26, 2018 · 4 comments
Assignees

Comments

@mikkelee
Copy link
Contributor

mikkelee commented Nov 26, 2018

Hi

Say I want to create a number of "profiles" containing genealogical information, parsed and displayed according to the genealogytree options & styles — ie. symbols, date formatting, etc.

I have the following which does indeed print the names & birth data as expected, but before going further, I would love to know if there are any special considerations or precautions I should take :)

\documentclass{article}

\usepackage{genealogytree}

\newenvironment{genprofile}{%
}{%
	\gtrPrintDatabase%
}

\begin{document}

\begin{genprofile}
\gtrset{
	database/.cd,
	name = {Jens Hansen},
	birth = {1800}{Denmark},
}
\end{genprofile}

\begin{genprofile}
\gtrset{
	database/.cd,
	name = {Hans Jensen},
	birth = {1900}{Denmark},
}
\end{genprofile}

\end{document}
@T-F-S
Copy link
Owner

T-F-S commented Nov 26, 2018

I think the main consideration is about avoiding to use internal macros as far as possible, because undocumented macros and options are in danger to be changed without warning.

Here, \gtrPrintDatabase is undocumented, but needed for your application. Since using the database outside a tree seems a very reasonable application to me, I consider to document \gtrPrintDatabase officially to safeguard your approach. Currently, I do not have much time for such things, but I put it on my TODO list.

@T-F-S T-F-S self-assigned this Nov 26, 2018
@mikkelee
Copy link
Contributor Author

Thanks, there's no rush! I might post some observations & comments in this issue as I get deeper into my project.

@mikkelee
Copy link
Contributor Author

mikkelee commented Nov 26, 2018

An option for choosing to display the text values instead of the symbols themselves would be nice to have, ie. \gtrset{birth/.initial=\gtr@sym@Born@text}.

I can write up a patch to make each \gtrsym... macro express as text or symbol depending on a setting, if that is the correct approach.

e: this turns out not to be necessary for my usecase.

@T-F-S
Copy link
Owner

T-F-S commented Apr 10, 2019

\gtrPrintDatabase is now officially documented (starting from version 1.32).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants