1

I have a problem with some customization of my biblatex. For some reasons, I want to use a special command to cite normative documents: I would like to make them appear (in both text and bibliography) with a short-name rather than an author name or a number. Plus, I need to use a check option in the printing of the bibliography. Here is my problem, the combination of these two is not working well in my case: the normative text are not appearing in the bibliography.

I assume it is just a problem of definition in the commands, but I did not find the documentation of biblatex how to solve it.

Here is a MWE:

\documentclass{book}

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

\usepackage{hyperref}           

\usepackage[citestyle=alphabetic,
    bibstyle=alphabetic, 
    citetracker=true,   
    mcite=true,             
    backend=biber           
    ]{biblatex}

\addbibresource[datatype=bibtex]{./biblio.bib}

\DeclareBibliographyDriver{standard}{\usedriver{\newblock}{manual}
    \usebibmacro{pageref}
    \finentry}


\DeclareCiteCommand{\parencitetitle}[\mkbibparens]
{\boolfalse{citetracker}
    \boolfalse{pagetracker}
    \usebibmacro{prenote}}
{\ifciteindex
    {\indexfield{indextitle}}
    {}%
    %\printfield[citetitle]{labeltitle}}
    \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
{\multicitedelim}
{\usebibmacro{postnote}}


\defbibcheck{mynocite}{
    \ifboolexpr{test{\ifciteseen} or test {\ifkeyword{secondary}}}
    {}
    {\skipentry}
}

\begin{document}        

    Firsts references: \cite{banks92}               
    Eurocode : \parencitetitle{en1998}

    \printbibliography[check=mynocite]

\end{document}

with the bib file biblio.bib:

@STANDARD{en1998,
  shorttitle = {EN 1998},
  title = {EN 1998, Eurocode 8: contruction norms},
  organization = {CEN},
  address = {Brussels, Belgium},
  year = {2005},
}

@book{banks92,
  title={Control and Estimation in Distributed Parameter Systems},
  author={Banks, H.T.},
  isbn={9780898712971},
  lccn={92027712},
  series={Frontiers in Applied Mathematics},
  url={http://books.google.fr/books?id=Gp5usSwk31wC},
  year={1992},
  publisher={Society for Industrial and Applied Mathematics}
}

Of course, in this example the check option could be removed, but I need it in my bigger cases.

1

With the \boolfalse{citetracker} in

\DeclareCiteCommand{\parencitetitle}[\mkbibparens]
{\boolfalse{citetracker}
    \boolfalse{pagetracker}
    \usebibmacro{prenote}}
{\ifciteindex
    {\indexfield{indextitle}}
    {}%
    %\printfield[citetitle]{labeltitle}}
    \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
{\multicitedelim}
{\usebibmacro{postnote}}

(note that there are two % missing after \boolfalse{citetracker} and \boolfalse{pagetracker} as you can see by the unwanted space after the opening round bracket) you turn off citation tracking for that command. In particular entries that are only cited with \parencitetitle give false when tested with \ifciteseen.

The solution is to remove the two \boolfalses in the definition of \parencitetitle

\DeclareCiteCommand{\parencitetitle}[\mkbibparens]
  {\usebibmacro{prenote}}
  {\ifciteindex
    {\indexfield{indextitle}}
    {}%
    \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

en1998 will still look a bit stupid in the bibliography, so I suggest you use shorthand

@STANDARD{en1998,
  shorthand    = {EN 1998},
  shorttitle   = {EN 1998},
  title        = {EN 1998, Eurocode 8: contruction norms},
  organization = {CEN},
  address      = {Brussels, Belgium},
  year         = {2005},
}

In fact if you use shorthand you can just use a normal \cite to get almost the same as \parencitetitle (only the brackets are different).

MWE

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[style=alphabetic, citetracker=true, backend=biber]{biblatex}
\usepackage{hyperref}

\DeclareBibliographyDriver{standard}{\usedriver{\newblock}{manual}
  \usebibmacro{pageref}%
  \finentry}

\DeclareCiteCommand{\parencitetitle}[\mkbibparens]
  {\usebibmacro{prenote}}
  {\ifciteindex
    {\indexfield{indextitle}}
    {}%
    \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\defbibcheck{mynocite}{
  \ifboolexpr{test {\ifciteseen} or test {\ifkeyword{secondary}}}
    {}
    {\skipentry}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@STANDARD{en1998,
  shorthand    = {EN 1998},
  shorttitle   = {EN 1998},
  title        = {EN 1998, Eurocode 8: contruction norms},
  organization = {CEN},
  address      = {Brussels, Belgium},
  year         = {2005},
}
@STANDARD{en1999,
  shorthand    = {EN 1999},
  title        = {EN 1999, Eurocode 9: contruction norms},
  organization = {CEN},
  address      = {Brussels, Belgium},
  year         = {2006},
}
@book{banks92,
  title     = {Control and Estimation in Distributed Parameter Systems},
  author    = {Banks, H.T.},
  isbn      = {9780898712971},
  series    = {Frontiers in Applied Mathematics},
  year      = {1992},
  publisher = {Society for Industrial and Applied Mathematics},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
  First references: \cite{banks92}
  Eurocode : \parencitetitle{en1998} or \cite{en1999}

  \printbibliography[check=mynocite]
\end{document}

First references: [Ban92] Eurocode : (EN 1998) or [EN 1999]//References//[Ban92] H.T. Banks. Control and Estimation in Distributed Parameter Systems. Frontiers in Applied Mathematics. Society for Industrial and Applied Mathematics, 1992. isbn: 9780898712971.//[EN 1998] EN 1998, Eurocode 8: contruction norms. CEN. Brussels, Belgium, 2005.//[EN 1999] EN 1999, Eurocode 9: contruction norms. CEN. Brussels, Belgium, 2006.

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.