[blockdef-pass]
asciimath-style=template="asciimathblock",subs=()
-latexmath-style=template="latexmathblock",subs=()
+latexmath-style=template="latexmathblock",subs=(),posattrs=(),filter="unwraplatex.py"
[macros]
-(?u)^(?P<name>audio|video)::(?P<target>\S*?)(\[(?P<attrlist>.*?)\])$=#
+^(?P<name>audio|video)::(?P<target>\S*?)(\[(?P<attrlist>.*?)\])$=#
# math macros.
# Special characters are escaped in HTML math markup.
(?su)[\\]?(?P<name>asciimath|latexmath):(?P<subslist>\S*?)\[(?P<passtext>.*?)(?<!\\)\]=[specialcharacters]
<a class="image" href="{link}">
{data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}" alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}{title? title="{title}"}>
{data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}{title? title="{title}"}
-{data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print 'src=\"data:'+mimetypes.guess_type(r'{target}')[0]+';base64,'; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}">
+{data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print('src=\x22data:' + mimetypes.guess_type(r'{target}')[0] + ';base64,'); base64.encode(sys.stdin.buffer,sys.stdout.buffer)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}">
{link#}</a>
</span>
<a class="image" href="{link}">
{data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}" alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}>
{data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}
-{data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print 'src=\"data:'+mimetypes.guess_type(r'{target}')[0]+';base64,'; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}">
+{data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print('src=\x22data:' + mimetypes.guess_type(r'{target}')[0] + ';base64,'); base64.encode(sys.stdin.buffer,sys.stdout.buffer)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}">
{link#}</a>
</div>
<div class="title">{caption={figure-caption} {counter:figure-number}. }{title}</div>
endif::data-uri[]
ifdef::data-uri[]
<img alt="{index}" src="data:image/png;base64,
-{sys:"{python}" -u -c "import base64,sys; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{icon={iconsdir}/callouts/{index}.png}")}"}">
+{sys:"{python}" -u -c "import base64,sys; base64.encode(sys.stdin.buffer,sys.stdout.buffer)" < "{eval:os.path.join(r"{indir={outdir}}",r"{icon={iconsdir}/callouts/{index}.png}")}"}">
endif::data-uri[]
endif::icons[]
item=<tr><td><img src="{iconsdir}/callouts/{listindex}.png" alt="{listindex}"></td><td>|</td></tr>
endif::data-uri[]
ifdef::data-uri[]
-item=<tr><td><img alt="{listindex}" src="data:image/png;base64, {sys:"{python}" -u -c "import base64,sys; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{icon={iconsdir}/callouts/{listindex}.png}")}"}"></td><td>|</td></tr>
+item=<tr><td><img alt="{listindex}" src="data:image/png;base64, {sys:"{python}" -u -c "import base64,sys; base64.encode(sys.stdin.buffer,sys.stdout.buffer)" < "{eval:os.path.join(r"{indir={outdir}}",r"{icon={iconsdir}/callouts/{listindex}.png}")}"}"></td><td>|</td></tr>
endif::data-uri[]
text=|
endif::icons[]
<td class="icon">
{data-uri%}{icons#}<img src="{icon={iconsdir}/{name}.png}" alt="{caption}">
{data-uri#}{icons#}<img alt="{caption}" src="data:image/png;base64,
-{data-uri#}{icons#}{sys:"{python}" -u -c "import base64,sys; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{icon={iconsdir}/{name}.png}")}"}">
+{data-uri#}{icons#}{sys:"{python}" -u -c "import base64,sys; base64.encode(sys.stdin.buffer,sys.stdout.buffer)" < "{eval:os.path.join(r"{indir={outdir}}",r"{icon={iconsdir}/{name}.png}")}"}">
{icons%}<div class="title">{caption}</div>
</td>
<td class="content">
[toc]
<div id="toc">
+ <a href="index.html" style="font-size: 0.8em;">↩Index</a>
<div id="toctitle">{toc-title}</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
</div>
font-size: 1.1em;
margin-bottom: 0.3em;
}
+
+.monospaced, code, pre {
+ overflow-wrap: break-word;
+}
+img {
+ max-width: 100%;
+}
+
@media only screen and (min-width: 85em) {
div #toc {
width: 22em