emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Styling HTML output
@ 2011-08-25 18:57 Ken.Williams
  2011-08-25 19:06 ` Jason Dunsmore
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ken.Williams @ 2011-08-25 18:57 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-08-26 22:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-25 18:57 Styling HTML output Ken.Williams
2011-08-25 19:06 ` 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

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).