-
Notifications
You must be signed in to change notification settings - Fork 0
/
chronos-lib-styles.sty
513 lines (512 loc) · 19.5 KB
/
chronos-lib-styles.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
% !TEX encoding = UTF-8 Unicode
%% Copyright 2023 Clea F. Rees
%
% 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 Clea F. Rees.
%
% This work consists of all files listed in manifest.txt.
%%
\RequirePackage{chronos}
\ProvidesPackageSVN{$Id: chronos-lib-styles.sty 9897 2023-11-28 03:07:45Z cfrees $}[\filebase \revinfo]
\pgfqkeys{/chronos}{%
% BEGIN styles XXX
% BEGIN on line styles
modern/.style={%
/chronos/.cd,
modern/.meaning to context,
colour scheme=modern,
no colour rotation,
timeline={%
dates=1500:1900,
timeline years=on line,
timeline line={chronos timeline background colour, opacity=1},
timeline height'=5mm,
timeline marks,
timeline border height'=5pt,
major step font=\sffamily\bfseries\small,
minor step font=\sffamily\bfseries\footnotesize,
eras font=\sffamily\bfseries,
timeline mark={line width=.4pt, shorten <=-2pt, shorten >=0pt},
timeline minor mark={line width=.2pt, shorten <=-2pt, shorten >=0pt},
},
every chronos connectors'=coordinate,
every text tag connectors+={circle, anchor=center, draw=none, fill=none, minimum size=\pgflinewidth},
connections={draw=##1, {Triangle[width=0pt 3,reversed,length=0pt 1.5]}-{Triangle[width=0pt 5,reversed,length=0pt 2.5]}},
period/line={fill=chronos timeline foreground colour, blend mode=overlay},
life/line={fill=chronos timeline foreground colour, blend mode=overlay},
event/line={draw=chronos timeline foreground colour, thick, blend mode=overlay},
every text tags={fill=chronos main background colour, text=####1, fill opacity=.75, text opacity=1, draw=none, rounded corners, align=center, font=\sffamily\footnotesize},
only years,
without eras,
connections on=background,
subheadings style={align=center, anchor=base, inner sep=0pt, outer sep=0pt, text=chronos main colour!75!chronos main background colour, opacity=.8, font=\sffamily\footnotesize},
headings style={align=center, anchor=base, inner sep=0pt, outer sep=0pt, text=chronos main colour!75!chronos main background colour, opacity=.8, font=\sffamily\bfseries\small},
main/frame={inner sep=5pt, ultra thick, draw=chronos main colour, fill=none,},% oedd chronos@prifliw@cefndir
main/title={/chronos/main/@frame, font=\sffamily\huge\bfseries, text=chronos main colour, anchor=center, align=center, draw=chronos main colour,ultra thick,drop shadow,fill=chronos main background colour,fill opacity=1},
headings drops'=10pt:10pt:7.5pt,
bce year label=BCE,
ce year label=CE,
levels=3:3,
},
lavender menace/.style={%
/chronos/.cd,
lavender menace/.meaning to context,
modern,
colour scheme=lavender,
rotate all colours,
every text tags+={draw=####1,sharp corners,text opacity=1,fill opacity=1,draw opacity=1,drop shadow},
period/line+={top color=chronosSilver,bottom color=chronos timeline border outer colour,fill opacity=1},
life/line+={top color=chronosSilver,bottom color=chronos timeline border outer colour,fill opacity=1},
main/title+={text=chronos main colour!75!chronosDarkGray},
},
serif on line/.style={%
/chronos/.cd,
serif on line/.meaning to context,
no colour rotation,
colour scheme=default,
text tag connectors'={fill=##1, opacity=1, circle, minimum size=2.5pt, anchor=center, inner sep=0pt, outer sep=0pt},
chronos connectors'={fill=##1, opacity=.75, circle, minimum size=2.5pt, anchor=center, inner sep=0pt, outer sep=0pt},
timeline ce label={CE},
timeline bce label={BCE},
special date=none,
timeline={%
start date={1800-01-01},
end date={1900-01-01},
timeline years=on line,
timeline marks,
timeline year={text=chronos timeline foreground colour, align=center},
timeline mark={draw=chronos timeline foreground colour, thick, shorten >=2.5pt},
timeline minor mark={draw=chronos timeline foreground colour, thick, shorten >=3.5pt},
timeline bare mark={draw=chronos timeline foreground colour, semithick, shorten >=2pt, shorten <=2pt},
minor years,
step divisions=2,
timeline line={chronos timeline background colour},
major step font=\normalfont\bfseries,
minor step font=\normalfont\bfseries\small,
eras font=\normalfont\bfseries,
},
headings style={text=chronos main colour!75!chronos main background colour, font=\footnotesize\uishape},
subheadings style={font=\scriptsize\uishape,text=chronos main colour!75!chronos main background colour},
event/text tag+={font=\small\scshape},
period/text tag+={font=\small\scshape},
life/text tag+={font=\small\scshape},
period/line+={fill=##1, fill opacity=.25},
life/line+={fill=##1, fill opacity=.25},
every text tags+={text=####1!75!black},% add global default o/w ignored (ond nid eisiau inner sep=0pt)
levels=3:3,
main/title={font=\Large\bfseries,text=chronos main colour,draw=none},
frame,
main/frame={draw=chronos timeline background colour, ultra thick},
},
rainbow serif/.style={%
/utils/exec={\selectcolormodel{rgb}},
/chronos/.cd,
rainbow serif/.meaning to context,
serif on line,
colour scheme=xcolseries,
rotate all colours,
timeline={%
dates=1500:2100,
timeline mark eras,
timeline bare marks=false,
},
only years,
without eras,
},
sober judge/.style={%
/chronos/.cd,
sober judge/.meaning to context,
colour scheme=sobriety,
timeline={%
start date=1001-10-01,
end date=1003-06-14,
step years=1,
step divisions=6,
timeline minor marks,
timeline bare marks,
},
ce year label=CE,
levels=3:3,
no colour rotation,
% period/line'={draw=##1,fill=none},
% life/line'={fill=none},
every connections'={draw=####1, -{Triangle[width=1.5pt, reversed, length=.75pt, fill=####1]}},
every text tags'={fill opacity=.75, fill=####1!25, draw=####1, rounded corners, font=\footnotesize\sffamily, text=chronos timeline foreground colour},
main/title={font=\sffamily\bfseries\LARGE, text=chronos main colour},
main/frame={draw=chronos main colour, line width=1pt, rounded corners},
headings style={font=\rmfamily\small\itshape,text=chronos main colour!75!chronos main background colour},
subheadings style={/chronos/@amseraumawr,font=\scriptsize\rmfamily\itshape},
every lines+={fill=none,draw=none},
},
% END on line styles
% BEGIN off line styles
somewhat plain/.style={%
/chronos/.cd,
somewhat plain/.meaning to context,
no colour rotation,
colour scheme=default,
timeline={%
major step font=\normalfont\sffamily\small\bfseries,
minor step font=\normalfont\sffamily\footnotesize,
eras font=\normalfont\normalsize\sffamily,
timeline width'=100mm,
timeline years=above,
timeline ce label={CE},
timeline bce label={BCE},
timeline margin'=12.5pt,
minor years=false,
start=-500,
end=2050,
timeline year={inner xsep=0pt},
},
special date=none,
ce year label={CE},
bce year label={BCE},
text tag yshift'=-10pt,
every text tags+={fill=chronos main background colour,fill opacity=.25,text opacity=1,font=\sffamily\small},
every connections+={draw=####1,{Triangle[width=0pt 3,reversed,length=0pt 1.5]}-{Triangle[width=0pt 3,reversed,length=0pt 1.5]}},
every event below,
every period below,
every life below,
levels=0:3,
frame,
headings style={font=\footnotesize\sffamily,text=chronos main colour!75!chronos main background colour},
subheadings style={/chronos/@amseraumawr,font=\scriptsize\sffamily},
main/frame={draw=chronos main colour!75!chronos main background colour,semithick},
main/title={/chronos/main/title lines={draw=chronos main colour!50!chronos main background colour,thick},text=chronos main colour!75!chronos main background colour,font=\Large\sffamily,},
headings drops'=12pt:10pt:7.5pt,
headings border'=30pt,
},
contemporary 90/.style={%
/chronos/.cd,
contemporary 90/.meaning to context,
colour scheme=contninety,
every text tags+={text=####1,font=\sffamily},
every lines+={line width=1pt},
no colour rotation,
timeline={%
start date=2002-01-01,
end date=2016-12-31,
timeline arrow,
conditional timeline arrow={%
timeline/timeline width-=3pt+4.5\timelineht,
timeline/timeline line+={shorten >={-3pt-4.5\timelineht}, -Stealth},
before headings+={%
\path (chronos post) -- +(3pt+4.5\timelineht,0pt);
},
}{},
timeline marks,
timeline minor marks,
timeline mark={ultra thick},
timeline minor mark={thick},
step divisions=4,
step major years=2,
timeline year={fill=none},
timeline margin'=5mm,
timeline width'=90mm,
timeline year={rotate=90},
major step font=\sffamily\upshape\tlstyle\bfseries,
minor step font=\sffamily\upshape\tlstyle,
eras font=\sffamily\upshape\tlstyle\bfseries,
timeline years=above,
timeline years anchor=west,
},
without eras,
every event below,
every life below,
every period below,
levels=0:3,
frame,
headings style={font=\small\sffamily\plstyle,text=chronos main colour!80!chronos main background colour},
subheadings style={font=\footnotesize\sffamily\plstyle,text=chronos main colour!60!chronos main background colour},
main/frame={double=chronos timeline foreground colour!25!chronos timeline background colour,draw=chronos timeline foreground colour!75!chronos timeline background colour,thin},
main/title={font=\sffamily\upshape\plstyle\bfseries\huge,text=chronos main colour},
},
blues below/.style={%
/utils/exec={\selectcolormodel{rgb}},
/chronos/.cd,
blues below/.meaning to context,
colour scheme=blues,
rotate all colours,
timeline={%
timeline years=above,
timeline marks,
timeline minor marks,
step minor year=50,
step divisions=10,
step major year=100,
dates=1550:2050,
timeline height'=3pt,
timeline line={chronos timeline foreground colour,double=chronos timeline background colour,line width=\timelineht/3,double distance=\timelineht/3},
timeline arrow,
conditional timeline arrow={%
timeline/timeline line+={Bar-Latex,shorten <=-\timelineht/3,shorten >=-3pt-2.1\timelineht},
timeline/timeline width-={3pt+2.43\timelineht},
before headings+={\path (chronos post) -- ++(3pt+2.1\timelineht,0pt) coordinate (chronos arrow tip) (chronos pre) -- ++(-\timelineht/3,0pt) coordinate (chronos arrow tail);},
}{},
timeline mark={chronos timeline foreground colour,line width=.6pt,shorten >=-4pt},
timeline minor mark={chronos timeline foreground colour,line width=.5pt,shorten >=-3.5pt},
timeline bare mark={chronos timeline foreground colour,line width=.3pt,shorten >=-2.5pt},
timeline year={fill=none,text=chronos timeline foreground colour,rotate around={45:(chronos year \chronosyeari |- chronos top)}},
major step font=\sffamily\footnotesize\tlstyle,
timeline years anchor=south west,
minor step font=\sffamily\scriptsize\tlstyle,
timeline margin'=17.5pt,
},
minor year format={!Y},
every event below,
every life below,
every period below,
levels=0:3,
headings style+={text=chronos main colour!75!chronos main background colour,font=\small\itshape\bfseries},
subheadings style+={text=chronos main colour!75!chronos main background colour,font=\footnotesize\itshape},
main/title+={font=\LARGE,text=chronos timeline foreground colour,draw=chronos timeline background colour,semithick},
main/frame+={thick,draw,chronos timeline foreground colour,double=chronos timeline background colour},
copyright={font=\footnotesize\sffamily, inner sep=0pt, outer sep=0pt, text=chronos timeline foreground colour!50!chronos main background colour},
copyright/rotate=90,
copyright/tag anchor=north west,
},
timeline year rotate/.code={%
},
flipping blues/.style={%
/chronos/.cd,
flipping blues/.meaning to context,
blues below,
timeline={%
timeline years=below,
timeline year={fill=none,rotate around={-90:(chronos year \chronosyeari)},text=chronos timeline foreground colour},
timeline years anchor=north west,
},
every event above,
every life above,
every period above,
levels=3:0,
},
rotated 45/.style={%
/chronos/.cd,
rotated 45/.meaning to context,
colour scheme=default,
rotate all colours,
timeline={%
start date={{-25}-01-01},
end date={20-01-01},
step major years=5,
timeline years=off line,
timeline years=above,
timeline marks,
timeline font=\scriptsize,
mark at era switch,
},
only text,
year format={!Y !E},
lines={draw=#1},
every text tags+={rotate=-45},
event/tag+={tag anchor=west},
period/tag+={tag anchor=west},
life/tag+={tag anchor=west},
text tag yshift'=2.5pt,
every event below,
every period below,
every life below,
no connectors,
no connections,
lines on=foreground,
frame,
every text tags+={font=\sffamily},
main/frame={draw=chronos main colour,rounded corners=10pt,thick},
main/title={draw=chronos main colour,rounded corners=3pt,semithick,font=\sffamily\LARGE},
headings style={font=\itshape\small\bfseries,text=chronos main colour!50!chronos main background colour},
subheadings style={font=\itshape\small,text=chronos timeline foreground colour!50!chronos timeline background colour},
},
off line colour/.style={% ateb: https://tex.stackexchange.com/a/324106/
/chronos/.cd,
off line colour/.meaning to context,
colour scheme=offlinebasic,
rotate all colours,
timeline={%
timeline width'=120mm,
timeline height'=3pt,
start date={-3000}-01-01,
end date={-2000}-01-01,
timeline font=\sffamily\tiny,
timeline year={text=chronos main colour},
timeline arrow,
conditional timeline arrow={%
timeline/timeline width-=#1,
timeline/timeline line+={%
shorten >={-#1}, -{Triangle Cap[length=#1]},
},
before headings+={%
\path (chronos post) -- +(#1,0pt);
},
}{},
timeline border height'=0pt,
step major years=100,
step minor years=0,
step divisions=0,
timeline years=below,
timeline marks,
timeline minor marks=false,
minor years=false,
timeline bare marks=false,
},
every text tags+={text=####1!75!black,font=\sffamily\scriptsize,fill=chronos main background colour,fill opacity=.75},
every connections+={draw=####1,{Triangle[width=0pt 3,reversed,length=0pt 1.5]}-{Triangle[width=0pt 3,reversed,length=0pt 1.5]}},
event/line'={},
year format={!q!Y},
event/date format={!q!Y},
main/title={font=\sffamily\Large,text=chronos timeline foreground colour},
chronos tikz+={%
\ifchronos@timeline@showyears
\scoped[on chronos middle ground layer]{\fill [chronos main background colour, fill opacity=.75] (chronos pre) -| (chronos post |- chronos phantom year.south) -| cycle ;}
\fi
},
},
off line colour/.default=20mm,
off line color/.forward to=/chronos/off line colour,
off line colour alt/.style={%
/chronos/.cd,
off line colour alt/.meaning to context,
off line colour=#1,
% use cronoleg colours
colour scheme=offlinealt,
rotate all colours,
event/colours below from clist={lliwiau_byw_isod},
event/colours above from clist={lliwiau_byw_uchod},
},
off line colour alt/.default=20mm,
off line color alt/.forward to=/chronos/off line colour alt,
off line simple/.style={% https://tex.stackexchange.com/a/324106/
/chronos/.cd,
off line simple/.meaning to context,
off line colour=#1,
rotate no colours,
},
off line simple/.default=20mm,
simple arrow/.style={% https://tex.stackexchange.com/a/342699/
/chronos/.cd,
simple arrow/.meaning to context,
timeline={%
start date={1-01-01},
end date={2000-01-01},
step major years=250,
timeline height'=2.5mm,
timeline years=off line,
timeline width'=200mm,
timeline arrow,
conditional timeline arrow={%
timeline/timeline width-=#1,
timeline/timeline line+={shorten >={-#1}, -{Triangle Cap[length=#1]}},
before headings+={%
\path (chronos post) -- +(#1,0pt);
},
}{},
mark at era switch=false,
},
date format={!d/!m/!Y},
every event below,
every period below,
every life below,
no colour rotation,
headings style={font=\footnotesize\itshape},
subheadings style={font=\scriptsize\itshape},
},
simple arrow/.default=10mm,
event splitter/.style={% https://tex.stackexchange.com/a/325890/
/chronos/.cd,
event splitter/.meaning to context,
no colour rotation,
timeline={%
start date=2014-01-13,
end date=2014-02-22,
timeline width'=150mm,
timeline margin'=0pt,
timeline era margin'=0pt,
timeline years=none,
timeline years=off line,
},
event/date format={!b !d \thinspace !Y},
event dates split,
text tag yshift'=3pt,
event text tag={font=\sffamily\small},
no connectors,
every event below,
main/title={font=\sffamily\Large},
frame,
main/frame={draw},
},
% END off line styles
% BEGIN no year styles
date centric/.style={%
/chronos/.cd,
date centric/.meaning to context,
timeline={%
timeline width'=150mm,
timeline height'=5mm,
start date=1935-01-01,
end date=2010-12-31,
timeline font=\sffamily\small,
timeline border height'=5pt,
},
event/text tag+={font=\sffamily\scriptsize, fill=none},
no colour rotation,
event/default colour=chronos main colour,
event years on line,
main/title+={font=\sffamily\LARGE,text=chronos main colour,/chronos/main/title lines={draw=chronos timeline background colour,line width=1.5pt}},
},
lines on line/.style={% https://tex.stackexchange.com/a/324453/
/chronos/.cd,
lines on line/.meaning to context,
rotate all colours,
timeline={%
timeline width'=120mm,
timeline height'=#1,
start date=01-01-01,
end date=2016-12-31,
timeline years=none,
timeline years=above,
timeline arrow,
conditional timeline arrow={%
timeline/timeline width'-=20mm,
timeline/timeline line+={shorten >=-20mm, -{Triangle Cap[length=20mm]}},
before headings+={%
\path (chronos post) -- +(20mm,0pt);
},
}{},
},
only years,
period/line+={line width=#1,draw=##1},
life/line+={line width=#1,draw=##1},
line yshift=.5*#1,
event/line+={semithick},
text tag yshift=2.5pt+.5*#1,
every event above,
every period below,
every life below,
headings style={font=\footnotesize\bfseries},
subheadings style={font=\footnotesize},
},
lines on line/.default=5mm,
plain arrow/.style={% https://tex.stackexchange.com/a/324453/
/chronos/.cd,
plain arrow/.meaning to context,
lines on line=#1,
line yshift'=1pt,
text tag yshift'=2.5pt,
period/line+={line width=2pt,draw=##1},
life/line+={line width=2pt,draw=##1},
},
plain arrow/.default=5mm,
% END no year styles
% END styles
}
\endinput