File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ 'use babel'
2
+
3
+ // this file is lazy loaded by dynamic import simulation
4
+
5
+ import { renderToString } from 'katex'
6
+
7
+ export function texify ( input , block ) {
8
+ try {
9
+ return renderToString ( input , { throwOnError : false , displayMode : block } )
10
+ } catch ( e ) {
11
+ return input
12
+ }
13
+ }
Original file line number Diff line number Diff line change 1
1
var fs = require ( 'fs' )
2
+ var replace = require ( 'replace-in-file' )
2
3
3
4
function copyKeymaps ( ) {
4
5
let suffix = process . platform === 'darwin' ? '.cmd' : '.ctrl'
5
6
fs . copyFileSync ( __dirname + '/../keymaps/julia-client.cson' + suffix , __dirname + '/../keymaps/julia-client.cson' )
6
7
}
7
8
9
+ function installKaTeX ( ) {
10
+ fs . copyFileSync ( __dirname + '/../node_modules/katex/dist/fonts' , __dirname + '/../styles/fonts' )
11
+ fs . copyFileSync ( __dirname + '/../node_modules/katex/dist/katex.css' , __dirname + '/../styles/katex.css' )
12
+
13
+ replace . sync ( {
14
+ files : __dirname + '/../styles/katex.css' ,
15
+ from : / u r l \( f o n t s / g,
16
+ to : 'url(atom:\/\/ink\/styles\/fonts'
17
+ } )
18
+ }
19
+
8
20
copyKeymaps ( )
You can’t perform that action at this time.
0 commit comments