From a0ec6c4d3c2dc5ee28fce9fff1c114a2cccfe2dd Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 20 Jul 2014 22:17:56 +0000 Subject: celtic (20jul14) git-svn-id: svn://tug.org/texlive/trunk@34676 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/celtic/README | 9 + Master/texmf-dist/doc/latex/celtic/celtic.pdf | Bin 0 -> 356708 bytes Master/texmf-dist/doc/latex/celtic/celtic_code.pdf | Bin 0 -> 264119 bytes Master/texmf-dist/doc/latex/celtic/celtic_doc.tex | 229 +++++ Master/texmf-dist/source/latex/celtic/celtic.dtx | 1059 ++++++++++++++++++++ Master/texmf-dist/source/latex/celtic/celtic.ins | 77 ++ .../tex/latex/celtic/tikzlibraryceltic.code.tex | 508 ++++++++++ 7 files changed, 1882 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/celtic/README create mode 100644 Master/texmf-dist/doc/latex/celtic/celtic.pdf create mode 100644 Master/texmf-dist/doc/latex/celtic/celtic_code.pdf create mode 100644 Master/texmf-dist/doc/latex/celtic/celtic_doc.tex create mode 100644 Master/texmf-dist/source/latex/celtic/celtic.dtx create mode 100644 Master/texmf-dist/source/latex/celtic/celtic.ins create mode 100644 Master/texmf-dist/tex/latex/celtic/tikzlibraryceltic.code.tex (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/celtic/README b/Master/texmf-dist/doc/latex/celtic/README new file mode 100644 index 00000000000..7fd9769531b --- /dev/null +++ b/Master/texmf-dist/doc/latex/celtic/README @@ -0,0 +1,9 @@ +---------------------------------------------------------------- +celtic --- TikZ library for drawing Celtic knots +E-mail: loopspace@mathforge.org +Released under the LaTeX Project Public License v1.3c or later +See http://www.latex-project.org/lppl.txt +---------------------------------------------------------------- + +This package is for the generation of Celtic knots starting from +a grid of walls. diff --git a/Master/texmf-dist/doc/latex/celtic/celtic.pdf b/Master/texmf-dist/doc/latex/celtic/celtic.pdf new file mode 100644 index 00000000000..a6ad95c6777 Binary files /dev/null and b/Master/texmf-dist/doc/latex/celtic/celtic.pdf differ diff --git a/Master/texmf-dist/doc/latex/celtic/celtic_code.pdf b/Master/texmf-dist/doc/latex/celtic/celtic_code.pdf new file mode 100644 index 00000000000..ae297dd4bcb Binary files /dev/null and b/Master/texmf-dist/doc/latex/celtic/celtic_code.pdf differ diff --git a/Master/texmf-dist/doc/latex/celtic/celtic_doc.tex b/Master/texmf-dist/doc/latex/celtic/celtic_doc.tex new file mode 100644 index 00000000000..cf7271d72e8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/celtic/celtic_doc.tex @@ -0,0 +1,229 @@ +\immediate\write18{tex celtic.dtx} +\documentclass{ltxdoc} +\usepackage[T1]{fontenc} +\usepackage{trace} +\usepackage{lmodern} +\usepackage{morefloats} +\usepackage{tikz} +\usetikzlibrary{celtic} +\usepackage[numbered]{hypdoc} +\definecolor{lstbgcolor}{rgb}{0.9,0.9,0.9} + +\usepackage{listings} +\lstloadlanguages{[LaTeX]TeX} +\lstset{breakatwhitespace=true,breaklines=true,language=TeX} + +\usepackage{fancyvrb} + +\newenvironment{example} + {\VerbatimEnvironment + \begin{VerbatimOut}{example.out}} + {\end{VerbatimOut} + \begin{center} + \setlength{\parindent}{0pt} + \fbox{\begin{minipage}{.9\linewidth} + \lstset{breakatwhitespace=true,breaklines=true,language=TeX,basicstyle=\small} + \lstinputlisting[]{example.out} + \end{minipage}} + + \fbox{\begin{minipage}{.9\linewidth} + \centering + \input{example.out} + \end{minipage}} +\end{center} +} + +\providecommand*{\url}{\texttt} + +\title{The \textsf{celtic} TikZ Library: Documentation} +\author{Andrew Stacey \\ \url{stacey@math.ntnu.no}} +\date{24th May 2014} + +\begin{document} +\VerbatimFootnotes +\maketitle + +\begin{center} +\begin{tikzpicture}[ + scale=.5, + celtic path/.style={ + draw, + double=gray!40, + red, + double distance=1mm, + line width=4pt + }, + celtic path 1/.style={ + green!50!black, + }, +] +\CelticDrawPath{ + symmetric crossings={ + 1,2,-; + 2,1,|; + 4,3,-; + 3,4,|; + }, + size={8,8}, +} +\end{tikzpicture} +\end{center} + +\section{Introduction} + +This is a little TikZ library for drawing Celtic style knots. +The particular type of Celtic knot (technically, \emph{link}) is very simple and can be specified by listing the ``walls'' within the region of the knot. +From this information, it is possible to build the entire link and thus to tell TikZ how render it. +That is what this library does. + +\section{Usage} + +The routine is implemented as a TikZ library. +Thus to use it, add \Verb+celtic+ to the list of TikZ libraries that you load. + +\begin{verbatim} +\usetikzlibrary{celtic} +\end{verbatim} + +The library defines one command which renders a Celtic knot. +The knot is specified by passing various \emph{key-value} pairs to this command. +The library also defines styles which can be used to modify the rendering. + +\DescribeMacro{\CelticDrawPath}\Verb+\CelticDrawPath{}+ is the command to render a knot. +It takes one option which is a list of key-value pairs which specify the knot. +The allowed key-value pairs are as follows. + +\begin{itemize} +\item \Verb+max steps=N+ The process of finding the paths through the knot (needed to ensure that they are coloured correctly) is iterative. +Although every care has been taken to ensure that the iteration is confined (and therefore finite), the iteration has been devised with a built-in limit. +This limit can be adjusted using this key. +The default is \(20\). +If the limit is reached, a warning will be issued (and the knot will probably look wrong). +In that case, use this key to raise the limit. + +\item \Verb+flip+ The specification of a Celtic knot in terms of walls does not completely determine it. +There is an ambiguity as to which crossings are over and which under (once one crossing is determined, all the others follow). +This key flips all of the crossings and so can be used to switch between the two variants. + +\item \Verb+width=W+, \Verb+height=H+, \Verb+size={W,H}+ These set the dimensions on the knot in terms of the number of crossings. +The numbers must be even. + +\item \Verb+crossings+, \Verb+symmetric crossings+ These set the crossings. +The general format of a crossing is \Verb+x,y,type+ where \Verb+x+ and \Verb+y+ can be either numbers or ranges, using the format \Verb+n:m+\footnote{This package uses \LaTeX3 internally; using a colon as the range separator was a headache to implement.}. +The type of the crossing is either \Verb+|+ or \Verb+-+ for (respectively) vertical or horizontal walls\footnote{The package attempts to be smart with regard to allowing \Verb+|+ to be active.}. +Multiple crossing specifications can be given as a semi-colon-delimited list (a final semi-colon is acceptable, making it easy to comment out items in the list). +The \Verb+symmetric+ variant places walls at four points obtained by applying reflections to the specified crossing. + +\item \Verb+ignore crossings+, \Verb+ignore symmetric crossings+ The code works out the paths involved by picking a starting point and direction and then following it, bouncing off walls as appropriate, until it comes back to the beginning. +It then picks a new starting point and continues until all crossings are used up. +These keys designate certain points as \emph{disallowed} as starting points. +This can be used to remove certain regions from the knot, for example to create a border around a rectangle. +The \Verb+symmetric+ version works \dots\ symmetrically. + +\item \Verb+style={