Latest news 2019-12-05: new blog post "RSS Feeds and Other Notifications."

Bug Tracker

ID75
StatusClosed (Fixed)
Categorydatatool
Versionv2.22
SummaryPackage person.sty contains bugs

Report

The package person.sty contains several bugs. I found it necessary to redefine the following macros:
\persongender, \getpersongender, \ifmale, \iffemale
See MWE attached.

Adrian Devries

MWE

\listfiles
\documentclass{article}

\usepackage{person}

\renewcommand*{\persongender}[1]{%
   \ifmale{#1}{\malename}{\femalename}%
}
\renewcommand*{\getpersongender}[2]{%
   \ifmale{#2}{\let#1\malename}{\let#1\femalename}%
}
\makeatletter
\renewcommand{\ifmale}[3]{%
   \ifpersonexists{#1}%
   {%
      \edef\@gender{\csname person@#1@gender\endcsname}%
      \ifx\@gender\@male@label
        #2%
      \else
        #3%
      \fi
   }%
   {%
      \PackageError{person}{Person `#1' doesn't exist.}{}%
   }%
}
\renewcommand{\iffemale}[3]{%
   \ifpersonexists{#1}%
   {%
      \edef\@gender{\csname person@#1@gender\endcsname}%
      \ifx\@gender\@female@label
        #2%
      \else
        #3%
      \fi
   }%
   {%
      \PackageError{person}{Person `#1' doesn't exist.}{}%
   }%
}
\makeatother

\newcommand*{\myLabel}{firstMan}%
\newperson[\myLabel]{Adam I.}{Adam}{male}

\begin{document}

  \section{Test}

  Test \verb+\foreachperson+:\par
  \bfseries{}%
  PersName,PersFullName,PersGender,PersLabel\par%
  \normalfont{}%
  \foreachperson(\myPersName,\myPersFullName,\myPersGender,\myPersLabel) \do {%
    \myPersName,\myPersFullName,\myPersGender,\myPersLabel\par%
  }

  \noindent%
  Test \verb+\getpersongender+:\par
  \getpersonname{\myPersNameNew}{\myLabel}
  \getpersonfullname{\myPersFullNameNew}{\myLabel}
  \getpersongender{\myPersGenderNew}{\myLabel}\par
  Name of \myLabel: \myPersNameNew\par
  Full name of \myLabel: \myPersFullNameNew\par
  Gender of \myLabel: \myPersGenderNew\par

  \noindent%
  Test \verb+\ifmale+:\par
  Gender of \personname[\myLabel]: \ifmale{\myLabel}{\malename}{\femalename}\par

  \noindent%
  Test \verb+\iffemale+:\par
  Gender of \personname[\myLabel]: \iffemale{\myLabel}{\femalename}{\malename}\par

  \section{File list}

  \small%
  \begin{verbatim}
     *File List*
     article.cls    2014/09/29 v1.4h Standard LaTeX document class
      size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
      person.sty    2013/06/28 v2.14 (NLCT)
      ifthen.sty    2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
    datatool.sty    2014/06/10 v2.22 (NLCT)
     xkeyval.sty    2014/05/25 v2.7 package option processing (HA)
     xkeyval.tex    2014/05/25 v2.7 key=value parser (HA)
        xfor.sty    2009/02/05 v1.05 (NLCT)
      substr.sty    2009/10/20 v1.2 Handle substrings
    etoolbox.sty    2011/01/03 v2.1 e-TeX tools for LaTeX
        etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
    datatool-base.sty    2014/06/10 v2.22 (NLCT)
     amsmath.sty    2013/01/14 v2.14 AMS math features
     amstext.sty    2000/06/29 v2.01
      amsgen.sty    1999/11/30 v2.0
      amsbsy.sty    1999/11/29 v1.2d
      amsopn.sty    1999/12/14 v2.01 operator names
    datatool-fp.sty    2013/08/29 v2.17 (NLCT)
          fp.sty    1995/04/02
    defpattern.sty    1994/10/12
    fp-basic.sty    1996/05/13
    fp-addons.sty    1995/03/15
     fp-snap.sty    1995/04/05
      fp-exp.sty    1995/04/03
    fp-trigo.sty    1995/04/14
      fp-pas.sty    1994/08/29
    fp-random.sty    1995/02/23
      fp-eqn.sty    1995/04/03
      fp-upn.sty    1996/10/21
     fp-eval.sty    1995/04/03
  \end{verbatim}

\end{document}

Evaluation

Fixed in v2.23.

Add comment.

Watch This Report

If you would like to be notified whenever updates are made to this report, please fill in your email address in the box below and click on "Notify Me of Changes" button. (Please ensure the address is valid.) Your details won't be passed on to third parties in line with this site's Privacy Policy.

If you supply your name, it will be used in the email greeting, which provides a more personal message, otherwise you'll just get a generic greeting. If you have previously supplied your name when signing up for notifications, you don't need to resupply it unless you want to change it.

If you have previously subscribed to notifications for this report, you can unsubscribe by clicking on the "Stop Notification" button.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional.)
E mail:
Confirm E mail:
Confirm Bug ID:

To unsubscribe from all notifications use the notifications page.

Comment

You can append a comment to the report using the form below. Comments are checked first before being added. Any spam or offensive content will be removed first according to this site's Terms of Website Use. Please bear in mind that I develop and maintain free software in my spare time. If you want commerical level support then you can hire a TeX consultant.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional. If provided, it will be shown with the comment.)
Confirm Bug ID:

You can use the following markup:

[pre]Displayed verbatim[/pre]
[tt]monospace text[/tt]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url]

Ordered list:
[ol]
[li]first item[/li]
[li]second item[/li]
[/ol]

Unordered list:
[ul]
[li]first item[/li]
[li]second item[/li]
[/ul]

Click on the Preview button to preview the message.

Return to list.

© 2019 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Cookies Site Map FAQs