summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/gridpapers
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/gridpapers')
-rw-r--r--Master/texmf-dist/tex/latex/gridpapers/gridpapers.sty132
1 files changed, 64 insertions, 68 deletions
diff --git a/Master/texmf-dist/tex/latex/gridpapers/gridpapers.sty b/Master/texmf-dist/tex/latex/gridpapers/gridpapers.sty
index e5225a96c2c..3e7cb84eed1 100644
--- a/Master/texmf-dist/tex/latex/gridpapers/gridpapers.sty
+++ b/Master/texmf-dist/tex/latex/gridpapers/gridpapers.sty
@@ -21,7 +21,7 @@
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{gridpapers}
- [2021/03/19 v1.0.1 Graph paper backgrounds]
+ [2021/03/27 v1.0.2 Graph paper backgrounds]
\RequirePackage{xkeyval}
\RequirePackage{kvoptions}
@@ -130,7 +130,7 @@
%% the list below.
\define@choicekey*{GP}{colorset}[\val\nr]%
%% Allowed values for colorset:
- {std,precocious,brickred,engineer,plumpad}[std]{%
+ {std,precocious,ghostly,brickred,engineer,plumpad}[std]{%
\ifcase\nr\relax
%% std
\colorlet{minorcolor}{cornflower!30}
@@ -142,6 +142,11 @@
\colorlet{majorcolor}{rosiegrid}
\colorlet{bgcolor}{rosiebg}
\or
+ %% ghostly
+ \colorlet{minorcolor}{gray!15}
+ \colorlet{majorcolor}{gray!20}
+ \colorlet{bgcolor}{white}
+ \or
%% brickred
\colorlet{minorcolor}{brick!35}
\colorlet{majorcolor}{brick!60}
@@ -195,25 +200,31 @@
%% We have to delay this definition until after \GP@patternsize is
%% redefined (by the pattern selection and/or user override)
\newcommand{\GP@declarehexpat}{
-\pgfdeclarepatternformonly
- {hexagons}%% name
- {\pgfpointorigin}%% lower left
- {\pgfpoint{3*\GP@patternsize}{0.866025*2*\GP@patternsize}}
- {\pgfpoint{3*\GP@patternsize}{0.866025*2*\GP@patternsize}}
- {
- \pgfsetlinewidth{0.6pt}
- \pgftransformshift{\pgfpoint{0mm}{0.866025*\GP@patternsize}}
- \pgfpathmoveto{\pgfpoint{0mm}{0mm}}
- \pgfpathlineto{\pgfpoint{0.5*\GP@patternsize}{0mm}}
- \pgfpathlineto{\pgfpoint{\GP@patternsize}{-0.866025*\GP@patternsize}}
- \pgfpathlineto{\pgfpoint{2*\GP@patternsize}{-0.866025*\GP@patternsize}}
- \pgfpathlineto{\pgfpoint{2.5*\GP@patternsize}{0mm}}
- \pgfpathlineto{\pgfpoint{3*\GP@patternsize}{0mm}}
- \pgfpathmoveto{\pgfpoint{0.5*\GP@patternsize}{0mm}}
- \pgfpathlineto{\pgfpoint{\GP@patternsize}{0.866025*\GP@patternsize}}
- \pgfpathlineto{\pgfpoint{2*\GP@patternsize}{0.866025*\GP@patternsize}}
- \pgfpathlineto{\pgfpoint{2.5*\GP@patternsize}{0mm}}
- \pgfusepath{stroke}
+\tikzdeclarepattern{
+ name=hexagons,
+ type=uncolored,
+ bounding box={(0,0) and (3*\GP@patternsize,0.866025*2*\GP@patternsize)},
+ tile size={(3*\GP@patternsize,0.866025*2*\GP@patternsize)},
+ parameters={\tikzhexrotate},
+ tile transformation={rotate=\tikzhexrotate},
+ defaults={
+ rotate/.store in=\tikzhexrotate,rotate=0,
+ },
+ code={
+ \pgfsetlinewidth{0.6pt}
+ \pgftransformshift{\pgfpoint{0mm}{0.866025*\GP@patternsize}}
+ \pgfpathmoveto{\pgfpoint{0mm}{0mm}}
+ \pgfpathlineto{\pgfpoint{0.5*\GP@patternsize}{0mm}}
+ \pgfpathlineto{\pgfpoint{\GP@patternsize}{-0.866025*\GP@patternsize}}
+ \pgfpathlineto{\pgfpoint{2*\GP@patternsize}{-0.866025*\GP@patternsize}}
+ \pgfpathlineto{\pgfpoint{2.5*\GP@patternsize}{0mm}}
+ \pgfpathlineto{\pgfpoint{3*\GP@patternsize}{0mm}}
+ \pgfpathmoveto{\pgfpoint{0.5*\GP@patternsize}{0mm}}
+ \pgfpathlineto{\pgfpoint{\GP@patternsize}{0.866025*\GP@patternsize}}
+ \pgfpathlineto{\pgfpoint{2*\GP@patternsize}{0.866025*\GP@patternsize}}
+ \pgfpathlineto{\pgfpoint{2.5*\GP@patternsize}{0mm}}
+ \pgfusepath{stroke}
+ }
}
}
@@ -225,50 +236,28 @@
%% We have to delay this definition until after \GP@patternsize is
%% redefined (by the pattern selection and/or user override)
\newcommand{\GP@declaretripat}{
-\pgfdeclarepatternformonly
- %% Name of the pattern
- {triangles}
- %% Set the lower left corner of the pattern
- {\pgfpointorigin}
- %% Set the upper right corner of the pattern
- {\pgfpoint{\GP@patternsize}{2*0.8660254*\GP@patternsize}}
- %% Declare the size of the pattern blocks
- {\pgfpoint{\GP@patternsize}{2*0.8660254*\GP@patternsize}}
- %% Draw the pattern
- {
- \pgfsetlinewidth{0.6pt}
- \pgfpathmoveto{\pgfpoint{0mm}{0mm}}
- \pgfpathlineto{\pgfpoint{\GP@patternsize}{2*0.8660254*\GP@patternsize}}
- \pgfpathlineto{\pgfpoint{0mm}{2*0.8660254*\GP@patternsize}}
- \pgfpathmoveto{\pgfpoint{0mm}{0.8660254*\GP@patternsize}}
- \pgfpathlineto{\pgfpoint{\GP@patternsize}{0.8660254*\GP@patternsize}}
- \pgfpathmoveto{\pgfpoint{0mm}{2*0.8660254*\GP@patternsize}}
- \pgfpathlineto{\pgfpoint{\GP@patternsize}{0mm}}
- \pgfpathlineto{\pgfpoint{0mm}{0mm}}
- \pgfusepath{stroke}
- }
-}
-\newcommand{\GP@declareisopat}{
-\pgfdeclarepatternformonly
- %% Name of the pattern
- {isometric}
- %% Set the lower left corner of the pattern
- {\pgfpointorigin}
- %% Set the upper right corner of the pattern
- {\pgfpoint{2*0.8660254*\GP@patternsize}{\GP@patternsize}}
- %% Declare the size of the pattern blocks
- {\pgfpoint{2*0.8660254*\GP@patternsize}{\GP@patternsize}}
- %% Draw the pattern
- {
- \pgfsetlinewidth{0.6pt}
- \pgfpathmoveto{\pgfpoint{0mm}{0mm}}
- \pgfpathlineto{\pgfpoint{2*0.8660254*\GP@patternsize}{\GP@patternsize}}
- \pgfpathlineto{\pgfpoint{2*0.8660254*\GP@patternsize}{0mm}}
- \pgfpathlineto{\pgfpoint{0mm}{\GP@patternsize}}
- \pgfpathlineto{\pgfpoint{0mm}{0mm}}
- \pgfpathmoveto{\pgfpoint{0.8660254*\GP@patternsize}{0mm}}
- \pgfpathlineto{\pgfpoint{0.8660254*\GP@patternsize}{\GP@patternsize}}
- \pgfusepath{stroke}
+\tikzdeclarepattern{
+ name=triangles,
+ type=uncolored,
+ bounding box={(0,0) and (\GP@patternsize,2*0.866025*\GP@patternsize)},
+ tile size={(\GP@patternsize,2*0.866025*\GP@patternsize)},
+ parameters={\tikztrirotate},
+ tile transformation={rotate=\tikztrirotate},
+ defaults={
+ rotate/.store in=\tikztrirotate,rotate=0,
+ },
+ code={
+ \pgfsetlinewidth{0.6pt}
+ \pgfpathmoveto{\pgfpoint{0mm}{0mm}}
+ \pgfpathlineto{\pgfpoint{\GP@patternsize}{2*0.8660254*\GP@patternsize}}
+ \pgfpathlineto{\pgfpoint{0mm}{2*0.8660254*\GP@patternsize}}
+ \pgfpathmoveto{\pgfpoint{0mm}{0.8660254*\GP@patternsize}}
+ \pgfpathlineto{\pgfpoint{\GP@patternsize}{0.8660254*\GP@patternsize}}
+ \pgfpathmoveto{\pgfpoint{0mm}{2*0.8660254*\GP@patternsize}}
+ \pgfpathlineto{\pgfpoint{\GP@patternsize}{0mm}}
+ \pgfpathlineto{\pgfpoint{0mm}{0mm}}
+ \pgfusepath{stroke}
+ }
}
}
@@ -390,7 +379,7 @@
\define@choicekey*{GP}{pattern}[\val\nr]%
%% Allowed values for pattern:
- {std,stdeight,majmin,dot,hex,tri,iso,lightcone,ruled,doubleruled}{%
+ {std,stdeight,majmin,dot,hex,hexup,tri,iso,lightcone,ruled,doubleruled}{%
\ifcase\nr\relax
%% std
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -449,6 +438,14 @@
\fill [pattern=hexagons,pattern color=minorcolor] (a) rectangle (b);
}
\or
+ %% hexup
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Hex-up grid
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \GP@setpattern{true}{}{0.1666in}{%
+ \fill [pattern={hexagons[rotate=90]},pattern color=minorcolor] (a) rectangle (b);
+ }
+ \or
%% tri
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Triangle grid, adjust triangle size in the preamble
@@ -462,7 +459,7 @@
%% Isometric grid
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\GP@setpattern{true}{}{0.25in}{%
- \fill [pattern=isometric, pattern color=minorcolor] (a) rectangle (b);
+ \fill [pattern={triangles[rotate=90]}, pattern color=minorcolor] (a) rectangle (b);
}
\or
%% lightcone
@@ -546,7 +543,6 @@
%% patterns with the correct lengths.
\GP@declarehexpat
\GP@declaretripat
-\GP@declareisopat
\GP@declarelightconepat
\GP@declaredotpat