4

i got some articles i cite in my thesis. The author should be bold in the bibliography but i dont know how. I tried to use \textbf in the bibtex file but then the format isn't correct anymore. Would be nice if someone can help me.

i already got this to define the entries. just copied and pasted it.

\DeclareNameAlias{default}{last-first}
\renewbibmacro*{author/editor+others/translator+others}{%
\mkbibbold{% ADDED
  \ifboolexpr{
test \ifuseauthor
and
not test {\ifnameundef{author}}
}
{\usebibmacro{author}}
{\ifboolexpr{
   test \ifuseeditor
   and
   not test {\ifnameundef{editor}}
 }
   {\usebibmacro{editor+others}}
   {\usebibmacro{translator+others}}}}
}% ADDED

\renewcommand*{\multinamedelim}{\addsemicolon\space}
\renewcommand*{\finalnamedelim}{\addsemicolon\space}

\renewcommand*{\labelnamepunct}{\addcolon\space}

\renewbibmacro*{publisher+location+date}{%
\printlist{location}%
\iflistundef{publisher}
{\setunit*{\addcomma\space}}
%%    {\setunit*{addcolon\space}}% DELETED
{\setunit*{~:\space}}% ADDED
\printlist{publisher}%
\setunit*{\addcomma\space}%
\usebibmacro{date}%
\newunit}

\DeclareFieldFormat{edition}{%
  \ifinteger{#1}
%%    {\mkbibordedition{#1}~\bibstring{edition}}% DELETED
    {\mkbibordedition{#1}\bibstring{edition}}% ADDED
    {#1\isdot}}
  • which bibtex style do you use? – user2478 Jun 27 '12 at 11:07
  • \usepackage[backend=biber, citestyle=alphabetic, bibstyle=alphabetic, sorting=nyt, abbreviate=false]{biblatex} – Cheetah Jun 27 '12 at 11:11
5

use:

\usepackage[backend=biber,citestyle=alphabetic,bibstyle=alphabetic,sorting=nyt,abbreviate=false]{biblatex}
\renewbibmacro*{author}{%
  \ifboolexpr{ test \ifuseauthor and not test {\ifnameundef{author}}}
    {\ifentrytype{article}{%
      \def\mkbibnamelast##1{\textbf{\textsc{##1}}}% 
      \def\mkbibnameprefix##1{\textbf{\textsc{##1}}}% 
      \def\mkbibnamefirst##1{\textbf{\textsc{##1}}}}{}%
     \printnames{author}%
     \iffieldundef{authortype}{}{\setunit{\addcomma\space}%
    \usebibmacro{authorstrg}}}
    {}}

enter image description here

  • works fine, now the author just has to be in small caps then its perfect thx – Cheetah Jun 27 '12 at 12:11
  • See my edited answer ... – user2478 Jun 27 '12 at 12:33
3

You can modify the first-last name format (which is used by the alphabetic bibstyle) to include a test for the article entry type:

\documentclass{article}

\usepackage[style=alphabetic]{biblatex}

\DeclareNameFormat{first-last}{%
  \ifentrytype{article}{%
    \mkbibbold{%
      \iffirstinits
        {\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
        {\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}%
      \usebibmacro{name:andothers}%
    }%
  }{%
    \iffirstinits
      {\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}
      {\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}%
    \usebibmacro{name:andothers}%
  }%
}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{Bli74,
  hyphenation = {english},
  author = {Blinder, Alan S.},
  year = {1974},
  title = {The economics of brushing teeth},
  journaltitle = {Journal of Political Economy},
  volume = {82},
  number = {4},
  pages = {887--891},
}
@book{Kop04,
  hyphenation = {ngerman},
  author = {Kopka, Helmut and Daly, Patrick W.},
  year = {2004},
  title = {Guide to \LaTeX},
  edition = {4},
  location = {Boston},
  publisher = {Addison-Wesley},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

enter image description here

  • it changes nothing but i dont know if its in conflict with this i copied and pasted to define the biliography entries – Cheetah Jun 27 '12 at 11:48
  • @Cheetah If my example works for you as-is, you must be doing something differently in your actual document. – lockstep Jun 27 '12 at 11:50

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.