jspitz / biblatex-publist

BibLaTeX bibliography support for publication lists
38 stars 4 forks source link

How can I put the year field at the end? #45

Closed aywi closed 1 year ago

aywi commented 1 year ago

Hi, great package! Here is a problem. I prefer to use the bib styles that put the year field at the end (but before eprints), such as ieee and trad-unsrt. When I try to use \newcommand*\publistbasestyle{<stylename>} to change the base style, it looks like publist just ignores the order setting for the year field and still puts it right after the author. Is this hard-coded? Are there any simple methods to make it follow the setting of the base style? Thanks!

I am using the following settings:

\newcommand*\publistbasestyle{trad-unsrt}
\usepackage[bibstyle=publist,hlyear=false,nameorder=given-family,plauthorhandling=highlight,plsorting=ddnt]{biblatex}
jspitz commented 1 year ago

Yes, it's hardcoded.

Adding

\renewbibmacro*{bpl:year+labelyear}{}

below the lines you posted should solve it.

aywi commented 1 year ago

Yes, it's hardcoded.

Adding

\renewbibmacro*{bpl:year+labelyear}{}

below the lines you posted should solve it.

Thank you! It works.

You might consider adding it to Section 3.2 "Using a Different Base Style" of the package documentation.

jspitz commented 1 year ago

I am considering an option, as this has been now requested repeatedly.

aywi commented 1 year ago

@jspitz Another problem: it may add an extra period at the end of the author list if the style's delimiter between author and title is not a period (e.g. comma for ieee). Any thoughts?

MWE:

\documentclass{article}

\newcommand*\publistbasestyle{ieee}
\usepackage[bibstyle=publist,hlyear=false,nameorder=given-family,plauthorhandling=highlight]{biblatex}
\renewbibmacro*{bpl:year+labelyear}{}
% \usepackage[bibstyle=ieee]{biblatex} % Use this setting to print the expected behavior
\addbibresource{biblatex-examples.bib}

\begin{document}

\nocite{herrmann,kastenholz,murray}
\defbibenvironment{Publications}
{\begin{enumerate}}
{\end{enumerate}}
{\item}
\printbibliography[env=Publications,heading=none]

\end{document}
jspitz commented 1 year ago

I have added a new option, fixyear. Setting fixyear=false should do what you want, also the punctuation should be correct now.

Please try and report back.

aywi commented 1 year ago

I have added a new option, fixyear. Setting fixyear=false should do what you want, also the punctuation should be correct now.

Please try and report back.

Thanks! Now the outputs are identical.

MWE:

\documentclass{article}

\newcommand*\publistbasestyle{ieee}
\usepackage[bibstyle=publist,fixyear=false,nameorder=given-family,plauthorhandling=highlight]{biblatex}
% \usepackage[bibstyle=ieee]{biblatex} % Use this setting to print the expected behavior
\addbibresource{biblatex-examples.bib}

\begin{document}

\nocite{herrmann,kastenholz,murray}
\defbibenvironment{Publications}
{\begin{enumerate}}
{\end{enumerate}}
{\item}
\printbibliography[env=Publications,heading=none]

\end{document}
jspitz commented 1 year ago

V. 2.4 has been submitted to CTAN.