texlive[43515] Master: callouts (16mar17)

commits+karl at tug.org commits+karl at tug.org
Thu Mar 16 22:42:32 CET 2017


Revision: 43515
          http://tug.org/svn/texlive?view=revision&revision=43515
Author:   karl
Date:     2017-03-16 22:42:31 +0100 (Thu, 16 Mar 2017)
Log Message:
-----------
callouts (16mar17)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/callouts/
    trunk/Master/texmf-dist/doc/latex/callouts/A319neo.jpg
    trunk/Master/texmf-dist/doc/latex/callouts/README.md
    trunk/Master/texmf-dist/doc/latex/callouts/callouts.pdf
    trunk/Master/texmf-dist/doc/latex/callouts/callouts.tex
    trunk/Master/texmf-dist/tex/latex/callouts/
    trunk/Master/texmf-dist/tex/latex/callouts/callouts.sty
    trunk/Master/tlpkg/tlpsrc/callouts.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/callouts/A319neo.jpg
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/callouts/A319neo.jpg
===================================================================
--- trunk/Master/texmf-dist/doc/latex/callouts/A319neo.jpg	2017-03-16 01:05:45 UTC (rev 43514)
+++ trunk/Master/texmf-dist/doc/latex/callouts/A319neo.jpg	2017-03-16 21:42:31 UTC (rev 43515)

Property changes on: trunk/Master/texmf-dist/doc/latex/callouts/A319neo.jpg
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/callouts/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/callouts/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/callouts/README.md	2017-03-16 21:42:31 UTC (rev 43515)
@@ -0,0 +1,18 @@
+# callouts: put notes inside a picture
+
+This LaTeX package enables to define the _annotation_ environment, in which callouts, notes, arrows, and the like can be placed to describe certain parts of the picture. _annotation_ opens a TikZ environment and certain often re-occurring commands are summarized as custom commands. A grid can be displayed to aid the placement of annotations. The so placed annotations remain in the same position if the picture scale is changed, while the font size is kept constant. A global color scheme for the annotations can also be defined via an option.
+
+This directory contains the following files:
+
+README.md		- The present file
+callouts.sty		- The package file - requires TikZ.sty
+callouts.tex		- A user's guide to the package with an example
+callouts.pdf		- Compiled user's guide
+A319neo.jpg		- Picture to annotate, (c) Airbus S.A.S. 2014
+
+I'd be happy to receive feedback, suggestions, or complaints at <markus.stuetz at gmail.com>
+
+Best regards,
+_Markus Stuetz_
+
+Graz, Austria on March 17, 2017

Added: trunk/Master/texmf-dist/doc/latex/callouts/callouts.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/callouts/callouts.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/callouts/callouts.pdf	2017-03-16 01:05:45 UTC (rev 43514)
+++ trunk/Master/texmf-dist/doc/latex/callouts/callouts.pdf	2017-03-16 21:42:31 UTC (rev 43515)

