summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/chronology/README16
-rw-r--r--Master/texmf-dist/doc/latex/chronology/README.md8
-rw-r--r--Master/texmf-dist/tex/latex/chronology/chronology.sty56
3 files changed, 44 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/latex/chronology/README b/Master/texmf-dist/doc/latex/chronology/README
deleted file mode 100644
index 724e04e2031..00000000000
--- a/Master/texmf-dist/doc/latex/chronology/README
+++ /dev/null
@@ -1,16 +0,0 @@
-chronology.sty
-Copyright 2011 Levi Wiseman
-
-This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
-of this license or (at your option) any later version.
-The latest version of this license is in
- http://www.latex-project.org/lppl.txt
-and version 1.3 or later is part of all distributions of LaTeX
-version 2005/12/01 or later.
-
-This work has the LPPL maintenance status `maintained'.
-
-The Current Maintainer of this work is Levi Wiseman.
-
-This work consists of the file chronology.sty.
diff --git a/Master/texmf-dist/doc/latex/chronology/README.md b/Master/texmf-dist/doc/latex/chronology/README.md
new file mode 100644
index 00000000000..4f220455f8f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/chronology/README.md
@@ -0,0 +1,8 @@
+chronology
+==========
+
+LaTeX time­line pack­age that al­lows la­belling of events with per-day gran­u­lar­ity
+
+Version 1.1
+Uploaded to GitHub on Mar 12., 2013
+Uploaded to CTAN on Apr 4., 2013 \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/chronology/chronology.sty b/Master/texmf-dist/tex/latex/chronology/chronology.sty
index 911f3a8519b..46c06c57467 100644
--- a/Master/texmf-dist/tex/latex/chronology/chronology.sty
+++ b/Master/texmf-dist/tex/latex/chronology/chronology.sty
@@ -1,13 +1,28 @@
\NeedsTeXFormat{LaTeX2e}%
-\ProvidesPackage{chronology}[2010/6/12 v1.0 Horizontal timeline]%
+\ProvidesPackage{chronology}[2015/03/27 v1.1.1 Horizontal timeline]%
\RequirePackage{calc}%
\RequirePackage{tikz}%
-\RequirePackage{ifthen}%
+\RequirePackage{xparse}%
+% Defining counters and lengths
\newcounter{step}\newcounter{stepstart}\newcounter{stepstop}%
\newcounter{yearstart}\newcounter{yearstop}\newcounter{deltayears}%
\newlength{\xstart}\newlength{\xstop}%
\newlength{\unit}\newlength{\timelinewidth}%
\newsavebox{\timelinebox}%
+% Defining TikZ styles for labels and events
+\tikzset{%
+ ,chronevent/.style={fill=black,draw=none,opacity=0.5}
+ ,chronlabel/.style={opacity=1}
+ ,chrontickslabel/.style={chronlabel}
+ ,chroneventlabel/.style={chronlabel}
+ ,eventlabel/.style={chroneventlabel,anchor=south west,yshift=.2\unit,rotate=45}
+ ,flippedeventlabel/.style={chroneventlabel,anchor=north west,yshift=-.2\unit,rotate=-45}
+ }
+% For compatibity with babel. Handling of active characters in TikZ.
+\tikzset{
+ handle active characters in code,
+ handle active characters in nodes
+}
\makeatletter%
\newif\ifchronology@star%
\newenvironment{chronology}{%
@@ -48,37 +63,38 @@
\pgfmathsetlength\xstop{(\x-\theyearstart)*\unit}%
\draw[xshift=\xstop] (0,-.3\unit) -- (0,.3\unit);%
\ifflipped%
- \node at (\xstop,0) [above=.2\unit] {\x};%
+ \node[chrontickslabel] at (\xstop,0) [above=.2\unit] {\x};%
\else%
- \node at (\xstop,0) [below=.2\unit] {\x};%
+ \node[chrontickslabel] at (\xstop,0) [below=.2\unit] {\x};%
\fi%
}%
}%
\makeatother%
-\newcommand{\event}[3][e]{%
+\DeclareDocumentCommand \event {o m m}{%
\pgfmathsetlength\xstop{(#2-\theyearstart)*\unit}%
- \ifx #1e%
+ \IfNoValueTF {#1} {%
\ifflipped%
- \draw[fill=black,draw=none,opacity=0.5]%
- (\xstop, 0) circle (.2\unit)%
- node[opacity=1,rotate=-45,right=.5\unit] {#3};%
+ \draw[chronevent]%
+ (\xstop, 0) circle (.2\unit)%
+ node[flippedeventlabel] {#3};%
\else%
- \draw[fill=black,draw=none,opacity=0.5]%
- (\xstop, 0) circle (.2\unit)%
- node[opacity=1,rotate=45,right=.5\unit] {#3};%
+ \draw[chronevent]%
+ (\xstop, 0) circle (.2\unit)%
+ node[eventlabel] {#3};%
\fi%
- \else%
+ }{%
\pgfmathsetlength\xstart{(#1-\theyearstart)*\unit}%
\ifflipped%
- \draw[fill=black,draw=none,opacity=0.5,rounded corners=.2\unit]%
- (\xstart,-.2\unit) rectangle%
- node[opacity=1,rotate=-45,right=.5\unit] {#3} (\xstop,.2\unit);%
+ \draw[chronevent,rounded corners=.2\unit]%
+ (\xstart,-.2\unit) rectangle%
+ node[flippedeventlabel] {#3} (\xstop,.2\unit);%
\else%
- \draw[fill=black,draw=none,opacity=0.5,rounded corners=.2\unit]%
- (\xstart,-.2\unit) rectangle%
- node[opacity=1,rotate=45,right=.5\unit] {#3} (\xstop,.2\unit);%
+ \draw[chronevent,rounded corners=.2\unit]%
+ (\xstart,-.2\unit) rectangle%
+ node[eventlabel] {#3} (\xstop,.2\unit);%
\fi%
- \fi}%
+ }%
+}
\newcommand{\decimaldate}[3]{(#1-1)/31/12+(#2-1)/12+#3}%
\endinput%