3

Is there a command for citing in biblatex that somewhat can do what \citeauthor does but with a little bit more. I am looking for something like \cite[85-86][2017]{mehlich2017}. So the output is something like

(Mehlich, 2017, p. 85-86)

Or that it can take the year itself from the biblatex eintry so its just \cite[85-86]{mehlich2017}. I tried looking at the documentation, but I am not sure how I would create a command, since I don't seem to find one that does what I need.

I am using biblatex and the memoir class and currently using this basic setup (I've used this for quite some time, and I don't think its this one creating problems). Thanks in advance.

\documentclass[11pt,openright,oneside,british,a4paper]{memoir}

%  Packages
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{import}

\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[colorlinks=true, allcolors=blue]{hyperref}

\usepackage[backend=biber,
  style=chem-acs,  % Citation style as (AUTHOR YEAR)
  sorting=none,            % Sort citations as YEAR-NAME-TITLE
  sortcites=true,
  %dashed=false,
  maxcitenames=3,         % Increase/decrease to include more/fewer authors in cites
  maxbibnames=5,          % As above, but in the bibliography
  uniquelist=false,
  uniquename=false,
  doi=false,
  isbn=false,
  eprint=false,
  autocite=superscript,
  biblabel=brackets,
  hyperref=true]{biblatex}

%\usepackage[backend=biber]{biblatex}
\addbibresource{bibliography.bib}




\title{Your Paper}
\author{Me}

%----------------------------------------------------------------------------------------
\begin{document}
\maketitle

Your introduction goes here! Simply start writing your document and use the Recompile button to view the updated PDF preview \parencite[85]{mehlich2017}

\end{document}
8
  • 4
    well you can define all sort of citation commands. But don't you get this already with \parencite? Commented Nov 16, 2021 at 10:43
  • Hello. No \parencite just creates [1, p 85] sadly Commented Nov 16, 2021 at 11:26
  • 1
    well you didn't provide a full example, so I didn't test, but the comment beside the style says Citation style as (AUTHOR YEAR). If it is a numeric style, you should perhaps switch to authoryear instead. Commented Nov 16, 2021 at 11:32
  • As always here, it is best to include a complete example with your question that shows your problem and that people can run on their end to recreate it and test solutions.
    – schtandard
    Commented Nov 16, 2021 at 11:33
  • @schtandard I've attached a quick example, but I don't think its what I use, I was more just asking if it were a command that could do (author, year, page(s) ) when citing. I am aware of \citeauthor and the likes, but nothing in the documentation (that I could find) that matched that style :) EDIT: Tried removing everything in the options for biblatex, so it were just \usepackage{biblatex} - same result. Commented Nov 16, 2021 at 11:55

2 Answers 2

3

The style chem-acs (of the biblatex-chem bundle) is a numeric style. That means that the works in the reference list/bibliography are identified by numeric labels. Hence, most 'normal' \...cite commands produce numbers with this style. Of course style-independent commands like \citeauthor (cf. §3.9.5 Text Commands of the biblatex documentation) will still do what the usually do.

If you want to cite using author-year labels, I suggest you use an author-year style instead of a custom command with a numeric style. The simplest author-year style for biblatex is probably authoryear.

Since not all options of chem-acs are supported by authoryear and it is not clear if you need all of the options that are loaded in the example document anyway, I suggest you simply load biblatex as \usepackage[backend=biber, style=authoryear]{biblatex} and add further options as needed.

For citing I suggest you use \autocite and \textcite. For specialist use you can try all the other commands listed in §3.9 Citation Commands.

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

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

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite[380-381]{sigfridsson}
ipsum \autocite[12]{worman}
dolor \autocite{sigfridsson}
sit \autocite{nussbaum}

But then \textcite{sigfridsson} showed that \dots

\printbibliography
\end{document}

Lorem (Sigfridsson and Ryde 1998, pp. 380–381) ipsum (Worman 2002, p. 12) dolor (Sigfridsson and Ryde 1998) sit (Nussbaum 1978)
But then Sigfridsson and Ryde (1998) showed that ...


As to why loading biblatex just as \usepackage{biblatex} did not get you a lot further: That is because if you don't specify a style option, biblatex defaults to style=numeric, which broadly behaves like chem-acs.

1
  • Ahh that makes a lot more sense! Thanks a lot for the clear message :-). Commented Nov 16, 2021 at 18:41
0

enter image description here

One answer in change authoryear biblatex citation style could be adapted for your purpose

\documentclass[11pt,openright,oneside,british,a4paper]{memoir}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[colorlinks=true, allcolors=blue]{hyperref}

\usepackage[backend=biber,style=authoryear]{biblatex}
\addbibresource{biblatex-examples.bib}
    
% ===== Patch citation commands to include entire label in the citation link =====
% BEGIN_FOLD
    
    % Define the delimiter between name and year
    \renewcommand*{\nameyeardelim}{\addcomma\addspace}
    
    % Define new bib macro
    \newbibmacro*{cite_p}{%adapted from authoryear.cbx
        \iffieldundef{shorthand}
        {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}%
            {\usebibmacro{cite:label}%
                \setunit{\addspace}}%
            {\printnames[labelname_p]{labelname}%
                \setunit{\nameyeardelim}}%
            \usebibmacro{cite:labelyear+extrayear}%
            \iffieldundef{pages}%
            {}%
            {}%
        }
        {\usebibmacro{cite:shorthand}}}
    
    % Redefine \parencite
    \DeclareCiteCommand{\parencite}[\mkbibparens]%adapted from authoryear.cbx
    {\usebibmacro{prenote}}
    {\usebibmacro{citeindex}%
        \usebibmacro{cite_p}}
    {\multicitedelim}
    {\usebibmacro{postnote}}
    
    % Modify the string pp.
    \DefineBibliographyStrings{english}{%
        page={p\adddot},%
        pages={p\adddot},%
    }

% END_FOLD


\begin{document}
    
    \noindent This is sample citation label using \verb|\parencite| \parencite[85-86]{aksin}
    
    \printbibliography[heading=subbibliography]
    
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .