Giter Site home page Giter Site logo

just-latex's People

Contributors

ma-chengyuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

just-latex's Issues

Inline math svg viewBox is too wide

Hello,

I am trying to use just-latex to compile Markdown documents, but I run in an issue. The issue also happens when I attempt to compile the example/demo.md with default configuration, so I will use this file as demonstration. I would be happy to help troubleshoot the bug, configuration, or documentation to solve issues but I need guidance to get started.

I add that my jlconfig.toml is an exact copy of example/jlconfig.toml.

When I compile example/demo.md with

pandoc example/demo.md -o output/demo.html --filter ../just-latex/target/debug/just-latex 

the output HTML page looks like this (only an extract is shown):





instead of:



In brief, all SVG fragments are too wide, with lots of white space at the right of the math content.

I have verified that the SVG generated by just-latex is the same in the demo.html available on GitHub, and on my machine. The difference is not in the SVG but in the HTML. The HTML code to render the first part: "Let f be..." is, on GitHub:

Let
<img src="#svgView(viewBox(-71.64,-69.35,6.75,10.30))"
class="jl-dg5WvqWUUic= jl-inline" alt = "f"
style="width:6.75pt;height:10.30pt;
display:inline;top:1.00pt;margin-top:-1.00pt;position:relative;"> be

and on my machine:

Let
<img src="#svgView(viewBox(-72.00,-69.35,612.00,10.30))" 
class="jl-nCv9it5enBs= jl-inline" alt = "f"
style="width:612.00pt;height:10.30pt;"
display:inline;top:1.00pt;margin-top:-1.00pt;position:relative;"> be

The viewBox and style's width are different, too wide, on my version. In fact if I copy paste the values of GitHub on the document generated by my machine, I get the expected results in the browser.

I suspect this issue comes from synctex or usvg, but I am not familiar with either. I have compiled just-latex on commit 259d195 and jlaurens/synctex on commit 91d69b7. Can you suggests a direction I can follow to start to learn more about the origin of the problem? Many thanks,

Rémi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.