Emacs app for exporting syntax-highlighted buffers to html files. This post is about how to install it.
1. In the
Bash terminal, get
htmlize by the following command:
sudo apt-get install elpa-htmlize
2.0 Change the value of the variable
inline-css by the following steps:
Emacs, run the function
describe-variable by the hotkey:
2.2 When you are asked to describe variable, type
2.3 Click “
2.4 Click “
2.5 Select “
2.6 Click “
Apply and Save“.
3.1 Then whenever you want to turn the
Emacs buffer into html, run the command
The buffer will show the generated html code.
3.2 Save the buffer as an html file. The html code itself will get syntax-highlighted.
4.1 In the output html file, delete everything before
<body style="color: #333333; background-color: #FFFFFF;">
4.2 Then replace these 2 lines
<body style="color: #333333; background-color: #FFFFFF;"> <pre>
<pre style="color: #333333;background-color: #FFFFFF">
4.3 Delete everything after
— Me@2023-01-15 03:39:29 PM
2023.01.22 Sunday (c) All rights reserved by ACHK
You must be logged in to post a comment.