From: <Ken.Williams@thomsonreuters.com>
To: emacs-orgmode@gnu.org
Subject: Styling HTML output
Date: Thu, 25 Aug 2011 18:57:39 +0000 [thread overview]
Message-ID: <CA7C0550.454E4%ken.williams@thomsonreuters.com> (raw)
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
next reply other threads:[~2011-08-25 18:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-25 18:57 Ken.Williams [this message]
2011-08-25 19:06 ` Styling HTML output Jason Dunsmore
2011-08-26 9:01 ` Bastien
2011-08-26 18:47 ` Ken.Williams
2011-08-26 19:26 ` Nick Dokos
2011-08-26 22:07 ` Ken.Williams
2011-08-26 22:24 ` Bastien
2011-08-26 18:41 ` Eric S Fraga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA7C0550.454E4%ken.williams@thomsonreuters.com \
--to=ken.williams@thomsonreuters.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).