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

Change align environment cell alignment order #64

Open
wants to merge 4 commits into
base: align-fix-cursor-in-top-row
Choose a base branch
from

Conversation

ryangr-texthelp
Copy link

I have been looking at the great work happening in the matrix and align branches here and thought we could make some slight improvements to the way this works?

AFAIK, the cells in an align environment are just ordered {rlrlrl....}, it doesn't create a centrally aligned cell for =.

I don't think &= is a special character which requires it's own parsing, it's just an & denoting a new cell and the first character in that cell is an =. In that way, if we assume an align === a matrix and change the CSS accordingly I think we can get some very accurate results (see updated visual.html tests). I've taken some samples from Wikibooks and other areas around the web.

These changes allow for multiple equations on one line, to be able to modify the alignment character and also to continue using Shift+Spacebar to add a new cell.

@ryangr-texthelp
Copy link
Author

I realised after I made the PR that there is another branch align-alternative which is more structured.

If you're happy with the changes in this PR, I took a fork of that branch and made the same changes. I really do think you're onto something here with the implementation of TabularEnv, it opens up a whole world of support for different environments which are based off the tabular approach: https://github.com/texthelp/mathquill/tree/feature/array-environment-alternative

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

Successfully merging this pull request may close these issues.

1 participant