Giter VIP home page Giter VIP logo

Comments (4)

ajtaylor avatar ajtaylor commented on September 6, 2024 1

Yes, that worked!
Thank you very much for your (v quick) help, and also for HyperMD.

from hypermd.

laobubu avatar laobubu commented on September 6, 2024

Hello. Just tested this code with Parcel and everything works well.

If you are using webpack, make sure that file-loader is configured properly so that KaTeX can load its font files (the files' suffix can be .woff, .woff2 or .ttf)

image

from hypermd.

ajtaylor avatar ajtaylor commented on September 6, 2024

Thanks for the quick response.

I've added the webpack file-loader with a test for .woff, .woff2 and .ttf, but no luck.

The webpack build didn't error before I added the test for the font files, so I don't think it's trying to include any fonts.

Although I've got the import for the KaTeX powerpack, there is nowhere in my code where I actually reference it, so I'm guessing the build won't actually include it. Also, the webpack output doesn't show any fonts being included.

from hypermd.

laobubu avatar laobubu commented on September 6, 2024

Maybe webpack optimized and removed the imported powerpack because of no reference. Try:

-import * as katex from 'hypermd/powerpack/fold-math-with-katex';
+import 'hypermd/powerpack/fold-math-with-katex';

from hypermd.

Related Issues (20)

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.