chirun-ncl / chirun

A Python package providing the command line interface for building flexible and accessible content with Chirun.
https://chirun.org.uk/
Other
29 stars 4 forks source link

vmatrix for determinant produces no vertical lines #116

Closed prowlett closed 2 years ago

prowlett commented 2 years ago

I'm trying to produce determinants.

I have tried the standard vmatrix from amsmath like this:

\[\begin{vmatrix}
    a & b\\
    c & d
\end{vmatrix}\]

It produces no vertical lines around the matrix.

I tried this instead

\[\left|\begin{matrix}
    a & b\\
    c & d
\end{matrix}\right|\]

And got the same.

The only thing I have that looks right (but I guess semantically isn't?) is this

\[\begin{array}{|cc|}
    a & b\\
    c & d
\end{array}\]

PDF output:

Screenshot from 2022-01-14 20:22:22

Web output:

Screenshot from 2022-01-14 20:22:29

christianp commented 2 years ago

I've just compiled this document with the latest chirun and it draws the vertical lines:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[\begin{vmatrix}
    a & b\\
    c & d
\end{vmatrix}\]

\end{document}

Can you come up with a small example that produces the bad output?

prowlett commented 2 years ago

Oh hey I just ran it and I get vertical lines (both in the code that produced the screenshots above and in my real code where the problem occurred)!

I was using the build I updated to last week and I see there hasn't been a commit since December, so I think I had the same version of chirun. However, over the weekend I wiped my computer and put a different Ubuntu on it, reinstalling texlive, chirun and the chirun prereqisites yesterday, so I guess we chalk this one up to some weirdness of my old setup that I haven't replicated in the new and that's that.

In case someone else has this problem and finds this thread in the future, for completeness here's the code I ran to make the screenshots above:

\documentclass{article}
\usepackage{amsmath}

\title{Test file}
\author{Peter Rowlett}
\begin{document}

\verb`\begin{vmatrix}`

\[\begin{vmatrix}
    a & b\\
    c & d
\end{vmatrix}\]

\verb`\left|\begin{matrix}`

\[\left|\begin{matrix}
    a & b\\
    c & d
\end{matrix}\right|\]

\verb`\begin{array}{|cc|}`

\[\begin{array}{|cc|}
    a & b\\
    c & d
\end{array}\]

\end{document}