Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for \begin{align}? #25

Open
MichaelHatherly opened this issue Aug 11, 2021 · 4 comments
Open

Support for \begin{align}? #25

MichaelHatherly opened this issue Aug 11, 2021 · 4 comments

Comments

@MichaelHatherly
Copy link
Contributor

More of a question than a feature request really. Is support for \begin{align} (and other block environments) a planned feature that may be implemented here at some point, or is it out of scope for what the package is intended for?

Somewhat related to #18.

@korsbo
Copy link

korsbo commented Aug 11, 2021

I'm out shopping for a low-dependency way to render Latexify.jl equations (LaTeXStrings) into images so this could be very useful!

@Kolaru
Copy link
Owner

Kolaru commented Aug 11, 2021

This kind of feature was definitively not planned, but falls in the scope of the package. In a sense, aligning characters and expressions is already most of what the package does ^^

The way to go is probably to consider that the latex expression is always in an align environnement so that & and \\ work by default, and there is no need to parse \begin ... \end blocks.

@korsbo
Copy link

korsbo commented Aug 11, 2021

The way to go is probably to consider that the latex expression is always in an align environnement so that & and \\ work by default, and there is no need to parse \begin ... \end blocks.

that sounds a little bit dangerous. One could imagine wanting to support \begin{cases} or something else where the interpretation is a bit different. One could also have mixed stuff, like

$A = \left( \begin{array}{c}
  1 \\
  2
\end{array} \right)$

where I imagine that you could run into problems.

@Kolaru
Copy link
Owner

Kolaru commented Aug 11, 2021

I don't quite see the problem, the example you give should work just fine if fed into an align env. In any case, we need to choose which kind of environnement is used for the overall equation (currently it always mimics a equation env, even for inline math e.g. We have $x = y^2$.).

Supporting \begin ... \end block more generally is, I think, a different and more complicated problem, at least from the point of view of parsing, since some character can have special meaning inside environnements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants