# Unknown float option 0'. … pdflatex

I am observing an "Unknown float option 0'. .." error in the new command below. float package is already but I am still running into problems. This code use to work fine until some time back, without the float package. But now even after including the float package it doesn't work at all.

Preamble:

\documentclass[letterpaper,11pt]{article}

\usepackage[left=1.27cm,right=1.27cm,top=1.02cm,bottom=1.02cm,headheight=0cm]{geometry}

\usepackage{anyfontsize}
\usepackage{latexsym,siunitx}
\usepackage{titlesec,color,colortbl}
\usepackage{enumitem,soul}
\usepackage[pdftex]{hyperref}
\usepackage{float}
\hypersetup{pdfstartview=}
\pagenumbering{gobble}


New command, source of error:

\newcommand{\cvSubheading}[4]{
\vspace{-1pt}\item[]
\begin{table}[0.98\textwidth]
\sisetup{table-column-width=0}
\begin{tabular}{S[table-text-alignment=left]S[table-text-alignment=right]SS}
\textbf{#1} & #2 \\
\rowcolor{Gray}
\textit{#3} \textit{#4}\\
\end{tabular}\vspace{-5pt}
\end{table}
}


Some more errors in the new command:

Unknown float option .'. ...
Unknown float option 9'. ...
Unknown float option 8'. ...
Unknown float option \'. ...


Can somebody please help?

As noted in comments, the one below is the newer version, that was already with me:

\newcommand{\cvSubheading}[4]{
\vspace{-1pt}\item[]
\begin{tabular*}{.98\textwidth}{l@{\extracolsep{\fill}}r}
\textbf{#1} & #2 \\
\textit{#3} & \textit{#4}\\
\end{tabular*}\vspace{-5pt}
}

• Welcome to TeX SX! The width of a tabular is not an option for table. – Bernard Nov 16 '19 at 10:53
• @Bernard, Thanks, moving it to tabular did solve the problem. But now I am observing another one ..Illegal unit of measure (pt inserted). ... From same new command: cvSubheading. – agarg Nov 16 '19 at 11:11
• tabular doesn't accept an optional width argument either. Anyway, you don't need table. Are you sure you want S columns in a table meant for text? – egreg Nov 16 '19 at 11:29
• This is embarrassing, turns out I was looking at an older version. Newer version is simpler. Thanks – agarg Nov 16 '19 at 11:38
• Can you show us what you want to get? I don't understand why you'd want to use table after \item. table is meant for floating objects but it looks like you want to place a tabular at a well-defined spot, so you should drop that table around it. – Skillmon likes topanswers.xyz Nov 16 '19 at 11:39

## 1 Answer

The optional argument to table specifies float positions such as t for top or h for here, so you get an error from

\begin{table}[0.98\textwidth]


as the first character in the option is 0 which is not one of the allowed characters !htbp

In this case however you want the tabular to be in the list item, but a table environment marks its content as something that is not in the main document flow and can be moved, so you can simply delete the lines

\begin{table}[0.98\textwidth]


and

\end{table}


So that the tabular is the text of the list item started with \item.