3

All I'm trying to do is add placement specifiers to my figures with eg.[ht]. Instead of using them as arguments, latex decides to literally write [ht] into the pdf as text.

So here is my sample latex:

\documentclass[usenatbib]{mnras}
\usepackage{graphicx}
\DeclareGraphicsExtensions{.pdf,.png,.jpg,.PNG}
\graphicspath{{./pics/}}
\bibliographystyle{mnras}


\begin{document}    
    \begin{figure}[htbp]
        \centering
        \includegraphics[width=0.95\textwidth]{cartoon}
        \caption{caption}
        \label{fig:label}
    \end{figure}


    \bibliography{Remote}
\end{document}

Then I get pdf output

The placement specifiers aren't being listened to!

6

From the class documentation

The LaTeX float placement commands [htbp] are intentionally disabled. Layout of figures and tables will be adjusted by the publisher during the production process, so authors should not concern themselves with placement to avoid disappointment and wasted effort.

Ideally the optional argument would still be defined, and simply thrown away, but it seems that it's not implemented at all so you see some spurious text: you'll need to delete the positioning arguments.

6
  • I've reported this to the maintainer – Joseph Wright May 26 '16 at 12:26
  • Ah, Ok. I can see why they do that. But how do I stop the image from going behind text? – Lucidnonsense May 26 '16 at 12:31
  • @Lucidnonsense I don't understand what you mean: the image you've posted looks like what I'd expect for some literal text then a picture. – Joseph Wright May 26 '16 at 12:32
  • 2
    @JosephWright A class released in 2015 that is plagued with \rm, \it and \bf. Also this should be reported. – egreg May 26 '16 at 12:34
  • The image shown here is from the minimal example latex, but in my actual report I need a large figure. When I put width=\textwidth it puts the figure behind the text. Other than that there is no difference between code here and my report. – Lucidnonsense May 26 '16 at 12:38

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.