diff dottes.tex @ 869:7cc06a68a572

Add optional image caption taken from <section>/image.md.
author Jim Hague <jim.hague@acm.org>
date Tue, 26 Mar 2019 11:00:35 +0000
parents a284fc64cb75
children 79dcae708ea9
line wrap: on
line diff
--- a/dottes.tex	Tue Mar 26 10:44:20 2019 +0000
+++ b/dottes.tex	Tue Mar 26 11:00:35 2019 +0000
@@ -1,6 +1,7 @@
 \input{docclass.tex}
 
 \usepackage{array}
+\usepackage{caption}
 \usepackage{color}
 \usepackage{fontspec}
 \usepackage{graphicx}
@@ -77,10 +78,13 @@
 
 % Show the section graphic.
 % Args are the graphic filename.
-\newcommand{\showsectiongraphic}[1]{%
-  \begin{center}
-  \includegraphics[height=0.60\textheight,keepaspectratio]{#1}
-  \end{center}
+\newcommand{\showsectiongraphic}[2]{%
+  \begin{figure}[h!]
+    \begin{center}
+      \includegraphics[height=0.60\textheight,keepaspectratio]{#1}
+    \end{center}
+    \ifemptyarg{#2}{}{\caption*{#2}}
+  \end{figure}
 }
 
 % ----- Paper size document setup