summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/chronology
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-08-18 03:00:59 +0000
committerNorbert Preining <norbert@preining.info>2023-08-18 03:00:59 +0000
commit0585a72dae13da024145995031edb2a1cf21dece (patch)
treea1870789311942cc1b9ab311b6f446da76f657bc /macros/latex/contrib/chronology
parent5248edc6ec87b3acdb196687a1af5b6292c8510a (diff)
CTAN sync 202308180300
Diffstat (limited to 'macros/latex/contrib/chronology')
-rw-r--r--[l---------]macros/latex/contrib/chronology/README16
-rw-r--r--macros/latex/contrib/chronology/README.md8
-rw-r--r--macros/latex/contrib/chronology/chronology.pdfbin0 -> 412402 bytes
-rw-r--r--macros/latex/contrib/chronology/chronology.sty38
-rw-r--r--macros/latex/contrib/chronology/example.pdfbin14227 -> 0 bytes
-rw-r--r--macros/latex/contrib/chronology/example.tex24
6 files changed, 50 insertions, 36 deletions
diff --git a/macros/latex/contrib/chronology/README b/macros/latex/contrib/chronology/README
index 42061c01a1..95ecffd34a 120000..100644
--- a/macros/latex/contrib/chronology/README
+++ b/macros/latex/contrib/chronology/README
@@ -1 +1,15 @@
-README.md \ No newline at end of file
+
+chronology
+==========
+
+A package that creates timelines featuring multiple events with per-day precision. Other features include relative positioning with unit specification, adjustable tick mark step size, and scaling to specified width.
+
+
+Version 2.0
+Uploaded to CTAN on 20 August, 2023
+
+Version 1.1
+Uploaded to GitHub on 12 March 2013
+Uploaded to CTAN on 4 April 2013
+
+
diff --git a/macros/latex/contrib/chronology/README.md b/macros/latex/contrib/chronology/README.md
deleted file mode 100644
index 4f220455f8..0000000000
--- a/macros/latex/contrib/chronology/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-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/macros/latex/contrib/chronology/chronology.pdf b/macros/latex/contrib/chronology/chronology.pdf
new file mode 100644
index 0000000000..6a2412c808
--- /dev/null
+++ b/macros/latex/contrib/chronology/chronology.pdf
Binary files differ
diff --git a/macros/latex/contrib/chronology/chronology.sty b/macros/latex/contrib/chronology/chronology.sty
index 46c06c5746..774a26644e 100644
--- a/macros/latex/contrib/chronology/chronology.sty
+++ b/macros/latex/contrib/chronology/chronology.sty
@@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e}%
-\ProvidesPackage{chronology}[2015/03/27 v1.1.1 Horizontal timeline]%
+\ProvidesPackage{chronology}[2023/08/20 v2.0 - Horizontal Timeline]%
\RequirePackage{calc}%
\RequirePackage{tikz}%
\RequirePackage{xparse}%
@@ -9,7 +9,9 @@
\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}
@@ -17,8 +19,11 @@
,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}
+ ,eventlabelbottom/.style={chroneventlabel,anchor=south west,yshift=-1cm,rotate=0} % Bottom label
}
+%
% For compatibity with babel. Handling of active characters in TikZ.
+%
\tikzset{
handle active characters in code,
handle active characters in nodes
@@ -69,8 +74,11 @@
\fi%
}%
}%
+%
+% Event (legacy code for compatibility)
+%
\makeatother%
-\DeclareDocumentCommand \event {o m m}{%
+\DeclareDocumentCommand \event {o m m}{% [Startdate] Enddate Label
\pgfmathsetlength\xstop{(#2-\theyearstart)*\unit}%
\IfNoValueTF {#1} {%
\ifflipped%
@@ -95,6 +103,30 @@
\fi%
}%
}
+%
+% Eventspan
+%
+\DeclareDocumentCommand \eventspan {m m m O{black} O{0.3} O{0.2} o}{% Startdate Enddate Label Fill Opacity Height Bottom?
+ \pgfmathsetlength\xstop{(#2-\theyearstart)*\unit}%
+ \pgfmathsetlength\xstart{(#1-\theyearstart)*\unit}%
+ \IfNoValueTF {#7} {%
+ \draw[style={fill=#4,draw=none,opacity=#5},rounded corners=.05\unit]%
+ (\xstart,-#6\unit) rectangle node[eventlabel] {#3} (\xstop,.2\unit);%
+ }{%
+ \draw[style={fill=#4,draw=none,opacity=#5},rounded corners=.05\unit]% Event, bottom label
+ (\xstart,-#6\unit) rectangle node[eventlabelbottom, anchor=center]{#3} (\xstop,.2\unit);%
+ }%
+}
+%
+% Eventpoint
+%
+\DeclareDocumentCommand \eventpoint {m m O{red} O{1} O{0.3}}{% Date Label Fill Opacity Height
+ \pgfmathsetlength\xstop{(#1-\theyearstart)*\unit}%
+ \draw[style={fill=#3,draw=none,opacity=#4},rounded corners=0\unit]%
+ (\xstop, .1\unit) coordinate(A) -- (\xstop-.2*#5\unit,#5\unit) coordinate(B) -- (\xstop+.2*#5\unit,#5\unit)coordinate(C)%
+ -- cycle node[eventlabel] {#2};%
+}
+%
\newcommand{\decimaldate}[3]{(#1-1)/31/12+(#2-1)/12+#3}%
+%
\endinput%
-
diff --git a/macros/latex/contrib/chronology/example.pdf b/macros/latex/contrib/chronology/example.pdf
deleted file mode 100644
index 90c14a66b2..0000000000
--- a/macros/latex/contrib/chronology/example.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/chronology/example.tex b/macros/latex/contrib/chronology/example.tex
deleted file mode 100644
index 94bc873491..0000000000
--- a/macros/latex/contrib/chronology/example.tex
+++ /dev/null
@@ -1,24 +0,0 @@
-\documentclass{article}
-\usepackage{chronology}
-\begin{document}
-\begin{chronology}[5]{1983}{2010}{10cm}[7cm]
-\event{1984}{\color{blue}{one}}
-\event[1985]{1986}{\small{two}}
-\event{\decimaldate{25}{12}{2001}}{\huge{three}}
-\end{chronology}
-\vspace{5cm}
-
-\begin{chronology}*[5]{1983}{2010}{10cm}
-\event{1984}{\color{blue}{one}}
-\event[1985]{1986}{\small{two}}
-\event{\decimaldate{25}{12}{2001}}{\huge{three}}
-\end{chronology}
-\vspace{5cm}
-
-\begin{chronology}[5]{1983}{2010}{10cm}[13cm]
-\event{1984}{\color{blue}{one}}
-\event[1985]{1986}{\small{two}}
-\event{\decimaldate{25}{12}{2001}}{\huge{three}}
-\end{chronology}
-\end{document}
-