Coder Social home page Coder Social logo

expikr / mdbook_katex_static_css Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sichanghe/mdbook_katex_static_css

0.0 0.0 0.0 2.09 MB

Example repository for mdbook-katex configuration with static CSS

Home Page: https://expikr.github.io/mdbook_katex_static_css/

Python 26.16% Batchfile 10.11% VBScript 63.72%

mdbook_katex_static_css's Introduction

mdbook-katex Static CSS Example

Steps in this repository using Python3

Download CSS and fonts by running the Python script download_static_css.py at the root of this repository.

Python 3.5 or higher version is required.

Depending on your system, you may need to use python or python3 for the command.

$ python3 download_static_css.py
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css to katex.min.css
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_AMS-Regular.woff2 to theme/fonts/KaTeX_AMS-Regular.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_AMS-Regular.woff to theme/fonts/KaTeX_AMS-Regular.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_AMS-Regular.ttf to theme/fonts/KaTeX_AMS-Regular.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Caligraphic-Bold.woff2 to theme/fonts/KaTeX_Caligraphic-Bold.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Caligraphic-Bold.woff to theme/fonts/KaTeX_Caligraphic-Bold.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Caligraphic-Bold.ttf to theme/fonts/KaTeX_Caligraphic-Bold.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Caligraphic-Regular.woff2 to theme/fonts/KaTeX_Caligraphic-Regular.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Caligraphic-Regular.woff to theme/fonts/KaTeX_Caligraphic-Regular.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Caligraphic-Regular.ttf to theme/fonts/KaTeX_Caligraphic-Regular.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Fraktur-Bold.woff2 to theme/fonts/KaTeX_Fraktur-Bold.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Fraktur-Bold.woff to theme/fonts/KaTeX_Fraktur-Bold.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Fraktur-Bold.ttf to theme/fonts/KaTeX_Fraktur-Bold.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Fraktur-Regular.woff2 to theme/fonts/KaTeX_Fraktur-Regular.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Fraktur-Regular.woff to theme/fonts/KaTeX_Fraktur-Regular.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Fraktur-Regular.ttf to theme/fonts/KaTeX_Fraktur-Regular.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Main-Bold.woff2 to theme/fonts/KaTeX_Main-Bold.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Main-Bold.woff to theme/fonts/KaTeX_Main-Bold.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Main-Bold.ttf to theme/fonts/KaTeX_Main-Bold.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Main-BoldItalic.woff2 to theme/fonts/KaTeX_Main-BoldItalic.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Main-BoldItalic.woff to theme/fonts/KaTeX_Main-BoldItalic.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Main-BoldItalic.ttf to theme/fonts/KaTeX_Main-BoldItalic.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Main-Italic.woff2 to theme/fonts/KaTeX_Main-Italic.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Main-Italic.woff to theme/fonts/KaTeX_Main-Italic.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Main-Italic.ttf to theme/fonts/KaTeX_Main-Italic.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Main-Regular.woff2 to theme/fonts/KaTeX_Main-Regular.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Main-Regular.woff to theme/fonts/KaTeX_Main-Regular.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Main-Regular.ttf to theme/fonts/KaTeX_Main-Regular.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Math-BoldItalic.woff2 to theme/fonts/KaTeX_Math-BoldItalic.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Math-BoldItalic.woff to theme/fonts/KaTeX_Math-BoldItalic.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Math-BoldItalic.ttf to theme/fonts/KaTeX_Math-BoldItalic.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Math-Italic.woff2 to theme/fonts/KaTeX_Math-Italic.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Math-Italic.woff to theme/fonts/KaTeX_Math-Italic.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Math-Italic.ttf to theme/fonts/KaTeX_Math-Italic.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_SansSerif-Bold.woff2 to theme/fonts/KaTeX_SansSerif-Bold.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_SansSerif-Bold.woff to theme/fonts/KaTeX_SansSerif-Bold.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_SansSerif-Bold.ttf to theme/fonts/KaTeX_SansSerif-Bold.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_SansSerif-Italic.woff2 to theme/fonts/KaTeX_SansSerif-Italic.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_SansSerif-Italic.woff to theme/fonts/KaTeX_SansSerif-Italic.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_SansSerif-Italic.ttf to theme/fonts/KaTeX_SansSerif-Italic.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_SansSerif-Regular.woff2 to theme/fonts/KaTeX_SansSerif-Regular.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_SansSerif-Regular.woff to theme/fonts/KaTeX_SansSerif-Regular.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_SansSerif-Regular.ttf to theme/fonts/KaTeX_SansSerif-Regular.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Script-Regular.woff2 to theme/fonts/KaTeX_Script-Regular.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Script-Regular.woff to theme/fonts/KaTeX_Script-Regular.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Script-Regular.ttf to theme/fonts/KaTeX_Script-Regular.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Size1-Regular.woff2 to theme/fonts/KaTeX_Size1-Regular.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Size1-Regular.woff to theme/fonts/KaTeX_Size1-Regular.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Size1-Regular.ttf to theme/fonts/KaTeX_Size1-Regular.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Size2-Regular.woff2 to theme/fonts/KaTeX_Size2-Regular.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Size2-Regular.woff to theme/fonts/KaTeX_Size2-Regular.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Size2-Regular.ttf to theme/fonts/KaTeX_Size2-Regular.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Size3-Regular.woff2 to theme/fonts/KaTeX_Size3-Regular.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Size3-Regular.woff to theme/fonts/KaTeX_Size3-Regular.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Size3-Regular.ttf to theme/fonts/KaTeX_Size3-Regular.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Size4-Regular.woff2 to theme/fonts/KaTeX_Size4-Regular.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Size4-Regular.woff to theme/fonts/KaTeX_Size4-Regular.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Size4-Regular.ttf to theme/fonts/KaTeX_Size4-Regular.ttf
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Typewriter-Regular.woff2 to theme/fonts/KaTeX_Typewriter-Regular.woff2
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Typewriter-Regular.woff to theme/fonts/KaTeX_Typewriter-Regular.woff
Downloading from https://cdn.jsdelivr.net/npm/[email protected]/dist/fonts/KaTeX_Typewriter-Regular.ttf to theme/fonts/KaTeX_Typewriter-Regular.ttf

Build the book using mdbook build.

Steps for your repository using Python3

  1. Copy download_static_css.py in this repository to the root of your mdBook project.

  2. Run the above script using Python 3.5 or a higher version to download the CSS and fonts.

  3. Include katex.min.css as additional CSS in book.toml:

    [output.html]
    #
    additional-css = ["katex.min.css"]
  4. (Optional) ignore the KaTeX CSS and fonts in .gitignore:

    katex.min.css
    theme/fonts/KaTeX_*.*
  5. (Optional) Set up GitHub CI and GitHub Pages.

    • Check out .github/workflows/deploy.yml for a working example.
    • To enable Git pushes in CI, go to Settings > Code and automation > Actions > General > Workflow permissions, choose Read and write permissions, and save.
    • To enable GitHub Pages, go to Settings > Code and automation > Pages.

Solution using a Rust executable

Replace the first two steps in Steps for your repository using Python3 with:

  1. Install mdbook_katex_css_download.
  2. Run the above executable at the root of your mdBook project.

Windows setup using VBScript

  1. Clone the repository on Windows
  2. Run build.vbs to build the book. It downloads these automatically if they are not present:
    • The mdbook and mdbook-katex binary executables.
    • KaTeX CSS and fonts.

mdbook_katex_static_css's People

Contributors

expikr avatar sichanghe avatar

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.