summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-04-16 03:01:17 +0000
committerNorbert Preining <norbert@preining.info>2020-04-16 03:01:17 +0000
commit7412eb57b148d2ecd77d0291c97fb05bea8efbb0 (patch)
treeed628b0a7a0eb72a835f5462808f900e850d2dc8 /graphics
parente768cc604852d6fe8821592cea67835f67eab0db (diff)
CTAN sync 202004160301
Diffstat (limited to 'graphics')
-rw-r--r--graphics/pgf/contrib/dpcircling/DPcircling.pdfbin0 -> 29754 bytes
-rw-r--r--graphics/pgf/contrib/dpcircling/DPcircling.sty296
-rw-r--r--graphics/pgf/contrib/dpcircling/DPcircling.tex77
-rw-r--r--graphics/pgf/contrib/dpcircling/LICENSE21
-rw-r--r--graphics/pgf/contrib/dpcircling/README.md9
5 files changed, 403 insertions, 0 deletions
diff --git a/graphics/pgf/contrib/dpcircling/DPcircling.pdf b/graphics/pgf/contrib/dpcircling/DPcircling.pdf
new file mode 100644
index 0000000000..6fc8a1c84f
--- /dev/null
+++ b/graphics/pgf/contrib/dpcircling/DPcircling.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/dpcircling/DPcircling.sty b/graphics/pgf/contrib/dpcircling/DPcircling.sty
new file mode 100644
index 0000000000..8b7dd7ccb5
--- /dev/null
+++ b/graphics/pgf/contrib/dpcircling/DPcircling.sty
@@ -0,0 +1,296 @@
+%%
+%% This is file `DPcircling.sty'
+%% (Last Update: 2020/04/15)
+%% Maintained on GitHub:
+%% https://github.com/domperor/DPcircling
+%%
+%% Copyright (c) 2020 Oura M. (domperor)
+%% Released under the MIT license
+%% https://opensource.org/licenses/mit-license.php
+%%
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{DPcircling}[2020/04/15 v1.0 circling letters with circ/rect/jag/fan using TikZ]
+
+\RequirePackage{tikz}
+\RequirePackage{keyval}
+
+%%Setting up dimensions and boxes
+\newbox\DPcircling@box
+\newdimen\DPcircling@content@wd
+\newdimen\DPcircling@content@ht
+\newdimen\DPcircling@content@dp
+\newdimen\DPcircling@outline@wd@user
+\newdimen\DPcircling@outline@ht@user
+\newdimen\DPcircling@outline@wd@user@temporal
+\newdimen\DPcircling@outline@ht@user@temporal
+\newdimen\DPcircling@outline@halfwd
+\newdimen\DPcircling@outline@halfht
+\newdimen\DPcircling@depressingheight
+\newdimen\DPcircling@linewidth
+\newdimen\DPcircling@linewidth@default
+\newdimen\DPcircling@linewidth@temporal
+
+%%Linecolor
+%%default=black
+\def\DPcircling@linecolor@default{black}
+\def\DPcirclingLinecolor#1{\def\DPcircling@linecolor@default{#1}}
+
+\newif\ifDPcircling@LinecolorTemporalSet
+\DPcircling@LinecolorTemporalSetfalse
+\def\DPcirclingTemporalLinecolor#1{\DPcircling@LinecolorTemporalSettrue
+\def\DPcircling@linecolor@temporal{#1}}
+
+%%Linewidth
+%%default=1pt
+\DPcircling@linewidth@default=1pt
+\def\DPcirclingLinewidth#1{\DPcircling@linewidth@default=#1}
+
+\newif\ifDPcircling@LinewidthTemporalSet
+\DPcircling@LinewidthTemporalSetfalse
+\def\DPcirclingTemporalLinewidth#1{\DPcircling@LinewidthTemporalSettrue
+\DPcircling@linewidth@temporal=#1}
+
+%%Outline Width
+\newif\ifDPcircling@OutlineWidthSet
+\DPcircling@OutlineWidthSetfalse
+\def\DPcirclingOutlineWidth#1{\DPcircling@OutlineWidthSettrue
+\DPcircling@outline@wd@user=#1}
+
+\newif\ifDPcircling@OutlineWidthTemporalSet
+\DPcircling@OutlineWidthTemporalSetfalse
+\def\DPcirclingTemporalOutlineWidth#1{\DPcircling@OutlineWidthTemporalSettrue
+\DPcircling@outline@wd@user@temporal=#1}
+
+%%Outline Height
+\newif\ifDPcircling@OutlineHeightSet
+\DPcircling@OutlineHeightSetfalse
+\def\DPcirclingOutlineHeight#1{\DPcircling@OutlineHeightSettrue
+\DPcircling@outline@ht@user=#1}
+
+\newif\ifDPcircling@OutlineHeightTemporalSet
+\DPcircling@OutlineHeightTemporalSetfalse
+\def\DPcirclingTemporalOutlineHeight#1{\DPcircling@OutlineHeightTemporalSettrue
+\DPcircling@outline@ht@user@temporal=#1}
+
+%%Baseline Adjustment and else
+\def\DPcircling@common#1{%
+%%setting up content box
+\ifmmode
+\def\DPcircling@content{$#1$}%
+\else
+\def\DPcircling@content{#1}%
+\fi
+%
+\setbox\DPcircling@box\hbox{\DPcircling@content}%
+\DPcircling@content@wd=\wd\DPcircling@box
+\DPcircling@content@ht=\ht\DPcircling@box
+\DPcircling@content@dp=\dp\DPcircling@box
+%%outline width
+\DPcircling@outline@halfwd=\DPcircling@content@wd
+\ifDPcircling@OutlineWidthSet%
+\DPcircling@outline@halfwd=0.5\DPcircling@outline@wd@user
+\fi
+\ifDPcircling@OutlineWidthTemporalSet
+\DPcircling@outline@halfwd=0.5\DPcircling@outline@wd@user@temporal
+\fi
+%%outline height
+\DPcircling@outline@halfht=\DPcircling@content@ht
+\ifDPcircling@OutlineHeightSet
+\DPcircling@outline@halfht=0.5\DPcircling@outline@ht@user
+\fi
+\ifDPcircling@OutlineHeightTemporalSet
+\DPcircling@outline@halfht=0.5\DPcircling@outline@ht@user@temporal
+\fi
+%%line width
+\DPcircling@linewidth=\DPcircling@linewidth@default
+\ifDPcircling@LinewidthTemporalSet
+\DPcircling@linewidth=\DPcircling@linewidth@temporal
+\fi
+%%line color
+\let\DPcircling@linecolor\DPcircling@linecolor@default
+\ifDPcircling@LinecolorTemporalSet
+\let\DPcircling@linecolor\DPcircling@linecolor@temporal
+\fi
+%%baseline adjustment
+\DPcircling@depressingheight=\DPcircling@outline@halfht
+\advance\DPcircling@depressingheight-0.5\DPcircling@content@ht
+\advance\DPcircling@depressingheight0.5\DPcircling@content@dp
+\advance\DPcircling@depressingheight0.5\DPcircling@linewidth
+}
+
+%%Option Keys[line color=...,line width=...,width=...,height=...]
+\define@key{DPcirclingkey}{line color}{\DPcirclingTemporalLinecolor{#1}}
+\define@key{DPcirclingkey}{line width}{\DPcirclingTemporalLinewidth{#1}}
+\define@key{DPcirclingkey}{width}{\DPcirclingTemporalOutlineWidth{#1}}
+\define@key{DPcirclingkey}{height}{\DPcirclingTemporalOutlineHeight{#1}}
+
+%%DefaultChanger \DPcirclingDefault{line color=...,line width=...,width=...,height=...}
+\define@key{DPcirclingDefaultkey}{line color}{\DPcirclingLinecolor{#1}}
+\define@key{DPcirclingDefaultkey}{line width}{\DPcirclingLinewidth{#1}}
+\define@key{DPcirclingDefaultkey}{width}{\DPcirclingOutlineWidth{#1}}
+\define@key{DPcirclingDefaultkey}{height}{\DPcirclingOutlineHeight{#1}}
+
+\def\DPcirclingDefault#1{%
+\setkeys{DPcirclingDefaultkey}{#1}%
+}
+
+%%Circle \DPcircling (=\DPcirc/\DPcircle)
+%%Default width=max{2*(content width), 2em}
+%%Default height=2*(content height)
+\def\DPcircling{\@ifnextchar[\@DPcircling{\@DPcircling[]}}
+\let\DPcirc\DPcircling
+\let\DPcircle\DPcircling
+\def\@DPcircling[#1]#2{%
+\setkeys{DPcirclingkey}{#1}%
+\@@DPcircling{#2}%
+\DPcircling@LinecolorTemporalSetfalse%
+\DPcircling@LinewidthTemporalSetfalse%
+\DPcircling@OutlineWidthTemporalSetfalse%
+\DPcircling@OutlineHeightTemporalSetfalse%
+}
+
+\def\@@DPcircling#1{\thinspace\DPcircling@common{#1}%
+\ifDPcircling@OutlineWidthSet\relax\else
+\ifDPcircling@OutlineWidthTemporalSet\relax\else
+\ifdim\DPcircling@content@wd<1em%
+\DPcircling@outline@halfwd=1em%
+\fi\fi\fi
+\raisebox{-\DPcircling@depressingheight}{%
+\begin{tikzpicture}%
+\draw[line width=\DPcircling@linewidth,color=\DPcircling@linecolor](0,0) ellipse [x radius=\DPcircling@outline@halfwd,y radius=\DPcircling@outline@halfht];
+\draw[anchor=center,inner sep=0pt,outer sep=0pt] (0,0) node {\DPcircling@content};
+\end{tikzpicture}%
+}\thinspace
+}
+
+%%Rectangle \DPrectangle (=\DPrect)
+%%Default width=(content width)+2em
+%%Default height=2*(content height)
+\def\DPrectangle{\@ifnextchar[\@DPrectangle{\@DPrectangle[]}}
+\let\DPrect\DPrectangle
+\def\@DPrectangle[#1]#2{%
+\setkeys{DPcirclingkey}{#1}%
+\@@DPrectangle{#2}%
+\DPcircling@LinecolorTemporalSetfalse%
+\DPcircling@LinewidthTemporalSetfalse%
+\DPcircling@OutlineWidthTemporalSetfalse%
+\DPcircling@OutlineHeightTemporalSetfalse%
+}
+
+\def\@@DPrectangle#1{\thinspace\DPcircling@common{#1}%
+\ifDPcircling@OutlineWidthSet\relax\else
+\ifDPcircling@OutlineWidthTemporalSet\relax\else
+\divide\DPcircling@outline@halfwd by 2%
+\advance\DPcircling@outline@halfwd1em%
+\fi\fi
+\raisebox{-\DPcircling@depressingheight}{%
+\begin{tikzpicture}%
+\draw[line width=\DPcircling@linewidth,color=\DPcircling@linecolor](-\DPcircling@outline@halfwd,-\DPcircling@outline@halfht) rectangle (\DPcircling@outline@halfwd,\DPcircling@outline@halfht);
+\draw[anchor=center,inner sep=0pt,outer sep=0pt] (0,0) node {\DPcircling@content};
+\end{tikzpicture}%
+}\thinspace
+}
+
+%%Jagged Rectangle \DPjagged
+%%Default width=(content width)+2em
+%%Default height=2*(content height)
+\def\DPjagged{\@ifnextchar[\@DPjagged{\@DPjagged[]}}
+\def\@DPjagged[#1]#2{%
+\setkeys{DPcirclingkey}{#1}%
+\@@DPjagged{#2}%
+\DPcircling@LinecolorTemporalSetfalse%
+\DPcircling@LinewidthTemporalSetfalse%
+\DPcircling@OutlineWidthTemporalSetfalse%
+\DPcircling@OutlineHeightTemporalSetfalse%
+}
+
+\def\@@DPjagged#1{\thinspace\DPcircling@common{#1}%
+\ifDPcircling@OutlineWidthSet\relax\else
+\ifDPcircling@OutlineWidthTemporalSet\relax\else
+\divide\DPcircling@outline@halfwd by 2%
+\advance\DPcircling@outline@halfwd1em%
+\fi\fi
+\raisebox{-\DPcircling@depressingheight}{%
+\begin{tikzpicture}[x=0.048786\DPcircling@outline@halfwd,y=0.08952\DPcircling@outline@halfht]%
+\draw[line width=\DPcircling@linewidth,color=\DPcircling@linecolor]%
+(19.4975,10.9931)--
+(14.8938,8.5269)--
+(10.405,10.1944)--
+(6.245,7.6269)--
+(2.21,10.2181)--
+(-2.195,8.5781)--
+(-6.235,11.1706)--
+(-10.1737,8.6031)--
+(-14.4662,10.2694)--
+(-17.9112,7.8244)--
+(-19.7962,7.0806)--
+(-18.0462,4.8219)--
+(-20.4975,3.1006)--
+(-17.925,1.2831)--
+(-19.5262,-1.2756)--
+(-16.955,-3.1006)--
+(-19.41,-5.2731)--
+(-17.65,-7.8869)--
+(-19.4987,-10.9931)--
+(-14.8937,-8.5281)--
+(-10.4037,-10.1956)--
+(-6.245,-7.6269)--
+(-2.21,-10.2194)--
+(2.195,-8.5794)--
+(6.2363,-11.1706)--
+(10.175,-8.6044)--
+(14.4663,-10.2706)--
+(17.9113,-7.8256)--
+(19.7963,-7.0819)--
+(18.0463,-4.8231)--
+(20.4975,-3.1019)--
+(17.9263,-1.2769)--
+(19.5263,1.2856)--
+(16.955,3.1169)--
+(19.4113,5.2831)--
+(17.66,7.9494)--
+(19.4975,10.9931)--
+cycle;
+\draw[anchor=center,inner sep=0pt,outer sep=0pt] (0,0) node {\DPcircling@content};
+\end{tikzpicture}%
+}\thinspace
+}
+
+\def\DPfanshape{\@ifnextchar[\@DPfanshape{\@DPfanshape[]}}
+\def\@DPfanshape[#1]#2{%
+\setkeys{DPcirclingkey}{#1}%
+\@@DPfanshape{#2}%
+\DPcircling@LinecolorTemporalSetfalse%
+\DPcircling@LinewidthTemporalSetfalse%
+\DPcircling@OutlineWidthTemporalSetfalse%
+\DPcircling@OutlineHeightTemporalSetfalse%
+}
+
+%%Fan-shape \DPfanshape
+%%Default width=(content width)+2em
+%%Default height=2*(content height)
+\def\@@DPfanshape#1{\thinspace\DPcircling@common{#1}%
+\ifDPcircling@OutlineWidthSet\relax\else
+\ifDPcircling@OutlineWidthTemporalSet\relax\else
+\divide\DPcircling@outline@halfwd by 2%
+\advance\DPcircling@outline@halfwd1em%
+\fi\fi
+\raisebox{-\DPcircling@depressingheight}{%
+\begin{tikzpicture}[x=0.0467650318\DPcircling@outline@halfwd,y=0.114731528\DPcircling@outline@halfht]%
+\draw[line width=\DPcircling@linewidth,color=\DPcircling@linecolor]%
+(14.9805,-8.716) ..
+controls (5.4925,-4.252) and (-5.4925,-4.252) ..
+(-14.9805,-8.716) --
+(-21.3835,4.891) ..
+controls (-7.8405,11.264) and (7.8395,11.264) ..
+(21.3835,4.891) --
+(14.9805,-8.716) --
+cycle;
+\draw[anchor=center,inner sep=0pt,outer sep=0pt] (0,0) node {\DPcircling@content};
+\end{tikzpicture}%
+}\thinspace
+}
+\endinput
+%%
+%% End of file `DPcircling.sty'.
diff --git a/graphics/pgf/contrib/dpcircling/DPcircling.tex b/graphics/pgf/contrib/dpcircling/DPcircling.tex
new file mode 100644
index 0000000000..4fe11b535e
--- /dev/null
+++ b/graphics/pgf/contrib/dpcircling/DPcircling.tex
@@ -0,0 +1,77 @@
+%%
+%% This is the documentation of DPcircling package.
+%% (Last Update: 2020/04/15)
+%% Maintained on GitHub:
+%% https://github.com/domperor/DPcircling
+%%
+%% Copyright (c) 2020 Oura M. (domperor)
+%% Released under the MIT license
+%% https://opensource.org/licenses/mit-license.php
+%%
+
+\documentclass[10pt]{article}
+\usepackage[dvipdfmx]{graphicx}
+\usepackage{geometry}
+\usepackage{url}
+\geometry{a4paper,total={170mm,257mm},left=20mm,top=20mm}
+\usepackage{DPcircling}
+\title{DPcircling package v1.0}
+\author{Oura M. (domperor)}
+\date{\today}
+\pagestyle{empty}
+\begin{document}
+\maketitle\thispagestyle{empty}
+
+\section*{about this package}
+
+This package provides 4 types of text decorations: \verb+\DPcircling+ \DPcircling{circle}, \verb+\DPrectangle+ \DPrectangle{rectangle}, \verb+\DPjagged+ \DPjagged{jagged rectangle}, and \verb+\DPfanshape+ \DPfanshape{fan-shape}. The baseline would be adjusted properly according to the surroundings\footnote{Unless you cram too tall things into a small decoration box. The box would be broken, and you would make a mess.}. You can use these decorations both in text mode and in math mode. You can specify \verb+line color+, \verb+line width+, \verb+width+, and \verb+height+ as option keys.
+
+\
+
+This package is maintained on GitHub: \url{https://github.com/domperor/DPcircling}
+
+\subsection*{basic usage}
+
+\begin{quote}
+(in preamble): \verb+\usepackage[+\textit{\texttt{driver}}\verb+]{graphicx}\usepackage{DPcircling}+\footnote{The author personally uses dvipdfmx as the driver.}
+
+(in your text): \verb+\DP*****[+\textit{\texttt{options}}\verb+]{+\textit{\texttt{content}}\verb+}+
+\end{quote}
+
+For instance, the code
+\begin{quote}
+\begin{verbatim}
+It is a \DPjagged[line color=blue,line width=1.4pt]{\color{brown}great} opportunity.
+\end{verbatim}
+\end{quote}
+\noindent gives the result:
+\begin{quote}
+It is a \DPjagged[line color=blue, line width= 1.4pt]{\color{brown}great} opportunity.
+\end{quote}
+
+\subsection*{required packages}
+
+DPcircling requires the following packages: \verb+tikz+, \verb+keyval+, \verb+graphicx+, and the ones that these packages require.
+
+\subsection*{aliases}
+
+\verb+\DPcircle+ and \verb+\DPcirc+ are the aliases of \verb+\DPcircling+.
+\verb+\DPrect+ is the alias of \verb+\DPrectangle+.
+
+\subsection*{changing default values}
+
+The default values of \verb+line color+, \verb+line width+, \verb+width+, and \verb+height+ are \verb+black+, \verb+1pt+, noted below(*), and \verb+2*(content height)+. You can modify these like this:
+\begin{quote}
+\begin{verbatim}
+\DPcirclingDefault{line color=brown, line width=0.33pt, width=4em, height=5em}
+\end{verbatim}
+\end{quote}
+
+\noindent (*) The default values of \verb+width+ are \verb+max{2*(content width), 2em}+ (circle) and
+\verb:(content width)+2em: (else).
+
+\section*{version history}
+
+2020/04/15 v1.0
+
+\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/dpcircling/LICENSE b/graphics/pgf/contrib/dpcircling/LICENSE
new file mode 100644
index 0000000000..4302f41e45
--- /dev/null
+++ b/graphics/pgf/contrib/dpcircling/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Oura M. (domperor)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/graphics/pgf/contrib/dpcircling/README.md b/graphics/pgf/contrib/dpcircling/README.md
new file mode 100644
index 0000000000..427b9403a6
--- /dev/null
+++ b/graphics/pgf/contrib/dpcircling/README.md
@@ -0,0 +1,9 @@
+# DPcircling
+
+This package provides 4 types of text decorations using TikZ. You can circle your text with circles, rectangles, jagged rectangles, and fan-shapes. See the documentation: DPcircling.pdf
+
+Maintained on GitHub: https://github.com/domperor/DPcircling
+
+Copyright (c) 2020 Oura M. (domperor)
+This package is released under the MIT license.
+https://opensource.org/licenses/mit-license.php \ No newline at end of file