0

I want to centering \vdots with \equiv in a system of modular equations. And I tried to use mathrel{\makebox[\widthof{=}]{\equiv}} like this one. But XeLaTeX said

! Extra }, or forgotten $.
\@settodim #1#2#3->\setbox \@tempboxa \hbox {{#3}}
                                              \dimen@ii =\z@ \@tf@r \res...
l.238   \end{frame}

! Missing number, treated as zero.

My full text:

\[
  \begin{cases}
    x \equiv a_1 &\pmod{m_1}\\
    \mathrel{\makebox[\widthof{\equiv}]{\vdots}}\\
    x \equiv a_n &\pmod{m_n}
  \end{cases}
 \]

And I tried to type manually, but XeLaTeX can't display it. Any ideas?

yhylord
  • 101
  • Use the mathtools package and it's \vdotswithin{\equiv} macro – daleif Aug 17 '14 at 14:21
  • The reason your attempt does not work is that \makebox and \widthof works in text mode, and you are giving it something that require math mode – daleif Aug 17 '14 at 14:23

1 Answers1

1

Combine @daleif suggestion with the empheq package to emulate a numcases environment. You don't have to load mathtools as empheq does it for you. If you want only one number for the whole system, use aligned inside equation:

\documentclass{article}
\usepackage[overload]{empheq}%

\begin{document}     

\begin{align}[left = \empheqlbrace]%
    x &\equiv a_1\pmod{m_1}\\
    & \vdotswithin{\equiv}\notag \\
    x &\equiv a_n\pmod{m_n}
    \end{align}
    \vskip 1cm
    \begin{equation}[left = \empheqlbrace]
   \begin{aligned}%
    x &\equiv a_1\pmod{m_1}\\
    & \vdotswithin{\equiv}\\
    x &\equiv a_n\pmod{m_n}
    \end{aligned}
    \end{equation}

\end{document} 

enter image description here

Bernard
  • 271,350