1

I've been using a solution that allows me to:

  1. Use proportional figures in text and tabular figures in tables;
  2. Force siunitx to set "symbols", e.g. ( ) - in the text-font instead of the math-font, developed by David Carlisle (here, here and here).

I've been using the code for a few years, but I can't get the MWE below to work with MinionPro. It results in the error message: Bad mathchar (32768). When loading MinionPro with onlytext (or using another font), the substitution trickery works fine. The problem is the left bracket, i.e. \xxxl(, the right bracket works fine.

The frustrating thing is that I use this code in my large style files and it works fine - but I want to create a minimal style file, and I just can't find the mistake.

\documentclass{scrartcl}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenx}

\usepackage{MinionPro}% other fonts work fine as well as using 'onlytext'

\usepackage{siunitx}

\sisetup{%
    input-symbols           = ( ) [ ] - +,
}

\def\xxxl#1{%
\bgroup\uccode`\~\expandafter`\string#1%
\uppercase{\egroup\edef~{\noexpand\text{\noexpand\llap{\string#1}}}}%
\mathcode\expandafter`\string#1"8000 }

\def\xxxr#1{%
\bgroup\uccode`\~\expandafter`\string#1%
\uppercase{\egroup\edef~{\noexpand\text{\noexpand\rlap{\string#1}}}}%
\mathcode\expandafter`\string#1"8000 }

\def\textsymbols{\xxxl(\xxxr)}% the left bracket ( causes the problem

\begin{document}

\begin{table}
\figureversion{tabular,tab}
\textsymbols
\begin{tabular}{S S S}
(0.096) & (0.012)& (0.108) \\
 0.136  &  0.021 &  0.024
\end{tabular}
\end{table}

\end{document}
Henri Menke
  • 109,596
Jörg
  • 7,653
  • This can be closed as duplicate. I forgot that MinionPro loads amsmath, hence I need to include the amsmath correction from David's answer http://tex.stackexchange.com/a/46340/11984. – Jörg Mar 25 '14 at 12:03

0 Answers0