From 2bc47481c7b0e9abb564b710e1a25bdb1348f78d Mon Sep 17 00:00:00 2001
From: Malin Freeborn <malinfreeborn@posteo.net>
Date: Mon, 30 Jan 2023 08:41:52 +0100
Subject: [PATCH] document mapPic

---
 docs.tex   | 23 +++++++++++++++++++++++
 layout.sty |  2 +-
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/docs.tex b/docs.tex
index 28afbbe7..9a1e9c93 100644
--- a/docs.tex
+++ b/docs.tex
@@ -177,6 +177,29 @@ Wider pictures should be placed with \verb"\widePic{s1}", and they will appear o
 
 \widePic{s1}
 
+\subsubsection{Maps}
+
+The map function works like \verb"\widePic", but for maps.
+You can add a list of coordinates, and the names or number-labels to place on those coordinates.
+
+\mapPic{../config/images/l1}{0.8/0.8/Toptown, 0.2/0.75/Leftown,0.8/0.6/2}
+
+Imagine the shield image is a map to be labelled.
+We can start by putting `Toptown' at the top.
+
+\begin{verbatim}
+  \mapPic{../config/images/l1}{0.8/0.8/Toptown}
+\end{verbatim}
+
+The Cartesian coordinates are `0.8/0.8', meaning `80\% along, 80\% up'.
+We can add more to the list with commas.
+
+We can even add commands, such as \verb"\ref{basement}" to get some number associated with a basement, and automatically place that number on the map.
+
+\begin{verbatim}
+  \mapPic{../config/images/l1}{0.8/0.8/Toptown, 0.2/0.75/Leftown,0.8/0.6/2}
+\end{verbatim}
+
 \subsection{Symbols}
 
 \begin{tabularx}{\linewidth}{Xcc}
diff --git a/layout.sty b/layout.sty
index 9e02b34c..e36e5cdb 100644
--- a/layout.sty
+++ b/layout.sty
@@ -271,7 +271,7 @@ bookmarks=true]%
       shadow xshift=-1pt,
       shadow yshift=-3pt
   }]
-      \node[anchor=south west,inner sep=0] (image) at (0,0) {\includesvg[width=\textwidth]{#1}};
+      \node[anchor=south west,inner sep=0] (image) at (0,0) {\includesvg[width=\textwidth]{images/#1}};
       \begin{scope}[
           x={(image.south east)},
           y={(image.north west)}
-- 
GitLab