Emacs Org mode CSS for HTML export
A CSS file for Emacs Org mode HTML export that provides an easy to read style suitable for smaller documents.
I've come to use Org mode for much of my work related planning and tracking progress on tasks. I also write longer emails in Org mode as I think it's easier to create a decent structure. The Org mode HTML export is a convenient way to share such documents with less blessed individuals (non Org users).
See https://johan-bolmsjo.github.io/org_css/README.html for how this document is rendered as HTML.
CSS Usage
Three CSS files are contained in this repository. Files named main contains non font related layout. Files named font attempts to use fonts hosted on my domain. Finally, files named full contains the previously mentioned files concatenated.
Versions of the CSS files named optimized has been run through the yui-compressor
to reduce their size.
Files with a .css.el
post-fix are meant to be loaded either from an org-publish file or from init.el
to embed CSS into exported HTML files.
See how this is done in ./org-publish.el
.
The org-publish file disables many export elements.
I like the default to be usable for small documents where these elements are excessive.
They can be enabled selectively by tweaking an Org file's #+options:
line.
See https://orgmode.org/manual/Export-Settings.html for details.
Export an Org file to HTML with the command M-x org-html-export-to-html
.
CSS Modifications
Edit the CSS files according to taste.
Build using the Makefile
.
The YUI Compressor program is used to compress the CSS to reduce their size.
Example (Debian based Linux):
sudo apt-get install yui-compressor make
Licensing Terms
This work is a derivative of https://github.com/gongzhitaao/orgcss.
The license files LICENSE.MIT and LICENSE.996ICU applies to files org-*.css
and org-*.css.el
.
The license file LICENSE.MIT applies to the remaining sources in the root directory of this source distribution.
Fonts
The license file fonts/Lora/OFL.txt describes the terms under which the font Lora is distributed.
The license file fonts/Inconsolata/OFL.txt describes the terms under which the font Inconsolata is distributed.
Style Demonstration
A style demonstration of typographical elements not already employed by this document.
Block Quotes
At 19.00 hours, ship's time, I made my way to the launching bay. The men around the shaft stood aside to let me pass, and I climbed down into the capsule. – Opening of the book Solaris by Stanislaw Lem
Lists
Bullet List [2/3]
[X]
Wash the car[ ]
Buy groceries- Milk
- Bread
- Bananas
[X]
Feed the dog
Numbered List
- Dogs
- Akita
- Beagle
- Cats
- Bengal
Definition List
- GNU
- GNU's Not Unix
- Unix
- Multitasking, multi-user operating system. Conceived at Bell Labs research center by Ken Thompson, Dennis Ritchie, and others in the 1970s.
- Linux
- Popular Unix like operating system kernel.
Tables
Grocery | kcal | Carbs (g) | Protein (g) | Fat (g) |
---|---|---|---|---|
Banana | 95 | 21.3 | 1.1 | 0.1 |
Milk (3%) | 60 | 4.7 | 3.5 | 3 |
Pasta | 360 | 71.9 | 12.5 | 1.2 |