Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jan 03 2016 02:45
    @kevinbarabash banned @acx01b
Eric Eastwood

We updated Gitter to use the latest katex@0.10.0, gitlab-org/gitter/webapp!1308

You can test it out on Gitter next/staging, https://next.gitter.im/ (part of Gitter 19.32.0)

If you see anything wrong, feel free to create an issue, https://gitlab.com/gitlab-org/gitter/webapp/issues


Hi, I'm trying to build KaTeX and it fails.

What I did is this:

git clone git@github.com:KaTeX/KaTeX.git
cd KaTeX/
npm install
npm run build

and the build output started as follows:

$ npm run build

> katex@0.10.1-pre build /home/username/KaTeX
> yarn prestart && rimraf dist/ && mkdirp dist && cp README.md dist && rollup -c && webpack

yarn run v1.13.0
$ yarn check && node src/unicodeMake.js
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
error "@babel/generator" is wrong version: expected "7.0.0", got "7.3.0"
error "@babel/helper-function-name" is wrong version: expected "7.0.0", got "7.1.0"
error "@babel/parser" is wrong version: expected "7.0.0", got "7.3.1"

The same failure occurs when I run yarn build.

What am I doing wrong? I have node version v8.10.0, npm version 3.5.2, and yarn version 1.13.0. And current KaTeX commit is 7f778d1543fc1a9021609fa29067073658fb0d4b.

Hi, I'm trying to use auto-render with making strict option false, my onload is onload="renderMathInElement(document.body, {strict: false});", but I still got console warn like 'LaTeX-incompatible input and strict mode is set to 'warn'', wht I got this and how could I fix it?
Hi, how can I get the size of a rendered equation???
i mean the dimensions of a bounding box
Alex J Best
Hi, is there any idea when 0.10.2 will be released? KaTeX/katex-fonts#60 is pretty bad for us as safari users are being told that not equal things are actually equal! So a hotfix release with this in would be great. Thanks
hi there has anybody tried to package the katex cli using pkg ?
I'm running into some issues

This appears to work

$ pkg cli.js
> pkg@4.3.7
> Targets not specified. Assuming:
  node10-linux-x64, node10-macos-x64, node10-win-x64

but then I get

$ ./cli-linux --help
KaTeX could not import, likely because dist/katex.js is missing.
Please run 'yarn' and 'yarn build' before running
cli.js from the KaTeX repository.

    throw e;
Error: Cannot find module './'
yarn build in turn fails with this
$ yarn build
yarn run v1.15.2
$ yarn prestart && rimraf dist/ && mkdirp dist && cp README.md dist && rollup -c && webpack
$ node src/unicodeMake.js

./katex.js → dist/katex.mjs...
[!] Error: Could not resolve '../submodules/katex-fonts/fontMetricsData' from src/macros.js
Error: Could not resolve '../submodules/katex-fonts/fontMetricsData' from src/macros.js
hmm, maybe I need to do something with the katex-fonts repo
$ ls -l submodules/katex-fonts/
total 0
I followed the instructions in katex-fonts, installed texlive, perl, JSON for perl , fonttools on python2.7 and now I'm stumped at this
$ sh buildMetrics.sh
Traceback (most recent call last):
  File "./extract_tfms.py", line 114, in <module>
  File "./extract_tfms.py", line 72, in main
    font_path = find_font_path(font_name)
  File "./extract_tfms.py", line 17, in find_font_path
    raise RuntimeError("Couldn't find font metrics: '%s'" % font_name)
RuntimeError: Couldn't find font metrics: 'rsfs10.tfm'
well, I guess I give up then ;-(
Kevin Barabash
I've just published 0.10.2. Please file issues in https://github.com/KaTeX/KaTeX/issues if you see any problems with the release.
@MadLittleMods thanks for upgrading KaTeX in gitter. 🙂
Kevin Barabash
@deadmorous wasn't able to reproduce the error you're seeing with the steps you posted. Maybe try using yarn instead npm.
@mbarkhau I'm not familiar with pkg. You might try changing the require("./") to require("./katex.js") or the path to the built files if that makes more sense for your purposes. To fix the issue with submodules see https://github.com/KaTeX/KaTeX/blob/master/CONTRIBUTING.md#working-with-submodules.
Hi I need help on katex plugin
I want to implement in my application
here we need to implement in ckeditor
requirement is math equations, special characters, , images and text
actually we have implemented this, to execute this, we are using $ symbol before and after equations
we need without $ symbol
Hello folks
I am having the battle of my life trying to get auto-loader to work properly in my ember app
I'm wondering if anyone here's whether familiar w/ ember or not can help shed the light on what's going on
not auto-loader
Katex's auto-render ofc
Where is the 'K' in KaTeX coming from?
Tesla I. Zhang‮
Is it KKSK?
I'm stuck.
I need aligned equations with regular text in between. The closest I can get is Combine like terms10=yNow add 3 to both sides and then do something else3+10=y+3\begin{aligned} \text{Combine like terms} \\ 10 & = y \\ \text{Now add 3 to both sides and then do something else} \\ 3 + 10 & = y + 3 \end{aligned}
But, I can't get the text to align to the left. \shortintertext works regularly, but not with Katex cause it's automatically in math mode. If anyone can help it would be awesome!
Uncompiled it's
\text{Combine like terms} \
10 & = y\
\text{Now add 3 to both sides and then do something else} \
3 + 10 & = y + 3
Ron Kok
How about:
\text{Combine like terms} \
\hphantom{3 + \vphantom{x}}10 = y\
\text{Now add 3 to both sides and then do something else} \
3 + 10 = y + 3
Thanks for the input! Unfortunately, that solution is impractical for more than a few equations + the equations themselves are no longer centered.
i'm an actuary (and katex newby) and am interested in being able to use katex for actuarial symbols (see above). i don't see native support in katex, but found this library: https://ctan.org/pkg/actuarialangle which can do it. is there a way to have this library loaded into katex?
Hey Shaneleib, Katex is pretty limited when it comes to adding your own latex packages/symbols. My understanding is that you can't use a symbol unless it's explicitly supported: https://katex.org/docs/supported.html
Alex J Best
Hi, at LMFDB we have a few pages with incredibly large math strings, such as http://beta.lmfdb.org/NumberField/47.47.6807739517051283990370106856968124192474229146184900948675688481754810058334971205734548194436392534997735758198660848138706901604387352879006731328411841.1 on these large strings KaTeX does not run, I was wondering if anyone knew the mechanism by this fails, and any way I could convince KaTeX to try really hard here or whatever? thank!

@tbrodbeck : "Where is the 'K' in KaTeX coming from?"

I believe the "K" stands for "Khan Academy".

Is there any "for dummies" guide to KaTeX, starting with "here is where you put the stylesheet call" and extending through "here is how to enter an expression within, say, a paragraph (as a span); or on its own line (as a div)", including what is meant by "element" in "katex.render("c = \pm\sqrt{a^2 + b^2}", element, {throwOnError: false});" and whether a third argument (here, the "throwOnError" portion) is required? Thank you!
Hi, I try to use % to comment out Katex code, it seems to it does not work. Do I need to config somewhere to use '%' as comment like Latex?
my current renderMathInElement is :
        {delimiters: [ // mind the order of delimiters(!?)
        {left: "$", right: "$", display: true},
        {left: "$", right: "$", display: false},
        {left: "\\[", right: "\\]", display: true},
        {left: "\\(", right: "\\)", display: false},
any help would be appreciated!
a & b \
c & d
I have no problem to display the matrix,