texlive[51823] Master: matrix-skeleton (5aug19)
commits+karl at tug.org
commits+karl at tug.org
Mon Aug 5 23:06:42 CEST 2019
Revision: 51823
http://tug.org/svn/texlive?view=revision&revision=51823
Author: karl
Date: 2019-08-05 23:06:42 +0200 (Mon, 05 Aug 2019)
Log Message:
-----------
matrix-skeleton (5aug19)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/matrix-skeleton/
trunk/Master/texmf-dist/doc/latex/matrix-skeleton/LICENSE
trunk/Master/texmf-dist/doc/latex/matrix-skeleton/README.md
trunk/Master/texmf-dist/doc/latex/matrix-skeleton/example.pdf
trunk/Master/texmf-dist/doc/latex/matrix-skeleton/example.tex
trunk/Master/texmf-dist/doc/latex/matrix-skeleton/manual.pdf
trunk/Master/texmf-dist/doc/latex/matrix-skeleton/manual.tex
trunk/Master/texmf-dist/tex/latex/matrix-skeleton/
trunk/Master/texmf-dist/tex/latex/matrix-skeleton/pgflibrarymatrix.skeleton.code.tex
trunk/Master/texmf-dist/tex/latex/matrix-skeleton/tikzlibrarymatrix.skeleton.code.tex
trunk/Master/tlpkg/tlpsrc/matrix-skeleton.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/matrix-skeleton/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/matrix-skeleton/LICENSE (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/matrix-skeleton/LICENSE 2019-08-05 21:06:42 UTC (rev 51823)
@@ -0,0 +1,5 @@
+Copyright (c) 2013-2019, Nicolas Dudebout <nicolas.dudebout at gatech.edu>
+
+Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Added: trunk/Master/texmf-dist/doc/latex/matrix-skeleton/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/matrix-skeleton/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/matrix-skeleton/README.md 2019-08-05 21:06:42 UTC (rev 51823)
@@ -0,0 +1,34 @@
+`matrix.skeleton` is a `PGF/TikZ` library that simplifies working with multiple matrix nodes.
+To do so, `matrix.skeleton` correctly aligns groups of nodes with the content of the whole matrix.
+Furthermore, `matrix.skeleton` provides rows and columns for easy styling.
+
+For example, the following picture is easily typeset:
+
+![Example](example.pdf)
+
+with this simple code:
+
+```TeX
+\documentclass[tikz]{standalone}
+
+\usetikzlibrary{matrix.skeleton}
+
+\begin{document}
+ \begin{tikzpicture}
+ \matrix (m) [matrix of math nodes,
+ style odd rows on layer={background}{fill=black!25}] {
+ 1 & \frac{\frac{16}{2}}{4} & 3 \\
+ 4.0000001 & 5 & 6 \\
+ 7 & 8 & 9 \\
+ 10 & 11 & 12 \\
+ 13 & 14 & 15 \\
+ };
+ \fitandstyle{(m-cell-1-1) (m-cell-2-2)}{draw=red, fill=red!25, opacity=0.5}
+ \end{tikzpicture}
+\end{document}
+```
+
+More information and examples are available in [the manual](manual.pdf).
+
+Author: Nicolas Dudebout
+License: ISC
Property changes on: trunk/Master/texmf-dist/doc/latex/matrix-skeleton/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/matrix-skeleton/example.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/matrix-skeleton/example.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/matrix-skeleton/example.pdf 2019-08-05 21:05:47 UTC (rev 51822)
+++ trunk/Master/texmf-dist/doc/latex/matrix-skeleton/example.pdf 2019-08-05 21:06:42 UTC (rev 51823)
Property changes on: trunk/Master/texmf-dist/doc/latex/matrix-skeleton/example.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/matrix-skeleton/example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/matrix-skeleton/example.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/matrix-skeleton/example.tex 2019-08-05 21:06:42 UTC (rev 51823)
@@ -0,0 +1,17 @@
+\documentclass[tikz]{standalone}
+
+\usetikzlibrary{matrix.skeleton}
+
+\begin{document}
+ \begin{tikzpicture}
+ \matrix (m) [matrix of math nodes,
+ style odd rows on layer={background}{fill=black!25}] {
+ 1 & \frac{\frac{16}{2}}{4} & 3 \\
+ 4.0000001 & 5 & 6 \\
+ 7 & 8 & 9 \\
+ 10 & 11 & 12 \\
+ 13 & 14 & 15 \\
+ };
+ \fitandstyle{(m-cell-1-1) (m-cell-2-2)}{draw=red, fill=red!25, opacity=0.5}
+ \end{tikzpicture}
+\end{document}
Property changes on: trunk/Master/texmf-dist/doc/latex/matrix-skeleton/example.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/matrix-skeleton/manual.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/matrix-skeleton/manual.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/matrix-skeleton/manual.pdf 2019-08-05 21:05:47 UTC (rev 51822)
+++ trunk/Master/texmf-dist/doc/latex/matrix-skeleton/manual.pdf 2019-08-05 21:06:42 UTC (rev 51823)
Property changes on: trunk/Master/texmf-dist/doc/latex/matrix-skeleton/manual.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/matrix-skeleton/manual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/matrix-skeleton/manual.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/matrix-skeleton/manual.tex 2019-08-05 21:06:42 UTC (rev 51823)
@@ -0,0 +1,397 @@
+\documentclass{scrartcl}
+
+\usepackage{tikz}
+\usetikzlibrary{matrix.skeleton}
+
+\usepackage[justification=centering,labelfont={sf,bf,up},labelsep=period,font=small]{caption}
+\captionsetup[figure]{position=bottom,singlelinecheck=false}
+\usepackage[font=small,justification=centering]{subcaption}
+\usepackage{float}
+\floatstyle{komabelow}
+\restylefloat{figure}
+
+\usepackage{xspace}
+
+\usepackage{hyperref}
+\hypersetup{ colorlinks=true
+ , linkcolor=blue!75
+ , citecolor=black
+ , urlcolor=blue!75
+ }
+
+\usepackage[noabbrev, capitalize]{cleveref}
+
+\tikzset{highlight/.style={draw=#1!75, fill=#1!25, rounded corners=1pt}}
+\newcommand\code\texttt
+\newcommand{\TikZ}{Ti\textit{k}Z\xspace}
+
+\title{\texttt{matrix.skeleton}'s Manual}
+\author{Nicolas Dudebout}
+\date{}
+
+\begin{document}
+
+\maketitle
+
+\section{Introduction}
+
+The \TikZ \code{matrix} library places nodes on a grid.
+However, this grid is discarded after the nodes have been placed.
+As a result, certain constructions involving multiple nodes become cumbersome.
+The following two examples highlight some of the difficulties.
+
+\subsection{Alignment Issues with \code{fit}}
+
+The \code{fit} library is used to highlight a subset of nodes in a matrix.
+If all the nodes in the matrix have the same dimension, as in~\cref{fig:highlighting_identical_dimensions}, \code{fit} produces the desired output.
+
+\begin{figure}[h]
+\centering
+
+\begin{subfigure}{0.45\textwidth}
+\centering
+\begin{tikzpicture}
+\matrix (m) [matrix of math nodes, column sep = 3pt, row sep = 3pt] {
+1 & 2 \\
+3 & 4 \\
+5 & 6 \\
+};
+\end{tikzpicture}
+\caption{Input matrix}
+\end{subfigure}
+%
+\begin{subfigure}{0.45\textwidth}
+\centering
+\begin{tikzpicture}
+\matrix (m) [matrix of math nodes, column sep = 3pt, row sep = 3pt] {
+1 & 2 \\
+3 & 4 \\
+5 & 6 \\
+};
+
+\fitandstyle[background]{(m-1-1) (m-2-1)}{highlight = yellow}
+\fitandstyle[background]{(m-1-2) (m-2-2)}{highlight = red}
+\fitandstyle[background]{(m-3-1) (m-3-2)}{highlight = green}
+\end{tikzpicture}
+\caption{Desired output and result with \code{fit}}
+\end{subfigure}
+
+\caption{Highlighting in a matrix with nodes of identical dimensions}
+\label{fig:highlighting_identical_dimensions}
+\end{figure}
+
+However, if the nodes have different heights and widths, as illustrated in~\cref{fig:highlighting_different_dimensions}, some alignment issues arise.
+
+\begin{figure}[h]
+\centering
+\begin{subfigure}{0.3\textwidth}
+\centering
+
+\begin{tikzpicture}
+\matrix (m) [matrix of math nodes, column sep = 3pt, row sep = 3pt] {
+1 & \frac{\frac{16}{4}}{1 + \frac{2}{2}} \\
+2.999999 & 4 \\
+5 & 6.000001 \\
+};
+\end{tikzpicture}
+\caption{Input matrix}
+\end{subfigure}
+%
+\begin{subfigure}{0.3\textwidth}
+\centering
+
+\begin{tikzpicture}
+\matrix (m) [matrix of math nodes, column sep = 3pt, row sep = 3pt, label skeleton] {
+1 & \frac{\frac{16}{4}}{1 + \frac{2}{2}} \\
+2.999999 & 4 \\
+5 & 6.000001 \\
+};
+
+\fitandstyle[background]{(m-cell-1-1) (m-cell-2-1)}{highlight = yellow}
+\fitandstyle[background]{(m-cell-1-2) (m-cell-2-2)}{highlight = red}
+\fitandstyle[background]{(m-cell-3-1) (m-cell-3-2)}{highlight = green}
+\end{tikzpicture}
+\caption{Desired output}
+\end{subfigure}
+%
+\begin{subfigure}{0.3\textwidth}
+\centering
+
+\begin{tikzpicture}
+\matrix (m) [matrix of math nodes, column sep = 3pt, row sep = 3pt] {
+1 & \frac{\frac{16}{4}}{1 + \frac{2}{2}} \\
+2.999999 & 4 \\
+5 & 6.000001 \\
+};
+
+\fitandstyle[background]{(m-1-1) (m-2-1)}{highlight = yellow}
+\fitandstyle[background]{(m-1-2) (m-2-2)}{highlight = red}
+\fitandstyle[background]{(m-3-1) (m-3-2)}{highlight = green}
+\end{tikzpicture}
+\caption{Result with \code{fit}}
+\end{subfigure}
+
+\caption{Highlighting in a matrix with nodes of different dimensions}
+\label{fig:highlighting_different_dimensions}
+\end{figure}
+
+These problems can be addressed using \code{minimum width} and \code{minimum height}.
+However, adjusting manually these parameters in every matrix is a waste of time.
+
+The \code{matrix.skeleton} library provides a clean solution through the use of nodes called~\code{cells}.
+These \code{cells} and other skeleton nodes are described in~\cref{sec:skeleton}.
+
+\subsection{Working with Rows and Columns}
+
+The readability of a matrix can sometimes be improved by adding a background on every other row.
+This simple task is not easily achievable with \code{matrix} alone.
+The style \code{every odd column} only affects the nodes of the said columns.
+There is no real column object to work with.
+
+The \code{matrix.skeleton} library provides \TikZ styles to achieve this goal easily.
+These styles are described in~\cref{sec:styling}
+
+\section{Skeleton}
+\label{sec:skeleton}
+
+\subsection{Nodes}
+
+\code{matrix.skeleton} works by positioning a set of nodes to recreate the \code{matrix} grid.
+The eight types of such nodes are illustrated in~\cref{fig:skeleton_nodes}.
+
+\begin{figure}[h]
+\centering
+\begin{subfigure}{0.3\textwidth}
+\centering
+\begin{tikzpicture}
+\matrix (m) [draw, matrix of nodes, column sep=10pt, row sep=10pt, label skeleton] {
+1 & 2 & 3 \\
+4 & 5 & 6 \\
+7 & 8 & 9 \\
+};
+
+\fitandstyle[background]{(m-cell-1-1)}{fill=yellow!30}
+\fitandstyle[background]{(m-row-2)}{fill=red!25}
+\fitandstyle[background]{(m-column-3)}{fill=green!25, opacity=.75}
+\end{tikzpicture}
+\caption{\textcolor{yellow!80!orange}{Cell}, \textcolor{red!50}{row}, and \textcolor{green!60}{column}}
+\end{subfigure}
+%
+\begin{subfigure}{0.3\textwidth}
+\centering
+\begin{tikzpicture}
+\matrix (m) [draw, matrix of nodes, column sep=10pt, row sep=10pt, label skeleton] {
+1 & 2 & 3 \\
+4 & 5 & 6 \\
+7 & 8 & 9 \\
+};
+
+\fitandstyle[background]{(m-inter-row-1)}{fill=red!25}
+\fitandstyle[background]{(m-inter-column-2)}{fill=green!25, opacity=.75}
+\end{tikzpicture}
+\caption{\textcolor{red!50}{Inter-row} and \textcolor{green!60}{inter-column}}
+\end{subfigure}
+%
+\begin{subfigure}{0.3\textwidth}
+\centering
+\begin{tikzpicture}
+\matrix (m) [draw, matrix of nodes, column sep=10pt, row sep=10pt, label skeleton] {
+1 & 2 & 3 \\
+4 & 5 & 6 \\
+7 & 8 & 9 \\
+};
+\fitandstyle[background]{(m-tiling-cell-1-1)}{fill=yellow!30}
+\fitandstyle[background]{(m-tiling-row-2)}{fill=red!25}
+\fitandstyle[background]{(m-tiling-column-3)}{fill=green!25, opacity=.75}
+\end{tikzpicture}
+\caption{\textcolor{yellow!80!orange}{Tiling cell}, \textcolor{red!50}{tiling row}, and \textcolor{green!60}{tiling column}}
+\end{subfigure}
+\caption{Skeleton nodes}
+\label{fig:skeleton_nodes}
+\end{figure}
+
+\subsection{Using \code{matrix.skeleton}}
+
+The recommended way of using \code{matrix.skeleton} is through \TikZ.
+First, load the library with:
+\begin{verbatim}
+ \usetikzlibrary{matrix.skeleton}
+\end{verbatim}
+Then add an option to your matrix:
+\begin{verbatim}
+ \matrix (m) [label skeleton] {...};
+\end{verbatim}
+This creates a set of nodes that can be used for styling.
+For example, the nodes illustrated in~\cref{fig:skeleton_nodes} are named: \code{m-cell-1-1}, \code{m-row-2}, \code{m-column-3}, \code{m-inter-row-1}, \code{m-inter-column-2}, \code{m-tiling-cell-1}, \code{m-tiling-row-2}, and \code{m-tiling-column-3}.
+
+\section{Styling}
+\label{sec:styling}
+
+The skeleton nodes are PGF nodes not meant to be styled.
+Styles should be applied to nodes whose shapes depend on the skeleton ones.
+
+\subsection{Macros}
+
+Styling in \code{matrix.skeleton} is done with the~\code{fit} library.
+The following macro creates a \code{fit} node with the specified style:
+\begin{verbatim}
+ \fitandstyle{(m-cell-1-1) (m-cell-2-2)}{draw=red};
+\end{verbatim}
+
+It takes an optional argument to place the node in a \code{pgfonlayer} environment:
+\begin{verbatim}
+ \fitandstyle[background]{(m-cell-1-1) (m-cell-2-2)}{fill=red};
+\end{verbatim}
+
+\subsection{\TikZ \code{matrix} Options}
+
+Common styling options are also provided as \TikZ options.
+These options call~\code{label skeleton} before styling the appropriate nodes.
+They take the following form:
+\begin{verbatim}
+ \matrix (m) [style odd rows = {draw=red}] {...};
+\end{verbatim}
+
+\begin{verbatim}
+ \matrix (m) [style odd tiling rows = {draw=red}] {...};
+\end{verbatim}
+
+\begin{verbatim}
+ \matrix (m) [style grid = {draw}] {...};
+\end{verbatim}
+
+\begin{verbatim}
+ \matrix (m) [style tiling grid = {draw}] {...};
+\end{verbatim}
+
+All of these options have an \code{on layer} variant taking the following form:
+\begin{verbatim}
+ \matrix (m) [style odd rows on layer = {background}{fill=red}] {...};
+\end{verbatim}
+
+\section{Examples}
+
+The following examples illustrate the styling capabilities offered by \code{matrix.skeleton}.
+
+\subsection{Grid}
+
+\begin{figure}[h]
+\centering
+\begin{tikzpicture}
+\matrix (m) [matrix of math nodes, style contour = {draw, very thick}, style grid = {draw, thin}] {
+1 & \frac{\frac{16}{4}}{1 + \frac{2}{2}} & 3 \\
+3.999999 & 5 & 6 \\
+7 & 8.000001 & 3 + 3 + 3 \\
+};
+\end{tikzpicture}
+\end{figure}
+
+\begin{verbatim}
+\begin{tikzpicture}
+\matrix (m) [matrix of math nodes, style contour = {draw, very thick},
+ style grid = {draw, thin}] {
+1 & \frac{\frac{16}{4}}{1 + \frac{2}{2}} & 3 \\
+3.999999 & 5 & 6 \\
+7 & 8.000001 & 3 + 3 + 3 \\
+};
+\end{tikzpicture}
+\end{verbatim}
+
+\subsection{Rows}
+
+\begin{figure}[h]
+\centering
+\begin{tikzpicture}
+\matrix (m) [matrix of math nodes, row sep = 10pt, style odd rows on layer={background}{fill=green!25}, style even rows on layer={background}{fill=yellow!30}] {
+1 & \frac{\frac{16}{4}}{1 + \frac{2}{2}} & 3 \\
+3.999999 & 5 & 6 \\
+7 & 8.000001 & 3 + 3 + 3 \\
+};
+
+\fitandstyle{(m-inter-row-1)}{fill=red!25}
+\fitandstyle{(m-inter-row-2)}{fill=red!25}
+\end{tikzpicture}
+\end{figure}
+
+\begin{verbatim}
+\begin{tikzpicture}
+\matrix (m) [matrix of math nodes, row sep = 10pt,
+ style odd rows on layer={background}{fill=green!25},
+ style even rows on layer={background}{fill=yellow!30}] {
+1 & \frac{\frac{16}{4}}{1 + \frac{2}{2}} & 3 \\
+3.999999 & 5 & 6 \\
+7 & 8.000001 & 3 + 3 + 3 \\
+};
+
+\fitandstyle{(m-inter-row-1)}{fill=red!25}
+\fitandstyle{(m-inter-row-2)}{fill=red!25}
+\end{tikzpicture}
+\end{verbatim}
+
+\subsection{Checker Board}
+
+This example is inspired by the following \href{http://tex.stackexchange.com}{\TeX{} - \LaTeX{} Stack Exchange} question: \href{http://tex.stackexchange.com/questions/14061/how-can-i-set-the-background-color-of-the-rows-and-columns-of-a-matrix-node-in-t}{How can I set the background color of the rows and columns of a matrix node in Tikz?}
+
+\begin{figure}[h]
+\centering
+\begin{tikzpicture}
+\matrix (m) [draw, matrix of nodes, row sep=2mm, column sep=1mm, nodes={draw, thick, circle, inner sep=1pt}, label skeleton] {
+ & 1 & &[2mm]|[gray]|1\\
+ & & 2 &|[gray]|2\\
+ |[gray]|2 & & &|[gray]|2\\[4mm]
+ 3 & & & 3\\
+};
+\foreach \row in {1, ..., 4} {
+ \foreach \col in {1, ..., 4} {
+ \pgfmathparse{Mod(\row + \col, 2) ? "red!25" : "yellow!30"}
+ \colorlet{squarebg}{\pgfmathresult}
+ \fitandstyle[background]{(m-tiling-cell-\row-\col)}{fill = squarebg}
+ }
+}
+\end{tikzpicture}
+\end{figure}
+
+\newpage
+
+\begin{verbatim}
+\begin{tikzpicture}
+\matrix (m) [draw, matrix of nodes, row sep=2mm, column sep=1mm,
+ nodes={draw, thick, circle, inner sep=1pt}, label skeleton] {
+ & 1 & &[2mm]|[gray]|1\\
+ & & 2 &|[gray]|2\\
+ |[gray]|2 & & &|[gray]|2\\[4mm]
+ 3 & & & 3\\
+};
+\foreach \row in {1, ..., 4} {
+ \foreach \col in {1, ..., 4} {
+ \pgfmathparse{Mod(\row + \col, 2) ? "red!25" : "yellow!30"}
+ \colorlet{squarebg}{\pgfmathresult}
+ \fitandstyle[background]{(m-tiling-cell-\row-\col)}{fill = squarebg}
+ }
+}
+\end{tikzpicture}
+\end{verbatim}
+
+\section{Internals}
+
+\code{matrix.skeleton} was heavily inspired by \href{http://tex.stackexchange.com/users/86/andrew-stacey}{Andrew Stacey}'s \code{matrixcells} \LaTeX{} package.
+It has three distinctive features.
+First, it works with any \code{anchor}.
+Second, it provides finer control with respect to \code{row sep}, \code{column sep}, and \code{inner sep}.
+Third, the skeleton node positioning relies only on \TeX{} and PGF, not on \LaTeX{} or \TikZ.
+
+\code{matrixcells} properly aligns its \code{cells} when the node \code{anchor} is \code{base}.
+However, when the alignment is different it runs into problems, as exposed in the following \href{http://tex.stackexchange.com}{\TeX{} - \LaTeX{} Stack Exchange} question: \href{http://tex.stackexchange.com/questions/128045/matrixcells-problem-with-the-y-axis-only}{Matrixcells problem with the y-axis only}.
+This shortcoming is the result of some loss of information in \code{pgfmodulematrix.code.tex}.
+A dimension used during the placement of nodes is overwritten.
+Therefore, this information is not available to build the grid.
+In \code{matrixcells}, this lost dimension is reconstructed as the average of two other dimensions.
+This method only gives the right dimension when the nodes are anchored at \code{base}.
+To always get proper alignment, the~\code{pgfmodulematrix.code.tex} macro erasing the dimension was rewritten.
+Following \href{http://tex.stackexchange.com/users/3235/percusse}{\code{@percusse}}'s recommendation this change is transparent to the user and does not require updating PGF/\TikZ.
+
+\code{matrixcells} only provides \code{cells} corresponding the \code{tiling-cells} in \code{matrix.skeleton}.
+This tiling behavior is sometimes desired.
+However, it can result in unexpected behaviors when: using a non-base \code{anchor}, using \code{row sep} or \code{column sep}, or when working on boundary nodes.
+
+\end{document}
Property changes on: trunk/Master/texmf-dist/doc/latex/matrix-skeleton/manual.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/matrix-skeleton/pgflibrarymatrix.skeleton.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/matrix-skeleton/pgflibrarymatrix.skeleton.code.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/matrix-skeleton/pgflibrarymatrix.skeleton.code.tex 2019-08-05 21:06:42 UTC (rev 51823)
@@ -0,0 +1,330 @@
+\usepgfmodule{matrix}
+
+\def\pgfmatrixlabelskeleton{
+ \let\pgf at matrix@compute at origin\pgf at matrix@skeleton at compute@origin
+ \let\pgf at matrix@shift at nodes@initial\pgf at matrix@skeleton at shift@nodes at initial
+ \let\pgf at end@matrix\pgf at end@matrix at skeleton
+}
+
+\expandafter\def\expandafter\pgf at end@matrix at skeleton\expandafter{\pgf at end@matrix \pgf at matrix@create at skeleton}%
+
+% Creates the skeleton
+
+% orig contains the upper left corner of the different boxes
+
+\def\pgf at matrix@create at skeleton{%
+ \xdef\pgf at matrix@skel at innerxsep{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \xdef\pgf at matrix@skel at innerysep{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \pgfscope%
+ \pgfgetlastxy\ck at shift@x\ck at shift@y
+ \pgftransformshift{\pgfpoint{\ck at shift@x}{\ck at shift@y}}%
+ \pgfset{inner sep=0pt}%
+ \pgf at matrix@skeleton at create@cells%
+ \pgf at matrix@skeleton at create@tiling at cells%
+ \pgf at matrix@skeleton at create@rows%
+ \pgf at matrix@skeleton at create@tiling at rows%
+ \pgf at matrix@skeleton at create@columns%
+ \pgf at matrix@skeleton at create@tiling at columns%
+ \endpgfscope%
+}
+
+\def\pgf at matrix@skeleton at create@cells{%
+ \newcount\pgf at matrix@skel at next@row
+ \foreach \pgf at matrix@skel at row in {1, ..., \pgfmatrixcurrentrow} {%
+ \pgf at matrix@skel at next@row=\pgf at matrix@skel at row
+ \advance\pgf at matrix@skel at next@row by 1
+ \pgfmathsetmacro{\pgf at matrix@skel at origy}{\csname pgf at matrix@origy\pgf at matrix@skel at row\endcsname + \csname pgf at matrix@maxy\pgf at matrix@skel at row\endcsname}%
+ \pgfmathsetmacro{\pgf at matrix@skel at height}{\csname pgf at matrix@maxy\pgf at matrix@skel at row\endcsname - \csname pgf at matrix@miny\pgf at matrix@skel at row\endcsname - \pgflinewidth}%
+ \pgfmathsetmacro{\pgf at matrix@skel at height}{\pgf at matrix@skel at height - \csname pgf at matrix@row at sep@\the\pgf at matrix@skel at next@row\endcsname}
+ \foreach \pgf at matrix@skel at col in {1, ..., \pgf at matrix@numberofcolumns} {%
+ \pgfmathsetmacro{\pgf at matrix@skel at origx}{\csname pgf at matrix@origx\pgf at matrix@skel at col\endcsname + \csname pgf at matrix@minx\pgf at matrix@skel at col\endcsname}%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\csname pgf at matrix@maxx\pgf at matrix@skel at col\endcsname - \csname pgf at matrix@minx\pgf at matrix@skel at col\endcsname - \pgflinewidth}%
+ \ifnum\pgf at matrix@skel at col>1\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at origx}{\pgf at matrix@skel at origx + \csname pgf at matrix@column at sep@\pgf at matrix@skel at col\endcsname}%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\pgf at matrix@skel at width - \pgflinewidth - \csname pgf at matrix@column at sep@\pgf at matrix@skel at col\endcsname}%
+ \fi%
+ {%
+ \pgfset{minimum width=\pgf at matrix@skel at width, minimum height=\pgf at matrix@skel at height}%
+ \pgftransformshift{\pgfpoint{\pgf at matrix@skel at origx pt}{\pgf at matrix@skel at origy pt}}%
+ \pgfnode{rectangle}{north west}{}{\pgf at matrix@par at name-cell-\pgf at matrix@skel at row-\pgf at matrix@skel at col}{}%
+ }
+ }
+ }
+}
+
+\def\pgf at matrix@skeleton at create@tiling at cells{%
+ \newcount\pgf at matrix@skel at next@col
+ \newcount\pgf at matrix@skel at next@row
+ \foreach \pgf at matrix@skel at row in {1, ..., \pgfmatrixcurrentrow} {%
+ \pgf at matrix@skel at next@row=\pgf at matrix@skel at row
+ \advance\pgf at matrix@skel at next@row by 1
+ \pgfmathsetmacro{\pgf at matrix@skel at origy}{\csname pgf at matrix@origy\pgf at matrix@skel at row\endcsname + \csname pgf at matrix@maxy\pgf at matrix@skel at row\endcsname}%
+ \pgfmathsetmacro{\pgf at matrix@skel at height}{\csname pgf at matrix@maxy\pgf at matrix@skel at row\endcsname - \csname pgf at matrix@miny\pgf at matrix@skel at row\endcsname - \pgflinewidth}%
+ \ifnum\pgf at matrix@skel at row=1\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at origy}{\pgf at matrix@skel at origy + \pgf at matrix@skel at innerysep}%
+ \pgfmathsetmacro{\pgf at matrix@skel at height}{\pgf at matrix@skel at height + \pgf at matrix@skel at innerysep}%
+ \fi
+ \ifnum\pgf at matrix@skel at row=\pgfmatrixcurrentrow\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at height}{\pgf at matrix@skel at height + \pgf at matrix@skel at innerysep - \pgfmatrixrowsep}%
+ \fi
+ \ifnum\pgf at matrix@skel at row>1\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at origy}{\pgf at matrix@skel at origy + 0.5 * \csname pgf at matrix@row at sep@\pgf at matrix@skel at row\endcsname}
+ \pgfmathsetmacro{\pgf at matrix@skel at height}{\pgf at matrix@skel at height + 0.5 * \csname pgf at matrix@row at sep@\pgf at matrix@skel at row\endcsname}
+ \fi
+ \ifnum\pgf at matrix@skel at row<\pgfmatrixcurrentrow\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at height}{\pgf at matrix@skel at height - 0.5 * \csname pgf at matrix@row at sep@\the\pgf at matrix@skel at next@row\endcsname}
+ \fi
+ \foreach \pgf at matrix@skel at col in {1, ..., \pgf at matrix@numberofcolumns} {%
+ \pgf at matrix@skel at next@col=\pgf at matrix@skel at col
+ \advance\pgf at matrix@skel at next@col by 1
+ \pgfmathsetmacro{\pgf at matrix@skel at origx}{\csname pgf at matrix@origx\pgf at matrix@skel at col\endcsname + \csname pgf at matrix@minx\pgf at matrix@skel at col\endcsname}%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\csname pgf at matrix@maxx\pgf at matrix@skel at col\endcsname - \csname pgf at matrix@minx\pgf at matrix@skel at col\endcsname- \pgflinewidth}%
+ \ifnum\pgf at matrix@skel at col=1\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at origx}{\pgf at matrix@skel at origx - \pgf at matrix@skel at innerxsep}%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\pgf at matrix@skel at width + \pgf at matrix@skel at innerxsep}%
+ \fi%
+ \ifnum\pgf at matrix@skel at col=\pgf at matrix@numberofcolumns\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\pgf at matrix@skel at width + \pgf at matrix@skel at innerxsep}%
+ \fi%
+ \ifnum\pgf at matrix@skel at col<\pgf at matrix@numberofcolumns%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\pgf at matrix@skel at width + 0.5 * \csname pgf at matrix@column at sep@\the\pgf at matrix@skel at next@col\endcsname}%
+ \fi%
+ \ifnum\pgf at matrix@skel at col>1%
+ \pgfmathsetmacro{\pgf at matrix@skel at origx}{\pgf at matrix@skel at origx + 0.5 * \csname pgf at matrix@column at sep@\pgf at matrix@skel at col\endcsname}%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\pgf at matrix@skel at width - 0.5 * \csname pgf at matrix@column at sep@\pgf at matrix@skel at col\endcsname}%
+ \fi%
+ {%
+ \pgfset{minimum width=\pgf at matrix@skel at width, minimum height=\pgf at matrix@skel at height}%
+ \pgftransformshift{\pgfpoint{\pgf at matrix@skel at origx pt}{\pgf at matrix@skel at origy pt}}%
+ \pgfnode{rectangle}{north west}{}{\pgf at matrix@par at name-tiling-cell-\pgf at matrix@skel at row-\pgf at matrix@skel at col}{}%
+ }
+ }
+ }
+}
+
+\def\pgf at matrix@skeleton at create@rows{%
+ \newcount\pgf at matrix@skel at next@row%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\csname pgf at matrix@origx\the\pgf at matrix@numberofcolumns\endcsname + \csname pgf at matrix@maxx\the\pgf at matrix@numberofcolumns\endcsname - \pgflinewidth}%
+ \pgfmathsetmacro{\pgf at matrix@skel at origx}{\csname pgf at matrix@origx1\endcsname + \csname pgf at matrix@minx1\endcsname}%
+ \foreach \pgf at matrix@skel at row in {1, ..., \pgfmatrixcurrentrow} {%
+ \pgf at matrix@skel at next@row=\pgf at matrix@skel at row\relax%
+ \advance\pgf at matrix@skel at next@row by1\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at origy}{\csname pgf at matrix@origy\pgf at matrix@skel at row\endcsname + \csname pgf at matrix@maxy\pgf at matrix@skel at row\endcsname}%
+ \pgfmathsetmacro{\pgf at matrix@skel at height}{\csname pgf at matrix@maxy\pgf at matrix@skel at row\endcsname - \csname pgf at matrix@miny\pgf at matrix@skel at row\endcsname - \csname pgf at matrix@row at sep@\the\pgf at matrix@skel at next@row\endcsname - \pgflinewidth}%
+ {%
+ \pgfset{minimum width=\pgf at matrix@skel at width, minimum height=\pgf at matrix@skel at height}%
+ \pgftransformshift{\pgfpoint{\pgf at matrix@skel at origx pt}{\pgf at matrix@skel at origy pt}}%
+ \pgfnode{rectangle}{north west}{}{\pgf at matrix@par at name-row-\pgf at matrix@skel at row}{}%
+ }
+ \ifnum\pgf at matrix@skel at row<\pgfmatrixcurrentrow\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at origy}{\csname pgf at matrix@origy\the\pgf at matrix@skel at next@row\endcsname + \csname pgf at matrix@maxy\the\pgf at matrix@skel at next@row\endcsname + \csname pgf at matrix@row at sep@\the\pgf at matrix@skel at next@row\endcsname + 0.5 * \pgflinewidth}%
+ \pgfmathsetmacro{\pgf at matrix@skel at height}{\csname pgf at matrix@row at sep@\the\pgf at matrix@skel at next@row\endcsname}%
+ {%
+ \pgfset{minimum width=\pgf at matrix@skel at width, minimum height=\pgf at matrix@skel at height}%
+ \pgftransformshift{\pgfpoint{\pgf at matrix@skel at origx pt}{\pgf at matrix@skel at origy pt}}%
+ \pgfnode{rectangle}{north west}{}{\pgf at matrix@par at name-inter-row-\pgf at matrix@skel at row}{}%
+ }
+ \fi%
+ }
+}
+
+\def\pgf at matrix@skeleton at create@tiling at rows{%
+ \newcount\pgf at matrix@skel at next@row%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\csname pgf at matrix@origx\the\pgf at matrix@numberofcolumns\endcsname + \csname pgf at matrix@maxx\the\pgf at matrix@numberofcolumns\endcsname - \pgflinewidth + 2 * \pgf at matrix@skel at innerxsep}%
+ \pgfmathsetmacro{\pgf at matrix@skel at origx}{\csname pgf at matrix@origx1\endcsname + \csname pgf at matrix@minx1\endcsname - \pgf at matrix@skel at innerxsep}%
+ \foreach \pgf at matrix@skel at row in {1, ..., \pgfmatrixcurrentrow} {%
+ \pgf at matrix@skel at next@row=\pgf at matrix@skel at row\relax%
+ \advance\pgf at matrix@skel at next@row by1\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at origy}{\csname pgf at matrix@origy\pgf at matrix@skel at row\endcsname + \csname pgf at matrix@maxy\pgf at matrix@skel at row\endcsname}%
+ \pgfmathsetmacro{\pgf at matrix@skel at height}{\csname pgf at matrix@maxy\pgf at matrix@skel at row\endcsname - \csname pgf at matrix@miny\pgf at matrix@skel at row\endcsname - \csname pgf at matrix@row at sep@\the\pgf at matrix@skel at next@row\endcsname - \pgflinewidth}%
+ \ifnum\pgf at matrix@skel at row=1\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at origy}{\pgf at matrix@skel at origy + \pgf at matrix@skel at innerysep}%
+ \pgfmathsetmacro{\pgf at matrix@skel at height}{\pgf at matrix@skel at height + \pgf at matrix@skel at innerysep}%
+ \fi
+ \ifnum\pgf at matrix@skel at row=\pgfmatrixcurrentrow\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at height}{\pgf at matrix@skel at height + \pgf at matrix@skel at innerysep}%
+ \fi
+ \ifnum\pgf at matrix@skel at row>1\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at origy}{\pgf at matrix@skel at origy + 0.5 * \csname pgf at matrix@row at sep@\pgf at matrix@skel at row\endcsname}%
+ \pgfmathsetmacro{\pgf at matrix@skel at height}{\pgf at matrix@skel at height + 0.5 * \csname pgf at matrix@row at sep@\pgf at matrix@skel at row\endcsname}%
+ \fi%
+ \ifnum\pgf at matrix@skel at row<\pgfmatrixcurrentrow\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at height}{\pgf at matrix@skel at height + 0.5 * \csname pgf at matrix@row at sep@\the\pgf at matrix@skel at next@row\endcsname}%
+ \fi%
+ {%
+ \pgfset{minimum width=\pgf at matrix@skel at width, minimum height=\pgf at matrix@skel at height}%
+ \pgftransformshift{\pgfpoint{\pgf at matrix@skel at origx pt}{\pgf at matrix@skel at origy pt}}%
+ \pgfnode{rectangle}{north west}{}{\pgf at matrix@par at name-tiling-row-\pgf at matrix@skel at row}{}%
+ }
+ }
+}
+
+\def\pgf at matrix@skeleton at create@columns{%
+ \newcount\pgf at matrix@skel at prev@col%
+ \pgfmathsetmacro{\pgf at matrix@skel at height}{\csname pgf at matrix@origy1\endcsname + \csname pgf at matrix@maxy1\endcsname - \csname pgf at matrix@miny\the\pgfmatrixcurrentrow\endcsname - \pgfmatrixrowsep - \pgflinewidth}%
+ \pgfmathsetmacro{\pgf at matrix@skel at origy}{\csname pgf at matrix@origy1\endcsname + \csname pgf at matrix@maxy1\endcsname}%
+ \foreach \pgf at matrix@skel at col in {1, ..., \pgf at matrix@numberofcolumns} {%
+ \ifnum\pgf at matrix@skel at col>1\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at origx}{\csname pgf at matrix@origx\pgf at matrix@skel at col\endcsname + \csname pgf at matrix@minx\pgf at matrix@skel at col\endcsname + \csname pgf at matrix@column at sep@\pgf at matrix@skel at col\endcsname}%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\csname pgf at matrix@maxx\pgf at matrix@skel at col\endcsname - \csname pgf at matrix@minx\pgf at matrix@skel at col\endcsname - \csname pgf at matrix@column at sep@\pgf at matrix@skel at col\endcsname - \pgflinewidth}%
+ \else%
+ \pgfmathsetmacro{\pgf at matrix@skel at origx}{\csname pgf at matrix@origx\pgf at matrix@skel at col\endcsname + \csname pgf at matrix@minx\pgf at matrix@skel at col\endcsname}%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\csname pgf at matrix@maxx\pgf at matrix@skel at col\endcsname - \csname pgf at matrix@minx\pgf at matrix@skel at col\endcsname - \pgflinewidth}%
+ \fi%
+ {%
+ \pgfset{minimum width=\pgf at matrix@skel at width, minimum height=\pgf at matrix@skel at height}%
+ \pgftransformshift{\pgfpoint{\pgf at matrix@skel at origx pt}{\pgf at matrix@skel at origy pt}}%
+ \pgfnode{rectangle}{north west}{}{\pgf at matrix@par at name-column-\pgf at matrix@skel at col}{}%
+ }
+ \ifnum\pgf at matrix@skel at col>1\relax%
+ \pgf at matrix@skel at prev@col=\pgf at matrix@skel at col\relax%
+ \advance\pgf at matrix@skel at prev@col by-1\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at origx}{\csname pgf at matrix@origx\the\pgf at matrix@skel at prev@col\endcsname + \csname pgf at matrix@maxx\the\pgf at matrix@skel at prev@col\endcsname - 0.5 * \pgflinewidth}%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\csname pgf at matrix@column at sep@\pgf at matrix@skel at col\endcsname}%
+ {%
+ \pgfset{minimum width=\pgf at matrix@skel at width, minimum height=\pgf at matrix@skel at height}%
+ \pgftransformshift{\pgfpoint{\pgf at matrix@skel at origx pt}{\pgf at matrix@skel at origy pt}}%
+ \pgfnode{rectangle}{north west}{}{\pgf at matrix@par at name-inter-column-\the\pgf at matrix@skel at prev@col}{}%
+ }
+ \fi%
+ }
+}
+
+\def\pgf at matrix@skeleton at create@tiling at columns{%
+ \newcount\pgf at matrix@skel at next@col%
+ \pgfmathsetmacro{\pgf at matrix@skel at height}{\csname pgf at matrix@origy1\endcsname + \csname pgf at matrix@maxy1\endcsname - \csname pgf at matrix@miny\the\pgfmatrixcurrentrow\endcsname - \pgfmatrixrowsep - \pgflinewidth + 2 * \pgf at matrix@skel at innerysep}%
+ \pgfmathsetmacro{\pgf at matrix@skel at origy}{\csname pgf at matrix@origy1\endcsname + \csname pgf at matrix@maxy1\endcsname + \pgf at matrix@skel at innerysep}%
+ \foreach \pgf at matrix@skel at col in {1, ..., \pgf at matrix@numberofcolumns} {%
+ \pgf at matrix@skel at next@col=\pgf at matrix@skel at col\relax%
+ \advance\pgf at matrix@skel at next@col by1\relax%
+ \ifnum\pgf at matrix@skel at col>1\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at origx}{\csname pgf at matrix@origx\pgf at matrix@skel at col\endcsname + \csname pgf at matrix@minx\pgf at matrix@skel at col\endcsname + \csname pgf at matrix@column at sep@\pgf at matrix@skel at col\endcsname}%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\csname pgf at matrix@maxx\pgf at matrix@skel at col\endcsname - \csname pgf at matrix@minx\pgf at matrix@skel at col\endcsname - \csname pgf at matrix@column at sep@\pgf at matrix@skel at col\endcsname - \pgflinewidth}%
+ \else%
+ \pgfmathsetmacro{\pgf at matrix@skel at origx}{\csname pgf at matrix@origx\pgf at matrix@skel at col\endcsname + \csname pgf at matrix@minx\pgf at matrix@skel at col\endcsname}%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\csname pgf at matrix@maxx\pgf at matrix@skel at col\endcsname - \csname pgf at matrix@minx\pgf at matrix@skel at col\endcsname - \pgflinewidth}%
+ \fi%
+ \ifnum\pgf at matrix@skel at col=1\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at origx}{\pgf at matrix@skel at origx - \pgf at matrix@skel at innerxsep}%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\pgf at matrix@skel at width + \pgf at matrix@skel at innerxsep}%
+ \fi
+ \ifnum\pgf at matrix@skel at col=\pgf at matrix@numberofcolumns\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\pgf at matrix@skel at width + \pgf at matrix@skel at innerxsep}%
+ \fi
+ \ifnum\pgf at matrix@skel at col>1\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at origx}{\pgf at matrix@skel at origx - 0.5 * \csname pgf at matrix@column at sep@\pgf at matrix@skel at col\endcsname}%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\pgf at matrix@skel at width + 0.5 * \csname pgf at matrix@column at sep@\pgf at matrix@skel at col\endcsname}%
+ \fi
+ \ifnum\pgf at matrix@skel at col<\pgf at matrix@numberofcolumns\relax%
+ \pgfmathsetmacro{\pgf at matrix@skel at width}{\pgf at matrix@skel at width + 0.5 * \csname pgf at matrix@column at sep@\the\pgf at matrix@skel at next@col\endcsname}%
+ \fi
+ {%
+ \pgfset{minimum width=\pgf at matrix@skel at width, minimum height=\pgf at matrix@skel at height}%
+ \pgftransformshift{\pgfpoint{\pgf at matrix@skel at origx pt}{\pgf at matrix@skel at origy pt}}%
+ \pgfnode{rectangle}{north west}{}{\pgf at matrix@par at name-tiling-column-\pgf at matrix@skel at col}{}%
+ }
+ }
+}
+
+% Compute the real positions of the origins
+
+% We must now compute the real positions of the origins of all the
+% small pictures. To this end, we need to compute prefix sums. After
+% the procedure is done, the origx and the origy will contain the origin
+% positions.
+
+\def\pgf at matrix@skeleton at compute@origin{%
+ %
+ % Inverse prefix sum on the vertical positions
+ %
+ {%
+ \ifnum\pgfmatrixcurrentrow>0\relax%
+ \expandafter\gdef\csname pgf at matrix@origy\the\pgfmatrixcurrentrow\endcsname{0pt}%
+ \fi%
+ \c at pgf@counta=\pgfmatrixcurrentrow\relax%
+ \loop%
+ \ifnum\c at pgf@counta>1\relax%
+ \pgf at y=\csname pgf at matrix@origy\the\c at pgf@counta\endcsname\relax%
+ \advance\pgf at y by\csname pgf at matrix@maxy\the\c at pgf@counta\endcsname\relax
+ \advance\c at pgf@counta by-1\relax%
+ \pgf at ya=\csname pgf at matrix@miny\the\c at pgf@counta\endcsname\relax%
+ \advance\pgf at y by-\pgf at ya\relax%
+ \expandafter\xdef\csname pgf at matrix@origy\the\c at pgf@counta\endcsname{\the\pgf at y}%
+ \repeat%
+ }%
+ %
+ % Prefix sum on the horizontal positions
+ %
+ {%
+ \ifnum\pgf at matrix@numberofcolumns>0\relax%
+ \pgf at x=\csname pgf at matrix@minx1\endcsname\relax%
+ \pgf at x=-\pgf at x%
+ \expandafter\xdef\csname pgf at matrix@origx1\endcsname{\the\pgf at x}%
+ \fi%
+ \c at pgf@counta=1\relax%
+ \loop%
+ \ifnum\c at pgf@counta<\pgf at matrix@numberofcolumns\relax%
+ \pgf at x=\csname pgf at matrix@origx\the\c at pgf@counta\endcsname\relax%
+ \advance\pgf at x by\csname pgf at matrix@maxx\the\c at pgf@counta\endcsname\relax%
+ \advance\c at pgf@counta by1\relax%
+ \pgf at xa=\csname pgf at matrix@minx\the\c at pgf@counta\endcsname\relax%
+ \advance\pgf at x by-\pgf at xa\relax%
+ \expandafter\xdef\csname pgf at matrix@origx\the\c at pgf@counta\endcsname{\the\pgf at x}%
+ \repeat%
+ }%
+}
+
+
+% Shift the nodes to their origins
+
+% The following procedure shifts all nodes in
+% \pgf at matrix@node at list to their location inside a temporary
+% picture. This picture will later be shifted again to its final
+% position in the real picture.
+
+\def\pgf at matrix@skeleton at shift@nodes at initial{%
+ {%
+ \pgfutil at for\pgf at matrix@node at name:=\pgf at matrix@node at list\do{%
+ \ifx\pgf at matrix@node at name\pgfutil at empty%
+ \else%
+ \expandafter\ifx\csname pgf at matrix@node at visited@\pgf at matrix@node at name\endcsname\relax%
+ \pgf at shift@node{\pgf at matrix@node at name}{%
+ \pgf at x=\csname pgf at matrix@origx%
+ \expandafter\expandafter\expandafter\pgfutil at secondoftwo\csname pgf at matrix@node at location@\pgf at matrix@node at name\endcsname\endcsname%
+ \pgf at y=\csname pgf at matrix@origy%
+ \expandafter\expandafter\expandafter\pgfutil at firstoftwo\csname pgf at matrix@node at location@\pgf at matrix@node at name\endcsname\endcsname%
+ }%
+ \expandafter\let\csname pgf at matrix@node at visited@\pgf at matrix@node at name\endcsname=\pgfutil at empty%
+ \fi%
+ \fi%
+ }%
+ }%
+}
+
+
+% End of line
+\def\pgfmatrixendrow{%
+ % if the cell contains nothing, the following \let will be at the
+ % beginning (macro expansion has stopped here since neither \omit
+ % nor \span was found)
+ \let\pgf at matrix@signal at cell@end=\pgf at matrix@signal at cell@end%
+ &\pgf at matrix@correct at calltrue%
+ \global\pgf at matrix@fixedfalse%
+ \pgf at y=0pt%
+ \pgf at matrix@addtolength\pgf at y{\pgfmatrixrowsep}%
+ \pgfutil at ifnextchar[{\pgfmatrixendrow at skip}{
+ {
+ \advance\pgfmatrixcurrentrow by1\relax % only temporary for the following:
+ \expandafter\xdef\csname pgf at matrix@row at sep@\the\pgfmatrixcurrentrow\endcsname{\the\pgf at y}%
+ }
+ \pgf at matrix@finish at line}%
+}
+
+\def\pgfmatrixendrow at skip[#1]{%
+ \pgf at matrix@addtolength\pgf at y{#1}%
+ {
+ \advance\pgfmatrixcurrentrow by1\relax % only temporary for the following:
+ \expandafter\xdef\csname pgf at matrix@row at sep@\the\pgfmatrixcurrentrow\endcsname{\the\pgf at y}%
+ }
+ \pgf at matrix@finish at line%
+}
Property changes on: trunk/Master/texmf-dist/tex/latex/matrix-skeleton/pgflibrarymatrix.skeleton.code.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/matrix-skeleton/tikzlibrarymatrix.skeleton.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/matrix-skeleton/tikzlibrarymatrix.skeleton.code.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/matrix-skeleton/tikzlibrarymatrix.skeleton.code.tex 2019-08-05 21:06:42 UTC (rev 51823)
@@ -0,0 +1,278 @@
+\usepgflibrary{matrix.skeleton}
+
+\usetikzlibrary{matrix}
+\usetikzlibrary{fit}
+\usetikzlibrary{backgrounds}
+
+\tikzset{
+ label skeleton/.code = {
+ \pgfmatrixlabelskeleton
+ },
+ add styling node/.style = {
+ append after command = {
+ \pgfextra
+ \pgfinterruptpath
+ % This next line is not useful in CVS. This is protection that was needed in the past for nodes.
+ \setbox\tikz at figbox=\box\pgfutil at voidb@x
+ #1
+ \endpgfinterruptpath
+ \endpgfextra
+ }
+ },
+ style odd rows/.style = {
+ label skeleton,
+ add styling node = {
+ \foreach \row in {1, ..., \the\pgfmatrixcurrentrow}{
+ \ifodd\row
+ \fitandstyle{(\tikzlastnode-row-\row)}{#1}
+ \fi
+ }
+ }
+ },
+ style even rows/.style = {
+ label skeleton,
+ add styling node={
+ \foreach \row in {1, ..., \the\pgfmatrixcurrentrow}{
+ \ifodd\row
+ \else
+ \fitandstyle{(\tikzlastnode-row-\row)}{#1}
+ \fi
+ }
+ }
+ },
+ style odd rows on layer/.style 2 args= {
+ label skeleton,
+ add styling node = {
+ \foreach \row in {1, ..., \the\pgfmatrixcurrentrow}{
+ \ifodd\row
+ \fitandstyle[#1]{(\tikzlastnode-row-\row)}{#2}
+ \fi
+ }
+ }
+ },
+ style even rows on layer/.style 2 args = {
+ label skeleton,
+ add styling node={
+ \foreach \row in {1, ..., \the\pgfmatrixcurrentrow}{
+ \ifodd\row
+ \else
+ \fitandstyle[#1]{(\tikzlastnode-row-\row)}{#2}
+ \fi
+ }
+ }
+ },
+ style odd tiling rows/.style = {
+ label skeleton,
+ add styling node = {
+ \foreach \row in {1, ..., \the\pgfmatrixcurrentrow}{
+ \ifodd\row
+ \fitandstyle{(\tikzlastnode-tiling-row-\row)}{#1}
+ \fi
+ }
+ }
+ },
+ style even tiling rows/.style = {
+ label skeleton,
+ add styling node={
+ \foreach \row in {1, ..., \the\pgfmatrixcurrentrow}{
+ \ifodd\row
+ \else
+ \fitandstyle{(\tikzlastnode-tiling-row-\row)}{#1}
+ \fi
+ }
+ }
+ },
+ style odd tiling rows on layer/.style 2 args= {
+ label skeleton,
+ add styling node = {
+ \foreach \row in {1, ..., \the\pgfmatrixcurrentrow}{
+ \ifodd\row
+ \fitandstyle[#1]{(\tikzlastnode-tiling-row-\row)}{#2}
+ \fi
+ }
+ }
+ },
+ style even tiling rows on layer/.style 2 args = {
+ label skeleton,
+ add styling node={
+ \foreach \row in {1, ..., \the\pgfmatrixcurrentrow}{
+ \ifodd\row
+ \else
+ \fitandstyle[#1]{(\tikzlastnode-tiling-row-\row)}{#2}
+ \fi
+ }
+ }
+ },
+ style odd columns/.style = {
+ label skeleton,
+ add styling node = {
+ \foreach \col in {1, ..., \the\pgf at matrix@numberofcolumns}{
+ \ifodd\col
+ \fitandstyle{(\tikzlastnode-column-\col)}{#1}
+ \fi
+ }
+ }
+ },
+ style even columns/.style = {
+ label skeleton,
+ add styling node={
+ \foreach \col in {1, ..., \the\pgf at matrix@numberofcolumns}{
+ \ifodd\col
+ \else
+ \fitandstyle{(\tikzlastnode-column-\col)}{#1}
+ \fi
+ }
+ }
+ },
+ style odd columns on layer/.style 2 args= {
+ label skeleton,
+ add styling node = {
+ \foreach \col in {1, ..., \the\pgf at matrix@numberofcolumns}{
+ \ifodd\col
+ \fitandstyle[#1]{(\tikzlastnode-column-\col)}{#2}
+ \fi
+ }
+ }
+ },
+ style even columns on layer/.style 2 args = {
+ label skeleton,
+ add styling node={
+ \foreach \col in {1, ..., \the\pgf at matrix@numberofcolumns}{
+ \ifodd\col
+ \else
+ \fitandstyle[#1]{(\tikzlastnode-column-\col)}{#2}
+ \fi
+ }
+ }
+ },
+ style odd tiling columns/.style = {
+ label skeleton,
+ add styling node = {
+ \foreach \col in {1, ..., \the\pgf at matrix@numberofcolumns}{
+ \ifodd\col
+ \fitandstyle{(\tikzlastnode-tiling-column-\col)}{#1}
+ \fi
+ }
+ }
+ },
+ style even tiling columns/.style = {
+ label skeleton,
+ add styling node={
+ \foreach \col in {1, ..., \the\pgf at matrix@numberofcolumns}{
+ \ifodd\col
+ \else
+ \fitandstyle{(\tikzlastnode-tiling-column-\col)}{#1}
+ \fi
+ }
+ }
+ },
+ style odd tiling columns on layer/.style 2 args= {
+ label skeleton,
+ add styling node = {
+ \foreach \col in {1, ..., \the\pgf at matrix@numberofcolumns}{
+ \ifodd\col
+ \fitandstyle[#1]{(\tikzlastnode-tiling-column-\col)}{#2}
+ \fi
+ }
+ }
+ },
+ style even tiling columns on layer/.style 2 args = {
+ label skeleton,
+ add styling node={
+ \foreach \col in {1, ..., \the\pgf at matrix@numberofcolumns}{
+ \ifodd\col
+ \else
+ \fitandstyle[#1]{(\tikzlastnode-tiling-column-\col)}{#2}
+ \fi
+ }
+ }
+ },
+ style contour/.style = {%
+ label skeleton,
+ add styling node = {
+ \stylecontour{#1}
+ }
+ },
+ style contour on layer/.style 2 args= {%
+ label skeleton,
+ add styling node = {
+ \pgfonlayer{#1}
+ \stylecontour{#2}
+ \endpgfonlayer
+ }
+ },
+ style grid/.style = {%
+ label skeleton,
+ add styling node = {
+ \stylegrid{#1}
+ }
+ },
+ style grid on layer/.style 2 args= {%
+ label skeleton,
+ add styling node = {
+ \pgfonlayer{#1}
+ \stylegrid{#2}
+ \endpgfonlayer
+ }
+ },
+ style tiling grid/.style = {%
+ label skeleton,
+ add styling node = {
+ \styletilinggrid{#1}
+ }
+ },
+ style tiling grid on layer/.style 2 args= {%
+ label skeleton,
+ add styling node = {
+ \pgfonlayer{#1}
+ \styletilinggrid{#2}
+ \endpgfonlayer
+ }
+ },
+}
+
+\def\fitandstyle{\@ifnextchar[{\fitandstyle at layer}{\fitandstyle at main}}
+\def\fitandstyle at layer[#1]#2#3{
+ \pgfonlayer{#1}
+ \fitandstyle at main{#2}{#3}
+ \endpgfonlayer
+}
+\def\fitandstyle at main#1#2{\node [fit = #1, inner sep = 0pt, #2] {};}
+
+\def\stylecontour#1{
+ \path [#1] (\tikzlastnode-row-1.north west) -- (\tikzlastnode-row-1.north east) -- (\tikzlastnode-row-\the\pgfmatrixcurrentrow.south east) -- (\tikzlastnode-row-\the\pgfmatrixcurrentrow.south west) -- cycle;
+}
+
+\def\stylegrid#1{
+ \ifnum\the\pgfmatrixcurrentrow>1\relax%
+ \foreach \row in {1, ..., \the\pgfmatrixcurrentrow}{
+ \ifnum\row<\the\pgfmatrixcurrentrow\relax%
+ \path [#1] (\tikzlastnode-inter-row-\row.west) -- (\tikzlastnode-inter-row-\row.east);
+ \fi
+ }
+ \fi
+ \ifnum\the\pgf at matrix@numberofcolumns>1\relax%
+ \foreach \column in {1, ..., \the\pgf at matrix@numberofcolumns}{
+ \ifnum\column<\the\pgf at matrix@numberofcolumns\relax%
+ \path [#1] (\tikzlastnode-inter-column-\column.north) -- (\tikzlastnode-inter-column-\column.south);
+ \fi
+ }
+ \fi
+}
+
+\def\styletilinggrid#1{
+ \ifnum\the\pgfmatrixcurrentrow>1\relax%
+ \foreach \row in {1, ..., \the\pgfmatrixcurrentrow}{
+ \ifnum\row<\the\pgfmatrixcurrentrow\relax%
+ \path [#1] (\tikzlastnode-tiling-row-\row.south west) -- (\tikzlastnode-tiling-row-\row.south east);
+ \fi
+ }
+ \fi
+ \ifnum\the\pgf at matrix@numberofcolumns>1\relax%
+ \foreach \column in {1, ..., \the\pgf at matrix@numberofcolumns}{
+ \ifnum\column<\the\pgf at matrix@numberofcolumns\relax%
+ \path [#1] (\tikzlastnode-tiling-column-\column.north east) -- (\tikzlastnode-tiling-column-\column.south east);
+ \fi
+ }
+ \fi
+}
Property changes on: trunk/Master/texmf-dist/tex/latex/matrix-skeleton/tikzlibrarymatrix.skeleton.code.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2019-08-05 21:05:47 UTC (rev 51822)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2019-08-05 21:06:42 UTC (rev 51823)
@@ -447,7 +447,7 @@
mathcommand mathcomp mathdesign mathdots mathexam
mathfam256 mathfixs mathfont mathpartir mathpazo mathpunctspace
mathspec mathtools matlab-prettifier mathspic maths-symbols
- mattens maybemath
+ matrix-skeleton mattens maybemath
mcaption mceinleger mcexam mcf2graph mcite mciteplus mcmthesis
mdframed mdputu mdsymbol mdwtools media9 medstarbeamer
meetingmins memdesign memexsupp
Modified: trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc 2019-08-05 21:05:47 UTC (rev 51822)
+++ trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc 2019-08-05 21:06:42 UTC (rev 51823)
@@ -115,6 +115,7 @@
depend mathfixs
depend mathpartir
depend mathpunctspace
+depend matrix-skeleton
depend matlab-prettifier
depend mattens
depend memorygraphs
Added: trunk/Master/tlpkg/tlpsrc/matrix-skeleton.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list