Benches Uncategorized

4

Aligning matrices in Equation Editor

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Would anyone know how to use a {pmatrix} and the ampersand "&" separator properly within an {align} command when LaTeX is used in equation editor in Pages?

I use the Edit Equation tool to add matrices to my Pages documents. For that, I usually use the LaTeX command

begin{pmatrix} end{pmatrix}

Sometimes I have a series of equations each of which includes one or more matrices. I use the LaTeX command

begin{align} end{align}

to align the matrices in different rows of the equations.

Within a {pmatrix}, the elements of a matrix on the same row are separated and aligned properly via the ampersand "&" between the elements . But when the {pmatrix} is within an {align} command, the Pages equation editor seems to fail to recognize the ampersand correctly.

To compensate for that, I insert empty spaces via tilde "~" into a matrix (and remove the ampersands) whenever it is inside an {align} command but the result is usually (aesthetically) not so satisfying and more importantly the process is too cumbersome and time consuming.

Here are three examples:

The first example is

whose code is

begin{pmatrix}

1 & 3 & 5\

2 & 4 & 0

end{pmatrix}

The second example is

whose code is

begin{align}

begin{pmatrix}

1 & 3 & 5\

2 & 4 & 0

end{pmatrix}

end{align}

and the third example is

whose code is

begin{align}

begin{pmatrix}

-1 ~~~~ 3 ~~~ 5\

2 ~~ -4 ~~~~ 0

end{pmatrix}

end{align}

I use Pages 7.3 on macOS 10.13.6. Thank you!

4 replies

Sign in or join Beachball Help to reply.

  1. 0

    bpaksoy

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I did not know about strictspacing before; thank you.

    Using strictspacing seems to bring some side effects but overall it provides solutions still significantly better than the solution I had when matrices need to be aligned without misaligning the elements inside a matrix.

    On another note, the problem I described does not seem to present itself in regular LaTeX; I guess it is another headache coming from blahTeX.

  2. 0

    VikingOSX

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    That blahTeX translator is not a mini-implementation of TeX. It is a third-party, compiled translator that Apple built into Pages, and it has a very restricted diet of [La]TeX syntax that it internally converts to MathML (which it will also understands) in the equation editor. With no [La]TeX packages permitted, there goes the amsmath package, and other useful packages that could augment the matrix family, and simplify other equation works.

    I have the full MacTeX 2018 distribution, and sometimes, I generate a PDF of what I want to include in Pages, or I use pandoc to translate the LaTeX into .docx.

  3. 0

    VikingOSX

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Here are some examples:

  4. 0

    bpaksoy

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    They don't suit me at this time but thx for the extra tips on Pages vs LaTeX.