-
Couldn't load subscription status.
- Fork 2
Extract CSS from your local Typora installation
Pegasis edited this page Oct 15, 2021
·
2 revisions
Directly use the CSS from the Typora themes folder won't work because Typora does additional processing on top of that file and dynamically adds css related to code highlighting and LaTeX.
Distributing CSS from Typora with an open source package is probably not a very good idea.
Hence this guide:
- Create a new document using Typora.
- Include one fenced code block and one inline math using the following markdown:
``` c ``` $\lambda$ - Click on File > Export > HTML
- Open the exported html file
- Find the first line starting with
<linkor<style, in this example, line 6 starts with<link, remember this place.
- Find the last
</style>before<title>, usually at the very bottom of the file.
- Copy everything in between. (including leading
<linkand trailing</style>) - Paste it to a new file, in this example, we will name it
tags.txt. - Use it with command line flag
-g tags.txtor RenderOptionsextraHeadTags: tagsto get that Typora style in your export!