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

Add an option to make et al. italic #899

Closed
veraverto opened this issue Jun 17, 2019 · 8 comments
Closed

Add an option to make et al. italic #899

veraverto opened this issue Jun 17, 2019 · 8 comments
Milestone

Comments

@veraverto
Copy link

It would be great to add an option to biblatex which writes the et al. in italic text. This would make a manual modification of style files unnecessary.

@moewew
Copy link
Collaborator

moewew commented Jun 18, 2019

Thank you for that suggestion.

I'm not too sure if we really need an option here. But something like

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear, backend=biber]{biblatex}

\newcommand*{\mkbibetal}[1]{#1}

\renewbibmacro*{name:andothers}{%
  \ifboolexpr{
    test {\ifnumequal{\value{listcount}}{\value{liststop}}}
    and
    test \ifmorenames
  }
    {\ifnumgreater{\value{liststop}}{1}
       {\finalandcomma}
       {}%
     \printdelim{andothersdelim}\bibstring[\mkbibetal]{andothers}}
    {}}

\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{sigfridsson,aksin}
\printbibliography
\end{document}

might work.

Of course you can always just add the italics to the bibstring.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear, backend=biber]{biblatex}

\DefineBibliographyStrings{english}{
  andothers = {\mkbibemph{et\addabbrvspace al\adddot}}
}

\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{sigfridsson,aksin}
\printbibliography
\end{document}

That is also not that much work.

Related #555, discussion in #552 as well as several TeX.SX questions (a recent one touching upon this subject would be https://tex.stackexchange.com/q/495844/35864, the big one https://tex.stackexchange.com/q/40798/35864, there is also https://tex.stackexchange.com/q/352114/35864, some of these have some more discussions in the comments).

@veraverto
Copy link
Author

Thank you for your advice! I see that it is possible to change the bibstring quite easily and I am unsure if an option for this is useful in general. I thought a distinct option would make Biblatex more user friendly.

@moewew
Copy link
Collaborator

moewew commented Jun 19, 2019

Since this request comes up from time to time I was thinking about implementing a \mkbibetal (or similar) as shown in the first code block so that a user would just have to add the single line

\renewcommand*{\mkbibetal}{\mkbibitalic}

to her document to get italic "et al."s. I'm just not too sure whether or not to reuse the command \mkibid used by some verbose styles or if this should be a new command with a new name. And if it should have a new name, which? \mkandothers, \mkbibandothers? biblatex alternates between \mkbib... and \mk.... Obviously the \mkbib.... names are 'safer'. (At the moment I gravitate towards using the new name \mkbibandothers.)


My comment about the option was specifically about implementing a feature like this as a package option. I believe that some customisation features benefit from being set up not as package options but via macros. Option handling is a bit tricky (especially with the pre-processing done to options from the LaTeX side) and options are often not as flexible as say macro redefinitions.

@moewew
Copy link
Collaborator

moewew commented Mar 30, 2021

With #1028 merged you can get then desired effect in biblatex dev and the upcoming release with

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear, backend=biber]{biblatex}

\DefineBibliographyExtras{british}{%
  \DeclareBibstringSet{latin}{andothers}%
  \DeclareBibstringSetFormat{latin}{\mkbibemph{#1}}}

\UndefineBibliographyExtras{british}{%
  \UndeclareBibstringSet{latin}}

\addbibresource{biblatex-examples.bib}

\begin{document}
\autocite{sigfridsson,aksin}
\printbibliography
\end{document}

@christian-cahig
Copy link

With #1028 merged you can get then desired effect in biblatex dev and the upcoming release with

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear, backend=biber]{biblatex}

\DefineBibliographyExtras{british}{%
  \DeclareBibstringSet{latin}{andothers}%
  \DeclareBibstringSetFormat{latin}{\mkbibemph{#1}}}

\UndefineBibliographyExtras{british}{%
  \UndeclareBibstringSet{latin}}

\addbibresource{biblatex-examples.bib}

\begin{document}
\autocite{sigfridsson,aksin}
\printbibliography
\end{document}

@moewew will this also italicize "et al."s in the bibliography?

@moewew
Copy link
Collaborator

moewew commented Apr 17, 2021

Yes. This formatting is a property of the string (in a certain language) and is applied whenever the string is used, no matter if in citations or the bibliography.

The output from the MWE above with the current dev branch is

Aksın et al. 2006

in the citation and

Aksın, Özge et al. (2006).

in the bibliography

grafik

@moewew moewew added the fixedindev Fixed in current DEV version label Apr 17, 2021
@moewew moewew added this to the v3.17 milestone Apr 17, 2021
@christian-cahig
Copy link

@moewew wow that's great. I can't wait to try it when 3.17 comes out. I'm currently using 3.16, and I don't think I can use dev features via MikTeX.

@moewew
Copy link
Collaborator

moewew commented Feb 8, 2022

biblatex 3.17 is out now, the example from #899 (comment) works as shown there.

@moewew moewew closed this as completed Feb 8, 2022
@moewew moewew removed the fixedindev Fixed in current DEV version label Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants