0

Im in the middle of writing a scientific report and have the issue of:

I want to use the ACS ref-style in the reference list but not in text. It would be preferably to use the format of for example

(Lastname, 1990)

in text.

Currently the biblatex is used with the following input

\usepackage[
backend=biber,
style=chem-acs,
sorting=nty
]{biblatex}

It appears as [1] in the text but my supervisor want the other style. What I've concluded is that the style overrides other changes I've done so far. I tried the natbib but the knowledge in general of Latex is limited, but it truly gets good when it work.

moewe
  • 175,683
ChemG
  • 3

2 Answers2

0

To meet what you want, you can simply define the command below:

\newcommand{\cited}[1]{(\citeauthor{#1}, \citeyear{#1})}

However, when you do this, clicking on the year no longer leads to the corresponding reference in the Bibliography section. So we need to change the citeyear command. (This specific solution was given here: Getting hyperref to work with \citeyear and \citeyearpar in biblatex)

More information on this is available in page 184 of this pdf: https://ftp.yz.yamagata-u.ac.jp/pub/CTAN/macros/latex/contrib/biblatex/doc/biblatex.pdf

A snippet will look like this:

% Basic settings
\documentclass[12pt, a4paper]{article}
\usepackage[english]{babel}

% Bibliography management \usepackage[backend=biber, style=chem-acs]{biblatex} \usepackage[hidelinks]{hyperref} \addbibresource{References.bib}

% Redefining citeyear \DeclareCiteCommand{\citeyear} {} {\bibhyperref{\printfield{year}}} {\multicitedelim} {}

% The command \newcommand{\cited}[1]{(\citeauthor{#1}, \citeyear{#1})}

\begin{document} \section*{Introduction} Lorem ipsum \cited{example} \printbibliography[heading=bibintoc,title={Bibliography}] \end{document}

Fabz
  • 33
  • In general it is not good advice to combine several \cite... commands into a \newcommand. Unless care is taken commands defined like this have problems with pre- and postnotes (this definition does not support them at all) and even more with multiple citations (try \cited{sigfridsson,worman}). Furthermore, the fact that one command now executes several instances of \cite... commands can mess up citation tracking and other context-sensitive features. – moewe Jun 21 '23 at 15:15
  • I see! If you could elaborate a bit more on the context-sensitive feature that would be nice! Also thanks for the comment! – Fabz Jun 22 '23 at 02:01
  • With context-sensitive features is mean something like citation counting, which is thrown off by repackaging two cite commands into one. Or something like the "ibid." feature. Most of these features will probably be disabled for \citeauthor and \citeyear, so will not work at all, but it would also be pretty hard to get them to work in this setup. – moewe Jun 22 '23 at 06:16
  • Just to mention the preferred solution here as well: New citation commands should be defined with \DeclareCiteCommand. Of course those commands are defined with different idioms than the \newcommand suggested here, but then biblatex takes care of most of the points I mentioned in the comments above. – moewe Jun 22 '23 at 06:18
0

chem-acs is fundamentally a numeric style. Combining it with author-year citations without any changes will lead to weird results.

biblatex allows you to select the bibliography and citation style separately. So the naive approach of

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

\usepackage[ backend=biber, bibstyle=chem-acs, citestyle=authoryear, sorting=nyt, ]{biblatex}

\addbibresource{biblatex-examples.bib}

\begin{document} Lorem \autocite{sigfridsson}

\printbibliography \end{document}

works in principle, but creates undesirable output

Lorem (Sigfridsson and Ryde 1998)

The number in the bibliography has no connection to anything in the text and actually takes focus away from the name (which you need to identify the citation uniquely).

We can get rid of the number by redefining the bibliography environment.

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

\usepackage[ backend=biber, bibstyle=chem-acs, citestyle=authoryear, sorting=nyt, ]{biblatex}

\defbibenvironment{bibliography} {\list {} {\setlength{\leftmargin}{\bibhang}% \setlength{\itemindent}{-\leftmargin}% \setlength{\itemsep}{\bibitemsep}% \setlength{\parsep}{\bibparsep}}} {\endlist} {\item}

\addbibresource{biblatex-examples.bib}

\begin{document} Lorem \autocite{sigfridsson} ipsum \autocite{worman} dolo \autocite{geer}

\printbibliography \end{document}

Lorem (Sigfridsson and Ryde 1998) ipsum (Worman 2002) dolo (Geer 1985)

But this highlights another way in which this combination is suboptimal: A citation is identified by author and year. The year is hidden towards the end of an entry and does not immediately catch our attention when we scan the entries (unless maybe for @articles, where the year is bold). As such the bibliography style is a poor fit for author-year citations.

A standard authoryear style produces much more pleasant results.

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

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

\addbibresource{biblatex-examples.bib}

\begin{document} Lorem \autocite{sigfridsson} ipsum \autocite{worman} dolo \autocite{geer}

\printbibliography \end{document}

Sigfridsson, Emma and Ulf Ryde (1998). ‘Comparison of methods for deriving atomic charges from the electrostatic potential and moments’. In: Journal of Computational Chemistry 19.4, pp. 377–395. doi: 10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P.

moewe
  • 175,683