3

I'm currently writing a paper for an ACS journal, so I'm using achemso style formatting in TexStudio to write it.

I'm relatively new to LaTeX so I've been Googling around to solve problems I've come across, but there's this one problem I can't seem to find a solution for. All of the referencing and bibliography work were going on well until an error,

---the literal stack isn't empty for entry yan2016nonlinear
while executing---line 1700 of file achemso.bst
(There was 1 error message)

appeared. After this error, the reference of interest appeared within the bibliography without author names, while all of the other references were okay. The reference with the error is (6) in the image below.

output error in bibliography

I've tried using the .bib file within another document, but there the bibliography turned out to be just fine. Currently I have no clue where the error could be coming from.

I tried to produce a MWEB regarding the comments from moewe.

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{yan2016nonlinear,  
title={Nonlinear and robust statistical process monitoring based on variant 
autoencoders},
author={Yan, Weiwu and Guo, Pengju and Li, Zukui and others},
journal={Chemometrics and Intelligent Laboratory Systems},
volume={158},
pages={31--40},
year={2016},
publisher={Elsevier}
}
\end{filecontents}

\begin{document}
\cite{yan2016nonlinear}

\bibliography{\jobname}

\end{document}

The problem is that the bib file works fine in certain situations. For instance I tried adding the reference to one of the conference papers I had worked on last year, and the bibliography showed up just fine.

The source of the bibliography is, after searching the title of the paper on Google scholar, I clicked on the citation mark, the second icon right after the star, then clicked on BibTeX and pasted the contents to my bib file.

Thanks for all the guidance. I know the format of the question must still be incomplete but I'll try my best to revise it.

  • 2
    It could be a bug in the .bst file, but it could also be a bug in your .bib file. So please show us a complete yet minimal example that reprduces the message. See I've just been asked to write a minimal example, what is that? and How to write a MWEB (Minimal working example with Bibliography)?. – moewe Jul 11 '18 at 6:08
  • Welcome to TeX.SE. Please post the contents of the entry with key yan2016nonlinear. – Mico Jul 11 '18 at 7:36
  • Please also tell us how you constructed the entry yan2016nonlinear. E.g., did you download the information from sciencedirect.com/science/article/abs/pii/S0169743916302088 (click on the "Export" button to download the bibliogrpahic data)? – Mico Jul 11 '18 at 7:51
  • I mentioned how I got the information of the bib file in the main inquiry. And then I tried using the information obtained from the path written as an example by Mico and suddenly it's working all fine. There wasn't any difference in the codes or anything. Does this mean that there was a bug in my .bib file? – Sam Kim Jul 11 '18 at 13:50
  • 1
    Well, your author={Yan, Weiwu and Guo, Pengju and Li, Zukui and others}, does not match the authors listed in sciencedirect.com/science/article/abs/pii/S0169743916302088 which would be author={Yan, Weiwu and Guo, Pengju and Liang gong and Li, Zukui}, (Liang gong could be a problem...) But the MWE still shows a problem in achemso.bst. – moewe Jul 11 '18 at 14:04
2

Update The bug (https://github.com/josephwright/achemso/issues/29) has been fixed in version 3.12 of achemso released 2018-09-15. If you have the same issue, consider an update.

The answer below is kept for informative purposes only. The fix that was actually applied is slightly different from the one suggested here.

This seems to be a tiny bug in achemso.bst. I have opened an issue at https://github.com/josephwright/achemso/issues/29

Specifically in FUNCTION { format.names.loop }. Instead of

FUNCTION { format.names.loop } {
  { remaining.names.int #0 > }
    {
      names.str current.name.int "{vv~}{ll,}{~f.}{,~jj}" format.name$
      duplicate$
      'current.name.str :=
      current.name.int #1 >
        {
          duplicate$
          "others," =
            {
              bbl.etal
              add.space
              remaining.names.int #1 - 'remaining.names.int :=
            }
            {
              swap$
              names.separate.comma.bool
                { add.comma }
                { add.semicolon }
              if$
              swap$
              *
            }
          if$
        }
        { }
      if$
      remaining.names.int #1 - 'remaining.names.int :=
      current.name.int #1 + 'current.name.int :=
    }
  while$
}

it should probably read

FUNCTION { format.names.loop } {
  { remaining.names.int #0 > }
    {
      names.str current.name.int "{vv~}{ll,}{~f.}{,~jj}" format.name$
      duplicate$
      'current.name.str :=
      current.name.int #1 >
        {
          duplicate$
          "others," =
            {
              pop$
              add.space
              bbl.etal
              *
              remaining.names.int #1 - 'remaining.names.int :=
            }
            {
              swap$
              names.separate.comma.bool
                { add.comma }
                { add.semicolon }
              if$
              swap$
              *
            }
          if$
        }
        { }
      if$
      remaining.names.int #1 - 'remaining.names.int :=
      current.name.int #1 + 'current.name.int :=
    }
  while$
}

I.e. the changes are

--- achemso.bst 2018-02-05 21:29:10.000000000 +0100
+++ achemso-etal.bst    2018-07-11 16:21:24.290381800 +0200
@@ -872,8 +872,10 @@
           duplicate$
           "others," =
             {
-              bbl.etal
+              pop$
               add.space
+              bbl.etal
+              *
               remaining.names.int #1 - 'remaining.names.int :=
             }
             {

In your particular case it has been pointed out though, that the author list could well be

author = {Yan, Weiwu and Guo, Pengju and Liang Gong and Li, Zukui},

circumventing the issue. (See https://www.sciencedirect.com/science/article/abs/pii/S0169743916302088 after a nudge by Mico I have changed "Liang gong" to "Liang Gong" assuming it was a typo, I could not obtain the original paper to confirm this, though.)

  • +1. "gong" is definitely a typo, though, courtesy of the journal website. Please change it to "Gong". – Mico Jul 11 '18 at 14:26
  • 1
    @Mico I couldn't obtain the paper because my university is not subscribed to that journal, but I assume it is more likely that this should be a "G". – moewe Jul 11 '18 at 14:39

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.