[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Styling HTML output
From: |
Ken.Williams |
Subject: |
[O] Styling HTML output |
Date: |
Thu, 25 Aug 2011 18:57:39 +0000 |
User-agent: |
Microsoft-MacOutlook/14.12.0.110505 |
I wanted to share some CSS code that I've found useful for exported HTML
documents. It adds a little "R" or "sh" or "Perl" (etc.) label to the top of a
source block.
(setq org-export-html-style
"<style type=\"text/css\">
<!--/*--><![CDATA[/*><!--*/
.src { background-color: #F5FFF5; position: relative;
overflow: visible; }
.src:before { position: absolute; top: -15px; background: #ffffff;
padding: 1px; border: 1px solid #000000; font-size: small; }
.src-sh:before { content: 'sh'; }
.src-bash:before { content: 'sh'; }
.src-R:before { content: 'R'; }
.src-perl:before { content: 'Perl'; }
.src-sql:before { content: 'SQL'; }
.example { background-color: #FFF5F5; }
/*]]>*/-->
</style>")
I got help on Stack Overflow to figure that out:
http://stackoverflow.com/questions/7192054/create-box-with-title-legend-in-css .
I stick that in my .emacs file and I get output with nice little labels.
Hopefully someone else will find it useful too.
--
Ken Williams
Senior Research Scientist
Thomson Reuters
http://labs.thomsonreuters.com
- [O] Styling HTML output,
Ken.Williams <=
Re: [O] Styling HTML output, Eric S Fraga, 2011/08/26