I'm trying to use the inch mark (the double prime) in a piece of text; in the past I've gotten away with
4 $''$ \times 6 $''$
but for some reason that doesn't work when that line is an item in an itemized list. I'm now experimenting with the siunitx package, but now there's a new problem. This MOLMWE (More or Less Minimal Working Example)
\documentclass{article}
\usepackage{siunitx}
\usepackage[LY1]{fontenc}
\usepackage{fontspec}
\usepackage{xltxtra}
\setromanfont[Numbers=OldStyle]{Linux Libertine O}
\sisetup{detect-all = true}
\DeclareSIUnit[number-unit-product = {}]{\inchQ}{\prime\prime}
\begin{document}
\begin{itemize}
\item \SI{4 \times 6}{\inchQ} index cards
\end{itemize}
\end{document}
produces an incorrect result; I'd attach an image, but I don't have sufficient reputation for that privilege. What's the problem, if you can spot it from just the code, and how do I fix it?
P.S. As for the MOLMWE: I included possibly extraneous material because I wasn't sure whether it was relevant and decided to play it safe.
Best Answer
I’d use the UTF characters here and not the
\prime\prime
(better would besiunitx
’ default setting{}^{\prime\prime}
which is''
, anyway). That way, the glyphs are taken from the same font as the digits.Code
Output