summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-08-14 23:05:09 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2017-08-14 23:17:44 -0700
commit892a4edeb1c9b9810c8386e639d8e457bbae7e86 (patch)
treec9de220c7cef5e6f52fdc282fb2c361533626f00 /test
parent23d29ee10cb93143f48aca6aa6ebb6afc09af797 (diff)
Implement multicolumn support for slide formats.
The structure expected is: <div class="columns"> <div class="column" width="40%"> contents... </div> <div class="column" width="60%"> contents... </div> </div> Support has been added for beamer and all HTML slide formats. Closes #1710. Note: later we could add a more elegant way to create this structure in Markdown than to use raw HTML div elements. This would come for free with a "native div syntax" (#168). Or we could devise something specific to slides
Diffstat (limited to 'test')
-rw-r--r--test/command/1710.md91
-rw-r--r--test/lhs-test.html1
-rw-r--r--test/lhs-test.html+lhs1
-rw-r--r--test/s5-basic.html1
-rw-r--r--test/s5-fancy.html1
-rw-r--r--test/s5-inserts.html1
-rw-r--r--test/writer.html41
-rw-r--r--test/writer.html51
8 files changed, 98 insertions, 0 deletions
diff --git a/test/command/1710.md b/test/command/1710.md
new file mode 100644
index 000000000..be96678bd
--- /dev/null
+++ b/test/command/1710.md
@@ -0,0 +1,91 @@
+```
+% pandoc -t revealjs
+# Slide one
+
+<div class="columns">
+<div class="column" width="40%">
+- a
+- b
+</div>
+<div class="column" width="40%">
+- c
+- d
+</div>
+<div class="column" width="10%">
+ok
+</div>
+</div>
+^D
+<section id="slide-one" class="slide level1">
+<h1>Slide one</h1>
+<div class="columns">
+<div class="column" width="40%" style="width:40%;min-width:40%;vertical-align:top;">
+<ul>
+<li>a</li>
+<li>b</li>
+</ul>
+</div>
+<div class="column" width="40%" style="width:40%;min-width:40%;vertical-align:top;">
+<ul>
+<li>c</li>
+<li>d</li>
+</ul>
+</div>
+<div class="column" width="10%" style="width:10%;min-width:10%;vertical-align:top;">
+<p>ok</p>
+</div>
+</div>
+</section>
+```
+
+```
+% pandoc -t beamer
+# Slide one
+
+<div class="columns">
+<div class="column" width="40%">
+- a
+- b
+</div>
+<div class="column" width="40%">
+- c
+- d
+</div>
+<div class="column" width="10%">
+ok
+</div>
+</div>
+^D
+\begin{frame}{%
+\protect\hypertarget{slide-one}{%
+Slide one}}
+
+\begin{columns}[T]
+\begin{column}{0.40\textwidth}
+\begin{itemize}
+\tightlist
+\item
+ a
+\item
+ b
+\end{itemize}
+\end{column}
+
+\begin{column}{0.40\textwidth}
+\begin{itemize}
+\tightlist
+\item
+ c
+\item
+ d
+\end{itemize}
+\end{column}
+
+\begin{column}{0.10\textwidth}
+ok
+\end{column}
+\end{columns}
+
+\end{frame}
+```
+
diff --git a/test/lhs-test.html b/test/lhs-test.html
index ff14e3699..6cf6285d1 100644
--- a/test/lhs-test.html
+++ b/test/lhs-test.html
@@ -9,6 +9,7 @@
code{white-space: pre-wrap;}
.smallcaps{font-variant: small-caps;}
.line-block{white-space: pre-line;}
+ .column{display: inline-block;}
</style>
<style type="text/css">
div.sourceCode { overflow-x: auto; }
diff --git a/test/lhs-test.html+lhs b/test/lhs-test.html+lhs
index f0bfd0465..3a29b8c30 100644
--- a/test/lhs-test.html+lhs
+++ b/test/lhs-test.html+lhs
@@ -9,6 +9,7 @@
code{white-space: pre-wrap;}
.smallcaps{font-variant: small-caps;}
.line-block{white-space: pre-line;}
+ .column{display: inline-block;}
</style>
<style type="text/css">
div.sourceCode { overflow-x: auto; }
diff --git a/test/s5-basic.html b/test/s5-basic.html
index b559a9af6..f3ca9bbf8 100644
--- a/test/s5-basic.html
+++ b/test/s5-basic.html
@@ -14,6 +14,7 @@
code{white-space: pre-wrap;}
.smallcaps{font-variant: small-caps;}
.line-block{white-space: pre-line;}
+ .column{display: inline-block;}
</style>
<!-- configuration parameters -->
<meta name="defaultView" content="slideshow" />
diff --git a/test/s5-fancy.html b/test/s5-fancy.html
index a24baa556..3031cf071 100644
--- a/test/s5-fancy.html
+++ b/test/s5-fancy.html
@@ -14,6 +14,7 @@
code{white-space: pre-wrap;}
.smallcaps{font-variant: small-caps;}
.line-block{white-space: pre-line;}
+ .column{display: inline-block;}
</style>
<!-- configuration parameters -->
<meta name="defaultView" content="slideshow" />
diff --git a/test/s5-inserts.html b/test/s5-inserts.html
index 97c8de384..a3c3a7886 100644
--- a/test/s5-inserts.html
+++ b/test/s5-inserts.html
@@ -12,6 +12,7 @@
code{white-space: pre-wrap;}
.smallcaps{font-variant: small-caps;}
.line-block{white-space: pre-line;}
+ .column{display: inline-block;}
</style>
<link rel="stylesheet" href="main.css" type="text/css" />
STUFF INSERTED
diff --git a/test/writer.html4 b/test/writer.html4
index 89cf07685..2040b4a1a 100644
--- a/test/writer.html4
+++ b/test/writer.html4
@@ -12,6 +12,7 @@
code{white-space: pre-wrap;}
.smallcaps{font-variant: small-caps;}
.line-block{white-space: pre-line;}
+ .column{display: inline-block;}
</style>
</head>
<body>
diff --git a/test/writer.html5 b/test/writer.html5
index 6762f8198..e3b3a07ca 100644
--- a/test/writer.html5
+++ b/test/writer.html5
@@ -12,6 +12,7 @@
code{white-space: pre-wrap;}
.smallcaps{font-variant: small-caps;}
.line-block{white-space: pre-line;}
+ .column{display: inline-block;}
</style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>