Appearance
Installation
Install the package from NPM:
BASH
yarn add mafs-vue
# or, if using NPM
npm install --save mafs-vue
And then make sure to load the stylesheet.
Code
vue
<script setup lang="ts">
import { Mafs, Cartesian } from 'mafs-vue'
</script>
<template>
<Mafs :height="300">
<Cartesian/>
</Mafs>
</template>
Fancy math font
The font in use on this site (Computer Modern Serif) can be used with Mafs by importing mafs-vue/font.css
. It will import the appropriate font files and set Mafs' font-family.
CSS
@import "mafs-vue/core.css";
@import "mafs-vue/font.css";
Computer Modern looks great, but it comes at a cost: using it will add about 220kB to your page load.