summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/hf-tikz
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-03-03 23:36:35 +0000
committerKarl Berry <karl@freefriends.org>2013-03-03 23:36:35 +0000
commit27cb2152643fd03927bf08cec8dbfdab067e4728 (patch)
tree75ddc1893a6494927037603c9dfcbb536e136d20 /Master/texmf-dist/source/latex/hf-tikz
parent3c4624d057df0dfc6a6e63caba41f5b76529ed48 (diff)
hf-tikz (3mar13)
git-svn-id: svn://tug.org/texlive/trunk@29278 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/hf-tikz')
-rw-r--r--Master/texmf-dist/source/latex/hf-tikz/hf-tikz.dtx466
-rw-r--r--Master/texmf-dist/source/latex/hf-tikz/hf-tikz.ins6
2 files changed, 398 insertions, 74 deletions
diff --git a/Master/texmf-dist/source/latex/hf-tikz/hf-tikz.dtx b/Master/texmf-dist/source/latex/hf-tikz/hf-tikz.dtx
index 831621d28a7..efb98a2cf92 100644
--- a/Master/texmf-dist/source/latex/hf-tikz/hf-tikz.dtx
+++ b/Master/texmf-dist/source/latex/hf-tikz/hf-tikz.dtx
@@ -37,7 +37,6 @@ in both documents and presentations thanks to TikZ.
*
* See http://www.latex-project.org/lppl.txt
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
\endpreamble
\postamble
@@ -57,7 +56,6 @@ This work consists of the file hf-tikz.dtx
and the derived files hf-tikz.ins and
hf-tikz.pdf
hf-tikz.sty.
-
\endpostamble
\usedir{tex/latex/hf-tikz}
\generate{
@@ -83,7 +81,7 @@ and the derived files hf-tikz.ins and
%</internal>
%<*package>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{hf-tikz}[2013/01/13 v0.2 A simple way to highlight formulas and formula parts.]
+\ProvidesPackage{hf-tikz}[2013/01/13 v0.3 A simple way to highlight formulas and formula parts.]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -93,9 +91,13 @@ and the derived files hf-tikz.ins and
\usepackage{amsmath,amssymb}
\usepackage[width=14cm]{geometry}
\usepackage{charter,pxfonts}
-\usepackage[customcolors,shade]{\jobname}
+\usepackage[customcolors,shade,markings]{\jobname}
\usetikzlibrary{calc}
\usepackage{hypdoc}
+\newcommand{\library}[1]{\textcolor{red!80!black}{\texttt{#1}}}
+\newcommand{\packoption}[2]{\textcolor{blue!60!cyan}{\texttt{#1}} \texttt{(initial:~#2)}}
+\newcommand{\smkey}[1]{\textcolor{blue!60!cyan}{\texttt{#1}}}
+\newcommand{\smoption}[1]{\textcolor{orange!30!red}{\texttt{#1}}}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
@@ -105,7 +107,7 @@ and the derived files hf-tikz.ins and
%</driver>
% \fi
%
-% \CheckSum{359}
+% \CheckSum{482}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -126,6 +128,7 @@ and the derived files hf-tikz.ins and
% \changes{v0.1}{2012/08/17}{Initial version}
% \changes{v0.1a}{2012/12/18}{Fixed bug \pgfpointorigin}
% \changes{v0.2}{2013/01/13}{Added norndcorners and warning second run}
+% \changes{v0.3}{2013/03/01}{Key interface and markings option}
%
% \GetFileInfo{hf-tikz.sty}
%
@@ -151,7 +154,7 @@ and the derived files hf-tikz.ins and
%
% The packages loaded by \textsf{hf-tikz} are:
% \begin{itemize}
-% \item Ti\emph{k}Z and the library \texttt{shadings};
+% \item Ti\emph{k}Z and the libraries \library{shadings} and \library{decorations.markings} (this library is not always loaded, see subsection \ref{subsec:markings});
% \item \textsf{xparse};
% \item \textsf{etoolbox}.
% \end{itemize}
@@ -228,8 +231,45 @@ and the derived files hf-tikz.ins and
%
% Manual shifts allow to customize dimensions on the base of user's needs: they should be introduced inside round braces as coordinate points. Coordinates, indeed, introduce more degree of freedom from the user's point of view while other solutions are more restrictive. Markers, therefore, are \emph{extensible}. Notice that is is not possible to use markers separately, but they should be declared in pair.
%
+% From version 0.3 it is also possible to exploit a key-interface to set the \emph{shift-offsets}; for example, the previous example, could be done in another manner:
+% \begin{verbatim}
+% \begin{equation}
+% \tikzmarkin[below right offset={0.1,-0.4},above left offset={-0.1,0.5}]
+% {right delim frac 2}
+% x+\dfrac{z}{y}=400
+% \tikzmarkend{right delim frac 2}
+% \end{equation}
+% \end{verbatim}
+% leads to:
+% \begin{equation}
+% \tikzmarkin[below right offset={0.1,-0.4},above left offset={-0.1,0.5}]{right delim frac 2}
+% x+\dfrac{z}{y}=400
+% \tikzmarkend{right delim frac 2}
+% \end{equation}
+%
+% The list of keys available to customize the \emph{shift-offsets} are:
+% \begin{itemize}
+% \item \packoption{left}{-0.1/-0.075}: this key sets the left offset (the second value is active when the \smoption{fill} option is active);
+%
+% \item \packoption{right}{0.1/0.075}: this key sets the right offset (the second value is active when the \smoption{fill} option is active);
+%
+% \item \packoption{above}{0.35}: this key sets the above offset;
+%
+% \item \packoption{below}{-0.18}: this key sets the below offset;
+%
+% \item \packoption{below right}{0.1/0.075,0.35}: this key sets contemporarely the below and the right offsets;
+%
+% \item \packoption{above left}{-0.1/-0.075,0.35}: this optikeyon sets contemporarely the above and the left offsets.
+%
+% \end{itemize}
+%
+% All the keys, not only those ones dedicated to the \emph{shift-offsets}, should be introduced in the first optional argument if \smoption{beamer} option is disables or in the second argument in the other case. In this way, the keys have a local application; if, instead, they are set by means of \verb|\tikzset{}| they are applied to the whole document. For example:
+% \begin{verbatim}
+% \tikzset{above left offset={-0.1,0.325},below right offset={0.1,-0.4}}
+% \end{verbatim}
+%
% \subsection{An advanced example}
-% This example shows how to insert an annotation aligned with a sentence: it requires the \texttt{calc} library from Ti\emph{k}Z. The way in which colors are set is explained in subsection \ref{subsec:customcolors}.
+% This example shows how to insert an annotation aligned with a sentence: it requires the \library{calc} library from Ti\emph{k}Z. The way in which colors are set is explained in subsection \ref{subsec:customcolors}.
% \hfsetfillcolor{red!10}
% \hfsetbordercolor{red}
% \begin{equation*}
@@ -243,11 +283,11 @@ and the derived files hf-tikz.ins and
% \begin{tikzpicture}[remember picture,overlay]
% \coordinate (col-aa) at ($(col)+(1.825,-1.8)$);
% \node[align=left,right] at (col-aa) {\small{Annotation}};
-% \path[-latex,red,draw] (col-aa) -| ($(col)+(0.14,-1.55)$);
+% \path[-stealth,red,draw] (col-aa) -| ($(col)+(0.14,-1.55)$);
% \end{tikzpicture}
% \linebreak
%
-% \subsubsection*{The code}
+% The code is:
% \begin{verbatim}
% \begin{equation*}
% \left.\begin{array}{cc}
@@ -262,11 +302,48 @@ and the derived files hf-tikz.ins and
% % adjust the shift from "col" to move the position of the annotation
% \coordinate (col-aa) at ($(col)+(1.825,-1.8)$);
% \node[align=left,right] at (col-aa) {\small{Annotation}};
-% \path[-latex,red,draw] (col-aa) -| ($(col)+(0.14,-1.55)$);
+% \path[-stealth,red,draw] (col-aa) -| ($(col)+(0.14,-1.55)$);
% \end{tikzpicture}
% \end{verbatim}
%
-% The message here is that, when something is highlighted, the \texttt{marker-id } could be used to subsequently add elements on the image, i.e. the annotation.
+% The message here is that, when something is highlighted, the \texttt{marker-id} could be used to subsequently add elements on the image, i.e. the annotation.
+%
+% From version 0.3 there is a more simpler manner to make annotations: for this the option \smoption{markings} should be enabled.
+%
+% Look the previous example done in this way (the annotation is put a bit close to the highlighted area intentionally):
+% \begin{equation*}
+% \left.\begin{array}{cc}
+% -2\cdot \tikzmarkin[mark at=0.93]{col 1}(0.05,-0.2)(-0.05,0.4)2=& -4 \\
+% -2\cdot 1=& -2 \\
+% -2\cdot 0\tikzmarkend{col 1}=& 0
+% \end{array}\right\} \text{\small Product increases by 2 each time.}
+% \end{equation*}
+
+% \begin{tikzpicture}[remember picture,overlay]
+% \coordinate (col-aa) at ($(col 1)+(1.3,-1.8)$);
+% \node[align=left,right] at (col-aa) {\small{Annotation}};
+% \path[-stealth,red,draw,use marker id] (col-aa) -| (0,0);
+% \end{tikzpicture}
+% \linebreak
+%
+% The code:
+% \begin{verbatim}
+% \begin{equation*}
+% \left.\begin{array}{cc}
+% -2\cdot \tikzmarkin[mark at=0.93]{col 1}(0.05,-0.2)(-0.05,0.4)2=& -4 \\
+% -2\cdot 1=& -2 \\
+% -2\cdot 0\tikzmarkend{col 1}=& 0
+% \end{array}\right\} \text{\small Product increases by 2 each time.}
+% \end{equation*}
+
+% \begin{tikzpicture}[remember picture,overlay]
+% \coordinate (col-aa) at ($(col 1)+(1.3,-1.8)$);
+% \node[align=left,right] at (col-aa) {\small{Annotation}};
+% \path[-stealth,red,draw,use marker id] (col-aa) -| (0,0);
+% \end{tikzpicture}
+% \end{verbatim}
+%
+% Thus, it is sufficient to \smkey{mark at} a given position the rectangle delimiting the highlighted area and then access this coordinate by means of \smkey{use marker id}. Further details are provided in subsection \ref{subsec:markings}.
%
% \section{The options}
% \subsection{The \texttt{beamer} mode}\label{subsec:beamer}
@@ -293,7 +370,7 @@ and the derived files hf-tikz.ins and
%
% \subsection{Customize colors}\label{subsec:customcolors}
% \DescribeMacro{customcolors}^^A
-% This option allows you to customize both the fill and the background color. When using this option, two commands become available:
+% This option allows you to customize both the fill and the border color. When using this option, two commands become available:
% \begin{itemize}
% \item \cs{hfsetfillcolor}
% \item \cs{hfsetbordercolor}
@@ -303,9 +380,9 @@ and the derived files hf-tikz.ins and
% \hfsetfillcolor{red!10}
% \hfsetbordercolor{red}
% \[
-% \tikzmarkin{a}(0.2,-0.4)(-0.2,0.6)
+% \tikzmarkin{z}(0.2,-0.4)(-0.2,0.6)
% \dfrac{100}{x}
-% \tikzmarkend{a}
+% \tikzmarkend{z}
% \]
% \end{verbatim}
% produces:
@@ -322,10 +399,53 @@ and the derived files hf-tikz.ins and
% \hfsetfillcolor{blue!10}
% \hfsetbordercolor{blue}
% \[\tikzmarkin{z1}x+y=400\tikzmarkend{z1}\]
+%
+% From version 0.3 it is also possible to customize the fill and the border color by means of the keys:
+% \begin{itemize}
+% \item \packoption{set fill color}{fancybrown}: this key sets the fill color;
+% \item \packoption{set border color}{fancyviolet}: this key sets the border color.
+% \end{itemize}
+%
+% An example:
+% \begin{verbatim}
+% \[
+% \tikzmarkin[set fill color=green!50!lime!30,set border color=green!40!black]{z-a}(0.2,-0.4)(-0.2,0.6)
+% \dfrac{100}{x}
+% \tikzmarkend{z-a}
+% \]
+% \end{verbatim}
+% The result:
+% \[\tikzmarkin[set fill color=green!50!lime!30,set border color=green!40!black]{z-a}(0.2,-0.4)(-0.2,0.6)\dfrac{100}{x}\tikzmarkend{z-a}\]
+%
+% Notice that:
+% \begin{itemize}
+% \item the definition of colors could be also done via \cs{tikzset} and the application is global
+% \begin{verbatim}
+% \tikzset{set fill color=orange!30,set border color=orange}
+% \end{verbatim}
+% \item global definitions, done via \cs{tikzset} or \cs{hfsetfillcolor} and \cs{hfsetbordercolor} are always overridden by local ones; that is:
+% \end{itemize}
+% \begin{verbatim}
+% \tikzset{set fill color=orange!30,set border color=orange}
+% \[
+% \tikzmarkin[set fill color=green!50!lime!30,set border color=green!40!black]{label}(0.2,-0.4)(-0.2,0.6)
+% \dfrac{100}{x}
+% \tikzmarkend{z-a}
+% \]
+% \end{verbatim}
+% still gives:
+% \tikzset{set fill color=orange!30,set border color=orange}
+% \[
+% \tikzmarkin[set fill color=green!50!lime!30,set border color=green!40!black]{lab}(0.2,-0.4)(-0.2,0.6)
+% \dfrac{100}{x}
+% \tikzmarkend{lab}
+% \]
%
% \subsection{Using shadings}
% \DescribeMacro{shade}^^A
-% The option \verb!shade! activates the possibility of introducing shaded backgrounds besides the fill color currently set. Available shadings are:
+% \hfsetfillcolor{blue!10}
+% \hfsetbordercolor{blue}
+% The option \smoption{shade} activates the possibility of introducing shaded backgrounds besides the fill color currently set. Available shadings are:
% \begin{itemize}
% \item vertical shading;
% \item horizontal shading;
@@ -370,17 +490,14 @@ and the derived files hf-tikz.ins and
%
% \subsection{Avoid the background color}
% \DescribeMacro{nofill}^^A
-% Using the \texttt{nofill} option allows to simply not introduce the background color.
+% Using the \smoption{nofill} option allows to simply not introduce the background color.
% When the option is active, you can not change this behaviour inside the document. Another option to remove the background color, is to set the fill color by means of \cs{hfsetfillcolor} with the same color of the page.
% \subsection{Disable rounded corners}
% \DescribeMacro{norndcorners}^^A
-% To disable the rounded corners, there are actually two ways. The first one, which is general, is the option \texttt{norndcorners}: as the other options it should be provided when loading the package.
+% To disable the rounded corners, there are actually two ways. The first one, which is general, is the option \smoption{norndcorners}: as the other options it should be provided when loading the package.
%
-% There is also a second way, which actually disables the rounded corners locally; you should proceed as follows:
-% \begin{itemize}
-% \item load the package with the \verb|shade| option;
-% \item use the \verb|disable rounded corners| key set to \verb|true|.
-% \end{itemize}
+% There is also a second way, which actually disables the rounded corners locally; you should proceed using the \smkey{disable rounded corners} key set to \verb|true|.
+%
% For example:
% \begin{verbatim}
% \[
@@ -392,6 +509,56 @@ and the derived files hf-tikz.ins and
% The result:
% \[\tikzmarkin[disable rounded corners=true]{mark 1}x+y=400\tikzmarkend{mark 1}\]
%
+% \subsection{The \texttt{markings} option}\label{subsec:markings}
+% \DescribeMacro{markings}^^A
+% Loading the package with the \smoption{markings} option allows to mark some positions on the rectangle delimiting the highlighted area. This is done by setting the key \smkey{mark at}\verb|=<pos>| where \verb|<pos>=[0,1]|; the position could be later on access with \smkey{use marker id}\verb|=<id-num>| where \verb|<id-num>| is the progressive identifier of the positions previously marked.
+%
+% For example:
+% \tikzset{set fill color=orange!30,set border color=orange}
+% \[
+% \tikzmarkin[show markers,mark at=0,]{marker 1}
+% x+y=400
+% \tikzmarkend{marker 1}
+% \tikz[remember picture,overlay]\draw[use marker id,blue,xscale=-1](0,0)arc(270:90:1.5mm);
+% \]
+% is realized by means of:
+% \begin{verbatim}
+% \tikzset{set fill color=orange!30,set border color=orange}
+% \[
+% \tikzmarkin[show markers,mark at=0,]{marker 1}
+% x+y=400
+% \tikzmarkend{marker 1}
+% \tikz[remember picture,overlay]\draw[use marker id,blue,xscale=-1](0,0)arc(270:90:1.5mm);
+% \]
+% \end{verbatim}
+%
+% Actually, it is possible to mark more than one point:
+% \[
+% \tikzmarkin[show markers,mark at=0,mark at=0.55]{marker 2}
+% x+y=400
+% \tikzmarkend{marker 2}
+% \tikz[remember picture,overlay]\draw[use marker id=1,blue,xscale=-1](0,0)arc(270:90:1.5mm);
+% \tikz[remember picture,overlay]\draw[use marker id=2,blue](0,0)arc(270:90:1.5mm);
+% \]
+% by referring them in order as they have been marked:
+% \begin{verbatim}
+% \[
+% \tikzmarkin[show markers,mark at=0,mark at=0.55]{marker 2}
+% x+y=400
+% \tikzmarkend{marker 2}
+% \tikz[remember picture,overlay]\draw[use marker id=1,blue,xscale=-1](0,0)arc(270:90:1.5mm);
+% \tikz[remember picture,overlay]\draw[use marker id=2,blue](0,0)arc(270:90:1.5mm);
+% \]
+% \end{verbatim}
+%
+% The markers are visible when the \smkey{show markers} key is present, but for annotations it is preferable to not show them (by defaul they are not); moreover, markes can be customized:
+% \begin{itemize}
+% \item \packoption{marker size}{1pt}: this key sets the radius of the marker;
+% \item \packoption{marker color}{blue}: this key sets the color of the marker.
+% \end{itemize}
+%
+% The option necessitates of the \library{decorations.markings} from Ti\textit{k}Z: this library, however, is not loaded always, but just in case the \smoption{markings} option is active.
+%
% \StopEventually{\PrintChanges}
%
% \section{Implementation}
@@ -406,8 +573,10 @@ and the derived files hf-tikz.ins and
\RequirePackage{xparse}
\RequirePackage{etoolbox}
% \end{macrocode}
+%
% This warning is arised at first compilation run, to inform that a second run is necessary to get the final result. The code
% used as base is taken from \href{http://tex.stackexchange.com/a/82072/13304}{this answer in TeX.SX}.
+%
% \begin{macrocode}
\AtEndDocument{%
\let\oldpgfsyspdfmark\pgfsyspdfmark
@@ -422,8 +591,10 @@ and the derived files hf-tikz.ins and
\fi
}}
% \end{macrocode}
+%
% \subsection{Options definition}
% In this subsection the definitions of pre-defined colors and options are shown.
+%
% \begin{macrocode}
%% Colors
@@ -443,6 +614,10 @@ and the derived files hf-tikz.ins and
\DeclareOption{customcolors}{
\def\hfsetfillcolor#1{\renewcommand{\fcol}{#1}}
\def\hfsetbordercolor#1{\renewcommand{\bcol}{#1}}
+\pgfkeys{/tikz/.cd,
+ set fill color/.code={\renewcommand{\fcol}{#1}},
+ set border color/.code={\renewcommand{\bcol}{#1}}
+ }
}
\newbool{shade}
@@ -457,9 +632,15 @@ and the derived files hf-tikz.ins and
\boolfalse{norndcorners}
\DeclareOption{norndcorners}{\booltrue{norndcorners}}
+\newbool{markings}
+\boolfalse{markings}
+\DeclareOption{markings}{\booltrue{markings}}
+
\ProcessOptions
% \end{macrocode}
-% This is the keys definition of the way in which it is possible to locally disable rounded corners.
+%
+% The keys definition to locally disable rounded corners.
+%
% \begin{macrocode}
\pgfkeys{/tikz/.cd,%
not use rounded corners/.is choice,%
@@ -471,6 +652,94 @@ and the derived files hf-tikz.ins and
not use rounded corners=#1,%
},%
disable rounded corners/.default=false,%
+}%
+
+% \end{macrocode}
+%
+% The keys definition of the offsets: the initial values change according to the presence of \smoption{fill} option to compatibility reasons.
+%
+% \begin{macrocode}
+
+\ifbool{fill}{%
+ \pgfkeys{/tikz/.cd,%
+ left offset/.initial=-0.1,
+ right offset/.initial=0.1,
+ above offset/.initial=0.35,
+ below offset/.initial=-0.18,
+ }
+}{
+ \pgfkeys{/tikz/.cd,%
+ left offset/.initial=-0.075,
+ right offset/.initial=0.075,
+ above offset/.initial=0.35,
+ below offset/.initial=-0.18,
+ }
+}
+
+
+\pgfkeys{/tikz/.cd,%
+ left offset/.get=\leftoff,
+ left offset/.store in=\leftoff,
+ right offset/.get=\rightoff,
+ right offset/.store in=\rightoff,
+ above offset/.get=\aboveoff,
+ above offset/.store in=\aboveoff,
+ below offset/.get=\belowoff,
+ below offset/.store in=\belowoff,
+ below right offset/.initial={\rightoff,\belowoff},
+ below right offset/.get=\belowrightoff,
+ below right offset/.store in=\belowrightoff,
+ above left offset/.initial={\leftoff,\aboveoff},
+ above left offset/.get=\aboveleftoff,
+ above left offset/.store in=\aboveleftoff,
+}%
+% \end{macrocode}
+%
+% The keys and style definition of the markings: they are active when the \smoption{markings} option is present. This is a feature request from Bodo Manthey and the implementation is taken from Jake's \href{http://tex.stackexchange.com/a/25940/13304}{answer in TeX.SX}: thanks to both.
+%
+% \begin{macrocode}
+\ifbool{markings}{
+ \usetikzlibrary{decorations.markings}
+ \newif\ifshowmarkers
+ \pgfkeys{/tikz/show markers/.is if=showmarkers}
+ \pgfkeys{/tikz/show markers=false}
+
+ \pgfkeys{/tikz/.cd,%
+ marker color/.initial=blue,
+ marker color/.get=\colmarker,
+ marker color/.store in=\colmarker,
+ marker size/.initial=1pt,
+ marker size/.get=\sizemarker,
+ marker size/.store in=\sizemarker,
+ }
+
+ \tikzset{
+ mark at/.style={
+ decoration={
+ markings,
+ mark=
+ at position #1
+ with
+ {
+ \coordinate (marker point-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,0pt);
+ \coordinate (marker unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (1,0pt);
+ \coordinate (marker orthogonal unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,1);
+ \ifshowmarkers% conditional to make them appear just when invoked
+ \draw[draw=none,fill=\colmarker,radius=\sizemarker] (0,0) circle ;
+ \else
+ \relax
+ \fi
+ }
+ },
+ postaction=decorate
+ },
+ use marker id/.style={
+ shift=(marker point-#1),
+ x=(marker unit vector-#1),
+ y=(marker orthogonal unit vector-#1)
+ },
+ use marker id/.default=1,
+ }
}
% \end{macrocode}
% \subsection{General settings}
@@ -603,7 +872,7 @@ and the derived files hf-tikz.ins and
\ifbool{beamer}{%true-beamer
\ifbool{fill}{%true-fill
\ifbool{shade}{%true-shade
- \NewDocumentCommand{\tikzmarkin}{r<> d[] m D(){0.1,-0.18} D(){-0.1,0.35}}{%
+ \NewDocumentCommand{\tikzmarkin}{r<> o m D(){\belowrightoff} D(){\aboveleftoff}}{%
\IfNoValueTF{#2}{%true-val
\only<#1>{\tikz[remember picture,overlay]
\draw[line width=1pt,rectangle,fill=\fcol,draw=\bcol]
@@ -611,28 +880,42 @@ and the derived files hf-tikz.ins and
;}
}{%false-val
\only<#1>{\tikz[remember picture,overlay]
- \draw[line width=1pt,rectangle,fill=\fcol,#2,draw=\bcol]
+ \draw[line width=1pt,rectangle,fill=\fcol,draw=\bcol,#2]
(pic cs:#3) ++(#4) rectangle (#5) node [anchor=base] (#3){}
;}}
}
}{%false-shade
- \NewDocumentCommand{\tikzmarkin}{r<> m D(){0.1,-0.18} D(){-0.1,0.35}}{%
- \only<#1>{\tikz[remember picture,overlay]
- \draw[line width=1pt,rectangle,fill=\fcol,draw=\bcol]
- (pic cs:#2) ++(#3) rectangle (#4) node [anchor=base] (#2){}
- ;}}
+ \NewDocumentCommand{\tikzmarkin}{r<> o m D(){\belowrightoff} D(){\aboveleftoff}}{%
+ \IfNoValueTF{#2}{%true-val
+ \only<#1>{\tikz[remember picture,overlay]
+ \draw[line width=1pt,rectangle,fill=\fcol,draw=\bcol]
+ (pic cs:#3) ++(#4) rectangle (#5) node [anchor=base] (#3){}
+ ;}
+ }{%false-val
+ \only<#1>{\tikz[remember picture,overlay]
+ \draw[line width=1pt,rectangle,fill=\fcol,draw=\bcol,#2]
+ (pic cs:#3) ++(#4) rectangle (#5) node [anchor=base] (#3){}
+ ;}}
+ }
}
}{%false-fill
- \NewDocumentCommand{\tikzmarkin}{r<> m D(){0.075,-0.18} D(){-0.075,0.35}}{%
- \only<#1>{\tikz[remember picture,overlay]
- \draw[line width=1pt,rectangle,draw=\bcol]
- (pic cs:#2) ++(#3) rectangle (#4) node [anchor=base] (#2){}
- ;}}
- }
+ \NewDocumentCommand{\tikzmarkin}{r<> o m D(){\belowrightoff} D(){\aboveleftoff}}{%
+ \IfNoValueTF{#2}{%true-val
+ \only<#1>{\tikz[remember picture,overlay]
+ \draw[line width=1pt,rectangle,draw=\bcol]
+ (pic cs:#3) ++(#4) rectangle (#5) node [anchor=base] (#3){}
+ ;}
+ }{%false-val
+ \only<#1>{\tikz[remember picture,overlay]
+ \draw[line width=1pt,rectangle,draw=\bcol,#2]
+ (pic cs:#3) ++(#4) rectangle (#5) node [anchor=base] (#3){}
+ ;}}
+ }
+ }
}{%false-beamer
\ifbool{fill}{%true-fill
\ifbool{shade}{%true-shade
- \NewDocumentCommand{\tikzmarkin}{d[] m D(){0.1,-0.18} D(){-0.1,0.35}}{%
+ \NewDocumentCommand{\tikzmarkin}{o m D(){\belowrightoff} D(){\aboveleftoff}}{%
\IfNoValueTF{#1}{%true-val
\tikz[remember picture,overlay]
\draw[line width=1pt,rectangle,fill=\fcol,draw=\bcol]
@@ -640,29 +923,46 @@ and the derived files hf-tikz.ins and
;
}{%false-val
\tikz[remember picture,overlay]
- \draw[line width=1pt,rectangle,fill=\fcol,#1,draw=\bcol]
+ \draw[line width=1pt,rectangle,fill=\fcol,draw=\bcol,#1]
(pic cs:#2) ++(#3) rectangle (#4) node [anchor=base] (#2){}
;}}
}{%false-shade
- \NewDocumentCommand{\tikzmarkin}{m D(){0.1,-0.18} D(){-0.1,0.35}}{%
+ \NewDocumentCommand{\tikzmarkin}{o m D(){\belowrightoff} D(){\aboveleftoff}}{%
+ \IfNoValueTF{#1}{%true-val
+ \tikz[remember picture,overlay]
+ \draw[line width=1pt,rectangle,fill=\fcol,draw=\bcol]
+ (pic cs:#2) ++(#3) rectangle (#4) node [anchor=base] (#2){}
+ ;
+ }{%false-val
\tikz[remember picture,overlay]
- \draw[line width=1pt,rectangle,fill=\fcol,draw=\bcol]
- (pic cs:#1) ++(#2) rectangle (#3) node [anchor=base] (#1){}
- ;}
+ \draw[line width=1pt,rectangle,fill=\fcol,draw=\bcol,#1]
+ (pic cs:#2) ++(#3) rectangle (#4) node [anchor=base] (#2){}
+ ;}}
}
}{%false-fill
- \NewDocumentCommand{\tikzmarkin}{m D(){0.075,-0.18} D(){-0.075,0.35}}{%
- \tikz[remember picture,overlay]
- \draw[line width=1pt,rectangle,draw=\bcol]
- (pic cs:#1) ++(#2) rectangle (#3) node [anchor=base] (#1){}
- ;}
+ \NewDocumentCommand{\tikzmarkin}{o m D(){\belowrightoff} D(){\aboveleftoff}}{%
+ \IfNoValueTF{#1}{%true-val
+ \tikz[remember picture,overlay]
+ \draw[line width=1pt,rectangle,draw=\bcol]
+ (pic cs:#2) ++(#3) rectangle (#4) node [anchor=base] (#2){}
+ ;
+ }{%false-val
+ \tikz[remember picture,overlay]
+ \draw[line width=1pt,rectangle,draw=\bcol,#1]
+ (pic cs:#2) ++(#3) rectangle (#4) node [anchor=base] (#2){}
+ ;}}
+% \NewDocumentCommand{\tikzmarkin}{m D(){0.075,-0.18} D(){-0.075,0.35}}{%
+% \tikz[remember picture,overlay]
+% \draw[line width=1pt,rectangle,draw=\bcol]
+% (pic cs:#1) ++(#2) rectangle (#3) node [anchor=base] (#1){}
+% ;}
}
}
}{%false-norndcorners
\ifbool{beamer}{%true-beamer
\ifbool{fill}{%true-fill
\ifbool{shade}{%true-shade
- \NewDocumentCommand{\tikzmarkin}{r<> d[] m D(){0.1,-0.18} D(){-0.1,0.35}}{%
+ \NewDocumentCommand{\tikzmarkin}{r<> o m D(){\belowrightoff} D(){\aboveleftoff}}{%
\IfNoValueTF{#2}{%true-val
\only<#1>{\tikz[remember picture,overlay]
\draw[line width=1pt,rectangle,disable rounded corners,fill=\fcol,draw=\bcol]
@@ -670,28 +970,42 @@ and the derived files hf-tikz.ins and
;}
}{%false-val
\only<#1>{\tikz[remember picture,overlay]
- \draw[line width=1pt,rectangle,disable rounded corners,fill=\fcol,#2,draw=\bcol]
+ \draw[line width=1pt,rectangle,disable rounded corners,fill=\fcol,draw=\bcol,#2]
(pic cs:#3) ++(#4) rectangle (#5) node [anchor=base] (#3){}
;}}
}
}{%false-shade
- \NewDocumentCommand{\tikzmarkin}{r<> m D(){0.1,-0.18} D(){-0.1,0.35}}{%
- \only<#1>{\tikz[remember picture,overlay]
- \draw[line width=1pt,rectangle,disable rounded corners,fill=\fcol,draw=\bcol]
- (pic cs:#2) ++(#3) rectangle (#4) node [anchor=base] (#2){}
- ;}}
+ \NewDocumentCommand{\tikzmarkin}{r<> o m D(){\belowrightoff} D(){\aboveleftoff}}{%
+ \IfNoValueTF{#2}{%true-val
+ \only<#1>{\tikz[remember picture,overlay]
+ \draw[line width=1pt,rectangle,disable rounded corners,fill=\fcol,draw=\bcol]
+ (pic cs:#3) ++(#4) rectangle (#5) node [anchor=base] (#3){}
+ ;}
+ }{%false-val
+ \only<#1>{\tikz[remember picture,overlay]
+ \draw[line width=1pt,rectangle,disable rounded corners,fill=\fcol,draw=\bcol,#2]
+ (pic cs:#3) ++(#4) rectangle (#5) node [anchor=base] (#3){}
+ ;}}
+ }
}
}{%false-fill
- \NewDocumentCommand{\tikzmarkin}{r<> m D(){0.075,-0.18} D(){-0.075,0.35}}{%
- \only<#1>{\tikz[remember picture,overlay]
- \draw[line width=1pt,rectangle,disable rounded corners,draw=\bcol]
- (pic cs:#2) ++(#3) rectangle (#4) node [anchor=base] (#2){}
- ;}}
+ \NewDocumentCommand{\tikzmarkin}{r<> o m D(){\belowrightoff} D(){\aboveleftoff}}{%
+ \IfNoValueTF{#2}{%true-val
+ \only<#1>{\tikz[remember picture,overlay]
+ \draw[line width=1pt,rectangle,disable rounded corners,draw=\bcol]
+ (pic cs:#3) ++(#4) rectangle (#5) node [anchor=base] (#3){}
+ ;}
+ }{%false-val
+ \only<#1>{\tikz[remember picture,overlay]
+ \draw[line width=1pt,rectangle,disable rounded corners,draw=\bcol,#2]
+ (pic cs:#3) ++(#4) rectangle (#5) node [anchor=base] (#3){}
+ ;}}
+ }
}
}{%false-beamer
\ifbool{fill}{%true-fill
\ifbool{shade}{%true-shade
- \NewDocumentCommand{\tikzmarkin}{d[] m D(){0.1,-0.18} D(){-0.1,0.35}}{%
+ \NewDocumentCommand{\tikzmarkin}{o m D(){\belowrightoff} D(){\aboveleftoff}}{%
\IfNoValueTF{#1}{%true-val
\tikz[remember picture,overlay]
\draw[line width=1pt,rectangle,disable rounded corners,fill=\fcol,draw=\bcol]
@@ -699,22 +1013,34 @@ and the derived files hf-tikz.ins and
;
}{%false-val
\tikz[remember picture,overlay]
- \draw[line width=1pt,rectangle,disable rounded corners,fill=\fcol,#1,draw=\bcol]
+ \draw[line width=1pt,rectangle,disable rounded corners,fill=\fcol,draw=\bcol,#1]
(pic cs:#2) ++(#3) rectangle (#4) node [anchor=base] (#2){}
;}}
}{%false-shade
- \NewDocumentCommand{\tikzmarkin}{m D(){0.1,-0.18} D(){-0.1,0.35}}{%
+ \NewDocumentCommand{\tikzmarkin}{o m D(){\belowrightoff} D(){\aboveleftoff}}{%
+ \IfNoValueTF{#1}{%true-val
+ \tikz[remember picture,overlay]
+ \draw[line width=1pt,rectangle,disable rounded corners,fill=\fcol,draw=\bcol]
+ (pic cs:#2) ++(#3) rectangle (#4) node [anchor=base] (#2){}
+ ;
+ }{%false-val
\tikz[remember picture,overlay]
- \draw[line width=1pt,rectangle,disable rounded corners,fill=\fcol,draw=\bcol]
- (pic cs:#1) ++(#2) rectangle (#3) node [anchor=base] (#1){}
- ;}
+ \draw[line width=1pt,rectangle,disable rounded corners,fill=\fcol,draw=\bcol,#1]
+ (pic cs:#2) ++(#3) rectangle (#4) node [anchor=base] (#2){}
+ ;}}
}
}{%false-fill
- \NewDocumentCommand{\tikzmarkin}{m D(){0.075,-0.18} D(){-0.075,0.35}}{%
- \tikz[remember picture,overlay]
- \draw[line width=1pt,rectangle,disable rounded corners,draw=\bcol]
- (pic cs:#1) ++(#2) rectangle (#3) node [anchor=base] (#1){}
- ;}
+ \NewDocumentCommand{\tikzmarkin}{o m D(){\belowrightoff} D(){\aboveleftoff}}{%
+ \IfNoValueTF{#1}{%true-val
+ \tikz[remember picture,overlay]
+ \draw[line width=1pt,rectangle,disable rounded corners,draw=\bcol]
+ (pic cs:#2) ++(#3) rectangle (#4) node [anchor=base] (#2){}
+ ;
+ }{%false-val
+ \tikz[remember picture,overlay]
+ \draw[line width=1pt,rectangle,disable rounded corners,draw=\bcol,#1]
+ (pic cs:#2) ++(#3) rectangle (#4) node [anchor=base] (#2){}
+ ;}}
}
}
}
diff --git a/Master/texmf-dist/source/latex/hf-tikz/hf-tikz.ins b/Master/texmf-dist/source/latex/hf-tikz/hf-tikz.ins
index 6bd2725452a..f182be38a04 100644
--- a/Master/texmf-dist/source/latex/hf-tikz/hf-tikz.ins
+++ b/Master/texmf-dist/source/latex/hf-tikz/hf-tikz.ins
@@ -14,7 +14,6 @@
%% *
%% * See http://www.latex-project.org/lppl.txt
%% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-%%
\input docstrip.tex
\keepsilent
\askforoverwritefalse
@@ -28,7 +27,6 @@
*
* See http://www.latex-project.org/lppl.txt
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
\endpreamble
\postamble
@@ -48,7 +46,6 @@ This work consists of the file hf-tikz.dtx
and the derived files hf-tikz.ins and
hf-tikz.pdf
hf-tikz.sty.
-
\endpostamble
\usedir{tex/latex/hf-tikz}
\generate{
@@ -56,6 +53,8 @@ and the derived files hf-tikz.ins and
}
\endbatchfile
+
+
%%
%% Copyright (C) 2012 by Claudio Fiandrino <claudio.fiandrino@gmail.com>
%%
@@ -73,6 +72,5 @@ and the derived files hf-tikz.ins and
%% and the derived files hf-tikz.ins and
%% hf-tikz.pdf
%% hf-tikz.sty.
-%%
%%
%% End of file `hf-tikz.ins'.