1

When using the following TeX:

\documentclass[12pt]{article}
\usepackage{natbib}
\usepackage{lipsum}
\usepackage{hyperref}
\bibliographystyle{plainnat}

\begin{filecontents}{test.bib}
@misc{centers2017underlying,
  title        = {\textit{Underlying Cause of Death 1999-2017 on CDC WONDER Online Database, released December, 2018. Data are from the Multiple Cause of Death Files, 1999-2017, as compiled from data provided by the 57 vital statistics jurisdictions through the Vital Statistics Cooperative Program}},
  author       = {{Centers for Disease Control and Prevention and National Center for Health Statistics}},
  howpublished = {\url{https://wonder.cdc.gov/ucd-icd10.html}},
  note         = {Accessed: 2019-03-01},
}

@misc{icdcomparabilityratios,
  title        = {{A Guide to State Implementation of ICD-10 for Mortality; Part II: Applying Comparability Ratios}},
  author       = {{Centers for Disease Control and Prevention and National Center for Health Statistics}},
  howpublished = {\url{https://www.cdc.gov/nchs/data/statab/document-for-the-states.pdf}},
  note         = {Accessed: 2019-03-01},
}
\end{filecontents}

\begin{document}

\lipsum[1]
\nocite{*}
\bibliography{test}
\end{document}
% Create PDF on Linux: FILE=test; pkill -9 -f ${FILE} &>/dev/null; rm -f ${FILE}*aux ${FILE}*bbl ${FILE}*bib ${FILE}*blg ${FILE}*log ${FILE}*out ${FILE}*pdf &>/dev/null; pdflatex -halt-on-error ${FILE}; bibtex ${FILE} && pdflatex ${FILE} && pdflatex ${FILE} && (xdg-open ${FILE}.pdf &)

Automatic lettering is added after each URL because the authors are the same (highlighted in red):

Image of problem

The automatic lettering may be overridden by specifying year, but I have nothing additional to put there.

Changing to \bibliographystyle{plain} solves the problem, but I need plainnat.

How do I get rid of this automatic lettering?

Edit: As suggested by one answer, adding year with a command that prints nothing still leaves a dangling comma (also used \usepackage[hidelinks]{hyperref} to make it easily visible):

enter image description here

  • 1
    Note that according to its title page icdcomparabilityratios actually has a year, namely year = {2000},. In this example there is no "a"/"b" any more once you add that year. (Of course the general question remains.) Note that it is in general not best practice to include formatting in the .bib entry: The \textit{...} spanning the entire title of centers2017underlying is something the style should take care of, not you. plainnat knows the url field, so you could say url = {http://....}, instead of howpublished = {\url{http://...}},. – moewe Mar 22 '19 at 6:22
  • @moewe Thanks, I do have other cases without years, so as you mention, the general problem remains, but that's a valid point. I need an extra {} to maintain acronym capitalization, but you're right the italics aren't needed. I tried changing howpublished to url but it prefixes the URL with URL which is a bit odd, but I'll consider it. Cheers. – freeradical Mar 22 '19 at 6:33
  • I do not recommend to enclose the entire title in curly braces to maintain the capitalisation of acronyms (or proper names) instead you should protect only those words that need protection: title = {Underlying Cause of Death 1999--2017 on {CDC} {WONDER} Online Database, released {December}, 2018. {Data} are from the Multiple Cause of Death Files, 1999--2017, as compiled from data provided by the 57 vital statistics jurisdictions through the Vital Statistics Cooperative Program}, (maybe you see some of the program names as proper names and want to protect those as well) – moewe Mar 22 '19 at 6:44
  • Now that I read the title, that gives a strong case to make the year of centers2017underlying read year = {2018}, – moewe Mar 22 '19 at 6:44
  • @moewe Good points, thanks! – freeradical Mar 22 '19 at 6:50
1

One workaround is to add some number of \nothing commands to the end of each otherwise-duplicated author. For example:

\newcommand\nothing{}
@misc{centers2017underlying,
  title        = {\textit{Underlying Cause of Death 1999-2017 on CDC WONDER Online Database, released December, 2018. Data are from the Multiple Cause of Death Files, 1999-2017, as compiled from data provided by the 57 vital statistics jurisdictions through the Vital Statistics Cooperative Program}},
  author       = {{Centers for Disease Control and Prevention and National Center for Health Statistics}},
  howpublished = {\url{https://wonder.cdc.gov/ucd-icd10.html}},
  note         = {Accessed: 2019-03-01},
}

@misc{icdcomparabilityratios,
  title        = {\textit{A Guide to State Implementation of ICD-10 for Mortality; Part II: Applying Comparability Ratios}},
  author       = {{Centers for Disease Control and Prevention and National Center for Health Statistics\nothing}},
  howpublished = {\url{https://www.cdc.gov/nchs/data/statab/document-for-the-states.pdf}},
  note         = {Accessed: 2019-03-01},
}
  • 1
    Could you add an example of this workaround to your answer, to clarify how this can be applied? – Marijn Mar 21 '19 at 22:08
  • Yes, sorry about that; added. – freeradical Mar 22 '19 at 0:31
0

Add something that doesn't show up:

\begin{filecontents}{test.bib}
    @misc{centers2017underlying,
        title        = {\textit{Underlying Cause of Death 1999-2017 on CDC WONDER Online Database, released December, 2018. Data are from the Multiple Cause of Death Files, 1999-2017, as compiled from data provided by the 57 vital statistics jurisdictions through the Vital Statistics Cooperative Program}},
        author       = {{Centers for Disease Control and Prevention and National Center for Health Statistics}},
        howpublished = {\url{https://wonder.cdc.gov/ucd-icd10.html}},
        note         = {Accessed: 2019-03-01\noShow{a}},
    }

    @misc{icdcomparabilityratios,
        title        = {{A Guide to State Implementation of ICD-10 for Mortality; Part II: Applying Comparability Ratios}},
        author       = {{Centers for Disease Control and Prevention and National Center for Health Statistics}},
        howpublished = {\url{https://www.cdc.gov/nchs/data/statab/document-for-the-states.pdf}},
        note         = {Accessed: 2019-03-01\noShow{b}},
    }
\end{filecontents}
\documentclass[12pt]{article}
\usepackage{lipsum}
\usepackage{hyperref}
\usepackage{natbib}
\bibliographystyle{plainnat}
\providecommand{\noShow}[1]{}
\begin{document}
    \lipsum[1]
    \nocite{*}
    \bibliography{test}
\end{document}
  • I converted your example from @article to @misc, removed the year following the \noShow command (since I don't have a year to specify), and made the authors the same, and I see the same problem with a dangling comma. – freeradical Mar 21 '19 at 20:25
  • Did you deleted the generated .bib and .bbl files before recompiling? – Vinccool96 Mar 21 '19 at 20:39
  • Yes, I removed those files. There is still a dangling comma after the URL. I edited my question to show a screenshot. – freeradical Mar 21 '19 at 20:47
  • Put the \noShow in the note. Also, the noShow parameter souldn't be the same in both. – Vinccool96 Mar 21 '19 at 20:59
  • Putting \noshow in the note and removing year did not work - automatic lettering is still added. – freeradical Mar 21 '19 at 21:02

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.