Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

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.

share|improve this answer
    
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 –  Matthew Leingang Jul 21 '11 at 18:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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