Property changes on: trunk/Master/texmf-dist/doc/latex/callouts/callouts.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/callouts/callouts.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/callouts/callouts.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/callouts/callouts.tex	2017-03-16 21:42:31 UTC (rev 43515)
@@ -0,0 +1,104 @@
+\documentclass[a4paper,11pt]{article}
+\usepackage[american]{babel}
+\usepackage[utf8]{inputenc}
+\usepackage{geometry}
+
+\usepackage{booktabs}  
+\usepackage{graphicx} 
+\usepackage{listings}
+\lstset{%
+backgroundcolor=\color{cyan!10},
+basicstyle=\ttfamily,
+numbers=left,numberstyle=\scriptsize
+}
+
+\usepackage[wby]{callouts}
+
+\title{The \LaTeX-package \texttt{callouts}}
+\author{Markus Stuetz}
+
+\begin{document}
+
+\maketitle
+
+\section{Introduction}
+In some reports or documents it may be necessary to annotate, draw arrows or put notes inside a picture. This may be done by editing the picture itself in a graphics tool or using the package TikZ. The former has the disadvantage of a different font and probably font size, the latter may require a lot of source code when using the same commands repeatedly. The package \texttt{callouts} provides a simple approach to annotate pictures.
+
+\section{Using the package}
+
+The package is included in the preamble as follows, with currently four color options, listed in table \ref{tab:colors}. If no or a wrong option is specified, the package will use \texttt{plain}.
+
+\begin{lstlisting}
+ \includepackage{callouts}[option] 
+\end{lstlisting}
+
+\begin{table}[htb]
+ \centering
+ \caption{Color options}\label{tab:colors}
+ \begin{tabular}{cccc}
+ \toprule
+  option & text & background & arrow \\
+  \midrule
+  \texttt{plain}& black & black & none \\
+  \texttt{bwr}	& black & white & red \\
+  \texttt{wby}	& white & black & yellow \\
+  \texttt{bww}	& black & white & white\\
+  \bottomrule
+ \end{tabular}
+\end{table}
+
+The environment itself is called \texttt{annotate} and may be put inside a \texttt{figure}-float. The environment requires two variables: The image path including a width option and the annotation scale. Make sure to put the same number in the \texttt{width}-option and the coordinate scale. If you decide to change the scale later on, change both numbers equally, then the relative position of the annotations will remain.
+\begin{lstlisting}
+ \begin{annotate}
+ {\includegraphics[0.5\textwidth]{<picture file name>} {0.5}
+ \end{annotate}
+\end{lstlisting}
+
+\section{Commands for annotations}
+There are currently four commands included which may follow the first two variables of the package.
+
+\subsection{Helpgrid}
+First of all, you may want to use a help grid to place your annotations. With \texttt{\textbackslash helpgrid}, a grid is drawn. The grid's coodinate origin is indicated by the large dot in the center. The grid lines display integers, coordinates are given in positive and negative decimal numbers.
+
+\subsection{Callouts, notes, arrows }
+A callout is a note, indicating to a point with an arrow. The syntax for this object is
+\begin{lstlisting}
+ \callout{xn,yn}{<note>}{xa,ya}
+\end{lstlisting}
+Here, \texttt{xn}, \texttt{yn} are the center coordinates for the note and \texttt{xa}, \texttt{ya} the coordinates for the arrow tip.
+
+You may put a note withouth an arrow, or an arrow alone, respectively, by writing
+\begin{lstlisting}
+ \note{xn,yn}{<note>}
+ \arrow{xs,ys}{xa,ya}
+\end{lstlisting}
+
+\newpage
+\subsection{An example}
+The following source code results in figure \ref{fig:Airbus}. The color option used here is \texttt{wby}. Note that the \texttt{annotate}-environment opens a \texttt{tikzpicture} environment. Hence, all TikZ-commands such as \texttt{\textbackslash draw} can be used as well, as for example in line 8.
+\begin{lstlisting}
+ \begin{annotate}{\includegraphics[width=0.7\textwidth]...
+ ...{A319neo.jpg}}{0.7}
+   % \helpgrid
+   \callout{5,-3}{Engine}{1.6,-2}
+   \arrow{-3,-2.4}{-4.5,-3}
+   \arrow{-4.7,-3.2}{-5.5,-2.4}
+   \note{1,5}{Wingtip}
+   \draw [thick,\arcol] (2.5,3.8) rectangle (4,5);
+ \end{annotate}
+\end{lstlisting}
+
+\begin{figure}[htb]
+  \centering
+  \begin{annotate}{\includegraphics[width=0.7\textwidth]{A319neo.jpg}}{0.7}
+    % \helpgrid
+    \callout{5,-3}{Engine}{1.6,-2}
+    \arrow{-3,-2.4}{-4.5,-3}
+    \arrow{-4.7,-3.2}{-5.5,-2.4}
+    \note{1,5}{Wingtip}
+    \draw [thick,\arcol] (2.5,3.8) rectangle (4,5);
+  \end{annotate}
+  \caption{Airbus A319neo\protect\footnotemark}\label{fig:Airbus}
+\end{figure}
+ \footnotetext{Image courtesy: AIRBUS S.A.S. 2014, \texttt{www.airbus.com}, accessed 3.3.2017}
+\end{document}

Added: trunk/Master/texmf-dist/tex/latex/callouts/callouts.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/callouts/callouts.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/callouts/callouts.sty	2017-03-16 21:42:31 UTC (rev 43515)
@@ -0,0 +1,79 @@
+% ==================================================================
+% callouts.sty 
+% ==================================================================
+% (c) 2017 Markus Stuetz, markus.stuetz at gmail.com
+% This program can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License Distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt; either
+% version 1 of the License, or any later version.
+% ==================================================================
+
+\ProvidesPackage{callouts}[2017/03/16 Callouts]
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{tikz}
+% \RequirePackage{kvoptions}
+% 
+% \tikzset{every picture/.style={font issue=\footnotesize},
+%          font issue/.style={execute at begin picture={#1\selectfont}}
+%         }
+
+% \DeclareStringOption[red]{color}[black]{
+%   \@arrowcolor
+%   }
+
+\DeclareOption{plain}{%
+\newcommand{\focol}{black}
+\newcommand{\bgcol}{none}
+\newcommand{\arcol}{black}
+}
+
+\DeclareOption{bwr}{%
+\newcommand{\focol}{black}
+\newcommand{\bgcol}{white}
+\newcommand{\arcol}{red}
+}
+
+\DeclareOption{wby}{%
+\newcommand{\focol}{white}
+\newcommand{\bgcol}{black}
+\newcommand{\arcol}{yellow}
+}
+
+\DeclareOption{bww}{%
+\newcommand{\focol}{black}
+\newcommand{\bgcol}{white}
+\newcommand{\arcol}{white}
+}
+
+\DeclareOption*{\ClassWarning{annotations}{Unknown color option '\CurrentOption'}\ExecuteOptions{none}}
+
+\newcommand{\hecol}{black}
+
+\ProcessOptions\relax	% terminate option processing
+
+% ==================================================================
+
+\newenvironment{annotate}[2]%[num]%
+{ \begin{tikzpicture}[scale=#2]% }%
+% Annotate
+\node (pic) at (0,0) {#1};%
+}%
+{ \end{tikzpicture} }
+
+% ==================================================================
+
+\newcommand{\helpgrid}{%
+\draw[help lines, \hecol] (pic.south west) grid (pic.north east); \fill[\hecol] (0,0) circle (5pt);%
+}
+\newcommand{\callout}[3]{%
+\node [fill=\bgcol] (text) at (#1) {\scriptsize\color{\focol} #2};
+\draw [\arcol,thick,->] (text) -- (#3);
+}
+\newcommand{\note}[2]{%
+\node [fill=\bgcol] at (#1) {\scriptsize\color{\focol} #2};
+}
+\newcommand{\arrow}[2]{%
+\draw [\arcol,thick,->] (#1) -- (#2);
+}
+
+\endinput % === EOF ================================================
\ No newline at end of file

Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2017-03-16 01:05:45 UTC (rev 43514)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2017-03-16 21:42:31 UTC (rev 43515)
@@ -125,7 +125,7 @@
     bxpapersize bxpdfver bxeepic bxenclose
     bxjalipsum bxjscls bxnewfont bytefield 
   c90 c-pascal cabin cachepic caladea calcage calctab calculation calculator
-    calligra calligra-type1 calrsfs cals calxxxx-yyyy cancel
+    calligra calligra-type1 callouts calrsfs cals calxxxx-yyyy cancel
     canoniclayout cantarell
     capt-of captcont captdef caption carbohydrates carlisle carlito carolmin-ps
     cascadilla cases casyl

Added: trunk/Master/tlpkg/tlpsrc/callouts.tlpsrc
===================================================================
Modified: trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc	2017-03-16 01:05:45 UTC (rev 43514)
+++ trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc	2017-03-16 21:42:31 UTC (rev 43515)
@@ -21,6 +21,7 @@
 depend braids
 depend bxeepic
 depend cachepic
+depend callouts
 depend celtic
 depend chemfig
 depend combinedgraphics



More information about the tex-live-commits mailing list