3

Today, I switched to biblatex for bibliography management instead of rsc/natbib (For some layout). Now there are a couple of issues I would like to resolve, but I do not know how to.

  • Using style=chem-rsc, I got citations in brackets while I would like square brackets. Setting citestyle=numeric-compworks for the text but not for the publication list.
  • Some custom font for backref, but using backrefpage = {\it\footnotesize Cited on page} do not set the font for the actual quoted page number (See MWE).
  • I wanted underlined doi, so I used the solution proposed in one of my previous questions (Underlined doi with rsc package), but now the doi goes outsite the frame.
  • I am looking for a way to stip the final page of the quoted article, e.g. get

"I. Hung and [...] 204, 256, DOI:... "

, instead of

"I. Hung and [...] 204, 256-265, DOI:... "

Here is the MWE:

\documentclass[twoside,10pt,a4paper]{report}
\usepackage{fontspec} 
\usepackage{soul}
\usepackage{filecontents}
\usepackage[top=3cm,bottom=3cm,left=4cm,right=4cm,showframe]{geometry}

\usepackage[linktoc=all,
            hidelinks,
            bookmarksnumbered,
            xetex]{hyperref}

\usepackage[hyperref=true,
            url=true,
            doi=true,
            natbib=true,
            backref=true,
            backrefstyle=three,
            backend=biber,
            refsegment=chapter,
            citestyle=numeric-comp,
            style=chem-rsc,
            maxcitenames=5,
            date=year,
            block=none,
            maxbibnames=100]{biblatex}

%%%%%%

\DefineBibliographyStrings{english}{%
    backrefpage  = {\it\footnotesize Cited on page}, % for single page number
    backrefpages = {\it\footnotesize Cited on pages} % for multiple page numbers
}

%%%%%% doi souligné

\newcommand*\doiformat[1]{\ul{#1}}
\DeclareFieldFormat{doi}{%
  \mkbibacro{DOI}\addcolon\space
  \ifhyperref
    {\href{http://dx.doi.org/#1}{\doiformat{#1}}}
    {\doiformat{#1}}}



\begin{filecontents}{\jobname.bib}
@Article{hung2010practical,
  Title                    = {On the practical aspects of recording wideline QCPMG NMR spectra},
  Author                   = {Hung, Ivan and Gan, Zhehong},
  Journal                  = {J. Magn. Reson.},
  Year                     = {2010},
  Number                   = {2},
  Pages                    = {256--265},
  Volume                   = {204},
  Doi                      = {10.1016/j.jmr.2010.03.001},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Some text.\cite{hung2010practical}

\printbibliography
\end{document}
HcN
  • 1,274
  • 9
  • 25
  • 1
    Normally, we prefer to ask one question at a time here. The DOI non-breaking issue is a standard problem with URL breaking, you will find lots of posts about that here. – moewe Oct 09 '15 at 12:25
  • You are perfectly right indeed, but in this context, I thought It would be strange to ask four different questions. – HcN Oct 10 '15 at 11:36
  • Well we are often OK with questions that contain more than one point, especially if the points are hard to separate. If you do this more often you might risk missing out on good answers, because people only answer parts of your questions or don't want to answer because the can't answer everything at once. With hindsight, points 1 and 4 would have made a good question together, 2 would have been good on its own (something similar has just been asked), and point 3 is really hard. But of course one cannot always know that beforehand. – moewe Oct 10 '15 at 11:40

1 Answers1

4

For your first request chem-rsc even defines an option called biblabel which we can set to brackets to get square brackets.

The pageref issue is perhaps dealt best with via

\DeclareFieldFormat{pagerefformat}{\mkbibparens{\footnotesize\mkbibemph{#1}}}
\renewbibmacro*{pageref}{%
  \iflistundef{pageref}
    {}
    {\printtext[pagerefformat]{%
       \ifnumgreater{\value{pageref}}{1}
         {\bibstring{backrefpages}\ppspace}
         {\bibstring{backrefpage}\ppspace}%
       \printlist[pageref][-\value{listtotal}]{pageref}}}}

Thankfully, chem-rsc also has an option to show only the first page, it is activated via the option pageranges=false.

So we can load

\usepackage[style=chem-rsc,
            biblabel=brackets,
            pageranges=false,
            ]{biblatex}
moewe
  • 175,683