# Too long line in Bibliography, not URL, line break needed

I'm trying to solve this problem. The first reference has a strange "page number". Unfortunately, it protrudes beyond the edge of the page. I would rather have a page break happen before that. All tips I can find discuss this problem only in connection with URLs. Unfortunately, I don't have any approach to a solution.

Here is my MWE. I added the package showframe to emphasize the issue:

\documentclass{scrartcl}

\RequirePackage{filecontents}
\begin{filecontents}{ref.bib}
@article{Lehmann.2018,
author = {Lehmann, Diana and McFarland, Robert},
year = {2018},
pages = {232640981775296},
pagination = {page},
volume = {6},
number = {1},
doi = {10.1177/2326409817752960},
journal = {J. Inborn Errors Metab. Screening}
}
@article{Kunze.2004,
author = {Kunze, Brigitte and Jansen, Rolf and Höfle, Gerhard and Reichenbach, Hans},
year = {2004},
pages = {151--155},
pagination = {page},
volume = {57},
number = {2},
doi = {10.7164/antibiotics.57.151},
journal = {J. Antibiot.}
}
\end{filecontents}

\usepackage[backend=biber, style=chem-angew]{biblatex}

\usepackage{showframe}

\begin{document}
\cite{*}
\end{document}


PS: I checked with SAGE Publishing:

[...]
how do I cite a paper from your Journal of Inborn Errors of Metabolism & Screening?
This is about https://doi.org/10.1177/2326409817752960 and there is no page range.
My bibliography tools create a reference like "D. Lehmann, R. McFarland, J. Inborn Errors Metab. Screening 2018, 6, 232640981775296." which frankly looks terrible.
[...]

Thank you for contacting SAGE Publishing.
I checked with the SAGE editorial office of the Journal of Inborn Errors of Metabolism & Screening.
The SAGE Publishing Editor replied that the citation you listed is correct.

Despite SAGE Publishing's insistence, I have my doubts that

D. Lehmann, R. McFarland, J. Inborn Errors Metab. Screening 2018, 6, 232640981775296.

is a particularly useful citation here.

The mystery number 232640981775296 does not appear anywhere on the article landing page as redirected by the DOI (https://doi.org/10.1177/2326409817752960) except as part of the DOI itself. The same holds for the downloadable PDF version of the article. It is not even present on the volume overview/table of contents page https://journals.sagepub.com/toc/iema/6. As such the number is next to useless in identifying the article unless one also knows that it forms part of the DOI (10.1177/2326409817752960).

To me it seems then that it is ill advised to include the bare number 232640981775296 in the bibliography. It would be much more useful to give the full DOI. Indeed if you click on the Cite button on the article page none of the suggested ready-made citations in APA, Chicago, MLA or 'Harvard' style print the bare number, all include the DOI instead.

The mystery number only comes into play when the citation data is downloaded in a machine-readable format (RIS, BibTeX, ...): Presumably the developers thought that a page number was a requirement in these data formats and sought to include something remotely useful here.

It would have been interesting to have gauged their reaction towards the suggested citations

D. Lehmann, R. McFarland, J. Inborn Errors Metab. Screening 2018, 6, DOI: 10.1177/2326409817752960.

or

D. Lehmann, R. McFarland, J. Inborn Errors Metab. Screening 2018, 6.

as compared to the one with the mystery number. The latter would probably be tricky given that no title is mentioned.

My suggestion, therefore, is to not include a page field in this specific case at all and give only the useful DOI. Indeed biblatex-chem's chem-angew style will print the DOI in that case unlike in the case where the pages field is given. (I'm not sure if that is 100% adherent to the Angewandte Chemie style, but it is a very, very sensible behaviour nonetheless.)

\documentclass{scrartcl}

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{Lehmann.2018,
author  = {Lehmann, Diana and McFarland, Robert},
year    = {2018},
volume  = {6},
doi     = {10.1177/2326409817752960},
journal = {J. Inborn Errors Metab. Screening},
}
@article{Kunze.2004,
author  = {Kunze, Brigitte and Jansen, Rolf and Höfle, Gerhard and Reichenbach, Hans},
year    = {2004},
pages   = {151--155},
volume  = {57},
number  = {2},
doi     = {10.7164/antibiotics.57.151},
journal = {J. Antibiot.}
}
\end{filecontents}

\usepackage[backend=biber, style=chem-angew]{biblatex}

\usepackage{showframe}

\begin{document}
\nocite{*}
\end{document}


