Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 03 2016 02:45
    @kevinbarabash banned @acx01b
mbarkhau
@mbarkhau
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.

/snapshot/KaTeX/cli.js:18
    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
mbarkhau
@mbarkhau
hmm, maybe I need to do something with the katex-fonts repo
$ ls -l submodules/katex-fonts/
total 0
mbarkhau
@mbarkhau
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>
    main()
  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'
mbarkhau
@mbarkhau
well, I guess I give up then ;-(
Kevin Barabash
@kevinbarabash
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
@kevinbarabash
@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.
Skyget
@Skyget3_twitter
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
mstonepc
@mstonepc
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
*auto-render
not auto-loader
Katex's auto-render ofc
Till
@tbrodbeck
Where is the 'K' in KaTeX coming from?
Tesla Ice Zhang‚Äģ
@ice1000
Is it KKSK?
Pbot64
@Pbot64
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
\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}
Ron Kok
@ronkok
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
Pbot64
@Pbot64
Thanks for the input! Unfortunately, that solution is impractical for more than a few equations + the equations themselves are no longer centered.
shaneleib
@shaneleib
image.png
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?
Pbot64
@Pbot64
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
@alexjbest
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!
stapeleliz
@stapeleliz

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

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

stapeleliz
@stapeleliz
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!
ZanderZhao
@ZanderZhao
hi
bsdshell
@bsdshell
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 :
renderMathInElement(latexElementID,
        {delimiters: [ // mind the order of delimiters(!?)
        {left: "$", right: "$", display: true},
        {left: "$", right: "$", display: false},
        {left: "\\[", right: "\\]", display: true},
        {left: "\\(", right: "\\)", display: false},
        ]}
        );
bsdshell
@bsdshell
any help would be appreciated!
[
\begin{bmatrix}
a & b \
c & d
\end{bmatrix}
]
I have no problem to display the matrix,
but add '% my comment' will be problem
lazingor
@lazingor
Heya, quick question to devs familiar with KaTeX: if one wanted to convert KaTeX output into another markup than HTML, would it be best to work from the HTML generated (with all the <span>s), or would it be better to use some other internal structure of KaTeX? If the latter, is there a good place to start looking? And for the former, is there a good place to get an overview of all the different classes and styles that KaTeX might apply?
lazingor
@lazingor
In other words, what's the best way of getting the awesome layout data from KaTeX in order to render it into custom output?
Ron Kok
@ronkok
@lazingor There another option, which is to use the KaTeX's MathML output instead of it's HTML output.
lazingor
@lazingor
If I understand correctly, that won't include positioning information? For example when it comes to aligning superscripts, subscripts, fractions etc. according to TeX's style
Ron Kok
@ronkok
Browser support for MathML is limited, for now, to Firefox and Safari. The Chromium browsers will support it later this year. So yes, if you need it now and you need positioning information, then MathML is not sufficient.
I only offer the MathML option because manipulation of the KaTeX HTML sounds like a daunting task and the KaTeX/KaTeX#376 is now over four years old.
lazingor
@lazingor
Ah, thanks for the link to that issue. That intermediate 'box model' format is exactly what I'm after, I guess. Looks like some people have made some efforts, but that it's not an easy task