5

Could somebody help me to make shorthands when I cite entries Inproceedings with Proceedings as crossref?

I use this code:

\documentclass[a4paper]{article}

\usepackage[T1]{fontenc}

\usepackage[english,ngerman]{babel}

\usepackage[style=verbose-ibid,citepages=suppress,sorting=nty]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{conference.bib}

@Inproceedings{Science:Environment2000,
title = {Environmental Science and Management in Developing versus Developed Countries: education and research perspectives},
crossref = {Environment2000},
author = {John Doe},
pages = {23--45}
}


@Inproceedings{health:Environment2000,
title = {Public health: implications from a compromised environment },
crossref = {Environment2000},
author = {Ho Chi Minh},
pages = {330--335}
}

@Proceedings{Environment2000,
title = {International Conference on Environmental Pollution, Restoration,and Management},
booktitle = {International Conference on Environmental Pollution, Restoration,and Management},
shorthand = {ICEP},
date = {2000},
}

@Article{Episkepsis1970:1,
title = {Decide ne plus refuser},
crossref = {Episkepsis},
date = {1970},
number = {1},
pages = {6--7},
}


@Article{Episkepsis1972:62,
title = {La jeunesse et la préparation},
crossref = {Episkepsis},
date = {1972},
number = {62},
pages = {5--7},
}

@Article{Episkepsis2009:701,
title = {Réunion à Chambésy de la IV\textsuperscript{e} Conférence},
crossref = {Episkepsis},
date = {2009},
number = {701},
pages = {8--21}
}

@Collection{Episkepsis,
journaltitle = {Episkepsis},
publisher = {Ceneter OPO},
address = {Chambésy--Genève},
shorthand = {EP},
keywords = {primary},
}

\end{filecontents}

\addbibresource{conference.bib}


\begin{document}
test\footcite[331]{health:Environment2000} est\footcite[23--27]{Science:Environment2000} test \footcite[23--27]{Episkepsis1970:1}test\footcite[23--27]{Episkepsis1972:62} \footcite[23--27]{Episkepsis2009:701}

\printbibliography

\end{document}

and I have this

enter image description here

But I would like to have

  1. Ho Chi Minh. "Public health: implications from a compromised environment". In: International Conference on Environmental Pollution, Restoration,and Management. 2000 (henceforth cited as ICEP), p.331.
  2. John Doe. "Environmental Science and Management in Developing versus Developed Countries: education and research perspectives". In: ICEP, pp.23-27

And the same for the Incollection and @Article (for articles' crossref I used @Collection may be it's not wright) entries.

Thank you.

1 Answer 1

7

This solution uses cross-referencing via xref instead of crossref in order to work consistently with either backend. It is based on an example from section 4.11.1 of the biblatex manual (version 1.4b).

\documentclass[a4paper]{article}
\usepackage[style=verbose-ibid,citepages=suppress,sorting=nty]{biblatex}
\usepackage{filecontents}

\newbibmacro*{cite:xref}{%
    \ifciteseen
        {\iffieldundef{shorthand}
            {\usebibmacro{cite:short}}
            {\usebibmacro{cite:shorthand}}}
        {\ifentrytype{periodical}
            {\usebibmacro{cite:short}\usebibmacro{shorthandintro}}
            {\usebibmacro{cite:full}}}}

\DeclareCiteCommand{\xrefcite}
    {}
    {\usebibmacro{cite:xref}}
    {}
    {}

\renewbibmacro*{journal}{%
    \iffieldundef{xref}
        {\iffieldundef{journaltitle}
            {}
            {\printtext[journaltitle]{%
                \printfield[titlecase]{journaltitle}%
                \setunit{\subtitlepunct}%
                \printfield[titlecase]{journalsubtitle}}}}
        {\entrydata{\thefield{xref}}{%
            \ifboolexpr{
                test {\iffieldundef{title}}
                and
                test {\iffieldundef{subtitle}}
            }
            {}
            {\printtext[title]{\printfield[titlecase]{title}%
                \setunit{\subtitlepunct}%
                \printfield[titlecase]{subtitle}}}}}}