(pagination = {page}, is the default, so can be dropped.)

But now to answer the question as stated.

The following solution applies \seqsplit from the seqsplit package to allow the long number to break (cf. Splitting very big numbers over several lines and Wrapping long lines that contain no spaces) if an @article entry sets the entry option splitpages.

Normally I would use the eid field for 'page numbers' like these, but chem-angew does not support eid, so I went back to pages. The same could be done analogously for the (in my view preferable) eid field.

\documentclass{scrartcl}

\usepackage[backend=biber, style=chem-angew]{biblatex}

\usepackage{seqsplit}

\newtoggle{bbx:splitpages}
\DeclareEntryOption[boolean]{splitpages}[true]{%
\settoggle{bbx:splitpages}{#1}}
\DeclareFieldFormat[article]{pages}{%
\iftoggle{bbx:splitpages}
{\seqsplit{#1}}
{\iftoggle{bbx:pageranges}
{#1}
{\mkfirstpage{#1}}}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{Lehmann.2018,
author  = {Lehmann, Diana and McFarland, Robert},
year    = {2018},
volume  = {6},
pages   = {232640981775296},
journal = {J. Inborn Errors Metab. Screening},
options = {splitpages}
}
@article{Kunze.2004,
author  = {Kunze, Brigitte and Jansen, Rolf and Höfle, Gerhard and Reichenbach, Hans},
year    = {2004},
pages   = {151--155},
volume  = {57},
number  = {2},
doi     = {10.7164/antibiotics.57.151},
journal = {J. Antibiot.}
}
\end{filecontents}

\usepackage{showframe}

\begin{document}
\nocite{*}
\end{document}


• I chose this answer because I believe it might best help others in the future who need a line break in the page field, regardless of whether the information in the DOI database is actually correct or not. – basseur Dec 20 '18 at 17:33

I had an idea. A little hackish, but I believe reasonable. Breaking this kind of string is usually the job of url, but well, don't we have \nolinkurl? Besides that, I added an execute field to take care of font there and also had to set biburlnumpenalty.

\documentclass{scrartcl}

\RequirePackage{filecontents}
\begin{filecontents}{ref.bib}
@article{Lehmann.2018,
author = {Lehmann, Diana and McFarland, Robert},
year = {2018},
pagination = {page},
volume = {6},
number = {1},
doi = {10.1177/2326409817752960},
journal = {J. Inborn Errors Metab. Screening},
execute = {\urlstyle{same}}
}
@article{Kunze.2004,
author = {Kunze, Brigitte and Jansen, Rolf and Höfle, Gerhard and Reichenbach, Hans},
year = {2004},
pages = {151--155},
pagination = {page},
volume = {57},
number = {2},
doi = {10.7164/antibiotics.57.151},
journal = {J. Antibiot.}
}
\end{filecontents}

\usepackage[backend=biber, style=chem-angew]{biblatex}

\setcounter{biburlnumpenalty}{9000}

\usepackage{showframe}

\begin{document}
\nocite{*}
\end{document}


I wouldn't do this myself, I'd prefer to omit this number and, if necessary, provide the proper DOI. But if you want to stick to what the editors said you, this seems a reasonable way.

As far as I can see after accessing the journal, all articles in a issue have pages numbered independently from each other, all starting from page 1.

Thus the page number information is irrelevant (while the DOI is). The entry in the exported BibTeX code reports wrongly the DOI as the page number, but this is completely wrong, probably a bug in the software used for exporting data.

I get, if I choose to export in BibTeX style,

@article{doi:10.1177/2326409817752960,
author = {Diana Lehmann and Robert McFarland},
title ={Overview of Approaches to Mitochondrial Disease Therapy},
journal = {Journal of Inborn Errors of Metabolism and Screening},
volume = {6},
number = {},
pages = {2326409817752960},
year = {2018},
doi = {10.1177/2326409817752960},

URL = {
https://doi.org/10.1177/2326409817752960

},
eprint = {
https://doi.org/10.1177/2326409817752960

}
,
abstract = { Mitochondrial respiratory chain diseases [...] }
}


(reported fully, except for the abstract field that's irrelevant for the problem at hand). To the contrary, a proposed citation with the Harvard style is

Lehmann, D. and McFarland, R. (2018) ‘Overview of Approaches to Mitochondrial Disease Therapy’, Journal of Inborn Errors of Metabolism and Screening. doi: 10.1177/2326409817752960.

and no page number information is present.