Skip to content
Discussion options

You must be logged in to vote

Hello folks,
So I figured out a method which is somewhat hacky but it works and I figured I might as well post about it.
My implementation: first of all there's a directory within which lua extension sits. I also installed Katex in this folder using npm install katex --prefix ./my-lua-filter which I'll be using. The Lua script I'm using goes as:

have_math = false

function Math(elem)
   have_math = true

   local katex_args = ""
   if elem.mathtype == 'DisplayMath' then
      katex_args= katex_args.."true"
   end

   local command = 'node ./latex/latex.js "' ..(elem.text)..'" '..katex_args
   local handle = io.popen(command)
   local result = handle:read("*a")
   handle:close()
   return …

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@N1N74
Comment options

@mcanouil
Comment options

@cderv
Comment options

@N1N74
Comment options

@cscheid
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by N1N74
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
math any issue related to math support in specific formats
4 participants