2

I am having some issues with representing recurring decimals (using \overline{}) within an aligned array I am using to represent a matrix.

\documentclass{article}
\usepackage{gensymb}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{siunitx}

\newcolumntype{R}[1]{S[table-format=#1]}
\begin{document}
\[
\begin{aligned}
    \left[
        \begin{array}{@{}R{3.6}R{3.6}|R{3.4@{}}}
            1 &0 &=\SI[parse-numbers=false]{61.\overline{36}}{}\\
            0 &0.228096 &8.8128\\
        \end{array}
    \right]
    &R_2 \rightarrow \frac{R_2}{0.228096}\\
    \left[
        \begin{array}{@{}R{3.6}R{3.6}|R{3.4@{}}}
            1 &0 &=\SI[parse-numbers=false]{61.\overline{36}}{}\\
            0 &1 &38.63\\
        \end{array}
    \right]
\end{aligned}
\]    
\end{document}

Using just \overline{36} causes the number to overlap the right bracket The code snippet above works, with some errors in alignment of the recurring decimal; however, if I change:

0 &1 &38.63\\

to

0 &1 &=\SI[parse-numbers=false]{38.\overline{63}}{}\\

It breaks the last matrix with the left alignment moving and both recurring decimals overlapping the right bracket.

How can I add recurring decimals to the 61.36 and 38.63 without breaking my alignment?

Also, for my understanding, could someone please explain to me what is happening that is causing the final matrix to break?

  • 1
    Off-topic: \begin{array}{@{}R{3.6}R{3.6}|R{3.4@{}}} cannot be correct. You should probably write \begin{array}{@{}R{3.6}R{3.6}|R{3.4}@{}}. – Mico May 12 at 9:11
  • If you want to typeset numbers without scientific units, don't employ \SI. Instead, use \num. – Mico May 12 at 9:40
4

like this?

enter image description here

\documentclass{article}
\usepackage{gensymb}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{siunitx}
\sisetup{input-comparators}  % new

\newcolumntype{R}[1]{S[table-format=#1]}
\begin{document}
\[
\begin{aligned}
    \left[
        \begin{array}{ @{} R{3.6}R{3.6} | S[table-format=4.6,         % changed
                                            parse-numbers=false] @{}} % new
            1 & 0        & = 61.\overline{36} \\                      % changed
            0 & 0.228096 &    8.8128
        \end{array}
    \right]
    &R_2 \rightarrow \frac{R_2}{0.228096}\\
    \left[
        \begin{array}{ @{} R{3.6}R{3.6} | S[table-format=4.6,
                                            parse-numbers=false] @{}}
            1 & 0        & = 61.\overline{36} \\
            0 & 1        &   38.63
        \end{array}
    \right]
\end{aligned}
\]
\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.