Skip to content
Snippets Groups Projects
Unverified Commit 511ad8ef authored by Malin Freeborn's avatar Malin Freeborn
Browse files

reverse mapPart syntax

parent cf0b7cd7
Branches
Tags
No related merge requests found
......@@ -182,28 +182,28 @@ Wider pictures should be placed with \verb"\widePic{s1}", and they will appear o
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[\large]{../config/images/l1}{0.8/0.8/\Huge Toptown, 0.2/0.75/Leftown,0.8/0.6/2}
\mapPic[\large]{../config/images/l1}{\Huge Toptown/8/8,Leftown/2/75,2/8/6}
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}
\mapPic{../config/images/l1}{8/8/Toptown}
\end{verbatim}
The Cartesian coordinates are `0.8/0.8', meaning `80\% along, 80\% up'.
The Cartesian coordinates are `8/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}
\mapPic{../config/images/l1}{8/8/Toptown, 2/75/Leftown,8/6/2}
\end{verbatim}
An optional argument allows default size changes for the words, and as usual words can change their sizes individually.
\begin{verbatim}
\mapPic[\small]{../config/images/l1}{0.8/0.8/\large Toptown, 0.2/0.75/Leftown,0.8/0.6/\ref{basement}}
\mapPic[\small]{../config/images/l1}{8/8/\large Toptown, 2/75/Leftown,8/6/\ref{basement}}
\end{verbatim}
\subsection{Symbols}
......
......@@ -265,7 +265,7 @@ bookmarks=true]%
}
\newcommand\mapLegend[4]{
\node [black, font=\bfseries] at (#1,#2) {#4 #3};
\node [black, font=\bfseries] at (0.#2,0.#3) {#4 #1};
}
\newcommand\mapPic[3][\Huge]{
......@@ -280,8 +280,8 @@ bookmarks=true]%
x={(image.south east)},
y={(image.north west)}
]
\foreach \mX/\mY/\mNum in {#3}{
\mapLegend{\mX}{\mY}{\mNum}{#1}
\foreach \mNum/\mX/\mY in {#3}{
\mapLegend{\outline{\mNum}}{\mX}{\mY}{#1}
}
\end{scope}
\end{tikzpicture}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment