Hi.
Does anybody know if it's possible to modify the harvard package so the possessive is ' (just an apostrophe) when the author's name ends with s/sh/sj/rs/z, and just s (no apostrophe) in any other case?
BibTeX, biblatex and biber ⇒ harvard | Modify '\possessivecite'
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
harvard | Modify '\possessivecite'
You can try these lines in the preamble of your document. The code is taken from the harvard package code and slightly modified to define the new command \possessivecites along with its needed helper macros.
Due to a missing minimal example this is untested.
Best regards and welcome to the board
Thorsten
Code: Select all
\makeatletter
\newcommand{\possessivecites}{\@ifstar{\@ifstar{\HAR@acitespos}{\HAR@fcitespos}}%
{\HAR@dcitespos}%
}
\newcommand{\HAR@fcitespos}[2][\null]{\HAR@citetoaux{#2}\HAR@checkdef{#2}{%
{\HAR@fname{#2}' \harvardyearleft\HAR@year{#2}\ifthenelse{\equal{#1}{\null}}
{}{, #1}\harvardyearright}\HAR@setd{#2}}%
}
\newcommand{\HAR@acitespos}[2][\null]{\HAR@citetoaux{#2}\HAR@checkdef{#2}{%
{\HAR@aname{#2}' \harvardyearleft\HAR@year{#2}\ifthenelse{\equal{#1}{\null}}
{}{, #1}\harvardyearright}\HAR@setd{#2}}%
}
\newcommand{\HAR@dcitespos}[2][\null]{\HAR@citetoaux{#2}\HAR@checkdef{#2}{%
{\HAR@name{#2}' \harvardyearleft\HAR@year{#2}\ifthenelse{\equal{#1}{\null}}
{}{, #1}\harvardyearright}\HAR@setd{#2}}%
}
\makeatother
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 3
- Joined: Fri Jan 27, 2012 5:20 pm
harvard | Modify '\possessivecite'
Thanks.
The problem now is that the possessive seems to be ' (just an apostroph) in any case, not just when the author's name ends with s/sh/sj/rs/z.
Is it possible to fix this, so the possessive is the letter s when the author's name ends in any other letters. E.g. for Knuth it should display Knuths, not Knuth'.
The problem now is that the possessive seems to be ' (just an apostroph) in any case, not just when the author's name ends with s/sh/sj/rs/z.
Is it possible to fix this, so the possessive is the letter s when the author's name ends in any other letters. E.g. for Knuth it should display Knuths, not Knuth'.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
harvard | Modify '\possessivecite'
For names that end with an s/sh/sj/rs/z use the new \possessivecites command. This was defined in addition to the other commands. For any other case you have still the original \possessivecite command (without the s at the end).
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 3
- Joined: Fri Jan 27, 2012 5:20 pm
Re: harvard | Modify '\possessivecite'
Okay, I see.
I was hoping it was possible to have just one command that automatically added the correct possessive, depending on the author's name.
Maybe this isn't even possible?
I was hoping it was possible to have just one command that automatically added the correct possessive, depending on the author's name.
Maybe this isn't even possible?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
harvard | Modify '\possessivecite'
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10