Skip to content

Commit

Permalink
[tools/makereport] Pick more delibrate fonts, less distinct code style
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoeppe committed Jun 18, 2021
1 parent 61a7101 commit af6166f
Showing 1 changed file with 26 additions and 17 deletions.
43 changes: 26 additions & 17 deletions tools/makereport
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
#! /bin/bash
paper=${1%.md}

readonly paper="${1%.md}"

(cat <<HEAD
<!DOCTYPE html><html><head><meta charset="utf-8"><style>html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
<!DOCTYPE html>
<html><head><meta charset="utf-8">
<style>
html {
font-size: 100%;
font-family: "DejaVu Serif", Georgia, Times, serif;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
body{
color:#444;
font-family:Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman',
"Hiragino Sans GB", "STXihei", "微软雅黑", serif;
font-size:12px;
line-height:1.5em;
background:#fefefe;
Expand Down Expand Up @@ -44,10 +53,10 @@ img{
max-width:100%;
}
h1,h2,h3,h4,h5,h6{
font-weight:normal;
color:#111;
line-height:1em;
h1,h2,h3,h4,h5,h6 {
font-weight:normal;
color:#111;
line-height: 135%;
}
h4,h5,h6{ font-weight: bold; }
h1{ font-size:2.5em; }
Expand All @@ -66,17 +75,16 @@ border-left: 0.5em #EEE solid;
hr { display: block; height: 2px; border: 0; border-top: 1px solid #aaa;border-bottom: 1px solid #eee; margin: 1em 0; padding: 0; }
pre , code, kbd, samp {
pre, code, kbd, samp {
font-family: "DejaVu Sans Mono", Consolas, Courier, serif;
}
kbd, samp {
color: #000;
font-family: monospace;
font-size: 0.88em;
border-radius:3px;
background-color: #F8F8F8;
border: 1px solid #CCC;
}
pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; padding: 5px 12px;}
pre code { border: 0px !important; padding: 0;}
code { padding: 0 3px 0 3px; }
b, strong { font-weight: bold; }
Expand All @@ -92,7 +100,8 @@ sub { bottom: -0.25em; }
ul, ol { margin: 1em 0; padding: 0 0 0 2em; }
ul ul, ul ol, ol ul, ol ol { margin: 0; padding: 0 0 0 1em; }
li p:last-child { margin:0 }
li { padding: 1ex 0; }
li p:last-child { margin: 0 }
dd { margin: 0 0 0 2em; }
img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; }
Expand Down Expand Up @@ -126,7 +135,7 @@ body{font-size:16px;}
}
HEAD

echo "</style><title>$(echo -n "$paper" | tr prn PRN)</title></head><body>"
echo -e "</style>\n<title>$(echo -n "${paper}" | tr prn PRN)</title>\n</head>\n<body>"

markdown "$1"
) > $paper.html
markdown "${1}"
) > "${paper}.html"

0 comments on commit af6166f

Please sign in to comment.