texlive[74560] Master/texmf-dist: timechart (10mar25)
commits+karl at tug.org
commits+karl at tug.org
Mon Mar 10 21:06:47 CET 2025
Revision: 74560
https://tug.org/svn/texlive?view=revision&revision=74560
Author: karl
Date: 2025-03-10 21:06:47 +0100 (Mon, 10 Mar 2025)
Log Message:
-----------
timechart (10mar25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/timechart/timechart-doc.pdf
trunk/Master/texmf-dist/source/latex/timechart/timechart.dtx
trunk/Master/texmf-dist/source/latex/timechart/timechart.ins
trunk/Master/texmf-dist/tex/latex/timechart/timechart.sty
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/timechart/timechart-doc.tex
trunk/Master/texmf-dist/doc/latex/timechart/timechart-example1-legend.tex
trunk/Master/texmf-dist/doc/latex/timechart/timechart-example1-setup.tex
trunk/Master/texmf-dist/doc/latex/timechart/timechart-example1-timechart.tex
trunk/Master/texmf-dist/doc/latex/timechart/timechart-example2-v1.tex
trunk/Master/texmf-dist/doc/latex/timechart/timechart-example2-v2.tex
Modified: trunk/Master/texmf-dist/doc/latex/timechart/timechart-doc.pdf
===================================================================
(Binary files differ)
Added: trunk/Master/texmf-dist/doc/latex/timechart/timechart-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/timechart/timechart-doc.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/timechart/timechart-doc.tex 2025-03-10 20:06:47 UTC (rev 74560)
@@ -0,0 +1 @@
+\input{timechart.dtx}
Property changes on: trunk/Master/texmf-dist/doc/latex/timechart/timechart-doc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/timechart/timechart-example1-legend.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/timechart/timechart-example1-legend.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/timechart/timechart-example1-legend.tex 2025-03-10 20:06:47 UTC (rev 74560)
@@ -0,0 +1,18 @@
+\begin{tabular}{rl}
+ \timechartlegenditem[julioclaudian] & Julio-Claudian dynasty \\
+ \timechartlegenditem[fouremperors] & Year of four emperors \\
+ \timechartlegenditem[flavian] & Flavian dynasty \\
+ \timechartlegenditem[nervaantonine] & Nerva-Antonine dynasty \\
+ \timechartlegenditem[fiveemperors] & Year of five emperors \\
+ \timechartlegenditem[severan] & Severan dynasty \\
+ \timechartlegenditem[thirdcentury] & Crisis of the third century \\
+ \timechartlegenditem[tetrarchy] & Tetrarchy \\
+ \timechartlegenditem[constantinian] & Constantinian dynasty \\
+ \timechartlegenditem[valentinianic] & Valentinianic dynasty \\
+ \timechartlegenditem[theodosian] & Theodosian dynasty \\
+ \timechartlegenditem[theodosian-east] & --- in the east \\
+ \timechartlegenditem[theodosian-west] & --- in the west \\
+ \timechartlegenditem[leonid] & Leonid dynasty \\
+ \timechartlegenditem[justinian] & Justinian dynasty \\
+ \timechartlegenditem[lastwest] & Last emperors in the west \\
+\end{tabular}
Property changes on: trunk/Master/texmf-dist/doc/latex/timechart/timechart-example1-legend.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/timechart/timechart-example1-setup.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/timechart/timechart-example1-setup.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/timechart/timechart-example1-setup.tex 2025-03-10 20:06:47 UTC (rev 74560)
@@ -0,0 +1,67 @@
+\pgfkeys{
+ /timechart/.cd,
+ julioclaudian/.style={
+ interval bar color=red!70!black,
+ interval mark color=red!70!black!50!white
+ },
+ fouremperors/.style={
+ interval bar color=green!65!black,
+ interval mark color=green!65!black!50!white
+ },
+ flavian/.style={
+ interval bar color=yellow!85!black,
+ interval mark color=yellow!85!black!50!white
+ },
+ nervaantonine/.style={
+ interval bar color=blue!80!black,
+ interval mark color=blue!80!black!50!white
+ },
+ fiveemperors/.style={
+ interval bar color=green!50!black,
+ interval mark color=green!50!black!50!white
+ },
+ severan/.style={
+ interval bar color=orange!80!black,
+ interval mark color=orange!80!black!50!white
+ },
+ thirdcentury/.style={
+ interval bar color=green!35!black,
+ interval mark color=green!35!black!50!white
+ },
+ tetrarchy/.style={
+ interval bar color=purple!70!black,
+ interval mark color=purple!70!black!50!white
+ },
+ constantinian/.style={
+ interval bar color=blue!65!white,
+ interval mark color=blue!65!white!50!white
+ },
+ valentinianic/.style={
+ interval bar color=orange!60!black,
+ interval mark color=orange!60!black!50!white
+ },
+ theodosian/.style={
+ interval bar color=cyan,
+ interval mark color=cyan!50!white
+ },
+ theodosian-east/.style={
+ interval bar color=cyan!80!black,
+ interval mark color=cyan!80!black!50!white
+ },
+ theodosian-west/.style={
+ interval bar color=cyan!80!white,
+ interval mark color=cyan!80!white!50!white
+ },
+ leonid/.style={
+ interval bar color=purple!40!white,
+ interval mark color=purple!40!white!50!white
+ },
+ justinian/.style={
+ interval bar color=orange!60!white,
+ interval mark color=orange!60!white!50!white
+ },
+ lastwest/.style={
+ interval bar color=green!25!black,
+ interval mark color=green!25!black!50!white
+ },
+}
Property changes on: trunk/Master/texmf-dist/doc/latex/timechart/timechart-example1-setup.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/timechart/timechart-example1-timechart.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/timechart/timechart-example1-timechart.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/timechart/timechart-example1-timechart.tex 2025-03-10 20:06:47 UTC (rev 74560)
@@ -0,0 +1,150 @@
+\begin{timechart}[
+ axis line/.append style={ draw=gray, line width=.5pt },
+ grid/.append style={ draw=lightgray!50!white, line width=.5pt },
+ minor tick/.append style={ draw=gray },
+ major tick/.append style={ line width=.5pt, draw=gray },
+ major tick label/.append style={ node font=\small },
+ interval label/.style={ node font=\sffamily\footnotesize },
+ text/.style={ node font=\sffamily\small\itshape, },
+ ystep=-3.25mm,
+ ]{-50}{500}
+
+ \pgfmathsetmacro{\mainlinecount}{46}
+
+ \timechartsetyminimumautoreset{-3.25mm*\mainlinecount+1mm}
+
+ \timechartinterval[interval bar color=gray,right,mark=-45]{-100}{-44}{Julius Caesar}
+ \timechartinterval[julioclaudian,right,mark=-27]{-63}{-14}{Augustus}
+ \timechartinterval[julioclaudian,right,mark=14]{-42}{37}{Tiberius}
+ \timechartinterval[julioclaudian,right,mark=37]{12}{41}{Caligula}
+ \timechartinterval[julioclaudian,right,mark=41]{-10}{54}{Claudius}
+ \timechartinterval[julioclaudian,right,mark=54]{37}{68}{Nero}
+
+ \timechartinterval[fouremperors,mark=68]{-3}{69}{Galba}
+ \timechartinterval[fouremperors,mark=69]{32}{69}{Otho}
+ \timechartinterval[fouremperors,mark=69]{15}{69}{Vitellius}
+
+ \timechartinterval[flavian,mark=69]{9}{79}{Vespasian}
+ \timechartinterval[flavian,mark=79]{39}{81}{Titus}
+ \timechartinterval[flavian,mark=81]{51}{96}{Domitian}
+
+ \timechartinterval[nervaantonine,mark=96]{30}{98}{Nerva}
+ \timechartinterval[nervaantonine,mark=98]{53}{117}{Trajan}
+ \timechartinterval[nervaantonine,mark=117]{76}{138}{Hadrian}
+ \timechartinterval[nervaantonine,mark=138]{86}{161}{Antoninus Pius}
+ \timechartinterval[nervaantonine,mark=161]{121}{180}{Marcus Aurelius}
+ \timechartinterval[nervaantonine,mark=161]{130}{169}{Lucius Verus}
+ \timechartinterval[nervaantonine,mark=180]{161}{192}{Commodus}
+
+ \timechartinterval[fiveemperors,mark=193]{126}{193}{Pertinax}
+ \timechartinterval[fiveemperors,mark=193]{133}{193}{Didius Julianus}
+
+ \timechartinterval[severan,mark=193]{145}{211}{Septimus Severus}
+ \timechartinterval[severan,mark=211]{188}{217}{Caracalla}
+ \timechartinterval[severan,mark=211]{189}{211}{Geta}
+ \timechartinterval[severan,mark=217]{c165}{218}{Macrinus}
+ \timechartinterval[severan,mark=218]{203/204}{222}{Elagabalus}
+ \timechartinterval[severan,mark=222]{208}{235}{Severus Alexander}
+
+ \timechartinterval[thirdcentury,mark=235]{c172/c180}{238}{Maximinus I}
+ \timechartinterval[thirdcentury,mark=238]{c158}{238}{Gordian I}
+ \timechartinterval[thirdcentury,mark=238]{192}{238}{Gordian II}
+ \timechartinterval[thirdcentury,mark=238]{164}{238}{Pupienus}
+ \timechartinterval[thirdcentury,mark=238]{c164}{238}{Balbinus}
+ \timechartinterval[thirdcentury,mark=238]{225}{244}{Gordian III}
+ \timechartinterval[thirdcentury,mark=244]{c204}{249}{Philip I}
+ \timechartinterval[thirdcentury,mark=249]{c190/200}{251}{Decius}
+ \timechartinterval[thirdcentury,mark=251]{c206}{253}{Trebonianus Gallus}
+ \timechartinterval[thirdcentury,mark=253]{c207}{253}{Aemilianus}
+ \timechartinterval[thirdcentury,mark=253]{c200}{262}{Valerian}
+ \timechartinterval[thirdcentury,mark=253]{218}{268}{Gallienus}
+ \timechartinterval[thirdcentury,mark=268]{214}{270}{Claudius II}
+ \timechartinterval[thirdcentury,mark=270]{230/250}{270}{Quintillus}
+ \timechartinterval[thirdcentury,mark=270]{214}{275}{Aurelian}
+ \timechartinterval[thirdcentury,mark=275]{c200}{276}{Tacitus}
+ \timechartinterval[thirdcentury,mark=276]{226/256}{276}{Florianus}
+ \timechartinterval[thirdcentury,mark=276]{232}{282}{Probus}
+ \timechartinterval[thirdcentury,mark=282]{c224}{283}{Carus}
+ \timechartinterval[thirdcentury,mark=283]{c250}{285}{Carinus}
+ \timechartinterval[thirdcentury,mark=283]{c253}{284}{Numerian}
+
+ \timechartinterval[tetrarchy,mark=284]{242/245}{311/312}{Diocletian}
+ \timechartinterval[tetrarchy,mark=286]{c250}{310}{Maximian}
+ \timechartinterval[tetrarchy,mark=305]{c258}{311}{Galerius}
+ \timechartinterval[tetrarchy,mark=305]{c250}{306}{Constantius I}
+ \timechartinterval[tetrarchy,mark=306]{257/287}{307}{Severus II}
+ \timechartinterval[tetrarchy,marks={308,324}]{c265}{325}{Licinius}
+ \timechartinterval[tetrarchy,mark=310]{c270}{313}{Maximinus II}
+ \timechartinterval[tetrarchy,mark=316]{267/297}{317}{Valerius Valens}
+ \timechartinterval[tetrarchy,mark=324]{275/305}{325}{Martinian}
+
+ \timechartinterval[constantinian,mark=306]{272/273}{337}{Constantine I}
+ \timechartinterval[constantinian,mark=337]{316}{340}{Constantine II}
+ \timechartinterval[constantinian,mark=337]{322/323}{350}{Constans I}
+ \timechartinterval[constantinian,mark=337]{317}{361}{Constantius II}
+ \timechartinterval[constantinian,mark=361]{331}{363}{Julian}
+ \timechartinterval[constantinian,mark=363]{330/331}{364}{Jovian}
+
+ \timechartinterval[valentinianic,mark=364]{321}{375}{Valentinian I}
+ \timechartinterval[valentinianic,mark=364]{c328}{378}{Valens}
+ \timechartinterval[valentinianic,mark=375]{359}{383}{Gratian}
+ \timechartinterval[valentinianic,mark=388]{371}{392}{Valentinian II}
+
+ \timechartinterval[theodosian,mark=379]{346/347}{395}{Theodosius I}
+ \timecharttext[center]{395}{Eastern}
+ \timechartinterval[theodosian-east,mark=395]{377}{408}{Arcadius}
+ \timechartinterval[theodosian-east,mark=408]{401}{450}{Theodosius II}
+ \timechartinterval[theodosian-east,mark=450]{391/392}{457}{Marcian}
+
+ \timechartinterval[leonid,mark=457]{400/401}{474}{Leo I}
+ \timechartinterval[leonid,mark=474]{467}{474}{Leo II}
+ \timechartinterval[leonid,mark={474,475,476}]{425}{491}{Zeno}
+ \timechartinterval[leonid,mark=475]{426/456}{476/477}{Basilicus}
+ \timechartinterval[leonid,mark=491]{430/431}{518}{Anastasius I}
+
+ \timechartinterval[justinian,mark=518]{450}{527}{Justin I}
+ \timechartinterval[justinian,mark=527]{482}{565}{Justinian I}
+
+ \timecharttext[center]{395}{Western}
+ \timechartinterval[theodosian-west,mark=395]{384}{423}{Honorius}
+ \timechartinterval[theodosian-west,mark=421]{371/401}{421}{Constantius III}
+ \timechartinterval[theodosian-west,mark=425]{419}{455}{Valentian III}
+
+ \timechartinterval[lastwest,mark=455]{405/435}{455}{Petronius Maximus}
+ \timechartinterval[lastwest,mark=455]{406/436}{456/457}{Avitius}
+ \timechartinterval[lastwest,mark=457]{411/441}{461}{Majorian}
+ \timechartinterval[lastwest,mark=461]{415/445}{465}{Libius Severus}
+ \timechartinterval[lastwest,mark=467]{422/452}{472}{Anthemius}
+ \timechartinterval[lastwest,mark=472]{422/452}{472}{Olybrius}
+ \timechartinterval[lastwest,mark={473,474}]{443/473}{474/504}{Glycerius}
+ \timechartinterval[lastwest,mark={474,465}]{430/460}{480}{Julius Nepos}
+ \timechartinterval[lastwest,mark={475,476}]{c465}{507/527}{Romulus}
+
+ \timechartsetyminimumautoreset{-\maxdimen}
+ \timechartsety{(-\mainlinecount-1)*3.25mm}
+
+ \timechartinterval[
+ center,
+ interval bar color=darkgray,
+ interval text/.append style={ text=white },
+ interval bar thickness=6.5mm
+ ]{-509}{-27}{}
+ \timechartstepy[-1]
+ \timechartinterval[
+ center,
+ interval bar color=black,
+ interval text/.append style={ node font=\sffamily\normalsize,text=white },
+ interval bar thickness=6.5mm
+ ]{-27}{395}{Roman Empire}
+ \timechartstepy[-1.5]
+ \timechartinterval[
+ center,
+ interval bar color=lightgray,
+ interval bar thickness=3.25mm
+ ]{395}{1453}{Eastern}
+ \timechartinterval[
+ center,
+ interval bar color=gray,
+ interval bar thickness=3.25mm
+ ]{395}{476}{Western}
+\end{timechart}
Property changes on: trunk/Master/texmf-dist/doc/latex/timechart/timechart-example1-timechart.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/timechart/timechart-example2-v1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/timechart/timechart-example2-v1.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/timechart/timechart-example2-v1.tex 2025-03-10 20:06:47 UTC (rev 74560)
@@ -0,0 +1,7 @@
+\begin{timechart}{-50}{75}
+ \timechartinterval{-63}{-14}{Augustus}
+ \timechartinterval{-42}{37}{Tiberius}
+ \timechartinterval{12}{41}{Caligula}
+ \timechartinterval{-10}{54}{Claudius}
+ \timechartinterval{37}{68}{Nero}
+\end{timechart}
Property changes on: trunk/Master/texmf-dist/doc/latex/timechart/timechart-example2-v1.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/timechart/timechart-example2-v2.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/timechart/timechart-example2-v2.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/timechart/timechart-example2-v2.tex 2025-03-10 20:06:47 UTC (rev 74560)
@@ -0,0 +1,16 @@
+\begin{timechart}[
+ minor tick interval=5,
+ major tick interval=25,
+ grid/.append style={ draw=lightgray },
+ axis line/.append style={ draw=gray },
+ minor tick/.append style={ draw=gray },
+ major tick/.append style={ draw=gray },
+ interval label/.append style={ node font=\sffamily\small },
+ julioclaudian/.style={ interval bar color=red!80!black },
+ ]{-50}{75}
+ \timechartinterval[right,julioclaudian]{-63}{-14}{Augustus}
+ \timechartinterval[right,julioclaudian]{-42}{37}{Tiberius}
+ \timechartinterval[julioclaudian]{12}{41}{Caligula}
+ \timechartinterval[julioclaudian]{-10}{54}{Claudius}
+ \timechartinterval[julioclaudian]{37}{68}{Nero}
+\end{timechart}
Property changes on: trunk/Master/texmf-dist/doc/latex/timechart/timechart-example2-v2.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/timechart/timechart.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/timechart/timechart.dtx 2025-03-10 20:06:31 UTC (rev 74559)
+++ trunk/Master/texmf-dist/source/latex/timechart/timechart.dtx 2025-03-10 20:06:47 UTC (rev 74560)
@@ -3,7 +3,7 @@
% Copyright (C) 2025 Alan J. Cain
%
% This file may be distributed and/or modified under the conditions of the LaTeX Project Public Licence, either version
-% 1.3 of this licence or (at your option) any later version. The latest version of this licence is in:
+% 1.3c of this licence or (at your option) any later version. The latest version of this licence is in:
%
% http://www.latex-project.org/lppl.txt
%
@@ -157,7 +157,7 @@
\begin{document}
-\DocInput{\jobname.dtx}
+\DocInput{timechart.dtx}
\end{document}
%</driver>
% \fi
@@ -232,7 +232,7 @@
%
%
%
-% \paragraph*{Licence.} \noindent\pkg{timechart} is released under the LaTeX Project Public Licence v1.3c or
+% \paragraph*{Licence.} \noindent\pkg{timechart} is released under the \LaTeX\ Project Public Licence v1.3c or
% later.\footnote{\textsc{url}: \url{https://www.latex-project.org/lppl.txt}}
%
%
@@ -501,28 +501,33 @@
%
% \subsection{Axis configuration}
%
+% \begin{describekey}{/timechart/axis}{position}{above}
+% Where and whether to draw the axis. \meta{position} may be \val{above}, \val{below}, or
+% \val{none}.
+% \end{describekey}
+%
% \begin{describekey}{/timechart/no axis}{}{}
-% Do not draw the axis.
+% Do not draw the axis. Equivalent to \keyval{/timechart/axis}{none}.
% \end{describekey}
%
% \begin{describekey}{/timechart/axis line}{style}{\keyval{line cap}{rect}}
-% Style for drawing the axis line.
+% Style for drawing the axis line.
% \end{describekey}
%
% \begin{describekey}{/timechart/minor tick}{style}{empty}
-% Style for drawing minor ticks.
+% Style for drawing minor ticks.
% \end{describekey}
%
% \begin{describekey}{/timechart/minor tick length}{dimension}{1.5mm}
-% Length of minor ticks.
+% Length of minor ticks.
% \end{describekey}
%
% \begin{describekey}{/timechart/major tick}{style}{empty}
-% Style for drawing major ticks.
+% Style for drawing major ticks.
% \end{describekey}
%
% \begin{describekey}{/timechart/major tick length}{dimension}{3mm}
-% Length of major ticks.
+% Length of major ticks.
% \end{describekey}
%
% \begin{describekey}{/timechart/major tick label}{style}{as described below}
@@ -530,14 +535,19 @@
% \keyval{outer sep}{0}, \keyval{anchor}{mid west}, \keyval{rotate}{90}.
% \end{describekey}
%
+% \begin{describekey}{/timechart/major tick eras}{locations}{outer}
+% Which major tick labels have era indicators. \meta{locations} may be \val{none}, \val{all}, or \val{outer} (which
+% means that only the first and last labels have era indicators). This option does not affect the epoch marker (see
+% \fullref{Subsection}{subsec:year-zero}).
+% \end{describekey}
%
%
+%
% \section{Within the \env{timechart} environment}
% \label{sec:within}
%
%
%
-%
% \subsection{Intervals}
% \label{subsec:intervals}
%
@@ -898,7 +908,7 @@
% \key{/timechart/interval label node name}, and \key{/timechart/text node name}.) The user can use these nodes to
% position extra content.
%
-% If the \cs{timechartcomplete} command is used (after which the \cs{timechart}\ldots\ commands are no longer available
+% If the \cs{timechartfinish} command is used (after which the \cs{timechart}\ldots\ commands are no longer available
% within the \env{timechart} environment) the nodes \mcode{grid} and \mcode{axis}, which contain the grid and the axis,
% are also available.
%
@@ -905,6 +915,7 @@
%
%
% \subsection{\texorpdfstring{`year zero'}{year zero}}
+% \label{subsec:year-zero}
%
% Although calendars typically do not admit a `year zero' (for instance, \timechartmakebeforeyear{1} is immediately
% followed by \timechartmakeafteryear{1}, with no intervening `year zero'), \pkg{timechart} does allow \val{0} for the
@@ -924,6 +935,12 @@
%
%
%
+% \section{Feature requests and bug reports}
+%
+% The development code and issue tracker are hosted at Codeberg: \url{https://codeberg.org/ajcain/timechart}
+%
+%
+%
% \section{Appendix: full example source}
% \label{sec:full-example}
%
@@ -955,6 +972,279 @@
%
%
%
+% \iffalse
+%<*example1-setup>
+\pgfkeys{
+ /timechart/.cd,
+ julioclaudian/.style={
+ interval bar color=red!70!black,
+ interval mark color=red!70!black!50!white
+ },
+ fouremperors/.style={
+ interval bar color=green!65!black,
+ interval mark color=green!65!black!50!white
+ },
+ flavian/.style={
+ interval bar color=yellow!85!black,
+ interval mark color=yellow!85!black!50!white
+ },
+ nervaantonine/.style={
+ interval bar color=blue!80!black,
+ interval mark color=blue!80!black!50!white
+ },
+ fiveemperors/.style={
+ interval bar color=green!50!black,
+ interval mark color=green!50!black!50!white
+ },
+ severan/.style={
+ interval bar color=orange!80!black,
+ interval mark color=orange!80!black!50!white
+ },
+ thirdcentury/.style={
+ interval bar color=green!35!black,
+ interval mark color=green!35!black!50!white
+ },
+ tetrarchy/.style={
+ interval bar color=purple!70!black,
+ interval mark color=purple!70!black!50!white
+ },
+ constantinian/.style={
+ interval bar color=blue!65!white,
+ interval mark color=blue!65!white!50!white
+ },
+ valentinianic/.style={
+ interval bar color=orange!60!black,
+ interval mark color=orange!60!black!50!white
+ },
+ theodosian/.style={
+ interval bar color=cyan,
+ interval mark color=cyan!50!white
+ },
+ theodosian-east/.style={
+ interval bar color=cyan!80!black,
+ interval mark color=cyan!80!black!50!white
+ },
+ theodosian-west/.style={
+ interval bar color=cyan!80!white,
+ interval mark color=cyan!80!white!50!white
+ },
+ leonid/.style={
+ interval bar color=purple!40!white,
+ interval mark color=purple!40!white!50!white
+ },
+ justinian/.style={
+ interval bar color=orange!60!white,
+ interval mark color=orange!60!white!50!white
+ },
+ lastwest/.style={
+ interval bar color=green!25!black,
+ interval mark color=green!25!black!50!white
+ },
+}
+%</example1-setup>
+%<*example1-timechart>
+\begin{timechart}[
+ axis line/.append style={ draw=gray, line width=.5pt },
+ grid/.append style={ draw=lightgray!50!white, line width=.5pt },
+ minor tick/.append style={ draw=gray },
+ major tick/.append style={ line width=.5pt, draw=gray },
+ major tick label/.append style={ node font=\small },
+ interval label/.style={ node font=\sffamily\footnotesize },
+ text/.style={ node font=\sffamily\small\itshape, },
+ ystep=-3.25mm,
+ ]{-50}{500}
+
+ \pgfmathsetmacro{\mainlinecount}{46}
+
+ \timechartsetyminimumautoreset{-3.25mm*\mainlinecount+1mm}
+
+ \timechartinterval[interval bar color=gray,right,mark=-45]{-100}{-44}{Julius Caesar}
+ \timechartinterval[julioclaudian,right,mark=-27]{-63}{-14}{Augustus}
+ \timechartinterval[julioclaudian,right,mark=14]{-42}{37}{Tiberius}
+ \timechartinterval[julioclaudian,right,mark=37]{12}{41}{Caligula}
+ \timechartinterval[julioclaudian,right,mark=41]{-10}{54}{Claudius}
+ \timechartinterval[julioclaudian,right,mark=54]{37}{68}{Nero}
+
+ \timechartinterval[fouremperors,mark=68]{-3}{69}{Galba}
+ \timechartinterval[fouremperors,mark=69]{32}{69}{Otho}
+ \timechartinterval[fouremperors,mark=69]{15}{69}{Vitellius}
+
+ \timechartinterval[flavian,mark=69]{9}{79}{Vespasian}
+ \timechartinterval[flavian,mark=79]{39}{81}{Titus}
+ \timechartinterval[flavian,mark=81]{51}{96}{Domitian}
+
+ \timechartinterval[nervaantonine,mark=96]{30}{98}{Nerva}
+ \timechartinterval[nervaantonine,mark=98]{53}{117}{Trajan}
+ \timechartinterval[nervaantonine,mark=117]{76}{138}{Hadrian}
+ \timechartinterval[nervaantonine,mark=138]{86}{161}{Antoninus Pius}
+ \timechartinterval[nervaantonine,mark=161]{121}{180}{Marcus Aurelius}
+ \timechartinterval[nervaantonine,mark=161]{130}{169}{Lucius Verus}
+ \timechartinterval[nervaantonine,mark=180]{161}{192}{Commodus}
+
+ \timechartinterval[fiveemperors,mark=193]{126}{193}{Pertinax}
+ \timechartinterval[fiveemperors,mark=193]{133}{193}{Didius Julianus}
+
+ \timechartinterval[severan,mark=193]{145}{211}{Septimus Severus}
+ \timechartinterval[severan,mark=211]{188}{217}{Caracalla}
+ \timechartinterval[severan,mark=211]{189}{211}{Geta}
+ \timechartinterval[severan,mark=217]{c165}{218}{Macrinus}
+ \timechartinterval[severan,mark=218]{203/204}{222}{Elagabalus}
+ \timechartinterval[severan,mark=222]{208}{235}{Severus Alexander}
+
+ \timechartinterval[thirdcentury,mark=235]{c172/c180}{238}{Maximinus I}
+ \timechartinterval[thirdcentury,mark=238]{c158}{238}{Gordian I}
+ \timechartinterval[thirdcentury,mark=238]{192}{238}{Gordian II}
+ \timechartinterval[thirdcentury,mark=238]{164}{238}{Pupienus}
+ \timechartinterval[thirdcentury,mark=238]{c164}{238}{Balbinus}
+ \timechartinterval[thirdcentury,mark=238]{225}{244}{Gordian III}
+ \timechartinterval[thirdcentury,mark=244]{c204}{249}{Philip I}
+ \timechartinterval[thirdcentury,mark=249]{c190/200}{251}{Decius}
+ \timechartinterval[thirdcentury,mark=251]{c206}{253}{Trebonianus Gallus}
+ \timechartinterval[thirdcentury,mark=253]{c207}{253}{Aemilianus}
+ \timechartinterval[thirdcentury,mark=253]{c200}{262}{Valerian}
+ \timechartinterval[thirdcentury,mark=253]{218}{268}{Gallienus}
+ \timechartinterval[thirdcentury,mark=268]{214}{270}{Claudius II}
+ \timechartinterval[thirdcentury,mark=270]{230/250}{270}{Quintillus}
+ \timechartinterval[thirdcentury,mark=270]{214}{275}{Aurelian}
+ \timechartinterval[thirdcentury,mark=275]{c200}{276}{Tacitus}
+ \timechartinterval[thirdcentury,mark=276]{226/256}{276}{Florianus}
+ \timechartinterval[thirdcentury,mark=276]{232}{282}{Probus}
+ \timechartinterval[thirdcentury,mark=282]{c224}{283}{Carus}
+ \timechartinterval[thirdcentury,mark=283]{c250}{285}{Carinus}
+ \timechartinterval[thirdcentury,mark=283]{c253}{284}{Numerian}
+
+ \timechartinterval[tetrarchy,mark=284]{242/245}{311/312}{Diocletian}
+ \timechartinterval[tetrarchy,mark=286]{c250}{310}{Maximian}
+ \timechartinterval[tetrarchy,mark=305]{c258}{311}{Galerius}
+ \timechartinterval[tetrarchy,mark=305]{c250}{306}{Constantius I}
+ \timechartinterval[tetrarchy,mark=306]{257/287}{307}{Severus II}
+ \timechartinterval[tetrarchy,marks={308,324}]{c265}{325}{Licinius}
+ \timechartinterval[tetrarchy,mark=310]{c270}{313}{Maximinus II}
+ \timechartinterval[tetrarchy,mark=316]{267/297}{317}{Valerius Valens}
+ \timechartinterval[tetrarchy,mark=324]{275/305}{325}{Martinian}
+
+ \timechartinterval[constantinian,mark=306]{272/273}{337}{Constantine I}
+ \timechartinterval[constantinian,mark=337]{316}{340}{Constantine II}
+ \timechartinterval[constantinian,mark=337]{322/323}{350}{Constans I}
+ \timechartinterval[constantinian,mark=337]{317}{361}{Constantius II}
+ \timechartinterval[constantinian,mark=361]{331}{363}{Julian}
+ \timechartinterval[constantinian,mark=363]{330/331}{364}{Jovian}
+
+ \timechartinterval[valentinianic,mark=364]{321}{375}{Valentinian I}
+ \timechartinterval[valentinianic,mark=364]{c328}{378}{Valens}
+ \timechartinterval[valentinianic,mark=375]{359}{383}{Gratian}
+ \timechartinterval[valentinianic,mark=388]{371}{392}{Valentinian II}
+
+ \timechartinterval[theodosian,mark=379]{346/347}{395}{Theodosius I}
+ \timecharttext[center]{395}{Eastern}
+ \timechartinterval[theodosian-east,mark=395]{377}{408}{Arcadius}
+ \timechartinterval[theodosian-east,mark=408]{401}{450}{Theodosius II}
+ \timechartinterval[theodosian-east,mark=450]{391/392}{457}{Marcian}
+
+ \timechartinterval[leonid,mark=457]{400/401}{474}{Leo I}
+ \timechartinterval[leonid,mark=474]{467}{474}{Leo II}
+ \timechartinterval[leonid,mark={474,475,476}]{425}{491}{Zeno}
+ \timechartinterval[leonid,mark=475]{426/456}{476/477}{Basilicus}
+ \timechartinterval[leonid,mark=491]{430/431}{518}{Anastasius I}
+
+ \timechartinterval[justinian,mark=518]{450}{527}{Justin I}
+ \timechartinterval[justinian,mark=527]{482}{565}{Justinian I}
+
+ \timecharttext[center]{395}{Western}
+ \timechartinterval[theodosian-west,mark=395]{384}{423}{Honorius}
+ \timechartinterval[theodosian-west,mark=421]{371/401}{421}{Constantius III}
+ \timechartinterval[theodosian-west,mark=425]{419}{455}{Valentian III}
+
+ \timechartinterval[lastwest,mark=455]{405/435}{455}{Petronius Maximus}
+ \timechartinterval[lastwest,mark=455]{406/436}{456/457}{Avitius}
+ \timechartinterval[lastwest,mark=457]{411/441}{461}{Majorian}
+ \timechartinterval[lastwest,mark=461]{415/445}{465}{Libius Severus}
+ \timechartinterval[lastwest,mark=467]{422/452}{472}{Anthemius}
+ \timechartinterval[lastwest,mark=472]{422/452}{472}{Olybrius}
+ \timechartinterval[lastwest,mark={473,474}]{443/473}{474/504}{Glycerius}
+ \timechartinterval[lastwest,mark={474,465}]{430/460}{480}{Julius Nepos}
+ \timechartinterval[lastwest,mark={475,476}]{c465}{507/527}{Romulus}
+
+ \timechartsetyminimumautoreset{-\maxdimen}
+ \timechartsety{(-\mainlinecount-1)*3.25mm}
+
+ \timechartinterval[
+ center,
+ interval bar color=darkgray,
+ interval text/.append style={ text=white },
+ interval bar thickness=6.5mm
+ ]{-509}{-27}{}
+ \timechartstepy[-1]
+ \timechartinterval[
+ center,
+ interval bar color=black,
+ interval text/.append style={ node font=\sffamily\normalsize,text=white },
+ interval bar thickness=6.5mm
+ ]{-27}{395}{Roman Empire}
+ \timechartstepy[-1.5]
+ \timechartinterval[
+ center,
+ interval bar color=lightgray,
+ interval bar thickness=3.25mm
+ ]{395}{1453}{Eastern}
+ \timechartinterval[
+ center,
+ interval bar color=gray,
+ interval bar thickness=3.25mm
+ ]{395}{476}{Western}
+\end{timechart}
+%</example1-timechart>
+%<*example1-legend>
+\begin{tabular}{rl}
+ \timechartlegenditem[julioclaudian] & Julio-Claudian dynasty \\
+ \timechartlegenditem[fouremperors] & Year of four emperors \\
+ \timechartlegenditem[flavian] & Flavian dynasty \\
+ \timechartlegenditem[nervaantonine] & Nerva-Antonine dynasty \\
+ \timechartlegenditem[fiveemperors] & Year of five emperors \\
+ \timechartlegenditem[severan] & Severan dynasty \\
+ \timechartlegenditem[thirdcentury] & Crisis of the third century \\
+ \timechartlegenditem[tetrarchy] & Tetrarchy \\
+ \timechartlegenditem[constantinian] & Constantinian dynasty \\
+ \timechartlegenditem[valentinianic] & Valentinianic dynasty \\
+ \timechartlegenditem[theodosian] & Theodosian dynasty \\
+ \timechartlegenditem[theodosian-east] & --- in the east \\
+ \timechartlegenditem[theodosian-west] & --- in the west \\
+ \timechartlegenditem[leonid] & Leonid dynasty \\
+ \timechartlegenditem[justinian] & Justinian dynasty \\
+ \timechartlegenditem[lastwest] & Last emperors in the west \\
+\end{tabular}
+%</example1-legend>
+%<*example2-v1>
+\begin{timechart}{-50}{75}
+ \timechartinterval{-63}{-14}{Augustus}
+ \timechartinterval{-42}{37}{Tiberius}
+ \timechartinterval{12}{41}{Caligula}
+ \timechartinterval{-10}{54}{Claudius}
+ \timechartinterval{37}{68}{Nero}
+\end{timechart}
+%</example2-v1>
+%<*example2-v2>
+\begin{timechart}[
+ minor tick interval=5,
+ major tick interval=25,
+ grid/.append style={ draw=lightgray },
+ axis line/.append style={ draw=gray },
+ minor tick/.append style={ draw=gray },
+ major tick/.append style={ draw=gray },
+ interval label/.append style={ node font=\sffamily\small },
+ julioclaudian/.style={ interval bar color=red!80!black },
+ ]{-50}{75}
+ \timechartinterval[right,julioclaudian]{-63}{-14}{Augustus}
+ \timechartinterval[right,julioclaudian]{-42}{37}{Tiberius}
+ \timechartinterval[julioclaudian]{12}{41}{Caligula}
+ \timechartinterval[julioclaudian]{-10}{54}{Claudius}
+ \timechartinterval[julioclaudian]{37}{68}{Nero}
+\end{timechart}
+%</example2-v2>
+% \fi
+%
+%
+%
% \begin{implementation}
%
% \setcounter{secnumdepth}{7}
@@ -990,7 +1280,7 @@
% Package identification/version information.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[2020-02-02]
-\ProvidesExplPackage{timechart}{2025-02-15}{0.51}
+\ProvidesExplPackage{timechart}{2025-03-10}{0.54.2}
{Typesetting chronological charts}
% \end{macrocode}
%
@@ -1192,11 +1482,18 @@
% \end{macrocode}
% Keys applicable to the axis.
% \begin{macrocode}
- no~axis/.code = { \bool_set_false:N\l_@@_axis_bool },
axis~line/.style={
line~cap=rect,
},
axis~ysep/.initial=3pt,
+ axis/.is~choice,
+ axis/none/.code
+ = { \int_set:Nn\l_@@_axis_int{0} },
+ axis/above/.code
+ = { \int_set:Nn\l_@@_axis_int{1} },
+ axis/below/.code
+ = { \int_set:Nn\l_@@_axis_int{2} },
+ no~axis/.code = { \int_set:Nn\l_@@_axis_int{0} },
minor~tick/.style={},
minor~tick~length/.initial=1.5mm,
major~tick/.style={},
@@ -1207,6 +1504,13 @@
anchor=mid~west,
rotate=90,
},
+ major~tick~eras/.is~choice,
+ major~tick~eras/none/.code
+ = { \int_set:Nn\l_@@_major_tick_eras_int{0} },
+ major~tick~eras/all/.code
+ = { \int_set:Nn\l_@@_major_tick_eras_int{1} },
+ major~tick~eras/outer/.code
+ = { \int_set:Nn\l_@@_major_tick_eras_int{2} },
% \end{macrocode}
% Keys applicable to intervals, texts, spaces, and legends.
% \begin{macrocode}
@@ -1285,15 +1589,24 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\l_@@_axis_bool}
-% Boolean indicating whether the axis will be drawn. This variable is by default true but can be set false via the
-% \key{/timechart/no axis} PGF key.
+% \begin{macro}{\l_@@_axis_int}
+% An integer indicating whether and where the axis will be drawn. This is set via the \key{/timechart/axis} PGF
+% key.
% \begin{macrocode}
-\bool_new:N\l_@@_axis_bool
-\bool_set_true:N\l_@@_axis_bool
+\int_new:N\l_@@_axis_int
+\int_set:Nn\l_@@_axis_int{1}
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\l_@@_major_tick_eras_int}
+% An integer indicating which major ticks will have era indicators. This is set via the \key{/timechart/major tick
+% era} PGF key.
+% \begin{macrocode}
+\int_new:N\l_@@_major_tick_eras_int
+\int_set:Nn\l_@@_major_tick_eras_int{2}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\l_@@_autostep_bool}
% Boolean indicating whether to automatically step the \(y\) coordinate after an interval, text, or space. This
% variable is by default true but can be set false via the \key{/timechart/no autostep} PGF key.
@@ -1382,8 +1695,13 @@
{/timechart/grid}
}
{ \pgfmathsetlengthmacro{\l_@@_grid_line_width}{0} }
- \bool_if:NTF\l_@@_axis_bool
+ \int_if_zero:nTF{ \l_@@_axis_int }
{
+ \pgfmathsetlengthmacro{\l_@@_axis_line_width}{0}
+ \pgfmathsetlengthmacro{\l_@@_major_tick_line_width}{0}
+ \pgfmathsetlengthmacro{\l_@@_minor_tick_line_width}{0}
+ }
+ {
\@@_set_style_line_width:nn
{\l_@@_axis_line_width}
{/timechart/axis~line}
@@ -1394,11 +1712,6 @@
{\l_@@_minor_tick_line_width}
{/timechart/minor~tick}
}
- {
- \pgfmathsetlengthmacro{\l_@@_axis_line_width}{0}
- \pgfmathsetlengthmacro{\l_@@_major_tick_line_width}{0}
- \pgfmathsetlengthmacro{\l_@@_minor_tick_line_width}{0}
- }
% \end{macrocode}
% Store the start and finish years (ignoring circa, month, day), and then set up the conversion from years to \(x\)
% coordinates. \cs{l_@@_x} is the \(x\)-distance corresponding to one year, and \mcode{yeartox} is the \pkg{pgfmath}
@@ -1537,25 +1850,9 @@
% Now draw the grid and axis if necessary and set the bounding box if not.
% \begin{macrocode}
\bool_if:NTF{\l_@@_grid_bool}
- {
- \@@_grid_draw:
- \pgfmathsetmacro{\l_@@_axis_y}
- {
- \l_@@_content_top_y
- + \l_@@_grid_top_ysep_pgf
- + \pgfkeysvalueof{/timechart/axis~ysep}
- }
- }
- {
- \@@_nogrid_bounding_box_set:
- \pgfmathsetmacro{\l_@@_axis_y}
- {
- \l_@@_content_top_y
- +\pgfkeysvalueof{/timechart/axis~ysep}
- }
- }
- \bool_if:NT{\l_@@_axis_bool}
- { \@@_axis_draw: }
+ { \@@_grid_draw: }
+ { \@@_nogrid_bounding_box_set: }
+ \@@_axis_draw:
% \end{macrocode}
% Finally, end the group begun by \cs{@@_main_begin:nnn}.
% \begin{macrocode}
@@ -1569,15 +1866,16 @@
% \subsection{Grid drawing}
%
% \begin{macro}{\@@_grid_draw:}
-% Draw the grid of the chart, assuming that the \(y\) coordinates of the top and bottom of the content have
-% been calculated and stored in \cs{l_@@_content_top_y} and \cs{l_@@_content_bottom_y}.
+% Draw the grid of the chart, assuming that the \(y\) coordinates of the top and bottom of the content have been
+% calculated and stored in \cs{l_@@_content_top_y} and \cs{l_@@_content_bottom_y}. These variable will be updated to
+% the grid top and bottom.
% \begin{macrocode}
\cs_new:Npn\@@_grid_draw:
{
- \pgfmathsetmacro{\l_@@_grid_bottom_y}{
+ \pgfmathsetmacro{\l_@@_content_bottom_y}{
\l_@@_content_bottom_y-\l_@@_grid_bottom_ysep_pgf
}
- \pgfmathsetmacro{\l_@@_grid_top_y}{
+ \pgfmathsetmacro{\l_@@_content_top_y}{
\l_@@_content_top_y+\l_@@_grid_top_ysep_pgf
}
\pgfonlayer{ grid }
@@ -1597,8 +1895,8 @@
\bool_if:NT\l_@@_tmpa_bool
{
\pgftransformshift{ \pgfpoint{yeartox(\year)}{0} }
- \pgfpathmoveto{ \pgfpoint{0}{\l_@@_grid_top_y} }
- \pgfpathlineto{ \pgfpoint{0}{\l_@@_grid_bottom_y} }
+ \pgfpathmoveto{ \pgfpoint{0}{\l_@@_content_top_y} }
+ \pgfpathlineto{ \pgfpoint{0}{\l_@@_content_bottom_y} }
\pgfusepath{ draw }
}
\group_end:
@@ -1607,8 +1905,8 @@
% Define and draw the grid node.
% \begin{macrocode}
\@@_make_rectangle_node:nnnn
- { \pgfpoint{\l_@@_start_x}{\l_@@_grid_bottom_y} }
- { \pgfpoint{\l_@@_finish_x}{\l_@@_grid_top_y} }
+ { \pgfpoint{\l_@@_start_x}{\l_@@_content_bottom_y} }
+ { \pgfpoint{\l_@@_finish_x}{\l_@@_content_top_y} }
{ grid }
{ \c_true_bool }
\endscope
@@ -1622,24 +1920,69 @@
% \subsection{Axis drawing}
%
% \begin{macro}{\@@_axis_draw:}
+% Draw the axis, with large/small ticks and labels on appropriate years.
+% \begin{macrocode}
+\cs_new:Npn\@@_axis_draw:
+ {
+ \group_begin:
+ \int_case:nn{ \l_@@_axis_int }
+ {
+ {0}
+ { \prg_do_nothing: }
+ {1}
+ {
+ \pgftransformshift{
+ \pgfpoint{0}{
+ \l_@@_content_top_y
+ +\pgfkeysvalueof{/timechart/axis~ysep}
+ }
+ }
+ \pgfmathsetmacro{\l_@@_tick_orientation_pgf}{1}
+ \cs_set:Npn\l_@@_tick_label_anchor_text
+ { mid~west }
+ \cs_set:Npn\l_@@_zero_tick_before_label_anchor_text
+ { base~west }
+ \cs_set:Npn\l_@@_zero_tick_after_label_anchor_text
+ { north~west }
+ \@@_axis_draw_aux:
+ }
+ {2}
+ {
+ \pgftransformshift{
+ \pgfpoint{0}{
+ \l_@@_content_bottom_y
+ -\pgfkeysvalueof{/timechart/axis~ysep}
+ }
+ }
+ \pgfmathsetmacro{\l_@@_tick_orientation_pgf}{-1}
+ \cs_set:Npn\l_@@_tick_label_anchor_text
+ { mid~east }
+ \cs_set:Npn\l_@@_zero_tick_before_label_anchor_text
+ { base~east }
+ \cs_set:Npn\l_@@_zero_tick_after_label_anchor_text
+ { north~east }
+ \@@_axis_draw_aux:
+ }
+ }
+ \group_end:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_axis_draw_aux:}
% Draw the axis, with large/small ticks and labels on appropriate years, assuming that the \(y\) coordinate has been
% calculated and stored in \cs{l_@@_axis_y}.
% \begin{macrocode}
-\cs_new:Npn\@@_axis_draw:
+\cs_new:Npn\@@_axis_draw_aux:
{
- \group_begin:
\pgfkeys{
/timechart/minor~tick~length/.get=\@@_minor_tick_length_pgf,
/timechart/major~tick~length/.get=\@@_major_tick_length_pgf,
}
% \end{macrocode}
-% Shift to the \(y\) coordinate of the axis line.
-% \begin{macrocode}
- \pgftransformshift{ \pgfpoint{0}{\l_@@_axis_y} }
-% \end{macrocode}
% Work out the first and last years which will have a major tick (since these are marked with the era).
% \begin{macrocode}
- \pgfmathsetmacro{\@@_start_major_tick_year}
+ \pgfmathsetmacro{\l_@@_start_major_tick_year}
{
\l_@@_start_year
-Mod(
@@ -1647,17 +1990,22 @@
\l_@@_major_tick_interval_year
)
}
- \pgfmathsetmacro{\@@_start_major_tick_year}
+ \pgfmathsetmacro{\l_@@_start_major_tick_year}
{
ifthenelse(
- \@@_start_major_tick_year<\l_@@_start_year,
- \@@_start_major_tick_year
+ \l_@@_start_major_tick_year<\l_@@_start_year,
+ \l_@@_start_major_tick_year
+\l_@@_major_tick_interval_year,
- \@@_start_major_tick_year
+ \l_@@_start_major_tick_year
)
}
- \pgfmathsetmacro{\@@_finish_major_tick_year}
+ \pgfmathsetmacro{\l_@@_start_plus_major_tick_year}
{
+ \l_@@_start_major_tick_year
+ +\l_@@_major_tick_interval_year
+ }
+ \pgfmathsetmacro{\l_@@_finish_major_tick_year}
+ {
\l_@@_finish_year
-Mod(
\l_@@_finish_year,
@@ -1665,7 +2013,7 @@
)
}
% \end{macrocode}
-% Loop over years and draw the appropriate ticks.
+% Loop over years and draw the minor ticks.
% \begin{macrocode}
\foreach \year in {
\l_@@_start_year,
@@ -1676,23 +2024,53 @@
\pgfmathsetmacro{\x}{yeartox(\year)}
\@@_pgfmathsetbool:nn
{\l_@@_tmpa_bool}
- { Mod(\year,\l_@@_major_tick_interval_year)==0 }
- \bool_if:NTF\l_@@_tmpa_bool
- { \@@_axis_draw_labelled_major_tick:NN\x\year }
+ {
+ Mod(
+ \year-\l_@@_start_major_tick_year,
+ \l_@@_major_tick_interval_year
+ )==0
+ }
+ \bool_if:NF\l_@@_tmpa_bool
{ \@@_axis_draw_minor_tick:N\x }
}
- \@@_draw_axis_line
% \end{macrocode}
-% Define the axis node.
+% Loop over years and draw the major ticks.
% \begin{macrocode}
- \pgfextracty{\l_@@_tmpa_dim}
- { \pgfpointanchor{current~bounding~box}{north} }
+ \foreach \year in {
+ \l_@@_start_major_tick_year,
+ \l_@@_start_plus_major_tick_year,
+ ...,
+ \l_@@_finish_major_tick_year
+ } {
+ \pgfmathsetmacro{\x}{yeartox(\year)}
+ \@@_axis_draw_labelled_major_tick:NN\x\year
+ }
+% \end{macrocode}
+% Define the axis line and define the axis node.
+% \begin{macrocode}
+ \@@_draw_axis_line
+ \int_case:nn{\l_@@_axis_int}
+ {
+ {1}
+ {
+ \pgfextracty{\l_@@_tmpa_dim}
+ { \pgfpointanchor{current~bounding~box}{north} }
+ \pgfmathsetmacro{\l_@@_axis_top_y}{\l_@@_tmpa_dim}
+ \pgfmathsetmacro{\l_@@_axis_bottom_y}{0}
+ }
+ {2}
+ {
+ \pgfextracty{\l_@@_tmpa_dim}
+ { \pgfpointanchor{current~bounding~box}{south} }
+ \pgfmathsetmacro{\l_@@_axis_top_y}{0}
+ \pgfmathsetmacro{\l_@@_axis_bottom_y}{\l_@@_tmpa_dim}
+ }
+ }
\@@_make_rectangle_node:nnnn
- { \pgfpoint{\l_@@_start_x}{0} }
- { \pgfpoint{\l_@@_finish_x}{\l_@@_tmpa_dim} }
+ { \pgfpoint{\l_@@_start_x}{\l_@@_axis_bottom_y} }
+ { \pgfpoint{\l_@@_finish_x}{\l_@@_axis_top_y} }
{ axis }
{ \c_false_bool }
- \group_end:
}
% \end{macrocode}
% \end{macro}
@@ -1707,7 +2085,12 @@
{
\scope[/timechart/minor~tick]
\pgfpathmoveto{ \pgfpoint{#1}{0} }
- \pgfpathlineto{ \pgfpoint{#1}{\@@_minor_tick_length_pgf} }
+ \pgfpathlineto{
+ \pgfpoint{#1}{
+ \l_@@_tick_orientation_pgf
+ *\@@_minor_tick_length_pgf
+ }
+ }
\pgfusepath{draw}
\endscope
}
@@ -1725,20 +2108,31 @@
\bool_if:NTF \l_@@_tmpa_bool
{ \@@_axis_draw_zero_tick:N #1 }
{
- \@@_pgfmathsetbool:nn{\l_@@_tmpb_bool}
- { #2==\@@_start_major_tick_year }
- \@@_pgfmathsetbool:nn{\l_@@_tmpc_bool}
- { #2==\@@_finish_major_tick_year }
- \bool_set:Nn\l_@@_tmpd_bool
- { \l_@@_tmpb_bool || \l_@@_tmpc_bool }
+ \int_case:nn { \l_@@_major_tick_eras_int }
+ {
+ {0}{ \bool_set_false:N\l_@@_tmpd_bool }
+ {1}{ \bool_set_true:N\l_@@_tmpd_bool }
+ {2}
+ {
+ \@@_pgfmathsetbool:nn{\l_@@_tmpb_bool}
+ { #2==\l_@@_start_major_tick_year }
+ \@@_pgfmathsetbool:nn{\l_@@_tmpc_bool}
+ { #2==\l_@@_finish_major_tick_year }
+ \bool_set:Nn\l_@@_tmpd_bool
+ { \l_@@_tmpb_bool || \l_@@_tmpc_bool }
+ }
+ }
\@@_axis_draw_major_tick:N #1
\@@_axis_draw_year_label:nnnnnn
{ #1 }
{ #2 }
{ \l_@@_tmpd_bool }
- { mid~west }
+ { \l_@@_tick_label_anchor_text }
{ 0 }
- { \@@_major_tick_length_pgf+1mm }
+ {
+ \l_@@_tick_orientation_pgf
+ *(\@@_major_tick_length_pgf+1mm)
+ }
}
}
% \end{macrocode}
@@ -1751,7 +2145,12 @@
{
\scope[/timechart/major~tick]
\pgfpathmoveto{ \pgfpoint{#1}{0} }
- \pgfpathlineto{ \pgfpoint{#1}{\@@_major_tick_length_pgf} }
+ \pgfpathlineto{
+ \pgfpoint{#1}{
+ \l_@@_tick_orientation_pgf
+ *\@@_major_tick_length_pgf
+ }
+ }
\pgfusepath{draw}
\endscope
}
@@ -1779,6 +2178,8 @@
% \emph{appears} smooth.
% \begin{macrocode}
\scope[/timechart/major~tick,line~join=miter]
+ \group_begin:
+ \pgftransformyscale{\l_@@_tick_orientation_pgf}
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpoint{0}{\@@_major_tick_length_pgf}}
\pgfpatharc{0}{90-\a}{\t~and~\r}
@@ -1787,6 +2188,7 @@
\pgfpatharc{90+\a}{180-\a}{\t~and~\r}
\pgfpathlineto{\pgfpoint{0}{\@@_major_tick_length_pgf-1pt}}
\pgfusepath{draw}
+ \group_end:
\endscope
% \end{macrocode}
% There is no year 0, so label the zero mark with the 1 before and 1 after the epoch.
@@ -1795,16 +2197,16 @@
{ 0 }
{ -1 }
{ \c_true_bool }
- { base~west }
+ { \l_@@_zero_tick_before_label_anchor_text }
{ -.5mm }
- { 5.5mm }
+ { \l_@@_tick_orientation_pgf*5.5mm }
\@@_axis_draw_year_label:nnnnnn
{ 0 }
{ 1 }
{ \c_true_bool }
- { north~west }
+ { \l_@@_zero_tick_after_label_anchor_text }
{ .5mm }
- { 5.5mm }
+ { \l_@@_tick_orientation_pgf*5.5mm }
\group_end:
}
% \end{macrocode}
@@ -1847,14 +2249,14 @@
\bool_if:NTF\l_@@_tmpa_bool
{ \cs_set_eq:NN\@@_make_year:n\timechartmakebeforeyear }
{ \cs_set_eq:NN\@@_make_year:n\timechartmakeafteryear }
- \@@_hsmash_pgfnode:nnnnn
- {rectangle}
- {#4}
- {\@@_make_year:n{\absyear}}
- {}
- {}
}
- { \pgfnode{rectangle}{#4}{\absyear}{}{} }
+ { \cs_set_eq:NN\@@_make_year:n\use:n }
+ \@@_hsmash_pgfnode:nnnnn
+ {rectangle}
+ {#4}
+ {\@@_make_year:n{\absyear}}
+ {}
+ {}
\endscope
\group_end:
}
@@ -3456,3 +3858,11 @@
% \end{implementation}
%
% \PrintIndex
+%
+%
+%
+% \iffalse
+%<*metadriver>
+\input{timechart.dtx}
+%</metadriver>
+% \fi
Modified: trunk/Master/texmf-dist/source/latex/timechart/timechart.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/timechart/timechart.ins 2025-03-10 20:06:31 UTC (rev 74559)
+++ trunk/Master/texmf-dist/source/latex/timechart/timechart.ins 2025-03-10 20:06:47 UTC (rev 74560)
@@ -3,7 +3,7 @@
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public Licence, either
-%% version 1.3 of this licence or (at your option) any later
+%% version 1.3c of this licence or (at your option) any later
%% version. The latest version of this licence is in:
%%
%% http://www.latex-project.org/lppl.txt
@@ -23,7 +23,7 @@
This file may be distributed and/or modified under the
conditions of the LaTeX Project Public Licence, either
-version 1.3 of this licence or (at your option) any later
+version 1.3c of this licence or (at your option) any later
version. The latest version of this licence is in:
http://www.latex-project.org/lppl.txt
@@ -35,4 +35,13 @@
\generate{\file{timechart.sty}{\from{timechart.dtx}{package}}}
+\nopreamble
+
+\generate{\file{timechart-doc.tex}{\from{timechart.dtx}{metadriver}}}
+\generate{\file{timechart-example1-setup.tex}{\from{timechart.dtx}{example1-setup}}}
+\generate{\file{timechart-example1-timechart.tex}{\from{timechart.dtx}{example1-timechart}}}
+\generate{\file{timechart-example1-legend.tex}{\from{timechart.dtx}{example1-legend}}}
+\generate{\file{timechart-example2-v1.tex}{\from{timechart.dtx}{example2-v1}}}
+\generate{\file{timechart-example2-v2.tex}{\from{timechart.dtx}{example2-v2}}}
+
\endbatchfile
Modified: trunk/Master/texmf-dist/tex/latex/timechart/timechart.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/timechart/timechart.sty 2025-03-10 20:06:31 UTC (rev 74559)
+++ trunk/Master/texmf-dist/tex/latex/timechart/timechart.sty 2025-03-10 20:06:47 UTC (rev 74560)
@@ -12,7 +12,7 @@
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public Licence, either
-%% version 1.3 of this licence or (at your option) any later
+%% version 1.3c of this licence or (at your option) any later
%% version. The latest version of this licence is in:
%%
%% http://www.latex-project.org/lppl.txt
@@ -21,7 +21,7 @@
%% LaTeX version 2008-05-04 or later.
%%
\NeedsTeXFormat{LaTeX2e}[2020-02-02]
-\ProvidesExplPackage{timechart}{2025-02-15}{0.51}
+\ProvidesExplPackage{timechart}{2025-03-10}{0.54.2}
{Typesetting chronological charts}
\RequirePackage{tikz}
\bool_new:N\l__timechart_tmpa_bool
@@ -116,11 +116,18 @@
grid~top~ysep/.initial={3pt},
grid~bottom~ysep/.initial={3pt},
grid/.style={},
- no~axis/.code = { \bool_set_false:N\l__timechart_axis_bool },
axis~line/.style={
line~cap=rect,
},
axis~ysep/.initial=3pt,
+ axis/.is~choice,
+ axis/none/.code
+ = { \int_set:Nn\l__timechart_axis_int{0} },
+ axis/above/.code
+ = { \int_set:Nn\l__timechart_axis_int{1} },
+ axis/below/.code
+ = { \int_set:Nn\l__timechart_axis_int{2} },
+ no~axis/.code = { \int_set:Nn\l__timechart_axis_int{0} },
minor~tick/.style={},
minor~tick~length/.initial=1.5mm,
major~tick/.style={},
@@ -131,6 +138,13 @@
anchor=mid~west,
rotate=90,
},
+ major~tick~eras/.is~choice,
+ major~tick~eras/none/.code
+ = { \int_set:Nn\l__timechart_major_tick_eras_int{0} },
+ major~tick~eras/all/.code
+ = { \int_set:Nn\l__timechart_major_tick_eras_int{1} },
+ major~tick~eras/outer/.code
+ = { \int_set:Nn\l__timechart_major_tick_eras_int{2} },
no~autostep/.code = { \bool_set_false:Nz\l__timechart_autostep_bool },
ref/.initial={},
mark/.initial={},
@@ -188,8 +202,10 @@
}
\bool_new:N\l__timechart_grid_bool
\bool_set_true:N\l__timechart_grid_bool
-\bool_new:N\l__timechart_axis_bool
-\bool_set_true:N\l__timechart_axis_bool
+\int_new:N\l__timechart_axis_int
+\int_set:Nn\l__timechart_axis_int{1}
+\int_new:N\l__timechart_major_tick_eras_int
+\int_set:Nn\l__timechart_major_tick_eras_int{2}
\bool_new:N\l__timechart_autostep_bool
\bool_set_true:N\l__timechart_autostep_bool
\int_new:N \l__timechart_label_pos_int
@@ -225,8 +241,13 @@
{/timechart/grid}
}
{ \pgfmathsetlengthmacro{\l__timechart_grid_line_width}{0} }
- \bool_if:NTF\l__timechart_axis_bool
+ \int_if_zero:nTF{ \l__timechart_axis_int }
{
+ \pgfmathsetlengthmacro{\l__timechart_axis_line_width}{0}
+ \pgfmathsetlengthmacro{\l__timechart_major_tick_line_width}{0}
+ \pgfmathsetlengthmacro{\l__timechart_minor_tick_line_width}{0}
+ }
+ {
\__timechart_set_style_line_width:nn
{\l__timechart_axis_line_width}
{/timechart/axis~line}
@@ -237,11 +258,6 @@
{\l__timechart_minor_tick_line_width}
{/timechart/minor~tick}
}
- {
- \pgfmathsetlengthmacro{\l__timechart_axis_line_width}{0}
- \pgfmathsetlengthmacro{\l__timechart_major_tick_line_width}{0}
- \pgfmathsetlengthmacro{\l__timechart_minor_tick_line_width}{0}
- }
\__timechart_parse_date:NNn\l_tmpa_bool\l__timechart_start_year{#2}
\__timechart_parse_date:NNn\l_tmpa_bool\l__timechart_finish_year{#3}
\pgfmathsetmacro{\l__timechart_start_year}
@@ -333,33 +349,17 @@
{\l__timechart_tmpb_dim}
}
\bool_if:NTF{\l__timechart_grid_bool}
- {
- \__timechart_grid_draw:
- \pgfmathsetmacro{\l__timechart_axis_y}
- {
- \l__timechart_content_top_y
- + \l__timechart_grid_top_ysep_pgf
- + \pgfkeysvalueof{/timechart/axis~ysep}
- }
- }
- {
- \__timechart_nogrid_bounding_box_set:
- \pgfmathsetmacro{\l__timechart_axis_y}
- {
- \l__timechart_content_top_y
- +\pgfkeysvalueof{/timechart/axis~ysep}
- }
- }
- \bool_if:NT{\l__timechart_axis_bool}
- { \__timechart_axis_draw: }
+ { \__timechart_grid_draw: }
+ { \__timechart_nogrid_bounding_box_set: }
+ \__timechart_axis_draw:
\group_end:
}
\cs_new:Npn\__timechart_grid_draw:
{
- \pgfmathsetmacro{\l__timechart_grid_bottom_y}{
+ \pgfmathsetmacro{\l__timechart_content_bottom_y}{
\l__timechart_content_bottom_y-\l__timechart_grid_bottom_ysep_pgf
}
- \pgfmathsetmacro{\l__timechart_grid_top_y}{
+ \pgfmathsetmacro{\l__timechart_content_top_y}{
\l__timechart_content_top_y+\l__timechart_grid_top_ysep_pgf
}
\pgfonlayer{ grid }
@@ -376,15 +376,15 @@
\bool_if:NT\l__timechart_tmpa_bool
{
\pgftransformshift{ \pgfpoint{yeartox(\year)}{0} }
- \pgfpathmoveto{ \pgfpoint{0}{\l__timechart_grid_top_y} }
- \pgfpathlineto{ \pgfpoint{0}{\l__timechart_grid_bottom_y} }
+ \pgfpathmoveto{ \pgfpoint{0}{\l__timechart_content_top_y} }
+ \pgfpathlineto{ \pgfpoint{0}{\l__timechart_content_bottom_y} }
\pgfusepath{ draw }
}
\group_end:
}
\__timechart_make_rectangle_node:nnnn
- { \pgfpoint{\l__timechart_start_x}{\l__timechart_grid_bottom_y} }
- { \pgfpoint{\l__timechart_finish_x}{\l__timechart_grid_top_y} }
+ { \pgfpoint{\l__timechart_start_x}{\l__timechart_content_bottom_y} }
+ { \pgfpoint{\l__timechart_finish_x}{\l__timechart_content_top_y} }
{ grid }
{ \c_true_bool }
\endscope
@@ -393,12 +393,54 @@
\cs_new:Npn\__timechart_axis_draw:
{
\group_begin:
+ \int_case:nn{ \l__timechart_axis_int }
+ {
+ {0}
+ { \prg_do_nothing: }
+ {1}
+ {
+ \pgftransformshift{
+ \pgfpoint{0}{
+ \l__timechart_content_top_y
+ +\pgfkeysvalueof{/timechart/axis~ysep}
+ }
+ }
+ \pgfmathsetmacro{\l__timechart_tick_orientation_pgf}{1}
+ \cs_set:Npn\l__timechart_tick_label_anchor_text
+ { mid~west }
+ \cs_set:Npn\l__timechart_zero_tick_before_label_anchor_text
+ { base~west }
+ \cs_set:Npn\l__timechart_zero_tick_after_label_anchor_text
+ { north~west }
+ \__timechart_axis_draw_aux:
+ }
+ {2}
+ {
+ \pgftransformshift{
+ \pgfpoint{0}{
+ \l__timechart_content_bottom_y
+ -\pgfkeysvalueof{/timechart/axis~ysep}
+ }
+ }
+ \pgfmathsetmacro{\l__timechart_tick_orientation_pgf}{-1}
+ \cs_set:Npn\l__timechart_tick_label_anchor_text
+ { mid~east }
+ \cs_set:Npn\l__timechart_zero_tick_before_label_anchor_text
+ { base~east }
+ \cs_set:Npn\l__timechart_zero_tick_after_label_anchor_text
+ { north~east }
+ \__timechart_axis_draw_aux:
+ }
+ }
+ \group_end:
+ }
+\cs_new:Npn\__timechart_axis_draw_aux:
+ {
\pgfkeys{
/timechart/minor~tick~length/.get=\__timechart_minor_tick_length_pgf,
/timechart/major~tick~length/.get=\__timechart_major_tick_length_pgf,
}
- \pgftransformshift{ \pgfpoint{0}{\l__timechart_axis_y} }
- \pgfmathsetmacro{\__timechart_start_major_tick_year}
+ \pgfmathsetmacro{\l__timechart_start_major_tick_year}
{
\l__timechart_start_year
-Mod(
@@ -406,17 +448,22 @@
\l__timechart_major_tick_interval_year
)
}
- \pgfmathsetmacro{\__timechart_start_major_tick_year}
+ \pgfmathsetmacro{\l__timechart_start_major_tick_year}
{
ifthenelse(
- \__timechart_start_major_tick_year<\l__timechart_start_year,
- \__timechart_start_major_tick_year
+ \l__timechart_start_major_tick_year<\l__timechart_start_year,
+ \l__timechart_start_major_tick_year
+\l__timechart_major_tick_interval_year,
- \__timechart_start_major_tick_year
+ \l__timechart_start_major_tick_year
)
}
- \pgfmathsetmacro{\__timechart_finish_major_tick_year}
+ \pgfmathsetmacro{\l__timechart_start_plus_major_tick_year}
{
+ \l__timechart_start_major_tick_year
+ +\l__timechart_major_tick_interval_year
+ }
+ \pgfmathsetmacro{\l__timechart_finish_major_tick_year}
+ {
\l__timechart_finish_year
-Mod(
\l__timechart_finish_year,
@@ -432,26 +479,58 @@
\pgfmathsetmacro{\x}{yeartox(\year)}
\__timechart_pgfmathsetbool:nn
{\l__timechart_tmpa_bool}
- { Mod(\year,\l__timechart_major_tick_interval_year)==0 }
- \bool_if:NTF\l__timechart_tmpa_bool
- { \__timechart_axis_draw_labelled_major_tick:NN\x\year }
+ {
+ Mod(
+ \year-\l__timechart_start_major_tick_year,
+ \l__timechart_major_tick_interval_year
+ )==0
+ }
+ \bool_if:NF\l__timechart_tmpa_bool
{ \__timechart_axis_draw_minor_tick:N\x }
}
+ \foreach \year in {
+ \l__timechart_start_major_tick_year,
+ \l__timechart_start_plus_major_tick_year,
+ ...,
+ \l__timechart_finish_major_tick_year
+ } {
+ \pgfmathsetmacro{\x}{yeartox(\year)}
+ \__timechart_axis_draw_labelled_major_tick:NN\x\year
+ }
\__timechart_draw_axis_line
- \pgfextracty{\l__timechart_tmpa_dim}
- { \pgfpointanchor{current~bounding~box}{north} }
+ \int_case:nn{\l__timechart_axis_int}
+ {
+ {1}
+ {
+ \pgfextracty{\l__timechart_tmpa_dim}
+ { \pgfpointanchor{current~bounding~box}{north} }
+ \pgfmathsetmacro{\l__timechart_axis_top_y}{\l__timechart_tmpa_dim}
+ \pgfmathsetmacro{\l__timechart_axis_bottom_y}{0}
+ }
+ {2}
+ {
+ \pgfextracty{\l__timechart_tmpa_dim}
+ { \pgfpointanchor{current~bounding~box}{south} }
+ \pgfmathsetmacro{\l__timechart_axis_top_y}{0}
+ \pgfmathsetmacro{\l__timechart_axis_bottom_y}{\l__timechart_tmpa_dim}
+ }
+ }
\__timechart_make_rectangle_node:nnnn
- { \pgfpoint{\l__timechart_start_x}{0} }
- { \pgfpoint{\l__timechart_finish_x}{\l__timechart_tmpa_dim} }
+ { \pgfpoint{\l__timechart_start_x}{\l__timechart_axis_bottom_y} }
+ { \pgfpoint{\l__timechart_finish_x}{\l__timechart_axis_top_y} }
{ axis }
{ \c_false_bool }
- \group_end:
}
\cs_new:Npn\__timechart_axis_draw_minor_tick:N #1
{
\scope[/timechart/minor~tick]
\pgfpathmoveto{ \pgfpoint{#1}{0} }
- \pgfpathlineto{ \pgfpoint{#1}{\__timechart_minor_tick_length_pgf} }
+ \pgfpathlineto{
+ \pgfpoint{#1}{
+ \l__timechart_tick_orientation_pgf
+ *\__timechart_minor_tick_length_pgf
+ }
+ }
\pgfusepath{draw}
\endscope
}
@@ -461,20 +540,31 @@
\bool_if:NTF \l__timechart_tmpa_bool
{ \__timechart_axis_draw_zero_tick:N #1 }
{
- \__timechart_pgfmathsetbool:nn{\l__timechart_tmpb_bool}
- { #2==\__timechart_start_major_tick_year }
- \__timechart_pgfmathsetbool:nn{\l__timechart_tmpc_bool}
- { #2==\__timechart_finish_major_tick_year }
- \bool_set:Nn\l__timechart_tmpd_bool
- { \l__timechart_tmpb_bool || \l__timechart_tmpc_bool }
+ \int_case:nn { \l__timechart_major_tick_eras_int }
+ {
+ {0}{ \bool_set_false:N\l__timechart_tmpd_bool }
+ {1}{ \bool_set_true:N\l__timechart_tmpd_bool }
+ {2}
+ {
+ \__timechart_pgfmathsetbool:nn{\l__timechart_tmpb_bool}
+ { #2==\l__timechart_start_major_tick_year }
+ \__timechart_pgfmathsetbool:nn{\l__timechart_tmpc_bool}
+ { #2==\l__timechart_finish_major_tick_year }
+ \bool_set:Nn\l__timechart_tmpd_bool
+ { \l__timechart_tmpb_bool || \l__timechart_tmpc_bool }
+ }
+ }
\__timechart_axis_draw_major_tick:N #1
\__timechart_axis_draw_year_label:nnnnnn
{ #1 }
{ #2 }
{ \l__timechart_tmpd_bool }
- { mid~west }
+ { \l__timechart_tick_label_anchor_text }
{ 0 }
- { \__timechart_major_tick_length_pgf+1mm }
+ {
+ \l__timechart_tick_orientation_pgf
+ *(\__timechart_major_tick_length_pgf+1mm)
+ }
}
}
\cs_new:Npn\__timechart_axis_draw_major_tick:N #1
@@ -481,7 +571,12 @@
{
\scope[/timechart/major~tick]
\pgfpathmoveto{ \pgfpoint{#1}{0} }
- \pgfpathlineto{ \pgfpoint{#1}{\__timechart_major_tick_length_pgf} }
+ \pgfpathlineto{
+ \pgfpoint{#1}{
+ \l__timechart_tick_orientation_pgf
+ *\__timechart_major_tick_length_pgf
+ }
+ }
\pgfusepath{draw}
\endscope
}
@@ -493,6 +588,8 @@
\pgfmathsetlengthmacro{\r}{1mm}
\pgfmathsetlengthmacro{\t}{\r*(cos(\a)-cos(90-\a))/(1-cos(90-\a))}
\scope[/timechart/major~tick,line~join=miter]
+ \group_begin:
+ \pgftransformyscale{\l__timechart_tick_orientation_pgf}
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpoint{0}{\__timechart_major_tick_length_pgf}}
\pgfpatharc{0}{90-\a}{\t~and~\r}
@@ -501,21 +598,22 @@
\pgfpatharc{90+\a}{180-\a}{\t~and~\r}
\pgfpathlineto{\pgfpoint{0}{\__timechart_major_tick_length_pgf-1pt}}
\pgfusepath{draw}
+ \group_end:
\endscope
\__timechart_axis_draw_year_label:nnnnnn
{ 0 }
{ -1 }
{ \c_true_bool }
- { base~west }
+ { \l__timechart_zero_tick_before_label_anchor_text }
{ -.5mm }
- { 5.5mm }
+ { \l__timechart_tick_orientation_pgf*5.5mm }
\__timechart_axis_draw_year_label:nnnnnn
{ 0 }
{ 1 }
{ \c_true_bool }
- { north~west }
+ { \l__timechart_zero_tick_after_label_anchor_text }
{ .5mm }
- { 5.5mm }
+ { \l__timechart_tick_orientation_pgf*5.5mm }
\group_end:
}
\cs_new:Npn\__timechart_draw_axis_line
@@ -538,14 +636,14 @@
\bool_if:NTF\l__timechart_tmpa_bool
{ \cs_set_eq:NN\__timechart_make_year:n\timechartmakebeforeyear }
{ \cs_set_eq:NN\__timechart_make_year:n\timechartmakeafteryear }
- \__timechart_hsmash_pgfnode:nnnnn
- {rectangle}
- {#4}
- {\__timechart_make_year:n{\absyear}}
- {}
- {}
}
- { \pgfnode{rectangle}{#4}{\absyear}{}{} }
+ { \cs_set_eq:NN\__timechart_make_year:n\use:n }
+ \__timechart_hsmash_pgfnode:nnnnn
+ {rectangle}
+ {#4}
+ {\__timechart_make_year:n{\absyear}}
+ {}
+ {}
\endscope
\group_end:
}
More information about the tex-live-commits
mailing list.