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

\prevdepth error in horizontal mode #31

Closed
typedivision opened this issue May 24, 2019 · 5 comments
Closed

\prevdepth error in horizontal mode #31

typedivision opened this issue May 24, 2019 · 5 comments
Assignees
Labels

Comments

@typedivision
Copy link

Hi, for the template database sideways I got this LaTex error:

! You can't use `\prevdepth' in restricted horizontal mode.
\nointerlineskip ->\prevdepth

when I use the family database option
parent[family database={marriage={...}{...}}]
but with explicit node label, e.g.
parent[family database={marriage={...}{...}}, family label={\gtrsymMarried~\textbf{\gtrPrintDate{marriage} \gtrPrintPlace{marriage}}}]
all went fine.

Could this be an issue in the genealogytree package?

@T-F-S
Copy link
Owner

T-F-S commented May 27, 2019

Well, that is difficult to say.

Page 208 of the documention shows an example which compiles without errors.
I would need a MWE (Minimal Working Example) of code to reproduce the problem...

@typedivision
Copy link
Author

Of course, I've created one:

\documentclass[border=10pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[all]{genealogytree}
\begin{document}
\begin{genealogypicture}[%
  template=database sideways,
  timeflow=right,
  parent distance=8mm,
  label options={node font=\tiny,anchor=east,xshift=-4mm},
]
child[id=SmitBowd1742,
      family database={marriage={1742-03-02}{}},
      %family label={\gtrsymMarried~\gtrPrintDate{marriage}},
]{
  g[id=SmitChar1722]{male, name = {\pref{Charles} Smith}}
  p[id=BowdJane1724]{female, name = {\pref{Jane} Bowden}}
  c[id=BowdAbra1740]{male, name = {\pref{Abraham} Bowden}}
}
\end{genealogypicture}
\end{document}

Without the family label option this example will raise the mentioned error.
Build on MacOS by pdflatex:
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019)

@T-F-S T-F-S self-assigned this May 28, 2019
@T-F-S T-F-S added the bug label May 28, 2019
@T-F-S
Copy link
Owner

T-F-S commented May 28, 2019

Thank your for the MWE. I can reproduce and confirm the issue now.

I also found the cause for the problem which is specific for the template database sideways (et.al.). The formatting of the family label inherits the event list format of the person boxes. But, here, this format is not compatible with the TikZ node to display the marriage.

For the next version, I will decouple this by giving the family label a more or less empty event list format. I hope this will not break some existing fancy user code, but I think that is unlikely.

Until then, you should add an option like the following:

label database options={list separators={}{}{}{}},

or

label database options={list separators={}{, }{}{}},

This clears the event list format for the labels and the issue should be gone.

With the next version, which could take some time, this additional setting will not be needed anymore, but it will not hurt, if you keep it.

The following should compile without problems:

\documentclass[border=10pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[all]{genealogytree}

\begin{document}
\begin{genealogypicture}[%
  template=database sideways,
  timeflow=right,
  parent distance=8mm,
  label options={node font=\tiny,anchor=east,xshift=-4mm},
  label database options={list separators={}{}{}{}},% <--- add this to avoid the problem
]
child[id=SmitBowd1742,
      family database={marriage={1742-03-02}{}},
      %family label={\gtrsymMarried~\gtrPrintDate{marriage}},
]{
  g[id=SmitChar1722]{male, name = {\pref{Charles} Smith}}
  p[id=BowdJane1724]{female, name = {\pref{Jane} Bowden}}
  c[id=BowdAbra1740]{male, name = {\pref{Abraham} Bowden}}
}
\end{genealogypicture}
\end{document}

@typedivision
Copy link
Author

Thank you for helping out and many thanks for this excellent software package.

@T-F-S
Copy link
Owner

T-F-S commented Jun 19, 2020

Resolved with version 2.00 (2020/06/19).

@T-F-S T-F-S closed this as completed Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants