1

I'm using the multibib package to create a document with two bibliographies from two separate bib files. In one of the files, each entry's note field indicates what type of scholarly product it is: journal, conference, poster, etc, and uses \hfill to place the note in the lower-right corner of the entry in the bibliography. Here is a complete example:

\documentclass{article}

\usepackage{multibib}
\usepackage{amstext}
\newcites{scholarlyproducts}{\text{Scholarly Products}}

\usepackage{filecontents}
\begin{filecontents}{main.bib}
@book{knuth1979tex,
  title     = {TEX and METAFONT: New directions in typesetting},
  author    = {Knuth, Donald Ervin},
  year      = {1979},
  publisher = {American Mathematical Society}
}
\end{filecontents}

\begin{filecontents}{products.bib}
@article{doe2018laification,
  author  = {Jane Doe},
  title   = {On the Laification of Tex},
  journal = {Nature: typesetting},
  volume  = {2018},
  note    = {\hfill[journal]}
}
\end{filecontents}

\begin{document}

In~\cite{knuth1979tex}, the author uses math to beautiful effect.

\bibliographystyle{plain}  % or acm, ieeetr, siam
\bibliography{main}

\nocitescholarlyproducts{doe2018laification}
\bibliographystylescholarlyproducts{unsrt}
\bibliographyscholarlyproducts{products}

\end{document}

I suspect this isn't the intended purpose of the note field, but it has the desired effect, except a period is added after each entry's note in scholarlyproducts.bbl, which I don't want:

\begin{thebibliography}{1}

\bibitem{doe2018laification}
Jane Doe.            
\newblock On the laification of tex.
\newblock {\em Nature: typesetting}, 2018.             
\newblock \hfill[journal].  % <-- undesired period

\end{thebibliography}

How do I prevent the bibliography style from adding a period after the note field? Ideally the solution will be programmatic (not bst hacking), or just not use the note field. Thanks!

  • 3
    Please show us a short and compilable code where you build your bibliography ... – Mensch Mar 11 '18 at 4:06
  • 2
    As Kurt says, an MWE/MWEB is needed because we need to know what style you use and what other modifications you apply. It would also help if you could describe in more detail what the expected output should be like. Why the \hfill etc.? – moewe Mar 11 '18 at 6:05
  • 1
    Any news here? It is not really clear from the question what is going wrong here and what you are doing. At the moment your question is a duplicate of tex.stackexchange.com/q/187443/35864. But you seem to want more. – moewe Mar 15 '18 at 6:36
  • I didn't realize the solution would be style specific; I updated the question to show the style(s) I would like to use and to include the fact that I'm using multibib. @moewe, thanks for the link, but the solution was in conflict with multibib. – alan Mar 15 '18 at 17:43
2

The easiest solution would be changing the bst file to suit your needs. You do not want that, so there are other solutions:

Add to your bib file

@preamble{"\def\gobbledot.{}"}

Then at the end of every note field, write \gobbledot. E.g.

\begin{filecontents}{products.bib}
@article{doe2018laification,
  author  = {Jane Doe},
  title   = {On the Laification of Tex},
  journal = {Nature: typesetting},
  volume  = {2018},
  note    = {\hfill[journal]\gobbledot}
}
\end{filecontents}

Then TeX will skip the period.

  • I had no idea you can define a preamble in a bib file. Very cool! Needless to say, this worked like a charm. Thanks! – alan Mar 16 '18 at 17:26

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.