1

I am getting following errors when I select the two column option for ACS document class and link my bibtexstyle bibliography. The errors don't show when I have a single column document along with the bibliography or a two column style without the bibliography.

Illegal, another \bibstyle command---line 422 of file newfile2.aux

 \begin{mcitethebibliography}{38}

Try typing  <return>  to proceed.

If that doesn't work, type  X <return>  to quit.

I am working with Langmuir style (ACS). How to get my images in a single column while keeping the text in the two column format ?

cgnieder
  • 66,645
Curious
  • 117
  • 1
    This is nothing to do with having two columns: you've got a \bibliographystyle line in your source (achemso automatically adds one). – Joseph Wright May 10 '16 at 18:38

1 Answers1

2

The problem was identified by Joseph Wrigt in a comment: LyX adds \bibliographystyle to the document, but as achemso already does that, you get an error.

I think that to make this work you have to do two things:

  1. First choose Insert --> Note --> Comment. Inside this comment-inset, add the bibliography the normal way, with Insert --> List/ToC --> BibTeX bibliography.

    This step allows you to add citations via the LyX GUI, but LaTeX ignores the \bibliographystyle that is added by LyX.

  2. Add an ERT with Insert --> TeX Code (Ctrl + L), and write

    \bibliography{/full/path/to/your/bibfile}
    

    (Of course with the actual path to the bib-file on your system.) I'm guessing you need the full path because LyX generates temporary files with LaTeX code that it compiles.

Might look like this in LyX:

enter image description here

Torbjørn T.
  • 206,688
  • I did the same but am getting the error \begin{mcitethebibliography}{38}

    Try typing to proceed.

    If that doesn't work, type X to quit.

    – Curious May 10 '16 at 19:21
  • @Curious Same error as you mention in the question? That shouldn't happen. In the error window that pops up, can you click on View complete log or whatever is says, and edit your question to include the entire log? – Torbjørn T. May 10 '16 at 20:05
  • I have uploaded what I do here. my bibliography is called references. http://dropcanvas.com/ll57u – Curious May 10 '16 at 20:35
  • @Curious Fine, nothing wrong there, but what does the log file say? – Torbjørn T. May 10 '16 at 20:40
  • I have attached the log file here, http://dropcanvas.com/sna0q – Curious May 10 '16 at 21:27
  • @Curious can you please post a minimal example .lyx file? See here for more information: https://wiki.lyx.org/FAQ/MinimalExample – scottkosty May 11 '16 at 04:50
  • I have added a lyx file as well as a bib file which gives me the errors. Here is the url: http://dropcanvas.com/oqnmf – Curious May 11 '16 at 09:27
  • @Curious It really is better to include such things directly in your question, rather than relying on external sites: Open the files in a text editor, copy all the text, and paste it into the question. – Torbjørn T. May 11 '16 at 09:29
  • 1
    @Curious Works fine here. One thing I didn't think about earlier is that you may have to use / instead of \ in the path (see Paths and Linux/Windows slash conventions). Not sure why that would throw the error you mention though. – Torbjørn T. May 11 '16 at 09:32
  • I am still not able to resolve it. It gives me errors: ...raphy{C:\Users\MukulBhatnagar\Desktop\ref}

    The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., \hobx'), typeI' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.

    – Curious May 11 '16 at 10:10
  • and this: ...raphy{C:\Users\MukulBhatnagar\Desktop\ref}

    I suspect you've forgotten a `}', causing me to apply this control sequence to too much text. How can we recover? My plan is to forget the whole thing and hope for the best.

    – Curious May 11 '16 at 10:12
  • 1
    @Curious In 1.lyx you have backslashes in the path to the .bib file, try with forward slashes, as in your previous screenshot. – Torbjørn T. May 11 '16 at 10:17