3

I would like to typeset a table using the D column type as described in the dcolumn package. When I combine this with \setmathfont(Digits){Gotham Narrow Light} I get overlapping columns:

\documentclass{article}
\pagestyle{empty}
\usepackage{lipsum}
\usepackage{dcolumn}
\newcolumntype{d}[1]{D{.}{.}{#1}}
\usepackage{mathspec}
\setmainfont[BoldFont=Gotham Narrow Medium]{Gotham Narrow Book}
\setmathrm{Gotham Narrow Book}
\setmathfont(Latin){Gotham Narrow Book}
% works fine
%\setmathfont(Digits){Monaco}
\setmathfont(Digits){Arial}
% causes column overlapping
\setmathfont(Digits){Gotham Narrow Light}

\begin{document}
\lipsum[1]
\[
\begin{array}{d{1.3}|d{1.5}|d{1.4}|d{1.4}|d{1.4}}
1.500 & 2.75000 & 0.5000 & 0.2500 & 1.2500 \\
1.750 & 2.93750 & 0.2500 & 0.0625 & 1.0625 \\
1.900 & 2.99000 & 0.1000 & 0.0100 & 1.0100 \\
1.990 & 2.99990 & 0.0100 & 0.0001 & 1.0001 \\
1.999 & 3.00000 & 0.0010 & 0.0000 & 1.0000 \\
2.000 & 1.00000 & 0.0000 & 2.0000 & 3.0000 \\
2.001 & 3.00000 & 0.0010 & 0.0000 & 1.0000 \\
2.010 & 2.99990 & 0.0100 & 0.0001 & 1.0001 \\
2.100 & 2.99000 & 0.1000 & 0.0100 & 1.0100 \\
2.250 & 2.93750 & 0.2500 & 0.0625 & 1.0625 \\
2.500 & 2.75000 & 0.5000 & 0.2500 & 1.2500 \\
\end{array}
\]
\lipsum[2]
\end{document}

sample output

I've tried with other monospace and proportional fonts and they seem to work fine. Is something wrong with Gotham?

1

My best workaround so far is to substitute:

\setmathfont(Digits)[Numbers={Monospaced}]{Gotham Narrow Light}

The side effect is that all digits in the entire document are now monospaced.

2
  • Did you consider setting the \fontspec at the beginning of each table-like environment?
    – Joseph Wright
    Jul 19 '11 at 19:46
  • @Joseph Wright: I tried \addfontfeatures{Numbers={Monospaced}} and \fontspec[Numbers={Monospaced}]{Gotham Narrow Light} in several places but nothing changed. \setmathfont doesn't work outside the preamble Jul 21 '11 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.