6

I'm using this code:

% arara: pdflatex: { shell: yes }
% arara: biber
% arara: pdflatex: { shell: yes }
% arara: pdflatex: { shell: yes }
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{jobname.bib}
@book{ALEXANDER1977apl,
    Address = {USA},
    Author = {Alexander, Christopher and Ishikawa, Sara and Silverstein, Murray},
    Date-Added = {2010-02-24 11:14:54 +1100},
    Date-Modified = {2010-06-01 12:10:48 +1000},
    Publisher = {{Oxford University Press}},
    Title = {{A Pattern Language: Towns, Buildings, Construction}},
    Year = {1977}}
\end{filecontents}
\usepackage[indexing=cite,style=authoryear,citestyle=authoryear,sorting=none,maxnames=1]{biblatex}
\makeatletter
\AtEveryCite{%
  %\let\parentext=\parentexttrack%
  \let\bibopenparen=\bibopenbracket%
  \let\bibcloseparen=\bibclosebracket}
\makeatother
\addbibresource{jobname.bib}
\begin{document}
\textcite[pp 45]{ALEXANDER1977apl}
\end{document}

I wonder how I could change appearence of my citation so Author name will be italic?

Alexander et al. [1977, pp 45]

8

You are able to change the formatting of all last names that appear in your citations

\renewcommand{\mkbibnamelast}[1]{\mkbibemph{#1}}

...and then reset the formatting before \printbibliography so that the names appear in upright font in the bibliography. Your MWE would become:

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{jobname.bib}
@book{ALEXANDER1977apl,
    Address = {USA},
    Author = {Alexander, Christopher and Ishikawa, Sara and Silverstein, Murray},
    Date-Added = {2010-02-24 11:14:54 +1100},
    Date-Modified = {2010-06-01 12:10:48 +1000},
    Publisher = {{Oxford University Press}},
    Title = {{A Pattern Language: Towns, Buildings, Construction}},
    Year = {1977}}
\end{filecontents}
\usepackage[backend=bibtex,indexing=cite,style=authoryear,citestyle=authoryear,sorting=none,maxnames=1]{biblatex}
\makeatletter
\AtEveryCite{%
  \let\bibopenparen=\bibopenbracket%
  \let\bibcloseparen=\bibclosebracket}
\makeatother
\addbibresource{jobname.bib}

% Renew formatting of the last name to add emphasis
\renewcommand{\mkbibnamelast}[1]{\mkbibemph{#1}}
% Revert formatting of the last name for bibliography
\AtBeginBibliography{\renewcommand{\mkbibnamelast}[1]{#1}}

\begin{document}


\noindent Text citation: \textcite[pp 45]{ALEXANDER1977apl}

\printbibliography

\end{document}

End result: citation and bibliography

|improve this answer|||||
  • 4
    +1 I would recommend using \AtBeginBibliography{\renewcommand{\mkbibnamelast}[1]{#1}} in the preamble instead of switching back via \renewcommand{\mkbibnamelast}[1]{#1} before \printbibliography though, it seems cleaner to me. (Also I would issue \renewcommand{\mkbibnamelast}[1]{\mkbibemph{#1}} in the preamble and not the document body.) Alternatively, one could use \AtEveryCite{\renewcommand{\mkbibnamelast}[1]{\mkbibemph{#1}}} in the preamble. – moewe Mar 12 '14 at 7:52
  • 1
    Good suggestions. I have updated with these in mind. It makes sense to keep all the formatting commands together. – cslstr Mar 12 '14 at 11:49
0

For me neither \AtBeginBibliography{\renewcommand{\mkbibnamelast}[1]{#1}} nor renewing the command before \printbibliography worked and I ended up with italic Last names in the Bibliography as well. What helped was substituting \mkbibnamelast with \mkbibnamefamily in both \renewcommand(s). I'm using biblatex.

Can't comment yet, unfortunately.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.