emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* More decoration for babel output
@ 2013-01-23 16:26 Ken Williams
  2013-01-23 17:25 ` Gunnar Wolf
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ken Williams @ 2013-01-23 16:26 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 884 bytes --]

Hi all,

When exporting to HTML I always add some extra CSS to my org-mode config, for the purpose of identifying which chunks are input vs. output, and for identifying the language of the code in code chunks.  Language is identified by a little label on the box, and input/output is identified by green/red.

Would this be helpful to include by default?  Patch attached.

--
Ken Williams, Senior Research Scientist
WindLogics
http://windlogics.com


________________________________

CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of any kind is strictly prohibited. If you are not the intended recipient, please contact the sender via reply e-mail and destroy all copies of the original message. Thank you.

[-- Attachment #2: 0001-Add-background-color-and-language-label-to-CSS-for-bab.txt --]
[-- Type: text/plain, Size: 1384 bytes --]

From 37ba52c7911b88c6879179311571654ded0273dd Mon Sep 17 00:00:00 2001
From: Ken Williams <Ken.Williams@WindLogics.com>
Date: Wed, 23 Jan 2013 10:14:50 -0600
Subject: [PATCH 1/1] Add background color and language-label to CSS for babel
 blocks.

---
 lisp/org-html.el |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/lisp/org-html.el b/lisp/org-html.el
index 224a103..5e34385 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -170,6 +170,30 @@ for the JavaScript code in this tag.
         font-size: 90%;
         overflow:auto;
   }
+
+  /* Some decoration for source code blocks and their output. */
+  pre.src {
+    background-color: #F5FFF5;
+    position: relative;
+    overflow: visible;
+    margin-right: auto;
+  }
+  pre.src:before {
+    position: absolute;
+    top: -15px;
+    background: #ffffff;
+    padding: 1px;
+    border: 1px solid #000000;
+    font-size: small;
+  }
+  pre.src-sh:before   { content: 'sh'; }
+  pre.src-bash:before { content: 'sh'; }
+  pre.src-R:before    { content: 'R'; }
+  pre.src-perl:before { content: 'Perl'; }
+  pre.src-java:before { content: 'Java'; }
+  pre.src-sql:before  { content: 'SQL'; }
+  pre.example         { background-color: #FFF5F5; }
+
   table { border-collapse: collapse; }
   td, th { vertical-align: top;  }
   th.right  { text-align:center;  }
-- 
1.7.9


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

end of thread, other threads:[~2013-03-06  8:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-23 16:26 More decoration for babel output Ken Williams
2013-01-23 17:25 ` Gunnar Wolf
2013-01-24 17:05   ` Gunnar Wolf
2013-01-24 11:52 ` Bastien
2013-03-06  8:29 ` Bastien

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