Skip to main content

3 posts tagged with "markdown"

View All Tags

· One min read

center tables in a markdown file

<div align="center">

| Descriptoion | struct passwd member | POSIX.1 | FreeBSD 8.0 | Linux 32.0 | Mac OS X 10.6.8 | Solaris |
|:-----------------------------|:---------------------|:---------:|:-----------:|:----------:|:---------------:|:---------:|
| user name | char *pw_name | $\bullet$ | $\bullet$ | $\bullet$ | $\bullet$ | $\bullet$ |

_Figure 6.1 Fields in `/etc/passwd` file_
</div>

· One min read

Math Equations

  • import tha plugins in docusaurus.config.js
const math = require('remark-math');
const katex = require('rehype-katex');
remarkPlugins: [math],
rehypePlugins: [katex],

under stylesheets

stylesheets: [
{
href: 'https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css',
type: 'text/css',
integrity:
'sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM',
crossorigin: 'anonymous',
},
],
  • install modules
$ npm install --save remark-math@3 rehype-katex@5 hast-util-is-element@1.1.0