6

I love the bitstream-charter font from the mathdesign package - with a small exception: The space between the minus sign and a negative number looks too cramped in my opinion.

I guess from a typographical point of view it's probably a very bad idea to mess with the font, but nevertheless my question: Is there a possibility to add a bit of space? Or steal a minus symbol from another font? Or somehow influence the kerning (but not in "1+1"-like situations)?

General requirements:

  • it has to work with pdflatex
  • works with siunitx
  • especially aligning columns by a decimal symbol has to work

I already tried to mess around with bracketing negative numbers (based on https://tex.stackexchange.com/a/152323/36296) but this breaks the alignment in columns.

MWE

The following MWE exaggerates the shortening and the additional space to clearly see the difference.

\documentclass{article}

\usepackage{siunitx}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{graphicx}

\begin{document}

    math mode $\num{-42}$: \qquad I would like a bit of space, as in $42 - 42$ 

    \bigskip

    text mode \num{-42}: \qquad ~Again I would like a bit of space and ideally a smaller minus sign to look like \scalebox{0.75}[1.0]{$-$}\thinspace42 

    \bigskip

    Bonus: aligning columns at the decimal sign should still work

    \begin{tabular}{S[table-format=1.2,round-mode=places,round-precision=2]}
            0.890888\\
         -0.505642\\
    \end{tabular}

    \bigskip

    Messing with the negative bracket breaks the alignment

    \begin{tabular}{S[%
            table-format=1.2,
            round-mode=places,
            round-precision=2,
            bracket-negative-numbers, 
            open-bracket={-\thinspace},
            close-bracket={}        
    ]}
            0.890888\\
            -0.505642\\
    \end{tabular}

\end{document}

enter image description here

  • Would you be okay with using \,? – heather Aug 22 '16 at 16:06
  • @heather Sure! Can you please elaborate how this works with in case of aligning a column? – samcarter_is_at_topanswers.xyz Aug 22 '16 at 16:18
  • Actually, looking at it a bit, I'm not sure the amount of space it provides is enough for what you want...it really just moves it the tiniest bit, so they aren't touching. Is that okay, or do you want something a little bigger? – heather Aug 22 '16 at 16:24
  • @heather It's probably OK, or at least it would be a good starting point if you could show a solution with that. – samcarter_is_at_topanswers.xyz Aug 22 '16 at 16:28
  • Okay, I'll work on it then. – heather Aug 22 '16 at 16:28
3

Thanks to the fantastic answer of Joseph Wright this problem is solved by redefining the in-text minus symbol of siunitx:

 \cs_undefine:N \c__siunitx_minus_tl
 \tl_const:Nn \c__siunitx_minus_tl {\scalebox{0.75}[1.0]{$-$}\thinspace}

To force the usage if this symbol, the text mode of siunitx has to be used

\sisetup{mode = text}

MWE:

\documentclass{article}

\usepackage{siunitx}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{graphicx}

\sisetup{mode = text}
\ExplSyntaxOn
    \cs_undefine:N \c__siunitx_minus_tl
    \tl_const:Nn \c__siunitx_minus_tl {\scalebox{0.75}[1.0]{$-$}\thinspace}
\ExplSyntaxOff

\begin{document}

    math mode $\num{-42}$

    text mode \num{-42}

    \bigskip

    Bonus: aligning columns at the decimal sign should still works

    \begin{tabular}{S[table-format=1.2,round-mode=places,round-precision=2]}
        0.890888\\
        -0.505642\\
    \end{tabular}

\end{document}

enter image description here

| improve this answer | |

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.