mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 19:28:39 +00:00
Move to katex.org (#1680)
* Change links to katex.org * Change http to https * Remove baseUrl hacks * Fix OpenGraph image link * Fix KaTeX path update script
This commit is contained in:
@@ -8,10 +8,10 @@ help solving a problem, feel free to stop by our [gitter channel](https://gitter
|
||||
|
||||
If you'd like to contribute, try contributing new symbols or functions that
|
||||
KaTeX doesn't currently support. The documentation has pages listing
|
||||
[supported functions](https://khan.github.io/KaTeX/docs/supported.html) and
|
||||
[functions that KaTeX supports and some that it doesn't support](https://khan.github.io/KaTeX/docs/support_table.html).
|
||||
[supported functions](https://katex.org/docs/supported.html) and
|
||||
[functions that KaTeX supports and some that it doesn't support](https://katex.org/docs/support_table.html).
|
||||
You can check them to see if we don't support a function you like, or try your
|
||||
function in the interactive demo at [http://khan.github.io/KaTeX/](http://khan.github.io/KaTeX/).
|
||||
function in the interactive demo at [http://katex.org/](http://katex.org/).
|
||||
The wiki has a page that describes how to [examine TeX commands and where to find
|
||||
rules](https://github.com/Khan/KaTeX/wiki/Examining-TeX) which can be quite
|
||||
useful when adding new commands.
|
||||
|
16
README.md
16
README.md
@@ -1,4 +1,4 @@
|
||||
# [<img src="https://cdn.rawgit.com/Khan/KaTeX/84189cd3adae24d92e766d14eb80d6e54f3c7dca/katex-logo.svg" width="130" alt="KaTeX">](https://khan.github.io/KaTeX/)
|
||||
# [<img src="https://cdn.rawgit.com/Khan/KaTeX/84189cd3adae24d92e766d14eb80d6e54f3c7dca/katex-logo.svg" width="130" alt="KaTeX">](https://katex.org/)
|
||||
[](https://www.npmjs.com/package/katex)
|
||||
[](https://circleci.com/gh/Khan/KaTeX)
|
||||
[](https://codecov.io/gh/Khan/KaTeX)
|
||||
@@ -15,9 +15,9 @@ KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the we
|
||||
|
||||
KaTeX is compatible with all major browsers, including Chrome, Safari, Firefox, Opera, Edge, and IE 9–11.
|
||||
|
||||
KaTeX supports much (but not all) of LaTeX and many LaTeX packages. See the [list of supported functions](https://khan.github.io/KaTeX/docs/supported.html).
|
||||
KaTeX supports much (but not all) of LaTeX and many LaTeX packages. See the [list of supported functions](https://katex.org/docs/supported.html).
|
||||
|
||||
Try out KaTeX [on the demo page](https://khan.github.io/KaTeX/#demo)!
|
||||
Try out KaTeX [on the demo page](https://katex.org/#demo)!
|
||||
|
||||
## Getting started
|
||||
|
||||
@@ -43,7 +43,7 @@ Try out KaTeX [on the demo page](https://khan.github.io/KaTeX/#demo)!
|
||||
|
||||
You can also [download KaTeX](https://github.com/khan/katex/releases) and host it yourself.
|
||||
|
||||
For details on how to configure auto-render extension, refer to [the documentation](https://khan.github.io/KaTeX/docs/autorender.html).
|
||||
For details on how to configure auto-render extension, refer to [the documentation](https://katex.org/docs/autorender.html).
|
||||
|
||||
### API
|
||||
|
||||
@@ -73,13 +73,13 @@ JavaScript on the client.
|
||||
The examples above use the `throwOnError: false` option, which renders invalid
|
||||
inputs as the TeX source code in red (by default), with the error message as
|
||||
hover text. For other available options, see the
|
||||
[API documentation](https://khan.github.io/KaTeX/docs/api.html),
|
||||
[options documentation](https://khan.github.io/KaTeX/docs/options.html), and
|
||||
[handling errors documentation](https://khan.github.io/KaTeX/docs/error.html).
|
||||
[API documentation](https://katex.org/docs/api.html),
|
||||
[options documentation](https://katex.org/docs/options.html), and
|
||||
[handling errors documentation](https://katex.org/docs/error.html).
|
||||
|
||||
## Demo and Documentation
|
||||
|
||||
Learn more about using KaTeX [on the website](https://khan.github.io/KaTeX)!
|
||||
Learn more about using KaTeX [on the website](https://katex.org)!
|
||||
|
||||
## Contributing
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
"dist/katex.js",
|
||||
"dist/katex.css"
|
||||
],
|
||||
"homepage": "http://khan.github.io/KaTeX/",
|
||||
"homepage": "https://katex.org/",
|
||||
"description": "Fast math typesetting for the web.",
|
||||
"moduleType": [
|
||||
"amd",
|
||||
|
@@ -4,5 +4,5 @@ This is an extension to automatically render all of the math inside of text. It
|
||||
searches all of the text nodes in a given element for the given delimiters, and
|
||||
renders the math in place.
|
||||
|
||||
See [Auto-render extension documentation](https://khan.github.io/KaTeX/docs/autorender.html)
|
||||
See [Auto-render extension documentation](https://katex.org/docs/autorender.html)
|
||||
for more information.
|
||||
|
@@ -27,7 +27,7 @@ will appear larger than 1cm in browser units.
|
||||
|
||||
The default build of KaTeX includes each of the needed fonts in three different formats: `ttf`, `woff`, and `woff2`.
|
||||
|
||||
- `ttf`s are included to support old versions of Chrome, Safari, Firefox, etc. (Here "old" means Firefox 3.5, Chrome < 5, and Safari <= 5.1, all of which are no longer supported: see [woff](http://caniuse.com/#search=woff) vs. [ttf](http://caniuse.com/#search=ttf)).
|
||||
- `ttf`s are included to support old versions of Chrome, Safari, Firefox, etc. (Here "old" means Firefox 3.5, Chrome < 5, and Safari <= 5.1, all of which are no longer supported: see [woff](https://caniuse.com/#search=woff) vs. [ttf](https://caniuse.com/#search=ttf)).
|
||||
- `woff` is the format that is most widely supported (all modern browsers support it), so it probably provides the most benefit to being included.
|
||||
- `woff2`s are included for very new versions of Chrome, because they are much smaller and faster to load.
|
||||
|
||||
|
@@ -6,7 +6,7 @@ This is a list of TeX functions, sorted alphabetically. This list includes funct
|
||||
|
||||
If you know the shape of a character, but not its name, [Detexify](http://detexify.kirelabs.org/classify.html) can help.
|
||||
|
||||
{@stylesheet: katex.min.css}
|
||||
<link rel="stylesheet" href="/static/katex.min.css"/>
|
||||
<style>
|
||||
table tr,
|
||||
table td {
|
||||
@@ -446,7 +446,7 @@ table td {
|
||||
|\hookleftarrow|$\hookleftarrow$||
|
||||
|\hookrightarrow|$\hookrightarrow$||
|
||||
|\hphantom|$a\hphantom{bc}d$|`a\hphantom{bc}d`|
|
||||
|\href|$\href{https://khan.github.io/KaTeX/}{\KaTeX}$|`\href{https://khan.github.io/KaTeX/}{\KaTeX}`|
|
||||
|\href|$\href{https://katex.org/}{\KaTeX}$|`\href{https://katex.org/}{\KaTeX}`|
|
||||
|\hskip|$w\hskip1em i\hskip2em d$|`w\hskip1em i\hskip2em d`|
|
||||
|\hslash|$\hslash$||
|
||||
|\hspace|$s\hspace7ex k$|`s\hspace7ex k`|
|
||||
@@ -1078,7 +1078,7 @@ table td {
|
||||
|\upsilon|$\upsilon$||
|
||||
|\upuparrows|$\upuparrows$||
|
||||
|\urcorner|$\urcorner$||
|
||||
|\url|$\footnotesize\url{https://khan.github.io/KaTeX/}$|`\url{https://khan.github.io/KaTeX/}`|
|
||||
|\url|$\footnotesize\url{https://katex.org/}$|`\url{https://katex.org/}`|
|
||||
|\utilde|$\utilde{AB}$|`\utilde{AB}`|
|
||||
|
||||
## V
|
||||
|
@@ -6,7 +6,7 @@ This is a list of TeX functions supported by KaTeX. It is sorted into logical gr
|
||||
|
||||
There is a similar [Support Table](./support_table.md), sorted alphabetically, that lists both supported and un-supported functions.
|
||||
|
||||
{@stylesheet: katex.min.css}
|
||||
<link rel="stylesheet" href="/static/katex.min.css"/>
|
||||
<style>
|
||||
p {overflow-wrap: break-word;}
|
||||
table tr,
|
||||
@@ -106,8 +106,8 @@ The `{array}` environment does not yet support `\cline` or `\multicolumn`.
|
||||
|
||||
|||
|
||||
|:----------------|:-------------------|
|
||||
| $\href{https://khan.github.io/KaTeX/}{\KaTeX}$ | `\href{https://khan.github.io/KaTeX/}{\KaTeX}` |
|
||||
| $\url{https://khan.github.io/KaTeX/}$ | `\url{https://khan.github.io/KaTeX/}` |
|
||||
| $\href{https://katex.org/}{\KaTeX}$ | `\href{https://katex.org/}{\KaTeX}` |
|
||||
| $\url{https://katex.org/}$ | `\url{https://katex.org/}` |
|
||||
|
||||
## Letters and Unicode
|
||||
|
||||
|
@@ -135,8 +135,8 @@ if [[ ! $PUBLISH ]]; then
|
||||
fi
|
||||
|
||||
# Edit docs to use CSS from CDN
|
||||
grep -l '{@stylesheet: katex.min.css}' docs/*.md | xargs sed -i.bak \
|
||||
's|{@stylesheet: katex.min.css}|<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@./dist/katex.min.css" integrity="sha384-katex.min.css" crossorigin="anonymous"/>|'
|
||||
grep -l '/static/' docs/*.md | xargs sed -i.bak \
|
||||
's|/static/\([^"]\+\)|https://cdn.jsdelivr.net/npm/katex@./dist/\1" integrity="sha384-\1|'
|
||||
|
||||
# Update the version number in CDN URLs included in the README and the documentation,
|
||||
# and regenerate the Subresource Integrity hash for these files.
|
||||
|
@@ -56,7 +56,7 @@ class Footer extends React.Component {
|
||||
</a>
|
||||
<a href="https://gitter.im/Khan/KaTeX">Gitter Chat</a>
|
||||
<a
|
||||
href="http://stackoverflow.com/questions/tagged/katex"
|
||||
href="https://stackoverflow.com/questions/tagged/katex"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener">
|
||||
Stack Overflow
|
||||
|
@@ -9,8 +9,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"docusaurus": "^1.3.2",
|
||||
"fs-extra": "^7.0.0",
|
||||
"remarkable-embed": "^0.4.1"
|
||||
"fs-extra": "^7.0.0"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
|
@@ -12,8 +12,8 @@
|
||||
<meta name="Description" content="KaTeX – The fastest math typesetting library for the web">
|
||||
<meta property="og:title" content="KaTeX – The fastest math typesetting library for the web">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="http://khan.github.io/KaTeX/">
|
||||
<meta property="og:image" content="http://khan.github.io/KaTeX/og_logo.png">
|
||||
<meta property="og:url" content="https://katex.org/">
|
||||
<meta property="og:image" content="https://katex.org/img/og_logo.png">
|
||||
<meta property="og:description" content="Simple API, no dependencies – yet super-fast on all major browsers.">
|
||||
|
||||
<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0-rc.1/dist/fonts/KaTeX_Main-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
||||
|
@@ -8,18 +8,6 @@
|
||||
// See https://docusaurus.io/docs/site-config.html for all the possible
|
||||
// site configuration options.
|
||||
|
||||
// If BASE_URL environment variable is set, use it as baseUrl.
|
||||
// If on netlify, use '/'. Otherwise use '/KaTeX/'.
|
||||
const baseUrl = process.env.BASE_URL || (process.env.CONTEXT ? '/' : '/KaTeX/');
|
||||
|
||||
// Plugin for Remarkable to inject variables
|
||||
const {Plugin: Embed} = require('remarkable-embed');
|
||||
const embed = new Embed();
|
||||
|
||||
// {@stylesheet: path}
|
||||
embed.register('stylesheet',
|
||||
path => `<link rel="stylesheet" href="${baseUrl}static/${path}"/>`);
|
||||
|
||||
/* List of projects/orgs using your project for the users page */
|
||||
const users = [
|
||||
{
|
||||
@@ -49,7 +37,7 @@ const users = [
|
||||
},
|
||||
{
|
||||
caption: 'Expii',
|
||||
image: baseUrl + 'img/expii_logo.png',
|
||||
image: '/img/expii_logo.png',
|
||||
infoLink: 'https://www.expii.com/',
|
||||
},
|
||||
{
|
||||
@@ -69,7 +57,7 @@ const users = [
|
||||
},
|
||||
{
|
||||
caption: 'Gradescope',
|
||||
image: baseUrl + 'img/gradescope_logo.png',
|
||||
image: '/img/gradescope_logo.png',
|
||||
infoLink: 'https://www.gradescope.com/',
|
||||
},
|
||||
{
|
||||
@@ -132,15 +120,15 @@ const users = [
|
||||
const siteConfig = {
|
||||
title: 'KaTeX',
|
||||
tagline: 'The fastest math typesetting library for the web',
|
||||
url: 'https://khan.github.io',
|
||||
baseUrl,
|
||||
url: 'https://katex.org',
|
||||
baseUrl: '/',
|
||||
|
||||
// Used for publishing and more
|
||||
projectName: 'KaTeX',
|
||||
organizationName: 'Khan',
|
||||
|
||||
headerLinks: [
|
||||
{href: baseUrl + '#demo', label: 'Try'},
|
||||
{href: '/#demo', label: 'Try'},
|
||||
{doc: 'node', label: 'Docs'},
|
||||
{page: 'users', label: 'Users'},
|
||||
{href: 'https://github.com/Khan/KaTeX', label: 'GitHub'},
|
||||
@@ -173,14 +161,13 @@ const siteConfig = {
|
||||
},
|
||||
|
||||
markdownPlugins: [
|
||||
embed.hook,
|
||||
require('./lib/remarkable-katex'),
|
||||
require('./lib/empty-thead'),
|
||||
],
|
||||
|
||||
scripts: [
|
||||
'https://buttons.github.io/buttons.js',
|
||||
baseUrl + 'js/scrollspy.js',
|
||||
'/js/scrollspy.js',
|
||||
],
|
||||
|
||||
separateCss: ['static/static', 'static\\static'],
|
||||
|
@@ -28,7 +28,7 @@ will appear larger than 1cm in browser units.
|
||||
|
||||
The default build of KaTeX includes each of the needed fonts in three different formats: `ttf`, `woff`, and `woff2`.
|
||||
|
||||
- `ttf`s are included to support old versions of Chrome, Safari, Firefox, etc. (Here "old" means Firefox 3.5, Chrome < 5, and Safari <= 5.1, all of which are no longer supported: see [woff](http://caniuse.com/#search=woff) vs. [ttf](http://caniuse.com/#search=ttf)).
|
||||
- `ttf`s are included to support old versions of Chrome, Safari, Firefox, etc. (Here "old" means Firefox 3.5, Chrome < 5, and Safari <= 5.1, all of which are no longer supported: see [woff](https://caniuse.com/#search=woff) vs. [ttf](https://caniuse.com/#search=ttf)).
|
||||
- `woff` is the format that is most widely supported (all modern browsers support it), so it probably provides the most benefit to being included.
|
||||
- `woff2`s are included for very new versions of Chrome, because they are much smaller and faster to load.
|
||||
|
||||
|
@@ -447,7 +447,7 @@ table td {
|
||||
|\hookleftarrow|$\hookleftarrow$||
|
||||
|\hookrightarrow|$\hookrightarrow$||
|
||||
|\hphantom|$a\hphantom{bc}d$|`a\hphantom{bc}d`|
|
||||
|\href|$\href{https://khan.github.io/KaTeX/}{\KaTeX}$|`\href{https://khan.github.io/KaTeX/}{\KaTeX}`|
|
||||
|\href|$\href{https://katex.org/}{\KaTeX}$|`\href{https://katex.org/}{\KaTeX}`|
|
||||
|\hskip|$w\hskip1em i\hskip2em d$|`w\hskip1em i\hskip2em d`|
|
||||
|\hslash|$\hslash$||
|
||||
|\hspace|$s\hspace7ex k$|`s\hspace7ex k`|
|
||||
@@ -1079,7 +1079,7 @@ table td {
|
||||
|\upsilon|$\upsilon$||
|
||||
|\upuparrows|$\upuparrows$||
|
||||
|\urcorner|$\urcorner$||
|
||||
|\url|$\footnotesize\url{https://khan.github.io/KaTeX/}$|`\url{https://khan.github.io/KaTeX/}`|
|
||||
|\url|$\footnotesize\url{https://katex.org/}$|`\url{https://katex.org/}`|
|
||||
|\utilde|$\utilde{AB}$|`\utilde{AB}`|
|
||||
|
||||
## V
|
||||
|
@@ -107,8 +107,8 @@ The `{array}` environment does not yet support `\cline` or `\multicolumn`.
|
||||
|
||||
|||
|
||||
|:----------------|:-------------------|
|
||||
| $\href{https://khan.github.io/KaTeX/}{\KaTeX}$ | `\href{https://khan.github.io/KaTeX/}{\KaTeX}` |
|
||||
| $\url{https://khan.github.io/KaTeX/}$ | `\url{https://khan.github.io/KaTeX/}` |
|
||||
| $\href{https://katex.org/}{\KaTeX}$ | `\href{https://katex.org/}{\KaTeX}` |
|
||||
| $\url{https://katex.org/}$ | `\url{https://katex.org/}` |
|
||||
|
||||
## Letters and Unicode
|
||||
|
||||
|
Reference in New Issue
Block a user