Trying out maths rendering via markdown.
This is an inline equation:
This is another inline expression
Area of a triangle:
This is the configuration I have to enable this:
import { defineConfig } from 'astro';import remarkMath from 'remark-math';import rehypeMathJax from 'rehype-mathjax';
export default defineConfig({ site: 'https://www.lloydatkinson.net/', markdown: { remarkPlugins: [remarkMath], }, integrations: { mdx({ rehypePlugins: [ [rehypeMathJax], ], }), },});Finally, I apply the following styling which I import into Layout.astro.
mjx-container svg { display: inline;}
.MathJax { font-size: 1.1rem; color: black;}