\DeclareBibliographyDriver{article}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \usebibmacro{author/translator+others}%
    \setunit{\labelnamepunct}\newblock
    \usebibmacro{title}%
    \newunit
    \printlist{language}%
    \newunit\newblock
    \usebibmacro{byauthor}%
    \newunit\newblock
    \usebibmacro{bytranslator+others}%
    \newunit\newblock
    \printfield{version}%
    \newunit\newblock
    \usebibmacro{in:}%
    \ifthenelse{\ifbibliography\OR\iffieldundef{xref}}
        {\usebibmacro{journal+issuetitle}%
            \newunit
            \usebibmacro{byeditor+others}%
            \newunit
            \usebibmacro{note+pages}%
            \newunit\newblock
            \iftoggle{bbx:isbn}{\printfield{issn}}{}%
            \newunit\newblock
            \usebibmacro{doi+eprint+url}%
            \newunit\newblock
            \usebibmacro{addendum+pubstate}%
            \newunit\newblock
            \setunit{\bibpagerefpunct}\newblock
            \usebibmacro{pageref}%
            \usebibmacro{finentry}}%
        {\xrefcite{\thefield{xref}}%
            \ifciteseen{}{%
                \setunit{\addspace}%
                \usebibmacro{volume+number+eid}%
                \setunit{\addspace}%
                \usebibmacro{issue+date}}}}

\newbibmacro*{in:collection}{%
    \usebibmacro{byeditor+others}%
    \newunit\newblock
    \printfield{edition}%
    \newunit
    \iffieldundef{maintitle}{\printfield{volume}\printfield{part}}{}%
    \newunit
    \printfield{volumes}%
    \newunit\newblock
    \usebibmacro{series+number}%
    \newunit\newblock
    \usebibmacro{publisher+location+date}%
    \newunit\newblock
    \iftoggle{bbx:isbn}{\printfield{isbn}}{}}

\DeclareBibliographyDriver{incollection}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \usebibmacro{author/translator+others}%
    \setunit{\labelnamepunct}\newblock
    \usebibmacro{title}%
    \newunit
    \printlist{language}%
    \newunit\newblock
    \usebibmacro{byauthor}%
    \newunit\newblock
    \usebibmacro{in:}%
    \iffieldundef{xref}
        {\usebibmacro{maintitle+booktitle}%
            \newunit\newblock
            \usebibmacro{in:collection}}%
        {\ifcitation
            {\xrefcite{\thefield{xref}}}
            {\entrydata{\thefield{xref}}{%
                \usebibmacro{title}%
                \newunit\newblock
                \usebibmacro{in:collection}}}}%
    \newunit\newblock
    \usebibmacro{chapter+pages}%
    \newunit\newblock
    \printfield{note}%
    \newunit\newblock
    \usebibmacro{doi+eprint+url}%
    \newunit\newblock
    \usebibmacro{addendum+pubstate}%
    \setunit{\bibpagerefpunct}\newblock
    \usebibmacro{pageref}%
    \usebibmacro{finentry}}

\newbibmacro*{in:proceedings}{%
    \usebibmacro{event+venue+date}%
    \newunit\newblock
    \usebibmacro{byeditor+others}%
    \newunit\newblock
    \iffieldundef{maintitle}{\printfield{volume}\printfield{part}}{}%
    \newunit
    \printfield{volumes}%
    \newunit\newblock
    \usebibmacro{series+number}%
    \newunit\newblock
    \printlist{organization}%
    \newunit
    \usebibmacro{publisher+location+date}%
    \newunit\newblock
    \iftoggle{bbx:isbn}{\printfield{isbn}}{}}

\DeclareBibliographyDriver{inproceedings}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \usebibmacro{author/translator+others}%
    \setunit{\labelnamepunct}\newblock
    \usebibmacro{title}%
    \newunit
    \printlist{language}%
    \newunit\newblock
    \usebibmacro{byauthor}%
    \newunit\newblock
    \usebibmacro{in:}%
    \iffieldundef{xref}
        {\usebibmacro{maintitle+booktitle}%
            \newunit\newblock
            \usebibmacro{in:proceedings}}%
        {\ifcitation
            {\xrefcite{\thefield{xref}}}
            {\entrydata{\thefield{xref}}{%
                \usebibmacro{title}%
                \newunit\newblock
                \usebibmacro{in:proceedings}}}}%
    \newunit\newblock
    \usebibmacro{chapter+pages}%
    \newunit\newblock
    \printfield{note}%
    \newunit\newblock
    \usebibmacro{doi+eprint+url}%
    \newunit\newblock
    \usebibmacro{addendum+pubstate}%
    \setunit{\bibpagerefpunct}\newblock
    \usebibmacro{pageref}
    \usebibmacro{finentry}}

