1

I like Charter BT, but the space between ) and y is too narrow for me (Similarly ( and w ). I want to know how to write a macro to insert spaces between in math mode.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\usepackage[T1]{fontenc}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{physics}
\begin{document}
  \begin{align}
    uvw\qty(\sum_{i=1}^n a_ix^i)yz
  \end{align}
\end{document}

I tried \renewcommand{\qty}[1]{\qty##1 \hspace{0.2em}}, but it didn't work.

2

A small space can be inserted by \,:

\documentclass{article}
\usepackage{amsmath}
\usepackage[T1]{fontenc}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{physics}
\begin{document}
  \begin{align}
    uvw\,\qty(\sum_{i=1}^n a_ix^i)\,yz
  \end{align}
\end{document}

Result

TeX automatically adds some space, if \left and \right are used:

\documentclass{article}
\usepackage{amsmath}
\usepackage[T1]{fontenc}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{physics}
\begin{document}
  \begin{align}
    uvw\left(\sum_{i=1}^n a_ix^i\right)yz
  \end{align}
\end{document}

Result

If \qty should be used, then it can be wrapped in \mathinner:

\documentclass{article}
\usepackage{amsmath}
\usepackage[T1]{fontenc}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{physics}
\begin{document}
  \begin{align}
    uvw\mathinner{\qty(\sum_{i=1}^n a_ix^i)}yz
  \end{align}
\end{document}

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.