1

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
    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. – barbara beeton Apr 25 '17 at 14:03
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}
  • I should have mention this before, but I've tried your dirty trick. Unfortunately, usimg newline causes an error. This is the part of a log file: ERROR: \bib'doinewline =\relax . --- TeX said --- \bib@append ...x \relax #3\errmessage {#3=\relax } \else \begingroup \series@...l.865 } – pml Apr 26 '17 at 3:49
  • Strange - it compiles fine here (admittedly, with a warning, but no errors). – mbork Apr 26 '17 at 3:52
  • You are right, here it compiles fine also – pml Apr 26 '17 at 4:02
  • I found the (obvious) source of the warning and edited the answer accordingly. – mbork May 5 '17 at 7:51

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.