latexquarto

Formatting math and text centering


I am writing in quarto and including some mixed math and text and rendering to pdf using xelatex.

I am having trouble formatting the text part of the code - specifically interlacing some text and having it entered with the math above and below it.

Here is my code

$$
\begin{aligned}
TEa =  0.25 \times \sqrt(CVw^2 + CVb^2) \\
{\ \textrm{and}} \\
\ \ allowable \ \ imprecision = 0.5 \times\ CVw
\end{aligned}
$$ {#eq-bottom}

which produces this ...

Screen shot

I really want the word "AND" centered - does anyone know how to achieve this?


Solution

  • For centered content that doesn't require alignment, used gather if you want equation numbers next to each row, gather* for no equation numbers, and gathered inside an equation of you want a single number for the whole set. So, something like this would work for you:

    $$
    \begin{equation}
      \begin{gathered}
           TEa = 0.25 \times \sqrt(CVw^2 + CVb^2)     \\
                       \text{and}                     \\
        \text{allowable imprecision} = 0.5 \times CVw
      \end{gathered}
    \end{equation}
    $$ {#eq-bottom}