mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 11:18:39 +00:00
* copy-tex contrib module * Factor out replacement code * Fix lint * Support for more browsers, in particular Firefox * Use for loop instead of Array.forEach * Use replaceChild if replaceWith is unavailable * Browserify to remove let etc. * Fix HTML handling, in particular for Edge * Convert DocumentFragment to HTML directly (via children' outerHTML) * Set HTML content *before* text content; Edge takes the last only * Handle .katex-html and .katex-mathml separately * Implement option 2: CSS user-select: all Also fix auto-render.js build location * Revise documentation according to @kevinbarabash's comments * Split copy-tex.js into it + katex2tex.js This supports re-use of code in a custom copy handler. * Document custom copy handler * Add missing file
16 lines
491 B
Makefile
16 lines
491 B
Makefile
.PHONY: build
|
|
|
|
build: $(BUILDDIR)/contrib/copy-tex.min.js $(BUILDDIR)/contrib/copy-tex.css $(BUILDDIR)/contrib/copy-tex.min.css
|
|
|
|
$(BUILDDIR)/contrib/copy-tex.min.js: $(BUILDDIR)/contrib/copy-tex.js
|
|
$(UGLIFYJS) < $< > $@
|
|
|
|
$(BUILDDIR)/contrib/copy-tex.js: copy-tex.js
|
|
$(BROWSERIFY) -t [ babelify ] $< --standalone renderMathInElement > $@
|
|
|
|
$(BUILDDIR)/contrib/copy-tex.css: copy-tex.css
|
|
cp $< $@
|
|
|
|
$(BUILDDIR)/contrib/copy-tex.min.css: $(BUILDDIR)/contrib/copy-tex.css
|
|
$(CLEANCSS) -o $@ $<
|