0

I am using the bmcart.cls file, as it is required for submission to a particular journal (associated with BioMed Central). Using this format, none of the images to which I refer in my code render in the .pdf output; however, the compiler (ShareLaTeX) throws no errors. The code works in the article and nwc document class.

Below is a minimum working example. The graphicx package is loaded in the document preamble. Help?

\begin{figure}[!ht]  
    \centering  
    \includegraphics[width=.48\textwidth]{./figs/WestCoastPowerGrid.pdf}  
    \includegraphics[width=.48\textwidth]{./figs/WestCoastPowerGrid2.pdf}  
    \caption{The  West Coast Power Grid introductory slide and degree distribution slide (by Ben McCaleb)}  
    \label{fig:WestCoastPowerGrid}  
\end{figure}  

Thank you, Jon

  • 2
    you have draft specified as a documentclass or package option – David Carlisle May 24 '17 at 18:33
  • 2
    note a "minimal working example" should be something people can run to see the issue, so should have \documentclass... \end{document} and use a generally available image such as example-image – David Carlisle May 24 '17 at 18:35
  • (@DavidCarlisle but mainly @ JonR) I wonder if the class is to blame (i.e. maybe it loads [draft]{graphicx} for reasons that make sense to the journal. I've seen similar things before when figures are expected separately. – Chris H May 24 '17 at 19:14
  • Thank you for your help, gentlemen. It does indeed seem as though the journal expects the figures and illustrations separately and structured their class file to make that work. I was swimming against the stream. No longer. I'll raft with the current. – Jon R. May 25 '17 at 13:28
2

The bmcart class comes with a template file that includes the comment:

All additional figures and files should be attached separately and not embedded in the \TeX\ document itself.

and also:

If you wish to display your graphics for your own use using includegraphic or includegraphics, then comment out the following two lines of code. NB: These line must be included when submitting to BMC. All figure files must be submitted as separate graphics through the BMC submission process, not included in the submitted article.

followed by:

\def\includegraphic{}
\def\includegraphics{}

So, if you want the images to appear in a draft version of your document, you need to comment out those two lines above. I'm guessing (since there's no MWE) you haven't done this, which means that \includegraphics won't take any arguments, which accounts for the filename appearing, since it's not an argument.

For your final submission-ready paper, you'll have to remove the graphicx package, and possibly just mark where the images should appear with \includegraphic or \includegraphics without any arguments or completely remove \includegraphics. (This is just guesswork based on a cursory glance at the template, so I recommend you read the author guidelines to check this.)

The template has an example of a couple of figures:

  \begin{figure}[h!]
  \caption{\csentence{Sample figure title.}
      A short description of the figure content
      should go here.}
      \end{figure}

\begin{figure}[h!]
  \caption{\csentence{Sample figure title.}
      Figure legend text.}
      \end{figure}

These simply have the caption (including their custom \csentence, which you don't seem to have used) so I think it's best to just replicate that.

| improve this answer | |
  • Thank you, Nicola. I see that I was trying to make the .cls file do something the journal doesn't want me to do. I appreciate your help! – Jon R. May 25 '17 at 13:25

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.