Document ClassesBibLaTeX: Verbose citation style but authoryear as shortcite

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
asblom
Posts: 4
Joined: Sun Jan 13, 2008 12:44 pm

BibLaTeX: Verbose citation style but authoryear as shortcite

Post by asblom »

Hi,

I'm trying to learn BibLaTeX but I have some problems.

I would like to use the verbose style but instead of using the authortitle citation as the "short cite" entry (when you cite to a key at the second time) I would prefer if it used a entry consisting of the autor(s) and the year of the key.

Also I got some entries who doesn't have an author, so if that is the case I would like BibLaTeX to cite to the title and year instead.

So this is the pseudocode for the short cite:

Code: Select all

if author==true
  citation=author (year)
else %I.e. no author exist
  citation=title (year)
endif
Kind regards,
Filip
--
Currently using: OsX, TexShop, Biblatex

Current TeX-interest: Biblatex

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
asblom
Posts: 4
Joined: Sun Jan 13, 2008 12:44 pm

BibLaTeX: Verbose citation style but authoryear as shortcite

Post by asblom »

I solved it myself after some hacking. I must say that I really like Biblatex.

I solved it by doing my own style based on verbose.

First I changed the existing cite command to:

Code: Select all

\newbibmacro*{cite}{%
  \ifciteseen
    {\iffieldundef{shorthand}
       {\ifnameundef{author}{\usebibmacro{cite:title}}{\usebibmacro{cite:name}}%
        \usebibmacro{cite:year}}
       {\usebibmacro{cite:shorthand}}}
    {\usebibmacro{cite:full}}}
and then added the macro

Code: Select all

\newbibmacro*{cite:year}{%
  \printfield{year}%
  \setunit*{\addcomma\space}}
So great!


f
--
Currently using: OsX, TexShop, Biblatex

Current TeX-interest: Biblatex
Post Reply