summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tikz-cd
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/tikz-cd')
-rw-r--r--Master/texmf-dist/doc/latex/tikz-cd/README10
-rw-r--r--Master/texmf-dist/doc/latex/tikz-cd/pgfmanualstyle.sty238
-rw-r--r--Master/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.pdfbin0 -> 199688 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.tex219
4 files changed, 467 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/tikz-cd/README b/Master/texmf-dist/doc/latex/tikz-cd/README
new file mode 100644
index 00000000000..7d45e3acce1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tikz-cd/README
@@ -0,0 +1,10 @@
+Package Name: tikz-cd
+
+Author Name: Florêncio Neves
+
+License: LaTeX Project Public License and/or GNU Public License.
+
+Description: This package provides a set of macros to create
+commutative diagrams and other kinds of mathematical pictures using
+tikz. It also provides a set of arrow tips that match closely those
+of Computer Modern's mathematical symbols. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/tikz-cd/pgfmanualstyle.sty b/Master/texmf-dist/doc/latex/tikz-cd/pgfmanualstyle.sty
new file mode 100644
index 00000000000..ff73284411d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tikz-cd/pgfmanualstyle.sty
@@ -0,0 +1,238 @@
+%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
+%
+% Copyright 2010 by Jakob Voss
+%
+% This file is based on works by Till Tantau. It contains additions and/or
+% modifications by Jakob Voss and Rouben Rostamian. It may be distributed
+% and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Free Documentation License.
+%
+% See the file LICENSE for more details.
+
+%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{pgfmanualstyle}[2010/01/24 v0.1 pgfmanualstyle]
+\RequirePackage{tikz}[2009/09/04]
+
+%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
+% code from pgfmanual-en-macros.tex
+%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
+\definecolor{graphicbackground}{rgb}{0.96,0.96,0.8}
+\definecolor{codebackground}{rgb}{0.8,0.8,1}
+
+\makeatletter
+
+\begingroup
+\catcode`|=0
+\catcode`[= 1
+\catcode`]=2
+\catcode`\{=12
+\catcode `\}=12
+\catcode`\\=12 |gdef|find@example#1\end{codeexample}[|endofcodeexample[#1]]
+|endgroup
+%
+\begingroup
+\catcode`\^=7
+\catcode`\^^M=13
+\catcode`\ =13%
+\gdef\returntospace{\catcode`\ =13\def {\space}\catcode`\^^M=13\def^^M{}}%
+\endgroup
+%
+\begingroup
+\catcode`\%=13
+\catcode`\^^M=13
+\gdef\commenthandler{\catcode`\%=13\def%{\@gobble@till@return}}
+\gdef\@gobble@till@return#1^^M{}
+\gdef\typesetcomment{\catcode`\%=13\def%{\@typeset@till@return}}
+\gdef\@typeset@till@return#1^^M{{\def%{\char`\%}\textsl{\char`\%#1}}\par}
+\endgroup
+%
+\define@key{codeexample}{width}{\setlength\codeexamplewidth{#1}}
+\define@key{codeexample}{graphic}{\colorlet{graphicbackground}{#1}}
+\define@key{codeexample}{code}{\colorlet{codebackground}{#1}}
+\define@key{codeexample}{execute code}{\csname code@execute#1\endcsname}
+\define@key{codeexample}{code only}[]{\code@executefalse}
+\define@key{codeexample}{pre}{\def\code@pre{#1}}
+\define@key{codeexample}{post}{\def\code@post{#1}}
+%
+\def\code@pre{}
+\def\code@post{}
+%
+\newdimen\finalcodeexamplewidth % XXX
+\newdimen\codeexamplewidth
+\newif\ifcode@execute
+\newbox\codeexamplebox
+\def\codeexample[#1]{%
+ \code@executetrue
+ \setlength\codeexamplewidth{4cm}%
+ \addtolength\codeexamplewidth{7pt}%
+ \setkeys{codeexample}{#1}%
+ \parindent0pt
+ \begingroup%
+ \par%
+ \medskip%
+ \let\do\@makeother%
+ \dospecials%
+ \obeylines%
+ \@vobeyspaces%
+ \catcode`\%=13%
+ \catcode`\^^M=13%
+ \find@example}
+\def\endofcodeexample#1{%
+ \endgroup%
+ \ifcode@execute%
+ \setbox\codeexamplebox=\hbox{%
+ {%
+ {%
+ \returntospace%
+ \commenthandler%
+ \xdef\code@temp{#1}% removes returns and comments
+ }%
+ \colorbox{graphicbackground}{\color{black}\ignorespaces%
+ \code@pre\expandafter\scantokens\expandafter{\code@temp\ignorespaces}\code@post\ignorespaces}%
+ }%
+ }%
+ \ifdim\wd\codeexamplebox>\codeexamplewidth%
+ \def\code@start{\par}%
+ \def\code@flushstart{}\def\code@flushend{}%
+ \def\code@mid{\parskip2pt\par\noindent}%
+ %\def\code@width{\linewidth-6pt}% XXX
+ \setlength\finalcodeexamplewidth{\linewidth} % XXX
+ \addtolength\finalcodeexamplewidth{-6pt} % XXX
+ \def\code@end{}%
+ \else%
+ \def\code@start{%
+ \linewidth=\textwidth%
+ \parshape \@ne 0pt \linewidth
+ \leavevmode%
+ \hbox\bgroup}%
+ \def\code@flushstart{\hfill}%
+ \def\code@flushend{\hbox{}}%
+ \def\code@mid{\hskip6pt}%
+ %\def\code@width{\linewidth-12pt-\codeexamplewidth}% XXX
+ \setlength\finalcodeexamplewidth{\linewidth} % XXX
+ \addtolength\finalcodeexamplewidth{-12pt} % XXX
+ \addtolength\finalcodeexamplewidth{-\codeexamplewidth} % XXX
+ \def\code@end{\egroup}%
+ \fi%
+ \code@start%
+ \noindent%
+ \begin{minipage}[t]{\codeexamplewidth}\raggedright
+ \hrule width0pt%
+ \footnotesize\vskip-1em%
+ \code@flushstart\box\codeexamplebox\code@flushend%
+ \vskip-1ex
+ \leavevmode%
+ \end{minipage}%
+ \else%
+ \def\code@mid{\par}
+ %\def\code@width{\linewidth-6pt}% XXX
+ \setlength\finalcodeexamplewidth{\linewidth} % XXX
+ \addtolength\finalcodeexamplewidth{-6pt} % XXX
+ \def\code@end{}
+ \fi%
+ \code@mid%
+ \colorbox{codebackground}{%
+% \begin{minipage}[t]{\code@width}% XXX
+ \begin{minipage}[t]{\the\finalcodeexamplewidth}%
+ {%
+ \let\do\@makeother
+ \dospecials
+ \frenchspacing\@vobeyspaces
+ \normalfont\ttfamily\footnotesize
+ \typesetcomment%
+ \@tempswafalse
+ \def\par{%
+ \if@tempswa
+ \leavevmode \null \@@par\penalty\interlinepenalty
+ \else
+ \@tempswatrue
+ \ifhmode\@@par\penalty\interlinepenalty\fi
+ \fi}%
+ \obeylines
+ \everypar \expandafter{\the\everypar \unpenalty}%
+ #1}
+ \end{minipage}}%
+ \code@end%
+ \par%
+ \medskip
+ \end{codeexample}
+}
+
+\def\endcodeexample{}
+
+
+%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
+% code from various pgf/tikz source files and own modifications or additions
+%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
+
+\newenvironment{pgfmanualentry}{\list{}{\leftmargin=2em\itemindent-\leftmargin\def\makelabel##1{\hss##1}}}{\endlist}
+\newcommand\pgfmanualentryheadline[1]{\itemsep=0pt\parskip=0pt\item\strut{#1}\par\topsep=0pt}
+\newcommand\pgfmanualbody{\parskip3pt}
+
+\definecolor{darkred}{rgb}{0.75,0,0}
+\definecolor{green}{rgb}{0,.75,0}
+
+\def\bschar{{\char`\\}}
+
+\newcommand{\stylekeyheadline}[2][\pgfutil@empty]{%
+ \pgfmanualentryheadline{\texttt{\color{darkred}/tikz/#2}%
+ \def\pgf@test{#1}%
+ \ifx\pgf@test\pgfutil@empty%
+ \else%
+ \texttt{=}#1%
+ \fi%
+ \index{#2@\texttt{#2} key}}%
+}
+
+\newenvironment{stylekey}[2][]{
+ \begin{pgfmanualentry}
+ \stylekeyheadline[#1]{#2}
+ \pgfmanualbody
+}{
+ \end{pgfmanualentry}
+}
+\newcommand{\commandentry}[2][]{%
+ \texttt{\color{darkred}\textbackslash #2}#1%
+ \index{#2@\texttt{\textbackslash #2}}
+}
+\newenvironment{command}[2][]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{\commandentry{#2}{#1}}
+ \pgfmanualbody
+}{
+ \end{pgfmanualentry}
+}
+\newcommand\arrowtip[1]{
+ \texttt{#1}\index{Arrow tips!mandatory@\protect\texttt{mandatory}}%
+}
+
+\newcommand{\opt}[1]{\color{green}#1}
+\newcommand{\meta}[1]{$\langle$\textit{#1}$\rangle$}
+\newcommand{\marg}[1]{\texttt{\textbraceleft}\meta{#1}\texttt{\textbraceright}}
+\newcommand{\oarg}[1]{\texttt{\textbraceleft} \texttt{\textbraceright}}
+
+% Global styles:
+\tikzset{
+ shape example/.style={
+ color=black!30,
+ draw,
+ fill=yellow!30,
+ line width=.25cm, % .5
+ inner xsep=1.25cm, % 2.5
+ inner ysep=0.25cm} % 0.5
+}
+
+\def\tikzname{Ti\emph{k}Z}
+
+\makeatother
+
+%%% Enable '|' to type verbatim
+
+\usepackage{fancyvrb}
+\DefineShortVerb{\|}
+
+%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
+\endinput
diff --git a/Master/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.pdf b/Master/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.pdf
new file mode 100644
index 00000000000..f61f2bd0bcd
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.tex b/Master/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.tex
new file mode 100644
index 00000000000..3d929a2c55c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.tex
@@ -0,0 +1,219 @@
+\documentclass{article}
+\usepackage[utf8]{inputenc}
+\usepackage{amsmath,tikz-cd}
+\usepackage{pgfmanualstyle}
+\usepackage{hyperref}
+
+\hypersetup{pdftitle={The tikz-cd package},
+ pdfauthor={Florêncio Neves},
+ pdfkeywords={commutative diagrams, latex, tikz, pgf},
+ colorlinks
+ }
+
+\title{The \texttt{tikz-cd} package}
+\author{\normalsize Florêncio Neves\footnote{\emph{E-mail:} \href{mailto:florencioneves@gmail.com}{\texttt{florencioneves@gmail.com}}}}
+\date{\normalsize Version 0.1\footnote{\color{red}This is a preliminary version. Future versions may not be backwards-compatible. Comments are welcome.}}
+
+\makeatletter
+\definecolor{graphicbackground}{rgb}{0.96,0.96,0.8}
+\def\tikzcd@bgcolor{graphicbackground}
+\makeatother
+
+\newcommand{\displayarrow}[2][]{\texttt{#2} & yelds \tikz[baseline=-2.5pt] \draw[#2-#2, line width=0.44pt, #1] (0,0) -- (1,0);}
+\newcommand{\displayarrowstyle}[2][]{\texttt{#2} & yelds \tikz[baseline=-2.5pt] \draw[/commutative diagrams/current arrows, #2, #1] (0,0) -- (0.4,0);}
+
+\begin{document}
+\maketitle
+
+The general-purpose drawing package \tikzname{} can be used to typeset
+commutative diagrams and other kinds of mathematical pictures,
+generating high-quality results (see for example \cite{lenders} or
+\cite{milne}). The purpose of this package is to make the process of
+creation of such diagrams easier by providing a convenient set of
+macros and reasonable default settings. This package also includes an
+arrow tip library that match closely the arrows present in the
+Computer Modern typeface.
+
+PGF version 2.10 is required.
+
+\tableofcontents
+
+\section{Basic usage}
+\label{sec:basic-usage}
+
+Commutative diagrams are created with the |tikzcd| environment. Its
+content describes a matrix, like the |\matrix| command in \tikzname{}
+or the |align| environment in \LaTeX. Everything is typeset in math
+mode, but you will probably want use \texttt{tikzcd} inside an
+|equation| environment or inside |\[ \]|, so that the diagram will be
+placed on a new line and centered.
+
+\subsection{Inserting arrows}
+\label{sec:inserting-arrows}
+
+Inside the |tikzcd| environment, the command |\arrow| is provided to
+allow insertion of arrows. In its simplest form, it takes one
+argument, a string containing the characters |l|, |r|, |u| or |d|,
+standing for left, right, up and down, that determine the arrow
+target. A label can be placed on this arrow by providing a second
+argument.
+\begin{codeexample}[]
+ \begin{tikzcd}
+ A \arrow{ld} \arrow{l}{\phi} & B \\
+ & C
+ \end{tikzcd}
+\end{codeexample}
+
+You can control the behavior of the arrow by placing an argument
+inside square braces before the direction parameter. It may contain
+anything that can be passed as an argument to a \tikzname{}'s |edge|
+operator. Similarly, the label can be modified by an argument in
+square braces right before it. It may contain anything that can be
+passed to a |node| operator.
+\begin{codeexample}[]
+\begin{tikzcd}
+ A \arrow{l}{\psi} \arrow[color=red]{d}
+ & B \arrow{d}[color=red]{\psi} \\
+ C \arrow[color=red]{l}[color=blue]{\eta}
+ & D
+\end{tikzcd}
+\end{codeexample}
+
+If you want to save typing, the command |\ar| is provided as a
+shortcut to |\arrow|. There are also commands |\lar|, |\rar|, |\uar|
+and |\dar|, that act like |\arrow{l}|, |\arrow{r}| and so forth. They
+can take up to three optional argument:\ one in square braces to
+control the arrow, one in square braces to control the label, and one
+in curly braces to specify a label. Thus, the previous diagram can be
+rewritten as follows.
+\begin{codeexample}[]
+\begin{tikzcd}
+ A \lar{\psi} \dar[color=red]
+ & B \dar[color=red]{\psi} \\
+ C \lar[color=red][color=blue]{\eta}
+ & D
+\end{tikzcd}
+\end{codeexample}
+
+\subsection{Changing arrow tips}
+\label{sec:changing-arrow-tips}
+
+If you are familiar with \tikzname, you certainly noticed that you can
+produce different kids of arrows by passing arguments like |right hook->|
+to the |\arrow| command. This package provides an alternative
+way of doing this. Namely, there are styles named after \LaTeX{}
+arrow producing commands for this purpose. Thus, instead of
+|\arrow[right hook->]{l}|, you can use |\arrow[hookrightarrow]{l}|, as
+in the example below.
+\begin{codeexample}[]
+ \begin{tikzcd}
+ X \arrow[hookrightarrow]{l} \arrow[dashed]{ld}
+ & \bar{X} \arrow{d}\\
+ & Y
+ \end{tikzcd}
+\end{codeexample}
+
+The complete list of arrow types available so far is given below. It
+will be made comprehensive in the future.
+
+\begin{tabular}{ll}
+ \displayarrowstyle{rightarrow}\\
+ \displayarrowstyle{leftarrow}\\
+ \displayarrowstyle{hookrightarrow}\\
+ \displayarrowstyle{hookleftarrow}\\
+ \displayarrowstyle{hookrightarrow}\\
+ \displayarrowstyle{rightharpoonup}\\
+ \displayarrowstyle{rightharpoondown}\\
+ \displayarrowstyle{leftharpoonup}\\
+ \displayarrowstyle{leftharpoondown}\\
+\end{tabular}
+
+\section{Changing the appearance of diagrams}
+\label{sec:chang-appe-diagr}
+
+In the future, a customization scheme using |pgfkeys| will be implemented. For now, you can change the appearance of diagrams by understanding some of |tikz-cd|'s internals. The |tikzcd| environment generates codes with the following basic structure:
+\begin{codeexample}[code only]
+ \begin{tikzpicture}[ ... ]
+ \matrix (m) [ ... ] {
+ & ... & \\
+ & ... & \\};
+ \path[ ... ] ...;
+ \end{tikzpicture}
+\end{codeexample}
+There are styles
+\begin{quote}
+|/commutative diagrams/picture style|,\\
+|/commutative diagrams/matrix style|, and\\
+|/commutative diagrams/path style|\\
+\end{quote}
+that are applied at the relevant places. By appending things to these styles, you can control the behavior of diagrams quite arbitrarily. The arrow tip styles are stored in |/commutative diagrams/current arrows|.
+
+
+\section{Computer Modern arrow tips}
+\label{sec:comp-modern-arrow}
+
+By using the mechanism explained in \S\ref{sec:changing-arrow-tips}, it is not necessary to know the technical details in this section.
+
+The naming scheme of the Computer Modern-like arrow tips provided by this package follows that of |pgf|'s |arrows| library, as described in Section 23 of the |pgf| manual. You can of course use these arrow tips outside the |tikzcd| environment; in this case, you will probably want to know that in order to match the Computer Modern font at size $10\,\mathrm{pt}$, it is necessary to set \texttt{line width} to $0.4\,\mathrm{pt}$; for larger font sizes, scale this parameter accordingly.
+
+
+\begin{description}
+\item[Basic arrow tips]\ \\
+\begin{tabular}{ll}
+ \displayarrow{cm to}\\
+ \displayarrow{cm to reversed}\\
+ \displayarrow[line width=0.66pt]{cm bold to} (with a line 50\% thicker)\\
+ \texttt{cm \char`\|} & yelds \tikz[baseline=-2.5pt] \draw[cm |-cm |, line width=0.44pt] (0,0) -- (1,0);\\
+ \displayarrow{cm o}\\
+ \displayarrow{cm *}\\
+ \displayarrow{cm cap}\\
+\end{tabular}
+
+\item[Hooks]\ \\
+\begin{tabular}{ll}
+ \displayarrow{cm left hook}\\
+ \displayarrow{cm right hook}\\
+\end{tabular}
+
+
+\item[Double arrow tips]\ \\
+\begin{tabular}{ll}
+ \displayarrow{cm double to}\\
+ \displayarrow{cm double to reversed}\\
+\end{tabular}
+
+\item[Partial arrow tips]\ \\
+\begin{tabular}{ll}
+ \displayarrow{cm left to}\\
+ \displayarrow{cm left to reversed}\\
+ \displayarrow{cm right to}\\
+ \displayarrow{cm right to reversed}\\
+\end{tabular}
+\end{description}
+
+\section{Some examples}
+\label{sec:some-examples}
+
+The following example is taken from \cite{milne}.
+\begin{codeexample}[]
+\begin{tikzcd}
+ T
+ \arrow[bend left]{dll}{x}
+ \arrow[bend right]{ddl}{y}
+ \arrow[dotted]{dl}[description]{(x,y)} & & \\
+ & X \times_Z Y \arrow{l}{p} \arrow{d}{q} & X \arrow{d}{f} \\
+ & Y \arrow{l}{g} & Z
+\end{tikzcd}
+\end{codeexample}
+
+\begin{thebibliography}{9}
+\bibitem{lenders}
+ Felix Lenders,
+ \emph{Commutative diagrams using TikZ}.
+ Available at \url{http://www.felixl.de/commu.pdf}.
+\bibitem{milne}
+ James Milne,
+ \emph{Guide to commutative diagrams}.
+ Available at \url{http://www.jmilne.org/not/CDGuide.html}.
+\end{thebibliography}
+\end{document}