The following answer to the second part of my question is based on discussions with lockstep in chat where we discovered that there have been significant changes to how dates are formatted in bibtex
v1.1b which make his original answer potentially problematic. I thank him for his help.
For the first part of the question, his answer stands: to get parentheses around in-text citation years, use the \textcite
family of commands.
To remove the parentheses from the bibliography years requires significant modification to the .bbx
file. (I describe the modifications schematically here.) The actual modification should ideally be part of a separate .bbx
file.
The biblatex authoryear.bbx
file contains the following code to format various date fields. (This is just one of 5 such blocks of code: \bbx@opt@mergedate@maximum
, compact
, basic
, minimum
and false
.)
\def\bbx@opt@mergedate@basic{%
\renewbibmacro*{date+extrayear}{%
\iffieldundef{year}
{}
{\printtext[parens]{%
\printfield{labelyear}%
\printfield{extrayear}}}}%
\renewbibmacro*{date}{%
\iffieldundef{month}
{}
{\printdate}}%
\renewbibmacro*{issue+date}{%
\ifboolexpr{
test {\iffieldundef{issue}}
and
test {\iffieldundef{month}}
}
{}
{\printtext[parens]{%
\printfield{issue}%
\setunit*{\addspace}%
\printdate}}%
\newunit}%
}
The relevant part of the code that formats the year field is:
\renewbibmacro*{date+extrayear}{%
\iffieldundef{year}
{}
{\printtext[parens]{%
\printfield{labelyear}%
\printfield{extrayear}}}}
Notice that the two \printfield
commands are enclosed in a \printtext[parens]
command. This is the command that needs to be changed. So we redefine it without the [parens]
format, and additionally we add punctuation and a space (which will appear right after the author name). This is needed because in styles that don't parenthesize the year, both author and year need to be punctuated.
So the redefined code is:
\renewbibmacro*{date+extrayear}{%
\iffieldundef{year}
{}
{\printtext{%
\addperiod\space\printfield{labelyear}%
\printfield{extrayear}}}}
The same change needs to be made in each of the \bbx@opt@mergedate@...
commands.
To make these changes take effect, the .bbx
file must also have the line:
\ExecuteBibliographyOptions{labelyear,sorting=nyt,pagetracker,mergedate}
Additionally, the following needs to be added to the .bbx
file to correctly format the extra year field when the year is non-numeric. (Based on lockstep's answer to this question: How to format the extrayear field in biblatex.
\DeclareFieldFormat{extrayear}{%
\iffieldnums{labelyear}{%
\mknumalph{#1}%
}{%
\mkbibparens{\mknumalph{#1}}%
}%
}
It would be nice if this sort of change would not take such low-level programming, but could be a user option. But for now this seems to be the best way to achieve it.
biblatex
is now at tex.stackexchange.com/q/428190/35864 – moewe Apr 24 '18 at 6:17