Here's the easiest way I found to do it. Place the CSS and JavaScript into a docinfo.html file. Save the images in the same directory. Then use Asciidoctor to render HTML. Here's what the AsciiDoc file looks like.
= Embedded Slideshow
:docinfo1:
== Slideshow Indicators
An example of using buttons to indicate how many slides there are in the slideshow, and which slide the user is currently viewing.
++++
<div class="w3-content w3-display-container" style="max-width:800px">
<img class="mySlides" src="img_nature_wide.jpg" style="width:100%">
<img class="mySlides" src="img_fjords_wide.jpg" style="width:100%">
<img class="mySlides" src="img_mountains_wide.jpg" style="width:100%">
<div class="w3-center w3-container w3-section w3-large w3-text-white w3-display-bottommiddle" style="width:100%">
<div class="w3-left w3-hover-text-khaki" onclick="plusDivs(-1)">❮</div>
<div class="w3-right w3-hover-text-khaki" onclick="plusDivs(1)">❯</div>
<span class="w3-badge demo w3-border w3-transparent w3-hover-white" onclick="currentDiv(1)">
<span class="w3-badge demo w3-border w3-transparent w3-hover-white" onclick="currentDiv(2)">
<span class="w3-badge demo w3-border w3-transparent w3-hover-white" onclick="currentDiv(3)">
</div>
</div>
++++