# Typeset a factor in math mode (“A is 3.5x larger than B.”)

I want to express "A is $3.5x$ (3.5 times) larger than B."

\documentclass{article}
\begin{document}
A is $3.5x$ / $3.5\times$ (3.5 times) larger than B.
\end{document}


If I understand correctly, then $3.5x$ typesets "x" as a variable rather than "times". In correspondence with How do you write "times"?, I also feel that $3.5\times$ is incorrect.

• I'd just write is in words as 3.5× looks odd on its own. – daleif Jul 16 '15 at 13:16

What ever you do: Define a command first which you may redefine later on. The $3.5x$-version is wrong for sure. Here are three versions, I personally think acceptable:

% arara: pdflatex

\documentclass{article}
\usepackage{siunitx}
%\newcommand*{\factor}[1]{$\num{#1}\mathrel\times$}
%\newcommand*{\factor}[1]{$\num{#1}\times$}
\newcommand*{\factor}[1]{\num{#1} times}

\begin{document}
$A$ is \factor{3.5} larger than $B$.
\end{document}