2

I use amsrefs package to format bibliography. The problem is that sometimes the lines are very badly typeset. The problem is often caused by a doi field. See the image below. Part of the bibliography

I would accept manual line break, even if the entry is not ragged on the right side. Simple \newline in the pages field leaves a comma in the line, which look badly (see the image below)

bad comma on the right

Any idea how to manually break lines with proper punctuation markstreatment? Here comes the MWE

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsrefs}
\renewcommand{\PrintDOI}[1]{DOI~#1}
\begin{document}

\begin{bibdiv}
\begin{biblist}
\bib{14}{article}{
  author={Kim, S.G.},
  title={The unit ball},
  journal={Kyungpook Math. J.},
  volume={53},
  date={2013},
  pages={295--306},
  doi={10.5666/KMJ.2013.53.2.295},
}
\end{biblist}
\end{bibdiv}
\end{document}
1
  • 2
    although it's not ams style, my inclination is to set the entire bibliography ragged right. url's and doi's are making a shambles of the idea of justified bibliographies. Commented Apr 25, 2017 at 14:03

2 Answers 2

1

How about this extremely dirty hack?

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsrefs}
\renewcommand{\PrintDOI}[1]{DOI~#1}
\begin{document}

\DefineSimpleKey{bib}{doinewline}    
\BibSpec{article}{%
    +{}  {\PrintAuthors}                {author}
    +{,} { \textit}                     {title}
    +{.} { }                            {part}
    +{:} { \textit}                     {subtitle}
    +{,} { \PrintContributions}         {contribution}
    +{.} { \PrintPartials}              {partial}
    +{,} { }                            {journal}
    +{}  { \textbf}                     {volume}
    +{}  { \PrintDatePV}                {date}
    +{,} { \issuetext}                  {number}
    +{,} { \eprintpages}                {pages}
    +{,} { }                            {status}
    +{}  {, \newline\PrintDOI}          {doinewline}
    +{,} { \PrintDOI}                   {doi}
    +{,} { available at \eprint}        {eprint}
    +{}  { \parenthesize}               {language}
    +{}  { \PrintTranslation}           {translation}
    +{;} { \PrintReprint}               {reprint}
    +{.} { }                            {note}
    +{.} {}                             {transition}
    +{}  {\SentenceSpace \PrintReviews} {review}
}

\begin{bibdiv}
\begin{biblist}
\bib{14}{article}{
  author={Kim, S.G.},
  title={The unit ball},
  journal={Kyungpook Math. J.},
  volume={53},
  date={2013},
  pages={295--306},
  doinewline={10.5666/KMJ.2013.53.2.295},
}
\end{biblist}
\end{bibdiv}
\end{document}
0
1

Use the \linebreak command to get a line break with proper placement of the punctuation. See Section 8.5 of the package documentation for more details:

Section 8.5 Line breaks in the bibliography

Suppose you need to recommend to LaTeX that it break a line in a particular place. Suggesting a line break in the middle of a field presents no difficulties: just edit your final .bbl file and insert a \linebreak command:

subtitle={Toward a transformative hermeneutics\linebreak[3] of quantum gravity},

But what if you need to force a line break between two fields? At first blush you might fear that

subtitle={...hermeneutics of quantum gravity\linebreak[3]},

will cause a line break before the comma that amsrefs normally inserts after the title: Comma is placed after the line break instead of before. Have no fear; amsrefs will detect this and automatically move the comma in front of the line break, as desired: Comma is placed before the line break as desired.

You must log in to answer this question.

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