aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-03-04 23:16:42 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-03-04 23:16:42 +0100
commit14b8aa8c93766f98a6e0bc9ff04f14962a888f4f (patch)
tree98515c489e303b4613520f4ff84963031d611f95
parent0517cf0bc0db5e5b94c86f2dddc1fbc279632b2c (diff)
downloadpandoc-14b8aa8c93766f98a6e0bc9ff04f14962a888f4f.tar.gz
Regularized CSS in html/epub/html slide templates.
All templates now include `code{white-space: pre-wrap}` and CSS for `q` if `--html-q-tags` is used. Previously some templates had `pre` and others `pre-wrap`; the `q` styles were only sometimes included. See #3485.
-rw-r--r--data/templates/default.dzslides7
-rw-r--r--data/templates/default.epub28
-rw-r--r--data/templates/default.epub39
-rw-r--r--data/templates/default.html47
-rw-r--r--data/templates/default.html57
-rw-r--r--data/templates/default.revealjs7
-rw-r--r--data/templates/default.s511
-rw-r--r--data/templates/default.slideous7
-rw-r--r--data/templates/default.slidy7
-rw-r--r--test/lhs-test.html5
-rw-r--r--test/lhs-test.html+lhs5
-rw-r--r--test/s5-basic.html5
-rw-r--r--test/s5-fancy.html5
-rw-r--r--test/s5-inserts.html5
-rw-r--r--test/writer.html45
-rw-r--r--test/writer.html55
16 files changed, 77 insertions, 28 deletions
diff --git a/data/templates/default.dzslides b/data/templates/default.dzslides
index cad4dba4b..ef4f03c8d 100644
--- a/data/templates/default.dzslides
+++ b/data/templates/default.dzslides
@@ -12,10 +12,13 @@ $if(keywords)$
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$">
$endif$
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
- <style type="text/css">code{white-space: pre-wrap;} .smallcaps{font-variant: small-caps;}</style>
+ <style type="text/css">
+ code{white-space: pre-wrap;}
+ .smallcaps{font-variant: small-caps;}
$if(quotes)$
- <style type="text/css">q { quotes: "“" "”" "‘" "’"; }</style>
+ q { quotes: "“" "”" "‘" "’"; }
$endif$
+ </style>
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
diff --git a/data/templates/default.epub2 b/data/templates/default.epub2
index d5bb67fdb..e57b42004 100644
--- a/data/templates/default.epub2
+++ b/data/templates/default.epub2
@@ -6,7 +6,13 @@
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title>$pagetitle$</title>
- <style type="text/css">.smallcaps{font-variant: small-caps;}</style>
+ <style type="text/css">
+ code{white-space: pre-wrap;}
+ .smallcaps{font-variant: small-caps;}
+$if(quotes)$
+ q { quotes: "“" "”" "‘" "’"; }
+$endif$
+ </style>
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
diff --git a/data/templates/default.epub3 b/data/templates/default.epub3
index 5c5b0307a..7fcbf1928 100644
--- a/data/templates/default.epub3
+++ b/data/templates/default.epub3
@@ -5,12 +5,13 @@
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<title>$pagetitle$</title>
- <style type="text/css">.smallcaps{font-variant: small-caps;}</style>
-$if(quotes)$
<style type="text/css">
- q { quotes: "“" "”" "‘" "’"; }
- </style>
+ code{white-space: pre-wrap;}
+ .smallcaps{font-variant: small-caps;}
+$if(quotes)$
+ q { quotes: "“" "”" "‘" "’"; }
$endif$
+ </style>
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
diff --git a/data/templates/default.html4 b/data/templates/default.html4
index 7081c0bd1..8f422cf5f 100644
--- a/data/templates/default.html4
+++ b/data/templates/default.html4
@@ -14,10 +14,13 @@ $if(keywords)$
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
$endif$
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
- <style type="text/css">code{white-space: pre;} .smallcaps{font-variant: small-caps;}</style>
+ <style type="text/css">
+ code{white-space: pre-wrap;}
+ .smallcaps{font-variant: small-caps;}
$if(quotes)$
- <style type="text/css">q { quotes: "“" "”" "‘" "’"; }</style>
+ q { quotes: "“" "”" "‘" "’"; }
$endif$
+ </style>
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
diff --git a/data/templates/default.html5 b/data/templates/default.html5
index ee7ae771b..633764b3c 100644
--- a/data/templates/default.html5
+++ b/data/templates/default.html5
@@ -14,10 +14,13 @@ $if(keywords)$
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
$endif$
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
- <style type="text/css">code{white-space: pre;} .smallcaps{font-variant: small-caps;}</style>
+ <style type="text/css">
+ code{white-space: pre-wrap;}
+ .smallcaps{font-variant: small-caps;}
$if(quotes)$
- <style type="text/css">q { quotes: "“" "”" "‘" "’"; }</style>
+ q { quotes: "“" "”" "‘" "’"; }
$endif$
+ </style>
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
diff --git a/data/templates/default.revealjs b/data/templates/default.revealjs
index d5a85737e..92d81e3f1 100644
--- a/data/templates/default.revealjs
+++ b/data/templates/default.revealjs
@@ -17,10 +17,13 @@ $endif$
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="$revealjs-url$/css/reveal.css">
- <style type="text/css">code{white-space: pre;} .smallcaps{font-variant: small-caps;}</style>
+ <style type="text/css">
+ code{white-space: pre-wrap;}
+ .smallcaps{font-variant: small-caps;}
$if(quotes)$
- <style type="text/css">q { quotes: "“" "”" "‘" "’"; }</style>
+ q { quotes: "“" "”" "‘" "’"; }
$endif$
+ </style>
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
diff --git a/data/templates/default.s5 b/data/templates/default.s5
index dc9dd8099..c3896af84 100644
--- a/data/templates/default.s5
+++ b/data/templates/default.s5
@@ -15,13 +15,16 @@ $if(keywords)$
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
$endif$
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
- <style type="text/css">code{white-space: pre;} .smallcaps{font-variant: small-caps;}</style>
+ <style type="text/css">
+ code{white-space: pre-wrap;}
+ .smallcaps{font-variant: small-caps;}
+$if(quotes)$
+ q { quotes: "“" "”" "‘" "’"; }
+$endif$
+ </style>
<!-- configuration parameters -->
<meta name="defaultView" content="slideshow" />
<meta name="controlVis" content="hidden" />
-$if(quotes)$
- <style type="text/css">q { quotes: "“" "”" "‘" "’"; }</style>
-$endif$
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
diff --git a/data/templates/default.slideous b/data/templates/default.slideous
index f7c637b36..5f194703b 100644
--- a/data/templates/default.slideous
+++ b/data/templates/default.slideous
@@ -16,10 +16,13 @@ $if(keywords)$
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
$endif$
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
- <style type="text/css">code{white-space: pre;} .smallcaps{font-variant: small-caps;}</style>
+ <style type="text/css">
+ code{white-space: pre-wrap;}
+ .smallcaps{font-variant: small-caps;}
$if(quotes)$
- <style type="text/css">q { quotes: "“" "”" "‘" "’"; }</style>
+ q { quotes: "“" "”" "‘" "’"; }
$endif$
+ </style>
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
diff --git a/data/templates/default.slidy b/data/templates/default.slidy
index 10b120503..cde6dd540 100644
--- a/data/templates/default.slidy
+++ b/data/templates/default.slidy
@@ -16,10 +16,13 @@ $if(keywords)$
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
$endif$
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
- <style type="text/css">code{white-space: pre;} .smallcaps{font-variant: small-caps;}</style>
+ <style type="text/css">
+ code{white-space: pre-wrap;}
+ .smallcaps{font-variant: small-caps;}
$if(quotes)$
- <style type="text/css">q { quotes: "“" "”" "‘" "’"; }</style>
+ q { quotes: "“" "”" "‘" "’"; }
$endif$
+ </style>
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
diff --git a/test/lhs-test.html b/test/lhs-test.html
index 24ba03db6..330122666 100644
--- a/test/lhs-test.html
+++ b/test/lhs-test.html
@@ -5,7 +5,10 @@
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>Untitled</title>
- <style type="text/css">code{white-space: pre;} .smallcaps{font-variant: small-caps;}</style>
+ <style type="text/css">
+ code{white-space: pre-wrap;}
+ .smallcaps{font-variant: small-caps;}
+ </style>
<style type="text/css">
div.sourceCode { overflow-x: auto; }
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
diff --git a/test/lhs-test.html+lhs b/test/lhs-test.html+lhs
index 17f547df4..7ce9a83c7 100644
--- a/test/lhs-test.html+lhs
+++ b/test/lhs-test.html+lhs
@@ -5,7 +5,10 @@
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>Untitled</title>
- <style type="text/css">code{white-space: pre;} .smallcaps{font-variant: small-caps;}</style>
+ <style type="text/css">
+ code{white-space: pre-wrap;}
+ .smallcaps{font-variant: small-caps;}
+ </style>
<style type="text/css">
div.sourceCode { overflow-x: auto; }
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
diff --git a/test/s5-basic.html b/test/s5-basic.html
index 1945c14c2..4757910b9 100644
--- a/test/s5-basic.html
+++ b/test/s5-basic.html
@@ -10,7 +10,10 @@
<meta name="author" content="Jen Jones" />
<meta name="date" content="2006-07-15" />
<title>My S5 Document</title>
- <style type="text/css">code{white-space: pre;} .smallcaps{font-variant: small-caps;}</style>
+ <style type="text/css">
+ code{white-space: pre-wrap;}
+ .smallcaps{font-variant: small-caps;}
+ </style>
<!-- configuration parameters -->
<meta name="defaultView" content="slideshow" />
<meta name="controlVis" content="hidden" />
diff --git a/test/s5-fancy.html b/test/s5-fancy.html
index 01c5b43cc..f80d321fb 100644
--- a/test/s5-fancy.html
+++ b/test/s5-fancy.html
@@ -10,7 +10,10 @@
<meta name="author" content="Jen Jones" />
<meta name="date" content="2006-07-15" />
<title>My S5 Document</title>
- <style type="text/css">code{white-space: pre;} .smallcaps{font-variant: small-caps;}</style>
+ <style type="text/css">
+ code{white-space: pre-wrap;}
+ .smallcaps{font-variant: small-caps;}
+ </style>
<!-- configuration parameters -->
<meta name="defaultView" content="slideshow" />
<meta name="controlVis" content="hidden" />
diff --git a/test/s5-inserts.html b/test/s5-inserts.html
index 70d3418f3..b84d2360e 100644
--- a/test/s5-inserts.html
+++ b/test/s5-inserts.html
@@ -8,7 +8,10 @@
<meta name="author" content="Jen Jones" />
<meta name="date" content="2006-07-15" />
<title>My S5 Document</title>
- <style type="text/css">code{white-space: pre;} .smallcaps{font-variant: small-caps;}</style>
+ <style type="text/css">
+ code{white-space: pre-wrap;}
+ .smallcaps{font-variant: small-caps;}
+ </style>
<link rel="stylesheet" href="main.css" type="text/css" />
STUFF INSERTED
</head>
diff --git a/test/writer.html4 b/test/writer.html4
index d26d9e67d..81cacde6a 100644
--- a/test/writer.html4
+++ b/test/writer.html4
@@ -8,7 +8,10 @@
<meta name="author" content="Anonymous" />
<meta name="date" content="2006-07-17" />
<title>Pandoc Test Suite</title>
- <style type="text/css">code{white-space: pre;} .smallcaps{font-variant: small-caps;}</style>
+ <style type="text/css">
+ code{white-space: pre-wrap;}
+ .smallcaps{font-variant: small-caps;}
+ </style>
</head>
<body>
<div id="header">
diff --git a/test/writer.html5 b/test/writer.html5
index 46aa27ae3..068628a69 100644
--- a/test/writer.html5
+++ b/test/writer.html5
@@ -8,7 +8,10 @@
<meta name="author" content="Anonymous" />
<meta name="dcterms.date" content="2006-07-17" />
<title>Pandoc Test Suite</title>
- <style type="text/css">code{white-space: pre;} .smallcaps{font-variant: small-caps;}</style>
+ <style type="text/css">
+ code{white-space: pre-wrap;}
+ .smallcaps{font-variant: small-caps;}
+ </style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->