                             text-align: right;
                             font-family: monospace;
                         }
+                        footer {
+                            font-size: 70%;
+                            color: #888;
+                            text-align: center;
+                        }
                     </style>
 
                     <script type="text/javascript">window.MathJax = #{misc.to_json(MathJaxConfig)};</script>
                     <script type="text/javascript" async
                         src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
                     </script>
-                    <!-- https://highlightjs.org/usage/ -->
-                    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/styles/default.min.css">
-                    <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/languages/go.min.js"></script>
-                    <script>hljs.initHighlightingOnLoad();</script>
                 </head>
 
                 <body>
                 <div class="header">
                     <h1><%= title %></h1>
+                </div>
+                <%= content %>
+                <hr size=1>
+                <div class="footer">
                     <div>generated <%= timestamp %></div>
                 </div>
-                <%= content %>
-                <div class="footer">
-                </div>
+
+                <!-- https://highlightjs.org/usage/ -->
+                <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/styles/ascetic.min.css">
+                <style>
+                .hljs {
+                    overflow-x : inherit !important;
+                    padding    : 0       !important;
+                    background : none    !important;
+                }
+                </style>
+                <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/highlight.min.js"></script>
+                <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/languages/javascript.min.js"></script>
+                <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/languages/python.min.js"></script>
+                <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/languages/r.min.js"></script>
+                <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/languages/coffeescript.min.js"></script>
+                <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/languages/matlab.min.js"></script>
+                <script>hljs.initHighlightingOnLoad();</script>
                 </body>
                 </html>"""
         return @_html_tmpl(data)

        else if mesg.stderr?
            out = "<div class='output stderr'>#{mesg.stderr}</div>"
        else if mesg.html?
            $html = $(mesg.html).wrap('<div>')
            @editor.syncdoc.process_html_output($html)
            out = "<div class='output html'>#{$html.html()}</div>"
        else if mesg.md?

            ,
            (cb) =>
                x = cm.getLine(line)
                marks = cm.findMarks({line:line, ch:0}, {line:line, ch:x.length})
                if not marks? or marks.length == 0
                    input_lines.push(x)
                else
                    input_lines_process()
