texlive[51490] Master/texmf-dist: tikz-imagelabels (27jun19)

commits+karl at tug.org commits+karl at tug.org
Thu Jun 27 22:58:38 CEST 2019


Revision: 51490
          http://tug.org/svn/texlive?view=revision&revision=51490
Author:   karl
Date:     2019-06-27 22:58:38 +0200 (Thu, 27 Jun 2019)
Log Message:
-----------
tikz-imagelabels (27jun19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/tikz-imagelabels/tikz-imagelabels.pdf
    trunk/Master/texmf-dist/source/latex/tikz-imagelabels/tikz-imagelabels.dtx
    trunk/Master/texmf-dist/tex/latex/tikz-imagelabels/tikz-imagelabels.sty

Modified: trunk/Master/texmf-dist/doc/latex/tikz-imagelabels/tikz-imagelabels.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/tikz-imagelabels/tikz-imagelabels.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tikz-imagelabels/tikz-imagelabels.dtx	2019-06-27 20:58:17 UTC (rev 51489)
+++ trunk/Master/texmf-dist/source/latex/tikz-imagelabels/tikz-imagelabels.dtx	2019-06-27 20:58:38 UTC (rev 51490)
@@ -17,7 +17,7 @@
 % \iffalse
 %<package>\NeedsTeXFormat{LaTeX2e}[2011/06/27]
 %<package>\ProvidesPackage{tikz-imagelabels}
-%<package>  [2019/01/29 v0.1 put labels on images using TikZ]
+%<package>  [2019/06/27 v0.2 put labels on images using TikZ]
 %
 %<*driver>
 \documentclass[a4paper]{ltxdoc}
@@ -223,6 +223,41 @@
 %
 % |\draw[image label = {M45 at south east}];|
 %
+% \changes{v0.2}{2019/06/27}{add coordinate labels}
+% Another kind of label is the so-called ``coordinate label''. In contrast to
+% the image label, it may be positioned at arbitrary coordinates. The syntax is
+% similar to the |image label|:
+%
+% |\draw[coordinate label = {|\meta{text}| at (|\meta{coordinate}|)}];|
+%
+% An example of some coordinate labels is shown in \autoref{fig:coord-labels}.
+%
+% \begin{figure}
+% \centering
+% \begin{annotationimage}{width=6cm}{pleiades.jpg}
+%   \draw[coordinate label = {1 at (0.1,0.3)}];
+%   \draw[coordinate label = {2 at (0.4,0.6)}];
+%   \draw[coordinate label = {3 at (0.65,0.25)}];
+%   \draw[coordinate label = {4 at (0.9,0.4)}];
+%   \draw[coordinate label = {5 at (0.62,0.62)}];
+%   \draw[coordinate label = {6 at (0.83,0.8)}];
+%   \draw[image label = {M45 at south east}];
+% \end{annotationimage}
+% \caption{Example of using coordinate labels}
+% \label{fig:coord-labels}
+% \end{figure}
+%
+% \autoref{fig:coord-labels} was created using the following code:
+% \begin{verbatim}
+%   \draw[coordinate label = {1 at (0.1,0.3)}];
+%   \draw[coordinate label = {2 at (0.4,0.6)}];
+%   \draw[coordinate label = {3 at (0.65,0.25)}];
+%   \draw[coordinate label = {4 at (0.9,0.4)}];
+%   \draw[coordinate label = {5 at (0.62,0.62)}];
+%   \draw[coordinate label = {6 at (0.83,0.8)}];
+%   \draw[image label = {M45 at south east}];
+% \end{verbatim}
+%
 % \subsection{Adding annotations}
 %
 % An annotation is added with the aid of the \tkz{} macro |\draw|. The syntax is
@@ -278,6 +313,10 @@
 %   image label distance = 2mm,
 %   image label back = black,
 %   image label text = white,
+%   coordinate label font = \sffamily\bfseries\scriptsize,
+%   coordinate label distance = 2mm,
+%   coordinate label back = black,
+%   coordinate label text = white,
 %   annotation font = \normalfont\small,
 %   arrow distance = 1.5mm,
 %   border thickness = 0.6pt,
@@ -438,6 +477,13 @@
 }
 
 \imagelabelset{
+  coordinate label font/.store in = \coordinatelabelfont,
+  coordinate label distance/.store in = \coordinatelabelsep,
+  coordinate label back/.store in = \coordinatelabelback,
+  coordinate label text/.store in = \coordinatelabeltext,
+}
+
+\imagelabelset{
   annotation font/.store in = \annotationfont,
   arrow distance/.store in = \arrowdistance,
   arrow thickness/.store in = \arrowthickness,
@@ -459,6 +505,10 @@
   image label distance = 2mm,
   image label back = black,
   image label text = white,
+  coordinate label font = \sffamily\bfseries\scriptsize,
+  coordinate label distance = 2mm,
+  coordinate label back = black,
+  coordinate label text = white,
   annotation font = \normalfont\small,
   arrow distance = 1.5mm,
   border thickness = 0.6pt,
@@ -633,6 +683,14 @@
     text = \imagelabeltext,
     font = \imagelabelfont,
   },
