uwdata / living-papers

Authoring tools for scholarly communication. Create interactive web pages or formal research papers from markdown source.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LaTeX doesn't like image URLs with spaces

joshuahhh opened this issue · comments

on account of the percent symbols, I reckon!

I was able to hack a solution to this on top of my #34 hack:

async function rewriteImagePaths(ast) {
  visitNodes(ast, node => {
    if (node.name === 'image') {
      setValueProperty(node, 'src', '../../' + getPropertyValue(node, 'src').replace(/%20/g, ' '));
    }
  });
  return ast;
}