-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmathjax
75 lines (65 loc) · 3.03 KB
/
mathjax
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Seems to be a good way to present math in a web page.
Hmm.
Q: the asciimath example on http://docs.mathjax.org/en/latest/start.html
works, but when I download it to a file it doesn't work.
(No obvious failure, but doesn't show the math as math.)
Why?
A: replace the '../' with 'http://cdn.mathjax.org/mathjax/latest/'
and it works.
Q: how to put both text and asciimath in same document?
http://docs.mathjax.org/en/latest/start.html says it's possible
but I don't see how
A: see http://docs.mathjax.org/en/latest/configuration.html
it says you can do multiple configs with a comma,
but I didn't get that to work.
but, there is a config that covers both:
TeX-MML-AM_HTMLorMML.js
Q: which syntax should I use? tex? mathml? asciimath?
A: well...
- mathml is close to impossible to maintain
+ asciimath is easiest to maintain probably
+ tex would require minimal porting if I actually wanted
to convert it to a tex paper
- asciimath-- not sure how to align formulas?
Q: if I try to do any media-specific css sizing,
the math ends up all corrupt when printed.
so, to get good print, I have to set the font size with no media
specifier, which affects the screen in an undesirable way.
any way around this?
Q: how to align formulas using asciimath?
PA: there's a suggestion here:
https://github.com/mathjax/mathjax-docs/wiki/Expanding-asciimath-syntax
namely, use an array, something like:
{:(a,=,b),( ,=, c):}
or, use tex for this and asciimath for most other things?
Q: how to view asciimath examples?
examples on some sites such as:
http://www.wjagray.co.uk/maths/ASCIIMathTutorial.html
don't work in chrome
(I guess because they use ascimathml (not mathjax)
which produces MathML only, which chrome doesn't support, wtf?)
but they work in firefox.
I guess the real question is, why isn't chrome processing MathML?
Q: can I write a preprocessor?
A:
Well, the following says there's a way to register a function
as a preprocessor:
https://groups.google.com/forum/?fromgroups=#!topic/mathjax-users/lWmbG9FClJs
It says there's currently (might not be true any more)
no way to get my preprocessor
to run before the others, however mml2jax is the only extension
that currently loads a preprocessor so it should be safe
(DANGER-- might this change?)
Davide also suggests making it a config file
and loading it before original combined config file.
Something along these lines probably works, but I haven't got it to work yet.
Maybe just preprocess the whole document using javascript (maybe jquery)
and then run mathjax on it after that (see below).
Q: how to use mathjax
when some or all of the input
has been generated by javascript (e.g. jquery)?
This is probably just a question of delaying mathjax typesetting
until I call it explicitly.
A: From http://docs.mathjax.org/en/v1.1-latest/options/hub.html :
skipStartupTypeset: true
and call "MathJax.Hub.Typeset()" by hand later when wanted.