+  coordinate label style/.style = {
+    rectangle,
+    minimum width = 3mm,
+    minimum height = 3mm,
+    fill = \coordinatelabelback,
+    text = \coordinatelabeltext,
+    font = \coordinatelabelfont,
+  },
 %    \end{macrocode}
 % On the other hand, the |image label| style defines the actual image labels.
 %    \begin{macrocode}
@@ -642,6 +700,12 @@
         anchor=#2, image label style] {#1}
     }
   },
+  coordinate label/.style args = {#1 at (#2)}{
+    insert path = {
+      node[outer sep = \coordinatelabelsep,
+        anchor=center, coordinate label style] at (#2) {#1}
+    }
+  },
 }
 %    \end{macrocode}
 %

Modified: trunk/Master/texmf-dist/tex/latex/tikz-imagelabels/tikz-imagelabels.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tikz-imagelabels/tikz-imagelabels.sty	2019-06-27 20:58:17 UTC (rev 51489)
+++ trunk/Master/texmf-dist/tex/latex/tikz-imagelabels/tikz-imagelabels.sty	2019-06-27 20:58:38 UTC (rev 51490)
@@ -22,7 +22,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[2011/06/27]
 \ProvidesPackage{tikz-imagelabels}
-  [2019/01/29 v0.1 put labels on images using TikZ]
+  [2019/06/27 v0.2 put labels on images using TikZ]
 \RequirePackage{tikz}
 \RequirePackage{xifthen}
 \usetikzlibrary{
@@ -52,6 +52,13 @@
 }
 
 \imagelabelset{
+  coordinate label font/.store in = \coordinatelabelfont,
+  coordinate label distance/.store in = \coordinatelabelsep,
+  coordinate label back/.store in = \coordinatelabelback,
+  coordinate label text/.store in = \coordinatelabeltext,
+}
+
+\imagelabelset{
   annotation font/.store in = \annotationfont,
   arrow distance/.store in = \arrowdistance,
   arrow thickness/.store in = \arrowthickness,
@@ -66,6 +73,10 @@
   image label distance = 2mm,
   image label back = black,
   image label text = white,
+  coordinate label font = \sffamily\bfseries\scriptsize,
+  coordinate label distance = 2mm,
+  coordinate label back = black,
+  coordinate label text = white,
   annotation font = \normalfont\small,
   arrow distance = 1.5mm,
   border thickness = 0.6pt,
@@ -159,6 +170,14 @@
     text = \imagelabeltext,
     font = \imagelabelfont,
   },
+  coordinate label style/.style = {
+    rectangle,
+    minimum width = 3mm,
+    minimum height = 3mm,
+    fill = \coordinatelabelback,
+    text = \coordinatelabeltext,
+    font = \coordinatelabelfont,
+  },
   image label/.style args = {#1 at #2}{
     insert path = {
       (image.#2) node[outer sep = \imagelabelsep,
@@ -165,6 +184,12 @@
         anchor=#2, image label style] {#1}
     }
   },
+  coordinate label/.style args = {#1 at (#2)}{
+    insert path = {
+      node[outer sep = \coordinatelabelsep,
+        anchor=center, coordinate label style] at (#2) {#1}
+    }
+  },
 }
 \endinput
 %%



More information about the tex-live-commits mailing list