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 mediawiki #1558

Merged
merged 5 commits into from
Aug 7, 2018
Merged

Support mediawiki #1558

merged 5 commits into from
Aug 7, 2018

Conversation

ronkok
Copy link
Collaborator

@ronkok ronkok commented Aug 7, 2018

Wikipedia and other mediawiki sites have their own system for generating images of LaTeX expressions. That system has accrued several aliases for LaTeX functions, resulting in a design that their own math road map calls "somewhat chaotic".

Those additional functions are supported by the LaTeX package texvc.

This PR adds to KaTeX all of the texvc functions that have not been deprecated. (except \O, which conflicts with a pre-existing function, and \varcoppa, for which we do not have font support.)

Below is visual confirmation that this PR renders the whole motley group.

mediawiki

@codecov
Copy link

codecov bot commented Aug 7, 2018

Codecov Report

Merging #1558 into master will increase coverage by 0.21%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1558      +/-   ##
==========================================
+ Coverage   84.17%   84.39%   +0.21%     
==========================================
  Files          79       79              
  Lines        4544     4607      +63     
  Branches      803      803              
==========================================
+ Hits         3825     3888      +63     
  Misses        624      624              
  Partials       95       95
Impacted Files Coverage Δ
src/macros.js 92.21% <100%> (+1.72%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f3a9bd4...88ee3c0. Read the comment docs.

@ylemkimon
Copy link
Member

As there is texvc package, I think this qualifies to be in the main KaTeX.

Copy link
Member

@ylemkimon ylemkimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link to deprecated syntax should be: https://en.wikipedia.org/wiki/Help:Displaying_a_formula#Deprecated_syntax (with underscore).

@edemaine
Copy link
Member

edemaine commented Aug 7, 2018

Do we really want the "(in master)" notes in the documentation? We already have features listed in the docs that are master only. (I'd also like to release soon.)

@ronkok
Copy link
Collaborator Author

ronkok commented Aug 7, 2018

Do we really want the "(in master)" notes in the documentation?

No. But what we want even less is an error message, in red, saying that a function is not supported.

I am writing "In master" on the assumption that the docs may be published to gh-pages at any moment. The documentation is in a shakedown period at present. After things settle down, it may be possible to delay publishing supported.md until after a release. In that scenario, we could write features directly into the docs.

Is it possible to publish updates of some but not all of the documentation pages? If, during the period between releases, we want to update some part of the documentation, can we publish updates of everything except supported.md and suppport_table.md? That would fix the problem once we get past this shakedown period.

@edemaine
Copy link
Member

edemaine commented Aug 7, 2018

This is related to #1544. Perhaps we should only publish at release times, for now.

@ronkok
Copy link
Collaborator Author

ronkok commented Aug 7, 2018

Perhaps we should only publish at release times, for now.

That would allow us to update the docs with new functions as they are written. But I worry that we may someday discover that something in the documentation is just wrong and needs to be fixed right away.

@ylemkimon
Copy link
Member

@edemaine @ronkok If we decide to publish every commit, we can use built CSS (#1520) and in master notes are not necessary. Documentation can be updated regardless of whether we publish every release or commit.

@ronkok
Copy link
Collaborator Author

ronkok commented Aug 7, 2018

@ylemkimon Thank you for the clarification. That changes how I view things. I'll get started on changing "In master" to displaying the actual function.

We need to get #1520 merged before we publish the docs.

@ronkok
Copy link
Collaborator Author

ronkok commented Aug 7, 2018

I've changed the Support Table, deleting "In master" and instead writing in code to display the function.

When I run yarn start, every one of them shows an error. I don't understand why. These functions should run okay with the CSS from the current release. I don't understand why PR #1520 would help them.

@ylemkimon
Copy link
Member

You probably should build the KaTeX again, by running yarn build at the root.

@ronkok
Copy link
Collaborator Author

ronkok commented Aug 7, 2018

@ylemkimon Thank you. Your suggestion did the trick and I am very much reassured.

@edemaine
Copy link
Member

edemaine commented Aug 7, 2018

We can publish docs every release once #1521 is merged (soon), then publish every commit once #1520 gets merged (but that, I fear, might want to wait till we get a domain name...).

@ylemkimon ylemkimon merged commit 50c0240 into KaTeX:master Aug 7, 2018
@kevinbarabash
Copy link
Member

kevinbarabash commented Aug 8, 2018

Wowza... so many symbols! I'll publish 0.11.0 and new docs this weekend.

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.

4 participants