[Tex/LaTex] numbering a system of equations


How can I add a number to the following system of equations so that the first equation take the number (1.a) and the second (1.b)?

x_k & = f_d(x_{k-1},u_{k-1},\theta) + q_{k-1}\\
y_k & = h(x_k,\theta,k) + r_k 

Best Answer

Use empheq to style your equation set, together with subequations to achieve your numbering objective:

enter image description here


% Update display of subequation numbering (Xy) > (X.y)
\patchcmd{\subequations}% <cmd>
  {\theparentequation\alph{equation}}% <search>
  {\theparentequation.\alph{equation}}% <replace>
  {}{}% <success><failure>


    x_k &= f_d(x_{k-1},u_{k-1},\theta) + q_{k-1} \\
    y_k &= h(x_k,\theta,k) + r_k 


The default numbering within subequations has the form (Xy). The etoolbox patch is applied in the preamble to change this to (X.y) for all subequations.