9f984ff26a
Text.Pandoc.Shared:
+ Remove `Element` type [API change]
+ Remove `makeHierarchicalize` [API change]
+ Add `makeSections` [API change]
+ Export `deLink` [API change]
Now that we have Divs, we can use them to represent the structure
of sections, and we don't need a special Element type.
`makeSections` reorganizes a block list, adding Divs with
class `section` around sections, and adding numbering
if needed.
This change also fixes some longstanding issues recognizing
section structure when the document contains Divs.
Closes #3057, see also #997.
All writers have been changed to use `makeSections`.
Note that in the process we have reverted the change
c1d058aeb1
made in response to #5168, which I'm not completely
sure was a good idea.
Lua modules have also been adjusted accordingly.
Existing lua filters that use `hierarchicalize` will
need to be rewritten to use `make_sections`.
85 lines
1.1 KiB
Markdown
85 lines
1.1 KiB
Markdown
```
|
|
% 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" style="width:40%;">
|
|
<ul>
|
|
<li>a</li>
|
|
<li>b</li>
|
|
</ul>
|
|
</div><div class="column" style="width:40%;">
|
|
<ul>
|
|
<li>c</li>
|
|
<li>d</li>
|
|
</ul>
|
|
</div><div class="column" style="width:10%;">
|
|
<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}{Slide one}
|
|
\protect\hypertarget{slide-one}{}
|
|
\begin{columns}[T]
|
|
\begin{column}{0.4\textwidth}
|
|
\begin{itemize}
|
|
\tightlist
|
|
\item
|
|
a
|
|
\item
|
|
b
|
|
\end{itemize}
|
|
\end{column}
|
|
|
|
\begin{column}{0.4\textwidth}
|
|
\begin{itemize}
|
|
\tightlist
|
|
\item
|
|
c
|
|
\item
|
|
d
|
|
\end{itemize}
|
|
\end{column}
|
|
|
|
\begin{column}{0.1\textwidth}
|
|
ok
|
|
\end{column}
|
|
\end{columns}
|
|
\end{frame}
|
|
```
|