\begin{filecontents}{\jobname.bib}
@Inproceedings{Science:Environment2000,
title = {Environmental Science and Management in Developing versus Developed Countries: education and research perspectives},
xref = {Environment2000},
author = {John Doe},
pages = {23--45}}

@Inproceedings{health:Environment2000,
title = {Public health: implications from a compromised environment},
xref = {Environment2000},
author = {Ho Chi Minh},
pages = {330--335}}

@Proceedings{Environment2000,
title = {International Conference on Environmental Pollution, Restoration, and Management},
shorthand = {ICEP},
date = {2000}}

@InCollection{westfahl:space,
xref = {westfahl:frontier},
author = {Westfahl, Gary},
title = {The True Frontier},
subtitle = {Confronting and Avoiding the Realities of Space in American Science Fiction Films},
pages = {55--65}}

@Collection{westfahl:frontier,
editor = {Westfahl, Gary},
shorthand = {FTSF},
title = {Space and Beyond},
subtitle = {The Frontier Theme in Science Fiction},
publisher = {Greenwood},
location = {Westport, Conn. and London},
date = {2000}}

@Article{Episkepsis1970:1,
title = {Decide ne plus refuser},
xref = {Episkepsis},
date = {1970},
number = {1},
pages = {6--7}}

@Article{Episkepsis1972:62,
title = {La jeunesse et la preparation},
xref = {Episkepsis},
date = {1972},
number = {62},
pages = {5--7}}

@Article{Episkepsis2009:701,
title = {Reunion a Chambesy de la IV\textsuperscript{e} Conference},
xref = {Episkepsis},
date = {2009},
number = {701},
pages = {8--21}}

@periodical{Episkepsis,
options = {skipbib=true},
title = {Episkepsis},
shorthand = {EP},
date = {1970/},
publisher = {Ceneter OPO},
address = {Chambesy--Geneve},
keywords = {primary}}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
\footcite[cf.][332]{health:Environment2000}
\footcite{Science:Environment2000}
\footcite[331]{health:Environment2000}
\footcite{westfahl:space}
\footcite{westfahl:frontier}
\footcite[cf.][6]{Episkepsis1972:62}
\footcite{Episkepsis2009:701}
\footcite[7]{Episkepsis1972:62}
\printbibliography
\end{document}

enter image description here

Some notes:

  • A cross-reference here actually invokes an explicit citation of the parent entry. This is done intentionally to ensure "availability" of the parent entry for child citations. [To see what I mean, try making \xrefcite an (implicit) internal command (by renaming it to, say, bbx@xref) and add the biblatex package option mincrossrefs=99. Also see the xref entry description in the manual.]

  • A consequence of the above item that every parent will appear in the bibliography, unless you add options = {skipbib=true} to its entry. (See the @periodical entry above for an example.)

  • In this setup @article inherits only journaltitle and journalsubtitle from @periodical. The child entry types @inproceedings and @incollection inherit many more fields from @proceedings and @collection - pretty much everything I deemed specific to the parent. Any of this could be changed by editing the above bibliography drivers and macros.

  • A drawback to using xref for cross-referencing is that there is no inheritance already defined for you. But crossref behaviour depends on the backend. It also appears to give some unanticipated* results. For example with biber, a child @article gets the same date format as its parent @periodical. With bibtex, any child gets cited with its parent's shorthand.

*Possibly due to some misuse of the biblatex interface on my part...

20
  • @Audrey Thank you very much. I've tried to make your example with biber, but my biber said "I found no \citation commands---while reading file". I'm updating my TexLive 2010 now and will try again. Could you tell me, sorry for disturbing you, will your code work for articles when I cite a lot of articles of a magazine?
    – filokalos
    Commented May 23, 2011 at 9:40
  • @Audrey The same result :(((( The Biber says "I found no \citation commands---while reading file rabota.aux I found no \bibdata command---while reading file rabota.aux I found no \bibstyle command---while reading file rabota.aux (There were 3 error messages)"
    – filokalos
    Commented May 23, 2011 at 10:03
  • @Audrey Thank you. :))) The guys helped me to solve problem with biber here tex.stackexchange.com/questions/18859/… . And now your example WORKS!!! Thank you once more!
    – filokalos
    Commented May 23, 2011 at 14:55
  • @filokalos: Just logging in now... Good to hear.
    – Audrey
    Commented May 23, 2011 at 15:01
  • @Audrey :)))) Just tell me will your example work for the articles? I cited a lot of articles of the same magazine (different years).Or it's need some different code?
    – filokalos
    Commented May 23, 2011 at 15:07

You must log in to answer this question.

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