1

I have the following list of prices:

\documentclass{standalone}
\usepackage{siunitx}
\usepackage{tabu}
\usepackage{lmodern}
\usepackage{textcomp}
\begin{document}
\begin{tabu}{rl}
  US  & \$5.00\\
  CAN & \$6.50\\
  UK  & \textsterling4.00\\
  EU  & \texteuro4.50\\
\end{tabu}
\end{document}

This produces the following output:

enter image description here

As can be seen, the dollar, pound sterling, and euro signs all have different widths, leading to misalignment. The information I have seen for siunitx seems to assume that leading or following text (e.g. for units, currency, etc) is of the same width. However, in this case that obviously isn't an option.

2
  • What is your question? How to align the right column?
    – TeXnician
    Commented Mar 26, 2017 at 16:16
  • Yes, aligning to the right column to the decimal
    – junius
    Commented Mar 26, 2017 at 16:17

1 Answer 1

1

You are not using siunitx here because your table alignment is l. Anyway, since all your entries have exactly two digits after dot, just use r to roughly align the numbers:

\documentclass{standalone}
\usepackage{tabu}
\usepackage{lmodern}
\usepackage{textcomp}
\begin{document}
\begin{tabu}{rr}
  US  & \$5.00\\
  CAN & \$6.50\\
  UK  & \textsterling4.00\\
  EU  & \texteuro4.50\\
\end{tabu}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .