5

I have an old LaTeX document (2005) that I want to compile. Latex complains that

! LaTeX Error: Unknown float option `n'.

These are all typical figures, like

\begin{figure}[n]
\includegraphics[width=0.9\textwidth,angle=270]{ngc121.eps}
\caption{NGC121}
\label{fig:ngc121}
\end{figure}

Note that all figures are eps files; I recall this file was originally compiled to dvi, and then converted to ps and pdf. My current latex says that it is pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian), so there is obviously a version mismatch.

The amount of n and !ht figures in the document are about equal, so I assume the n was intentional and that this once worked.

Side note: I don't know why all the figures are rotated.

Before replacing the ns with other options, I'd like to know what the option was supposed to do so I can maybe mimic it. The n is not listed in e.g. https://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions

7
  • 5
    most likelyn was a typo for h I would guess. Commented Aug 2 at 10:41
  • A pdf rendering from 2005 shows that the n-figures are each on their own page at the end of the document. After !ht figures that appear later in the tex file. So I maybe that is what it meant?
    – BlackShift
    Commented Aug 2 at 10:41
  • 1
    Old releases did not warn of unknown float options so n would have had the effect of not allowing h, t, b or p so forcing the float to the end of the document unless flushed by \clearpage as it has no legal placement. Commented Aug 2 at 10:42
  • 2
    "Side note: I don't know why all the figures are rotated." your code shows angle=270 Commented Aug 2 at 10:44
  • in 2014 latex news reported "Misspelled float placement specifiers such as \begin{figure}[tv] instead of tb are silently ignored by the kernel code. Now we test for such letters and issue an error message." Commented Aug 2 at 10:44

1 Answer 1

11

n has never been defined by LaTeX or common packages.

Prior to 2014, LaTeX did not give an error message for undeclared float options so [n] would have the effect of not allowing h, t, b or p so forcing the float to the end of the document unless flushed by \clearpage as it has no legal placement.

Since 2014 LaTeX gives an error for undefined placement option so [n] will raise an error.

6
  • Thank you! The n might have even been used intentionally (by me probably) to achieve the end-of-document effect. I suppose I'd have to move the figures in the tex file to replicate the effect.
    – BlackShift
    Commented Aug 2 at 10:50
  • 1
    @BlackShift that, or if say you don't use bottom floats, use b and set \setcounter{bottomnumber}{0} so bottom floats are not allowed, that will do the same thing Commented Aug 2 at 10:54
  • @BlackShift Should all your figures go to the end of the document or only some of them? Commented Aug 2 at 11:08
  • @samcarter_is_at_topanswers.xyz only some of them, so the hack of reusing b works beautifully
    – BlackShift
    Commented Aug 2 at 11:38
  • 3
    @BlackShift "hack"? I am sure you meant to write "skillfully documented and engineered solution" Commented Aug 2 at 13:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .