summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/curve2e/curve2e.dtx57
1 files changed, 52 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/latex/curve2e/curve2e.dtx b/Master/texmf-dist/source/latex/curve2e/curve2e.dtx
index 9b2336f5c4f..d0672852dd7 100644
--- a/Master/texmf-dist/source/latex/curve2e/curve2e.dtx
+++ b/Master/texmf-dist/source/latex/curve2e/curve2e.dtx
@@ -6,7 +6,7 @@
\keepsilent
\preamble
- Copyright (C) 2005--2015 Claudio Beccari all rights reserved.
+ Copyright (C) 2005--2019 Claudio Beccari all rights reserved.
License information appended
\endpreamble
@@ -39,7 +39,7 @@ README.txt and manifest.txt.
%
% \iffalse
%<*package>
-%<package>\NeedsTeXFormat{LaTeX2e}[2014/05/01]
+%<package>\NeedsTeXFormat{LaTeX2e}[2016/01/01]
%</package>
%<*driver>
\ProvidesFile{curve2e.dtx}%
@@ -48,7 +48,7 @@ README.txt and manifest.txt.
%<+readme>File README.txt for package curve2e
%<+manifest>File manifest.txt for package curve2e
%<*package|readme|manifest>
- [2015/07/11 v.1.60 Extension package for pict2e]
+ [2019/02/07 v.1.61 Extension package for pict2e]
%</package|readme|manifest>
%<*driver>
\documentclass{ltxdoc}\errorcontextlines=9
@@ -100,7 +100,7 @@ README.txt and manifest.txt.
%</driver>
% \fi
%
-% \CheckSum{3087}
+% \CheckSum{3138}
% \begin{abstract}
% This file documents the |curve2e| extension package to the recent
% implementation of the |pict2e| bundle that has been described by Lamport
@@ -641,7 +641,7 @@ README.txt and manifest.txt.
% \Curve*(2.5,0)<1,1>(5,3.5)<0,1>(4,5)<-1,0>(2.5,3.5)<-0.5,-1.2>[-0.5,1.2](1,5)<-1,0>(0,3.5)<0,-1>(2.5,0)<1,-1>}
% \end{picture}
% \end{minipage}
-%\caption{Coloring the inside of a closeded path drawn with \texttt{\string\Curve*}}
+%\caption{Coloring the inside of a closed path drawn with \texttt{\string\Curve*}}
%\label{fig:colored-curve}
% \end{figure}
@@ -734,6 +734,7 @@ README.txt and manifest.txt.
% \begin{macrocode}
\RequirePackage{color}
\RequirePackageWithOptions{pict2e}[2014/01/01]
+\RequirePackage{xparse}
% \end{macrocode}
%
% The next macros are just for debugging. With the \texttt{trace} package it
@@ -1343,6 +1344,52 @@ README.txt and manifest.txt.
\@ifnextchar\lp@r{\p@lyline}{\strokepath\ignorespaces}}
% \end{macrocode}
%
+% The same treatment must be done for the \cs{polygon} macros
+% \begin{macrocode}
+\providecommand\polygon{}
+\RenewDocumentCommand\polygon{s O{\beveljoin} }{\@killglue\begingroup
+\IfBooleanTF{#1}{\@tempswatrue}{\@tempswafalse}%
+\@polygon[#2]}
+
+\def\@polygon[#1](#2){\@killglue#1\GetCoord(#2)\d@mX\d@mY
+ \pIIe@moveto{\d@mX\unitlength}{\d@mY\unitlength}%
+ \@ifnextchar\lp@r{\@@polygon}{%
+ \PackageWarning{curve2e}%
+ {Polygons require at least two vertices!\MessageBreak
+ Control your polygon specification\MessageBreak}%
+ \ignorespaces}}
+
+ \def\@@polygon(#1){\GetCoord(#1)\d@mX\d@mY
+ \pIIe@lineto{\d@mX\unitlength}{\d@mY\unitlength}%
+ \@ifnextchar\lp@r{\@@polygon}{\pIIe@closepath
+ \if@tempswa\pIIe@fillGraph\else\pIIe@strokeGraph\fi
+ \endgroup
+ \ignorespaces}}
+% \end{macrocode}
+% Now, for example, a filled polygon can be drawn using polar coordinates
+% for its vertices; see figure~\ref{fig:filled-polygon}
+%
+% \begin{figure}
+% \begin{minipage}{0.55\textwidth}
+%\begin{verbatim}
+% \unitlength=0.07\hsize
+% \begin{picture}(8,8)(-4,-4)\color{red}
+% \polygon*(45:4)(135:4)(-135:4)(-45:4)
+% \end{picture}
+%\end{verbatim}
+% \end{minipage}
+% \hfill
+% \begin{minipage}{0.4\textwidth}\centering
+% \unitlength=0.07\hsize
+% \begin{picture}(8,8)(-4,-4)\color{red}
+% \polygon*(45:4)(135:4)(-135:4)(-45:4)
+% \end{picture}
+% \end{minipage}
+% \caption{The code and the result of defining a polygon with its vertex
+% polar coordinates}\label{fig:filled-polygon}
+% \end{figure}
+%
+%
% \subsection{The red service grid}
% The next command is very useful for debugging while editing one's drawings;
% it draws a red grid with square meshes that are ten drawing units apart;