| 1 |
% \iffalse meta-comment |
| 2 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 3 |
% chronos.dtx |
| 4 |
% Additions and changes Copyright (C) 2024-2026 Clea F. Rees. |
| 5 |
% Code from skeleton.dtx Copyright (C) 2015-2024 Scott Pakin (see below). |
| 6 |
% |
| 7 |
% This work may be distributed and/or modified under the |
| 8 |
% conditions of the LaTeX Project Public License, either version 1.3c |
| 9 |
% of this license or (at your option) any later version. |
| 10 |
% The latest version of this license is in |
| 11 |
% https://www.latex-project.org/lppl.txt |
| 12 |
% and version 1.3c or later is part of all distributions of LaTeX |
| 13 |
% version 2008-05-04 or later. |
| 14 |
% |
| 15 |
% This work has the LPPL maintenance status 'muaintained'. |
| 16 |
% |
| 17 |
% The Current Maintainer of this work is Clea F. Rees. |
| 18 |
% |
| 19 |
% This work consists of all files listed in manifest.txt. |
| 20 |
% |
| 21 |
% The file chronos.dtx is a derived work under the terms of the |
| 22 |
% LPPL. It is based on version 2.4 of skeleton.dtx which is part of |
| 23 |
% dtxtut by Scott Pakin. A copy of dtxtut, including the |
| 24 |
% unmodified version of skeleton.dtx is available from |
| 25 |
% https://www.ctan.org/pkg/dtxtut and released under the LPPL. |
| 26 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 27 |
% \fi |
| 28 |
% |
| 29 |
%^^A preamble <<< |
| 30 |
% \iffalse |
| 31 |
%<*driver> |
| 32 |
\RequirePackage{svn-prov} |
| 33 |
% ref. ateb Max Chernoff: https://tex.stackexchange.com/a/723294/ |
| 34 |
\def\MakePrivateLetters{\makeatletter\ExplSyntaxOn\endlinechar13} |
| 35 |
\ExplSyntaxOff |
| 36 |
\ProvidesFileSVN{$Id: chronos-code.dtx 11797 2026-03-21 16:01:38Z cfrees $}[v0.9.4 \revinfo][\filebase DTX: Customisable TikZ-based timelines] |
| 37 |
\DefineFileInfoSVN[chronoscode] |
| 38 |
\let\chronoscodeversion\fileversion |
| 39 |
\let\chronoscodebase\filebase |
| 40 |
\let\chronoscodeinfo\fileinfo |
| 41 |
\let\chronoscodedate\filedate |
| 42 |
\let\chronoscodefilename\filename |
| 43 |
\documentclass[11pt,british]{ltxdoc} |
| 44 |
% l3doc loads fancyvrb |
| 45 |
% fancyvrb overwrites svn-prov's macros without warning |
| 46 |
% restore \fileversion \filerev in case we're using l3doc |
| 47 |
%^^A \GetFileInfoSVN{chronos} |
| 48 |
%^^A \title{\filebase} |
| 49 |
%^^A \author{Clea F. Rees\thanks{% |
| 50 |
%^^A Bug tracker: |
| 51 |
%^^A \href{https://codeberg.org/cfr/REPO/issues}{\url{codeberg.org/cfr/REPO/issues}} |
| 52 |
%^^A \textbar{} Code: |
| 53 |
%^^A \href{https://codeberg.org/cfr/REPO}{\url{codeberg.org/cfr/REPO}} |
| 54 |
%^^A \textbar{} Mirror: |
| 55 |
%^^A \href{https://github.com/cfr42/REPO}{\url{github.com/cfr42/REPO}}% |
| 56 |
%^^A }} |
| 57 |
%^^A \date{\fileversion~\filedate} |
| 58 |
\expandafter\newif\csname ifchronoscodetoo\endcsname |
| 59 |
\chronoscodetoofalse |
| 60 |
%^^A >>> preamble |
| 61 |
\begin{document} |
| 62 |
%^^A \let\MakePrivateLetters\MyMakePrivateLetters |
| 63 |
\DocInput{\chronoscodefilename} |
| 64 |
\end{document} |
| 65 |
%</driver> |
| 66 |
% \fi |
| 67 |
%^^A dogfen côd (cyflwyno) <<< |
| 68 |
% \changes{v0.9.1}{2025-03-05}{Minimal code documentation. |
| 69 |
% \lpack{docstrip} implementation.} |
| 70 |
% \changes{v0.9}{2025-02-27}{First \ctan{} release.} |
| 71 |
% ^^A lua will replace v0.0 and 0000/00/00 when tagging |
| 72 |
% \ifchronoscodetoo |
| 73 |
% \ProvidesFileSVN{$Id: chronos-code.dtx 11797 2026-03-21 16:01:38Z cfrees $}[v0.9.4 \revinfo] |
| 74 |
% \DefineFileInfoSVN[chronoscode] |
| 75 |
% \GetFileInfoSVN{chronoscode} |
| 76 |
% \let\chronoscodeversion\fileversion |
| 77 |
% \let\chronoscoderev\filerev |
| 78 |
% \let\chronoscodebase\filebase |
| 79 |
% \let\chronoscodeinfo\fileinfo |
| 80 |
% \let\chronoscodedate\filedate |
| 81 |
% \let\chronoscodefilename\filename |
| 82 |
% \fi |
| 83 |
% \title{\lpack{\chronosfilebase} code\thanks{% |
| 84 |
% This is file \texttt{\chronoscodefilename}.% |
| 85 |
% }% |
| 86 |
% } |
| 87 |
% \author{Clea F. Rees\thanks{% |
| 88 |
% Bug tracker: |
| 89 |
% \href{https://codeberg.org/cfr/chronos/issues}{\url{codeberg.org/cfr/chronos/issues}} |
| 90 |
% \textbar{} Code: |
| 91 |
% \href{https://codeberg.org/cfr/chronos}{\url{codeberg.org/cfr/chronos}} |
| 92 |
% \textbar{} Mirror: |
| 93 |
% \href{https://github.com/cfr42/chronos}{\url{github.com/cfr42/chronos}}% |
| 94 |
% }% |
| 95 |
% } |
| 96 |
%^^A \date{\chronoscodedate}% |
| 97 |
% \date{\chronoscodeversion\ (\textsc{svn} \chronoscoderev)}% |
| 98 |
% \maketitle |
| 99 |
% \addtocontents{part}{Implementation} |
| 100 |
% |
| 101 |
% \setlength{\parindent}{0pt} |
| 102 |
% \setlength{\parskip}{0.5em} |
| 103 |
% |
| 104 |
% \begin{abstract} |
| 105 |
% \noindent\lpack{\chronosfilebase} implementation. |
| 106 |
% \end{abstract} |
| 107 |
% |
| 108 |
% Note that part of this code was originally developed with no intention it should be published. |
| 109 |
% Much of this code is not written in English and much of the original user interface is similarly non-English. |
| 110 |
% Where this is the case, the code now supports English aliases of the original macros and keys. |
| 111 |
% However, although I have tried to provide translations of all useful comments, no doubt I have missed some. |
| 112 |
% I have also tried to provide some English indication regarding the purpose of commands and keys whose use is ‘obvious’ only if the name is understood. |
| 113 |
% These additions are currently very sparsely scattered, however, and you should probably complain by filing a bug if you are actually interested in what it is supposed to do\footnote{% |
| 114 |
% I've been told the main reason to document my code is for future-me. |
| 115 |
% I do not expect future me to require English translations \dots. |
| 116 |
% If you are not me, it would therefore be useful to let me know.% |
| 117 |
% }. |
| 118 |
% |
| 119 |
% \restoregeometry |
| 120 |
% \setlength\tewadjust{\marginparwidth+\marginparsep-\paperwidth+\textwidth+\oddsidemargin+1in}% |
| 121 |
% \pagestyle{fancy}% |
| 122 |
% \thispagestyle{fancyplain}% |
| 123 |
% \fancyheadoffset[lh]{\tewadjust}% |
| 124 |
%^^A doctools redefn of macrocode is singularly ineffective: |
| 125 |
%^^A the environment just ends up undefined |
| 126 |
%^^A so fallback to restored l3p's |
| 127 |
%^^A note that it causes problems with links to restore this in |
| 128 |
%^^A BEGINdocument |
| 129 |
%^^A and the redefn of environment just prints the name ... |
| 130 |
% \let\macrocode\chronosdocmacrocode |
| 131 |
% \let\endmacrocode\endchronosdocmacrocode |
| 132 |
% \let\environment\chronosdocenvironment |
| 133 |
% \let\endenvironment\endchronosdocenvironment |
| 134 |
% \let\OrigMakePrivateLetters\MakePrivateLetters |
| 135 |
%^^A \let\MakePrivateLetters\MyMakePrivateLetters |
| 136 |
% \ExplSyntaxOn |
| 137 |
% \cs_new:Npn \__chronosdoc_mpl: { |
| 138 |
% \char_set_catcode_letter:N \@\char_set_catcode_letter:N \_\char_set_catcode_letter:N \: |
| 139 |
% } |
| 140 |
% \cs_set_eq:NN \MakePrivateLetters \__chronosdoc_mpl: |
| 141 |
% \ExplSyntaxOff |
| 142 |
%^^A >>> dogfen côd (cyflwyno) |
| 143 |
% \iffalse |
| 144 |
%<*sty> |
| 145 |
% \fi |
| 146 |
% \section[chronos]{\lpack{chronos}}\label{sec:cod-pkg}%^^A <<< (pkg) |
| 147 |
% \LaTeXe{} package. |
| 148 |
% \begin{macrocode} |
| 149 |
\RequirePackage{svn-prov} |
| 150 |
\ProvidesPackageSVN[chronos.sty]{$Id: chronos-code.dtx 11797 2026-03-21 16:01:38Z cfrees $}[v0.9.4 \revinfo] |
| 151 |
\DefineFileInfoSVN[chronos] |
| 152 |
% \end{macrocode} |
| 153 |
% \iffalse |
| 154 |
% ^^A Paid â defnyddio \GetFileInfoSVN*/\GetFileInfoSVN{} yn y fan hon!! |
| 155 |
% \fi |
| 156 |
% \begin{macrocode} |
| 157 |
\NeedsTeXFormat{LaTeX2e}[2021-11-15] |
| 158 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 159 |
% \end{macrocode} |
| 160 |
% copied verbatim, excepting format from Joseph Wright's \path{siunitx.sty} under LPPL |
| 161 |
% \begin{macrocode} |
| 162 |
\@ifundefined{ExplLoaderFileDate}{% |
| 163 |
\RequirePackage{expl3}% |
| 164 |
}{} |
| 165 |
% \end{macrocode} |
| 166 |
% almost verbatim from \path{siunitx.sty} |
| 167 |
% \begin{macrocode} |
| 168 |
\@ifl@t@r\ExplLoaderFileDate{2022-02-24}{% |
| 169 |
}{% |
| 170 |
\PackageError{chronos}{Support package expl3 too old} |
| 171 |
{% |
| 172 |
You need to update your installation of the bundles 'l3kernel' and |
| 173 |
'l3packages'.\MessageBreak |
| 174 |
Loading~chronos~will~abort!% |
| 175 |
}% |
| 176 |
\endinput |
| 177 |
}% |
| 178 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 179 |
\ExplSyntaxOn |
| 180 |
\newif\ifchronos@enwaulliwsyml |
| 181 |
% \end{macrocode} |
| 182 |
% \begin{key}{simple colour names,simple color names,no simple colour names,no simple color names}%^^A <<< |
| 183 |
% Only a single option really. |
| 184 |
% \begin{macrocode} |
| 185 |
\keys_define:nn { chronos } %^^A <<< |
| 186 |
{ |
| 187 |
enwau~lliw~syml .legacy_if_set:n = chronos@enwaulliwsyml, |
| 188 |
enwau~lliw~syml .default:n = true, |
| 189 |
enwau~lliw~syml .initial:n = true, |
| 190 |
enwau~lliw~syml .usage:n = general, |
| 191 |
simple~colour~names .legacy_if_set:n = chronos@enwaulliwsyml, |
| 192 |
simple~colour~names .default:n = true, |
| 193 |
simple~colour~names .usage:n = general, |
| 194 |
simple~color~names .legacy_if_set:n = chronos@enwaulliwsyml, |
| 195 |
simple~color~names .default:n = true, |
| 196 |
simple~color~names .usage:n = general, |
| 197 |
dim~enwau~lliw~syml .legacy_if_set_inverse:n = chronos@enwaulliwsyml, |
| 198 |
dim~enwau~lliw~syml .default:n = true, |
| 199 |
dim~enwau~lliw~syml .usage:n = general, |
| 200 |
no~simple~colour~names .legacy_if_set_inverse:n = chronos@enwaulliwsyml, |
| 201 |
no~simple~colour~names .default:n = true, |
| 202 |
no~simple~colour~names .usage:n = general, |
| 203 |
no~simple~color~names .legacy_if_set_inverse:n = chronos@enwaulliwsyml, |
| 204 |
no~simple~color~names .default:n = true, |
| 205 |
no~simple~color~names .usage:n = general, |
| 206 |
} %^^A >>> |
| 207 |
% \end{macrocode} |
| 208 |
% \end{key}%^^A >>> |
| 209 |
% \begin{macro}{\IfFormatAtLeastTF}%^^A <<< |
| 210 |
% Joseph Wright: from \path{siunitx.sty} ; \url{https://chat.stackexchange.com/transcript/message/64327823#64327823} |
| 211 |
% \begin{macrocode} |
| 212 |
\providecommand \IfFormatAtLeastTF { \@ifl@t@r \fmtversion } |
| 213 |
% \end{macrocode} |
| 214 |
% \end{macro}%^^A >>> |
| 215 |
% \begin{macrocode} |
| 216 |
\IfFormatAtLeastTF { 2022-06-01 } |
| 217 |
{ |
| 218 |
\ProcessKeyOptions [ chronos ] |
| 219 |
}{ |
| 220 |
\RequirePackage { l3keys2e } |
| 221 |
\ProcessKeysOptions { chronos } |
| 222 |
} |
| 223 |
% \end{macrocode} |
| 224 |
%^^A if we require 2022-02-24 expl3 above what is this for? |
| 225 |
%^^A is it even possible to use that expl3 with somehow an older format? |
| 226 |
%^^A (wasn't expl3 in the format by then?) |
| 227 |
% \begin{macrocode} |
| 228 |
\IfFormatAtLeastTF { 2020-10-01 }{ |
| 229 |
}{ |
| 230 |
\RequirePackage { xparse } |
| 231 |
\providecommand \ExpandArgs [1] |
| 232 |
{ \cs_if_exist_use:c { exp_args:N #1 } } |
| 233 |
} |
| 234 |
\ExplSyntaxOff |
| 235 |
\RequirePackage{xcolor} |
| 236 |
% \end{macrocode} |
| 237 |
% A mae fixedpointarithmetic eisiau fp - fixedpointarithmetic needs fp |
| 238 |
% \begin{macrocode} |
| 239 |
\RequirePackage{tikz,etoolbox,pgfcalendar,calc,fp}% rwyt ti *eisiau* calc! |
| 240 |
\usetikzlibrary{arrows.meta,calc,positioning,fixedpointarithmetic,decorations.% |
| 241 |
text,fit,shadows} |
| 242 |
\IfFileExists{tikzlibrarycfrforeground.code.tex}{% |
| 243 |
\usetikzlibrary{cfrforeground}% |
| 244 |
}{% |
| 245 |
\usetikzlibrary{backgrounds}% |
| 246 |
} |
| 247 |
% \end{macrocode} |
| 248 |
%^^A BEGIN expl3 <<< |
| 249 |
% \begin{macrocode} |
| 250 |
\ExplSyntaxOn |
| 251 |
% \end{macrocode} |
| 252 |
%^^A BEGIN booleans |
| 253 |
% \begin{macrocode} |
| 254 |
\bool_new:N \l__chronos_byw_troi_bool |
| 255 |
\bool_new:N \l__chronos_digwyddiad_troi_bool |
| 256 |
\bool_new:N \l__chronos_parhad_troi_bool |
| 257 |
\bool_new:N \l__chronos_theori_troi_bool |
| 258 |
\bool_new:N \l__chronos_gwybodaeth_troi_bool |
| 259 |
\bool_new:N \l__chronos_troi_bool |
| 260 |
% \end{macrocode} |
| 261 |
%^^A END booleans |
| 262 |
%^^A BEGIN clists |
| 263 |
% \begin{macrocode} |
| 264 |
\clist_new:N \g__chronos_lliwiau_uchod_clist |
| 265 |
\clist_new:N \g__chronos_lliwiau_isod_clist |
| 266 |
\clist_new:N \g__chronos_lliwiau_byw_uchod_clist |
| 267 |
\clist_new:N \g__chronos_lliwiau_byw_isod_clist |
| 268 |
\clist_new:N \g__chronos_lliwiau_parhad_uchod_clist |
| 269 |
\clist_new:N \g__chronos_lliwiau_parhad_isod_clist |
| 270 |
\clist_new:N \g__chronos_lliwiau_digwyddiad_uchod_clist |
| 271 |
\clist_new:N \g__chronos_lliwiau_digwyddiad_isod_clist |
| 272 |
\clist_new:N \g__chronos_lliwiau_theori_uchod_clist |
| 273 |
\clist_new:N \g__chronos_lliwiau_theori_isod_clist |
| 274 |
\clist_new:N \g__chronos_lliwiau_uchod_rhag_clist |
| 275 |
\clist_new:N \g__chronos_lliwiau_isod_rhag_clist |
| 276 |
\clist_new:N \g__chronos_lliwiau_byw_uchod_rhag_clist |
| 277 |
\clist_new:N \g__chronos_lliwiau_byw_isod_rhag_clist |
| 278 |
\clist_new:N \g__chronos_lliwiau_parhad_uchod_rhag_clist |
| 279 |
\clist_new:N \g__chronos_lliwiau_parhad_isod_rhag_clist |
| 280 |
\clist_new:N \g__chronos_lliwiau_digwyddiad_uchod_rhag_clist |
| 281 |
\clist_new:N \g__chronos_lliwiau_digwyddiad_isod_rhag_clist |
| 282 |
\clist_new:N \g__chronos_lliwiau_theori_uchod_rhag_clist |
| 283 |
\clist_new:N \g__chronos_lliwiau_theori_isod_rhag_clist |
| 284 |
\clist_new:N \l__chronos_llythrennau_bach_clist |
| 285 |
\clist_set:Nn \l__chronos_llythrennau_bach_clist |
| 286 |
{ |
| 287 |
a, an, and, as, but, for, if, in, is, of, on, the |
| 288 |
} |
| 289 |
\clist_new:N \l__chronos_dyddiadau_coords_clist |
| 290 |
\clist_new:N \l__chronos_subheadings_clist |
| 291 |
\clist_new:N \g__chronos_century_subheadings_clist |
| 292 |
\clist_new:N \l__chronos_headings_clist |
| 293 |
\clist_new:N \l__chronos_tmpa_clist |
| 294 |
\clist_new:N \g__chronos_tmpa_clist |
| 295 |
\clist_new:N \l__chronos_tmpb_clist |
| 296 |
\clist_new:N \l__chronos_tmpc_clist |
| 297 |
% \end{macrocode} |
| 298 |
%^^A END clists |
| 299 |
%^^A BEGIN integers |
| 300 |
% \begin{macrocode} |
| 301 |
\int_gzero_new:N \g__chronos_int |
| 302 |
\int_new:N \l__chronos_tmpa_int |
| 303 |
\int_new:N \l__chronos_tmpb_int |
| 304 |
% \end{macrocode} |
| 305 |
%^^A END integers |
| 306 |
%^^A BEGIN prop |
| 307 |
% \begin{macrocode} |
| 308 |
\prop_new:N \l__chronos_byw_prop |
| 309 |
\prop_new:N \l__chronos_digwyddiad_prop |
| 310 |
\prop_new:N \l__chronos_gwybodaeth_prop |
| 311 |
\prop_new:N \l__chronos_parhad_prop |
| 312 |
\prop_new:N \l__chronos_theori_prop |
| 313 |
% \end{macrocode} |
| 314 |
%^^A \prop_new:N \l__chronos_cylchtheori_prop |
| 315 |
% \begin{macrocode} |
| 316 |
\prop_new:N \l__chronos_rhagosedig_prop |
| 317 |
\prop_new:N \l__chronos_prop |
| 318 |
\prop_new:N \l__chronos_tmpa_prop |
| 319 |
% \end{macrocode} |
| 320 |
%^^A END prop |
| 321 |
%^^A BEGIN regexes |
| 322 |
% \begin{macrocode} |
| 323 |
\regex_const:Nn \c__chronos_enw_regex { [^A-Za-z0-9\s\-] } |
| 324 |
\regex_const:Nn \c__chronos_enw_priflythren_cyntaf_regex { (^[^A-Za-z]*)([a-z]) } |
| 325 |
\regex_const:Nn \c__chronos_enw_diogelu_regex |
| 326 |
{ |
| 327 |
([\s\-\c{\\}][[:punct:]]*) ([^\s\-\c{\\}]*) (\b|\c{\\}) |
| 328 |
} % \s unrhyw space character \b word boundary |
| 329 |
% \end{macrocode} |
| 330 |
%^^A \regex_const:Nn \c__chronos_pure_year_regex { ^ [\+\-]? \d+ \z }% \z = \Z = $ ($ yn newid popeth i maths yn ôl Kile!) |
| 331 |
% \begin{macrocode} |
| 332 |
\regex_const:Nn \c__chronos_curly_bracket { [ \{ \} ] } |
| 333 |
\regex_const:Nn \c__chronos_initial_minus { ^\- } |
| 334 |
% \end{macrocode} |
| 335 |
%^^A END regexes |
| 336 |
%^^A BEGIN seq |
| 337 |
% \begin{macrocode} |
| 338 |
\seq_new:N \l__chronos_gosod_seq |
| 339 |
\seq_new:N \l__chronos_tmpa_seq |
| 340 |
% \end{macrocode} |
| 341 |
%^^A END seq |
| 342 |
%^^A BEGIN token lists |
| 343 |
% \begin{macrocode} |
| 344 |
\tl_new:N \l__chronos_lliw_tl |
| 345 |
\tl_new:N \l__chronos_date_tl |
| 346 |
\tl_new:N \l__chronos_dateformat_tl |
| 347 |
\tl_new:N \l__chronos_year_tl |
| 348 |
\tl_new:N \l__chronos_yearformat_tl |
| 349 |
\tl_new:N \l__chronos_minoryearformat_tl |
| 350 |
\tl_new:N \l__chronos_tikzname_tl |
| 351 |
\tl_set:Nn \l__chronos_dateformat_tl { !d/!m/!Y } |
| 352 |
\tl_set:Nn \l__chronos_yearformat_tl { !Y } |
| 353 |
\tl_set:Nn \l__chronos_minoryearformat_tl { !c } |
| 354 |
\tl_new:N \l__chronos_tmpa_tl |
| 355 |
\tl_new:N \l__chronos_tmpb_tl |
| 356 |
\tl_new:N \l__chronos_tmpc_tl |
| 357 |
\tl_new:N \l__chronos_tmpd_tl |
| 358 |
% \end{macrocode} |
| 359 |
%^^A END token lists |
| 360 |
% \begin{colkey}{foreground,background,timeline foreground,timeline background,timeline border outer,timeline border inner,timeline border middle,life,period,event,theory,info} |
| 361 |
% Colour keys handled by \lpack{l3keys}. |
| 362 |
% \begin{macrocode} |
| 363 |
\keys_define:nn { chronos / lliwiau }%^^A <<< |
| 364 |
{ |
| 365 |
foreground .code:n = {\__chronos_color_set_from_existing:nn |
| 366 |
{chronos@prifliw}{#1}}, |
| 367 |
foreground .groups:n = {core}, |
| 368 |
background .code:n = {\__chronos_color_set_from_existing:nn |
| 369 |
{chronos@prifliw@cefndir}{#1}}, |
| 370 |
background .groups:n = {core}, |
| 371 |
timeline ~ foreground .code:n = {\__chronos_color_set_from_existing:nn |
| 372 |
{chronos@lliw@llinell}{#1} |
| 373 |
}, |
| 374 |
timeline ~ foreground .groups:n = {core ~ derivative}, |
| 375 |
timeline ~ background .code:n = {\__chronos_color_set_from_existing:nn |
| 376 |
{chronos@lliw@cefndir@llinell}{#1}}, |
| 377 |
timeline ~ background .groups:n = {core ~ derivative}, |
| 378 |
timeline ~ border ~ outer .code:n = {\__chronos_color_set_from_existing:nn |
| 379 |
{chronos@borderouter}{#1}}, |
| 380 |
timeline ~ border ~ outer .groups:n = {core ~ border}, |
| 381 |
timeline ~ border ~ inner .code:n = {\__chronos_color_set_from_existing:nn |
| 382 |
{chronos@borderinner}{#1}}, |
| 383 |
timeline ~ border ~ inner .groups:n = {core ~ border}, |
| 384 |
timeline ~ border ~ middle .code:n = {\__chronos_color_set_from_existing:nn |
| 385 |
{chronos@bordermiddle}{#1}}, |
| 386 |
timeline ~ border ~ middle .groups:n = {core ~ border}, |
| 387 |
life / default .code:n = {\__chronos_color_set_from_existing:nn |
| 388 |
{chronos@byw@lliw@rhagosodedig}{#1}}, |
| 389 |
event / default .code:n = {\__chronos_color_set_from_existing:nn |
| 390 |
{chronos@digwyddiad@lliw@rhagosodedig}{#1}}, |
| 391 |
period / default .code:n = {\__chronos_color_set_from_existing:nn |
| 392 |
{chronos@parhad@lliw@rhagosodedig}{#1}}, |
| 393 |
theory / default .code:n = {\__chronos_color_set_from_existing:nn |
| 394 |
{chronos@theori@lliw@rhagosodedig}{#1}}, |
| 395 |
info / default .code:n = {\__chronos_color_set_from_existing:nn |
| 396 |
{chronos@gwybodaeth@lliw@rhagosodedig}{#1}}, |
| 397 |
% \end{macrocode} |
| 398 |
% \end{colkey} |
| 399 |
% \begin{collistkey}{default above,default below,life above,life below,event above,event below,period above,period below,theory above,theory below} |
| 400 |
% Colour list keys handled by \lpack{l3keys}. |
| 401 |
% \begin{macrocode} |
| 402 |
default ~ above .clist_gset:N = \g__chronos_lliwiau_uchod_clist, |
| 403 |
default ~ below .clist_gset:N = \g__chronos_lliwiau_isod_clist, |
| 404 |
life / above .clist_gset:N = \g__chronos_lliwiau_byw_uchod_clist, |
| 405 |
life / below .clist_gset:N = \g__chronos_lliwiau_byw_isod_clist, |
| 406 |
event / above .clist_gset:N = \g__chronos_lliwiau_digwyddiad_uchod_clist, |
| 407 |
event / below .clist_gset:N = \g__chronos_lliwiau_digwyddiad_isod_clist, |
| 408 |
period / above .clist_gset:N = \g__chronos_lliwiau_parhad_uchod_clist, |
| 409 |
period / below .clist_gset:N = \g__chronos_lliwiau_parhad_isod_clist, |
| 410 |
theory / above .clist_gset:N = \g__chronos_lliwiau_theori_uchod_clist, |
| 411 |
theory / below .clist_gset:N = \g__chronos_lliwiau_theori_isod_clist, |
| 412 |
}%^^A >>> |
| 413 |
% \end{macrocode} |
| 414 |
% \end{collistkey} |
| 415 |
%^^A BEGIN functions <<< |
| 416 |
%^^A BEGIN functions : dyddiadau <<< |
| 417 |
% YY yn lle YYYY |
| 418 |
% \begin{macrocode} |
| 419 |
\cs_new_protected_nopar:Npn \__chronos_year_shorten:n #1 |
| 420 |
{ |
| 421 |
\int_set:Nn \l__chronos_tmpa_int { \tl_count:n { #1 } } |
| 422 |
\int_compare:nTF |
| 423 |
{ |
| 424 |
\l__chronos_tmpa_int < 3 |
| 425 |
} |
| 426 |
{ |
| 427 |
#1 |
| 428 |
} |
| 429 |
{ |
| 430 |
\int_compare:nTF |
| 431 |
{ |
| 432 |
\l__chronos_tmpa_int < 4 |
| 433 |
} |
| 434 |
{ |
| 435 |
\__chronos_year_shorten_aux:w 0 #1 \q_stop |
| 436 |
} |
| 437 |
{ |
| 438 |
\__chronos_year_shorten_aux:w #1 \q_stop % expl3 manuaal, 46 |
| 439 |
} |
| 440 |
} |
| 441 |
} |
| 442 |
\cs_new_protected_nopar:Npn \__chronos_year_shorten_aux:w #1 #2 #3 #4 \q_stop |
| 443 |
{ |
| 444 |
#3 #4 |
| 445 |
} |
| 446 |
\cs_generate_variant:Nn \__chronos_year_shorten:n { V , v , e } |
| 447 |
\cs_new_protected_nopar:Npn \__chronos_year_semi_shorten:n #1 |
| 448 |
{ |
| 449 |
% \end{macrocode} |
| 450 |
%^^A \int_set:Nn \l__chronos_tmpb_int { \int_abs:n {#1} } |
| 451 |
%^^A \tl_set:Nx \l__chronos_tmpc_tl { \int_to_arabic:n { \l__chronos_tmpb_int } } |
| 452 |
% \begin{macrocode} |
| 453 |
\int_set:Nn \l__chronos_tmpa_int { \tl_count:n { #1 } } |
| 454 |
\int_compare:nTF |
| 455 |
{ |
| 456 |
\l__chronos_tmpa_int < 4 |
| 457 |
} |
| 458 |
{ |
| 459 |
#1 |
| 460 |
} |
| 461 |
{ |
| 462 |
% \end{macrocode} |
| 463 |
% \lpack{expl3} manual, 46 (w/\verb|q_stop|?) ; \S\,5.7 Unbraced |
| 464 |
% \begin{macrocode} |
| 465 |
\__chronos_year_semi_shorten_aux:w #1 \q_stop |
| 466 |
% \end{macrocode} |
| 467 |
%^^A \exp_last_unbraced:NV \__chronos_year_semi_shorten_aux:w \l__chronos_tmpc_tl \q_stop % expl3 manual, 46 (w/q_stop?) ; \S\,5.7 Unbraced Expansion: osgoi \exp_after:wN ble sy'n bosibl (\exp_args:N* yn well 'na \exp_last_unbraced:N*? wn i ddim sut i ddefnyddio hynny beth bynnag) |
| 468 |
%^^A \exp_after:wN \__chronos_year_semi_shorten_aux:w \l__chronos_tmpc_tl \q_stop % expl3 manuaal, 46 |
| 469 |
% \begin{macrocode} |
| 470 |
} |
| 471 |
} |
| 472 |
\cs_new_protected_nopar:Npn \__chronos_year_semi_shorten_aux:w #1 #2 #3 #4 \q_stop |
| 473 |
{ |
| 474 |
#2 #3 #4 |
| 475 |
} |
| 476 |
\cs_generate_variant:Nn \__chronos_year_semi_shorten:n { V , v , e } |
| 477 |
\cs_generate_variant:Nn \int_abs:n { v } |
| 478 |
\cs_generate_variant:Nn \tl_replace_all:Nnn { Nne } |
| 479 |
% \end{macrocode} |
| 480 |
% dangos dyddiadau \textbar{} show dates |
| 481 |
% |
| 482 |
% ateb Joseph Wright: \url{http://tex.stackexchange.com/a/327642/} ; PD/CCO at \url{https://tex.stackexchange.com/users/73/joseph-wright} |
| 483 |
% \begin{macrocode} |
| 484 |
\cs_new_protected_nopar:Npn \__chronos_show_date:n #1 |
| 485 |
{% |
| 486 |
\tl_set_eq:NN \l__chronos_date_tl \l__chronos_dateformat_tl |
| 487 |
\tl_replace_all:Nne \l__chronos_date_tl { !a } |
| 488 |
{ \pgfcalendarweekdayshortname{\thechronos@weekday} } |
| 489 |
\tl_replace_all:Nne \l__chronos_date_tl { !A } |
| 490 |
{ \pgfcalendarweekdayname{\thechronos@weekday} } |
| 491 |
\tl_replace_all:Nne \l__chronos_date_tl { !b } |
| 492 |
{ \pgfcalendarmonthshortname{\csname chronos@#1month\endcsname} } |
| 493 |
\tl_replace_all:Nne \l__chronos_date_tl { !B } |
| 494 |
{ \pgfcalendarmonthname{\csname chronos@#1month\endcsname} } |
| 495 |
\tl_replace_all:Nne \l__chronos_date_tl { !c } |
| 496 |
{ \__chronos_year_semi_shorten:e { \int_abs:v { chronos@#1year } } } |
| 497 |
\tl_replace_all:Nne \l__chronos_date_tl { !d } |
| 498 |
{ \csname chronos@#1day\endcsname } |
| 499 |
\tl_replace_all:Nne \l__chronos_date_tl { !E } |
| 500 |
{ \__chronos_dateformat_era:v { chronos@#1year } } |
| 501 |
\tl_replace_all:Nne \l__chronos_date_tl { !m } |
| 502 |
{ \csname chronos@#1month\endcsname } |
| 503 |
\tl_replace_all:Nne \l__chronos_date_tl { !q } |
| 504 |
{ \__chronos_dateformat_sign:v { chronos@#1year } } |
| 505 |
\tl_replace_all:Nne \l__chronos_date_tl { !Q } |
| 506 |
{ \__chronos_dateformat_signs:v { chronos@#1year } } |
| 507 |
\tl_replace_all:Nne \l__chronos_date_tl { !y } |
| 508 |
{ \__chronos_year_shorten:e { \int_abs:v { chronos@#1year } } } |
| 509 |
\tl_replace_all:Nne \l__chronos_date_tl { !Y } |
| 510 |
{ \int_abs:v { chronos@#1year } } |
| 511 |
\l__chronos_date_tl |
| 512 |
} |
| 513 |
\cs_new_protected_nopar:Npn \__chronos_show_year:n #1 |
| 514 |
{% ateb Joseph Wright: \url{http://tex.stackexchange.com/a/327642/} ; PD/CCO at \url{https://tex.stackexchange.com/users/73/joseph-wright} |
| 515 |
\tl_set_eq:NN \l__chronos_year_tl \l__chronos_yearformat_tl |
| 516 |
\tl_replace_all:Nne \l__chronos_year_tl { !c } |
| 517 |
{ \__chronos_year_semi_shorten:e { \int_abs:n { #1 } } } |
| 518 |
\tl_replace_all:Nne \l__chronos_year_tl { !E } |
| 519 |
{ \__chronos_dateformat_era:n { #1 } } |
| 520 |
\tl_replace_all:Nne \l__chronos_year_tl { !q } |
| 521 |
{ \__chronos_dateformat_sign:n { #1 } } |
| 522 |
\tl_replace_all:Nne \l__chronos_year_tl { !Q } |
| 523 |
{ \__chronos_dateformat_signs:n { #1 } } |
| 524 |
\tl_replace_all:Nne \l__chronos_year_tl { !y } |
| 525 |
{ \__chronos_year_shorten:e { \int_abs:n { #1 } } } |
| 526 |
\tl_replace_all:Nne \l__chronos_year_tl { !Y } |
| 527 |
{ \int_abs:n { #1 } } |
| 528 |
\l__chronos_year_tl |
| 529 |
} |
| 530 |
\cs_new_protected_nopar:Npn \__chronos_dateformat_sign:n #1 |
| 531 |
{ |
| 532 |
\int_compare:nT { #1 < 0 } { - } |
| 533 |
} |
| 534 |
\cs_generate_variant:Nn \__chronos_dateformat_sign:n { v } |
| 535 |
\cs_new_protected_nopar:Npn \__chronos_dateformat_signs:n #1 |
| 536 |
{ |
| 537 |
\int_compare:nTF |
| 538 |
{ #1 < 0 } { - } |
| 539 |
{ |
| 540 |
\int_compare:nT { #1 > 0 } |
| 541 |
{ |
| 542 |
+ |
| 543 |
} |
| 544 |
} |
| 545 |
} |
| 546 |
\cs_generate_variant:Nn \__chronos_dateformat_signs:n { v } |
| 547 |
\cs_new_protected_nopar:Npn \__chronos_dateformat_era:n #1 |
| 548 |
{ |
| 549 |
\int_compare:nTF |
| 550 |
{ #1 < 0 } { \chronos@yearbce } |
| 551 |
{ |
| 552 |
\int_compare:nT { #1 > 0 } |
| 553 |
{ |
| 554 |
\chronos@yearce |
| 555 |
} |
| 556 |
} |
| 557 |
} |
| 558 |
\cs_generate_variant:Nn \__chronos_dateformat_era:n { v } |
| 559 |
\cs_new_protected_nopar:Npn \__chronos_set_dateformat:n #1 |
| 560 |
{ |
| 561 |
\tl_set:Nn \l__chronos_dateformat_tl { #1 } |
| 562 |
\tl_replace_all:Nnn \l__chronos_dateformat_tl { ~ } { \c_space_token } |
| 563 |
} |
| 564 |
\cs_generate_variant:Nn \__chronos_set_dateformat:n { v } |
| 565 |
\cs_new_protected_nopar:Npn \__chronos_set_yearformat:n #1 |
| 566 |
{ |
| 567 |
\tl_set:Nn \l__chronos_yearformat_tl { #1 } |
| 568 |
\tl_replace_all:Nnn \l__chronos_yearformat_tl { ~ } { \c_space_token } |
| 569 |
} |
| 570 |
\cs_generate_variant:Nn \__chronos_set_yearformat:n { V } |
| 571 |
\cs_new_protected_nopar:Npn \__chronos_set_minoryearformat:n #1 |
| 572 |
{ |
| 573 |
\tl_set:Nn \l__chronos_minoryearformat_tl { #1 } |
| 574 |
\tl_replace_all:Nnn \l__chronos_minoryearformat_tl { ~ } { \c_space_token } |
| 575 |
} |
| 576 |
\cs_generate_variant:Nn \__chronos_set_minoryearformat:n { V } |
| 577 |
\cs_generate_variant:Nn \regex_match:NnTF { NVTF } |
| 578 |
\cs_new_protected_nopar:Nn \__chronos_set_date_aux:n |
| 579 |
{ |
| 580 |
\tl_set:Ne \l__chronos_tmpc_tl { #1 } |
| 581 |
\regex_replace_all:NnN \c__chronos_curly_bracket {} \l__chronos_tmpc_tl |
| 582 |
\regex_match:NVTF \c__chronos_initial_minus \l__chronos_tmpc_tl |
| 583 |
{ |
| 584 |
\exp_last_unbraced:NV \__chronos_set_date_aux_bce:w \l__chronos_tmpc_tl \q_stop |
| 585 |
}{ |
| 586 |
\exp_last_unbraced:NV \__chronos_set_date_aux_ce:w \l__chronos_tmpc_tl \q_stop |
| 587 |
} |
| 588 |
} |
| 589 |
\cs_new_protected_nopar:Nn \__chronos_set_date:nnnn |
| 590 |
{ |
| 591 |
\pgfcalendardatetojulian{{#1}-#2-#3}{\c@chronos@date}% |
| 592 |
\setcounter{chronos@#4date}{\thechronos@date}% |
| 593 |
\legacy_if:nF { chronos@yearzero } |
| 594 |
{ |
| 595 |
\int_compare:nNnT { 0 } < { #1 } |
| 596 |
{ |
| 597 |
\addtocounter{chronos@#4date}{-366}% |
| 598 |
} |
| 599 |
} |
| 600 |
\expandafter\def\csname chronos@#4year\endcsname{#1}% |
| 601 |
\expandafter\def\csname chronos@#4month\endcsname{#2}% |
| 602 |
\expandafter\def\csname chronos@#4day\endcsname{#3}% |
| 603 |
} |
| 604 |
\cs_new_protected_nopar:Npn \__chronos_set_date_aux_bce:w -#1 - #2 - #3 - #4 @#5 \q_stop |
| 605 |
{ |
| 606 |
\__chronos_set_date:nnnn {-#1} {#2} {#3} {#5} |
| 607 |
} |
| 608 |
\cs_new_protected_nopar:Npn \__chronos_set_date_aux_ce:w #1 - #2 - #3 - #4 @#5 \q_stop |
| 609 |
{ |
| 610 |
\__chronos_set_date:nnnn {#1} {#2} {#3} {#5} |
| 611 |
} |
| 612 |
% \end{macrocode} |
| 613 |
%^^A END functions : dyddiadau >>> |
| 614 |
%^^A BEGIN functions : lliwiau <<< |
| 615 |
% \begin{macrocode} |
| 616 |
\cs_new_protected_nopar:Nn \__chronos_troilliwiau:nn |
| 617 |
{ |
| 618 |
\clist_if_empty:cTF { g__chronos_lliwiau_#1_#2_clist } |
| 619 |
{ |
| 620 |
\clist_gpop:cN { g__chronos_lliwiau_#2_clist } \l__chronos_lliw_tl |
| 621 |
\clist_gput_right:cV { g__chronos_lliwiau_#2_clist } \l__chronos_lliw_tl |
| 622 |
}{ |
| 623 |
\clist_gpop:cN { g__chronos_lliwiau_#1_#2_clist } \l__chronos_lliw_tl |
| 624 |
\clist_gput_right:cV { g__chronos_lliwiau_#1_#2_clist } \l__chronos_lliw_tl |
| 625 |
} |
| 626 |
} |
| 627 |
\cs_new_nopar:Nn \__chronos_color_set_from_existing:nn { \colorlet {#1} {#2} } |
| 628 |
% \end{macrocode} |
| 629 |
%^^A \cs_new_protected_nopar:Nn \__chronos_darparu_lliw:nn |
| 630 |
%^^A { |
| 631 |
%^^A \color_if_exist:nF { #1 } { \color_set_eq:nn { #1 } { #2 } } |
| 632 |
%^^A } |
| 633 |
%^^A \cs_generate_variant:Nn \__chronos_darparu_lliw:nn { Vn } |
| 634 |
%^^A END functions : lliwiau >>> |
| 635 |
%^^A BEGIN functions : enwau <<< |
| 636 |
% \begin{macrocode} |
| 637 |
\cs_new_protected_nopar:Nn \__chronos_creu_tikzname:n |
| 638 |
{ |
| 639 |
\int_compare:nTF { \tl_count:n { #1 } < 2 } |
| 640 |
% \end{macrocode} |
| 641 |
% expand unwaith os llai na 2 token yn \#1 (gallu defnyddio pgffor loops i greu digwyddiadau etc.) |
| 642 |
% |
| 643 |
% expand once if fewer than 2 tokens in \#1 (can use \lpack{pgffor} loops to create events etc.) |
| 644 |
% \begin{macrocode} |
| 645 |
{ |
| 646 |
\tl_set:No \l__chronos_tikzname_tl { #1 } |
| 647 |
% \end{macrocode} |
| 648 |
% fel arall, peidio i ddiogelu macros fformatio (e.e. \cs{emph}{} etc.) |
| 649 |
% |
| 650 |
% otherwise, don't protect formatting macros (e.g.~\cs{emph}{} etc.) |
| 651 |
% |
| 652 |
% (what did I mean by this?) |
| 653 |
% \begin{macrocode} |
| 654 |
}{ |
| 655 |
\tl_set:Nn \l__chronos_tikzname_tl { #1 } |
| 656 |
} |
| 657 |
\regex_replace_all:NnN \c__chronos_enw_regex { } \l__chronos_tikzname_tl |
| 658 |
} |
| 659 |
\cs_new_protected_nopar:Nn \__chronos_enw_priflythrennu_eraill:n |
| 660 |
{ |
| 661 |
\clist_if_in:NnTF \l__chronos_llythrennau_bach_clist { #1 } { #1 } |
| 662 |
{ |
| 663 |
\str_uppercase:n #1 |
| 664 |
} |
| 665 |
} |
| 666 |
\cs_new_protected_nopar:Nn \__chronos_enw_priflythrennu:n |
| 667 |
{ |
| 668 |
\tl_set:Nn \l__chronos_tmpc_tl { #1 } |
| 669 |
\legacy_if:nF {chronos@felymae} |
| 670 |
{ |
| 671 |
\regex_replace_all:NnN \c__chronos_enw_diogelu_regex |
| 672 |
{ |
| 673 |
\1 \c{__chronos_enw_priflythrennu_eraill:n} \cB{ \2 \cE} \3 |
| 674 |
} \l__chronos_tmpc_tl |
| 675 |
\regex_replace_all:NnN \c__chronos_enw_priflythren_cyntaf_regex |
| 676 |
{ |
| 677 |
\1 \c{str_uppercase:n}\2 |
| 678 |
} \l__chronos_tmpc_tl |
| 679 |
} |
| 680 |
\l__chronos_tmpc_tl |
| 681 |
} |
| 682 |
\cs_generate_variant:Nn \__chronos_enw_priflythrennu:n { V,o } |
| 683 |
% \end{macrocode} |
| 684 |
%^^A END functions : enwau >>> |
| 685 |
%^^A BEGIN functions: containment |
| 686 |
% functions: containment |
| 687 |
% \begin{macrocode} |
| 688 |
\cs_new_protected_nopar:Nn \__chronos_at_begin: %^^A <<< functions: containment |
| 689 |
{ |
| 690 |
\cs_set_eq:NN \chronosset \@@chronosset |
| 691 |
\pgfsetlayers{\chronos@layers}% cadw newidiadau tu mewn i'r grwp |
| 692 |
\chronos@baselineskip=\baselineskip |
| 693 |
\cs_if_free:NT \chronosbaselineskip |
| 694 |
{ |
| 695 |
\cs_new_eq:NN \chronosbaselineskip \chronos@baselineskip |
| 696 |
} |
| 697 |
\int_gincr:N \g__chronos_int |
| 698 |
} %^^A >>> functions: containment |
| 699 |
% \end{macrocode} |
| 700 |
%^^A BEGIN functions: pgf keys <<< |
| 701 |
% \lpack{pgfkeys} |
| 702 |
%^^A BEGIN functions: pgf keys (prop) |
| 703 |
% \begin{macrocode} |
| 704 |
\cs_new_protected_nopar:Nn \__chronos_cadw_nodweddion:nnn |
| 705 |
{% #1: tag #2 key #3 key-value list |
| 706 |
\prop_put:cnn { l__chronos_#1_prop } { #2 } { {#3} } |
| 707 |
} |
| 708 |
\cs_new_protected_nopar:Nn \__chronos_cadw_nodweddion_rhag:nn |
| 709 |
{% #1: tag #2 key #3 key-value list |
| 710 |
\prop_put:Nnn \l__chronos_prop { #1 } { {#2} } |
| 711 |
} |
| 712 |
\cs_generate_variant:Nn \prop_put_from_keyval:Nn { cV } |
| 713 |
\cs_new_protected_nopar:Nn \__chronos_cadw_nodweddion_rhestr:nnn |
| 714 |
{ |
| 715 |
\clist_map_inline:nn { #1 } |
| 716 |
{ |
| 717 |
\prop_put:cnn { l__chronos_##1_prop } { #2 } { {#3} } |
| 718 |
} |
| 719 |
} |
| 720 |
\cs_new_protected_nopar:Nn \__chronos_ychwanegu_nodweddion:nnn |
| 721 |
{ % roedd y problem yn #3 yn eisoes! |
| 722 |
\prop_get:cnNTF { l__chronos_#1_prop } { #2 } \l__chronos_tmpc_tl |
| 723 |
{ |
| 724 |
\tl_set:Nn \l__chronos_tmpd_tl { #3 } |
| 725 |
\regex_replace_all:nnN { \\ } { \\\\ } \l__chronos_tmpd_tl |
| 726 |
\regex_replace_once:nnN { \}\z } { , \u{l__chronos_tmpd_tl} \} } \l__chronos_tmpc_tl |
| 727 |
\prop_put:cnV { l__chronos_#1_prop } { #2 } \l__chronos_tmpc_tl |
| 728 |
}{ |
| 729 |
\prop_put:cnn { l__chronos_#1_prop } { #2 } { {#3} } |
| 730 |
} |
| 731 |
} |
| 732 |
\cs_new_protected_nopar:Nn \__chronos_ychwanegu_nodweddion_rhestr:nnn |
| 733 |
{ % ## #1 rhestr o prop lists; #2 property; #3 value |
| 734 |
\clist_map_inline:nn { #1 } |
| 735 |
{ |
| 736 |
\prop_get:cnNTF { l__chronos_##1_prop } { #2 } \l__chronos_tmpc_tl |
| 737 |
{ |
| 738 |
\tl_set:Nn \l__chronos_tmpd_tl { #3 } |
| 739 |
\regex_replace_all:nnN { \\ } { \\\\ } \l__chronos_tmpd_tl |
| 740 |
\regex_replace_once:nnN { \}\z } { , \u{l__chronos_tmpd_tl} \} } \l__chronos_tmpc_tl |
| 741 |
\prop_put:cnV { l__chronos_##1_prop } { #2 } \l__chronos_tmpc_tl |
| 742 |
}{ |
| 743 |
\prop_put:cnn { l__chronos_##1_prop } { #2 } { {#3} } |
| 744 |
} |
| 745 |
} |
| 746 |
} |
| 747 |
\cs_new_protected_nopar:Nn \__chronos_ychwanegu_nodweddion_rhestr_pre:nnn |
| 748 |
{ % ## #1 rhestr o prop lists; #2 property; #3 value |
| 749 |
\clist_map_inline:nn { #1 } |
| 750 |
{ |
| 751 |
\prop_get:cnNTF { l__chronos_##1_prop } { #2 } \l__chronos_tmpc_tl |
| 752 |
{ |
| 753 |
\tl_set:Nn \l__chronos_tmpd_tl { #3 } |
| 754 |
\regex_replace_all:nnN { \\ } { \\\\ } \l__chronos_tmpd_tl |
| 755 |
\regex_replace_once:nnN { ^\{ } { \{ \u{l__chronos_tmpd_tl} , } \l__chronos_tmpc_tl |
| 756 |
\prop_put:cnV { l__chronos_##1_prop } { #2 } \l__chronos_tmpc_tl |
| 757 |
}{ |
| 758 |
\prop_put:cnn { l__chronos_##1_prop } { #2 } { {#3} } |
| 759 |
} |
| 760 |
} |
| 761 |
} |
| 762 |
\cs_new_protected_nopar:Nn \__chronos_ychwanegu_nodweddion_rhag:nn |
| 763 |
{ |
| 764 |
\prop_get:cnNTF { l__chronos_prop } { #1 } \l__chronos_tmpc_tl |
| 765 |
{ |
| 766 |
\tl_set:Nn \l__chronos_tmpd_tl { #2 } |
| 767 |
\regex_replace_all:nnN { \\ } { \\\\ } \l__chronos_tmpd_tl |
| 768 |
% \end{macrocode} |
| 769 |
%^^A \regex_replace_all:nnN { ( \cP ) } { \1\1 } \l__chronos_tmpd_tl |
| 770 |
% \begin{macrocode} |
| 771 |
\regex_replace_once:nnN { \}\z } { , \u{l__chronos_tmpd_tl} \} } \l__chronos_tmpc_tl |
| 772 |
\prop_put:NnV \l__chronos_prop { #1 } \l__chronos_tmpc_tl |
| 773 |
}{ |
| 774 |
\prop_put:Nnn \l__chronos_prop { #1 } { {#2} } |
| 775 |
} |
| 776 |
} |
| 777 |
\cs_new_protected_nopar:Nn \__chronos_ychwanegu_nodweddion_rhag_pre:nn |
| 778 |
{ |
| 779 |
\prop_get:cnNTF { l__chronos_prop } { #1 } \l__chronos_tmpc_tl |
| 780 |
{ |
| 781 |
\tl_set:Nn \l__chronos_tmpd_tl { #2 } |
| 782 |
\regex_replace_all:nnN { \\ } { \\\\ } \l__chronos_tmpd_tl |
| 783 |
\regex_replace_once:nnN { ^\{ } { \{ \u{l__chronos_tmpd_tl} , } \l__chronos_tmpc_tl |
| 784 |
\prop_put:NnV \l__chronos_prop { #1 } \l__chronos_tmpc_tl |
| 785 |
}{ |
| 786 |
\prop_put:Nnn \l__chronos_prop { #1 } { {#2} } |
| 787 |
} |
| 788 |
} |
| 789 |
\cs_generate_variant:Nn \prop_concat:NNN { NNc } |
| 790 |
\cs_new_protected_nopar:Nn \__chronos_gosod_nodweddion:n |
| 791 |
{ |
| 792 |
% \end{macrocode} |
| 793 |
% cadw status \textbar{} save status |
| 794 |
% \begin{macrocode} |
| 795 |
\prop_set_eq:NN \l__chronos_rhagosedig_prop \l__chronos_prop |
| 796 |
\prop_concat:NNc \l__chronos_tmpa_prop \l__chronos_prop { l__chronos_#1_prop } |
| 797 |
\prop_set_eq:NN \l__chronos_prop \l__chronos_tmpa_prop |
| 798 |
\prop_map_function:NN \l__chronos_prop \__chronos_tikzset:nn |
| 799 |
} |
| 800 |
\cs_generate_variant:Nn \__chronos_gosod_nodweddion:n { V } |
| 801 |
\cs_new_protected_nopar:Nn \__chronos_ailosod_nodweddion: |
| 802 |
{ |
| 803 |
\prop_set_eq:NN \l__chronos_prop \l__chronos_rhagosedig_prop |
| 804 |
\prop_map_function:NN \l__chronos_prop \__chronos_tikzset:nn |
| 805 |
} |
| 806 |
\cs_new_protected_nopar:Nn \__chronos_dangos_nodweddion:n |
| 807 |
{ |
| 808 |
\str_case:nnF { #1 } |
| 809 |
{ |
| 810 |
{ life } { \prop_show:N \l__chronos_byw_prop } |
| 811 |
{ event } { \prop_show:N \l__chronos_digwyddiad_prop } |
| 812 |
{ period } { \prop_show:N \l__chronos_parhad_prop } |
| 813 |
{ theory } { \prop_show:N \l__chronos_theori_prop } |
| 814 |
{ info } { \prop_show:N \l__chronos_gwybodaeth_prop } |
| 815 |
}{ |
| 816 |
\prop_show:c { l__chronos_#1_prop } |
| 817 |
} |
| 818 |
} |
| 819 |
\cs_new_protected_nopar:Nn \__chronos_dangos_nodweddion_rhag: |
| 820 |
{ |
| 821 |
\prop_show:N \l__chronos_prop |
| 822 |
} |
| 823 |
\cs_new_protected_nopar:Nn \__chronos_tikzset:nn |
| 824 |
{% \pgfqkeys{#1}{#2} = \pgfkeys{#1/.cd}{#2} ond yn gyflymach (Skillman a t 977) |
| 825 |
\pgfqkeys {/chronos} { #1/.style = #2 } |
| 826 |
} |
| 827 |
% \end{macrocode} |
| 828 |
%^^A END functions: pgf keys (prop) |
| 829 |
%^^A BEGIN functions: pgf keys (lliwiau) |
| 830 |
% \begin{macrocode} |
| 831 |
\cs_new_protected_nopar:Nn \__chronos_lliwiau_cadw_rhag: |
| 832 |
{ |
| 833 |
\clist_map_inline:nn { byw, digwyddiad, parhad, theori } |
| 834 |
{ |
| 835 |
\clist_map_inline:nn { isod, uchod } |
| 836 |
{ |
| 837 |
\clist_gset_eq:cc { g__chronos_lliwiau_##1_####1_rhag_clist } |
| 838 |
{ |
| 839 |
g__chronos_lliwiau_##1_####1_clist |
| 840 |
} |
| 841 |
} |
| 842 |
} |
| 843 |
\clist_gset_eq:NN \g__chronos_lliwiau_isod_rhag_clist \g__chronos_lliwiau_isod_clist |
| 844 |
\clist_gset_eq:NN \g__chronos_lliwiau_uchod_rhag_clist \g__chronos_lliwiau_uchod_clist |
| 845 |
} |
| 846 |
\cs_new_protected_nopar:Nn \__chronos_lliwiau_clirio: |
| 847 |
{ |
| 848 |
\clist_map_inline:nn { byw, digwyddiad, parhad, theori } |
| 849 |
{ |
| 850 |
\clist_map_inline:nn { isod, uchod } |
| 851 |
{ |
| 852 |
\clist_gset_eq:cc { g__chronos_lliwiau_##1_####1_clist } |
| 853 |
{ |
| 854 |
g__chronos_lliwiau_##1_####1_rhag_clist |
| 855 |
} |
| 856 |
} |
| 857 |
} |
| 858 |
\clist_gset_eq:NN \g__chronos_lliwiau_isod_clist \g__chronos_lliwiau_isod_rhag_clist |
| 859 |
\clist_gset_eq:NN \g__chronos_lliwiau_uchod_clist \g__chronos_lliwiau_uchod_rhag_clist |
| 860 |
} |
| 861 |
% \end{macrocode} |
| 862 |
%^^A END functions: pgf keys (lliwiau) |
| 863 |
%^^A BEGIN functions: pgf keys (headings) |
| 864 |
% \begin{macrocode} |
| 865 |
\cs_new_protected_nopar:Nn \__chronos_at_end: |
| 866 |
{ |
| 867 |
\clist_if_empty:NF \l__chronos_headings_clist |
| 868 |
{ |
| 869 |
\clist_remove_duplicates:N \l__chronos_headings_clist |
| 870 |
\clist_map_inline:Nn \l__chronos_headings_clist |
| 871 |
{ |
| 872 |
\foreach \i/\j/\k in {##1} {% |
| 873 |
\testunteitl[/chronos/@amseraumawr]{\i}{\j}{\k}(chronos ~ main ~ headings)}%^^A paid â defnyddio ';' neu dim byd yma |
| 874 |
\legacy_if:nT { chronos@placeholders} |
| 875 |
{ |
| 876 |
\scoped[on ~ chronos ~ foreground ~ layer] |
| 877 |
{ |
| 878 |
\foreach \i/\j/\k in {##1} {\draw [/chronos/placeholder ~ lines] % |
| 879 |
(chronos ~ main ~ headings -| \j) edge ~ node {\j} % |
| 880 |
(chronos ~ bottom -| \j) (chronos ~ main ~ headings -| \k) % |
| 881 |
edge ~ node {\k} (chronos ~ bottom -| \k);} |
| 882 |
} |
| 883 |
} |
| 884 |
} |
| 885 |
} |
| 886 |
\clist_if_empty:NF \l__chronos_subheadings_clist |
| 887 |
{ |
| 888 |
\clist_remove_duplicates:N \l__chronos_subheadings_clist |
| 889 |
\clist_map_inline:Nn \l__chronos_subheadings_clist |
| 890 |
{ |
| 891 |
\foreach \i/\j/\k/\m in {##1} {\testunteitl[/chronos/@amserau]{\i}{\j}{\k}(\m)}%^^A paid â defnyddio ';' neu dim byd yn y fan hon |
| 892 |
} |
| 893 |
} |
| 894 |
\clist_if_empty:NF \g__chronos_century_subheadings_clist |
| 895 |
{ |
| 896 |
\clist_remove_duplicates:N \g__chronos_century_subheadings_clist |
| 897 |
\clist_map_inline:Nn \g__chronos_century_subheadings_clist |
| 898 |
{ |
| 899 |
\seq_set_split:Nnn \l__chronos_tmpa_seq { / } { ##1 } |
| 900 |
\seq_get_left:NN \l__chronos_tmpa_seq \l__chronos_tmpc_tl |
| 901 |
\seq_get_right:NN \l__chronos_tmpa_seq \l__chronos_tmpd_tl |
| 902 |
\int_set:Nn \l__chronos_tmpb_int { 100 * \l__chronos_tmpc_tl } |
| 903 |
\int_set:Nn \l__chronos_tmpa_int { \l__chronos_tmpb_int - 100 } |
| 904 |
\testunteitl[/chronos/@amserau]{\l__chronos_tmpc_tl\l__chronos_tmpd_tl}% |
| 905 |
[\l__chronos_tmpc_tl\textsuperscript{\l__chronos_tmpd_tl}c.]% |
| 906 |
{chronos ~ year ~ \int_to_arabic:n {\l__chronos_tmpa_int}}% |
| 907 |
{chronos ~ year ~ \int_to_arabic:n {\l__chronos_tmpb_int}}% |
| 908 |
(chronos ~ lower ~ subheadings)% paid â defnyddio ';' neu dim byd yn y fan hon |
| 909 |
} |
| 910 |
} |
| 911 |
} |
| 912 |
% \end{macrocode} |
| 913 |
%^^A END functions: pgf keys (headings) |
| 914 |
%^^A BEGIN functions: pgf keys (keys) |
| 915 |
% \verb|\__chronos_kex|\meta{whatever} functions just produce groups of pgf keys for the plain/prime/plus triple, standard/every, cy/en and combinations thereof |
| 916 |
% |
| 917 |
% tldr: reduce clutter/typing and facilitate changes/fixes (hopefully) |
| 918 |
% \begin{macrocode} |
| 919 |
\cs_new_protected_nopar:Nn \__chronos_kexpander:nnnn |
| 920 |
{ % #1 enw (brif enw) | name (primary name) ; |
| 921 |
% #2 llwybr/prop tag | path/prop tag ; |
| 922 |
% #3 rhag | default (' or +) ; |
| 923 |
% #4 tags |
| 924 |
\pgfqkeys{/chronos} { |
| 925 |
#1'/.code={ |
| 926 |
\pgfqkeys{/chronos}{#2/.style={##1}} |
| 927 |
\__chronos_cadw_nodweddion_rhag:nn { #2 } { ##1 } |
| 928 |
}, |
| 929 |
#1+/.code={ |
| 930 |
\pgfqkeys{/chronos}{#2/.append ~ style={##1}} |
| 931 |
\__chronos_ychwanegu_nodweddion_rhag:nn { #2 } { ##1 } |
| 932 |
}, |
| 933 |
#1/.forward ~ to=/chronos/#1#3, |
| 934 |
every ~ #1'/.code={ |
| 935 |
\pgfqkeys{/chronos}{#2/.style/.expand ~ once={##1}} |
| 936 |
\__chronos_cadw_nodweddion_rhestr:nnn { #4 } { #2 } { ##1 } |
| 937 |
\__chronos_cadw_nodweddion_rhag:nn { #2 } { ##1 } |
| 938 |
}, |
| 939 |
every ~ #1+/.code={ |
| 940 |
\pgfqkeys{/chronos}{#2/.append ~ style/.expand ~ once={##1}} |
| 941 |
\__chronos_ychwanegu_nodweddion_rhestr:nnn { #4 } { #2 } { ##1 } |
| 942 |
\__chronos_ychwanegu_nodweddion_rhag:nn { #2 } { ##1 } |
| 943 |
}, |
| 944 |
every ~ #1/.forward ~ to=/chronos/every ~ #1#3, |
| 945 |
} |
| 946 |
} |
| 947 |
\cs_new_protected_nopar:Nn \__chronos_kexpander:nnnnn |
| 948 |
{ % #1 enw | name ; |
| 949 |
% #2 enw saesneg | english name ; |
| 950 |
% #3 llwybr/prop tag | path/property tag ; |
| 951 |
% #4 rhag | default (' or +) ; |
| 952 |
% #5 tags |
| 953 |
\__chronos_kexpander:nnnn { #1 } { #3 } { #4 } { #5 } |
| 954 |
\pgfqkeys{/chronos} { |
| 955 |
#2'/.forward ~ to=/chronos/#1', |
| 956 |
#2+/.forward ~ to=/chronos/#1+, |
| 957 |
#2/.forward ~ to=/chronos/#1, |
| 958 |
every ~ #2'/.forward ~ to=/chronos/every ~ #1', |
| 959 |
every ~ #2+/.forward ~ to=/chronos/every ~ #1+, |
| 960 |
every ~ #2/.forward ~ to=/chronos/every ~ #1, |
| 961 |
} |
| 962 |
} |
| 963 |
\cs_new_protected_nopar:Nn \__chronos_kexpandtotags:nnn |
| 964 |
{ % #1 enw | name ; |
| 965 |
% #2 enw saesneg | english name ; |
| 966 |
% #3 rhag | default (' or +) |
| 967 |
\pgfqkeys{/chronos} { |
| 968 |
every ~ #1'/.code={ |
| 969 |
\__chronos_cadw_nodweddion:nnn {#1}{@tag}{##1} |
| 970 |
}, |
| 971 |
every ~ #1+/.code={ |
| 972 |
\__chronos_ychwanegu_nodweddion:nnn {#1}{@tag}{##1} |
| 973 |
}, |
| 974 |
every ~ #1/.forward ~ to=/chronos/every ~ #1#3, |
| 975 |
every ~ #2'/.forward ~ to=/chronos/every ~ #1', |
| 976 |
every ~ #2+/.forward ~ to=/chronos/every ~ #1+, |
| 977 |
every ~ #2/.forward ~ to=/chronos/every ~ #1, |
| 978 |
} |
| 979 |
} |
| 980 |
\cs_new_protected_nopar:Nn \__chronos_kextripler:nnnn |
| 981 |
{ % #1 enw | name ; |
| 982 |
% #2 llwybr/prop tag | path/prop tag ; |
| 983 |
% #3 rhag | default ; |
| 984 |
% #4 math e.e. style neu code | type e.g. style or code |
| 985 |
\pgfqkeys{/chronos} { |
| 986 |
#2/.#4={}, |
| 987 |
#1+/.code={ |
| 988 |
\pgfqkeys{/chronos}{#2/.append ~ #4={##1}} |
| 989 |
}, |
| 990 |
#1'/.code={% |
| 991 |
\pgfqkeys{/chronos}{#2/.#4={##1}} |
| 992 |
}, |
| 993 |
#1/.forward ~ to=/chronos/#1#3, |
| 994 |
} |
| 995 |
} |
| 996 |
\cs_new_protected_nopar:Nn \__chronos_kexforwardtriple:nn |
| 997 |
{% |
| 998 |
\pgfqkeys{/chronos} { |
| 999 |
#2'/.forward ~ to=/chronos/#1', |
| 1000 |
#2+/.forward ~ to=/chronos/#1+, |
| 1001 |
#2/.forward ~ to=/chronos/#1, |
| 1002 |
} |
| 1003 |
} |
| 1004 |
\cs_new_protected_nopar:Nn \__chronos_kextripler:nnnnn |
| 1005 |
{ % #1 enw | name ; |
| 1006 |
% #2 enw saesneg | english name ; |
| 1007 |
% #3 llwybr/prop tag | path/property tag ; |
| 1008 |
% #4 rhag | default ; |
| 1009 |
% #5 math e.e. style neu code | type e.g. style or code |
| 1010 |
\__chronos_kextripler:nnnn { #1 } { #3 } { #4 } { #5 } |
| 1011 |
\__chronos_kexforwardtriple:nn { #1 } { #2 } |
| 1012 |
} |
| 1013 |
\cs_new_protected_nopar:Nn \__chronos_kexforwarder:nn |
| 1014 |
{ % #1 llwybr/enw | path/name ; |
| 1015 |
% #2 rhestr allweddau newydd | list of new keys |
| 1016 |
\clist_map_inline:nn { #2 } |
| 1017 |
{ |
| 1018 |
\pgfqkeys{/chronos} { ##1/.forward ~ to=/chronos/#1 } |
| 1019 |
} |
| 1020 |
} |
| 1021 |
\cs_new_protected_nopar:Nn \__chronos_kexforwarder:nnn |
| 1022 |
{ % #1 llwybr | path ; |
| 1023 |
% #2 enw | name ; |
| 1024 |
% #3 rhestr allweddau newydd ar yr un llwybr | list of new keys on the same path |
| 1025 |
\clist_map_inline:nn { #3 } |
| 1026 |
{ |
| 1027 |
\pgfqkeys{/chronos/#1} { ##1/.forward ~ to=/chronos/#1/#2 } |
| 1028 |
} |
| 1029 |
} |
| 1030 |
\cs_new_protected_nopar:Nn \__chronos_kexkeymaker:nnn |
| 1031 |
{ |
| 1032 |
\clist_map_inline:nn { byw, digwyddiad, parhad, theori, gwybodaeth, prif } |
| 1033 |
{ |
| 1034 |
\pgfqkeys{/chronos/##1} { #1/.#2={#3} } |
| 1035 |
} |
| 1036 |
} |
| 1037 |
% \end{macrocode} |
| 1038 |
%^^A END functions: pgf keys (keys) |
| 1039 |
%^^A END functions: pgf keys >>> |
| 1040 |
% \begin{macrocode} |
| 1041 |
\cs_generate_variant:Nn \legacy_if:nTF { oTF } |
| 1042 |
% \end{macrocode} |
| 1043 |
% Joseph Wright: \url{https://chat.stackexchange.com/transcript/message/65523217#65523217} |
| 1044 |
% \begin{macrocode} |
| 1045 |
\cs_new_eq:NN \__chronos_keys_set_exclude_groups:nnn \keys_set_exclude_groups:nnn |
| 1046 |
\cs_if_exist:NF \__chronos_keys_set_exclude_groups:nnn |
| 1047 |
{ |
| 1048 |
\cs_new_eq:NN \__chronos_keys_set_exclude_groups:nnn \keys_set_filter:nnn |
| 1049 |
} |
| 1050 |
% \end{macrocode} |
| 1051 |
%^^A END functions >>> |
| 1052 |
%^^A BEGIN macros y paced <<< |
| 1053 |
% **mewnol hefyd!** \textbar{} **internal also!** |
| 1054 |
% \begin{macrocode} |
| 1055 |
\newcommand* \chronos@tikzprefix { \int_to_arabic:n { \g__chronos_int } } |
| 1056 |
\cs_new_eq:NN \chronos@env@begin \__chronos_at_begin: |
| 1057 |
\cs_new_eq:NN \chronos@setdateformat \__chronos_set_dateformat:n |
| 1058 |
\cs_new_eq:NN \chronos@setyearformat \__chronos_set_yearformat:n |
| 1059 |
\cs_new_eq:NN \chronos@setminoryearformat \__chronos_set_minoryearformat:n |
| 1060 |
% \end{macrocode} |
| 1061 |
% for pgf/tikz convenience |
| 1062 |
% \changes{v0.9.3}{2025-07-15}{Remove unused internal macro \cs{chronos@showdate}, variants of internal macros \cs{chronos@showdate@cs}, \cs{chronos@showyear}.} |
| 1063 |
% \begin{macrocode} |
| 1064 |
\protected\def\chronos@showdate@cs[#1]#2 |
| 1065 |
{ |
| 1066 |
\group_begin: |
| 1067 |
\__chronos_set_dateformat:v { #1 } |
| 1068 |
\pgfcalendarjuliantoweekday{\csname thechronos@#2date\endcsname}{\c@chronos@weekday}% |
| 1069 |
\__chronos_show_date:n { #2 } |
| 1070 |
\group_end: |
| 1071 |
} |
| 1072 |
\protected\def\chronos@showyear[#1]#2 |
| 1073 |
{ |
| 1074 |
\group_begin: |
| 1075 |
\tl_set:No \l__chronos_tmpc_tl { #1 } |
| 1076 |
\tl_if_empty:NF \l__chronos_tmpc_tl |
| 1077 |
{ |
| 1078 |
\__chronos_set_yearformat:V \l__chronos_tmpc_tl |
| 1079 |
} |
| 1080 |
\__chronos_show_year:n { #2 } |
| 1081 |
\group_end: |
| 1082 |
} |
| 1083 |
% \end{macrocode} |
| 1084 |
% \changes{v0.9.3}{2025-07-18}{Use \cs{def}\ internal macros \cs{chronos@troilliwiau@isod}, \cs{chronos@troilliwiau@uchod}, \cs{chronos@lliwiau@isod}, \cs{chronos@lliwiau@uchod}\ and change usage in code accordingly.} |
| 1085 |
%^^A ateb: https://tex.stackexchange.com/a/748026/ |
| 1086 |
% \begin{macrocode} |
| 1087 |
\def\chronos@minoryearformat{\l__chronos_minoryearformat_tl} |
| 1088 |
\protected\def\chronos@troilliwiau@uchod#1{ |
| 1089 |
\__chronos_troilliwiau:nn { #1 } { uchod } |
| 1090 |
\expandafter\def\csname chronos@#1@lliw\endcsname{\l__chronos_lliw_tl} |
| 1091 |
} |
| 1092 |
\protected\def\chronos@troilliwiau@isod#1{ |
| 1093 |
\__chronos_troilliwiau:nn { #1 } { isod } |
| 1094 |
\expandafter\def\csname chronos@#1@lliw\endcsname{\l__chronos_lliw_tl} |
| 1095 |
} |
| 1096 |
\protected\def \chronos@lliwiau@uchod@tag#1#2{ |
| 1097 |
\tl_set:Nn \l__chronos_tmpc_tl { _#1 } |
| 1098 |
\clist_gset:cn { g__chronos_lliwiau \l__chronos_tmpc_tl _uchod_clist } { #2 } |
| 1099 |
} |
| 1100 |
\protected\def \chronos@lliwiau@uchod#1{ |
| 1101 |
\tl_clear:N \l__chronos_tmpc_tl |
| 1102 |
\clist_gset:cn { g__chronos_lliwiau \l__chronos_tmpc_tl _uchod_clist } { #1 } |
| 1103 |
} |
| 1104 |
\protected\def \chronos@lliwiau@isod@tag#1#2{ |
| 1105 |
\tl_set:Nn \l__chronos_tmpc_tl { _#1 } |
| 1106 |
\clist_gset:cn { g__chronos_lliwiau \l__chronos_tmpc_tl _isod_clist } { #2 } |
| 1107 |
} |
| 1108 |
\protected\def \chronos@lliwiau@isod#1{ |
| 1109 |
\tl_clear:N \l__chronos_tmpc_tl |
| 1110 |
\clist_gset:cn { g__chronos_lliwiau \l__chronos_tmpc_tl _isod_clist } { #1 } |
| 1111 |
} |
| 1112 |
\cs_new_eq:NN \chronos@lliwiau@clear \__chronos_lliwiau_clirio: |
| 1113 |
\cs_new_eq:NN \chronos@lliwiau@cadw@rhag \__chronos_lliwiau_cadw_rhag: |
| 1114 |
% \end{macrocode} |
| 1115 |
%^^A enwau |
| 1116 |
% \begin{macrocode} |
| 1117 |
\newcommand* \chronos@creu@tikzname [2] {% m m |
| 1118 |
\__chronos_creu_tikzname:n { #2 } |
| 1119 |
\expandafter\let\csname chronos@#1@tikzname\endcsname \l__chronos_tikzname_tl |
| 1120 |
} |
| 1121 |
\cs_new_eq:NN \chronos@enw@priflythrennu \__chronos_enw_priflythrennu:V |
| 1122 |
\cs_new_eq:NN \chronos@testunteitl@priflythrennu \__chronos_enw_priflythrennu:n |
| 1123 |
\cs_new_eq:NN \chronos@cadw@nodweddion@rhag \__chronos_cadw_nodweddion_rhag:nn |
| 1124 |
\cs_new_eq:NN \chronos@cadw@nodweddion \__chronos_cadw_nodweddion:nnn |
| 1125 |
\cs_new_eq:NN \chronos@ychwanegu@nodweddion \__chronos_ychwanegu_nodweddion:nnn |
| 1126 |
% \end{macrocode} |
| 1127 |
% \changes{v0.9.3}{2025-07-15}{Remove unused variants of internal macro \cs{chronos@ychwanegu@nodweddion@rhestr}, unused internal macro \cs{chronos@cadw@nodweddion@rhestr}.} |
| 1128 |
% \begin{macrocode} |
| 1129 |
\cs_new_eq:NN \chronos@ychwanegu@nodweddion@rhestr \__chronos_ychwanegu_nodweddion_rhestr_pre:nnn |
| 1130 |
% \end{macrocode} |
| 1131 |
% \begin{macrocode} |
| 1132 |
\cs_new_eq:NN \chronos@ychwanegu@nodweddion@rhag \__chronos_ychwanegu_nodweddion_rhag:nn |
| 1133 |
\cs_new_eq:NN \chronos@gosod@nodweddion \__chronos_gosod_nodweddion:n |
| 1134 |
\cs_new_eq:NN \chronos@gosod@nodweddion@var \__chronos_gosod_nodweddion:V |
| 1135 |
\cs_new_eq:NN \chronos@ailosod@nodweddion \__chronos_ailosod_nodweddion: |
| 1136 |
\cs_new_eq:NN \chronos@dangos@nodweddion \__chronos_dangos_nodweddion:n |
| 1137 |
\cs_new_eq:NN \chronos@dangos@nodweddion@rhag \__chronos_dangos_nodweddion_rhag: |
| 1138 |
\newcommand* \chronos@ychwanegu@gosod [1] |
| 1139 |
{ |
| 1140 |
\legacy_if:nF { chronos@preset } { |
| 1141 |
\clist_map_inline:nn { #1 } |
| 1142 |
{ |
| 1143 |
\seq_put_right:Nn \l__chronos_gosod_seq {##1} |
| 1144 |
} |
| 1145 |
} |
| 1146 |
}% |
| 1147 |
\newcommand* \chronos@dangos@gosod |
| 1148 |
{ |
| 1149 |
\seq_show:N \l__chronos_gosod_seq |
| 1150 |
} |
| 1151 |
\newcommand* \chronos@if@gosodTF [3] |
| 1152 |
{ |
| 1153 |
\seq_if_in:NnTF \l__chronos_gosod_seq { #1 } { #2 } { #3 } |
| 1154 |
} |
| 1155 |
% \end{macrocode} |
| 1156 |
% \begin{macro}{\chronos@if@gosodF} |
| 1157 |
% Conditionalise on property installation. |
| 1158 |
% \changes{v0.9.3}{2025-07-18}{Switch to \cs{def}.} |
| 1159 |
% \begin{macrocode} |
| 1160 |
\def\chronos@if@gosodF#1#2 |
| 1161 |
{ |
| 1162 |
\chronos@presettrue |
| 1163 |
\seq_if_in:NnF \l__chronos_gosod_seq { #1 } { #2 } |
| 1164 |
\chronos@presetfalse |
| 1165 |
} |
| 1166 |
% \end{macrocode} |
| 1167 |
% \end{macro} |
| 1168 |
% \begin{macro}{\chronosdangoslliwiau} |
| 1169 |
% Becomes \cs{chronosshowcolours}. |
| 1170 |
% \changes{v0.9.3}{2025-07-15}{Eliminate unused internal macros \cs{chronos@dangos@lliwiau}\ and \cs{chronos@dangos@lliwiau@rhag}.} |
| 1171 |
% \begin{macrocode} |
| 1172 |
\NewDocumentCommand \chronosdangoslliwiau { |
| 1173 |
s O { byw, digwyddiad, parhad, theori } D () { isod, uchod } |
| 1174 |
} { |
| 1175 |
\clist_set:Nn \l__chronos_tmpb_clist { #2 } |
| 1176 |
\clist_set:Nn \l__chronos_tmpc_clist { #3 } |
| 1177 |
\clist_map_inline:Nn \l__chronos_tmpb_clist |
| 1178 |
{ |
| 1179 |
\clist_map_inline:Nn \l__chronos_tmpc_clist |
| 1180 |
{ |
| 1181 |
\clist_show:c { g__chronos_lliwiau_##1_####1_clist } |
| 1182 |
} |
| 1183 |
} |
| 1184 |
\IfBooleanT { #1 } |
| 1185 |
{ |
| 1186 |
\clist_map_inline:Nn \l__chronos_tmpc_clist |
| 1187 |
{ |
| 1188 |
\clist_show:c {g__chronos_lliwiau_##1_clist} |
| 1189 |
} |
| 1190 |
} |
| 1191 |
} |
| 1192 |
% \end{macrocode} |
| 1193 |
% \end{macro} |
| 1194 |
% \begin{macro}{\chronosdangoslliwiaurhag} |
| 1195 |
% For showing default colours. |
| 1196 |
% \begin{macrocode} |
| 1197 |
\NewDocumentCommand \chronosdangoslliwiaurhag |
| 1198 |
{ |
| 1199 |
s O { byw, digwyddiad, parhad, theori } D () { isod, uchod } |
| 1200 |
} { |
| 1201 |
\clist_set:Nn \l__chronos_tmpb_clist { #2 } |
| 1202 |
\clist_set:Nn \l__chronos_tmpc_clist { #3 } |
| 1203 |
\clist_map_inline:Nn \l__chronos_tmpb_clist |
| 1204 |
{ |
| 1205 |
\clist_map_inline:Nn \l__chronos_tmpc_clist |
| 1206 |
{ |
| 1207 |
\clist_show:c { g__chronos_lliwiau_##1_####1_rhag_clist } |
| 1208 |
} |
| 1209 |
} |
| 1210 |
\IfBooleanT { #1 } |
| 1211 |
{ |
| 1212 |
\clist_map_inline:Nn \l__chronos_tmpc_clist |
| 1213 |
{ |
| 1214 |
\clist_show:c {g__chronos_lliwiau_##1_rhag_clist} |
| 1215 |
} |
| 1216 |
} |
| 1217 |
} |
| 1218 |
% \end{macrocode} |
| 1219 |
% \end{macro} |
| 1220 |
% \begin{macro}{\chronos@dangos@fformatiaudyddiadau,\chronosdangosfformatiaudyddiadau} |
| 1221 |
% Macros for showing date formats. |
| 1222 |
% \begin{macrocode} |
| 1223 |
\newcommand* \chronos@dangos@fformatiaudyddiadau{% |
| 1224 |
\clist_map_inline:nn |
| 1225 |
{ \l__chronos_dateformat_tl, \l__chronos_yearformat_tl, \l__chronos_minoryearformat_tl} |
| 1226 |
{ \tl_show:N ##1 } |
| 1227 |
} |
| 1228 |
\cs_new_eq:NN \chronosdangosfformatiaudyddiadau \chronos@dangos@fformatiaudyddiadau |
| 1229 |
% \end{macrocode} |
| 1230 |
% \end{macro} |
| 1231 |
% \begin{macro}{\chronos@to@clist,\chronos@to@clist@append,\chronos@global@to@clist,\chronos@globall@to@clist@append,\chronos@global@to@clist@star@append,\chronos@global@clear@to@clist,\chronos@from@clist,\chronos@global@from@clist,\chronos@global@eq@clist,\chronos@dangos@clist} |
| 1232 |
% Wrappers for \lpack{l3clist} functions. |
| 1233 |
% \changes{v0.9.3}{2025-07-15}{Eliminate \lpack{xparse} macros for internal commands. (According to \TeX{} SE chat this is The Right Thing To Do).} |
| 1234 |
% \begin{macrocode} |
| 1235 |
\protected\def\chronos@to@clist#1#2{%^^A m m } |
| 1236 |
\clist_set:co { l__chronos_#1_clist } { #2 } |
| 1237 |
} |
| 1238 |
\protected\def\chronos@to@clist@append#1#2{%^^A t {+} m m } |
| 1239 |
\clist_put_right:co { l__chronos_#1_clist } { #2 } |
| 1240 |
} |
| 1241 |
\protected\def\chronos@global@to@clist#1#2{%^^A m m |
| 1242 |
\clist_gset:co { g__chronos_#1_clist } { #2 } |
| 1243 |
} |
| 1244 |
\protected\def\chronos@global@to@clist@append#1#2{%^^A t {+} m m |
| 1245 |
\clist_gput_right:co { g__chronos_#1_clist } { #2 } |
| 1246 |
} |
| 1247 |
\protected\def\chronos@global@to@clist@star@append#1#2{%^^A s t {+} m m |
| 1248 |
\clist_gput_right:ce { g__chronos_#1_clist } { #2 } |
| 1249 |
} |
| 1250 |
\def\chronos@global@clear@to@clist#1{% m |
| 1251 |
\clist_gclear:c { g__chronos_#1_clist } |
| 1252 |
} |
| 1253 |
\def\chronos@from@clist#1#2{% m m |
| 1254 |
\clist_remove_duplicates:c { l__chronos_#1_clist } |
| 1255 |
\clist_if_empty:cTF { l__chronos_#1_clist } |
| 1256 |
{ |
| 1257 |
\expandafter\let#2\@empty |
| 1258 |
}{ |
| 1259 |
\expandafter\let\expandafter#2\csname l__chronos_#1_clist\endcsname |
| 1260 |
} |
| 1261 |
} |
| 1262 |
\def\chronos@global@from@clist#1{ |
| 1263 |
\clist_use:cn { g__chronos_#1_clist } { , } |
| 1264 |
} |
| 1265 |
\def\chronos@global@eq@clist#1#2{ |
| 1266 |
\clist_gset_eq:cc { g__chronos_#1_clist } { g__chronos_#2_clist } |
| 1267 |
} |
| 1268 |
\def\chronos@dangos@clist#1{ \clist_show:c { #1_clist } } |
| 1269 |
% \end{macrocode} |
| 1270 |
% \end{macro} |
| 1271 |
% Internal 2e wrappers for internal functions. |
| 1272 |
% \begin{macrocode} |
| 1273 |
\cs_new_eq:NN \chronos@at@end \__chronos_at_end: |
| 1274 |
\cs_new_eq:NN \chronos@set@date@aux \__chronos_set_date_aux:n |
| 1275 |
\cs_new_eq:NN \chronos@set@date \__chronos_set_date:nnnn % blwyddyn; mis; dydd; tag for macro |
| 1276 |
% \end{macrocode} |
| 1277 |
% \begin{macrocode} |
| 1278 |
\cs_new_eq:NN \chronos@legacy@if \legacy_if:oTF |
| 1279 |
% \end{macrocode} |
| 1280 |
% \begin{macrocode} |
| 1281 |
\def\chronos@legacy@if@set#1#2{\cs:w #1#2\cs_end:} |
| 1282 |
\def\chronos@datetojulian@extractyear #1-#2-#3 {#1} |
| 1283 |
\protected\def\chronos@dangoslliw#1{ |
| 1284 |
\extractcolorspec{#1}{\chronos@temp@lliw}% |
| 1285 |
} |
| 1286 |
% \end{macrocode} |
| 1287 |
% \begin{macro}{\chronosshowcolour} |
| 1288 |
% Public interface with options. |
| 1289 |
% \changes{v0.9.3}{2025-07-16}{Use \lpack{xparse} interface directly for \cs{chronosshowcolour}.} |
| 1290 |
% \begin{macrocode} |
| 1291 |
\NewDocumentCommand \chronosshowcolour |
| 1292 |
{ s O {\chronos@temp@lliw} m } |
| 1293 |
{\extractcolorspec{#3}{#2}\IfBooleanT{#1}{\show#2}} |
| 1294 |
% \end{macrocode} |
| 1295 |
% \end{macro} |
| 1296 |
% \begin{macrocode} |
| 1297 |
\cs_new_eq:NN \chronos@keymaker \__chronos_kexkeymaker:nnn |
| 1298 |
% \end{macrocode} |
| 1299 |
%^^A END macros y paced >>> |
| 1300 |
%^^A BEGIN yn lle etoolbox <<< |
| 1301 |
% \begin{macro}{\IfFreeTF,\IfFreeT,\IfFreeF} |
| 1302 |
% 2e document-level wrappers for \lpack{expl3} alternatives to \lpack{etoolbox} macros. |
| 1303 |
% |
| 1304 |
% yn lle \cs{ifundef} o etoolbox - instead of \cs{ifundef} from \lpack{etoolbox} |
| 1305 |
% \begin{macrocode} |
| 1306 |
\cs_if_exist:NTF \IfFreeTF {\PackageWarning{chronos}{ |
| 1307 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfFreeTF. |
| 1308 |
~ This ~ may ~ not ~ work} |
| 1309 |
} { \cs_new_eq:NN \IfFreeTF \cs_if_free:NTF } |
| 1310 |
\cs_if_exist:NTF \IfFreeT {\PackageWarning{chronos}{ |
| 1311 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfFreeT. |
| 1312 |
~ This ~ may ~ not ~ work} |
| 1313 |
} { \cs_new_eq:NN \IfFreeT \cs_if_free:NT } |
| 1314 |
\cs_if_exist:NTF \IfFreeF {\PackageWarning{chronos}{ |
| 1315 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfFreeF. |
| 1316 |
~ This ~ may ~ not ~ work} |
| 1317 |
} { \cs_new_eq:NN \IfFreeF \cs_if_free:NF } |
| 1318 |
% \end{macrocode} |
| 1319 |
% \end{macro} |
| 1320 |
% \begin{macro}{\IfExistTF,\IfExistT,\IfExistF} |
| 1321 |
% yn lle \cs{ifdef} o etoolbox - in place of \cs{ifdef} from \lpack{etoolbox} |
| 1322 |
% \begin{macrocode} |
| 1323 |
\cs_if_exist:NTF \IfExistTF {\PackageWarning{chronos}{ |
| 1324 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfExistTF. |
| 1325 |
~ This ~ may ~ not ~ work} |
| 1326 |
} { \cs_new_eq:NN \IfExistTF \cs_if_exist:NTF } |
| 1327 |
\cs_if_exist:NTF \IfExistT {\PackageWarning{chronos}{ |
| 1328 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfExistT. |
| 1329 |
~ This ~ may ~ not ~ work} |
| 1330 |
} { \cs_new_eq:NN \IfExistT \cs_if_exist:NT } |
| 1331 |
\cs_if_exist:NTF \IfExistF {\PackageWarning{chronos}{ |
| 1332 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfExistF. |
| 1333 |
~ This ~ may ~ not ~ work} |
| 1334 |
} { \cs_new_eq:NN \IfExistF \cs_if_exist:NF } |
| 1335 |
% \end{macrocode} |
| 1336 |
% \end{macro} |
| 1337 |
% \begin{macro}{\IfCSFreeTF,\IfCSFreeT,\IfCSFreeF} |
| 1338 |
% yn lle \cs{ifcsundef} o etoolbox - instead of \cs{ifcsundef} |
| 1339 |
% \begin{macrocode} |
| 1340 |
\cs_if_exist:NTF \IfCSFreeTF {\PackageWarning{chronos}{ |
| 1341 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfCSFreeTF. |
| 1342 |
~ This ~ may ~ not ~ work} |
| 1343 |
} { \cs_new_eq:NN \IfCSFreeTF \cs_if_free:cTF } |
| 1344 |
\cs_if_exist:NTF \IfCSFreeT {\PackageWarning{chronos}{ |
| 1345 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfCSFreeT. |
| 1346 |
~ This ~ may ~ not ~ work} |
| 1347 |
} { \cs_new_eq:NN \IfCSFreeT \cs_if_free:cT } |
| 1348 |
\cs_if_exist:NTF \IfCSFreeF {\PackageWarning{chronos}{ |
| 1349 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfCSFreeF. |
| 1350 |
~ This ~ may ~ not ~ work} |
| 1351 |
} { \cs_new_eq:NN \IfCSFreeF \cs_if_free:cF } |
| 1352 |
% \end{macrocode} |
| 1353 |
% \end{macro} |
| 1354 |
% \begin{macro}{\IfCSExistTF,\IfCSExistT,\IfCSExistF} |
| 1355 |
% yn lle \cs{ifcsdef} o etoolbox - instead of \cs{ifcsdef} |
| 1356 |
% \begin{macrocode} |
| 1357 |
\cs_if_exist:NTF \IfCSExistTF {\PackageWarning{chronos}{ |
| 1358 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfCSExistTF. |
| 1359 |
~ This ~ may ~ not ~ work} |
| 1360 |
} { \cs_new_eq:NN \IfCSExistTF \cs_if_exist:cTF } |
| 1361 |
\cs_if_exist:NTF \IfCSExistT {\PackageWarning{chronos}{ |
| 1362 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfCSExistT. |
| 1363 |
~ This ~ may ~ not ~ work} |
| 1364 |
} { \cs_new_eq:NN \IfCSExistT \cs_if_exist:cT } |
| 1365 |
\cs_if_exist:NTF \IfCSExistF {\PackageWarning{chronos}{ |
| 1366 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfCSExistF. |
| 1367 |
~ This ~ may ~ not ~ work} |
| 1368 |
} { \cs_new_eq:NN \IfCSExistF \cs_if_exist:cF } |
| 1369 |
% \end{macrocode} |
| 1370 |
% \end{macro} |
| 1371 |
% \begin{macro}{\Undefine} |
| 1372 |
% yn lle \cs{undef} o etoolbox - instead of \cs{undef} |
| 1373 |
% \begin{macrocode} |
| 1374 |
\cs_if_exist:NTF \Undefine {\PackageWarning{chronos}{ |
| 1375 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\Undefine. |
| 1376 |
~ This ~ may ~ not ~ work} |
| 1377 |
} { \cs_new_eq:NN \Undefine \cs_undefine:N } |
| 1378 |
% \end{macrocode} |
| 1379 |
% \end{macro} |
| 1380 |
% \begin{macro}{\CSletCS} |
| 1381 |
% yn lle \cs{csletcs} o etoolbox - instead of \cs{csletcs} |
| 1382 |
% \begin{macrocode} |
| 1383 |
\cs_if_exist:NTF \CSletCS {\PackageWarning{chronos}{ |
| 1384 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\CSletCS. |
| 1385 |
~ This ~ may ~ not ~ work} |
| 1386 |
} { \cs_new_eq:NN \CSletCS \cs_set_eq:cc } |
| 1387 |
% \end{macrocode} |
| 1388 |
% \end{macro} |
| 1389 |
% \begin{macro}{\CSlet} |
| 1390 |
% yn lle \cs{cslet} o etoolbox - instead of \cs{cslet} |
| 1391 |
% \begin{macrocode} |
| 1392 |
\cs_if_exist:NTF \CSlet {\PackageWarning{chronos}{ |
| 1393 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\CSlet. |
| 1394 |
~ This ~ may ~ not ~ work} |
| 1395 |
} { \cs_new_eq:NN \CSlet \cs_set_eq:cN } |
| 1396 |
% \end{macrocode} |
| 1397 |
% \end{macro} |
| 1398 |
% \begin{macro}{\IfBooleanExprTF,\IfBooleanExprT,\IfBooleanExprF} |
| 1399 |
% yn lle \cs{ifboolexpr} o etoolbox (ish) - instead of \cs{ifboolexpr} |
| 1400 |
% \begin{macrocode} |
| 1401 |
\cs_if_exist:NTF \IfBooleanExprTF {\PackageWarning{chronos}{ |
| 1402 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfBooleanExprTF. |
| 1403 |
~ This ~ may ~ not ~ work} |
| 1404 |
} { \cs_new_eq:NN \IfBooleanExprTF \bool_if:nTF } |
| 1405 |
\cs_if_exist:NTF \IfBooleanExprT {\PackageWarning{chronos}{ |
| 1406 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfBooleanExprT. |
| 1407 |
~ This ~ may ~ not ~ work} |
| 1408 |
} { \cs_new_eq:NN \IfBooleanExprT \bool_if:nT } |
| 1409 |
\cs_if_exist:NTF \IfBooleanExprF {\PackageWarning{chronos}{ |
| 1410 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfBooleanExprF. |
| 1411 |
~ This ~ may ~ not ~ work} |
| 1412 |
} { \cs_new_eq:NN \IfBooleanExprF \bool_if:nF } |
| 1413 |
% \end{macrocode} |
| 1414 |
% \end{macro} |
| 1415 |
% \begin{macro}{\LegacyBoolean} |
| 1416 |
% yn lle \texttt{bool} o etoolbox (ish) - instead of \texttt{bool} from \lpack{etoolbox} |
| 1417 |
% \begin{macrocode} |
| 1418 |
\cs_if_exist:NTF \LegacyBoolean {\PackageWarning{chronos}{ |
| 1419 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\LegacyBoolean. |
| 1420 |
~ This ~ may ~ not ~ work} |
| 1421 |
} { \cs_new_eq:NN \LegacyBoolean \legacy_if_p:n } |
| 1422 |
% \end{macrocode} |
| 1423 |
% \end{macro} |
| 1424 |
% \begin{macro}{\CSFreeBoolean} |
| 1425 |
% yn lle \texttt{test} o etoolbox (ish) - instead of \texttt{test} from \lpack{etoolbox} |
| 1426 |
% \begin{macrocode} |
| 1427 |
\cs_if_exist:NTF \CSFreeBoolean {\PackageWarning{chronos}{ |
| 1428 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\CSFreeBoolean. |
| 1429 |
~ This ~ may ~ not ~ work} |
| 1430 |
} { \cs_new_eq:NN \CSFreeBoolean \cs_if_free_p:N } |
| 1431 |
% \end{macrocode} |
| 1432 |
% \end{macro} |
| 1433 |
% \begin{macro}{\IntCompareBoolean,\IfIntCompareTF,\IfIntCompareT,\IfIntCompareF} |
| 1434 |
% yn lle \cs{ifnumcomp} o etoolbox (ish) - instead of \cs{ifnumcomp} from \lpack{etoolbox} |
| 1435 |
% \begin{macrocode} |
| 1436 |
\cs_if_exist:NTF \IntCompareBoolean {\PackageWarning{chronos}{ |
| 1437 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IntCompareBoolean. |
| 1438 |
~ This ~ may ~ not ~ work} |
| 1439 |
} { \cs_new_eq:NN \IntCompareBoolean \int_compare_p:nNn } |
| 1440 |
\cs_if_exist:NTF \IfIntCompareTF {\PackageWarning{chronos}{ |
| 1441 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfIntCompareTF. |
| 1442 |
~ This ~ may ~ not ~ work} |
| 1443 |
} { \cs_new_eq:NN \IfIntCompareTF \int_compare:nTF } |
| 1444 |
\cs_if_exist:NTF \IfIntCompareT {\PackageWarning{chronos}{ |
| 1445 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfIntCompareT. |
| 1446 |
~ This ~ may ~ not ~ work} |
| 1447 |
} { \cs_new_eq:NN \IfIntCompareT \int_compare:nT } |
| 1448 |
\cs_if_exist:NTF \IfIntCompareF {\PackageWarning{chronos}{ |
| 1449 |
Refusing ~ to ~ overwrite ~ existing ~ \protect\IfIntCompareF. |
| 1450 |
~ This ~ may ~ not ~ work} |
| 1451 |
} { \cs_new_eq:NN \IfIntCompareF \int_compare:nF } |
| 1452 |
% \end{macrocode} |
| 1453 |
% \end{macro} |
| 1454 |
%^^A END yn lle etoolbox >>> |
| 1455 |
%^^A BEGIN macros y paced cyhoeddus \textbar{} public package macros <<< |
| 1456 |
% \begin{macro}{\chronosnewcolourscheme,\chronosnewcolorscheme} |
| 1457 |
% \begin{macrocode} |
| 1458 |
\NewDocumentCommand \chronosnewcolourscheme { O {rhagosedig} m m } |
| 1459 |
{ |
| 1460 |
\group_begin: |
| 1461 |
\cs_new_nopar:cn { __chronos_lliwiau_#2 : } |
| 1462 |
{ |
| 1463 |
\cs:w chronos@lliwiau@#1 \cs_end: |
| 1464 |
\keys_set_groups:nnn { chronos / lliwiau } { core } { #3 } |
| 1465 |
\__chronos_color_set_from_existing:nn { chronos@lliw@cefndir@llinell } |
| 1466 |
{ chronos@prifliw } |
| 1467 |
\__chronos_color_set_from_existing:nn { chronos@lliw@llinell } |
| 1468 |
{ chronos@prifliw@cefndir } |
| 1469 |
\keys_set_groups:nnn { chronos / lliwiau } { core ~ derivative } { #3 } |
| 1470 |
\__chronos_color_set_from_existing:nn { chronos@borderinner } |
| 1471 |
{ chronos@lliw@cefndir@llinell } |
| 1472 |
\__chronos_color_set_from_existing:nn { chronos@borderouter } |
| 1473 |
{ chronos@prifliw@cefndir } |
| 1474 |
\__chronos_color_set_from_existing:nn { chronos@bordermiddle } |
| 1475 |
{ chronos@borderinner!50!chronos@borderouter } |
| 1476 |
\keys_set_groups:nnn { chronos / lliwiau } { core ~ border } { #3 } |
| 1477 |
\__chronos_color_set_from_existing:nn { chronos@byw@lliw@rhagosodedig } |
| 1478 |
{ chronos@prifliw } |
| 1479 |
\__chronos_color_set_from_existing:nn { chronos@digwyddiad@lliw@rhagosodedig } |
| 1480 |
{ chronos@prifliw } |
| 1481 |
\__chronos_color_set_from_existing:nn { chronos@parhad@lliw@rhagosodedig } |
| 1482 |
{ chronos@prifliw } |
| 1483 |
\__chronos_color_set_from_existing:nn { chronos@theori@lliw@rhagosodedig } |
| 1484 |
{ chronos@prifliw } |
| 1485 |
\__chronos_color_set_from_existing:nn { chronos@gwybodaeth@lliw@rhagosodedig } |
| 1486 |
{ chronos@prifliw } |
| 1487 |
% \end{macrocode} |
| 1488 |
%^^A % oedd \keys_set_filter:nnn |
| 1489 |
% \begin{macrocode} |
| 1490 |
\__chronos_keys_set_exclude_groups:nnn { chronos / lliwiau } |
| 1491 |
{ core, core ~ derivative, core ~ border } { #3 } |
| 1492 |
\@ifpackageloaded{memoize} |
| 1493 |
{ |
| 1494 |
\mmzset { csname ~ meaning ~ to ~ context={ __chronos_lliwiau_#2 : } } |
| 1495 |
}{} |
| 1496 |
} |
| 1497 |
\cs_new_eq:cc { chronos@lliwiau@#2 } { __chronos_lliwiau_#2 : } |
| 1498 |
\group_end: |
| 1499 |
} |
| 1500 |
\cs_new_eq:NN \chronosnewcolorscheme \chronosnewcolourscheme |
| 1501 |
% \end{macrocode} |
| 1502 |
% \end{macro} |
| 1503 |
%^^A END macros y paced cyhoeddus | public package macros >>> |
| 1504 |
% \begin{macrocode} |
| 1505 |
\ExplSyntaxOff |
| 1506 |
% \end{macrocode} |
| 1507 |
%^^A END expl3 >>> |
| 1508 |
%^^A BEGIN hydoedd 2e <<< |
| 1509 |
%^^A \newlength{\chronos@amser@dechraulength} |
| 1510 |
%^^A \newlength{\chronos@amser@diweddlength} |
| 1511 |
% \begin{macrocode} |
| 1512 |
\newlength{\chronos@diwedd@diwedd} |
| 1513 |
\newlength{\chronos@dechrau@dechrau} |
| 1514 |
\newlength{\chronos@byw@border} |
| 1515 |
\newlength{\chronos@parhad@border} |
| 1516 |
\newlength{\chronos@digwyddiad@border} |
| 1517 |
\newlength{\chronos@byw@border@inv} |
| 1518 |
\newlength{\chronos@parhad@border@inv} |
| 1519 |
\newlength{\chronos@digwyddiad@border@inv} |
| 1520 |
% \end{macrocode} |
| 1521 |
%^^A \newlength{\chronos@width} |
| 1522 |
% \begin{macrocode} |
| 1523 |
\newlength{\chronos@templgtha} |
| 1524 |
\newlength{\chronos@templgthb} |
| 1525 |
\newlength{\chronos@templgthc} |
| 1526 |
% \end{macrocode} |
| 1527 |
%^^A END hydoedd 2e >>> |
| 1528 |
%^^A BEGIN dimens <<< |
| 1529 |
% \begin{macrocode} |
| 1530 |
\newdimen\chronos@borderheight |
| 1531 |
\newdimen\chronos@height |
| 1532 |
\newdimen\chronos@width |
| 1533 |
\chronos@width=\textwidth |
| 1534 |
\newdimen\chronos@eramargin |
| 1535 |
\newdimen\chronos@timelinemargin |
| 1536 |
\newdimen\chronos@inner@halfheight |
| 1537 |
\newdimen\chronos@outer@halfheight |
| 1538 |
% \end{macrocode} |
| 1539 |
%^^A \newdimen\chronos@timelineunitlength |
| 1540 |
% \begin{macrocode} |
| 1541 |
\newdimen\chronos@pgflinewidth@saved |
| 1542 |
\newdimen\chronos@border@de |
| 1543 |
\newdimen\chronos@border@chwith |
| 1544 |
\newdimen\chronos@border@penawdau |
| 1545 |
\newdimen\chronos@border@pen |
| 1546 |
\newdimen\chronos@border@gwaelod |
| 1547 |
\newdimen\chronos@border@allanol |
| 1548 |
\newdimen\chronos@subheading@drop@uchod |
| 1549 |
\newdimen\chronos@subheading@drop@isod |
| 1550 |
\newdimen\chronos@heading@drop |
| 1551 |
\newdimen\chronos@llinell@yshift |
| 1552 |
\newdimen\chronos@llinell@yshift@base |
| 1553 |
\newdimen\chronos@llinell@add@yshift |
| 1554 |
\newdimen\chronos@testun@yshift |
| 1555 |
\newdimen\chronos@baselineskip |
| 1556 |
\newdimen\chronos@cylchtheori@mawr |
| 1557 |
\newdimen\chronos@cylchtheori@bach |
| 1558 |
\newdimen\chronos@tmpdimena |
| 1559 |
\newdimen\chronos@tmpdimenb |
| 1560 |
\chronos@testun@yshift=5pt |
| 1561 |
\chronos@height=\pi pt |
| 1562 |
\chronos@borderheight=\pi pt |
| 1563 |
\chronos@llinell@yshift=\pi pt |
| 1564 |
\chronos@llinell@yshift@base=\pi pt |
| 1565 |
\chronos@llinell@add@yshift=0pt |
| 1566 |
\chronos@timelinemargin=15pt |
| 1567 |
\chronos@eramargin=15pt |
| 1568 |
\chronos@border@allanol=5pt |
| 1569 |
\chronos@border@penawdau=\pi pt |
| 1570 |
\chronos@border@pen=0pt |
| 1571 |
\chronos@border@de=0pt |
| 1572 |
\chronos@border@gwaelod=0pt |
| 1573 |
\chronos@border@chwith=0pt |
| 1574 |
\chronos@cylchtheori@mawr=15pt |
| 1575 |
\chronos@cylchtheori@bach=9pt |
| 1576 |
% \end{macrocode} |
| 1577 |
%^^A END dimens >>> |
| 1578 |
%^^A BEGIN rhifyddion 2e <<< |
| 1579 |
% \begin{macrocode} |
| 1580 |
\newcounter{chronos@date} |
| 1581 |
\newcounter{chronos@startdate} |
| 1582 |
\newcounter{chronos@enddate} |
| 1583 |
\newcounter{chronos@startyear} |
| 1584 |
\newcounter{chronos@startmarkyear} |
| 1585 |
\newcounter{chronos@endyear} |
| 1586 |
\newcounter{chronos@yeardate} |
| 1587 |
\newcounter{chronos@thingdate} |
| 1588 |
\newcounter{chronos@otherthingdate} |
| 1589 |
\newcounter{chronos@genidate} |
| 1590 |
\newcounter{chronos@marwdate} |
| 1591 |
\newcounter{chronos@digdate} |
| 1592 |
\newcounter{chronos@weekday} |
| 1593 |
\newcounter{chronos@theori@countanchors} |
| 1594 |
\newcounter{chronos@tempcnta} |
| 1595 |
\newcounter{chronos@tempcntb} |
| 1596 |
\newcounter{chronos@tempcntc} |
| 1597 |
\newcounter{chronos@tempadate} |
| 1598 |
\newcounter{chronos@tempbdate} |
| 1599 |
\newcounter{chronos@bagpuss} |
| 1600 |
% \end{macrocode} |
| 1601 |
%^^A END rhifyddion 2e >>> |
| 1602 |
%^^A BEGIN amodol <<< |
| 1603 |
% Internal pre/2e booleans. |
| 1604 |
% \begin{macrocode} |
| 1605 |
\newif\ifchronos@marks |
| 1606 |
\chronos@markstrue |
| 1607 |
\newif\ifchronos@marks@minor |
| 1608 |
\chronos@marks@minortrue |
| 1609 |
\newif\ifchronos@marks@bare |
| 1610 |
\chronos@marks@barefalse |
| 1611 |
\newif\ifchronos@timeline@showyears |
| 1612 |
\chronos@timeline@showyearstrue |
| 1613 |
\newif\ifchronos@eventyearsonline |
| 1614 |
\chronos@eventyearsonlinefalse |
| 1615 |
\newif\ifchronos@yearzero |
| 1616 |
\chronos@yearzerofalse |
| 1617 |
\newif\ifchronos@markateraswitch |
| 1618 |
\chronos@markateraswitchfalse |
| 1619 |
\newif\ifchronos@onlytext |
| 1620 |
\chronos@onlytextfalse |
| 1621 |
\newif\ifchronos@markeras |
| 1622 |
\chronos@markerasfalse |
| 1623 |
\newif\ifchronos@yearsonline |
| 1624 |
\chronos@yearsonlinefalse |
| 1625 |
\newif\ifchronos@eventdatessplit |
| 1626 |
\chronos@eventdatessplitfalse |
| 1627 |
\newif\ifchronos@minoryears |
| 1628 |
\chronos@minoryearstrue |
| 1629 |
\newif\ifchronos@byw@isod |
| 1630 |
\chronos@byw@isodfalse |
| 1631 |
\newif\ifchronos@byw@isod@rhag |
| 1632 |
\chronos@byw@isod@rhagfalse |
| 1633 |
\newif\ifchronos@every@byw@isod |
| 1634 |
\chronos@every@byw@isodfalse |
| 1635 |
\newif\ifchronos@every@byw@uchod |
| 1636 |
\chronos@every@byw@uchodfalse |
| 1637 |
\newif\ifchronos@byw@cysylltiad |
| 1638 |
\chronos@byw@cysylltiadtrue |
| 1639 |
\newif\ifchronos@byw@cysylltiadtheori |
| 1640 |
\chronos@byw@cysylltiadtheorifalse |
| 1641 |
\newif\ifchronos@digwyddiad@isod |
| 1642 |
\chronos@digwyddiad@isodfalse |
| 1643 |
\newif\ifchronos@digwyddiad@isod@rhag |
| 1644 |
\chronos@digwyddiad@isod@rhagfalse |
| 1645 |
\newif\ifchronos@every@digwyddiad@isod |
| 1646 |
\chronos@every@digwyddiad@isodfalse |
| 1647 |
\newif\ifchronos@every@digwyddiad@uchod |
| 1648 |
\chronos@every@digwyddiad@uchodfalse |
| 1649 |
\newif\ifchronos@digwyddiad@cysylltiad |
| 1650 |
\chronos@digwyddiad@cysylltiadtrue |
| 1651 |
\newif\ifchronos@digwyddiad@cysylltiadtheori |
| 1652 |
\chronos@digwyddiad@cysylltiadtheorifalse |
| 1653 |
\newif\ifchronos@parhad@isod |
| 1654 |
\chronos@parhad@isodfalse |
| 1655 |
\newif\ifchronos@parhad@isod@rhag |
| 1656 |
\chronos@parhad@isod@rhagfalse |
| 1657 |
\newif\ifchronos@every@parhad@isod |
| 1658 |
\chronos@every@parhad@isodfalse |
| 1659 |
\newif\ifchronos@every@parhad@uchod |
| 1660 |
\chronos@every@parhad@uchodfalse |
| 1661 |
\newif\ifchronos@parhad@cysylltiad |
| 1662 |
\chronos@parhad@cysylltiadtrue |
| 1663 |
\newif\ifchronos@parhad@cysylltiadtheori |
| 1664 |
\chronos@parhad@cysylltiadtheorifalse |
| 1665 |
\newif\ifchronos@theori@isod |
| 1666 |
\chronos@theori@isodfalse |
| 1667 |
\newif\ifchronos@theori@cysylltiadtheori |
| 1668 |
\chronos@theori@cysylltiadtheorifalse |
| 1669 |
\newif\ifchronos@cam@mod |
| 1670 |
\newif\ifchronos@middleanchorborder |
| 1671 |
\newif\ifchronos@troilliwiau |
| 1672 |
\chronos@troilliwiautrue |
| 1673 |
\newif\ifchronos@dangoscyfnodau |
| 1674 |
\chronos@dangoscyfnodautrue |
| 1675 |
\newif\ifchronos@felymae |
| 1676 |
\chronos@felymaefalse |
| 1677 |
\newif\ifchronos@temp |
| 1678 |
\chronos@temptrue |
| 1679 |
\newif\ifchronos@headings |
| 1680 |
\chronos@headingsfalse |
| 1681 |
\newif\ifchronos@frame |
| 1682 |
\chronos@framefalse |
| 1683 |
\newif\ifchronos@framedefnyddiobb |
| 1684 |
\chronos@framedefnyddiobbtrue |
| 1685 |
\newif\ifchronos@placeholders |
| 1686 |
\chronos@placeholdersfalse |
| 1687 |
\newif\ifchronos@showcoords |
| 1688 |
\chronos@showcoordsfalse |
| 1689 |
\newif\ifchronos@showbb |
| 1690 |
\chronos@showbbfalse |
| 1691 |
\newif\ifchronos@shownodes |
| 1692 |
\chronos@shownodesfalse |
| 1693 |
\newif\ifchronos@bufarw |
| 1694 |
\chronos@bufarwtrue |
| 1695 |
\newif\ifchronos@gorffenedig |
| 1696 |
\chronos@gorffenedigtrue |
| 1697 |
\newif\ifchronos@preset |
| 1698 |
\chronos@presettrue |
| 1699 |
\newif\ifchronos@blynyddoedduchod |
| 1700 |
\chronos@blynyddoedduchodfalse |
| 1701 |
\newif\ifchronos@blynyddoeddisod |
| 1702 |
\chronos@blynyddoeddisodfalse |
| 1703 |
\newif\ifchronos@dimondblynyddoedd |
| 1704 |
\chronos@dimondblynyddoeddfalse |
| 1705 |
\newif\ifchronos@tag@cysylltu |
| 1706 |
\chronos@tag@cysylltutrue |
| 1707 |
\newif\ifchronos@copyleft |
| 1708 |
\chronos@copyleftfalse |
| 1709 |
\newif\ifchronos@phantom |
| 1710 |
\chronos@phantomfalse |
| 1711 |
\newif\ifchronostimelinearrow |
| 1712 |
\chronostimelinearrowfalse |
| 1713 |
% \end{macrocode} |
| 1714 |
% \changes{v0.9.3}{2025-07-18}{Add \cs{ifchronos@hollti@testun@tag}\ in lieu of starred form of text tag creator (so I can replace \cs{NewDocumentCommand}\ by more proper \cs{def}s.} |
| 1715 |
% Whether text tag is to be split (and this is the first bit). |
| 1716 |
% We can't use \cs{ifchronos@eventdatessplit} when splitting the tag as that is true during the entire element creation. |
| 1717 |
% \begin{macrocode} |
| 1718 |
\newif\ifchronos@hollti@testun@tag |
| 1719 |
\chronos@hollti@testun@tagfalse |
| 1720 |
% \end{macrocode} |
| 1721 |
%^^A END amodol >>> |
| 1722 |
%^^A BEGIN pre-defined macros <<< |
| 1723 |
% \begin{macrocode} |
| 1724 |
\let\chronos@coords\@empty |
| 1725 |
\def\chronos@ce{CE} |
| 1726 |
\def\chronos@bce{BCE} |
| 1727 |
\def\chronos@yearce{\textsc{ce}} |
| 1728 |
\def\chronos@yearbce{\textsc{bce}} |
| 1729 |
\def\chronos@yshift{0pt} |
| 1730 |
\def\chronos@ffont@camaumawr{\sffamily\bfseries} |
| 1731 |
\def\chronos@ffont@camaubach{\sffamily} |
| 1732 |
\def\chronos@ffont@cyfnodau{\sffamily\bfseries} |
| 1733 |
% \end{macrocode} |
| 1734 |
%^^A \def\chronos@width{\textwidth} |
| 1735 |
% \begin{macrocode} |
| 1736 |
\def\chronos@uchod{0} |
| 1737 |
\def\chronos@isod{0} |
| 1738 |
% \end{macrocode} |
| 1739 |
%^^A END pre-defined macros >>> |
| 1740 |
% addaswyd o ateb Martin Scharrer: \url{https://tex.stackexchange.com/a/56405/} |
| 1741 |
% |
| 1742 |
% i ddefnyddio \cs{setto}<dim> macros y tu mewn i lluniau tikz |
| 1743 |
% |
| 1744 |
% to use \cs{setto}<dim> macros inside tikz pictures |
| 1745 |
% |
| 1746 |
% LPPL permission: \url{https://tex.stackexchange.com/users/2975/martin-scharrer} |
| 1747 |
% \begin{macrocode} |
| 1748 |
\let\orig@settodim\@settodim |
| 1749 |
\let\chronos@settodim\@settodim |
| 1750 |
\patchcmd{\chronos@settodim}{\setbox\@tempboxa\hbox}{\chronos@tikz@setbox}{}{} |
| 1751 |
\def\chronos@tikz@setbox#1{% |
| 1752 |
\setbox\@tempboxa\hbox{\pgfinterruptpicture #1\endpgfinterruptpicture}% |
| 1753 |
} |
| 1754 |
\appto\tikz@installcommands{% |
| 1755 |
\let\@settodim\chronos@settodim |
| 1756 |
} |
| 1757 |
\appto\tikz@uninstallcommands{% |
| 1758 |
\let\@settodim\orig@settodim |
| 1759 |
} |
| 1760 |
% \end{macrocode} |
| 1761 |
%^^A BEGIN lliwiau <<< |
| 1762 |
% \begin{colour}{%^^A |
| 1763 |
% Blue,%^^A |
| 1764 |
% Blue3,%^^A |
| 1765 |
% DarkGoldenrod1,%^^A |
| 1766 |
% DarkGray,%^^A |
| 1767 |
% DarkOrange1,%^^A |
| 1768 |
% DarkOrchid3,%^^A |
| 1769 |
% DarkSlateGrey,%^^A |
| 1770 |
% DeepPink2,%^^A |
| 1771 |
% DeepSkyBlue2,%^^A |
| 1772 |
% DodgerBlue1,%^^A |
| 1773 |
% DodgerBlue2,%^^A |
| 1774 |
% DodgerBlue3,%^^A |
| 1775 |
% DodgerBlue4,%^^A |
| 1776 |
% Firebrick1,%^^A |
| 1777 |
% ForestGreen,%^^A |
| 1778 |
% Green,%^^A |
| 1779 |
% Green3,%^^A |
| 1780 |
% Ivory2,%^^A |
| 1781 |
% Ivory3,%^^A |
| 1782 |
% Ivory4,%^^A |
| 1783 |
% Lavender,%^^A |
| 1784 |
% LavenderBlush1,%^^A |
| 1785 |
% LavenderBlush2,%^^A |
| 1786 |
% LavenderBlush3,%^^A |
| 1787 |
% LavenderBlush4,%^^A |
| 1788 |
% MediumPurple,%^^A |
| 1789 |
% MidnightBlue,%^^A |
| 1790 |
% MistyRose2,%^^A |
| 1791 |
% MistyRose3,%^^A |
| 1792 |
% MistyRose4,%^^A |
| 1793 |
% Orange,%^^A |
| 1794 |
% OrangeRed1,%^^A |
| 1795 |
% Purple0,%^^A |
| 1796 |
% Red,%^^A |
| 1797 |
% SeaGreen3,%^^A |
| 1798 |
% Seashell2,%^^A |
| 1799 |
% Seashell3,%^^A |
| 1800 |
% Seashell4,%^^A |
| 1801 |
% Silver,%^^A |
| 1802 |
% SpringGreen4,%^^A |
| 1803 |
% Thistle2,%^^A |
| 1804 |
% Thistle3,%^^A |
| 1805 |
% Thistle4,%^^A |
| 1806 |
% Violet,%^^A |
| 1807 |
% Yellow,%^^A |
| 1808 |
% darkgray%^^A |
| 1809 |
% } |
| 1810 |
% Copied from \path{xcolor.sty}, \path{x11names.def}, \path{svgnames.def} |
| 1811 |
% \begin{macrocode} |
| 1812 |
\definecolorset{rgb}{chronos}{}{% xcolor.sty, x11names.def, svgnames.def |
| 1813 |
Blue,0,0,1;% |
| 1814 |
Blue3,0,0,.804;% |
| 1815 |
DarkGoldenrod1,1,.725,.06;% |
| 1816 |
DarkGray,.664,.664,.664;% |
| 1817 |
DarkOrange1,1,.498,0;% |
| 1818 |
DarkOrchid3,.604,.196,.804;% |
| 1819 |
DarkSlateGrey,.185,.31,.31;% |
| 1820 |
DeepPink2,.932,.07,.536;% |
| 1821 |
DeepSkyBlue2,0,.698,.932;% |
| 1822 |
DodgerBlue1,.116,.565,1;% |
| 1823 |
DodgerBlue2,.11,.525,.932;% |
| 1824 |
DodgerBlue3,.094,.455,.804;% |
| 1825 |
DodgerBlue4,.064,.305,.545;% |
| 1826 |
Firebrick1,1,.19,.19;% |
| 1827 |
ForestGreen,.132,.545,.132;% |
| 1828 |
Green,0,.5,0;% |
| 1829 |
Green3,0,.804,0;% |
| 1830 |
Ivory2,.932,.932,.88;% |
| 1831 |
Ivory3,.804,.804,.756;% |
| 1832 |
Ivory4,.545,.545,.512;% |
| 1833 |
Lavender,.9,.9,.98;% |
| 1834 |
LavenderBlush1,1,.94,.96;% |
| 1835 |
LavenderBlush2,.932,.88,.898;% |
| 1836 |
LavenderBlush3,.804,.756,.772;% |
| 1837 |
LavenderBlush4,.545,.512,.525;% |
| 1838 |
MediumPurple,.576,.44,.86;% |
| 1839 |
MidnightBlue,.098,.098,.44;% |
| 1840 |
MistyRose2,.932,.835,.824;% |
| 1841 |
MistyRose3,.804,.716,.71;% |
| 1842 |
MistyRose4,.545,.49,.484;% |
| 1843 |
Orange,1,.648,0;% |
| 1844 |
OrangeRed1,1,.27,0;% |
| 1845 |
Purple0,.628,.125,.94;% |
| 1846 |
Red,1,0,0;% |
| 1847 |
SeaGreen3,.264,.804,.5;% |
| 1848 |
Seashell2,.932,.898,.87;% |
| 1849 |
Seashell3,.804,.772,.75;% |
| 1850 |
Seashell4,.545,.525,.51;% |
| 1851 |
Silver,.752,.752,.752;% |
| 1852 |
SpringGreen4,0,.545,.27;% |
| 1853 |
Thistle2,.932,.824,.932;% |
| 1854 |
Thistle3,.804,.71,.804;% |
| 1855 |
Thistle4,.545,.484,.545;% |
| 1856 |
Violet,.932,.51,.932;% |
| 1857 |
Yellow,1,1,0;% |
| 1858 |
darkgray,.25,.25,.25% |
| 1859 |
} |
| 1860 |
% \end{macrocode} |
| 1861 |
% \end{colour} |
| 1862 |
% \begin{colour}{chronosCerulean,chronosPeriwinkle,chronosWildStrawberry} |
| 1863 |
% From \path{dvipsnames.def} |
| 1864 |
% \begin{macrocode} |
| 1865 |
%^^A dvipsnames.def |
| 1866 |
\definecolor{chronosCerulean} {cmyk}{0.94,0.11,0,0} |
| 1867 |
\definecolor{chronosPeriwinkle} {cmyk}{0.57,0.55,0,0} |
| 1868 |
\definecolor{chronosWildStrawberry}{cmyk}{0,0.96,0.39,0} |
| 1869 |
% \end{macrocode} |
| 1870 |
% \end{colour} |
| 1871 |
% cronoleg colours |
| 1872 |
% \begin{macrocode} |
| 1873 |
\newcommand*\chronos@lliwiau@cronoleg{% |
| 1874 |
\chronos@lliwiau@isod{% |
| 1875 |
chronosRed,% |
| 1876 |
chronosOrange,% |
| 1877 |
chronosYellow,% |
| 1878 |
chronosGreen,% |
| 1879 |
chronosBlue,% |
| 1880 |
chronosMidnightBlue,% |
| 1881 |
chronosViolet% |
| 1882 |
}% |
| 1883 |
\chronos@lliwiau@uchod{% |
| 1884 |
chronosRed,% |
| 1885 |
chronosOrange,% |
| 1886 |
chronosYellow,% |
| 1887 |
chronosGreen,% |
| 1888 |
chronosBlue,% |
| 1889 |
chronosMidnightBlue,% |
| 1890 |
chronosViolet% |
| 1891 |
}% |
| 1892 |
\chronos@lliwiau@isod@tag{byw}{% |
| 1893 |
chronosDodgerBlue3,% |
| 1894 |
chronosGreen3,% |
| 1895 |
chronosBlue3,% |
| 1896 |
chronosSpringGreen4,% |
| 1897 |
chronosDeepSkyBlue2,% |
| 1898 |
chronosForestGreen,% |
| 1899 |
chronosPeriwinkle,% |
| 1900 |
chronosSeaGreen3% |
| 1901 |
}% |
| 1902 |
\chronos@lliwiau@uchod@tag{byw}{% |
| 1903 |
chronosDeepPink2,% |
| 1904 |
chronosDarkOrange1,% |
| 1905 |
chronosFirebrick1,% |
| 1906 |
chronosPurple0,% |
| 1907 |
chronosWildStrawberry,% |
| 1908 |
chronosOrangeRed1,% |
| 1909 |
chronosDarkGoldenrod1,% |
| 1910 |
chronosDarkOrchid3% |
| 1911 |
}% |
| 1912 |
\chronos@lliwiau@isod@tag{digwyddiad}{% |
| 1913 |
chronosSeashell4,% |
| 1914 |
chronosSeashell4!.5!chronosSeashell3,% |
| 1915 |
chronosSeashell3,% |
| 1916 |
chronosSeashell3!.5!chronosSeashell2,% |
| 1917 |
chronosSeashell2% |
| 1918 |
}% |
| 1919 |
\chronos@lliwiau@uchod@tag{digwyddiad}{% |
| 1920 |
chronosThistle4,% |
| 1921 |
chronosThistle4!.5!chronosThistle3,% |
| 1922 |
chronosThistle3,% |
| 1923 |
chronosThistle3!.5!chronosThistle2,% |
| 1924 |
chronosThistle2% |
| 1925 |
}% |
| 1926 |
\chronos@lliwiau@isod@tag{parhad}{% |
| 1927 |
chronosIvory4,% |
| 1928 |
chronosIvory4!.5!chronosIvory3,% |
| 1929 |
chronosIvory3,% |
| 1930 |
chronosIvory3!.5!chronosIvory2,% |
| 1931 |
chronosIvory2% |
| 1932 |
}% |
| 1933 |
\chronos@lliwiau@uchod@tag{parhad}{% |
| 1934 |
chronosMistyRose4,% |
| 1935 |
chronosMistyRose4!.5!chronosMistyRose3,% |
| 1936 |
chronosMistyRose3,% |
| 1937 |
chronosMistyRose3!.5!chronosMistyRose2,% |
| 1938 |
chronosMistyRose2% |
| 1939 |
}% |
| 1940 |
% \end{macrocode} |
| 1941 |
%^^A BEGIN lliwiau prif |
| 1942 |
% \begin{macrocode} |
| 1943 |
\colorlet{chronos@prifliw}{black}% prifliw |
| 1944 |
\colorlet{chronos@prifliw@cefndir}{white}% prifliw cefndir |
| 1945 |
\colorlet{chronos@lliw@cefndir@llinell}{black}%^^A oedd lliw cefndir amser? |
| 1946 |
\colorlet{chronos@lliw@llinell}{white}%^^A oedd lliw amser |
| 1947 |
% \end{macrocode} |
| 1948 |
%^^A \colorlet{chronos@lliw@cefndir}{white}% lliw cefndir |
| 1949 |
%^^A angen y ffurf gywir |
| 1950 |
%^^A yn wreiddiol, 'gwybodaeth' oedd theori ac 'ee' oedd gwybodaeth |
| 1951 |
% \begin{macrocode} |
| 1952 |
\colorlet{chronos@lliw@theori}{white}% |
| 1953 |
\colorlet{chronos@lliw@cefndir@theori}{black}% |
| 1954 |
\colorlet{chronos@lliw@cefndir@gwybodaeth}{chronos@prifliw!25!chronos@prifliw@cefndir}%^^A lliw cefndir ee = prifliw!25!prifliw cefndir |
| 1955 |
\colorlet{chronos@lliw@gwybodaeth}{chronos@prifliw}% lliw ee = prifliw |
| 1956 |
% \end{macrocode} |
| 1957 |
%^^A \colorlet{chronos@lliw@symbolau@cefndir}{chronos@lliw@cefndir}% lliw symbolau cefndir = lliw cefndir |
| 1958 |
%^^A \colorlet{chronos@lliw@symbolau}{chronos@prifliw}% lliw symbolau = prifliw |
| 1959 |
%^^A \colorlet{lliw dig}{prifliw!75!prifliw cefndir} |
| 1960 |
%^^A END lliwiau prif |
| 1961 |
% \begin{macrocode} |
| 1962 |
} |
| 1963 |
% \end{macrocode} |
| 1964 |
% default colours |
| 1965 |
% \begin{macrocode} |
| 1966 |
\newcommand*\chronos@lliwiau@rhagosodedig{% |
| 1967 |
\chronos@lliwiau@isod{% |
| 1968 |
chronosRed,% |
| 1969 |
chronosOrange,% |
| 1970 |
chronosYellow,% |
| 1971 |
chronosGreen,% |
| 1972 |
chronosBlue,% |
| 1973 |
chronosMidnightBlue,% |
| 1974 |
chronosViolet% |
| 1975 |
}% |
| 1976 |
\chronos@lliwiau@uchod{% |
| 1977 |
chronosRed,% |
| 1978 |
chronosOrange,% |
| 1979 |
chronosYellow,% |
| 1980 |
chronosGreen,% |
| 1981 |
chronosBlue,% |
| 1982 |
chronosMidnightBlue,% |
| 1983 |
chronosViolet% |
| 1984 |
}% |
| 1985 |
% \end{macrocode} |
| 1986 |
%^^A BEGIN lliwiau prif |
| 1987 |
% \begin{macrocode} |
| 1988 |
\colorlet{chronos@prifliw}{black}%^^A prifliw |
| 1989 |
\colorlet{chronos@prifliw@cefndir}{white}%^^A prifliw cefndir |
| 1990 |
\colorlet{chronos@lliw@cefndir@llinell}{black}%^^A oedd lliw cefndir amser? |
| 1991 |
\colorlet{chronos@lliw@llinell}{white}%^^A oedd lliw amser |
| 1992 |
% \end{macrocode} |
| 1993 |
%^^A \colorlet{chronos@lliw@cefndir}{white}% lliw cefndir |
| 1994 |
%^^A angen y ffurf gywir |
| 1995 |
%^^A yn wreiddiol, 'gwybodaeth' oedd theori ac 'ee' oedd gwybodaeth |
| 1996 |
% \begin{macrocode} |
| 1997 |
\colorlet{chronos@lliw@theori}{white}% |
| 1998 |
\colorlet{chronos@lliw@cefndir@theori}{black}% |
| 1999 |
\colorlet{chronos@lliw@cefndir@gwybodaeth} |
| 2000 |
{chronos@prifliw!25!chronos@prifliw@cefndir}%^^A lliw cefndir ee = prifliw!25!prifliw cefndir |
| 2001 |
\colorlet{chronos@lliw@gwybodaeth}{chronos@prifliw}%^^A lliw ee = prifliw |
| 2002 |
% \end{macrocode} |
| 2003 |
%^^A \colorlet{chronos@lliw@symbolau@cefndir}{chronos@lliw@cefndir}% lliw symbolau cefndir = lliw cefndir |
| 2004 |
%^^A \colorlet{chronos@lliw@symbolau}{chronos@prifliw}% lliw symbolau = prifliw |
| 2005 |
%^^A \colorlet{lliw dig}{prifliw!75!prifliw cefndir} |
| 2006 |
% \begin{macrocode} |
| 2007 |
\colorlet{chronos@borderouter}{chronos@prifliw@cefndir}% |
| 2008 |
\colorlet{chronos@borderinner}{chronos@lliw@cefndir@llinell}% |
| 2009 |
\colorlet{chronos@bordermiddle}{chronos@borderouter!50!chronos@borderinner}% |
| 2010 |
% \end{macrocode} |
| 2011 |
%^^A END lliwiau prif |
| 2012 |
% \begin{macrocode} |
| 2013 |
} |
| 2014 |
% \end{macrocode} |
| 2015 |
%^^A END lliwiau >>> |
| 2016 |
%^^A rhagosodedig |
| 2017 |
% we need an English alias here |
| 2018 |
% \begin{macrocode} |
| 2019 |
\chronos@lliwiau@rhagosodedig |
| 2020 |
\let\chronos@lliwiau@default\chronos@lliwiau@rhagosedig |
| 2021 |
% \end{macrocode} |
| 2022 |
% \begin{macro}{\testunteitl}%^^A <<< |
| 2023 |
% Main title tag. |
| 2024 |
% |
| 2025 |
% \#1: opsiwn: style for node |
| 2026 |
% \#2: enw sy'n cael ei ddefnyddio dwywaith -> node name + node content (\cs{chronos@testunteitl@priflythrennu}) |
| 2027 |
% \#3: opsiwn: content y node |
| 2028 |
% \#4: first node for horizontal (x) placement |
| 2029 |
% \#5: second node for horizontal (x) placement (average taken) |
| 2030 |
% \#6: () required: node for vertical (y) placement |
| 2031 |
% \begin{macrocode} |
| 2032 |
\NewDocumentCommand \testunteitl { O {/chronos/@amserau} m o m m r() }{%^^A <<< |
| 2033 |
\coordinate (chronos@coord@temp) at ($(#4)!1/2!(#5)$); |
| 2034 |
\IfValueTF {#3}{\def\chronos@tempa{#3}}{% |
| 2035 |
\edef\chronos@tempa{\chronos@testunteitl@priflythrennu{#2}}% |
| 2036 |
}% |
| 2037 |
\node (#2) [anchor=base,#1] at (#6 -| chronos@coord@temp) {\chronos@tempa}; |
| 2038 |
\ifchronos@shownodes |
| 2039 |
\begin{scope}[on chronos overlay layer] |
| 2040 |
\draw [help lines, draw=chronos@lliw@node] (#2.north east) |
| 2041 |
-| (#2.south west) -| cycle; |
| 2042 |
\end{scope}% |
| 2043 |
\fi |
| 2044 |
}% >>> |
| 2045 |
% \end{macrocode} |
| 2046 |
% \end{macro}%^^A >>> |
| 2047 |
|
| 2048 |
%^^A BEGIN allweddau PGF/TikZ <<< |
| 2049 |
%^^A BEGIN rhifau <<< |
| 2050 |
% Number format from \texttt{fixedpointarithmetic}. |
| 2051 |
% \begin{macrocode} |
| 2052 |
\pgfkeys{/pgf/number format, |
| 2053 |
int detect, |
| 2054 |
set thousands separator={}, |
| 2055 |
} |
| 2056 |
% \end{macrocode} |
| 2057 |
%^^A END rhifau >>> |
| 2058 |
%^^A BEGIN layers / haenennau / haenau <<< |
| 2059 |
% Layers |
| 2060 |
% \begin{macrocode} |
| 2061 |
\pgfqkeys{/chronos}{% |
| 2062 |
declare layer/.code={%\DeclareDocumentCommand |
| 2063 |
\pgfdeclarelayer{chronos #1}% |
| 2064 |
}, |
| 2065 |
declare layer/.list={background,middle ground,foreground,overlay}, |
| 2066 |
} |
| 2067 |
\IfFileExists{tikzlibrarycfrforeground.code.tex}{% |
| 2068 |
\def\chronos@layers{% |
| 2069 |
background,% |
| 2070 |
chronos background,% |
| 2071 |
chronos middle ground,% |
| 2072 |
main,% |
| 2073 |
chronos foreground,% |
| 2074 |
chronos overlay,% |
| 2075 |
foreground% |
| 2076 |
}% |
| 2077 |
}{% |
| 2078 |
\def\chronos@layers{% |
| 2079 |
background,% |
| 2080 |
chronos background,% |
| 2081 |
chronos middle ground,% |
| 2082 |
main,% |
| 2083 |
chronos foreground,% |
| 2084 |
chronos overlay% |
| 2085 |
}% |
| 2086 |
} |
| 2087 |
\pgfqkeys{/chronos}{% |
| 2088 |
create layer/.code={% |
| 2089 |
\tikzset{% |
| 2090 |
% \end{macrocode} |
| 2091 |
% adapted from \path{tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybackgrounds.code.tex} |
| 2092 |
% \begin{macrocode} |
| 2093 |
on chronos #1 layer/.style={% |
| 2094 |
execute at begin scope={% |
| 2095 |
\pgfonlayer{chronos #1}% |
| 2096 |
\let\tikz@options=\pgfutil@empty% |
| 2097 |
\tikzset{every on chronos #1 layer/.try,##1}% |
| 2098 |
\tikz@options% |
| 2099 |
}, |
| 2100 |
execute at end scope={\endpgfonlayer} |
| 2101 |
}, |
| 2102 |
}% |
| 2103 |
}, |
| 2104 |
create layer/.list={background,middle ground,foreground,overlay}, |
| 2105 |
} |
| 2106 |
% \end{macrocode} |
| 2107 |
%^^A END layers / haenennau / haenau >>> |
| 2108 |
%^^A BEGIN ychwanegu i siap rectangle <<< |
| 2109 |
% Adapt the rectangle shape to provide more anchors for easy placement of connectors. |
| 2110 |
% This is used locally within the package environment. |
| 2111 |
% |
| 2112 |
% ateb Symbol 1: \url{https://tex.stackexchange.com/a/385953/} |
| 2113 |
% \begin{macrocode} |
| 2114 |
\def\pgf@sm@shape@name{rectangle} |
| 2115 |
\pgf@sh@savedanchor\middlenortheast{% |
| 2116 |
\pgf@x=\the\wd\pgfnodeparttextbox% |
| 2117 |
\pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/inner xsep}}% |
| 2118 |
\advance\pgf@x by 2\pgf@xc% |
| 2119 |
\pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}% |
| 2120 |
\ifdim\pgf@x<\pgf@xb |
| 2121 |
\pgf@x=\pgf@xb |
| 2122 |
\fi |
| 2123 |
\pgf@x=.5\pgf@x\advance\pgf@x by.5\wd\pgfnodeparttextbox% |
| 2124 |
\pgf@y=\ht\pgfnodeparttextbox\advance\pgf@y by\dp\pgfnodeparttextbox% |
| 2125 |
\pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/inner ysep}}% |
| 2126 |
\advance\pgf@y by 2\pgf@yc% |
| 2127 |
\pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}% |
| 2128 |
\ifdim\pgf@y<\pgf@yb |
| 2129 |
\pgf@y=\pgf@yb |
| 2130 |
\fi |
| 2131 |
\pgf@y=.5\pgf@y\advance\pgf@y by-.5\dp\pgfnodeparttextbox% |
| 2132 |
\advance\pgf@y by.5\ht\pgfnodeparttextbox% |
| 2133 |
} |
| 2134 |
\pgf@sh@savedanchor\middlesouthwest{% |
| 2135 |
\pgf@x=\wd\pgfnodeparttextbox% |
| 2136 |
\pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/inner xsep}} |
| 2137 |
\advance\pgf@x by 2\pgf@xc% |
| 2138 |
\pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}% |
| 2139 |
\ifdim\pgf@x<\pgf@xb |
| 2140 |
\pgf@x=\pgf@xb |
| 2141 |
\fi |
| 2142 |
\pgf@x=-.5\pgf@x\advance\pgf@x by.5\wd\pgfnodeparttextbox% |
| 2143 |
\pgf@y=\ht\pgfnodeparttextbox% |
| 2144 |
\advance\pgf@y by\dp\pgfnodeparttextbox% |
| 2145 |
\pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/inner ysep}}% |
| 2146 |
\advance\pgf@y by 2\pgf@yc% |
| 2147 |
\pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}% |
| 2148 |
\ifdim\pgf@y<\pgf@yb |
| 2149 |
\pgf@y=\pgf@yb |
| 2150 |
\fi |
| 2151 |
\pgf@y=-.5\pgf@y% |
| 2152 |
\advance\pgf@y by-.5\dp\pgfnodeparttextbox% |
| 2153 |
\advance\pgf@y by.5\ht\pgfnodeparttextbox% |
| 2154 |
} |
| 2155 |
\pgf@sh@anchor{middle north east}{\middlenortheast} |
| 2156 |
\pgf@sh@anchor{middle south west}{\middlesouthwest} |
| 2157 |
\pgf@sh@anchor{middle south east}{\middlenortheast\pgf@xa=\pgf@x% |
| 2158 |
\middlesouthwest\pgf@x=\pgf@xa} |
| 2159 |
\pgf@sh@anchor{middle north west}{\middlesouthwest\pgf@xa=\pgf@x% |
| 2160 |
\middlenortheast\pgf@x=\pgf@xa} |
| 2161 |
\pgf@sh@anchor{middle north}{% |
| 2162 |
\pgf@process{\middlesouthwest}% |
| 2163 |
\pgf@xa=.5\pgf@x% |
| 2164 |
\pgf@process{\middlenortheast}% |
| 2165 |
\pgf@x=.5\pgf@x\advance\pgf@x by \pgf@xa |
| 2166 |
} |
| 2167 |
\pgf@sh@anchor{middle south}{% |
| 2168 |
\pgf@process{\middlenortheast}% |
| 2169 |
\pgf@xa=.5\pgf@x% |
| 2170 |
\pgf@process{\middlesouthwest}% |
| 2171 |
\pgf@x=.5\pgf@x\advance\pgf@x by \pgf@xa |
| 2172 |
} |
| 2173 |
\pgf@sh@anchor{middle west}{% |
| 2174 |
\pgf@process{\middlenortheast}% |
| 2175 |
\pgf@ya=.5\pgf@y% |
| 2176 |
\pgf@process{\middlesouthwest}% |
| 2177 |
\pgf@y=.5\pgf@y% |
| 2178 |
\advance\pgf@y by \pgf@ya |
| 2179 |
} |
| 2180 |
\pgf@sh@anchor{middle east}{% |
| 2181 |
\pgf@process{\middlesouthwest}% |
| 2182 |
\pgf@ya=.5\pgf@y% |
| 2183 |
\pgf@process{\middlenortheast}% |
| 2184 |
\pgf@y=.5\pgf@y% |
| 2185 |
\advance\pgf@y by \pgf@ya |
| 2186 |
} |
| 2187 |
\pgf@sh@anchorborder{% |
| 2188 |
\pgf@xb=\pgf@x\pgf@yb=\pgf@y% |
| 2189 |
\ifchronos@middleanchorborder |
| 2190 |
\middlesouthwest% |
| 2191 |
\else |
| 2192 |
\southwest |
| 2193 |
\fi |
| 2194 |
\pgf@xa=\pgf@x\pgf@ya=\pgf@y |
| 2195 |
\ifchronos@middleanchorborder |
| 2196 |
\middlenortheast% |
| 2197 |
\else |
| 2198 |
\northeast% |
| 2199 |
\fi |
| 2200 |
\advance\pgf@x by-\pgf@xa% |
| 2201 |
\advance\pgf@y by-\pgf@ya% |
| 2202 |
\pgf@xc=.5\pgf@x\pgf@yc=.5\pgf@y% |
| 2203 |
\advance\pgf@xa by\pgf@xc% |
| 2204 |
\advance\pgf@ya by\pgf@yc% |
| 2205 |
\edef\pgf@marshal{\noexpand\pgfpointborderrectangle |
| 2206 |
{\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}% |
| 2207 |
{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% |
| 2208 |
}% |
| 2209 |
\pgf@process{\pgf@marshal}\advance\pgf@x by\pgf@xa\advance\pgf@y by\pgf@ya% |
| 2210 |
} |
| 2211 |
\tikzset{% |
| 2212 |
/chronos/middle anchorborder/.is if=chronos@middleanchorborder, |
| 2213 |
} |
| 2214 |
% \end{macrocode} |
| 2215 |
%^^A END ychwanegu i siap rectangle >>> |
| 2216 |
%^^A BEGIN \tikzset helpers <<< |
| 2217 |
% Context initialisation. |
| 2218 |
% |
| 2219 |
% \changes{v0.9.3}{2025-07-15}{Eliminate \lpack{xparse} macros for internal commands. (According to \TeX{} SE chat this is The Right Thing To Do).} |
| 2220 |
% |
| 2221 |
% Now have up to six stages of config, application and one auxiliary. |
| 2222 |
% \begin{enumerate*} |
| 2223 |
% \item[] Double first arg. |
| 2224 |
% \item Prevent tag/default properties from being affected. |
| 2225 |
% \item First stage of date-related key setup. |
| 2226 |
% \item Common housekeeping. |
| 2227 |
% \item[] Install (apply) properties. |
| 2228 |
% \item Filter keys. |
| 2229 |
% \item Second stage of date-related key setup (formats). |
| 2230 |
% \end{enumerate*} |
| 2231 |
% \begin{macrocode} |
| 2232 |
\protected\def\chronos@cyd@destun@init@craidd#1#2{% byw, digwyddiad, parhad |
| 2233 |
\chronos@cyd@destun@init@un@nodweddion |
| 2234 |
\chronos@cyd@destun@init@dau@dyddiadau{#1}% |
| 2235 |
\chronos@cyd@destun@init@tri{#1}% |
| 2236 |
\chronos@gosod@nodweddion{#1}% |
| 2237 |
\chronos@cyd@destun@init@pedwar@filter{#1}{#2}% |
| 2238 |
\chronos@cyd@destun@init@pump@dyddiadau{#1}% |
| 2239 |
} |
| 2240 |
\protected\def\chronos@cyd@destun@init@sylfaenol#1#2{% theori, gwybodaeth |
| 2241 |
\chronos@cyd@destun@init@sylfaenol@aux{#1}{#1}{#2}% |
| 2242 |
} |
| 2243 |
\protected\def\chronos@cyd@destun@init@sylfaenol@aux#1#2#3{% cylch theori [theori, gwybodaeth] |
| 2244 |
\chronos@cyd@destun@init@un@nodweddion |
| 2245 |
\chronos@cyd@destun@init@tri{#2}% |
| 2246 |
\chronos@gosod@nodweddion{#2}% |
| 2247 |
\chronos@cyd@destun@init@pedwar@filter{#1}{#3}% |
| 2248 |
} |
| 2249 |
\protected\def\chronos@cyd@destun@init@star#1#2{% prif, hawfraint |
| 2250 |
\chronos@cyd@destun@init@un@nodweddion |
| 2251 |
\chronos@cyd@destun@init@tri{#1}% |
| 2252 |
\chronos@cyd@destun@init@pedwar@filter{#1}{#2}% |
| 2253 |
} |
| 2254 |
\protected\def\chronos@cyd@destun@init@un@nodweddion{%^^A oes angen \relax yn y fan hon? |
| 2255 |
\def\chronos@ychwanegu@nodweddion##1##2##3{\relax}% |
| 2256 |
\def\chronos@ychwanegu@nodweddion@rhag##1##2{\relax}% |
| 2257 |
\def\chronos@cadw@nodweddion##1##2##3{\relax}% |
| 2258 |
\def\chronos@cadw@nodweddion@rhag##1##2{\relax}% |
| 2259 |
} |
| 2260 |
% \end{macrocode} |
| 2261 |
% first stage of date processing |
| 2262 |
% \begin{macrocode} |
| 2263 |
\protected\def\chronos@cyd@destun@init@dau@dyddiadau#1{% |
| 2264 |
\pgfqkeys{/chronos}{% paid ag ychwanegu i property lists rhagosodedig mewn cyd-destun lleoll |
| 2265 |
% \end{macrocode} |
| 2266 |
% don't add to default property lists in a local context |
| 2267 |
% \begin{macrocode} |
| 2268 |
blynyddoedd yn unig/.code={% |
| 2269 |
\chronos@dimondblynyddoeddtrue |
| 2270 |
\ifchronos@dangoscyfnodau |
| 2271 |
\pgfqkeys{/chronos/#1/dangos cyfnodau}{@blynyddoedd yn unig}% |
| 2272 |
\else |
| 2273 |
\pgfqkeys{/chronos/#1/heb gyfnodau}{@blynyddoedd yn unig}% |
| 2274 |
\fi |
| 2275 |
}, |
| 2276 |
dyddiadau llawn/.code={% |
| 2277 |
\chronos@dimondblynyddoeddfalse |
| 2278 |
\ifchronos@dangoscyfnodau |
| 2279 |
\pgfqkeys{/chronos/#1/dangos cyfnodau}{@llawn}% |
| 2280 |
\else |
| 2281 |
\pgfqkeys{/chronos/#1/heb gyfnodau}{@llawn}% |
| 2282 |
\fi |
| 2283 |
}, |
| 2284 |
dangos cyfnodau/.code={% |
| 2285 |
\chronos@dangoscyfnodautrue |
| 2286 |
\ifchronos@dimondblynyddoedd |
| 2287 |
\pgfqkeys{/chronos/#1/dangos cyfnodau}{@blynyddoedd yn unig}% |
| 2288 |
\else |
| 2289 |
\pgfqkeys{/chronos/#1/dangos cyfnodau}{@llawn}% |
| 2290 |
\fi |
| 2291 |
}, |
| 2292 |
heb gyfnodau/.code={% |
| 2293 |
\chronos@dangoscyfnodaufalse |
| 2294 |
\ifchronos@dimondblynyddoedd |
| 2295 |
\pgfqkeys{/chronos/#1/heb gyfnodau}{@blynyddoedd yn unig}% |
| 2296 |
\else |
| 2297 |
\pgfqkeys{/chronos/#1/heb gyfnodau}{@llawn}% |
| 2298 |
\fi |
| 2299 |
}, |
| 2300 |
}% |
| 2301 |
} |
| 2302 |
\protected\def\chronos@cyd@destun@init@tri#1{% |
| 2303 |
\pgfqkeys{/chronos}{%^^A paid ag ychwanegu i property lists rhagosodedig mewn cyd-destun lleoll | ditto |
| 2304 |
tags/.code={\pgfqkeys{/chronos}{@tag/.style={##1}}}, |
| 2305 |
tags+/.code={\pgfqkeys{/chronos}{@tag/.append style={##1}}}, |
| 2306 |
testunau/.code={\pgfqkeys{/chronos}{@testun/.style={##1}}}, |
| 2307 |
testunau+/.code={\pgfqkeys{/chronos}{@testun/.append style={##1}}}, |
| 2308 |
cysylltiadau/.code={\pgfqkeys{/chronos}{@cysylltiad/.style={##1}}}, |
| 2309 |
cysylltiadau+/.code={\pgfqkeys{/chronos}{@cysylltiad/.append style={##1}}}, |
| 2310 |
cysylltwyr chronos'/.code={\pgfqkeys{/chronos}{@cysylltwr@chronos/.style={##1}}}, |
| 2311 |
cysylltwyr chronos+/.code={% |
| 2312 |
\pgfqkeys{/chronos}{@cysylltwr@chronos/.append style={##1}}% |
| 2313 |
}, |
| 2314 |
cysylltwyr testun'/.code={\pgfqkeys{/chronos}{@cysylltwr@testun/.style={##1}}}, |
| 2315 |
cysylltwyr testun+/.code={\pgfqkeys{/chronos}{@cysylltwr@testun/.append style={##1}}}, |
| 2316 |
prif gysylltwyr testun'/.code={% |
| 2317 |
\pgfqkeys{/chronos}{@cysylltwr@testun@prif/.style={##1}}% |
| 2318 |
}, |
| 2319 |
prif gysylltwyr testun+/.code={% |
| 2320 |
\pgfqkeys{/chronos}{@cysylltwr@testun@prif/.append style={##1}}% |
| 2321 |
}, |
| 2322 |
llinellau/.code={\pgfqkeys{/chronos}{@llinell/.style={##1}}}, |
| 2323 |
llinellau+/.code={\pgfqkeys{/chronos}{@llinell/.append style={##1}}}, |
| 2324 |
phantom/.is if=chronos@phantom, |
| 2325 |
phantom/.default=true, |
| 2326 |
troi lliwiau/.is if=chronos@troilliwiau, |
| 2327 |
troi lliwiau/.default=true, |
| 2328 |
testun yshift/.chronos dimen=\chronos@testun@yshift, |
| 2329 |
#1/tag'/.code={\pgfqkeys{/chronos}{@tag/.style={##1}}}, |
| 2330 |
#1/testun'/.code={\pgfqkeys{/chronos}{@testun/.style={##1}}}, |
| 2331 |
#1/cysylltiad'/.code={\pgfqkeys{/chronos}{@cysylltiad/.style={##1}}}, |
| 2332 |
#1/llinell'/.code={\pgfqkeys{/chronos}{@llinell/.style={##1}}}, |
| 2333 |
#1/cysylltwr chronos'/.code={% |
| 2334 |
\pgfqkeys{/chronos}{@cysylltwr@chronos/.style={##1}}% |
| 2335 |
}, |
| 2336 |
#1/cysylltwr testun'/.code={% |
| 2337 |
\pgfqkeys{/chronos}{@cysylltwr@testun/.style={##1}}% |
| 2338 |
}, |
| 2339 |
#1/prif gysylltwr testun'/.code={% |
| 2340 |
\pgfqkeys{/chronos}{@cysylltwr@testun@prif/.style={##1}}% |
| 2341 |
}, |
| 2342 |
#1/tag+/.code={\pgfqkeys{/chronos}{@tag/.append style={##1}}}, |
| 2343 |
#1/testun+/.code={\pgfqkeys{/chronos}{@testun/.append style={##1}}}, |
| 2344 |
#1/cysylltiad+/.code={\pgfqkeys{/chronos}{@cysylltiad/.append style={##1}}}, |
| 2345 |
#1/llinell+/.code={\pgfqkeys{/chronos}{@llinell/.append style={##1}}}, |
| 2346 |
#1/cysylltwr chronos+/.code={% |
| 2347 |
\pgfqkeys{/chronos}{@cysylltwr@chronos/.append style={##1}}% |
| 2348 |
}, |
| 2349 |
#1/cysylltwr testun+/.code={% |
| 2350 |
\pgfqkeys{/chronos}{@cysylltwr@testun/.append style={##1}}% |
| 2351 |
}, |
| 2352 |
#1/prif gysylltwr testun+/.code={% |
| 2353 |
\pgfqkeys{/chronos}{@cysylltwr@testun@prif/.append style={##1}}% |
| 2354 |
}, |
| 2355 |
#1/blynyddoedd yn unig/.forward to=/chronos/blynyddoedd yn unig, |
| 2356 |
#1/dyddiadau llawn/.forward to=/chronos/dyddiadau llawn, |
| 2357 |
#1/dangos cyfnodau/.forward to=/chronos/dangos cyfnodau, |
| 2358 |
#1/heb gyfnodau/.forward to=/chronos/heb gyfnodau, |
| 2359 |
#1/testun yn unig/.forward to=/chronos/testun yn unig, |
| 2360 |
#1/troi lliwiau/.is if=chronos@troilliwiau, |
| 2361 |
#1/troi lliwiau/.default=true, |
| 2362 |
#1/phantom/.is if=chronos@phantom, |
| 2363 |
#1/phantom/.default=true, |
| 2364 |
#1/testun yshift/.chronos dimen=\chronos@testun@yshift, |
| 2365 |
#1/lliw rhagosodedig/.code={% |
| 2366 |
\edef\tempa{\csname chronos@#1@lliw\endcsname}% |
| 2367 |
\edef\tempb{\csname chronos@#1@lliw@rhagosodedig\endcsname}% |
| 2368 |
\expandafter\let\tempa\tempb |
| 2369 |
}, |
| 2370 |
}% |
| 2371 |
\def\chronos@cadw{}% clirio'r macro |
| 2372 |
} |
| 2373 |
\protected\def\chronos@cyd@destun@init@pedwar@filter#1#2{% |
| 2374 |
\pgfqkeys{/pgf}{% |
| 2375 |
key filters/defined/.install key filter, |
| 2376 |
key filter handlers/append filtered to/.install key filter handler=\chronos@cadw, |
| 2377 |
}% |
| 2378 |
%^^A defnyddio'r allweddau sy'n diffinio | define defined keys |
| 2379 |
\pgfkeysfiltered{/chronos/#1/.cd,/chronos/@tag,#2}% |
| 2380 |
} |
| 2381 |
% \end{macrocode} |
| 2382 |
%^^A \show\chronos@cadw |
| 2383 |
% \begin{macrocode} |
| 2384 |
\protected\def\chronos@cyd@destun@init@pump@dyddiadau#1{% |
| 2385 |
%^^A set date formats, whether showing eras, whether using full dates |
| 2386 |
\chronos@if@gosodF{@#1@fformatiau@dyddiadau}{% |
| 2387 |
\ifchronos@dimondblynyddoedd |
| 2388 |
\ifchronos@dangoscyfnodau |
| 2389 |
\pgfqkeys{/chronos/#1/dangos cyfnodau}{@blynyddoedd yn unig}% |
| 2390 |
\else |
| 2391 |
\pgfqkeys{/chronos/#1/heb gyfnodau}{@blynyddoedd yn unig}% |
| 2392 |
\fi |
| 2393 |
\else |
| 2394 |
\ifchronos@dangoscyfnodau |
| 2395 |
\pgfqkeys{/chronos/#1/dangos cyfnodau}{@llawn}% |
| 2396 |
\else |
| 2397 |
\pgfqkeys{/chronos/#1/heb gyfnodau}{@llawn}% |
| 2398 |
\fi |
| 2399 |
\fi |
| 2400 |
}% |
| 2401 |
}% >>> |
| 2402 |
% \end{macrocode} |
| 2403 |
%^^A END \tikzset helpers >>> |
| 2404 |
% \begin{macrocode} |
| 2405 |
\tikzset{% |
| 2406 |
% \end{macrocode} |
| 2407 |
%^^A BEGIN handlers <<< |
| 2408 |
% \begin{macrocode} |
| 2409 |
/handlers/.chronos dimen/.code={% |
| 2410 |
\pgfkeysdef{\pgfkeyscurrentpath}{% |
| 2411 |
\pgfmathparse{##1}% |
| 2412 |
#1=\pgfmathresult pt |
| 2413 |
}% |
| 2414 |
\pgfkeysdef{\pgfkeyscurrentpath'}{#1=##1}% |
| 2415 |
\pgfkeysdef{\pgfkeyscurrentpath'+}{\advance #1 by ##1}% |
| 2416 |
\pgfkeysdef{\pgfkeyscurrentpath'-}{\advance #1 by -##1}% |
| 2417 |
\pgfkeysdef{\pgfkeyscurrentpath+}{% |
| 2418 |
\pgfmathparse{##1}% |
| 2419 |
\advance #1 by \pgfmathresult pt |
| 2420 |
}% |
| 2421 |
\pgfkeysdef{\pgfkeyscurrentpath-}{% |
| 2422 |
\pgfmathparse{##1}% |
| 2423 |
\advance #1 by -\pgfmathresult pt |
| 2424 |
}% |
| 2425 |
}, |
| 2426 |
/handlers/.chronos 2 dimens/.code 2 args={% |
| 2427 |
\pgfkeysdefargs{\pgfkeyscurrentpath}{##1:##2}{% |
| 2428 |
\pgfmathparse{##1}% |
| 2429 |
#1=\pgfmathresult pt |
| 2430 |
\pgfmathparse{##2}% |
| 2431 |
#2=\pgfmathresult pt |
| 2432 |
}% |
| 2433 |
\pgfkeysdefargs{\pgfkeyscurrentpath'}{##1:##2}{% |
| 2434 |
#1=##1 |
| 2435 |
#2=##2 |
| 2436 |
}% |
| 2437 |
\pgfkeysdefargs{\pgfkeyscurrentpath'+}{##1:##2}{% |
| 2438 |
\advance #1 by ##1 |
| 2439 |
\advance #2 by ##2 |
| 2440 |
}% |
| 2441 |
\pgfkeysdefargs{\pgfkeyscurrentpath'-}{##1:##2}{% |
| 2442 |
\advance #1 by -##1 |
| 2443 |
\advance #2 by -##2 |
| 2444 |
}% |
| 2445 |
\pgfkeysdefargs{\pgfkeyscurrentpath+}{##1:##2}{% |
| 2446 |
\pgfmathparse{##1}\advance #1 by \pgfmathresult pt |
| 2447 |
\pgfmathparse{##2}\advance #2 by \pgfmathresult pt |
| 2448 |
}% |
| 2449 |
\pgfkeysdefargs{\pgfkeyscurrentpath-}{##1:##2}{% |
| 2450 |
\pgfmathparse{##1}\advance #1 by -\pgfmathresult pt |
| 2451 |
\pgfmathparse{##2}\advance #2 by -\pgfmathresult pt |
| 2452 |
}% |
| 2453 |
}, |
| 2454 |
/handlers/.chronos layer choice/.code={% |
| 2455 |
% \end{macrocode} |
| 2456 |
% \cs{chronos@ychwanegu@gosod} tracks the setting so if a user sets the layer explicitly, chronos won't override it |
| 2457 |
% \begin{macrocode} |
| 2458 |
\edef\chronos@temppgfpath{\pgfkeyscurrentpath}% |
| 2459 |
\pgfkeys{%^^A set the layer to put all things of some kind on e.g. connections, lines, timeline border |
| 2460 |
\pgfkeyscurrentpath/.is choice, |
| 2461 |
\chronos@temppgfpath/.cd, |
| 2462 |
background/.code={% |
| 2463 |
\pgfkeys{/chronos/chronos@#1@haenen/.style={on chronos background layer}}% |
| 2464 |
\chronos@ychwanegu@gosod{#1}% |
| 2465 |
}, |
| 2466 |
middle ground/.code={% |
| 2467 |
\pgfkeys{/chronos/chronos@#1@haenen/.style={on chronos middle ground layer}}% |
| 2468 |
\chronos@ychwanegu@gosod{#1}% |
| 2469 |
}, |
| 2470 |
foreground/.code={% |
| 2471 |
\pgfkeys{/chronos/chronos@#1@haenen/.style={on chronos foreground layer}}% |
| 2472 |
\chronos@ychwanegu@gosod{#1}% |
| 2473 |
}, |
| 2474 |
overlay/.code={% |
| 2475 |
\pgfkeys{/chronos/chronos@#1@haenen/.style=on chronos overlay layer}% |
| 2476 |
\chronos@ychwanegu@gosod{#1}% |
| 2477 |
}, |
| 2478 |
main/.code={% |
| 2479 |
\pgfkeys{/chronos/chronos@#1@haenen/.style={}}% |
| 2480 |
\chronos@ychwanegu@gosod{#1}% |
| 2481 |
}, |
| 2482 |
}% |
| 2483 |
}, |
| 2484 |
/handlers/.chronos lliw/.code={% chronos colour |
| 2485 |
\pgfkeysdef{\pgfkeyscurrentpath}{\colorlet{chronos@#1}{##1}}% |
| 2486 |
}, |
| 2487 |
/handlers/.chronos track/.code={% track setting of property by user |
| 2488 |
\pgfkeys{% |
| 2489 |
\pgfkeyscurrentpath/.append code={\chronos@ychwanegu@gosod{#1}}, |
| 2490 |
}% |
| 2491 |
}, |
| 2492 |
/handlers/.chronos search/.code={%^^A set up search so english paths work e.g. /chronos/life |
| 2493 |
\pgfkeys{% |
| 2494 |
\pgfkeyscurrentpath/.unknown/.code={% |
| 2495 |
\let\searchname=\pgfkeyscurrentname% |
| 2496 |
\pgfkeysalso{%^^A **angen** y {} o gwmpas ##1 isod! | **need** the {} around ##1 below! |
| 2497 |
/chronos/#1/\searchname/.try={##1}, |
| 2498 |
/chronos/\searchname/.retry={##1}, |
| 2499 |
/tikz/\searchname/.retry={##1}, |
| 2500 |
/pgf/\searchname/.lastretry={##1}% |
| 2501 |
}% |
| 2502 |
}, |
| 2503 |
}% |
| 2504 |
}, |
| 2505 |
% \end{macrocode} |
| 2506 |
%^^A BEGIN /handlers/.chronos tag init |
| 2507 |
% \begin{macrocode} |
| 2508 |
/handlers/.chronos tag init/.code 2 args={%^^A initialise a chronos 'tag' e.g. life, event, period |
| 2509 |
\pgfkeys{% |
| 2510 |
\pgfkeyscurrentpath/.cd, |
| 2511 |
% \end{macrocode} |
| 2512 |
% english translations below |
| 2513 |
% \begin{macrocode} |
| 2514 |
enw/.store in/.expand once=\csname chronos@#1@enw\endcsname, |
| 2515 |
% \end{macrocode} |
| 2516 |
% create a tikz-friendly version of name, in case name contains anything problematic |
| 2517 |
% \begin{macrocode} |
| 2518 |
chronos@tikzname/.code={\chronos@creu@tikzname {#1}{##1}}, |
| 2519 |
enw/.forward to=/chronos/#1/chronos@tikzname, |
| 2520 |
fel y mae/.is if=chronos@felymae, |
| 2521 |
fel y mae/.default=true, |
| 2522 |
llinell'/.code={\chronos@cadw@nodweddion{#1}{@llinell}{##1}}, |
| 2523 |
llinell+/.code={\chronos@ychwanegu@nodweddion{#1}{@llinell}{##1}}, |
| 2524 |
llinell/.forward to=/chronos/#1/llinell', |
| 2525 |
llinell add yshift/.chronos dimen=\chronos@llinell@add@yshift, |
| 2526 |
lliw/.store in/.expand once=\csname chronos@#1@lliw\endcsname, |
| 2527 |
% \end{macrocode} |
| 2528 |
%^^A % lliw/.chronos tag lliw={#1}{lliw}, |
| 2529 |
% \begin{macrocode} |
| 2530 |
lliw rhagosodedig/.store in/.expand once=\csname chronos@#1@lliw@rhagosodedig\endcsname, |
| 2531 |
lliw rhagosodedig=chronos@prifliw, |
| 2532 |
lliwiau uchod/.code={\chronos@lliwiau@uchod@tag{#1}{##1}}, |
| 2533 |
lliwiau isod/.code={\chronos@lliwiau@isod@tag{#1}{##1}}, |
| 2534 |
lliwiau uchod o clist/.code={\chronos@global@eq@clist{lliwiau_#1_uchod}{##1}}, |
| 2535 |
lliwiau isod o clist/.code={\chronos@global@eq@clist{lliwiau_#1_isod}{##1}}, |
| 2536 |
isod/.is if=chronos@#1@isod, |
| 2537 |
uchod/.code/.expand once={\csname chronos@#1@isodfalse\endcsname}, |
| 2538 |
at/.store in/.expand once=\csname chronos@#1@at\endcsname, |
| 2539 |
at/.expand once=\csname chronos@#1@tikzname\endcsname, |
| 2540 |
% \end{macrocode} |
| 2541 |
% \changes{v0.9.3}{2025-07-11}{Add \texttt{at aux} for placing the \texttt{text tag} relative to the beginning or ending of a \texttt{life} or \textt{period}.} |
| 2542 |
% \begin{macrocode} |
| 2543 |
at aux/.code={% |
| 2544 |
\expandafter\def\expandafter\chronos@tempa{\csname chronos@#1@tikzname\endcsname}% |
| 2545 |
\expandafter\def\csname chronos@#1@at\endcsname {% |
| 2546 |
##1 \chronos@tempa}}, |
| 2547 |
angor/.store in/.expand once=\csname chronos@#1@angor\endcsname, |
| 2548 |
angor/.forward to=/tikz/anchor, |
| 2549 |
cysylltu/.is if=chronos@#1@cysylltiad, |
| 2550 |
cysylltiad'/.code={\chronos@cadw@nodweddion{#1}{@cysylltiad}{##1}}, |
| 2551 |
cysylltiad+/.code={\chronos@ychwanegu@nodweddion{#1}{@cysylltiad}{##1}}, |
| 2552 |
cysylltiad/.forward to=/chronos/#1/cysylltiad', |
| 2553 |
cysylltwr chronos'/.code={% |
| 2554 |
\chronos@cadw@nodweddion{#1}{@cysylltwr@chronos}{##1}}, |
| 2555 |
cysylltwr chronos+/.code={% |
| 2556 |
\chronos@ychwanegu@nodweddion{#1}{@cysylltwr@chronos}{##1}}, |
| 2557 |
cysylltwr chronos/.forward to=/chronos/#1/cysylltwr chronos+, |
| 2558 |
cysylltwr testun'/.code={% |
| 2559 |
\chronos@cadw@nodweddion{#1}{@cysylltwr@testun}{##1}}, |
| 2560 |
cysylltwr testun+/.code={% |
| 2561 |
\chronos@ychwanegu@nodweddion{#1}{@cysylltwr@testun}{##1}}, |
| 2562 |
cysylltwr testun/.forward to=/chronos/#1/cysylltwr testun+, |
| 2563 |
ffont testun/.code={% |
| 2564 |
\expandafter\def\csname chronos@#1@ffonttestun\endcsname{##1}}, |
| 2565 |
ffont testun=, |
| 2566 |
prif gysylltwr testun'/.code={% |
| 2567 |
\chronos@cadw@nodweddion{#1}{@cysylltwr@testun@prif}{##1}}, |
| 2568 |
prif gysylltwr testun+/.code={% |
| 2569 |
\chronos@ychwanegu@nodweddion{#1}{@cysylltwr@testun@prif}{##1}}, |
| 2570 |
prif gysylltwr testun/.forward to=/chronos/#1/prif gysylltwr testun', |
| 2571 |
tag'/.code={\chronos@cadw@nodweddion{#1}{@tag}{##1}}, |
| 2572 |
tag+/.code={\chronos@ychwanegu@nodweddion{#1}{@tag}{##1}}, |
| 2573 |
tag/.forward to=/chronos/#1/tag+, |
| 2574 |
testun'/.code={\chronos@cadw@nodweddion{#1}{@testun}{##1}}, |
| 2575 |
testun+/.code={\chronos@ychwanegu@nodweddion{#1}{@testun}{##1}}, |
| 2576 |
testun/.forward to=/chronos/#1/testun', |
| 2577 |
cysylltwyr+/.code={%^^A rhan o /chronos/#1; paid â ddileu fe!! | part of /chronos/#1; don't delete it!! |
| 2578 |
\csname chronos@#1@cysylltiadtheoritrue\endcsname |
| 2579 |
\IfExistTF \chronos@cysylltwyr {% |
| 2580 |
\expandafter\def\expandafter\chronos@cysylltwyr\expandafter{% |
| 2581 |
\chronos@cysylltwyr,##1}% |
| 2582 |
}{\def \chronos@cysylltwyr{##1}}% |
| 2583 |
}, |
| 2584 |
cysylltwyr'/.code={% |
| 2585 |
\csname chronos@#1@cysylltiadtheoritrue\endcsname |
| 2586 |
\def \chronos@cysylltwyr{##1}% |
| 2587 |
}, |
| 2588 |
cysylltwyr/.forward to=/chronos/#1/cysylltwyr+, |
| 2589 |
testun yn unig/.code={% |
| 2590 |
\chronos@ychwanegu@nodweddion{#1}{@tag}{/chronos/testun yn unig}}, |
| 2591 |
troi lliwiau/.code={% |
| 2592 |
\chronos@ychwanegu@nodweddion{#1}{@tag}{/chronos/troi lliwiau=##1}}, |
| 2593 |
troi lliwiau/.default=true, |
| 2594 |
phantom/.code={% |
| 2595 |
\chronos@ychwanegu@nodweddion{#1}{@tag}{/chronos/phantom=##1}}, |
| 2596 |
phantom/.default=true, |
| 2597 |
cynnwys testun/.store in=\chronos@cynnwys@testun, |
| 2598 |
cynnwys enw/.store in=\chronos@cynnwys@enw, |
| 2599 |
cynnwys dyddiadau/.store in=\chronos@cynnwys@dyddiadau, |
| 2600 |
yshift/.store in=\chronos@yshift, |
| 2601 |
yshift/.forward to=yshift, |
| 2602 |
testun yshift/.code={% |
| 2603 |
\chronos@ychwanegu@nodweddion{#1}{@tag}{/chronos/testun yshift=##1}}, |
| 2604 |
testun yshift'/.code={% |
| 2605 |
\chronos@ychwanegu@nodweddion{#1}{@tag}{/chronos/testun yshift'=##1}}, |
| 2606 |
testun yshift+/.code={% |
| 2607 |
\chronos@ychwanegu@nodweddion{#1}{@tag}{/chronos/testun yshift+=##1}}, |
| 2608 |
testun yshift-/.code={% |
| 2609 |
\chronos@ychwanegu@nodweddion{#1}{@tag}{/chronos/testun yshift-=##1}}, |
| 2610 |
testun yshift'+/.code={% |
| 2611 |
\chronos@ychwanegu@nodweddion{#1}{@tag}{/chronos/testun yshift'+=##1}}, |
| 2612 |
testun yshift'-/.code={% |
| 2613 |
\chronos@ychwanegu@nodweddion{#1}{@tag}{/chronos/testun yshift'-=##1}}, |
| 2614 |
% \end{macrocode} |
| 2615 |
% begin saesneg: \verb|/chronos/#1| |
| 2616 |
%^^A /chronos/#2/.cd,% yn anffodus dyw hyn ddim yn gweithio (not forwarded on pellach) |
| 2617 |
% \begin{macrocode} |
| 2618 |
name/.forward to=/chronos/#1/enw, |
| 2619 |
% \end{macrocode} |
| 2620 |
%^^A at/.forward to=/chronos/#1/at, % paid â gwneud hwn! vicious circularity -> tex capacity exceeded!! |
| 2621 |
% \begin{macrocode} |
| 2622 |
as is/.forward to=/chronos/#1/fel y mae, |
| 2623 |
colour/.forward to=/chronos/#1/lliw, |
| 2624 |
color/.forward to=/chronos/#1/lliw, |
| 2625 |
default colour/.forward to=/chronos/#1/lliw rhagosodedig, |
| 2626 |
default color/.forward to=/chronos/#1/lliw rhagosodedig, |
| 2627 |
colours above/.forward to=/chronos/#1/lliwiau uchod, |
| 2628 |
colours below/.forward to=/chronos/#1/lliwiau isod, |
| 2629 |
colors above/.forward to=/chronos/#1/lliwiau uchod, |
| 2630 |
colors below/.forward to=/chronos/#1/lliwiau isod, |
| 2631 |
colours above from clist/.forward to=/chronos/#1/lliwiau uchod o clist, |
| 2632 |
colours below from clist/.forward to=/chronos/#1/lliwiau isod o clist, |
| 2633 |
colors above from clist/.forward to=/chronos/#1/lliwiau uchod o clist, |
| 2634 |
colors below from clist/.forward to=/chronos/#1/lliwiau isod o clist, |
| 2635 |
place below/.forward to=/chronos/#1/isod, |
| 2636 |
place above/.forward to=/chronos/#1/uchod, |
| 2637 |
tag anchor/.forward to=/chronos/#1/angor, |
| 2638 |
connect/.forward to=/chronos/#1/cysylltu, |
| 2639 |
connection/.forward to=/chronos/#1/cysylltiad, |
| 2640 |
connection'/.forward to=/chronos/#1/cysylltiad', |
| 2641 |
connection+/.forward to=/chronos/#1/cysylltiad+, |
| 2642 |
connectors/.forward to=/chronos/#1/cysylltwyr, |
| 2643 |
connectors+/.forward to=/chronos/#1/cysylltwyr+, |
| 2644 |
connectors'/.forward to=/chronos/#1/cysylltwyr', |
| 2645 |
text font/.forward to=/chronos/#1/ffont testun, |
| 2646 |
text tag connector+/.forward to=/chronos/#1/cysylltwr testun+, |
| 2647 |
text tag connector'/.forward to=/chronos/#1/cysylltwr testun', |
| 2648 |
text tag connector/.forward to=/chronos/#1/cysylltwr testun, |
| 2649 |
main text tag connector+/.forward to=/chronos/#1/prif gysylltwr testun+, |
| 2650 |
main text tag connector'/.forward to=/chronos/#1/prif gysylltwr testun', |
| 2651 |
main text tag connector/.forward to=/chronos/#1/prif gysylltwr testun, |
| 2652 |
chronos connector+/.forward to=/chronos/#1/cysylltwr chronos+, |
| 2653 |
chronos connector'/.forward to=/chronos/#1/cysylltwr chronos', |
| 2654 |
chronos connector/.forward to=/chronos/#1/cysylltwr chronos, |
| 2655 |
colour rotation/.forward to=/chronos/#1/troi lliwiau, |
| 2656 |
color rotation/.forward to=/chronos/#1/troi lliwiau, |
| 2657 |
line/.forward to=/chronos/#1/llinell, |
| 2658 |
line'/.forward to=/chronos/#1/llinell', |
| 2659 |
line+/.forward to=/chronos/#1/llinell+, |
| 2660 |
line add yshift/.chronos dimen=\chronos@llinell@add@yshift, |
| 2661 |
only text/.forward to=/chronos/#1/testun yn unig, |
| 2662 |
text tag/.forward to=/chronos/#1/testun, |
| 2663 |
text tag'/.forward to=/chronos/#1/testun', |
| 2664 |
text tag+/.forward to=/chronos/#1/testun+, |
| 2665 |
text tag yshift/.forward to=/chronos/#1/testun yshift, |
| 2666 |
text tag yshift'/.forward to=/chronos/#1/testun yshift', |
| 2667 |
text tag yshift+/.forward to=/chronos/#1/testun yshift+, |
| 2668 |
text tag yshift-/.forward to=/chronos/#1/testun yshift-, |
| 2669 |
text tag yshift'+/.forward to=/chronos/#1/testun yshift'+, |
| 2670 |
text tag yshift'-/.forward to=/chronos/#1/testun yshift'-, |
| 2671 |
text content/.forward to=/chronos/#1/cynnwys testun, |
| 2672 |
name content/.forward to=/chronos/#1/cynnwys enw, |
| 2673 |
dates content/.forward to=/chronos/#1/cynnwys dyddiadau, |
| 2674 |
% \end{macrocode} |
| 2675 |
%^^A yshift/.forward to=/chronos/#1/yshift, % paid â gwneud hwn! vicious circularity -> tex capacity exceeded!! |
| 2676 |
%^^A tag/.forward to=/chronos/#1/tag, % paid â gwneud hwn! vicious circularity -> tex capacity exceeded!! |
| 2677 |
%^^A tag+/.forward to=/chronos/#1/tag+, % paid â gwneud hwn! vicious circularity -> tex capacity exceeded!! |
| 2678 |
% end saesneg: \verb|/chronos/#1| |
| 2679 |
% |
| 2680 |
% begin shortcuts |
| 2681 |
% \begin{macrocode} |
| 2682 |
/chronos/.cd, |
| 2683 |
cysylltiad #1+/.forward to=/chronos/#1/cysylltiad+, |
| 2684 |
cysylltiad #1'/.forward to=/chronos/#1/cysylltiad', |
| 2685 |
cysylltiad #1/.forward to=/chronos/#1/cysylltiad, |
| 2686 |
cysylltwr chronos #1+/.forward to=/chronos/#1/cysylltwr chronos+, |
| 2687 |
cysylltwr chronos #1'/.forward to=/chronos/#1/cysylltwr chronos', |
| 2688 |
cysylltwr chronos #1/.forward to=/chronos/#1/cysylltwr chronos, |
| 2689 |
cysylltwr testun #1+/.forward to=/chronos/#1/cysylltwr testun+, |
| 2690 |
cysylltwr testun #1'/.forward to=/chronos/#1/cysylltwr testun', |
| 2691 |
cysylltwr testun #1/.forward to=/chronos/#1/cysylltwr testun, |
| 2692 |
prif gysylltwr testun #1+/.forward to=/chronos/#1/prif gysylltwr testun+, |
| 2693 |
prif gysylltwr testun #1'/.forward to=/chronos/#1/prif gysylltwr testun', |
| 2694 |
prif gysylltwr testun #1/.forward to=/chronos/#1/prif gysylltwr testun, |
| 2695 |
llinell #1+/.forward to=/chronos/#1/llinell+, |
| 2696 |
llinell #1'/.forward to=/chronos/#1/llinell', |
| 2697 |
llinell #1/.forward to=/chronos/#1/llinell, |
| 2698 |
testun #1+/.forward to=/chronos/#1/testun+, |
| 2699 |
testun #1'/.forward to=/chronos/#1/testun', |
| 2700 |
testun #1/.forward to=/chronos/#1/testun, |
| 2701 |
% \end{macrocode} |
| 2702 |
%^^A % begin saesneg |
| 2703 |
% \begin{macrocode} |
| 2704 |
#2 connection+/.forward to=/chronos/#1/cysylltiad+, |
| 2705 |
#2 connection'/.forward to=/chronos/#1/cysylltiad', |
| 2706 |
#2 connection/.forward to=/chronos/#1/cysylltiad, |
| 2707 |
#2 chronos connector+/.forward to=/chronos/#1/cysylltwr chronos+, |
| 2708 |
#2 chronos connector'/.forward to=/chronos/#1/cysylltwr chronos', |
| 2709 |
#2 chronos connector/.forward to=/chronos/#1/cysylltwr chronos, |
| 2710 |
#2 text tag connector+/.forward to=/chronos/#1/cysylltwr testun+, |
| 2711 |
#2 text tag connector'/.forward to=/chronos/#1/cysylltwr testun', |
| 2712 |
#2 text tag connector/.forward to=/chronos/#1/cysylltwr testun, |
| 2713 |
#2 main text tag connector+/.forward to=/chronos/#1/prif gysylltwr testun+, |
| 2714 |
#2 main text tag connector'/.forward to=/chronos/#1/prif gysylltwr testun', |
| 2715 |
#2 main text tag connector/.forward to=/chronos/#1/prif gysylltwr testun, |
| 2716 |
#2 line+/.forward to=/chronos/#1/llinell+, |
| 2717 |
#2 line'/.forward to=/chronos/#1/llinell', |
| 2718 |
#2 line/.forward to=/chronos/#1/llinell, |
| 2719 |
#2 text tag+/.forward to=/chronos/#1/testun+, |
| 2720 |
#2 text tag'/.forward to=/chronos/#1/testun', |
| 2721 |
#2 text tag/.forward to=/chronos/#1/testun, |
| 2722 |
% \end{macrocode} |
| 2723 |
%^^A % end saesneg |
| 2724 |
%^^A % end shortcuts |
| 2725 |
% \begin{macrocode} |
| 2726 |
/chronos/#2/.chronos search=#1, |
| 2727 |
/chronos/#1/.chronos search=#2,% heb bwrpas | pointless |
| 2728 |
/chronos/#1/.code={\pgfqkeys{/chronos/#1}{##1}}, |
| 2729 |
/chronos/#2/.forward to=/chronos/#1, |
| 2730 |
}% |
| 2731 |
}, |
| 2732 |
% \end{macrocode} |
| 2733 |
%^^A END .chronos tag init |
| 2734 |
%^^A BEGIN /handlers/.chronos tag dyddiadau init |
| 2735 |
% \begin{macrocode} |
| 2736 |
/handlers/.chronos tag dyddiadau init/.code args={#1:#2:#3:#4:#5:#6:#7:#8:#9}{% e.g. /chronos/byw/.chronos tag dyddiadau init=byw:geni:marw:bu farw:bufarw:geni:marw:birth:death |
| 2737 |
% \end{macrocode} |
| 2738 |
% for elements belonging to tags of types which span more than one date e.g.\ life, period. |
| 2739 |
% we need 3 date formats (possibly all the same). |
| 2740 |
% the first is for the begin date when both dates belong to the same era. |
| 2741 |
% the second is for the begin date when the eras differ. |
| 2742 |
% the third is for the end date (regardless). |
| 2743 |
% \begin{macrocode} |
| 2744 |
\pgfkeys{\pgfkeyscurrentpath/.cd, |
| 2745 |
dyddiadau/.code args={##1:##2}{%^^A angen y llinell nesaf am y saesneg yn unig |
| 2746 |
\pgfqkeys{/chronos/#1}{#2=##1}%^^A needed only for the english ?? (why?) |
| 2747 |
\edef\tempa{##2}\edef\tempb{}% |
| 2748 |
\ifx\tempa\tempb |
| 2749 |
\else |
| 2750 |
\pgfqkeys{/chronos/#1}{#3=##2}% |
| 2751 |
\fi |
| 2752 |
}, |
| 2753 |
#4/.is if=chronos@#5, |
| 2754 |
% \end{macrocode} |
| 2755 |
% paid â cheisio ddefnyddio macros yn lle allweddau yn y fan hon |
| 2756 |
% |
| 2757 |
% don't try to use macros instead of keys here |
| 2758 |
%^^A #2/.code={\chronos@set@date@aux{##1-01-01-0@#6}}, |
| 2759 |
%^^A #3/.code={\chronos@set@date@aux{##1-12-31-0@#7}\chronos@legacy@if@set{#5}{true}}, |
| 2760 |
% \begin{macrocode} |
| 2761 |
#2/.style={/chronos/set date aux/.expanded={##1-01-01-0@#6}}, |
| 2762 |
#3/.style={/chronos/set date aux/.expanded={##1-12-31-0@#7},/chronos/#1/#4=true}, |
| 2763 |
#3={\year-\month-\day}, |
| 2764 |
label #2/.store in/.expand once=\csname chronos@#1@label#2\endcsname, |
| 2765 |
label #3/.store in/.expand once=\csname chronos@#1@label#3\endcsname, |
| 2766 |
fformatiau dyddiadau/.style args={##1:##2:##3}{% |
| 2767 |
/chronos/#1/fformat #2 yr un gyfnod={##1}, |
| 2768 |
/chronos/#1/fformat #2 cyfnodau gwahanol={##2}, |
| 2769 |
/chronos/#1/fformat #3={##3}, |
| 2770 |
}, |
| 2771 |
fformatiau dyddiadau/.chronos track={@#1@fformatiau@dyddiadau,@#1@cyfnodau,@#1@llawn}, |
| 2772 |
fformat #2 yr un gyfnod/.code={% |
| 2773 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnod\endcsname{##1}% |
| 2774 |
\chronos@ychwanegu@nodweddion{#1}{@tag}{/chronos/#1/fformat #2 yr un gyfnod={##1}}% |
| 2775 |
}, |
| 2776 |
fformat #2 cyfnodau gwahanol/.code={% |
| 2777 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnodau\endcsname{##1}% |
| 2778 |
\chronos@ychwanegu@nodweddion{#1}{@tag}{% |
| 2779 |
/chronos/#1/fformat #2 cyfnodau gwahanol={##1}}% |
| 2780 |
}, |
| 2781 |
fformat #2/.forward to=/chronos/#1/fformat #2 yr un gyfnod, |
| 2782 |
fformat #2/.forward to=/chronos/#1/fformat #2 cyfnodau gwahanol, |
| 2783 |
fformat #3/.code={% |
| 2784 |
\expandafter\def\csname chronos@#1@fformat#3\endcsname{##1}% |
| 2785 |
\chronos@ychwanegu@nodweddion{#1}{@tag}{/chronos/#1/fformat #3={##1}}% |
| 2786 |
}, |
| 2787 |
fformat #2 yr un gyfnod/.chronos track={% |
| 2788 |
@#1@fformatiau@dyddiadau,@#1@cyfnodau,@#1@llawn}, |
| 2789 |
fformat #2 cyfnodau gwahanol/.chronos track={% |
| 2790 |
@#1@fformatiau@dyddiadau,@#1@cyfnodau,@#1@llawn}, |
| 2791 |
fformat #2/.chronos track={% |
| 2792 |
@#1@fformatiau@dyddiadau,@#1@cyfnodau,@#1@llawn}, |
| 2793 |
fformat #3/.chronos track={% |
| 2794 |
@#1@fformatiau@dyddiadau,@#1@cyfnodau,@#1@llawn}, |
| 2795 |
dangos cyfnodau/@blynyddoedd yn unig/.code={%^^A show eras + only years formats |
| 2796 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnod\endcsname{!Y}% |
| 2797 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnodau\endcsname{% |
| 2798 |
!Y\thinspace !E}% |
| 2799 |
\expandafter\def\csname chronos@#1@fformat#3\endcsname{!Y\thinspace !E}% |
| 2800 |
}, |
| 2801 |
dangos cyfnodau/@llawn/.code={% show eras + full dates formats |
| 2802 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnod\endcsname{!d/!m/!Y}% |
| 2803 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnodau\endcsname{% |
| 2804 |
!d/!m/!Y\thinspace !E}% |
| 2805 |
\expandafter\def\csname chronos@#1@fformat#3\endcsname{% |
| 2806 |
!d/!m/!Y\thinspace !E}% |
| 2807 |
}, |
| 2808 |
dangos cyfnodau/llawn/.code n args=3{%^^A show eras + full dates set formats |
| 2809 |
\pgfqkeys{/chronos/#1/dangos cyfnodau}{% |
| 2810 |
@llawn/.code={% |
| 2811 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnod\endcsname{##1}% |
| 2812 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnodau\endcsname{##2}% |
| 2813 |
\expandafter\def\csname chronos@#1@fformat#3\endcsname{##3}% |
| 2814 |
}% |
| 2815 |
}% |
| 2816 |
}, |
| 2817 |
dangos cyfnodau/blynyddoedd yn unig/.code n args=3{%^^A show eras + only years set formats |
| 2818 |
\pgfqkeys{/chronos/#1/dangos cyfnodau}{% |
| 2819 |
@blynyddoedd yn unig/.code={% |
| 2820 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnod\endcsname{##1}% |
| 2821 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnodau\endcsname{##2}% |
| 2822 |
\expandafter\def\csname chronos@#1@fformat#3\endcsname{##3}% |
| 2823 |
}% |
| 2824 |
}% |
| 2825 |
}, |
| 2826 |
heb gyfnodau/@blynyddoedd yn unig/.code={%^^A w/o eras + only years formats |
| 2827 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnod\endcsname{!Y}% |
| 2828 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnodau\endcsname{!Y}% |
| 2829 |
\expandafter\def\csname chronos@#1@fformat#3\endcsname{!Y}% |
| 2830 |
}, |
| 2831 |
heb gyfnodau/@llawn/.code={%^^A w/o eras + full dates formats |
| 2832 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnod\endcsname{!d/!m/!Y}% |
| 2833 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnodau\endcsname{!d/!m/!Y}% |
| 2834 |
\expandafter\def\csname chronos@#1@fformat#3\endcsname{!d/!m/!Y}% |
| 2835 |
}, |
| 2836 |
heb gyfnodau/llawn/.code n args=3{%^^A w/o eras + full dates set formats |
| 2837 |
\pgfqkeys{/chronos/#1/heb gyfnodau}{% |
| 2838 |
@llawn/.code={% |
| 2839 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnod\endcsname{##1}% |
| 2840 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnodau\endcsname{##2}% |
| 2841 |
\expandafter\def\csname chronos@#1@fformat#3\endcsname{##3}% |
| 2842 |
}% |
| 2843 |
}% |
| 2844 |
}, |
| 2845 |
heb gyfnodau/blynyddoedd yn unig/.code n args=3{%^^A w/o eras + only years set formats |
| 2846 |
\pgfqkeys{/chronos/#1/heb gyfnodau}{% |
| 2847 |
@blynyddoedd yn unig/.code={% |
| 2848 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnod\endcsname{##1}% |
| 2849 |
\expandafter\def\csname chronos@#1@fformat#2@cyfnodau\endcsname{##2}% |
| 2850 |
\expandafter\def\csname chronos@#1@fformat#3\endcsname{##3}% |
| 2851 |
}% |
| 2852 |
}% |
| 2853 |
}, |
| 2854 |
% \end{macrocode} |
| 2855 |
% english translations below |
| 2856 |
% \begin{macrocode} |
| 2857 |
blynyddoedd yn unig/.code={% |
| 2858 |
\chronos@ychwanegu@nodweddion{#1}{@tag}{/chronos/blynyddoedd yn unig}}, |
| 2859 |
dyddiadau llawn/.code={% |
| 2860 |
\chronos@ychwanegu@nodweddion{#1}{@tag}{/chronos/dyddiadau llawn}}, |
| 2861 |
dangos cyfnodau/.code={% |
| 2862 |
\chronos@ychwanegu@nodweddion{#1}{@tag}{/chronos/dangos cyfnodau}}, |
| 2863 |
heb gyfnodau/.code={% |
| 2864 |
\chronos@ychwanegu@nodweddion{#1}{@tag}{/chronos/heb gyfnodau}}, |
| 2865 |
dangos cyfnodau/.chronos track={@#1@cyfnodau}, |
| 2866 |
dyddiadau llawn/.chronos track={@#1@llawn}, |
| 2867 |
heb gyfnodau/.chronos track={@#1@cyfnodau}, |
| 2868 |
blynyddoedd yn unig/.chronos track={@#1@llawn}, |
| 2869 |
ffont dyddiad/.code={% |
| 2870 |
\expandafter\def\csname chronos@#1@ffontdyddiad\endcsname{##1}}, |
| 2871 |
ffont dyddiad=, |
| 2872 |
% \end{macrocode} |
| 2873 |
% begin saesneg: \verb|/chronos/#1| |
| 2874 |
% \begin{macrocode} |
| 2875 |
dates/.forward to=/chronos/#1/dyddiadau, |
| 2876 |
#8/.forward to=/chronos/#1/#2, |
| 2877 |
#9/.forward to=/chronos/#1/#3, |
| 2878 |
date formats/.forward to=/chronos/#1/fformatiau dyddiadau, |
| 2879 |
#8 format/.forward to=/chronos/#1/fformat #2, |
| 2880 |
same era #8 format/.forward to=/chronos/#1/fformat #2 yr un gyfnod, |
| 2881 |
different eras #8 format/.forward to=/chronos/#1/fformat #2 cyfnodau gwahanol, |
| 2882 |
#9 format/.forward to=/chronos/#1/fformat #3, |
| 2883 |
show eras/full/.forward to=/chronos/#1/dangos cyfnodau/llawn, |
| 2884 |
show eras/only years/.forward to=/chronos/#1/dangos cyfnodau/blynyddoedd yn unig, |
| 2885 |
without eras/full/.forward to=/chronos/#1/heb gyfnodau/llawn, |
| 2886 |
without eras/only years/.forward to=/chronos/#1/heb gyfnodau/blynyddoedd yn unig, |
| 2887 |
#8 label/.forward to=/chronos/#1/label #2, |
| 2888 |
#9 label/.forward to=/chronos/#1/label #3, |
| 2889 |
only years/.forward to=/chronos/#1/blynyddoedd yn unig, |
| 2890 |
full dates/.forward to=/chronos/#1/dyddiadau llawn, |
| 2891 |
without eras/.forward to=/chronos/#1/heb gyfnodau, |
| 2892 |
show eras/.forward to=/chronos/#1/dangos cyfnodau, |
| 2893 |
date font/.forward to=/chronos/#1/ffont dyddiad, |
| 2894 |
% \end{macrocode} |
| 2895 |
% end saesneg: \verb|/chronos/#1| |
| 2896 |
% \begin{macrocode} |
| 2897 |
}% |
| 2898 |
}, |
| 2899 |
% \end{macrocode} |
| 2900 |
%^^A END .chronos tag dyddiadau init |
| 2901 |
% \begin{macrocode} |
| 2902 |
/handlers/.chronos key maker/.code n args=3{% |
| 2903 |
\chronos@keymaker{#1}{#2}{#3}% |
| 2904 |
}, |
| 2905 |
% \end{macrocode} |
| 2906 |
%^^A END handlers >>> |
| 2907 |
%^^A BEGIN chronos (prif gôd) |
| 2908 |
% \begin{macrocode} |
| 2909 |
chronos/.code={\PackageError{chronos}{% |
| 2910 |
The key chronos is deprecated.\MessageBreak |
| 2911 |
Use the environment chronos instead.}}, |
| 2912 |
% \end{macrocode} |
| 2913 |
%^^A END chronos (prif gôd) |
| 2914 |
%^^A BEGIN byw | life (prif gôd) |
| 2915 |
% \begin{macrocode} |
| 2916 |
byw/.code={\chronos@cyd@destun@init@craidd{byw}{#1}}, |
| 2917 |
byw/.default={}, |
| 2918 |
% \end{macrocode} |
| 2919 |
%^^A END byw (prif gôd) |
| 2920 |
%^^A BEGIN digwyddiad | event (prif gôd) |
| 2921 |
% \begin{macrocode} |
| 2922 |
digwyddiad/.code={\chronos@cyd@destun@init@craidd{digwyddiad}{#1}}, |
| 2923 |
digwyddiad/.default={}, |
| 2924 |
% \end{macrocode} |
| 2925 |
%^^A END digwyddiad (prif gôd) |
| 2926 |
%^^A BEGIN parhad | period (prif gôd) |
| 2927 |
% \begin{macrocode} |
| 2928 |
parhad/.code={\chronos@cyd@destun@init@craidd{parhad}{#1}}, |
| 2929 |
parhad/.default={}, |
| 2930 |
% \end{macrocode} |
| 2931 |
%^^A END parhad (prif gôd) |
| 2932 |
%^^A BEGIN theori | theory (prif gôd) |
| 2933 |
% \begin{macrocode} |
| 2934 |
theori/.code={\chronos@cyd@destun@init@sylfaenol{theori}{#1}\chronos@tag@cysylltufalse}, |
| 2935 |
theori/.default={}, |
| 2936 |
% \end{macrocode} |
| 2937 |
%^^A END theori (prif gôd) |
| 2938 |
%^^A BEGIN cylch theori | theory circle (prif gôd) --- cylchau bychain heb gysylltiadau |
| 2939 |
% \begin{macrocode} |
| 2940 |
cylch theori/.code={% |
| 2941 |
\chronos@cyd@destun@init@sylfaenol@aux{theori/cylchau}{theori}{#1}% |
| 2942 |
\chronos@tag@cysylltufalse}, |
| 2943 |
cylch theori/.default={}, |
| 2944 |
% \end{macrocode} |
| 2945 |
%^^A END cylch theori (prif gôd) |
| 2946 |
%^^A BEGIN gwybodaeth | info (prif gôd) |
| 2947 |
% \begin{macrocode} |
| 2948 |
gwybodaeth/.code={% |
| 2949 |
\chronos@cyd@destun@init@sylfaenol{gwybodaeth}{#1}\chronos@tag@cysylltufalse}, |
| 2950 |
gwybodaeth/.default={}, |
| 2951 |
% \end{macrocode} |
| 2952 |
%^^A END gwybodaeth (prif gôd) |
| 2953 |
%^^A BEGIN prif (teitl) main (title) (prif gôd) |
| 2954 |
% \begin{macrocode} |
| 2955 |
prif/.code={\chronos@cyd@destun@init@star{prif}{#1}}, |
| 2956 |
prif/.default={}, |
| 2957 |
% \end{macrocode} |
| 2958 |
%^^A END prif (teitl) (prif gôd) |
| 2959 |
%^^A BEGIN hawlfraint copyright (prif gôd) |
| 2960 |
% \begin{macrocode} |
| 2961 |
hawlfraint/.code={\chronos@cyd@destun@init@star{hawlfraint}{#1}}, |
| 2962 |
hawlfraint/.default={}, |
| 2963 |
% \end{macrocode} |
| 2964 |
%^^A END hawlfraint copyright (prif gôd) |
| 2965 |
%^^A BEGIN saesneg byw digwyddiad parhad theori cylch theori prif |
| 2966 |
% \begin{macrocode} |
| 2967 |
life/.forward to=/tikz/byw, |
| 2968 |
event/.forward to=/tikz/digwyddiad, |
| 2969 |
period/.forward to=/tikz/parhad, |
| 2970 |
theory/.forward to=/tikz/theori, |
| 2971 |
theory circle/.forward to=/tikz/cylch theori, |
| 2972 |
main/.forward to=/tikz/prif, |
| 2973 |
copyright/.forward to=/tikz/hawlfraint, |
| 2974 |
copyleft/.forward to=/tikz/hawlfraint, |
| 2975 |
% \end{macrocode} |
| 2976 |
%^^A END saesneg byw digwyddiad parhad theori cylch theori prif |
| 2977 |
%^^A BEGIN top-level styles |
| 2978 |
% \begin{macrocode} |
| 2979 |
chronos connect/.style args={#1:#2}{#1,/chronos/@cysylltiad=lliw #2}, |
| 2980 |
chronos create chronos connector/.style args={#1:#2}{% |
| 2981 |
#1,/chronos/@cysylltwr@chronos=lliw #2}, |
| 2982 |
chronos create text tag connector/.style args={#1:#2}{% |
| 2983 |
#1,/chronos/@cysylltwr@testun=lliw #2}, |
| 2984 |
chronos mark line/.style args={#1:#2}{#1,/chronos/@llinell=lliw #2}, |
| 2985 |
chronos text tag/.style args={#1:#2}{#1,/chronos/@testun=lliw #2}, |
| 2986 |
chronos tikz'/.code={\pgfkeysdef{/chronos/@tikz}{#1}}, |
| 2987 |
chronos tikz+/.code={\pgfqkeys{/chronos}{@tikz/.append code={#1}}}, |
| 2988 |
chronos tikz/.forward to=/chronos tikz+, |
| 2989 |
chronos tikz outside bb'/.code={\pgfkeysdef{/chronos/@@tikz}{#1}}, |
| 2990 |
chronos tikz outside bb+/.code={\pgfqkeys{/chronos}{@@tikz/.append code={#1}}}, |
| 2991 |
chronos tikz outside bb/.forward to=/chronos tikz outside bb+, |
| 2992 |
% \end{macrocode} |
| 2993 |
%^^A END top-level styles |
| 2994 |
%^^A BEGIN llwybrau: /chronos /chronos/byw /chronos/digwyddiad /chronos/theori |
| 2995 |
% \begin{macrocode} |
| 2996 |
/chronos/.search also={/chronos/llinell amser,/tikz,/pgf}, |
| 2997 |
/chronos/llinell amser/.search also={/chronos,/tikz,/pgf}, |
| 2998 |
/chronos/byw/.search also={/chronos,/tikz,/pgf}, |
| 2999 |
/chronos/digwyddiad/.search also={/chronos,/tikz,/pgf}, |
| 3000 |
/chronos/parhad/.search also={/chronos,/tikz,/pgf}, |
| 3001 |
/chronos/theori/.search also={/chronos,/tikz,/pgf}, |
| 3002 |
/chronos/theori/cylchau/.search also={/chronos/theori,/chronos,/tikz,/pgf}, |
| 3003 |
% \end{macrocode} |
| 3004 |
%^^A END llwybrau: /chronos /chronos/byw /chronos/digwyddiad /chronos/theori |
| 3005 |
%^^A BEGIN /chronos <<< |
| 3006 |
% \begin{macrocode} |
| 3007 |
/chronos/.cd, |
| 3008 |
@before@headings/.code={}, |
| 3009 |
before headings+/.code={\pgfqkeys{/chronos}{@before@headings/.append code={#1}}}, |
| 3010 |
before headings'/.code={\pgfqkeys{/chronos}{@before@headings/.code={#1}}}, |
| 3011 |
before headings/.forward to=/chronos/before headings+, |
| 3012 |
@before@frame/.code={}, |
| 3013 |
before drawing frame+/.code={% |
| 3014 |
\pgfqkeys{/chronos}{@before@frame/.append code={#1}}}, |
| 3015 |
before drawing frame'/.code={\pgfqkeys{/chronos}{@before@frame/.code={#1}}}, |
| 3016 |
before drawing frame/.forward to=/chronos/before drawing frame+, |
| 3017 |
tikz'/.forward to=/tikz/chronos tikz', |
| 3018 |
tikz+/.forward to=/tikz/chronos tikz+, |
| 3019 |
tikz/.forward to=/tikz/chronos tikz, |
| 3020 |
tikz outside bb'/.forward to=/tikz/chronos tikz outside bb', |
| 3021 |
tikz outside bb+/.forward to=/tikz/chronos tikz outside bb+, |
| 3022 |
tikz outside bb/.forward to=/tikz/chronos tikz outside bb, |
| 3023 |
% \end{macrocode} |
| 3024 |
% @tikz is for standard ; @@tikz ignores bb ; for both user code and chronos |
| 3025 |
% \begin{macrocode} |
| 3026 |
@tikz/.style={}, |
| 3027 |
@@tikz/.style={}, |
| 3028 |
% \end{macrocode} |
| 3029 |
% @timeline@config is for indirect user code or overwritable chronos ; @@ is reserved for chronos |
| 3030 |
% \begin{macrocode} |
| 3031 |
@timeline@config/.code={}, |
| 3032 |
@@timeline@config/.code={% |
| 3033 |
\chronos@if@gosodF {@byw@cyfnodau} |
| 3034 |
{\pgfqkeys{/chronos/byw}{dangos cyfnodau}}% |
| 3035 |
\chronos@if@gosodF {@parhad@cyfnodau} |
| 3036 |
{\pgfqkeys{/chronos/parhad}{dangos cyfnodau}}% |
| 3037 |
\chronos@if@gosodF {@digwyddiad@cyfnodau} |
| 3038 |
{\pgfqkeys{/chronos/digwyddiad}{dangos cyfnodau}}% |
| 3039 |
\chronos@if@gosodF {@byw@llawn} |
| 3040 |
{\pgfqkeys{/chronos/byw}{blynyddoedd yn unig}}% |
| 3041 |
\chronos@if@gosodF {@parhad@llawn} |
| 3042 |
{\pgfqkeys{/chronos/parhad}{blynyddoedd yn unig}}% |
| 3043 |
\chronos@if@gosodF {@digwyddiad@llawn} |
| 3044 |
{\pgfqkeys{/chronos/digwyddiad}{dyddiadau llawn}}% |
| 3045 |
\chronos@if@gosodF{timeline@years} |
| 3046 |
{\pgfqkeys{/chronos/llinell amser}{blynyddoedd=ar y llinell}}% |
| 3047 |
\ifchronos@yearsonline |
| 3048 |
\chronos@ychwanegu@nodweddion@rhestr{byw,parhad}{@llinell}% |
| 3049 |
{fill=####1,fill opacity=.25,draw=none}% |
| 3050 |
\chronos@ychwanegu@nodweddion@rhestr{digwyddiad}{@llinell}% |
| 3051 |
{draw=####1,fill=none,opacity=.25}% |
| 3052 |
\else |
| 3053 |
\chronos@ychwanegu@nodweddion@rhestr{byw,parhad}{@llinell}% |
| 3054 |
{draw=####1,thick,fill opacity=.75}% |
| 3055 |
\chronos@ychwanegu@nodweddion@rhestr{digwyddiad}{@llinell}% |
| 3056 |
{draw=####1,draw opacity=.75,fill=none}% |
| 3057 |
\fi |
| 3058 |
% \end{macrocode} |
| 3059 |
% efaillai bod yn anghywir tan inni ailosod yn hwyrach!! \textbar{} maybe wrong until we reset later!! |
| 3060 |
% \begin{macrocode} |
| 3061 |
\let\timelineht\chronos@height |
| 3062 |
}, |
| 3063 |
@style/.style={}, |
| 3064 |
@@timeline@config@diwedd/.style={}, |
| 3065 |
@@timeline@config@dechrau/.style={}, |
| 3066 |
chronos tweak/.code={\pgfqkeys{/chronos}{@style/.append style={#1}}}, |
| 3067 |
chronos opacity/.code={% |
| 3068 |
\ifchronos@preset\chronos@temptrue\else\chronos@tempfalse\fi |
| 3069 |
\chronos@presettrue |
| 3070 |
\pgfqkeys{/chronos}{% |
| 3071 |
@style/.append style={transparency group,opacity=#1}, |
| 3072 |
every cysylltiadau+={opacity=#1}, |
| 3073 |
every cysylltwyr chronos+={opacity=#1}, |
| 3074 |
/chronos/prif/@frame/.append style={opacity=#1}, |
| 3075 |
/chronos/llinell amser/.cd, |
| 3076 |
llinell+={draw opacity=#1,fill opacity=#1}, |
| 3077 |
timeline@bare@mark@on@line/.append style={opacity=#1}, |
| 3078 |
timeline@minor@mark@on@line/.append style={opacity=#1}, |
| 3079 |
timeline@mark@on@line/.append style={opacity=#1}, |
| 3080 |
timeline@bare@mark@off@line/.append style={opacity=#1}, |
| 3081 |
timeline@minor@mark@off@line/.append style={opacity=#1}, |
| 3082 |
timeline@mark@off@line/.append style={opacity=#1}, |
| 3083 |
timeline@year@on@line/.append style={opacity=#1}, |
| 3084 |
timeline@year@ff@line/.append style={opacity=#1}, |
| 3085 |
border+={opacity=#1}}% |
| 3086 |
\ifchronos@temp\chronos@presettrue\else\chronos@presetfalse\fi |
| 3087 |
}, |
| 3088 |
% \end{macrocode} |
| 3089 |
%^^A BEGIN dyddiadau (pgfcalendar) |
| 3090 |
% \begin{macrocode} |
| 3091 |
set date aux/.code={% paid â geisio dorri hwn - mae'n torri pethau'n ddrwg ond *dim ond yn nifer bach o achosion felly rhy hawdd i feddwl bod popeth yn iawn ... |
| 3092 |
\chronos@set@date@aux{#1}% |
| 3093 |
}, |
| 3094 |
% \end{macrocode} |
| 3095 |
%^^A END dyddiadau (pgfcalendar) |
| 3096 |
%^^A BEGIN teitlau, pennawdau, isbennawdau etc. <<< |
| 3097 |
% \begin{macrocode} |
| 3098 |
headings+/.code={% |
| 3099 |
\chronos@headingstrue |
| 3100 |
\chronos@to@clist@append{headings}{#1}% |
| 3101 |
}, |
| 3102 |
heading+/.code n args=3{% name/content; start ; end |
| 3103 |
\chronos@headingstrue |
| 3104 |
\chronos@to@clist@append{headings}{#1/#2/#3}% |
| 3105 |
}, |
| 3106 |
subheading+/.code n args=4{% name/content; start ; end; pos |
| 3107 |
\chronos@headingstrue |
| 3108 |
\chronos@to@clist@append{subheadings}{#1/#2/#3/#4}% |
| 3109 |
}, |
| 3110 |
subheadings+/.code={% name/content; start ; end; pos |
| 3111 |
\chronos@headingstrue |
| 3112 |
\chronos@to@clist@append{subheadings}{#1}% |
| 3113 |
}, |
| 3114 |
heading'/.code n args=3{% |
| 3115 |
\chronos@headingstrue |
| 3116 |
\chronos@to@clist{headings}{#1/#2/#3}% |
| 3117 |
}, |
| 3118 |
headings'/.code={% |
| 3119 |
\chronos@headingstrue |
| 3120 |
\chronos@to@clist{headings}{#1}% |
| 3121 |
}, |
| 3122 |
subheading'/.code n args=4{% |
| 3123 |
\chronos@headingstrue |
| 3124 |
\chronos@to@clist{subheadings}{#1/#2/#3/#4}% |
| 3125 |
}, |
| 3126 |
subheadings'/.code={% |
| 3127 |
\chronos@headingstrue |
| 3128 |
\chronos@to@clist{subheadings}{#1}% |
| 3129 |
}, |
| 3130 |
century subheading+/.code 2 args={% name/content; start ; end; pos |
| 3131 |
\chronos@headingstrue |
| 3132 |
\chronos@global@to@clist@append{century_subheadings}{#1/#2}% |
| 3133 |
}, |
| 3134 |
century subheadings+/.code 2 args={% name/content; start ; end; pos |
| 3135 |
\chronos@headingstrue |
| 3136 |
\foreach \i in {#1} {\chronos@global@to@clist@append{century_subheadings}{\i/#2}}% |
| 3137 |
}, |
| 3138 |
century subheading'/.code 2 args={% name/content; start ; end; pos |
| 3139 |
\chronos@headingstrue |
| 3140 |
\chronos@global@to@clist{century_subheadings}{#1/#2}% |
| 3141 |
}, |
| 3142 |
century subheadings'/.code 2 args={% name/content; start ; end; pos |
| 3143 |
\chronos@headingstrue |
| 3144 |
\chronos@global@clear@to@clist{century_subheadings}% |
| 3145 |
\foreach \i in {#1} {\chronos@global@to@clist{century_subheadings}{\i/#2}}% |
| 3146 |
}, |
| 3147 |
heading/.forward to=/chronos/heading+, |
| 3148 |
headings/.forward to=/chronos/headings+, |
| 3149 |
subheading/.forward to=/chronos/subheading+, |
| 3150 |
subheadings/.forward to=/chronos/subheadings+, |
| 3151 |
century subheading/.forward to=/chronos/century subheading+, |
| 3152 |
century subheadings/.forward to=/chronos/century subheadings+, |
| 3153 |
subheadings drops/.chronos 2 dimens={\chronos@subheading@drop@uchod}% |
| 3154 |
{\chronos@subheading@drop@isod}, |
| 3155 |
heading drop/.chronos dimen=\chronos@heading@drop, |
| 3156 |
headings drops'/.code args={#1:#2:#3}{% |
| 3157 |
\chronos@heading@drop=#1 |
| 3158 |
\chronos@subheading@drop@uchod=#2 |
| 3159 |
\chronos@subheading@drop@isod=#3% |
| 3160 |
}, |
| 3161 |
headings drops'+/.code args={#1:#2:#3}{% |
| 3162 |
\advance \chronos@heading@drop by #1 |
| 3163 |
\advance \chronos@subheading@drop@uchod by #2 |
| 3164 |
\advance\chronos@subheading@drop@isod by #3% |
| 3165 |
}, |
| 3166 |
headings drops'-/.code args={#1:#2:#3}{% |
| 3167 |
\advance \chronos@heading@drop by -#1 |
| 3168 |
\advance \chronos@subheading@drop@uchod by -#2 |
| 3169 |
\advance\chronos@subheading@drop@isod by -#3% |
| 3170 |
}, |
| 3171 |
headings drops'=0pt:0pt:0pt, |
| 3172 |
chronos coords'/.code={\chronos@to@clist{dyddiadau_coords}{#1}}, |
| 3173 |
chronos coords+/.code={\chronos@to@clist@append{dyddiadau_coords}{#1}}, |
| 3174 |
chronos coords/.forward to=/chronos/chronos coords+, |
| 3175 |
frame/.is if=chronos@frame, |
| 3176 |
frame/.default=true, |
| 3177 |
frame uses bb/.is if=chronos@framedefnyddiobb, |
| 3178 |
frame/.default=true, |
| 3179 |
% \end{macrocode} |
| 3180 |
%^^A END teitlau, pennawdau, isbennawdau etc. >>> |
| 3181 |
% \begin{macrocode} |
| 3182 |
} |
| 3183 |
\ExplSyntaxOn |
| 3184 |
% \end{macrocode} |
| 3185 |
% set up every byw, every byw', every byw+, every life, every life', every life+ etc.; \verb|#3| gives default (' or +) |
| 3186 |
% \begin{macrocode} |
| 3187 |
\__chronos_kexpandtotags:nnn { byw } { life } { + } |
| 3188 |
\__chronos_kexpandtotags:nnn { digwyddiad } { event } { + } |
| 3189 |
\__chronos_kexpandtotags:nnn { parhad } { period } { + } |
| 3190 |
\__chronos_kexpandtotags:nnn { theori } { theory } { + } |
| 3191 |
\__chronos_kexpandtotags:nnn { gwybodaeth } { info } { + } |
| 3192 |
% \end{macrocode} |
| 3193 |
% like kexpander but without every keys |
| 3194 |
% \begin{macrocode} |
| 3195 |
\__chronos_kextripler:nnnnn { every ~ cylch ~ cylch ~ theori } |
| 3196 |
{ every ~ theory ~ circle ~ text } { every@cylch ~ cylch ~ theori } { + } |
| 3197 |
{ style } |
| 3198 |
\__chronos_kextripler:nnnnn { every ~ testun ~ cylch ~ theori } |
| 3199 |
{ every ~ theory ~ circle ~ circle } { every@testun ~ cylch ~ theori } |
| 3200 |
{ + } { style } |
| 3201 |
\__chronos_kextripler:nnnnn { llinell ~ amser / llinell } { timeline ~ line } |
| 3202 |
{ llinell ~ amser / timeline@line } { ' } { style } |
| 3203 |
\__chronos_kextripler:nnnnn { llinell ~ amser / border } { timeline ~ border } |
| 3204 |
{ llinell ~ amser / timeline@border } { ' } { style } |
| 3205 |
\__chronos_kextripler:nnnnn { prif / teitl } { prif / title } { prif / @teitl } |
| 3206 |
{ ' } { style } |
| 3207 |
\__chronos_kextripler:nnnnn { amserau } { subheadings ~ style } { @amserau } |
| 3208 |
{ ' } { style } |
| 3209 |
\__chronos_kextripler:nnnnn { amseraumawr } { headings ~ style } |
| 3210 |
{ @amseraumawr } { ' } { style } |
| 3211 |
\__chronos_kextripler:nnnnn { hawlfraint } { copyright } { @hawlfraint } |
| 3212 |
{ ' } { style } |
| 3213 |
\__chronos_kextripler:nnnnn { hawlfraint } { copyright } { @hawlfraint } { ' } |
| 3214 |
{ style } |
| 3215 |
\__chronos_kexforwardtriple:nn { hawlfraint } { copyleft } |
| 3216 |
\__chronos_kextripler:nnnn { timeline ~ config } {@timeline@config } { + } { code } |
| 3217 |
\__chronos_kextripler:nnnn { gwybodaeth / label } { gwybodaeth / @label } { ' } |
| 3218 |
{ style } |
| 3219 |
\__chronos_kextripler:nnnn { prif / frame } { prif / @frame } { ' } { style } |
| 3220 |
\__chronos_kextripler:nnnn { theori / cylchau / label } |
| 3221 |
{ theori / cylchau / @label } { ' } { style } |
| 3222 |
\ExplSyntaxOff |
| 3223 |
\pgfqkeys{/chronos}{% |
| 3224 |
% \end{macrocode} |
| 3225 |
%^^A BEGIN every (digwyddiad, byw, parhad, theori) <<< |
| 3226 |
% \begin{macrocode} |
| 3227 |
every@cylch cylch theori/.style={% |
| 3228 |
fill=chronos@prifliw, draw=chronos@prifliw, even odd rule}, |
| 3229 |
every@testun cylch theori/.style={% |
| 3230 |
decoration={text effects along path, text={#1}, text effects/.cd,% |
| 3231 |
fit text to path, text=chronos@prifliw@cefndir,% |
| 3232 |
characters={text along path, font=\scriptsize\scshape}}, decorate}, |
| 3233 |
every byw isod/.code={% |
| 3234 |
\chronos@every@byw@isodtrue |
| 3235 |
\chronos@every@byw@uchodfalse |
| 3236 |
\chronos@byw@isodtrue |
| 3237 |
}, |
| 3238 |
every digwyddiad isod/.code={% |
| 3239 |
\chronos@every@digwyddiad@isodtrue |
| 3240 |
\chronos@every@digwyddiad@uchodfalse |
| 3241 |
\chronos@digwyddiad@isodtrue |
| 3242 |
}, |
| 3243 |
every parhad isod/.code={% |
| 3244 |
\chronos@every@parhad@isodtrue |
| 3245 |
\chronos@every@parhad@uchodfalse |
| 3246 |
\chronos@parhad@isodtrue |
| 3247 |
}, |
| 3248 |
every byw uchod/.code={% |
| 3249 |
\chronos@every@byw@uchodtrue |
| 3250 |
\chronos@every@byw@isodfalse |
| 3251 |
\chronos@byw@isodfalse |
| 3252 |
}, |
| 3253 |
every digwyddiad uchod/.code={% |
| 3254 |
\chronos@every@digwyddiad@uchodtrue |
| 3255 |
\chronos@every@digwyddiad@isodfalse |
| 3256 |
\chronos@digwyddiad@isodfalse |
| 3257 |
}, |
| 3258 |
every parhad uchod/.code={% |
| 3259 |
\chronos@every@parhad@uchodtrue |
| 3260 |
\chronos@every@parhad@isodfalse |
| 3261 |
\chronos@parhad@isodfalse |
| 3262 |
}, |
| 3263 |
% \end{macrocode} |
| 3264 |
%^^A BEGIN every (digwyddiad, byw, parhad, theori) saesneg |
| 3265 |
% \begin{macrocode} |
| 3266 |
every life below/.forward to=/chronos/every byw isod, |
| 3267 |
every period below/.forward to=/chronos/every parhad isod, |
| 3268 |
every event below/.forward to=/chronos/every digwyddiad isod, |
| 3269 |
every life above/.forward to=/chronos/every byw uchod, |
| 3270 |
every period above/.forward to=/chronos/every parhad uchod, |
| 3271 |
every event above/.forward to=/chronos/every digwyddiad uchod, |
| 3272 |
% \end{macrocode} |
| 3273 |
%^^A END every (digwyddiad, byw, parhad, theori) saesneg |
| 3274 |
%^^A END every (digwyddiad, byw, parhad, theori) >>> |
| 3275 |
% \begin{macrocode} |
| 3276 |
} |
| 3277 |
\tikzset{% |
| 3278 |
% \end{macrocode} |
| 3279 |
%^^A BEGIN llinell amser | timeline <<< |
| 3280 |
% \begin{macrocode} |
| 3281 |
/chronos/llinell amser/.code={\pgfqkeys{/chronos/llinell amser}{#1}}, |
| 3282 |
/chronos/timeline/.forward to=/chronos/llinell amser, |
| 3283 |
/chronos/timeline/.chronos search=llinell amser, |
| 3284 |
/chronos/llinell amser/.cd, |
| 3285 |
timeline arrow/.is if=chronostimelinearrow, |
| 3286 |
timeline arrow/.default=true, |
| 3287 |
no timeline arrow/.code={\chronostimelinearrowfalse}, |
| 3288 |
timeline@arrow/.style={}, |
| 3289 |
no@timeline@arrow/.style={}, |
| 3290 |
do timeline arrow/.code={}, |
| 3291 |
conditional timeline arrow/.code 2 args={% |
| 3292 |
\pgfqkeys{/chronos}{% |
| 3293 |
llinell amser/.cd, |
| 3294 |
timeline@arrow/.style={/chronos/.cd,#1}, |
| 3295 |
no@timeline@arrow/.style={/chronos/.cd,#2}, |
| 3296 |
do timeline arrow/.add code={% |
| 3297 |
\ifchronostimelinearrow |
| 3298 |
\tikzset{/chronos/llinell amser/timeline@arrow}% |
| 3299 |
\else |
| 3300 |
\tikzset{/chronos/llinell amser/no@timeline@arrow}% |
| 3301 |
\fi |
| 3302 |
}, |
| 3303 |
}% |
| 3304 |
}, |
| 3305 |
% \end{macrocode} |
| 3306 |
%^^A BEGIN ffontiau |
| 3307 |
% \begin{macrocode} |
| 3308 |
ffont camau mawr/.store in=\chronos@ffont@camaumawr, |
| 3309 |
ffont camau bach/.store in=\chronos@ffont@camaubach, |
| 3310 |
ffont cyfnodau/.store in=\chronos@ffont@cyfnodau, |
| 3311 |
ffont/.forward to=/chronos/llinell amser/ffont cyfnodau, |
| 3312 |
ffont/.forward to=/chronos/llinell amser/ffont camau bach, |
| 3313 |
ffont/.forward to=/chronos/llinell amser/ffont camau mawr, |
| 3314 |
% \end{macrocode} |
| 3315 |
%^^A BEGIN ffontiau saesneg |
| 3316 |
% \begin{macrocode} |
| 3317 |
major step font/.forward to=/chronos/llinell amser/ffont camau mawr, |
| 3318 |
minor step font/.forward to=/chronos/llinell amser/ffont camau bach, |
| 3319 |
eras font/.forward to=/chronos/llinell amser/ffont cyfnodau, |
| 3320 |
timeline font/.forward to=/chronos/llinell amser/ffont, |
| 3321 |
% \end{macrocode} |
| 3322 |
%^^A END ffontiau saesneg |
| 3323 |
%^^A END ffontiau |
| 3324 |
%^^A BEGIN llinell amser | timeline |
| 3325 |
%^^A BEGIN hydoedd % haenau (dim dyfnder?) |
| 3326 |
% \begin{macrocode} |
| 3327 |
border ar/.chronos layer choice=border, |
| 3328 |
border ar=background, |
| 3329 |
llinell amser ar/.chronos layer choice=llinell amser, |
| 3330 |
llinell amser ar=foreground, |
| 3331 |
% \end{macrocode} |
| 3332 |
%^^A BEGIN hydoedd & haenau saesneg |
| 3333 |
% \begin{macrocode} |
| 3334 |
border on/.forward to=/chronos/llinell amser/border ar, |
| 3335 |
timeline on/.forward to=/chronos/llinell amser/llinell amser ar, |
| 3336 |
% \end{macrocode} |
| 3337 |
%^^A END hydoedd & haenau saesneg |
| 3338 |
%^^A END hydoedd & haenau |
| 3339 |
%^^A BEGIN dyddiadau |
| 3340 |
% \begin{macrocode} |
| 3341 |
dyddiad diwedd/.style={% |
| 3342 |
/chronos/@@timeline@config@diwedd/.code={% |
| 3343 |
\pgfqkeys{/chronos}{set date aux/.expanded={#1-12-31-0@end}}% |
| 3344 |
}, |
| 3345 |
}, |
| 3346 |
dyddiad dechrau/.style={% |
| 3347 |
/chronos/@@timeline@config@dechrau/.code={% |
| 3348 |
\pgfqkeys{/chronos}{set date aux/.expanded={#1-01-01-0@start}}% |
| 3349 |
}, |
| 3350 |
}, |
| 3351 |
dyddiadau/.code args={#1:#2}{%^^A angen y llinell nesaf am y saesneg yn unig <= ???!! |
| 3352 |
\pgfqkeys{/chronos/llinell amser}{dyddiad dechrau=#1,dyddiad diwedd=#2}% |
| 3353 |
}, |
| 3354 |
% \end{macrocode} |
| 3355 |
%^^A END dyddiadau |
| 3356 |
%^^A BEGIN camau |
| 3357 |
% \begin{macrocode} |
| 3358 |
cam blwyddyn fawr/.store in=\chronos@cam@blwyddyn@fawr, %^^A oedd cam mawr |
| 3359 |
cam blwyddyn fach/.store in=\chronos@cam@blwyddyn@fach, %^^A oedd cam bach |
| 3360 |
rhaniadau cam/.store in=\chronos@camrhaniadau,%^^A cam rhaniadau %^^A oedd camau bach / \chronos@minorsteps |
| 3361 |
camu o flwyddyn/.store in=\chronos@stepfrom, |
| 3362 |
cam blwyddyn/.code={% |
| 3363 |
\pgfqkeys{/chronos/llinell amser}{cam blwyddyn fawr=#1}% |
| 3364 |
\Undefine\chronos@cam@blwyddyn@fach |
| 3365 |
}, |
| 3366 |
% \end{macrocode} |
| 3367 |
%^^A END camau |
| 3368 |
%^^A BEGIN lliwiau y llinell amser |
| 3369 |
% \begin{macrocode} |
| 3370 |
lliw mewnol y border/.chronos lliw=borderinner, |
| 3371 |
timeline border inner colour/.forward to=/chronos/llinell amser/lliw mewnol y border, |
| 3372 |
timeline border inner color/.forward to=/chronos/llinell amser/lliw mewnol y border, |
| 3373 |
lliw allanol y border/.chronos lliw=borderouter, |
| 3374 |
timeline border outer colour/.forward to=/chronos/llinell amser/lliw allanol y border, |
| 3375 |
timeline border outer color/.forward to=/chronos/llinell amser/lliw allanol y border, |
| 3376 |
lliw canol y border/.chronos lliw=bordermiddle, |
| 3377 |
timeline border middle colour/.forward to=/chronos/llinell amser/lliw canol y border, |
| 3378 |
timeline border middle color/.forward to=/chronos/llinell amser/lliw canol y border, |
| 3379 |
cefndir/.chronos lliw=lliw@cefndir@llinell, |
| 3380 |
blaendir/.chronos lliw=lliw@llinell, |
| 3381 |
timeline background/.forward to=/chronos/llinell amser/cefndir, |
| 3382 |
timeline foreground/.forward to=/chronos/llinell amser/blaendir, |
| 3383 |
background/.forward to=/chronos/llinell amser/cefndir, |
| 3384 |
foreground/.forward to=/chronos/llinell amser/blaendir, |
| 3385 |
% \end{macrocode} |
| 3386 |
%^^A END lliwiau y llinell amser |
| 3387 |
%^^A BEGIN nodau a blynyddoedd | marks and years |
| 3388 |
% \begin{macrocode} |
| 3389 |
nodi cyfnodau/.is if=chronos@markeras,% cyfnodau ar y llinell amser |
| 3390 |
@nodi cyfnodau/.code={\chronos@ychwanegu@gosod{markeras}}, |
| 3391 |
nodi cyfnodau/.forward to=/chronos/llinell amser/@nodi cyfnodau, |
| 3392 |
timeline mark eras/.forward to=/chronos/llinell amser/nodi cyfnodau, |
| 3393 |
mark eras/.forward to=/chronos/llinell amser/nodi cyfnodau, |
| 3394 |
timeline years set/.store in=\chronos@timelineyears, |
| 3395 |
blynyddoedd/.is choice, |
| 3396 |
timeline years/.forward to=/chronos/llinell amser/blynyddoedd, |
| 3397 |
% \end{macrocode} |
| 3398 |
%^^A blynyddoedd y llinell amser/.forward to=/chronos/llinell amser/blynyddoedd, |
| 3399 |
% \begin{macrocode} |
| 3400 |
blynyddoedd/.forward to=/chronos/llinell amser/timeline years set, |
| 3401 |
blynyddoedd/dim/.code={% |
| 3402 |
\chronos@timeline@showyearsfalse |
| 3403 |
\chronos@blynyddoedduchodfalse |
| 3404 |
\chronos@blynyddoeddisodfalse |
| 3405 |
\pgfqkeys{/chronos/llinell amser}{% |
| 3406 |
timeline@years/.style={}, |
| 3407 |
angor blynyddoedd=base, |
| 3408 |
}% |
| 3409 |
},% oedd /chronos/llinell amser/heb flynyddoedd |
| 3410 |
blynyddoedd/none/.forward to=/chronos/llinell amser/blynyddoedd/dim,%^^A oedd /chronos/timeline no years |
| 3411 |
blynyddoedd/uchod/.code={% |
| 3412 |
\chronos@yearsonlinefalse |
| 3413 |
\chronos@blynyddoedduchodtrue |
| 3414 |
\chronos@blynyddoeddisodfalse |
| 3415 |
\pgfqkeys{/chronos/llinell amser}{% |
| 3416 |
timeline@years/.style={% |
| 3417 |
above, anchor=\chronos@timelineyearsanchor, yshift=.5*\chronos@height}, |
| 3418 |
angor blynyddoedd=south, |
| 3419 |
}% |
| 3420 |
}, |
| 3421 |
blynyddoedd/above/.forward to=/chronos/llinell amser/blynyddoedd/uchod, |
| 3422 |
blynyddoedd/isod/.code={% |
| 3423 |
\chronos@yearsonlinefalse |
| 3424 |
\chronos@blynyddoedduchodfalse |
| 3425 |
\chronos@blynyddoeddisodtrue |
| 3426 |
\pgfqkeys{/chronos/llinell amser}{% |
| 3427 |
timeline@years/.style={% |
| 3428 |
below, anchor=\chronos@timelineyearsanchor, yshift=-.5*\chronos@height}, |
| 3429 |
angor blynyddoedd=north, |
| 3430 |
}% |
| 3431 |
}, |
| 3432 |
blynyddoedd/below/.forward to=/chronos/llinell amser/blynyddoedd/isod, |
| 3433 |
blynyddoedd/ar y llinell/.code={% |
| 3434 |
\chronos@yearsonlinetrue |
| 3435 |
\chronos@blynyddoedduchodfalse |
| 3436 |
\chronos@blynyddoeddisodfalse |
| 3437 |
\pgfqkeys{/chronos/llinell amser}{% |
| 3438 |
timeline@years/.style={anchor=\chronos@timelineyearsanchor}, |
| 3439 |
angor blynyddoedd=center, |
| 3440 |
}% |
| 3441 |
}, |
| 3442 |
blynyddoedd/on line/.forward to=/chronos/llinell amser/blynyddoedd/ar y llinell, |
| 3443 |
blynyddoedd/off line/.code={% |
| 3444 |
\IfBooleanExprTF {% |
| 3445 |
! ( \LegacyBoolean {chronos@blynyddoedduchod} % |
| 3446 |
|| \LegacyBoolean {chronos@blynyddoeddisod} ) |
| 3447 |
}{% |
| 3448 |
\pgfqkeys{/chronos/llinell amser}{blynyddoedd=uchod}% |
| 3449 |
}{% |
| 3450 |
\chronos@yearsonlinefalse |
| 3451 |
}% |
| 3452 |
}, |
| 3453 |
blynyddoedd/.chronos track=timeline@years, |
| 3454 |
angor blynyddoedd/.store in=\chronos@timelineyearsanchor, |
| 3455 |
angor blynyddoedd/.chronos track={angor@blynyddoedd}, |
| 3456 |
timeline years anchor/.forward to=/chronos/llinell amser/angor blynyddoedd, |
| 3457 |
blwyddyn sero/.is if=chronos@yearzero, |
| 3458 |
year zero/.forward to=/chronos/llinell amser/blwyddyn sero, |
| 3459 |
mark at era switch/.is if=chronos@markateraswitch, |
| 3460 |
mark at era switch/.default=true, |
| 3461 |
@mark at era switch/.code={\chronos@ychwanegu@gosod{markateraswitch}}, |
| 3462 |
mark at era switch/.forward to=/chronos/llinell amser/@mark at era switch, |
| 3463 |
year at era switch/.code={% |
| 3464 |
\chronos@legacy@if@set{chronos@temp}{#1}% |
| 3465 |
\ifchronos@temp |
| 3466 |
\chronos@markateraswitchfalse |
| 3467 |
\else |
| 3468 |
\chronos@markateraswitchtrue |
| 3469 |
\fi |
| 3470 |
\chronos@ychwanegu@gosod{markateraswitch}}, |
| 3471 |
year at era switch/.default=true, |
| 3472 |
blynyddoedd bychain/.is if=chronos@minoryears, |
| 3473 |
blynyddoedd bychain/.default=true, |
| 3474 |
minor years/.forward to=/chronos/llinell amser/blynyddoedd bychain, |
| 3475 |
nodau/.is if=chronos@marks, |
| 3476 |
nodau/.default=true, |
| 3477 |
timeline marks/.forward to=/chronos/llinell amser/nodau, |
| 3478 |
nodau bach/.is if=chronos@marks@minor, |
| 3479 |
nodau bach/.default=true, |
| 3480 |
timeline minor marks/.forward to=/chronos/llinell amser/nodau bach, |
| 3481 |
dangos blynyddoedd/.is if=chronos@timeline@showyears, |
| 3482 |
dangos blynyddoedd/.default=true, |
| 3483 |
timeline show years/.forward to=/chronos/llinell amser/dangos blynyddoedd, |
| 3484 |
nodau noeth/.is if=chronos@marks@bare, |
| 3485 |
nodau noeth/.default=true, |
| 3486 |
nodau noeth/.chronos track={@bare}, |
| 3487 |
timeline bare marks/.forward to=/chronos/llinell amser/nodau noeth, |
| 3488 |
timeline@year@off@line/.style={% |
| 3489 |
text=chronos@lliw@llinell, text opacity=1, align=center, % |
| 3490 |
fill opacity=.75, anchor=\chronos@timelineyearsanchor}, |
| 3491 |
timeline@mark@off@line/.style={draw=chronos@lliw@llinell,% |
| 3492 |
{Triangle[width=0pt 3,reversed,length=0pt 1.5]}-, thin, shorten >=-2.5pt}, |
| 3493 |
timeline@minor@mark@off@line/.style={draw=chronos@lliw@llinell,% |
| 3494 |
{Triangle[width=0pt 3,reversed,length=0pt 1.5]}-, very thin,% |
| 3495 |
shorten >=-2.5pt}, |
| 3496 |
era switch off line/.style={thick, shorten >=0pt}, |
| 3497 |
timeline@bare@mark@off@line/.style={draw=chronos@lliw@llinell,% |
| 3498 |
{Triangle[width=0pt 3,reversed,length=0pt 1.5]}-, very thin,% |
| 3499 |
shorten >=-1.5pt}, |
| 3500 |
timeline@year@on@line/.style={text=chronos@lliw@llinell, anchor=center}, |
| 3501 |
timeline@mark@on@line/.style={draw=chronos@lliw@llinell}, |
| 3502 |
timeline@minor@mark@on@line/.style={draw=chronos@lliw@llinell, thin}, |
| 3503 |
timeline@bare@mark@on@line/.style={draw=chronos@lliw@llinell, thick}, |
| 3504 |
timeline mark@too/.code={% |
| 3505 |
\pgfqkeys{/chronos/llinell amser}{% |
| 3506 |
timeline@mark@on@line/.append style={#1}, |
| 3507 |
timeline@mark@off@line/.append style={#1}, |
| 3508 |
}% |
| 3509 |
}, |
| 3510 |
timeline minor mark@too/.code={% |
| 3511 |
\pgfqkeys{/chronos/llinell amser}{% |
| 3512 |
timeline minor marks, |
| 3513 |
timeline@minor@mark@on@line/.append style={#1}, |
| 3514 |
timeline@minor@mark@off@line/.append style={#1}, |
| 3515 |
}% |
| 3516 |
}, |
| 3517 |
timeline bare mark@too/.code={% |
| 3518 |
\pgfqkeys{/chronos/llinell amser}{% |
| 3519 |
timeline bare marks, |
| 3520 |
timeline@bare@mark@on@line/.append style={#1}, |
| 3521 |
timeline@bare@mark@off@line/.append style={#1}, |
| 3522 |
}% |
| 3523 |
}, |
| 3524 |
timeline year@too/.code={% |
| 3525 |
\pgfqkeys{/chronos/llinell amser}{% |
| 3526 |
timeline@year@on@line/.append style={#1}, |
| 3527 |
timeline@year@off@line/.append style={#1}, |
| 3528 |
}% |
| 3529 |
}, |
| 3530 |
% \end{macrocode} |
| 3531 |
%^^A END nodau a blynyddoedd | marks and years |
| 3532 |
%^^A END llinell amser | timeline >>> |
| 3533 |
% \begin{macrocode} |
| 3534 |
} |
| 3535 |
\ExplSyntaxOn |
| 3536 |
% \end{macrocode} |
| 3537 |
% forward each key in \#3 to the key in \#2; all keys on /chronos/\#1 |
| 3538 |
% \begin{macrocode} |
| 3539 |
\__chronos_kexforwarder:nnn { llinell ~ amser } { timeline ~ mark@too } |
| 3540 |
{ timeline ~ mark, timeline ~ all ~ marks } |
| 3541 |
\__chronos_kexforwarder:nnn { llinell ~ amser } { timeline ~ minor ~ mark@too } |
| 3542 |
{ timeline ~ minor ~ mark, timeline ~ all ~ marks } |
| 3543 |
\__chronos_kexforwarder:nnn { llinell ~ amser } { timeline ~ bare ~ mark@too } |
| 3544 |
{ timeline ~ bare ~ mark, timeline ~ all ~ marks } |
| 3545 |
\__chronos_kexforwarder:nnn { llinell ~ amser } { timeline ~ year@too } |
| 3546 |
{ timeline ~ year, timeline ~ all ~ marks } |
| 3547 |
\__chronos_kexforwarder:nnn { llinell ~ amser } {dyddiadau } { dates } |
| 3548 |
\__chronos_kexforwarder:nnn { llinell ~ amser } {dyddiad ~ dechrau } |
| 3549 |
{ dechrau, start ~ date, start } |
| 3550 |
\__chronos_kexforwarder:nnn { llinell ~ amser } {dyddiad ~ diwedd } |
| 3551 |
{ diwedd, end ~ date, end } |
| 3552 |
\__chronos_kexforwarder:nnn { llinell ~ amser } {cam ~ blwyddyn ~ fawr } |
| 3553 |
{ step ~ major ~ years, step ~ major ~ year, cam ~ blwyddyn ~ mawr } |
| 3554 |
\__chronos_kexforwarder:nnn { llinell ~ amser } {cam ~ blwyddyn ~ fach } |
| 3555 |
{ cam ~ blynyddoedd ~ bach, step ~ minor ~ years, step ~ minor ~ year } |
| 3556 |
\__chronos_kexforwarder:nnn { llinell ~ amser } {rhaniadau ~ cam } |
| 3557 |
{ step ~ divisions } %^^A oedd camau bach, minor steps |
| 3558 |
\__chronos_kexforwarder:nnn { llinell ~ amser } {cam ~ blwyddyn } |
| 3559 |
{ cam ~ blynyddoedd, step ~ years, step ~ year } |
| 3560 |
\__chronos_kexforwarder:nnn { llinell ~ amser } {camu ~ o ~ flwyddyn } |
| 3561 |
{ step ~ from ~ year } |
| 3562 |
\ExplSyntaxOff |
| 3563 |
\pgfqkeys{/chronos}{% |
| 3564 |
% \end{macrocode} |
| 3565 |
%^^A BEGIN testun |
| 3566 |
% \begin{macrocode} |
| 3567 |
ce year label/.store in=\chronos@yearce, |
| 3568 |
bce year label/.store in=\chronos@yearbce, |
| 3569 |
timeline ce label/.store in=\chronos@ce, |
| 3570 |
timeline bce label/.store in=\chronos@bce, |
| 3571 |
% \end{macrocode} |
| 3572 |
%^^A END testun |
| 3573 |
%^^A BEGIN lliwiau <<< |
| 3574 |
% \begin{macrocode} |
| 3575 |
cefndir/.chronos lliw=prifliw@cefndir, |
| 3576 |
background/.forward to=/chronos/cefndir, |
| 3577 |
blaendir/.chronos lliw=prifliw, |
| 3578 |
foreground/.forward to=/chronos/blaendir, |
| 3579 |
troi lliwiau/.code={% |
| 3580 |
\chronos@ychwanegu@nodweddion@rhag{@tag}{/chronos/troi lliwiau=#1}% |
| 3581 |
\chronos@legacy@if@set{chronos@troilliwiau}{#1}% |
| 3582 |
}, |
| 3583 |
troi lliwiau/.default=true, |
| 3584 |
colour rotation/.forward to=/chronos/troi lliwiau, |
| 3585 |
color rotation/.forward to=/chronos/troi lliwiau, |
| 3586 |
heb droi lliwiau/.code={% |
| 3587 |
\chronos@ychwanegu@nodweddion@rhag{@tag}{/chronos/troi lliwiau=false}% |
| 3588 |
\chronos@troilliwiaufalse |
| 3589 |
}, |
| 3590 |
no colour rotation/.forward to=/chronos/heb droi lliwiau, |
| 3591 |
no color rotation/.forward to=/chronos/heb droi lliwiau, |
| 3592 |
troi pob liw/.style={/chronos/.cd, byw/troi lliwiau=true,% |
| 3593 |
digwyddiad/troi lliwiau=true, parhad/troi lliwiau=true, % |
| 3594 |
theori/troi lliwiau=true, troi lliwiau=true}, |
| 3595 |
rotate all colours/.forward to=/chronos/troi pob liw, |
| 3596 |
rotate all colors/.forward to=/chronos/troi pob liw, |
| 3597 |
troi dim lliwiau/.style={/chronos/.cd, byw/troi lliwiau=false,% |
| 3598 |
digwyddiad/troi lliwiau=false, parhad/troi lliwiau=false,% |
| 3599 |
theori/troi lliwiau=false, heb droi lliwiau}, |
| 3600 |
rotate no colours/.forward to=/chronos/troi dim lliwiau, |
| 3601 |
rotate no colors/.forward to=/chronos/troi dim lliwiau, |
| 3602 |
% \end{macrocode} |
| 3603 |
%^^A END lliwiau >>> |
| 3604 |
%^^A BEGIN lefelau <<< |
| 3605 |
% \begin{macrocode} |
| 3606 |
lefelau/.style args={#1:#2}{ |
| 3607 |
/chronos/uchod=#1, |
| 3608 |
/chronos/isod=#2, |
| 3609 |
}, |
| 3610 |
lefelau at/.store in=\chronos@lefelau@at, |
| 3611 |
lefelau at=chronos mid, |
| 3612 |
uchod/.store in=\chronos@uchod, |
| 3613 |
isod/.store in=\chronos@isod, |
| 3614 |
% \end{macrocode} |
| 3615 |
%^^A END lefelau >>> |
| 3616 |
%^^A BEGIN formats <<< |
| 3617 |
% \begin{macrocode} |
| 3618 |
fformat dyddiad/.code={\chronos@setdateformat{#1}}, |
| 3619 |
date format/.forward to=/chronos/fformat dyddiad, |
| 3620 |
year format/.code={\chronos@setyearformat{#1}}, |
| 3621 |
minor year format/.code={\chronos@setminoryearformat{#1}}, |
| 3622 |
dangos cyfnodau/@blynyddoedd yn unig/.code={% |
| 3623 |
\chronos@setdateformat{!Y\thinspace !E}% |
| 3624 |
}, |
| 3625 |
dangos cyfnodau/@llawn/.code={\chronos@setdateformat{!d/!m/!Y\thinspace !E}}, |
| 3626 |
dangos cyfnodau/llawn/.code={% |
| 3627 |
\pgfqkeys{/chronos/dangos cyfnodau}{% |
| 3628 |
@llawn/.code={\chronos@setdateformat{#1}}% |
| 3629 |
}% |
| 3630 |
}, |
| 3631 |
dangos cyfnodau/blynyddoedd yn unig/.code={% |
| 3632 |
\pgfqkeys{/chronos/dangos cyfnodau}{% |
| 3633 |
@blynyddoedd yn unig/.code={\chronos@setdateformat{#1}}% |
| 3634 |
}% |
| 3635 |
}, |
| 3636 |
heb gyfnodau/@blynyddoedd yn unig/.code={\chronos@setdateformat{!Y}}, |
| 3637 |
heb gyfnodau/@llawn/.code={\chronos@setdateformat{!d/!m/!Y}}, |
| 3638 |
heb gyfnodau/llawn/.code={% |
| 3639 |
\pgfqkeys{/chronos/heb gyfnodau}{@llawn/.code={\chronos@setdateformat{#1}}}% |
| 3640 |
}, |
| 3641 |
heb gyfnodau/blynyddoedd yn unig/.code={% |
| 3642 |
\pgfqkeys{/chronos/heb gyfnodau}{% |
| 3643 |
@blynyddoedd yn unig/.code={\chronos@setdateformat{#1}}% |
| 3644 |
}% |
| 3645 |
}, |
| 3646 |
blynyddoedd yn unig/.code={% |
| 3647 |
\chronos@ychwanegu@nodweddion@rhag{@tag}{/chronos/blynyddoedd yn unig}% |
| 3648 |
\chronos@ychwanegu@nodweddion{byw}{@tag}{/chronos/blynyddoedd yn unig}% |
| 3649 |
\chronos@ychwanegu@nodweddion{digwyddiad}{@tag}{/chronos/blynyddoedd yn unig}% |
| 3650 |
\chronos@ychwanegu@nodweddion{parhad}{@tag}{/chronos/blynyddoedd yn unig}% |
| 3651 |
\chronos@dimondblynyddoeddtrue |
| 3652 |
\ifchronos@dangoscyfnodau |
| 3653 |
\pgfqkeys{/chronos}{% |
| 3654 |
dangos cyfnodau/@blynyddoedd yn unig, |
| 3655 |
}% |
| 3656 |
\else |
| 3657 |
\pgfqkeys{/chronos}{% |
| 3658 |
heb gyfnodau/@blynyddoedd yn unig, |
| 3659 |
}% |
| 3660 |
\fi |
| 3661 |
}, |
| 3662 |
only years/.forward to=/chronos/blynyddoedd yn unig, |
| 3663 |
dyddiadau llawn/.code={% |
| 3664 |
\chronos@ychwanegu@nodweddion@rhag{@tag}{/chronos/dyddiadau llawn}% |
| 3665 |
\chronos@ychwanegu@nodweddion{byw}{@tag}{/chronos/dyddiadau llawn}% |
| 3666 |
\chronos@ychwanegu@nodweddion{digwyddiad}{@tag}{/chronos/dyddiadau llawn}% |
| 3667 |
\chronos@ychwanegu@nodweddion{parhad}{@tag}{/chronos/dyddiadau llawn}% |
| 3668 |
\chronos@dimondblynyddoeddfalse |
| 3669 |
\ifchronos@dangoscyfnodau |
| 3670 |
\pgfqkeys{/chronos}{% |
| 3671 |
dangos cyfnodau/@llawn, |
| 3672 |
}% |
| 3673 |
\else |
| 3674 |
\pgfqkeys{/chronos}{% |
| 3675 |
heb gyfnodau/@llawn, |
| 3676 |
}% |
| 3677 |
\fi |
| 3678 |
}, |
| 3679 |
full dates/.forward to=/chronos/dyddiadau llawn, |
| 3680 |
dangos cyfnodau/.code={% |
| 3681 |
\chronos@ychwanegu@nodweddion@rhag{@tag}{/chronos/dangos cyfnodau}% |
| 3682 |
\chronos@ychwanegu@nodweddion{byw}{@tag}{/chronos/dangos cyfnodau}% |
| 3683 |
\chronos@ychwanegu@nodweddion{digwyddiad}{@tag}{/chronos/dangos cyfnodau}% |
| 3684 |
\chronos@ychwanegu@nodweddion{parhad}{@tag}{/chronos/dangos cyfnodau}% |
| 3685 |
\chronos@dangoscyfnodautrue |
| 3686 |
\ifchronos@dimondblynyddoedd |
| 3687 |
\pgfqkeys{/chronos}{% |
| 3688 |
dangos cyfnodau/@blynyddoedd yn unig, |
| 3689 |
}% |
| 3690 |
\else |
| 3691 |
\pgfqkeys{/chronos}{% |
| 3692 |
dangos cyfnodau/@llawn, |
| 3693 |
}% |
| 3694 |
\fi |
| 3695 |
}, |
| 3696 |
show eras/.forward to=/chronos/dangos cyfnodau, |
| 3697 |
heb gyfnodau/.code={% |
| 3698 |
\chronos@ychwanegu@nodweddion@rhag{@tag}{/chronos/heb gyfnodau}% |
| 3699 |
\chronos@ychwanegu@nodweddion{byw}{@tag}{/chronos/heb gyfnodau}% |
| 3700 |
\chronos@ychwanegu@nodweddion{digwyddiad}{@tag}{/chronos/heb gyfnodau}% |
| 3701 |
\chronos@ychwanegu@nodweddion{parhad}{@tag}{/chronos/heb gyfnodau}% |
| 3702 |
\chronos@dangoscyfnodaufalse |
| 3703 |
\ifchronos@dimondblynyddoedd |
| 3704 |
\pgfqkeys{/chronos}{% |
| 3705 |
heb gyfnodau/@blynyddoedd yn unig, |
| 3706 |
}% |
| 3707 |
\else |
| 3708 |
\pgfqkeys{/chronos}{% |
| 3709 |
heb gyfnodau/@llawn, |
| 3710 |
}% |
| 3711 |
\fi |
| 3712 |
}, |
| 3713 |
without eras/.forward to=/chronos/heb gyfnodau, |
| 3714 |
show eras/only years/.forward to=/chronos/dangos cyfnodau/blynyddoedd yn unig, |
| 3715 |
show eras/full dates/.forward to=/chronos/dangos cyfnodau/dyddiadau llawn, |
| 3716 |
without eras/only years/.forward to=/chronos/heb gyfnodau/blynyddoedd yn unig, |
| 3717 |
without eras/full dates/.forward to=/chronos/heb gyfnodau/dyddiadau llawn, |
| 3718 |
heb gyfnodau/.chronos track={@digwyddiad@cyfnodau,@byw@cyfnodau,@parhad@cyfnodau}, |
| 3719 |
dangos cyfnodau/.chronos track={@digwyddiad@cyfnodau,@byw@cyfnodau,@parhad@cyfnodau}, |
| 3720 |
dyddiadau llawn/.chronos track={@digwyddiad@llawn,@byw@llawn,@parhad@llawn}, |
| 3721 |
blynyddoedd yn unig/.chronos track={@digwyddiad@llawn,@byw@llawn,@parhad@llawn}, |
| 3722 |
% \end{macrocode} |
| 3723 |
% \changes{v0.9.4}{2026-03-21}{Fix non-working \texttt{every date format} key.} |
| 3724 |
% \begin{macrocode} |
| 3725 |
every date format/.code={%^^A defnyddio macros yn lle allweddau rhag ofn , yn #1 => pam ar ddaear? |
| 3726 |
\chronos@setdateformat{#1}% |
| 3727 |
\pgfqkeys{/chronos}{% |
| 3728 |
digwyddiad/fformat dyddiad={#1}, |
| 3729 |
parhad/fformatiau dyddiadau={#1:#1:#1}, |
| 3730 |
byw/fformatiau dyddiadau={#1:#1:#1}, |
| 3731 |
}% |
| 3732 |
}, |
| 3733 |
every date format/.chronos track={% |
| 3734 |
@digwyddiad@fformatiau@dyddiadau,@digwyddiad@cyfnodau,@digwyddiad@llawn}, |
| 3735 |
every date format/.chronos track={% |
| 3736 |
@byw@fformatiau@dyddiadau,@byw@cyfnodau,@byw@llawn}, |
| 3737 |
every date format/.chronos track={% |
| 3738 |
@parhad@fformatiau@dyddiadau,@parhad@cyfnodau,@parhad@llawn}, |
| 3739 |
testun yn unig/.code={% |
| 3740 |
\chronos@ychwanegu@nodweddion@rhag{@tag}{/chronos/testun yn unig}% |
| 3741 |
\chronos@setdateformat{}% |
| 3742 |
\chronos@onlytexttrue |
| 3743 |
}, |
| 3744 |
only text/.forward to=/chronos/testun yn unig, |
| 3745 |
event years on line/.code={% |
| 3746 |
\chronos@eventyearsonlinetrue |
| 3747 |
\chronos@timeline@showyearsfalse |
| 3748 |
\pgfqkeys{/chronos/digwyddiad}{blynyddoedd yn unig,heb gyfnodau}% |
| 3749 |
\chronos@onlytexttrue |
| 3750 |
}, |
| 3751 |
event year on line/.style={% |
| 3752 |
/chronos/llinell amser/timeline@years,% |
| 3753 |
/chronos/llinell amser/timeline@year@on@line,% |
| 3754 |
font=\chronos@ffont@camaumawr% |
| 3755 |
}, |
| 3756 |
event year on line skip/.code={\gdef\chronos@specialdate{}}, |
| 3757 |
event dates split/.is if=chronos@eventdatessplit, |
| 3758 |
event date split/.style={}, |
| 3759 |
testun yshift/.code={% |
| 3760 |
\pgfmathparse{#1}% |
| 3761 |
\chronos@ychwanegu@nodweddion@rhag{@tag}{/chronos/testun yshift=\pgfmathresult pt}% |
| 3762 |
\chronos@testun@yshift=\pgfmathresult pt |
| 3763 |
}, |
| 3764 |
testun yshift'/.code={% |
| 3765 |
\chronos@ychwanegu@nodweddion@rhag{@tag}{/chronos/testun yshift=#1}% |
| 3766 |
\chronos@testun@yshift=#1 |
| 3767 |
}, |
| 3768 |
testun yshift+/.code={% |
| 3769 |
\pgfmathparse{#1}% |
| 3770 |
\chronos@ychwanegu@nodweddion@rhag{@tag}{/chronos/testun yshift'+=\pgfmathresult pt}% |
| 3771 |
\advance \chronos@testun@yshift by \pgfmathresult pt |
| 3772 |
}, |
| 3773 |
testun yshift'+/.code={% |
| 3774 |
\chronos@ychwanegu@nodweddion@rhag{@tag}{/chronos/testun yshift'+=#1}% |
| 3775 |
\advance \chronos@testun@yshift by #1 |
| 3776 |
}, |
| 3777 |
text tag yshift/.forward to=/chronos/testun yshift, |
| 3778 |
text tag yshift'/.forward to=/chronos/testun yshift, |
| 3779 |
text tag yshift'+/.forward to=/chronos/testun yshift, |
| 3780 |
text tag yshift+/.forward to=/chronos/testun yshift, |
| 3781 |
special date/.code={\gdef\chronos@specialdate{#1}}, |
| 3782 |
% \end{macrocode} |
| 3783 |
% saesneg: /chronos (mwy uchod) |
| 3784 |
% \begin{macrocode} |
| 3785 |
levels/.forward to=/chronos/lefelau, |
| 3786 |
levels at/.forward to=/chronos/lefelau at, |
| 3787 |
% \end{macrocode} |
| 3788 |
%^^A END formats >>> |
| 3789 |
%^^A BEGIN placeholders <<< |
| 3790 |
% ateb Qrrbrbirlbel \url{https://tex.stackexchange.com/a/694967/} |
| 3791 |
% permission for lppl: \url{https://tex.stackexchange.com/questions/694799/how-can-i-disable-shadows-and-similar-preaction-postaction-effects-in-tikz-or/694967#comment1725164_694967} |
| 3792 |
% \begin{macrocode} |
| 3793 |
discard node/.code={% ^^A |
| 3794 |
\setbox\pgfutil@tempboxa\box\pgfutil@voidb@x % empty out box |
| 3795 |
\def\tikz@whichbox{\pgfutil@tempboxa}% |
| 3796 |
}, |
| 3797 |
% \end{macrocode} |
| 3798 |
% ateb Qrrbrbirlbel uchod ac ateb arall fe: \url{https://tex.stackexchange.com/a/688111/} ; defnyddio yn lle \cs{chronosphantom} |
| 3799 |
% \begin{macrocode} |
| 3800 |
phantom node/.code=\tikz@addoption{% |
| 3801 |
\expandafter\let\csname pgf@sh@boxes@\tikz@shape\endcsname\pgfutil@empty}, |
| 3802 |
% \end{macrocode} |
| 3803 |
% sylwad Qrrbrbirlbel: \url{https://tex.stackexchange.com/questions/694799/how-can-i-disable-shadows-and-similar-preaction-postaction-effects-in-tikz-or?noredirect=1#comment1724762_694799} |
| 3804 |
% \begin{macrocode} |
| 3805 |
zap preactions/.code=\let\tikz@preactions\@empty, |
| 3806 |
zap postactions/.code=\let\tikz@postactions\@empty, |
| 3807 |
placeholders/.is choice, |
| 3808 |
placeholders/off/.code={% |
| 3809 |
\chronos@placeholdersfalse |
| 3810 |
\pgfqkeys{/chronos}{% |
| 3811 |
placeholder/.style={fill=none, draw=none,/chronos/discard node},%^^A phantom node,zap preactions,zap postactions}, |
| 3812 |
}% |
| 3813 |
}, |
| 3814 |
placeholders/on/.code={% |
| 3815 |
\pgfqkeys{/chronos}{% |
| 3816 |
placeholder/.style={on chronos middle ground layer,fill opacity=.1,% |
| 3817 |
draw opacity=.25,text opacity=.5,/chronos/.cd,zap preactions,% |
| 3818 |
zap postactions}, |
| 3819 |
}% |
| 3820 |
}, |
| 3821 |
placeholders/.default=on, |
| 3822 |
placeholders=off, |
| 3823 |
placeholder lines/.style={help lines,% |
| 3824 |
every node/.append style={rotate=-90,anchor=south,pos=.25,inner sep=0pt}}, |
| 3825 |
% \end{macrocode} |
| 3826 |
%^^A END placeholders >>> |
| 3827 |
%^^A BEGIN show coords <<< |
| 3828 |
% \begin{macrocode} |
| 3829 |
show coords/.is if=chronos@showcoords, |
| 3830 |
show coords/.default=true, |
| 3831 |
show nodes/.is if=chronos@shownodes, |
| 3832 |
show nodes/.default=true, |
| 3833 |
show coordinate/.style n args=5{fill=#1, circle, anchor=center,% |
| 3834 |
inner sep=1pt, text=#1, pin={[#1, inner sep=0pt, pin edge={draw=#1},% |
| 3835 |
pin distance=#4, #5]#2:#3}}, |
| 3836 |
show coord/.style 2 args={% |
| 3837 |
/chronos/show coordinate={chronos@lliw@coord}{#1}{#2}{30pt}{}}, |
| 3838 |
show node coord/.style 2 args={% |
| 3839 |
/chronos/show coordinate={chronos@lliw@node}{#1}{#2}{30pt}{}}, |
| 3840 |
show node/.style={}, |
| 3841 |
show bounding box/.is if=chronos@showbb, |
| 3842 |
show bounding box/.default=true, |
| 3843 |
show node colour/.chronos lliw=lliw@node, |
| 3844 |
show bb colour/.chronos lliw=lliw@bb, |
| 3845 |
show coordinate colour/.chronos lliw=lliw@coord, |
| 3846 |
show node color/.forward to=/chronos/show node colour, |
| 3847 |
show coordinate color/.forward to=/chronos/show coordinate colour, |
| 3848 |
show bb color/.forward to=/chronos/show bb colour, |
| 3849 |
show node colour=blue, |
| 3850 |
show coordinate colour=red, |
| 3851 |
show bb colour=chronosGreen, |
| 3852 |
% \end{macrocode} |
| 3853 |
%^^A END show coords>>> |
| 3854 |
% \begin{macrocode} |
| 3855 |
dadfygio/.code={% |
| 3856 |
\pgfqkeys{/chronos}{% |
| 3857 |
placeholders,show coords,show node colour=blue,show coordinate colour=red,% |
| 3858 |
show bounding box,show nodes,show node/.style={draw=chronos@lliw@node}}}, |
| 3859 |
debug/.forward to=/chronos/dadfygio, |
| 3860 |
% \end{macrocode} |
| 3861 |
%^^A BEGIN digwyddiadau, bywydau, cysylltiadau rhwng y llinell a'r ddau |
| 3862 |
% \begin{macrocode} |
| 3863 |
enwau lliw syml/.is if=chronos@enwaulliwsyml, |
| 3864 |
enwau lliw syml/.default=true, |
| 3865 |
dim enwau lliw syml/.code={\chronos@enwaulliwsymlfalse}, |
| 3866 |
tags/.code={% |
| 3867 |
\pgfqkeys{/chronos}{@tag/.style={#1}}% |
| 3868 |
\chronos@cadw@nodweddion@rhag{@tag}{#1}}, |
| 3869 |
tags+/.code={% |
| 3870 |
\pgfqkeys{/chronos}{@tag/.append style={#1}}% |
| 3871 |
\chronos@ychwanegu@nodweddion@rhag{@tag}{#1}}, |
| 3872 |
tags={}, |
| 3873 |
cysylltiad ar/.chronos layer choice=cysylltiad, |
| 3874 |
cysylltiadau ar/.forward to=/chronos/cysylltiad ar, |
| 3875 |
cysylltiad ar=main, |
| 3876 |
llinell ar/.chronos layer choice=llinell, |
| 3877 |
llinellau ar/.forward to=/chronos/llinell ar, |
| 3878 |
llinell ar=middle ground, |
| 3879 |
% \end{macrocode} |
| 3880 |
%^^A bocses a chysylltiadau theori |
| 3881 |
%^^A cysylltwr theori/.style={anchor=center},% oedd cylch cysylltu |
| 3882 |
% \begin{macrocode} |
| 3883 |
cysylltwyr theori/.forward to=/chronos/theori/cysylltwr testun, |
| 3884 |
% \end{macrocode} |
| 3885 |
%^^A {\pgfkeys{/chronos/theori/cysylltwr testun'={anchor=center, inner sep=0pt, outer sep=0pt,#1}}},% oedd cylchau cysylltu |
| 3886 |
%^^A cylchau theori/.code={\pgfqkeys{/chronos/theori/cylchau}{label cylch theori/.style={#1}}}, |
| 3887 |
%^^A cylchau theori/.style={align=center, inner sep=0pt, outer sep=0pt, font=\scriptsize\scshape, text=chronos@prifliw}, |
| 3888 |
% \begin{macrocode} |
| 3889 |
theori dash/.style={}, |
| 3890 |
lliwiau uchod/.code={\chronos@lliwiau@uchod{#1}}, |
| 3891 |
lliwiau isod/.code={\chronos@lliwiau@isod{#1}}, |
| 3892 |
lliwiau uchod o clist/.code={\chronos@global@eq@clist{lliwiau_uchod}{#1}}, |
| 3893 |
lliwiau isod o clist/.code={\chronos@global@eq@clist{lliwiau_isod}{#1}}, |
| 3894 |
} |
| 3895 |
\ExplSyntaxOn |
| 3896 |
% \end{macrocode} |
| 3897 |
% set up /chronos/\#1 with \textquotesingle{} and + variants to set default \#3; set up every \#1 with \textquotesingle{} and + variants to set default \#1 and corresponding keys for tags in \#5 ; use \#4 as the default ; set up keys for forwarding using \#2 as alias for \#1 |
| 3898 |
% \begin{macrocode} |
| 3899 |
\__chronos_kexpander:nnnnn { llinellau } { lines } { @llinell } { ' } |
| 3900 |
{ byw, digwyddiad, parhad } |
| 3901 |
\__chronos_kexpander:nnnnn { cysylltwyr ~ chronos } { chronos ~ connectors } |
| 3902 |
{ @cysylltwr@chronos } { + } { byw, digwyddiad, parhad } |
| 3903 |
\__chronos_kexpander:nnnnn { cysylltwyr ~ testun } { text ~ tag ~ connectors } |
| 3904 |
{ @cysylltwr@testun } { + } { byw, digwyddiad, parhad, theori } |
| 3905 |
\__chronos_kexpander:nnnnn { prif ~ gysylltwyr ~ testun } |
| 3906 |
{ main ~ text ~ tag ~ connectors } { @cysylltwr@testun@prif } { ' } |
| 3907 |
{ byw, digwyddiad, parhad, theori } |
| 3908 |
\__chronos_kexpander:nnnnn { cysylltiadau } { connections } { @cysylltiad } |
| 3909 |
{ ' } { byw, digwyddiad, parhad, theori } |
| 3910 |
\__chronos_kexpander:nnnnn { testunau } { text ~ tags } { @testun } |
| 3911 |
{ ' } { byw, digwyddiad, parhad, theori, gwybodaeth } |
| 3912 |
\__chronos_kexpander:nnnnn { fformat ~ dyddiad } { date ~ format } |
| 3913 |
{ @fformat@dyddiad } { ' } { byw, digwyddiad, parhad, theori, gwybodaeth } |
| 3914 |
\ExplSyntaxOff |
| 3915 |
\pgfqkeys{/chronos}{% |
| 3916 |
llinell amser/.cd, |
| 3917 |
lled/.chronos dimen=\chronos@width, |
| 3918 |
uchder/.chronos dimen=\chronos@height, |
| 3919 |
uchder y border/.chronos dimen=\chronos@borderheight, |
| 3920 |
timeline era margin/.chronos dimen=\chronos@eramargin, |
| 3921 |
timeline margin/.chronos dimen=\chronos@timelinemargin, |
| 3922 |
timeline width/.chronos dimen=\chronos@width, |
| 3923 |
width/.chronos dimen=\chronos@width, |
| 3924 |
timeline height/.chronos dimen=\chronos@height, |
| 3925 |
height/.chronos dimen=\chronos@height, |
| 3926 |
timeline border height/.chronos dimen=\chronos@borderheight, |
| 3927 |
/chronos/.cd, |
| 3928 |
llinell yshift/.chronos dimen=\chronos@llinell@yshift, |
| 3929 |
line yshift/.chronos dimen=\chronos@llinell@yshift, |
| 3930 |
border penawdau/.chronos dimen=\chronos@border@penawdau, |
| 3931 |
border pen/.chronos dimen=\chronos@border@pen, |
| 3932 |
border gwaelod/.chronos dimen=\chronos@border@gwaelod, |
| 3933 |
border de/.chronos dimen=\chronos@border@de, |
| 3934 |
border chwith/.chronos dimen=\chronos@border@chwith, |
| 3935 |
border allanol/.chronos dimen=\chronos@border@allanol, |
| 3936 |
headings border/.chronos dimen=\chronos@border@penawdau, |
| 3937 |
top border/.chronos dimen=\chronos@border@penawdau, |
| 3938 |
bottom border/.chronos dimen=\chronos@border@gwaelod, |
| 3939 |
right border/.chronos dimen=\chronos@border@de, |
| 3940 |
left border/.chronos dimen=\chronos@border@chwith, |
| 3941 |
outer border/.chronos dimen=\chronos@border@allanol, |
| 3942 |
} |
| 3943 |
\tikzset{/chronos/.cd, |
| 3944 |
no connections/.code={% |
| 3945 |
\chronos@byw@cysylltiadfalse |
| 3946 |
\chronos@digwyddiad@cysylltiadfalse |
| 3947 |
\chronos@parhad@cysylltiadfalse |
| 3948 |
}, |
| 3949 |
no connectors/.code={% |
| 3950 |
\pgfqkeys{/chronos}{every cysylltwyr testun'={coordinate},% |
| 3951 |
every cysylltwyr chronos'={coordinate}}}, |
| 3952 |
no text tag connectors/.code={% |
| 3953 |
\pgfqkeys{/chronos}{every cysylltwyr testun'={coordinate}}}, |
| 3954 |
% \end{macrocode} |
| 3955 |
%^^A BEGIN saesneg: digwyddiadau, bywydau, cysylltiadau rhwng y llinell a'r ddau |
| 3956 |
% \begin{macrocode} |
| 3957 |
simple colour names/.forward to=/chronos/enwau lliw syml, |
| 3958 |
simple color names/.forward to=/chronos/enwau lliw syml, |
| 3959 |
no simple colour names/.forward to=/chronos/dim enwau lliw syml, |
| 3960 |
no simple color names/.forward to=/chronos/dim enwau lliw syml, |
| 3961 |
connection/.forward to=/chronos/@cysylltiad, |
| 3962 |
connection on/.forward to=/chronos/cysylltiad ar, |
| 3963 |
connections on/.forward to=/chronos/cysylltiadau ar, |
| 3964 |
colours above/.forward to=/chronos/lliwiau uchod, |
| 3965 |
colours below/.forward to=/chronos/lliwiau isod, |
| 3966 |
colors above/.forward to=/chronos/lliwiau uchod, |
| 3967 |
colors below/.forward to=/chronos/lliwiau isod, |
| 3968 |
colours above from clist/.forward to=/chronos/lliwiau uchod o clist, |
| 3969 |
colours below from clist/.forward to=/chronos/lliwiau isod o clist, |
| 3970 |
colors above from clist/.forward to=/chronos/lliwiau uchod o clist, |
| 3971 |
colors below from clist/.forward to=/chronos/lliwiau isod o clist, |
| 3972 |
lines on/.forward to=/chronos/llinell ar, |
| 3973 |
line on/.forward to=/chronos/llinell ar, |
| 3974 |
% \end{macrocode} |
| 3975 |
%^^A line yshift/.forward to=/chronos/llinell yshift, |
| 3976 |
%^^A END saesneg: digwyddiadau, bywydau, cysylltiadau rhwng y llinell a'r ddau |
| 3977 |
%^^A END digwyddiadau, bywydau, cysylltiadau rhwng y llinell a'r ddau |
| 3978 |
%^^A END /chronos >>> |
| 3979 |
% \begin{macrocode} |
| 3980 |
} |
| 3981 |
\tikzset{% |
| 3982 |
% \end{macrocode} |
| 3983 |
%^^A BEGIN /chronos/byw |
| 3984 |
% \begin{macrocode} |
| 3985 |
/chronos/byw/.chronos tag init={byw}{life}, |
| 3986 |
/chronos/byw/.chronos tag dyddiadau init=byw:geni:marw:bu farw:bufarw:geni:marw:birth:death, |
| 3987 |
/chronos/byw/.cd, |
| 3988 |
% \end{macrocode} |
| 3989 |
%^^A END /chronos/byw |
| 3990 |
%^^A BEGIN /chronos/digwyddiad <<< |
| 3991 |
% \begin{macrocode} |
| 3992 |
/chronos/digwyddiad/.chronos tag init={digwyddiad}{event}, |
| 3993 |
/chronos/digwyddiad/.cd, |
| 3994 |
dyddiad/.style={/chronos/set date aux/.expanded={#1-01-01-0@dig}}, |
| 3995 |
ffont dyddiad/.code={\def\chronos@digwyddiad@ffontdyddiad{#1}}, |
| 3996 |
ffont dyddiad=, |
| 3997 |
fformat dyddiad/.code={% |
| 3998 |
\def\chronos@digwyddiad@fformatdyddiad{#1}% |
| 3999 |
\chronos@ychwanegu@nodweddion{digwyddiad}{@tag}% |
| 4000 |
{/chronos/digwyddiad/fformat dyddiad={#1}}% |
| 4001 |
}, |
| 4002 |
fformat dyddiad/.chronos track={% |
| 4003 |
@digwyddiad@fformatiau@dyddiadau,@digwyddiad@cyfnodau,@digwyddiad@llawn}, |
| 4004 |
dangos cyfnodau/@blynyddoedd yn unig/.code={% |
| 4005 |
\def\chronos@digwyddiad@fformatdyddiad{!Y\thinspace !E}}, |
| 4006 |
dangos cyfnodau/@llawn/.code={% |
| 4007 |
\def\chronos@digwyddiad@fformatdyddiad{!d/!m/!Y\thinspace !E}}, |
| 4008 |
dangos cyfnodau/llawn/.code={% |
| 4009 |
\pgfqkeys{/chronos/digwyddiad/dangos cyfnodau}{% |
| 4010 |
@llawn/.code={\def\chronos@digwyddiad@fformatdyddiad{#1}}}}, |
| 4011 |
dangos cyfnodau/blynyddoedd yn unig/.code={% |
| 4012 |
\pgfqkeys{/chronos/digwyddiad/dangos cyfnodau}{% |
| 4013 |
@blynyddoedd yn unig/.code={\def\chronos@digwyddiad@fformatdyddiad{#1}}}}, |
| 4014 |
heb gyfnodau/@blynyddoedd yn unig/.code={\def\chronos@digwyddiad@fformatdyddiad{!Y}}, |
| 4015 |
heb gyfnodau/@llawn/.code={\def\chronos@digwyddiad@fformatdyddiad{!d/!m/!Y}}, |
| 4016 |
heb gyfnodau/llawn/.code={% |
| 4017 |
\pgfqkeys{/chronos/digwyddiad/heb gyfnodau}{% |
| 4018 |
@llawn/.code={\def\chronos@digwyddiad@fformatdyddiad{#1}},@llawn/.show code}}, |
| 4019 |
heb gyfnodau/blynyddoedd yn unig/.code={% |
| 4020 |
\pgfqkeys{/chronos/digwyddiad/heb gyfnodau}{% |
| 4021 |
@blynyddoedd yn unig/.code={\def\chronos@digwyddiad@fformatdyddiad{#1}}}}, |
| 4022 |
dangos cyfnodau/.code={% |
| 4023 |
\chronos@ychwanegu@nodweddion{digwyddiad}{@tag}{/chronos/dangos cyfnodau}}, |
| 4024 |
heb gyfnodau/.code={% |
| 4025 |
\chronos@ychwanegu@nodweddion{digwyddiad}{@tag}{/chronos/heb gyfnodau}}, |
| 4026 |
dyddiadau llawn/.code={% |
| 4027 |
\chronos@ychwanegu@nodweddion{digwyddiad}{@tag}{/chronos/dyddiadau llawn}}, |
| 4028 |
blynyddoedd yn unig/.code={% |
| 4029 |
\chronos@ychwanegu@nodweddion{digwyddiad}{@tag}{/chronos/blynyddoedd yn unig}}, |
| 4030 |
dangos cyfnodau/.chronos track={@digwyddiad@cyfnodau}, |
| 4031 |
dyddiadau llawn/.chronos track={@digwyddiad@llawn}, |
| 4032 |
heb gyfnodau/.chronos track={@digwyddiad@cyfnodau}, |
| 4033 |
blynyddoedd yn unig/.chronos track={@digwyddiad@llawn}, |
| 4034 |
% \end{macrocode} |
| 4035 |
%^^A BEGIN saesneg: /chronos/digwyddiad |
| 4036 |
% \begin{macrocode} |
| 4037 |
date/.forward to=/chronos/digwyddiad/dyddiad, |
| 4038 |
date font/.forward to=/chronos/digwyddiad/ffont dyddiad, |
| 4039 |
date format/.forward to=/chronos/digwyddiad/fformat dyddiad, |
| 4040 |
show eras/.forward to=/chronos/digwyddiad/dangos cyfnodau, |
| 4041 |
only years/.forward to=/chronos/digwyddiad/blynyddoedd yn unig, |
| 4042 |
full dates/.forward to=/chronos/digwyddiad/dyddiadau llawn, |
| 4043 |
without eras/.forward to=/chronos/digwyddiad/heb gyfnodau, |
| 4044 |
show eras/only years/.forward to=/chronos/digwyddiad/dangos cyfnodau/blynyddoedd yn unig, |
| 4045 |
show eras/full dates/.forward to=/chronos/digwyddiad/dangos cyfnodau/dyddiadau llawn, |
| 4046 |
without eras/only years/.forward to=/chronos/digwyddiad/heb gyfnodau/blynyddoedd yn unig, |
| 4047 |
without eras/full dates/.forward to=/chronos/digwyddiad/heb gyfnodau/dyddiadau llawn, |
| 4048 |
% \end{macrocode} |
| 4049 |
%^^A END saesneg: /chronos/digwyddiad |
| 4050 |
%^^A END /chronos/digwyddiad >>> |
| 4051 |
%^^A BEGIN /chronos/parhad |
| 4052 |
% \begin{macrocode} |
| 4053 |
/chronos/parhad/.chronos tag init={parhad}{period}, |
| 4054 |
/chronos/parhad/.chronos tag dyddiadau init=parhad:dechrau:diwedd:gorffenedig:gorffenedig:thing:otherthing:start:end, |
| 4055 |
/chronos/parhad/.cd, |
| 4056 |
% \end{macrocode} |
| 4057 |
%^^A BEGIN saesneg: /chronos/parhad |
| 4058 |
%^^A END saesneg: /chronos/parhad |
| 4059 |
%^^A END /chronos/parhad |
| 4060 |
%^^A BEGIN /chronos/theori |
| 4061 |
% \begin{macrocode} |
| 4062 |
/chronos/theori/.chronos tag init={theori}{theory}, |
| 4063 |
/chronos/theori/.cd, |
| 4064 |
% \end{macrocode} |
| 4065 |
%^^A BEGIN saesneg: /chronos/thoeri |
| 4066 |
%^^A END saesneg: /chronos/thoeri |
| 4067 |
%^^A BEGIN /chronos/theori/cylchau |
| 4068 |
% \begin{macrocode} |
| 4069 |
/chronos/theori/cylchau/.cd, |
| 4070 |
enw/.store in=\chronos@cylchtheori@enw, |
| 4071 |
% \end{macrocode} |
| 4072 |
%^^A fel y mae/.is if=chronos@felymae, |
| 4073 |
%^^A fel y mae/.default=true, |
| 4074 |
% \begin{macrocode} |
| 4075 |
chronos@tikzname/.code={% |
| 4076 |
\chronos@creu@tikzname {cylchtheori}{#1} |
| 4077 |
}, |
| 4078 |
enw/.forward to=/chronos/theori/cylchau/chronos@tikzname, |
| 4079 |
% \end{macrocode} |
| 4080 |
%^^A angor/.store in=\chronos@cylchtheori@angor, |
| 4081 |
%^^A angor/.forward to=/tikz/anchor, |
| 4082 |
%^^A at/.code yn gweithio am \cylchtheori ond ni weithio am \byw etc. |
| 4083 |
% \begin{macrocode} |
| 4084 |
at/.code={\coordinate (chronos@cylchtheori@at) at (#1);}, |
| 4085 |
% \end{macrocode} |
| 4086 |
%^^A lliw/.store in=\chronos@cylchtheori@lliw, |
| 4087 |
%^^A meintiau/.style args={#1:#2}{ |
| 4088 |
%^^A /chronos/theori/cylchau/mawr=#1, |
| 4089 |
%^^A /chronos/theori/cylchau/bach=#2, |
| 4090 |
%^^A }, |
| 4091 |
% \begin{macrocode} |
| 4092 |
meintiau/.chronos 2 dimens={\chronos@cylchtheori@mawr}{\chronos@cylchtheori@bach}, |
| 4093 |
mawr/.chronos dimen=\chronos@cylchtheori@mawr, |
| 4094 |
bach/.chronos dimen=\chronos@cylchtheori@bach, |
| 4095 |
labeli/.style args={#1:#2}{ |
| 4096 |
/chronos/theori/cylchau/label uchod=#1, |
| 4097 |
/chronos/theori/cylchau/label isod=#2, |
| 4098 |
}, |
| 4099 |
label uchod/.store in=\chronos@cylchtheori@label@uchod, |
| 4100 |
label isod/.store in=\chronos@cylchtheori@label@isod, |
| 4101 |
testunau cylch/.style args={#1:#2}{ |
| 4102 |
/chronos/theori/cylchau/testun cylch uchod=#1, |
| 4103 |
/chronos/theori/cylchau/testun cylch isod=#2, |
| 4104 |
}, |
| 4105 |
testun cylch uchod/.store in=\chronos@cylchtheori@circletext@uchod, |
| 4106 |
testun cylch isod/.store in=\chronos@cylchtheori@circletext@isod, |
| 4107 |
% \end{macrocode} |
| 4108 |
%^^A BEGIN /chronos/theori/cylchau saesneg |
| 4109 |
% \begin{macrocode} |
| 4110 |
/chronos/theory/circles/.chronos search=theori/cylchau, |
| 4111 |
name/.forward to=/chronos/theori/cylchau/enw, |
| 4112 |
% \end{macrocode} |
| 4113 |
%^^A as is/.forward to=/chronos/theori/fel y mae, |
| 4114 |
%^^A tag anchor/.forward to=/chronos/theori/cylchau/angor, |
| 4115 |
% \begin{macrocode} |
| 4116 |
sizes/.chronos 2 dimens={\chronos@cylchtheori@mawr}{\chronos@cylchtheori@bach}, |
| 4117 |
% \end{macrocode} |
| 4118 |
%^^A sizes/.forward to=/chronos/theori/cylchau/meintiau, |
| 4119 |
%^^A theory circle label/.forward to=/chronos/theori/cylchau/label cylch theori, |
| 4120 |
% \begin{macrocode} |
| 4121 |
circle texts/.forward to=/chronos/theori/cylchau/testunau cylch, |
| 4122 |
labels/.forward to=/chronos/theori/cylchau/labeli, |
| 4123 |
% \end{macrocode} |
| 4124 |
%^^A END /chronos/theori/cylchau saesneg |
| 4125 |
%^^A END /chronos/theori/cylchau |
| 4126 |
%^^A END /chronos/theori |
| 4127 |
%^^A BEGIN /chronos/gwybodaeth |
| 4128 |
% \begin{macrocode} |
| 4129 |
/chronos/gwybodaeth/.cd, |
| 4130 |
enw/.store in=\chronos@gwybodaeth@enw, |
| 4131 |
chronos@tikzname/.code={% |
| 4132 |
\chronos@creu@tikzname {gwybodaeth}{#1} |
| 4133 |
}, |
| 4134 |
enw/.forward to=/chronos/gwybodaeth/chronos@tikzname, |
| 4135 |
angor/.store in=\chronos@gwybodaeth@angor, |
| 4136 |
at/.store in=\chronos@gwybodaeth@at, |
| 4137 |
capsiwn/.store in=\chronos@gwybodaeth@capsiwn, |
| 4138 |
lliw/.store in=\chronos@gwybodaeth@lliw, |
| 4139 |
lliw rhagosodedig/.store in=\chronos@gwybodaeth@lliw@rhagosodedig, |
| 4140 |
lliw rhagosodedig=chronos@lliw@gwybodaeth, |
| 4141 |
tag'/.code={% |
| 4142 |
\chronos@cadw@nodweddion{gwybodaeth}{@tag}{#1}% |
| 4143 |
}, |
| 4144 |
tag+/.code={% |
| 4145 |
\chronos@ychwanegu@nodweddion{gwybodaeth}{@tag}{#1}% |
| 4146 |
}, |
| 4147 |
testun'/.code={% |
| 4148 |
\chronos@cadw@nodweddion{gwybodaeth}{@testun}{#1}% |
| 4149 |
}, |
| 4150 |
testun+/.code={% |
| 4151 |
\chronos@ychwanegu@nodweddion{gwybodaeth}{@testun}{#1}% |
| 4152 |
}, |
| 4153 |
testun/.forward to=/chronos/gwybodaeth/testun', |
| 4154 |
tag/.forward to=/chronos/gwybodaeth/tag+, |
| 4155 |
cynnwys testun/.store in=\chronos@cynnwys@testun, |
| 4156 |
cynnwys enw/.store in=\chronos@cynnwys@enw, |
| 4157 |
% \end{macrocode} |
| 4158 |
%^^A BEGIN saesneg: /chronos/gwybodaeth |
| 4159 |
% \begin{macrocode} |
| 4160 |
/chronos/info/.chronos search=gwybodaeth, |
| 4161 |
name/.forward to=/chronos/gwybodaeth/enw, |
| 4162 |
caption/.forward to=/chronos/gwybodaeth/capsiwn, |
| 4163 |
colour/.forward to=/chronos/gwybodaeth/lliw, |
| 4164 |
color/.forward to=/chronos/gwybodaeth/lliw, |
| 4165 |
default colour/.forward to=/chronos/gwybodaeth/lliw rhagosodedig, |
| 4166 |
default color/.forward to=/chronos/gwybodaeth/lliw rhagosodedig, |
| 4167 |
text tag/.forward to=/chronos/gwybodaeth/testun, |
| 4168 |
text tag'/.forward to=/chronos/gwybodaeth/testun', |
| 4169 |
text tag+/.forward to=/chronos/gwybodaeth/testun+, |
| 4170 |
tag anchor/.forward to=/chronos/gwybodaeth/angor, |
| 4171 |
text content/.forward to=/chronos/gwybodaeth/cynnwys testun, |
| 4172 |
name content/.forward to=/chronos/gwybodaeth/cynnwys enw, |
| 4173 |
% \end{macrocode} |
| 4174 |
%^^A END saesneg: /chronos/gwybodaeth |
| 4175 |
%^^A END /chronos/gwybodaeth |
| 4176 |
%^^A BEGIN /chronos/prif |
| 4177 |
% \begin{macrocode} |
| 4178 |
/chronos/prif/.cd, |
| 4179 |
enw/.store in=\chronos@prifdeitl@enw, |
| 4180 |
chronos@tikzname/.code={% |
| 4181 |
\chronos@creu@tikzname {prifdeitl}{#1} |
| 4182 |
}, |
| 4183 |
enw/.forward to=/chronos/prif/chronos@tikzname, |
| 4184 |
angor/.store in=\chronos@prifdeitl@angor, |
| 4185 |
angor/.forward to=/tikz/anchor, |
| 4186 |
at/.code={\coordinate (chronos@prifdeitl@at) at (#1);}, |
| 4187 |
cynnwys enw/.store in=\chronos@prifdeitl@cynnwys, |
| 4188 |
llinellau teitl/.style={% |
| 4189 |
/tikz/.cd,draw=chronos@prifliw,inner xsep=0pt,#1,% |
| 4190 |
append after command={% |
| 4191 |
(main title.north west)--(main title.north east) (main title.south west)% |
| 4192 |
--(main title.south east)},draw=none}, |
| 4193 |
% \end{macrocode} |
| 4194 |
%^^A BEGIN /chronos/prif saesneg |
| 4195 |
% \begin{macrocode} |
| 4196 |
/chronos/main/.chronos search=prif, |
| 4197 |
name/.forward to=/chronos/prif/enw, |
| 4198 |
tag anchor/.forward to=/chronos/prif/angor, |
| 4199 |
name content/.forward to=/chronos/prif/cynnwys enw, |
| 4200 |
title lines/.forward to=/chronos/prif/llinellau teitl, |
| 4201 |
% \end{macrocode} |
| 4202 |
%^^A END /chronos/prif saesneg |
| 4203 |
%^^A END /chronos/prif |
| 4204 |
%^^A BEGIN /chronos/hawlfraint |
| 4205 |
% \begin{macrocode} |
| 4206 |
/chronos/hawlfraint/.cd, |
| 4207 |
enw/.store in=\chronos@hawlfraint@enw, |
| 4208 |
chronos@tikzname/.code={% |
| 4209 |
\chronos@creu@tikzname {hawlfraint}{#1} |
| 4210 |
}, |
| 4211 |
enw/.forward to=/chronos/hawlfraint/chronos@tikzname, |
| 4212 |
angor/.store in=\chronos@hawlfraint@angor, |
| 4213 |
angor/.forward to=/tikz/anchor, |
| 4214 |
at/.code={\coordinate (chronos@hawlfraint@at) at (#1);}, |
| 4215 |
awdur/.store in=\chronos@hawlfraint@awdur, |
| 4216 |
blwyddyn/.store in=\chronos@hawlfraint@blwyddyn, |
| 4217 |
cynnwys enw/.store in=\chronos@hawlfraint@cynnwys, |
| 4218 |
cylchdroi/.store in=\chronos@hawlfraint@cylchdroi, |
| 4219 |
notis/.code={\def\chronos@hawlfraint@notis##1##2{#1}\show\chronos@hawlfraint@notis}, |
| 4220 |
copyleft/.is if=chronos@copyleft, |
| 4221 |
copyleft/.default=true, |
| 4222 |
% \end{macrocode} |
| 4223 |
%^^A BEGIN /chronos/hawlfraint saesneg |
| 4224 |
% \begin{macrocode} |
| 4225 |
/chronos/copyright/.chronos search=hawlfraint, |
| 4226 |
/chronos/copyleft/.chronos search=hawlfraint, |
| 4227 |
author/.forward to=/chronos/hawlfraint/awdur, |
| 4228 |
name/.forward to=/chronos/hawlfraint/enw, |
| 4229 |
name content/.forward to=/chronos/hawlfraint/cynnwys enw, |
| 4230 |
notice/.forward to=/chronos/hawlfraint/notis, |
| 4231 |
rotate/.forward to=/chronos/hawlfraint/cylchdroi, |
| 4232 |
tag anchor/.forward to=/chronos/hawlfraint/angor, |
| 4233 |
year/.forward to=/chronos/hawlfraint/blwyddyn, |
| 4234 |
% \end{macrocode} |
| 4235 |
%^^A END /chronos/hawlfraint saesneg |
| 4236 |
%^^A END /chronos/hawlfraint |
| 4237 |
% \begin{macrocode} |
| 4238 |
/chronos/.cd, |
| 4239 |
% \end{macrocode} |
| 4240 |
%^^A BEGIN /chronos frâm, borders, cysylltwyr, llinellau, testunau etc. |
| 4241 |
% \begin{macrocode} |
| 4242 |
borders'/.code args={#1:#2:#3:#4:#5:#6}{%^^A penawdau:pen:de:gwaelod:chwith:allanol |
| 4243 |
\chronos@border@penawdau=#1 |
| 4244 |
\chronos@border@pen=#2 |
| 4245 |
\chronos@border@de=#3 |
| 4246 |
\chronos@border@gwaelod=#4 |
| 4247 |
\chronos@border@chwith=#5 |
| 4248 |
\chronos@border@allanol=#6 |
| 4249 |
}, |
| 4250 |
borders'+/.code args={#1:#2:#3:#4:#5:#6}{%^^A penawdau:pen:de:gwaelod:chwith:allanol |
| 4251 |
\advance\chronos@border@penawdau by #1 |
| 4252 |
\advance\chronos@border@pen by #2 |
| 4253 |
\advance\chronos@border@de by #3 |
| 4254 |
\advance\chronos@border@gwaelod by #4 |
| 4255 |
\advance\chronos@border@chwith by #5 |
| 4256 |
\advance\chronos@border@allanol by #6 |
| 4257 |
}, |
| 4258 |
borders'-/.code args={#1:#2:#3:#4:#5:#6}{%^^A penawdau:pen:de:gwaelod:chwith:allanol |
| 4259 |
\advance\chronos@border@penawdau by -#1 |
| 4260 |
\advance\chronos@border@pen by -#2 |
| 4261 |
\advance\chronos@border@de by -#3 |
| 4262 |
\advance\chronos@border@gwaelod by -#4 |
| 4263 |
\advance\chronos@border@chwith by -#5 |
| 4264 |
\advance\chronos@border@allanol by -#6 |
| 4265 |
}, |
| 4266 |
cysylltwyr chronos={anchor=center,inner sep=0pt,outer sep=0pt},%^^A oedd cylch chronos |
| 4267 |
cysylltwyr testun={anchor=center,inner sep=0pt,outer sep=0pt},%^^A oedd cylch |
| 4268 |
prif gysylltwyr testun={}, |
| 4269 |
@llinell/.style={}, |
| 4270 |
testunau+={outer sep=0pt,text=#1!75!black},%^^A every eisiau ## |
| 4271 |
cysylltiadau={draw=#1}, |
| 4272 |
% \end{macrocode} |
| 4273 |
%^^A END /chronos frâm, borders, cysylltwyr, llinellau, testunau etc. |
| 4274 |
%^^A BEGIN cynlluniau lliwiau |
| 4275 |
% \begin{macrocode} |
| 4276 |
cynllun lliwiau/.code={\csname chronos@lliwiau@#1\endcsname}, |
| 4277 |
colour scheme/.forward to=/chronos/cynllun lliwiau, |
| 4278 |
color scheme/.forward to=/chronos/cynllun lliwiau, |
| 4279 |
lliwiau cronoleg/.code={% |
| 4280 |
\chronos@lliwiau@cronoleg |
| 4281 |
\@ifpackageloaded{memoize}{% |
| 4282 |
\mmzset{csname meaning to context={chronos@lliwiau@cronoleg}}% |
| 4283 |
}{}% |
| 4284 |
}, |
| 4285 |
lliwiau rhagosodedig/.code={\chronos@lliwiau@rhagosodedig}, |
| 4286 |
% \end{macrocode} |
| 4287 |
%^^A END cynlluniau lliwiau |
| 4288 |
% \begin{macrocode} |
| 4289 |
} |
| 4290 |
|
| 4291 |
% \end{macrocode} |
| 4292 |
%^^A END allweddau PGF/TikZ >>> |
| 4293 |
%^^A BEGIN style cronoleg <<< |
| 4294 |
% \begin{macrocode} |
| 4295 |
\pgfqkeys{/chronos}{% |
| 4296 |
cronoleg/.style={% mewnol | internal |
| 4297 |
/chronos/.cd, |
| 4298 |
cronoleg/.meaning to context, |
| 4299 |
cynllun lliwiau=cronoleg, |
| 4300 |
byw/troi lliwiau=true, |
| 4301 |
digwyddiad/troi lliwiau=true, |
| 4302 |
parhad/troi lliwiau=true, |
| 4303 |
theori/troi lliwiau=false, |
| 4304 |
theori/lliw rhagosodedig=chronos@lliw@theori, |
| 4305 |
digwyddiad/lliw rhagosodedig=chronos@prifliw!75!chronos@prifliw@cefndir, |
| 4306 |
parhad/lliw rhagosodedig=chronos@prifliw!75!chronos@prifliw@cefndir, |
| 4307 |
gwybodaeth/lliw rhagosodedig=chronos@lliw@gwybodaeth, |
| 4308 |
cefndir=chronos@prifliw@cefndir, |
| 4309 |
blaendir=chronos@prifliw, |
| 4310 |
blynyddoedd yn unig, |
| 4311 |
llinell amser={% |
| 4312 |
timeline years=on line, |
| 4313 |
llinell={chronos@lliw@cefndir@llinell, opacity=.8}, |
| 4314 |
ffont camau mawr=\normalfont\bfseries, |
| 4315 |
ffont camau bach=\normalfont\bfseries\footnotesize, |
| 4316 |
ffont cyfnodau=\normalfont\normalsize\bfseries, |
| 4317 |
timeline year={text=chronos@lliw@llinell, align=center}, |
| 4318 |
timeline mark={draw=chronos@lliw@llinell, ultra thick, shorten >=1.5pt}, |
| 4319 |
timeline minor mark={draw=chronos@lliw@llinell, thick, shorten >=3pt}, |
| 4320 |
timeline height'=10mm, |
| 4321 |
timeline border height'=2.5mm, |
| 4322 |
width=235mm, |
| 4323 |
cam blwyddyn fawr=500, |
| 4324 |
cam blwyddyn fach=100, |
| 4325 |
timeline border outer colour=chronos@prifliw@cefndir, |
| 4326 |
timeline border inner colour=chronos@lliw@cefndir@llinell!80!chronos@borderouter, |
| 4327 |
timeline border middle colour=chronos@lliw@cefndir@llinell!20!chronos@borderouter, |
| 4328 |
timeline mark eras, |
| 4329 |
timeline marks, |
| 4330 |
minor years, |
| 4331 |
llinell amser ar=foreground, |
| 4332 |
border ar=background, |
| 4333 |
start date={-500}, |
| 4334 |
end date=2050, |
| 4335 |
timeline margin'=10pt, |
| 4336 |
timeline era margin'=15pt, |
| 4337 |
}, |
| 4338 |
timeline ce label={CE}, |
| 4339 |
timeline bce label={BCE}, |
| 4340 |
cysylltiadau={draw=##1, opacity=.75, thick}, |
| 4341 |
cysylltwyr testun={fill=##1, fill opacity=1, circle, minimum size=5pt, % |
| 4342 |
anchor=center, inner sep=0pt, outer sep=0pt}, |
| 4343 |
cyffredin/cysylltiad/.style={draw=##1, opacity=.5, thick}, |
| 4344 |
every cysylltwyr chronos={fill=####1, opacity=.75, circle, % |
| 4345 |
minimum size=2.5pt, anchor=center, inner sep=0pt, outer sep=0pt}, |
| 4346 |
cyffredin/testun/.style={outer xsep=0pt, rounded corners=2pt, thick, % |
| 4347 |
text opacity=1, draw opacity=1, inner sep=2pt, fill opacity=.25,% |
| 4348 |
font=\scshape\footnotesize}, |
| 4349 |
digwyddiad/cysylltiad={/chronos/cyffredin/cysylltiad=##1}, |
| 4350 |
byw/cysylltiad={/chronos/cyffredin/cysylltiad=##1, opacity=.75}, |
| 4351 |
parhad/cysylltiad={/chronos/cyffredin/cysylltiad=##1}, |
| 4352 |
theori/cysylltiad={thick, draw=chronos@prifliw, double=chronos@prifliw@cefndir}, |
| 4353 |
% \end{macrocode} |
| 4354 |
%^^A % digwyddiad/lliwiau isod={chronos@prifliw!75!chronos@prifliw@cefndir}, |
| 4355 |
%^^A % digwyddiad/lliwiau uchod={chronos@prifliw!75!chronos@prifliw@cefndir}, |
| 4356 |
% \begin{macrocode} |
| 4357 |
theori/cysylltwr testun={fill=chronos@prifliw@cefndir, circle, % |
| 4358 |
minimum size=5pt, anchor=center, inner sep=0pt, outer sep=0pt, thick, % |
| 4359 |
draw=chronos@prifliw}, |
| 4360 |
byw/testun={/chronos/cyffredin/testun, align=left, text=##1!50!black, % |
| 4361 |
fill=##1, draw=##1}, |
| 4362 |
% \end{macrocode} |
| 4363 |
%^^A every digwyddiad+={only text},% yn hawsach i toggle on na off felly paid ag analluogi fel rhagosodedig |
| 4364 |
% \begin{macrocode} |
| 4365 |
digwyddiad/testun={/chronos/cyffredin/testun, align=left, text=##1!50!black, % |
| 4366 |
fill=##1, draw=##1}, |
| 4367 |
parhad/testun={/chronos/cyffredin/testun, align=left, text=##1!50!black, % |
| 4368 |
fill=##1, draw=##1}, |
| 4369 |
theori/testun={/chronos/cyffredin/testun, align=center, inner sep=3pt, % |
| 4370 |
text=chronos@lliw@theori, fill=chronos@lliw@cefndir@theori, % |
| 4371 |
fill opacity=.8, draw=chronos@prifliw, double=chronos@prifliw@cefndir, % |
| 4372 |
font=\bfseries}, |
| 4373 |
byw/llinell={fill=##1, fill opacity=.25, draw=none}, |
| 4374 |
digwyddiad/llinell={draw=##1, draw opacity=.25, fill=none}, |
| 4375 |
parhad/llinell={fill=##1, fill opacity=.25, draw=none}, |
| 4376 |
llinell ar=main, |
| 4377 |
cysylltiad ar=middle ground, |
| 4378 |
% \end{macrocode} |
| 4379 |
%^^A byw/lliwiau isod o clist={lliwiau_isod}, |
| 4380 |
%^^A byw/lliwiau uchod o clist={lliwiau_uchod}, |
| 4381 |
% \begin{macrocode} |
| 4382 |
theori/cylchau/label={align=center, inner sep=0pt, outer sep=0pt,% |
| 4383 |
font=\scriptsize\scshape, text=chronos@prifliw}, |
| 4384 |
every cylch cylch theori'={fill=chronos@prifliw, draw=chronos@prifliw, % |
| 4385 |
thick, even odd rule, fill opacity=.8}, |
| 4386 |
every testun cylch theori'={decoration={text effects along path, text={##1}, % |
| 4387 |
text effects/.cd, fit text to path, text=chronos@prifliw@cefndir, % |
| 4388 |
characters={text along path, font=\scriptsize\scshape}}, decorate}, |
| 4389 |
theori/cylchau/labels=:, |
| 4390 |
theori/cylchau/circle texts=:, |
| 4391 |
theori/cylchau/meintiau'=15pt:9pt, |
| 4392 |
gwybodaeth/label={/chronos/@amserau, font=\itshape\footnotesize, % |
| 4393 |
anchor=north, yshift=-2.5pt},% oedd pethau |
| 4394 |
gwybodaeth/testun={/chronos/cyffredin/testun, align=left, text=##1, % |
| 4395 |
outer sep=0pt, fill=chronos@lliw@cefndir@gwybodaeth, draw opacity=.8, % |
| 4396 |
text opacity=.8, font=\scriptsize, draw=chronos@prifliw},% oedd ee ? oedd testun ee? |
| 4397 |
theori dash/.style={chronos@prifliw, opacity=.75, thick, densely dashed}, |
| 4398 |
theory dash/.link=/chronos/theori dash, |
| 4399 |
amserau={align=center, anchor=base, inner sep=0pt, outer sep=0pt, % |
| 4400 |
color=chronos@prifliw!75!chronos@prifliw@cefndir, opacity=.8, % |
| 4401 |
font=\bfseries\itshape\footnotesize}, |
| 4402 |
amseraumawr={align=center, anchor=base, inner sep=0pt, outer sep=0pt, % |
| 4403 |
color=chronos@prifliw, opacity=.8, font=\bfseries}, |
| 4404 |
prif/frame={inner sep=5pt, ultra thick, draw=chronos@prifliw, % |
| 4405 |
double=chronos@prifliw@cefndir, fill=none},% oedd chronos@prifliw@cefndir |
| 4406 |
prif/teitl={/chronos/prif/@frame, font=\Huge\bfseries, text=chronos@prifliw,% |
| 4407 |
anchor=center, align=center, rounded corners=5pt}, |
| 4408 |
borders'=55pt:0pt:105pt:15pt:7.5pt:5pt, |
| 4409 |
headings drops'=10pt:10pt:7.5pt, |
| 4410 |
hawlfraint={font=\footnotesize\bfseries, inner sep=0pt, outer sep=0pt, % |
| 4411 |
chronos@prifliw, fill=chronos@prifliw@cefndir}, |
| 4412 |
% \end{macrocode} |
| 4413 |
%^^A hawlfraint/cylchdroi=90, |
| 4414 |
%^^A hawlfraint/angor=west, |
| 4415 |
% \begin{macrocode} |
| 4416 |
llinellau={color=black!50, opacity=.5}, |
| 4417 |
lefelau=10:10, |
| 4418 |
special date=none, |
| 4419 |
ce year label={\textsc{ce}}, |
| 4420 |
bce year label={\textsc{bce}}, |
| 4421 |
testun yshift=10pt, |
| 4422 |
frame uses bb=false, |
| 4423 |
frame, |
| 4424 |
}, |
| 4425 |
} |
| 4426 |
% \end{macrocode} |
| 4427 |
%^^A END style cronoleg >>> |
| 4428 |
% \begin{macrocode} |
| 4429 |
\RequirePackage{chronos-lib-colschemes,chronos-lib-styles} |
| 4430 |
% \end{macrocode} |
| 4431 |
%^^A BEGIN env y ddogfen <<< |
| 4432 |
% \begin{environment}{chronos} |
| 4433 |
% Main environment. |
| 4434 |
% Avoid \lpack{expl3} syntax here. |
| 4435 |
% \begin{macrocode} |
| 4436 |
\NewDocumentEnvironment {chronos} { > { \TrimSpaces } O {} } |
| 4437 |
{% https://tex.stackexchange.com/a/159856/ - Claudio Fiandrino |
| 4438 |
\chronos@env@begin |
| 4439 |
\begin{tikzpicture}[% |
| 4440 |
align=center, |
| 4441 |
anchor=mid, |
| 4442 |
fixed point arithmetic, |
| 4443 |
/chronos/.cd, |
| 4444 |
prif/frame/.append code={\chronos@frametrue}, |
| 4445 |
prif/frame+/.append code={\chronos@frametrue}, |
| 4446 |
prif/frame'/.append code={\chronos@frametrue}, |
| 4447 |
#1, |
| 4448 |
@@timeline@config@diwedd, |
| 4449 |
@@timeline@config@dechrau, |
| 4450 |
@@timeline@config@diwedd/.code={}, |
| 4451 |
@@timeline@config@dechrau/.code={}, |
| 4452 |
@@timeline@config, |
| 4453 |
@@timeline@config/.code={}, |
| 4454 |
@timeline@config, |
| 4455 |
@timeline@config/.code={}, |
| 4456 |
name prefix=\chronos@tikzprefix, |
| 4457 |
]% |
| 4458 |
% \end{macrocode} |
| 4459 |
%^^A \chronosshowpreset |
| 4460 |
%^^A \chronosshowfeatures |
| 4461 |
%^^A % |
| 4462 |
%^^A \IfFreeF \bagpuss {% |
| 4463 |
%^^A \chronosshowfeatures[digwyddiad]% |
| 4464 |
%^^A \chronosshowfeatures |
| 4465 |
%^^A \chronosshowfeatures[byw] |
| 4466 |
%^^A \chronosshowfeatures[parhad] |
| 4467 |
%^^A \chronosshowfeatures[theori] |
| 4468 |
%^^A \chronosshowfeatures[gwybodaeth]} |
| 4469 |
% \begin{macrocode} |
| 4470 |
\IfBooleanExprT { \CSFreeBoolean \chronos@startyear || \CSFreeBoolean \chronos@endyear } |
| 4471 |
{% |
| 4472 |
\PackageError{chronos}{% |
| 4473 |
Missing start and/or end date for timeline. |
| 4474 |
I will attempt to fathom the concept of a timeline without time, |
| 4475 |
but I predict unpredictable results}% |
| 4476 |
{% |
| 4477 |
You must specify both a start and end date. |
| 4478 |
If I try to start at the beginning or finish at the end, |
| 4479 |
I exceed TeX's maximum dimension. |
| 4480 |
Besides, what if time is cyclical? |
| 4481 |
My author didn't tell me how to draw a 3D timeline.}% |
| 4482 |
\IfFreeT \chronos@startyear {\chronos@set@date{1800}{01}{01}{start}}% |
| 4483 |
\IfFreeT \chronos@endyear {\chronos@set@date{2050}{12}{31}{end}}% |
| 4484 |
}% |
| 4485 |
\ifnum\thechronos@startdate>\thechronos@enddate |
| 4486 |
\PackageWarning{chronos}{% |
| 4487 |
Sorry, but I cannot reverse time. |
| 4488 |
Perhaps you could ask a metaphysician? |
| 4489 |
Setting end to start and start to end}% |
| 4490 |
% \end{macrocode} |
| 4491 |
% paid ag anghofio am awto-cywiro yn functions chronos re.\ blwyddyn sero |
| 4492 |
% |
| 4493 |
% don't forget about auto-correction in chronos functions re.\ year zero |
| 4494 |
% \begin{macrocode} |
| 4495 |
\setcounter{chronos@tempcnta}{\thechronos@startdate}% |
| 4496 |
\setcounter{chronos@startdate}{\thechronos@enddate}% |
| 4497 |
\setcounter{chronos@enddate}{\thechronos@tempcnta}% |
| 4498 |
\let\chronos@tmpstartyear\chronos@startyear |
| 4499 |
\let\chronos@tmpstartmonth\chronos@startmonth |
| 4500 |
\let\chronos@tmpstartday\chronos@startday |
| 4501 |
\let\chronos@startyear\chronos@endyear |
| 4502 |
\let\chronos@startmonth\chronos@endmonth |
| 4503 |
\let\chronos@startday\chronos@endday |
| 4504 |
\let\chronos@endyear\chronos@tmpstartyear |
| 4505 |
\let\chronos@endmonth\chronos@tmpstartmonth |
| 4506 |
\let\chronos@endday\chronos@tmpstartday |
| 4507 |
\fi |
| 4508 |
\begin{scope}[/chronos/@style] |
| 4509 |
\extractcolorspec{chronos@lliw@llinell}{\chronos@templlll}%^^A \show\chronos@templlll |
| 4510 |
\extractcolorspec{chronos@lliw@cefndir@llinell}{\chronos@templlllc}%^^A \show\chronos@templlllc |
| 4511 |
\extractcolorspec{white}{\chronos@templlw}%^^A \show\chronos@templlw |
| 4512 |
\extractcolorspec{chronos@prifliw}{\chronos@templlpl}%^^A \show\chronos@templlpl |
| 4513 |
\extractcolorspec{chronos@prifliw@cefndir}{\chronos@templlplc}%^^A \show\chronos@templlplc |
| 4514 |
\ifchronos@yearsonline % BEGIN |
| 4515 |
\chronos@if@gosodF{border}{\pgfqkeys{/chronos}{border ar=middle ground}}% |
| 4516 |
\chronos@if@gosodF{llinell}{\pgfqkeys{/chronos}{llinell ar=middle ground}}% |
| 4517 |
\chronos@if@gosodF{llinell amser}{\pgfqkeys{/chronos}{llinell amser ar=main}}% |
| 4518 |
\chronos@if@gosodF{cysylltiad}{\pgfqkeys{/chronos}{cysylltiad ar=background}}% |
| 4519 |
% \end{macrocode} |
| 4520 |
% rhag: llunio ar y border \textbar{} default: draw on the border |
| 4521 |
% \begin{macrocode} |
| 4522 |
\ifdim\chronos@llinell@yshift=\pi pt |
| 4523 |
\chronos@llinell@yshift=0pt % |
| 4524 |
\fi |
| 4525 |
\ifchronostimelinearrow |
| 4526 |
\chronostimelinearrowfalse |
| 4527 |
\PackageWarning{chronos}{% |
| 4528 |
A timeline arrow requires a suitable off line style} |
| 4529 |
\fi |
| 4530 |
\else |
| 4531 |
\chronos@if@gosodF{border}{\pgfqkeys{/chronos}{border ar=middle ground}}% |
| 4532 |
\chronos@if@gosodF{llinell}{\pgfqkeys{/chronos}{llinell ar=main}}% |
| 4533 |
\chronos@if@gosodF{llinell amser}{\pgfqkeys{/chronos}% |
| 4534 |
{llinell amser ar=main}}% |
| 4535 |
\chronos@if@gosodF{cysylltiad}{\pgfqkeys{/chronos}% |
| 4536 |
{cysylltiad ar=background}}% |
| 4537 |
\ifx\chronos@templlll\chronos@templlplc |
| 4538 |
\ifx\chronos@templlll\chronos@templlw |
| 4539 |
\colorlet{chronos@lliw@llinell}{chronos@prifliw}% |
| 4540 |
\colorlet{chronos@lliw@cefndir@llinell}{chronos@prifliw@cefndir}% |
| 4541 |
\fi |
| 4542 |
\fi |
| 4543 |
\fi |
| 4544 |
\providecolor{chronos main colour}{named}{chronos@prifliw}% |
| 4545 |
\providecolor{chronos main background colour}{named}% |
| 4546 |
{chronos@prifliw@cefndir}% |
| 4547 |
\providecolor{chronos main color}{named}{chronos@prifliw}% |
| 4548 |
\providecolor{chronos main background color}{named}% |
| 4549 |
{chronos@prifliw@cefndir}% |
| 4550 |
\providecolor{chronos prifliw}{named}{chronos@prifliw}% |
| 4551 |
\providecolor{chronos prifliw cefndir}{named}% |
| 4552 |
{chronos@prifliw@cefndir}% |
| 4553 |
\providecolor{chronos timeline foreground colour}{named}% |
| 4554 |
{chronos@lliw@llinell}% |
| 4555 |
\providecolor{chronos timeline background colour}{named}% |
| 4556 |
{chronos@lliw@cefndir@llinell}% |
| 4557 |
\providecolor{chronos timeline foreground color}{named}% |
| 4558 |
{chronos@lliw@llinell}% |
| 4559 |
\providecolor{chronos timeline background color}{named}% |
| 4560 |
{chronos@lliw@cefndir@llinell}% |
| 4561 |
\providecolor{chronos lliw llinell amser blaendir}{named}% |
| 4562 |
{chronos@lliw@llinell}% |
| 4563 |
\providecolor{chronos lliw llinell amser cefndir}{named}% |
| 4564 |
{chronos@lliw@cefndir@llinell}% |
| 4565 |
\providecolor{chronos timeline border inner colour}{named}% |
| 4566 |
{chronos@borderinner}% |
| 4567 |
\providecolor{chronos timeline border outer colour}{named}% |
| 4568 |
{chronos@borderouter}% |
| 4569 |
\providecolor{chronos timeline border middle colour}{named}% |
| 4570 |
{chronos@bordermiddle}% |
| 4571 |
\providecolor{chronos timeline border inner color}{named} |
| 4572 |
{chronos@borderinner}% |
| 4573 |
\providecolor{chronos timeline border outer color}{named} |
| 4574 |
{chronos@borderouter}% |
| 4575 |
\providecolor{chronos timeline border middle color}{named} |
| 4576 |
{chronos@bordermiddle}% |
| 4577 |
\providecolor{chronos lliw llinell amser border mewnol}{named} |
| 4578 |
{chronos@borderinner}% |
| 4579 |
\providecolor{chronos lliw llinell amser border allanol}{named} |
| 4580 |
{chronos@borderouter}% |
| 4581 |
\providecolor{chronos lliw llinell amser border canol}{named} |
| 4582 |
{chronos@bordermiddle}% |
| 4583 |
\colorlet{chronos current tag colour}{chronos@prifliw}% |
| 4584 |
\colorlet{chronos current tag color}{chronos@prifliw}% |
| 4585 |
\ifdim\chronos@height=\pi pt %^^A BEGIN |
| 4586 |
\PackageInfo{chronos}{Timeline height unset. |
| 4587 |
Guessing an appropriate value.}% |
| 4588 |
\ifchronos@yearsonline |
| 4589 |
\chronos@height=10mm |
| 4590 |
\ifdim\chronos@borderheight=\pi pt |
| 4591 |
\PackageInfo{chronos}{% |
| 4592 |
Timeline border height unset. Guessing an appropriate value.}% |
| 4593 |
\chronos@borderheight=2.5mm |
| 4594 |
\fi |
| 4595 |
\else % off line |
| 4596 |
\ifdim\chronos@borderheight=\pi pt |
| 4597 |
\PackageInfo{chronos}{% |
| 4598 |
Timeline border height unset. Guessing an appropriate value.}% |
| 4599 |
\chronos@height=1pt |
| 4600 |
\chronos@borderheight=0pt |
| 4601 |
\else |
| 4602 |
\pgfmathsetlength \chronos@height {4*\chronos@borderheight}% |
| 4603 |
\fi |
| 4604 |
\fi |
| 4605 |
\fi % END \ifdim\chronos@height=\pi pt |
| 4606 |
\ifdim\chronos@borderheight=\pi pt %^^A angen height am hwn ; angen hwn am llinell yshift |
| 4607 |
\PackageInfo{chronos}{% |
| 4608 |
Timeline border height unset. Guessing an appropriate value.}% |
| 4609 |
\ifchronos@yearsonline |
| 4610 |
\pgfmathsetlength \chronos@borderheight {\chronos@height/4} |
| 4611 |
\else |
| 4612 |
\chronos@borderheight=0pt |
| 4613 |
\fi |
| 4614 |
\fi |
| 4615 |
\ifchronos@yearsonline %^^A BEGIN \ifchronos@yearsonline |
| 4616 |
\else |
| 4617 |
\pgfqkeys{/chronos/timeline}{do timeline arrow}% |
| 4618 |
\ifdim\chronos@llinell@yshift=\pi pt %^^A BEGIN |
| 4619 |
\ifdim\chronos@height<5pt %^^A BEGIN |
| 4620 |
\ifdim\chronos@borderheight<.5pt %^^A BEGIN |
| 4621 |
\ifchronos@blynyddoeddisod%^^A BEGIN |
| 4622 |
\chronos@llinell@yshift=5pt |
| 4623 |
\else |
| 4624 |
\ifchronos@blynyddoedduchod%^^A BEGIN |
| 4625 |
\chronos@llinell@yshift=-5pt |
| 4626 |
\fi %^^A END \ifchronos@blynyddoedduchod |
| 4627 |
\fi %^^A END \ifchronos@blynyddoeddisod |
| 4628 |
\else |
| 4629 |
\ifchronos@blynyddoeddisod %^^A BEGIN |
| 4630 |
\chronos@llinell@yshift=\chronos@borderheight |
| 4631 |
\else |
| 4632 |
\ifchronos@blynyddoedduchod %^^A BEGIN |
| 4633 |
\chronos@llinell@yshift=-\chronos@borderheight |
| 4634 |
\fi %^^A END \ifchronos@blynyddoedduchod |
| 4635 |
\fi %^^A END % \ifchronos@blynyddoeddisod |
| 4636 |
\fi %^^A END \ifdim\chronos@borderheight<.5pt |
| 4637 |
\else |
| 4638 |
\ifchronos@blynyddoeddisod %^^A BEGIN |
| 4639 |
\chronos@llinell@yshift=2pt |
| 4640 |
\else |
| 4641 |
\ifchronos@blynyddoedduchod %^^A BEGIN |
| 4642 |
\chronos@llinell@yshift=-2pt |
| 4643 |
\fi %^^A END \ifchronos@blynyddoedduchod |
| 4644 |
\fi %^^A END \ifchronos@blynyddoeddisod |
| 4645 |
\fi %^^A END \ifdim\chronos@height<5pt |
| 4646 |
\fi %^^A END \ifdim\chronos@llinell@yshift=\pi pt |
| 4647 |
\fi %^^A END ifchronos@yearsonline |
| 4648 |
\chronos@llinell@yshift@base=\chronos@llinell@yshift |
| 4649 |
\ifx\chronos@templlpl\chronos@templlplc \PackageWarning{chronos}{% |
| 4650 |
You've set the main colour and the main background colour to the same.}\fi |
| 4651 |
\ifnum\chronos@startyear=0\relax |
| 4652 |
\chronos@yearzerotrue |
| 4653 |
\else |
| 4654 |
\ifnum\chronos@endyear=0\relax |
| 4655 |
\chronos@yearzerotrue |
| 4656 |
\fi |
| 4657 |
\fi |
| 4658 |
\IfExistT \chronos@camrhaniadau {\chronos@if@gosodF{@bare}{% |
| 4659 |
\ifnum\chronos@camrhaniadau>1 |
| 4660 |
\chronos@marks@baretrue |
| 4661 |
\fi |
| 4662 |
}% |
| 4663 |
}% |
| 4664 |
\setlength\chronos@diwedd@diwedd{0pt}% |
| 4665 |
\setlength\chronos@dechrau@dechrau{0pt}% |
| 4666 |
\chronos@if@gosodF{markeras}{% |
| 4667 |
\ifnum\chronos@startyear<0 |
| 4668 |
\ifnum\chronos@endyear>0 |
| 4669 |
\chronos@markerastrue |
| 4670 |
\fi |
| 4671 |
\fi |
| 4672 |
}% \chronos@if@gosodF{markeras} |
| 4673 |
\ifchronos@markeras % BEGIN |
| 4674 |
% \end{macrocode} |
| 4675 |
% angen côd Martin Scharrer uchod - needs the above code by Martin Scharrer |
| 4676 |
% |
| 4677 |
% Rmano: \url{https://chat.stackexchange.com/transcript/message/64273912#64273912} |
| 4678 |
% \begin{macrocode} |
| 4679 |
\ifnum\chronos@endyear>0 |
| 4680 |
\settowidth\chronos@diwedd@diwedd{\chronos@ffont@cyfnodau\chronos@ce}% |
| 4681 |
\addtolength{\chronos@diwedd@diwedd}{\chronos@eramargin}% |
| 4682 |
\else |
| 4683 |
\let\chronos@ce\relax |
| 4684 |
\fi |
| 4685 |
% \end{macrocode} |
| 4686 |
% Rmano: \url{https://chat.stackexchange.com/transcript/message/64273912#64273912} |
| 4687 |
% \begin{macrocode} |
| 4688 |
\ifnum\chronos@startyear<0 |
| 4689 |
\settowidth\chronos@dechrau@dechrau{\chronos@ffont@cyfnodau\chronos@bce}% |
| 4690 |
\addtolength{\chronos@dechrau@dechrau}{\chronos@eramargin}% |
| 4691 |
\else |
| 4692 |
\let\chronos@bce\relax |
| 4693 |
\fi |
| 4694 |
\fi % END \ifchronos@markeras |
| 4695 |
% \end{macrocode} |
| 4696 |
% cofia!! \cs{chronos@set@date} a ffrindiau'n awto-cywiro am flwyddyn sero!! |
| 4697 |
% |
| 4698 |
% remember!! \cs{chronos@set@date} and friends auto-correct for year zero!! |
| 4699 |
% |
| 4700 |
% cofia! ti'n defnyddio **pgfcalendar** yn lle blynyddoedd nawr!! |
| 4701 |
% |
| 4702 |
% remember! you use \lpack{pgfcalendar} in place of years now!! |
| 4703 |
% (but I have no idea what I meant by this \dots) |
| 4704 |
% \begin{macrocode} |
| 4705 |
\pgfmathsetmacro\chronos@unit{% |
| 4706 |
(\chronos@width-2*\chronos@timelinemargin-\chronos@dechrau@dechrau-% |
| 4707 |
\chronos@diwedd@diwedd)/(\thechronos@enddate-\thechronos@startdate)% |
| 4708 |
}% |
| 4709 |
% \end{macrocode} |
| 4710 |
%^^A \chronos@timelineunitlength \dimexpr\chronos@unit pt\relax% using this truncates the dimension and leads to visible inaccuracies e.g. 0.0003pt vs. 0.00031~pt makes a difference over 5,000 units or so! |
| 4711 |
% \begin{macrocode} |
| 4712 |
\pgfmathsetmacro{\chronos@amser@diwedd}{% |
| 4713 |
(\thechronos@enddate-\thechronos@startdate)*\chronos@unit}% |
| 4714 |
\addtolength{\chronos@dechrau@dechrau}{\chronos@timelinemargin}% |
| 4715 |
\addtolength{\chronos@diwedd@diwedd}{\chronos@timelinemargin}% |
| 4716 |
\path (0pt,0pt) ++(-\chronos@dechrau@dechrau,0pt) coordinate (chronos pre);%^^A oedd chronos@dechrau |
| 4717 |
\path (\chronos@amser@diwedd pt,0pt) ++(\chronos@diwedd@diwedd,0pt) |
| 4718 |
coordinate (chronos post);%^^A oedd chronos@diwedd |
| 4719 |
\chronos@inner@halfheight \dimexpr0.5\dimexpr\chronos@height\relax% |
| 4720 |
\chronos@outer@halfheight \dimexpr\chronos@inner@halfheight+\dimexpr\chronos@borderheight\relax% |
| 4721 |
\coordinate (chronos top) at (0pt,\chronos@inner@halfheight);%^^A oedd chronos@height |
| 4722 |
\coordinate (chronos base) at (0pt,-\chronos@inner@halfheight);%^^A oedd chronos@depth |
| 4723 |
\coordinate (chronos foot) at (0pt,-\chronos@outer@halfheight); |
| 4724 |
\coordinate (chronos head) at (0pt,\chronos@outer@halfheight); |
| 4725 |
% \end{macrocode} |
| 4726 |
% chronos pre-top, chronos post-top, chronos pre-base, chronos post-base |
| 4727 |
% \begin{macrocode} |
| 4728 |
\foreach \i/\j in {% |
| 4729 |
pre/top,post/top,pre/base,post/base,pre/head,post/head,pre/foot,post/foot% |
| 4730 |
} \coordinate (chronos \i-\j) at (chronos \i |- chronos \j); |
| 4731 |
\coordinate (chronos start) at (0pt,0pt);% dal yn gywir? |
| 4732 |
\coordinate (chronos origin) at (chronos start);% newid isod efaillai |
| 4733 |
\coordinate (chronos end) at (\chronos@amser@diwedd pt,0pt); |
| 4734 |
\coordinate (chronos mid) at ($(chronos pre)!.5!(chronos post)$); |
| 4735 |
\coordinate (chronos mid-time) at ($(chronos start)!.5!(chronos end)$); |
| 4736 |
% \end{macrocode} |
| 4737 |
% styles which rotate labels need this earlier; reset here in case altered |
| 4738 |
% \begin{macrocode} |
| 4739 |
\let\timelineht\chronos@height |
| 4740 |
\begin{scope}[/chronos/chronos@border@haenen] |
| 4741 |
\ifdim\chronos@borderheight>0pt |
| 4742 |
\path [% |
| 4743 |
top color=chronos@borderouter,% |
| 4744 |
bottom color=chronos@borderinner,% |
| 4745 |
middle color=chronos@bordermiddle,% |
| 4746 |
/chronos/llinell amser/timeline@border% |
| 4747 |
] (chronos pre-top) rectangle (chronos post-head); |
| 4748 |
\path [% |
| 4749 |
bottom color=chronos@borderouter,% |
| 4750 |
top color=chronos@borderinner,% |
| 4751 |
middle color=chronos@bordermiddle,% |
| 4752 |
/chronos/llinell amser/timeline@border% |
| 4753 |
] (chronos post-base) rectangle (chronos pre-foot); |
| 4754 |
\fi |
| 4755 |
\end{scope}% [/chronos/chronos@border@haenen] |
| 4756 |
\begin{scope}[/chronos/chronos@llinell amser@haenen] |
| 4757 |
\ifchronos@yearsonline |
| 4758 |
% \end{macrocode} |
| 4759 |
% fill the timeline if putting the years etc. onto it |
| 4760 |
% \begin{macrocode} |
| 4761 |
\fill [% |
| 4762 |
chronos@lliw@cefndir@llinell,% |
| 4763 |
/chronos/llinell amser/timeline@line% |
| 4764 |
] (chronos pre-top) rectangle (chronos post-base); |
| 4765 |
% \end{macrocode} |
| 4766 |
%^^A \draw [chronos@lliw@cefndir@llinell,/chronos/llinell amser/timeline@line] (chronos pre-top) -- (chronos post-top) (chronos post-base) -- (chronos pre-base); |
| 4767 |
% \begin{macrocode} |
| 4768 |
\else |
| 4769 |
% \end{macrocode} |
| 4770 |
% fel arall, draw |
| 4771 |
% \begin{macrocode} |
| 4772 |
\draw [% |
| 4773 |
chronos@lliw@llinell,% |
| 4774 |
line width=\chronos@height,% |
| 4775 |
/chronos/llinell amser/timeline@line% |
| 4776 |
] (chronos pre) -- (chronos post); |
| 4777 |
% \end{macrocode} |
| 4778 |
% gweler ateb Qrrbrbirlbel: \url{https://tex.stackexchange.com/a/701524/} i fy nghwestiwn: \url{https://tex.stackexchange.com/q/701518/} |
| 4779 |
% \begin{macrocode} |
| 4780 |
\coordinate (tmpa) at (current bounding box.north); |
| 4781 |
\coordinate (tmpb) at (current bounding box.south); |
| 4782 |
\pgfresetboundingbox |
| 4783 |
\path (chronos pre) -- (chronos post) -- (tmpa) -- (tmpb); |
| 4784 |
\fi % \ifchronos@yearsonline |
| 4785 |
% \end{macrocode} |
| 4786 |
% prif label - main label |
| 4787 |
% lau cyfnodau - eras |
| 4788 |
% \begin{macrocode} |
| 4789 |
\ifchronos@markeras % BEGIN |
| 4790 |
\ifchronos@yearsonline |
| 4791 |
\node (chronos bce) [% |
| 4792 |
text=chronos@lliw@llinell,% |
| 4793 |
font=\chronos@ffont@cyfnodau,% |
| 4794 |
inner xsep=0pt,% |
| 4795 |
xshift=-\chronos@eramargin,% |
| 4796 |
anchor=east% |
| 4797 |
] at (chronos start) {\chronos@bce}; |
| 4798 |
\node (chronos ce) [% |
| 4799 |
text=chronos@lliw@llinell,% |
| 4800 |
font=\chronos@ffont@cyfnodau,% |
| 4801 |
inner xsep=0pt,% |
| 4802 |
xshift=\chronos@eramargin,% |
| 4803 |
anchor=west% |
| 4804 |
] at (chronos end) {\chronos@ce}; |
| 4805 |
\else |
| 4806 |
\settowidth \chronos@templgthc {\chronos@ffont@cyfnodau\chronos@bce}% |
| 4807 |
\node (chronos bce) [% |
| 4808 |
/chronos/llinell amser/timeline@years,% |
| 4809 |
/chronos/llinell amser/timeline@year@off@line,% |
| 4810 |
text=chronos@lliw@llinell,% |
| 4811 |
font=\chronos@ffont@cyfnodau,% |
| 4812 |
inner xsep=0pt,% |
| 4813 |
xshift=-\[email protected]\chronos@templgthc% |
| 4814 |
] at (chronos start) {\chronos@bce}; |
| 4815 |
\settowidth \chronos@templgthc {\chronos@ffont@cyfnodau\chronos@ce}% |
| 4816 |
\node (chronos ce) [% |
| 4817 |
/chronos/llinell amser/timeline@years,% |
| 4818 |
/chronos/llinell amser/timeline@year@off@line,% |
| 4819 |
text=chronos@lliw@llinell,% |
| 4820 |
font=\chronos@ffont@cyfnodau,% |
| 4821 |
inner xsep=0pt,% |
| 4822 |
xshift=\chronos@eramargin+.5\chronos@templgthc% |
| 4823 |
] at (chronos end) {\chronos@ce}; |
| 4824 |
\fi |
| 4825 |
\fi % END \ifchronos@markeras |
| 4826 |
\ifchronos@timeline@showyears % BEGIN |
| 4827 |
\pgfmathsetcounter{chronos@startyear}{\chronos@startyear}% |
| 4828 |
\pgfmathsetcounter{chronos@startmarkyear}{\chronos@startyear}% |
| 4829 |
\pgfmathsetcounter{chronos@endyear}{\chronos@endyear}% |
| 4830 |
\def\tempa{none}% |
| 4831 |
\setcounter{chronos@tempcnta}{\value{chronos@endyear}}% |
| 4832 |
\stepcounter{chronos@tempcnta}% |
| 4833 |
\addtocounter{chronos@tempcnta}{-\value{chronos@startyear}}% |
| 4834 |
\IfExistTF \chronos@cam@blwyddyn@fawr {% |
| 4835 |
\IfExistTF \chronos@cam@blwyddyn@fach {% |
| 4836 |
\ifnum\chronos@cam@blwyddyn@fach>\chronos@cam@blwyddyn@fawr |
| 4837 |
\def\chronos@cam@blwyddyn@fach{0}% |
| 4838 |
\PackageWarning{chronos}{Setting minor step year to zero}% |
| 4839 |
\else |
| 4840 |
\IfBooleanExprT {% |
| 4841 |
(\IntCompareBoolean {\chronos@cam@blwyddyn@fach} > {0}) && |
| 4842 |
! (\LegacyBoolean {chronos@minoryears}) && |
| 4843 |
! (\LegacyBoolean {chronos@marks@minor}) && |
| 4844 |
(\LegacyBoolean {chronos@marks@bare}) |
| 4845 |
}{% |
| 4846 |
\PackageWarning{chronos}{% |
| 4847 |
Setting minor step year to zero so your marks are evenly spaced% |
| 4848 |
}% |
| 4849 |
\def\chronos@cam@blwyddyn@fach{0}% |
| 4850 |
}% |
| 4851 |
\fi |
| 4852 |
}{\def\chronos@cam@blwyddyn@fach{0}}% |
| 4853 |
}{% |
| 4854 |
\IfExistTF \chronos@cam@blwyddyn@fach {% |
| 4855 |
\let\chronos@cam@blwyddyn@fawr\chronos@cam@blwyddyn@fach |
| 4856 |
\def\chronos@cam@blwyddyn@fach{0}% |
| 4857 |
\PackageWarning{chronos}{% |
| 4858 |
Using minor step year as step year and setting minor step % |
| 4859 |
year to zero% |
| 4860 |
}% |
| 4861 |
}{% |
| 4862 |
\PackageWarning{chronos}{% |
| 4863 |
You have not specified how frequently years should be marked % |
| 4864 |
on the timeline. |
| 4865 |
Guessing appropriate values. |
| 4866 |
Set step major year and/or step minor year to specify% |
| 4867 |
}% |
| 4868 |
\ifnum\value{chronos@tempcnta}>1500 |
| 4869 |
\def\chronos@cam@blwyddyn@fawr{500}% |
| 4870 |
\def\chronos@cam@blwyddyn@fach{100}% |
| 4871 |
\else\ifnum\value{chronos@tempcnta}>1000 |
| 4872 |
\def\chronos@cam@blwyddyn@fawr{250}% |
| 4873 |
\def\chronos@cam@blwyddyn@fach{50}% |
| 4874 |
\else\ifnum\value{chronos@tempcnta}>300 |
| 4875 |
\def\chronos@cam@blwyddyn@fawr{100}% |
| 4876 |
\def\chronos@cam@blwyddyn@fach{50}% |
| 4877 |
\else\ifnum\value{chronos@tempcnta}>150 |
| 4878 |
\def\chronos@cam@blwyddyn@fawr{100}% |
| 4879 |
\def\chronos@cam@blwyddyn@fach{25}% |
| 4880 |
\else\ifnum\value{chronos@tempcnta}>100 |
| 4881 |
\def\chronos@cam@blwyddyn@fawr{50}% |
| 4882 |
\def\chronos@cam@blwyddyn@fach{10}% |
| 4883 |
\else\ifnum\value{chronos@tempcnta}>50 |
| 4884 |
\def\chronos@cam@blwyddyn@fawr{20}% |
| 4885 |
\def\chronos@cam@blwyddyn@fach{10}% |
| 4886 |
\else\ifnum\value{chronos@tempcnta}>20 |
| 4887 |
\def\chronos@cam@blwyddyn@fawr{10}% |
| 4888 |
\def\chronos@cam@blwyddyn@fach{2}% |
| 4889 |
\else\ifnum\value{chronos@tempcnta}>10 |
| 4890 |
\def\chronos@cam@blwyddyn@fawr{5}% |
| 4891 |
\def\chronos@cam@blwyddyn@fach{1}% |
| 4892 |
\else\def\chronos@cam@blwyddyn@fawr{1}% |
| 4893 |
\def\chronos@cam@blwyddyn@fach{0}% |
| 4894 |
\fi % >10 |
| 4895 |
\fi % >20 |
| 4896 |
\fi % >50 |
| 4897 |
\fi % > 100 |
| 4898 |
\fi % > 150 |
| 4899 |
\fi % >300 |
| 4900 |
\fi % >1000 |
| 4901 |
\fi % >1500 |
| 4902 |
}% |
| 4903 |
}% \IfExistTF \chronos@cam@blwyddyn@fawr |
| 4904 |
\chronos@if@gosodF{markateraswitch}{% |
| 4905 |
\ifnum\chronos@cam@blwyddyn@fach=1 |
| 4906 |
\chronos@markateraswitchfalse |
| 4907 |
\else |
| 4908 |
\ifnum\chronos@cam@blwyddyn@fawr=1 |
| 4909 |
\chronos@markateraswitchfalse |
| 4910 |
\else |
| 4911 |
\chronos@markateraswitchtrue |
| 4912 |
\fi |
| 4913 |
\fi |
| 4914 |
}% |
| 4915 |
\ifnum\chronos@cam@blwyddyn@fach=0 |
| 4916 |
\let\chronos@tempv\chronos@cam@blwyddyn@fawr |
| 4917 |
\else |
| 4918 |
\let\chronos@tempv\chronos@cam@blwyddyn@fach |
| 4919 |
\fi |
| 4920 |
\IfExistF \chronos@camrhaniadau {%^^A rhaid \chronos@marks@baretrue o achos y côd uchod |
| 4921 |
\ifnum\value{chronos@tempcnta}<5 |
| 4922 |
\chronos@marks@baretrue |
| 4923 |
\PackageInfo{chronos}{% |
| 4924 |
I'm guessing you want bare marks on your timeline. |
| 4925 |
If I'm wrong, specify step divisions=0 to override my decision}% |
| 4926 |
\ifnum\value{chronos@tempcnta}>2 |
| 4927 |
\def\chronos@camrhaniadau{4}% |
| 4928 |
\else |
| 4929 |
\ifnum\value{chronos@tempcnta}>1 |
| 4930 |
\def\chronos@camrhaniadau{6}% |
| 4931 |
\else |
| 4932 |
\def\chronos@camrhaniadau{12}% |
| 4933 |
\fi % >1 |
| 4934 |
\fi % >2 |
| 4935 |
\else |
| 4936 |
\ifchronos@marks@bare\relax |
| 4937 |
\else |
| 4938 |
\chronos@marks@barefalse |
| 4939 |
\PackageInfo{chronos}{% |
| 4940 |
I'm guessing you don't want bare marks on your timeline. |
| 4941 |
If I'm wrong, specify step divisions to override my decision}% |
| 4942 |
\fi |
| 4943 |
\fi % <5 |
| 4944 |
}% \chronos@camrhaniadau |
| 4945 |
\ifchronos@marks@bare |
| 4946 |
\IfExistF \chronos@camrhaniadau {% |
| 4947 |
\PackageInfo{chronos}{% |
| 4948 |
You have requested bare marks but not specified how many. |
| 4949 |
Guessing 4 per minor step. Set step divisions to specify}% |
| 4950 |
\def\chronos@camrhaniadau{4}% |
| 4951 |
}% \IfExistT \chronos@camrhaniadau |
| 4952 |
\fi % \ifchronos@marks@bare |
| 4953 |
\IfFreeTF \chronos@stepfrom {% |
| 4954 |
\ifnum\thechronos@startyear=\thechronos@endyear |
| 4955 |
\else |
| 4956 |
\def\tempa{01}% |
| 4957 |
\ifx\chronos@startmonth\tempa |
| 4958 |
\ifx\chronos@startday\tempa |
| 4959 |
\else |
| 4960 |
\stepcounter{chronos@startmarkyear}% |
| 4961 |
\fi % \ifx\chronos@startday\tempa |
| 4962 |
\else |
| 4963 |
\stepcounter{chronos@startmarkyear}% |
| 4964 |
\fi % \ifx\chronos@startmonth\tempa |
| 4965 |
\fi % \ifnum\thechronos@startyear=\thechronos@endyear |
| 4966 |
\pgfmathsetmacro\chronos@tempremainder{% |
| 4967 |
int(mod(\thechronos@startmarkyear,\chronos@tempv))}% |
| 4968 |
\ifnum\chronos@tempremainder=0\relax |
| 4969 |
\else |
| 4970 |
\IfBooleanExprTF {% |
| 4971 |
! (\LegacyBoolean{chronos@yearzero}) && |
| 4972 |
(\IntCompareBoolean{\thechronos@startmarkyear}{=}{1}) % |
| 4973 |
}{% |
| 4974 |
\setcounter{chronos@startmarkyear}{0}% => 1 fel chronos@startmarkyear |
| 4975 |
}{% |
| 4976 |
\ifnum\chronos@tempremainder<0 |
| 4977 |
\pgfmathsetcounter{chronos@startmarkyear}{% |
| 4978 |
int(\thechronos@startmarkyear-\chronos@tempremainder)}% |
| 4979 |
\else |
| 4980 |
\pgfmathparse{% |
| 4981 |
int(\thechronos@startmarkyear-\chronos@tempremainder+\chronos@tempv)% |
| 4982 |
}% |
| 4983 |
\ifnum\pgfmathresult>\thechronos@endyear |
| 4984 |
\PackageWarning{chronos}{Ignoring steps}% |
| 4985 |
\else |
| 4986 |
\setcounter{chronos@startmarkyear}{\pgfmathresult}% |
| 4987 |
\fi |
| 4988 |
\fi |
| 4989 |
}% |
| 4990 |
\fi |
| 4991 |
}{% |
| 4992 |
\pgfmathsetcounter{chronos@startmarkyear}{\chronos@stepfrom}% |
| 4993 |
\pgfmathparse{int(mod(\thechronos@startmarkyear,\chronos@tempv))}% |
| 4994 |
\ifnum\pgfmathresult=0\relax |
| 4995 |
\else |
| 4996 |
\PackageWarning{chronos}{% |
| 4997 |
You have explicitly requested years marked on your timeline % |
| 4998 |
which are not modulo the steps you have specified. |
| 4999 |
I'm setting the year format to show full years, which should % |
| 5000 |
make the result a bit more intelligible.% |
| 5001 |
}% |
| 5002 |
\chronos@setminoryearformat{!Y}% |
| 5003 |
\fi |
| 5004 |
}% \IfFreeTF \chronos@stepfrom |
| 5005 |
\ifnum\chronos@cam@blwyddyn@fach=0 |
| 5006 |
\pgfmathsetmacro\chronos@nextstep{% |
| 5007 |
int(((\thechronos@startmarkyear+\chronos@cam@blwyddyn@fawr)>\thechronos@endyear) |
| 5008 |
? \thechronos@endyear : |
| 5009 |
(\thechronos@startmarkyear+\chronos@cam@blwyddyn@fawr))% |
| 5010 |
}% |
| 5011 |
\else |
| 5012 |
\pgfmathsetmacro\chronos@nextstep{% |
| 5013 |
int(((\thechronos@startmarkyear+\chronos@cam@blwyddyn@fach)>\thechronos@endyear) |
| 5014 |
? \thechronos@endyear : |
| 5015 |
(\thechronos@startmarkyear+\chronos@cam@blwyddyn@fach))% |
| 5016 |
}% |
| 5017 |
\fi |
| 5018 |
\chronos@global@clear@to@clist{tmpa}{}% |
| 5019 |
\IfExistT \chronos@camrhaniadau |
| 5020 |
{\pgfmathsetmacro \chronos@tempml{int(\chronos@camrhaniadau-1)}}% |
| 5021 |
\ifchronos@yearzero |
| 5022 |
\setcounter{chronos@tempcnta}{1} |
| 5023 |
\else |
| 5024 |
\setcounter{chronos@tempcnta}{0}% |
| 5025 |
\fi |
| 5026 |
\IfBooleanExprTF {% |
| 5027 |
(\IntCompareBoolean{\chronos@nextstep}{=}{\thechronos@startmarkyear}) |
| 5028 |
|| ! (\IntCompareBoolean{\chronos@nextstep}{<}{\thechronos@endyear}) |
| 5029 |
|| ( ( (\IntCompareBoolean{\chronos@nextstep}{=}{0}) || |
| 5030 |
(\IntCompareBoolean{\thechronos@startmarkyear}{=}{0}) ) && |
| 5031 |
(\IntCompareBoolean{\thechronos@startmarkyear}{<}{-\thechronos@endyear}) |
| 5032 |
&& ! \LegacyBoolean {chronos@yearzero} ) |
| 5033 |
}{%^^A osgoi infinite loop yn pgf \foreach isod |
| 5034 |
\setcounter{chronos@tempcntb}{\thechronos@endyear}% |
| 5035 |
\addtocounter{chronos@tempcntb}{-\thechronos@startyear}% |
| 5036 |
\IfBooleanExprT {% |
| 5037 |
! \LegacyBoolean {chronos@yearzero} && |
| 5038 |
(\IntCompareBoolean{\thechronos@startmarkyear}{>}{-\thechronos@endyear}) |
| 5039 |
&& ( (\IntCompareBoolean{\chronos@nextstep}{=}{0}) || |
| 5040 |
(\IntCompareBoolean{\thechronos@startmarkyear}{=}{0}) ) |
| 5041 |
} {\addtocounter{chronos@tempcntb}{-1}}% |
| 5042 |
\ifnum\thechronos@tempcntb<2 |
| 5043 |
\IfExistTF \chronos@camrhaniadau |
| 5044 |
{% |
| 5045 |
\pgfmathparse{int(mod(12,\chronos@camrhaniadau))}% |
| 5046 |
\ifnum\pgfmathresult=0\relax |
| 5047 |
\else |
| 5048 |
\PackageWarning{% |
| 5049 |
Since your timeline spans fewer than two years, % |
| 5050 |
step divisions must be a factor of 12. |
| 5051 |
I will use 4 if you requested 5 and 6 otherwise}% |
| 5052 |
\ifnum\pgfmathresult=5 |
| 5053 |
\def\chronos@camrhaniadau{4}% |
| 5054 |
\else |
| 5055 |
\ifnum\pgfmathresult>6 |
| 5056 |
\def\chronos@camrhaniadau{6}% |
| 5057 |
\fi % \fnum\pgfmathresult>6 hynny yw 7,8,9,10,11 |
| 5058 |
\fi % \ifnum\pgfmathresult=5 |
| 5059 |
\fi % \ifnum\pgfmathresult=0 |
| 5060 |
\setcounter{chronos@tempcntb}{\chronos@startmonth}% |
| 5061 |
\ifnum\chronos@startday>1 \stepcounter{chronos@tempcntb}\fi |
| 5062 |
\edef\chronos@tmpstartmonth{\thechronos@tempcntb}% |
| 5063 |
\IfBooleanExprF {% |
| 5064 |
(\IntCompareBoolean{\chronos@tmpstartmonth}{=}{\chronos@endmonth}) |
| 5065 |
&& |
| 5066 |
(\IntCompareBoolean{\thechronos@startyear}{=}{\thechronos@endyear}) |
| 5067 |
} |
| 5068 |
{% |
| 5069 |
\pgfmathsetcounter{chronos@tempcntc}{int{12/\chronos@camrhaniadau}}% |
| 5070 |
\addtocounter{chronos@tempcntb}{\thechronos@tempcntc}% |
| 5071 |
\ifnum\thechronos@tempcntb>11 |
| 5072 |
\edef\chronos@tempu{\chronos@tmpstartmonth,12}% |
| 5073 |
\else |
| 5074 |
\edef\chronos@tempu{% |
| 5075 |
\chronos@tmpstartmonth,\thechronos@tempcntb,...,12}% |
| 5076 |
\fi |
| 5077 |
\foreach \m [expand list] in {\chronos@tempu}% |
| 5078 |
{% |
| 5079 |
\chronos@set@date {\thechronos@startyear}{\m}{01}{tempa}% |
| 5080 |
\ifnum\thechronos@tempadate>\thechronos@enddate |
| 5081 |
\breakforeach |
| 5082 |
\else |
| 5083 |
\ifnum\m=1 |
| 5084 |
\chronos@global@to@clist@star@append{tmpa}{% |
| 5085 |
\thechronos@tempadate/\thechronos@startyear/\thechronos@startyear% |
| 5086 |
}% |
| 5087 |
\else |
| 5088 |
\chronos@global@to@clist@star@append{tmpa}{% |
| 5089 |
\thechronos@tempadate/-5000/\thechronos@startyear% |
| 5090 |
}% |
| 5091 |
\fi % \m=1 |
| 5092 |
\fi % \thechronos@tempadate>\thechronos@enddate |
| 5093 |
}% \foreach \m in {\chronos@tmpstartmonth,...,12} |
| 5094 |
\ifnum\thechronos@startyear<\thechronos@endyear |
| 5095 |
\stepcounter{chronos@tempcntc}% |
| 5096 |
\ifnum\thechronos@tempcntc<\chronos@endmonth |
| 5097 |
\edef\chronos@tempu{1,\thechronos@tempcntc,...,\chronos@endmonth}% |
| 5098 |
\else |
| 5099 |
\edef\chronos@tempu{1,\thechronos@tempcntc}% |
| 5100 |
\fi |
| 5101 |
\foreach \m [expand list] in {\chronos@tempu} %^^A {1,...,\chronos@endmonth} |
| 5102 |
{% |
| 5103 |
\chronos@set@date {\thechronos@endyear}{\m}{01}{tempa}%^^A awto-cywiro am flwyddyn sero |
| 5104 |
\ifnum\thechronos@tempadate>\thechronos@enddate |
| 5105 |
\breakforeach |
| 5106 |
\else |
| 5107 |
\ifnum\m=1 |
| 5108 |
\chronos@global@to@clist@star@append{tmpa}{% |
| 5109 |
\thechronos@tempadate/\thechronos@endyear/\thechronos@endyear% |
| 5110 |
}% |
| 5111 |
\else |
| 5112 |
\chronos@global@to@clist@star@append{tmpa}{% |
| 5113 |
\thechronos@tempadate/-5000/\thechronos@endyear% |
| 5114 |
}% |
| 5115 |
\fi %^^A \m=1 |
| 5116 |
\fi %^^A \thechronos@tempadate>\thechronos@enddate |
| 5117 |
}%^^A \foreach \m in {1,...,\chronos@endmonth} |
| 5118 |
\fi % \thechronos@startyear<\thechronos@endyear |
| 5119 |
}%^^A \ifboolexpr { test {\ifnum\thechronos@tmpstartmonth=\thechronos@endmonth} and test {\ifnum\thechronos@startyear=\thechronos@endyear} } |
| 5120 |
}{%^^A \IfExistTF \chronos@camrhaniadau F |
| 5121 |
\chronos@global@to@clist@star@append{tmpa}{% |
| 5122 |
\thechronos@startdate/\thechronos@startmarkyear/\thechronos@startmarkyear,% |
| 5123 |
\thechronos@enddate/\thechronos@endyear/\thechronos@endyear% |
| 5124 |
}% |
| 5125 |
}%^^A \IfExistTF \chronos@camrhaniadau |
| 5126 |
\chronos@marks@barefalse |
| 5127 |
\else |
| 5128 |
\foreach \b [% |
| 5129 |
evaluate=\b as \i using {% |
| 5130 |
((\b==0)&&(\thechronos@tempcnta==0)) ? 1 : int(\b)}% |
| 5131 |
] in {\thechronos@startmarkyear,\thechronos@endyear} {% |
| 5132 |
\chronos@set@date{\i}{01}{01}{year}%^^A awto-cywiro am flwyddyn sero |
| 5133 |
\chronos@global@to@clist@star@append{tmpa}{\thechronos@yeardate/\b/\i}% |
| 5134 |
}% |
| 5135 |
\fi % \ifnum\thechronos@tempcntb<2 |
| 5136 |
}{% |
| 5137 |
\foreach \b [% |
| 5138 |
evaluate=\b as \i using {% |
| 5139 |
((\b==0)&&(\thechronos@tempcnta==0)) ? 1 : int(\b)}% |
| 5140 |
] in {% |
| 5141 |
\thechronos@startmarkyear,\chronos@nextstep,...,\thechronos@endyear% |
| 5142 |
} {% |
| 5143 |
\chronos@set@date{\i}{01}{01}{year}% awto-cywiro am flwyddyn sero |
| 5144 |
\chronos@global@to@clist@star@append{tmpa}{\thechronos@yeardate/\b/\i}% |
| 5145 |
}% |
| 5146 |
}%^^A \ifboolexpr { test {\ifnumcomp{\chronos@nextstep}{=}{\thechronos@startyear}} or test {\ifnumcomp{\chronos@nextstep}{=}{\thechronos@endyear}} } |
| 5147 |
% \end{macrocode} |
| 5148 |
%^^A \IfFreeF \bagpuss { \show\chronos@camrhaniadau \ifchronos@marks@bare\show\mebare\else\show\meclothed\fi \chronosshowpreset} |
| 5149 |
% \begin{macrocode} |
| 5150 |
\foreach \d/\b/\chronosyeari [% |
| 5151 |
expand list,% |
| 5152 |
remember=\chronosyeari as \ilast (initially \pi),% |
| 5153 |
remember=\d as \dlast (initially \pi)% |
| 5154 |
] in {\chronos@global@from@clist{tmpa}} |
| 5155 |
{% BEGIN \foreach \b ... |
| 5156 |
\ifnum\d=\dlast\relax % BEGIN |
| 5157 |
\else |
| 5158 |
\pgfmathsetmacro\chronos@tempa{(\d-\thechronos@startdate)*\chronos@unit}% |
| 5159 |
\coordinate (chronos date \d) at (\chronos@tempa pt,0pt); |
| 5160 |
\pgfqkeys{/chronos}{% defnyddio am nodau noeth beth bynnag ac am marciau cyffredinol os y llinell amser yn fyr |
| 5161 |
temp@on/.style={/chronos/llinell amser/timeline@minor@mark@on@line}, |
| 5162 |
temp@off/.style={/chronos/llinell amser/timeline@minor@mark@off@line}, |
| 5163 |
}% |
| 5164 |
\ifnum\dlast=\pi |
| 5165 |
\let\chronos@tempff\chronos@ffont@camaubach |
| 5166 |
\ifchronos@yearsonline |
| 5167 |
\node (chronos phantom year) [% |
| 5168 |
rotate around/.style={},% |
| 5169 |
rotate/.style={},% |
| 5170 |
/chronos/llinell amser/timeline@years,% |
| 5171 |
/chronos/llinell amser/timeline@year@on@line,% |
| 5172 |
font=\chronos@tempff% |
| 5173 |
] at (chronos start) {\phantom{1}}; |
| 5174 |
\else |
| 5175 |
\node (chronos phantom year) [% |
| 5176 |
rotate around/.style={},% |
| 5177 |
rotate/.style={},% |
| 5178 |
/chronos/llinell amser/timeline@years,% |
| 5179 |
/chronos/llinell amser/timeline@year@off@line,% |
| 5180 |
font=\chronos@tempff,% |
| 5181 |
fill=none% |
| 5182 |
] at (chronos start) |
| 5183 |
{\phantom{\chronos@showyear[\chronos@minoryearformat]{1}}}; |
| 5184 |
\fi |
| 5185 |
\fi % \ifnum\dlast=\pi |
| 5186 |
\ifnum\b=-5000 |
| 5187 |
\ifchronos@yearsonline |
| 5188 |
\path [/chronos/temp@on] |
| 5189 |
(chronos phantom year.south -| chronos date \d) -- |
| 5190 |
(chronos phantom year.north -| chronos date \d); |
| 5191 |
\else |
| 5192 |
\path [/chronos/temp@off] (chronos date \d) -- |
| 5193 |
( chronos date \d |- chronos phantom year.\chronos@timelineyearsanchor) |
| 5194 |
; |
| 5195 |
\fi |
| 5196 |
\else % \ifnum\b=-5000 |
| 5197 |
\coordinate (chronos year \chronosyeari) at (\chronos@tempa pt,0pt); |
| 5198 |
\ifnum\b=\thechronos@startmarkyear |
| 5199 |
\xdef\chronos@firstmarkedyeardate{\d}% |
| 5200 |
\coordinate (chronos first marked year) at (chronos year \chronosyeari); |
| 5201 |
\ifnum\chronosyeari=0 |
| 5202 |
\coordinate (chronos origin) at (\chronos@tempa pt,0pt); |
| 5203 |
\fi |
| 5204 |
\else |
| 5205 |
\ifnum\chronosyeari=1 |
| 5206 |
\ifchronos@yearzero\relax |
| 5207 |
\else |
| 5208 |
\coordinate (chronos origin) at (\chronos@tempa pt,0pt); |
| 5209 |
% \end{macrocode} |
| 5210 |
% make \cs{foreach} loops work straightforwardly (not used in main code) |
| 5211 |
% \begin{macrocode} |
| 5212 |
\coordinate (chronos year 0) at (chronos year 1); |
| 5213 |
\fi % \ifchronos@yearzero |
| 5214 |
\fi % \ifnum\chronosyeari=1 |
| 5215 |
\fi % \ifnum\b=\thechronos@startmarkyear |
| 5216 |
\ifnum\b=\chronos@nextstep |
| 5217 |
\ifchronos@marks@bare |
| 5218 |
\pgfmathsetmacro\chronos@tempg{% |
| 5219 |
((\d-\chronos@firstmarkedyeardate)*\chronos@unit)/\chronos@camrhaniadau% |
| 5220 |
}% |
| 5221 |
\global\let\chronos@tempg\chronos@tempg |
| 5222 |
\fi |
| 5223 |
\fi % \ifnum\b=\chronos@nextstep |
| 5224 |
\ifnum\chronos@cam@blwyddyn@fach=0 |
| 5225 |
\chronos@cam@modtrue |
| 5226 |
\else |
| 5227 |
\pgfmathparse{int(mod(\chronosyeari,\chronos@cam@blwyddyn@fawr))}% |
| 5228 |
\ifnum\pgfmathresult=0\relax |
| 5229 |
\chronos@cam@modtrue |
| 5230 |
\else |
| 5231 |
\IfBooleanExprT {% |
| 5232 |
! \LegacyBoolean {chronos@yearzero} && |
| 5233 |
\IntCompareBoolean {\chronosyeari}={1} |
| 5234 |
}{% |
| 5235 |
\pgfmathparse{int(mod((\chronosyeari-1),\chronos@cam@blwyddyn@fawr))}% |
| 5236 |
\ifnum\pgfmathresult=0\relax |
| 5237 |
\chronos@cam@modtrue |
| 5238 |
\fi |
| 5239 |
}% |
| 5240 |
\fi % \ifnum\pgfmathresult=0 |
| 5241 |
\fi % \ifnum\chronos@cam@blwyddyn@fach=0 |
| 5242 |
\ifchronos@cam@mod |
| 5243 |
\pgfqkeys{/chronos}{% |
| 5244 |
temp@on/.style={% |
| 5245 |
/chronos/llinell amser/timeline@mark@on@line}, |
| 5246 |
temp@off/.style={% |
| 5247 |
/chronos/llinell amser/timeline@mark@off@line}, |
| 5248 |
}% |
| 5249 |
\let\chronos@tempff\chronos@ffont@camaumawr |
| 5250 |
\def\chronos@temph{}% |
| 5251 |
\else |
| 5252 |
\pgfqkeys{/chronos}{% |
| 5253 |
temp@on/.style={% |
| 5254 |
/chronos/llinell amser/timeline@minor@mark@on@line}, |
| 5255 |
temp@off/.style={% |
| 5256 |
/chronos/llinell amser/timeline@minor@mark@off@line}, |
| 5257 |
}% |
| 5258 |
\let\chronos@tempff\chronos@ffont@camaubach |
| 5259 |
\xdef\chronos@temph{\chronos@minoryearformat}% |
| 5260 |
\ifchronos@marks@minor |
| 5261 |
\chronos@markstrue |
| 5262 |
\else |
| 5263 |
\chronos@marksfalse |
| 5264 |
\fi |
| 5265 |
\fi %^^A \ifchronos@cam@mod |
| 5266 |
% \end{macrocode} |
| 5267 |
% \cs{ifchronos@temp} tracks whether we draw a node (T) or coordinate (F) |
| 5268 |
% \begin{macrocode} |
| 5269 |
\ifchronos@markateraswitch % |
| 5270 |
\ifnum\b=0 |
| 5271 |
\chronos@tempfalse |
| 5272 |
\else |
| 5273 |
\chronos@temptrue |
| 5274 |
\fi |
| 5275 |
\ifchronos@minoryears \else \ifchronos@cam@mod \else \chronos@tempfalse \fi\fi |
| 5276 |
\else |
| 5277 |
\chronos@temptrue |
| 5278 |
\fi |
| 5279 |
% \end{macrocode} |
| 5280 |
% BEGIN \cs{ifchronos@yearsonline} \dots |
| 5281 |
% \begin{macrocode} |
| 5282 |
\ifchronos@yearsonline |
| 5283 |
% \end{macrocode} |
| 5284 |
% if labelling era switch or not switching here, use a node |
| 5285 |
% \begin{macrocode} |
| 5286 |
\ifchronos@temp |
| 5287 |
\node (chronos year \chronosyeari) [% |
| 5288 |
/chronos/llinell amser/timeline@years,% |
| 5289 |
/chronos/llinell amser/timeline@year@on@line,% |
| 5290 |
font=\chronos@tempff% |
| 5291 |
] at (chronos year \chronosyeari) |
| 5292 |
{\chronos@showyear[\chronos@temph]{\chronosyeari}}; |
| 5293 |
\fi %^^A END \ifchronos@temp |
| 5294 |
\ifchronos@marks %^^A BEGIN |
| 5295 |
\path [/chronos/temp@on] (chronos year \chronosyeari.south) -- |
| 5296 |
(chronos year \chronosyeari |- chronos base);%^^A rhag ofn rotate (pwy sy'n gwybod?) |
| 5297 |
\path [/chronos/temp@on] (chronos year \chronosyeari.north) -- |
| 5298 |
(chronos year \chronosyeari |- chronos top);%^^A rhag ofn rotate (pwy sy'n gwybod?) |
| 5299 |
\ifchronos@marks@bare % BEGIN |
| 5300 |
\ifnum\dlast=\pi\relax % BEGIN |
| 5301 |
\else |
| 5302 |
\ifnum\chronos@camrhaniadau>1 % BEGIN |
| 5303 |
\foreach \m [evaluate=\m as \n using {int(\m-1)}] |
| 5304 |
in {2,...,\chronos@camrhaniadau} |
| 5305 |
{% |
| 5306 |
\path [% |
| 5307 |
/chronos/llinell amser/timeline@bare@mark@on@line% |
| 5308 |
] ([xshift={-\n*\chronos@tempg pt}]chronos year |
| 5309 |
\chronosyeari |- chronos phantom year.south) |
| 5310 |
-- ([xshift={-\n*\chronos@tempg pt}]chronos year |
| 5311 |
\chronosyeari |- chronos phantom year.north); |
| 5312 |
}% |
| 5313 |
\ifnum\b=\chronos@nextstep % BEGIN |
| 5314 |
\path (chronos year \ilast); |
| 5315 |
\pgfgetlastxy{\chronos@tempgx}{\chronos@tempgy}% |
| 5316 |
\setlength \chronos@templgtha{% |
| 5317 |
\chronos@tempgx-\chronos@tempg pt}% |
| 5318 |
\ifdim\chronos@templgtha<0pt\relax % BEGIN |
| 5319 |
\else |
| 5320 |
\foreach \n in {1,...,\chronos@tempml} |
| 5321 |
{% |
| 5322 |
\coordinate (a) at (\chronos@templgtha,0pt); |
| 5323 |
\path [% |
| 5324 |
/chronos/llinell amser/timeline@bare@mark@on@line% |
| 5325 |
] (a |- chronos phantom year.south) -- |
| 5326 |
(a |- chronos phantom year.north); |
| 5327 |
\addtolength \chronos@templgtha{-\chronos@tempg pt}% |
| 5328 |
\ifdim\chronos@templgtha<0pt |
| 5329 |
\breakforeach |
| 5330 |
\fi |
| 5331 |
\global\chronos@templgtha\chronos@templgtha |
| 5332 |
}% |
| 5333 |
\fi % END \ifdim\chronos@templgtha<0pt |
| 5334 |
\fi % END \ifnum\b=\chronos@nextstep |
| 5335 |
\edef\chronos@tempey{\thechronos@endyear}% |
| 5336 |
\pgfmathsetmacro\chronos@tempny{int(\b+\chronos@tempv)}% |
| 5337 |
\ifnum\chronos@tempny>\thechronos@endyear % BEGIN |
| 5338 |
\path (chronos year \chronosyeari); |
| 5339 |
\pgfgetlastxy{\chronos@tempgx}{\chronos@tempgy}% |
| 5340 |
\setlength \chronos@templgtha{% |
| 5341 |
\chronos@tempgx+\chronos@tempg pt}% |
| 5342 |
\path (chronos end); |
| 5343 |
\pgfgetlastxy{\chronos@tempgx}{\chronos@tempgy}% |
| 5344 |
\ifdim\chronos@templgtha>\chronos@tempgx\relax % BEGIN |
| 5345 |
\else |
| 5346 |
\foreach \n in {1,...,\chronos@tempml} |
| 5347 |
{% |
| 5348 |
\coordinate (a) at (\chronos@templgtha,0pt); |
| 5349 |
\path [% |
| 5350 |
/chronos/llinell amser/timeline@bare@mark@on@line% |
| 5351 |
] |
| 5352 |
(a |- chronos phantom year.south) -- |
| 5353 |
(a |- chronos phantom year.north); |
| 5354 |
\addtolength \chronos@templgtha{\chronos@tempg pt}% |
| 5355 |
\ifdim\chronos@templgtha>\chronos@tempgx |
| 5356 |
\breakforeach |
| 5357 |
\fi |
| 5358 |
\global\chronos@templgtha\chronos@templgtha |
| 5359 |
}% |
| 5360 |
\fi % END \ifdim\chronos@templgtha<0pt |
| 5361 |
\fi % END \ifnum\chronos@tempny>\thechronos@endyear |
| 5362 |
\fi % END \ifnum\chronos@camrhaniadau>1 |
| 5363 |
\fi % END \ifnum\dlast=\pi |
| 5364 |
\fi % END \ifchronos@marks@bare |
| 5365 |
\fi % END \ifchronos@marks |
| 5366 |
\else % chronos@yearsonline yw F |
| 5367 |
% \end{macrocode} |
| 5368 |
% if labelling era switch or not switching here, use a node |
| 5369 |
% \begin{macrocode} |
| 5370 |
\ifchronos@temp |
| 5371 |
\node (chronos node year \chronosyeari) [% |
| 5372 |
/chronos/llinell amser/timeline@years,% |
| 5373 |
/chronos/llinell amser/timeline@year@off@line,% |
| 5374 |
font=\chronos@tempff% |
| 5375 |
] at (chronos year \chronosyeari) |
| 5376 |
{\chronos@showyear[\chronos@temph]{\chronosyeari}}; |
| 5377 |
\else |
| 5378 |
\node (chronos node year \chronosyeari) [% |
| 5379 |
/chronos/llinell amser/timeline@years,% |
| 5380 |
/chronos/llinell amser/timeline@year@off@line,% |
| 5381 |
font=\chronos@ffont@camaumawr,% |
| 5382 |
draw=none,% |
| 5383 |
fill=none% |
| 5384 |
] at (chronos year \chronosyeari) |
| 5385 |
{\phantom{\chronos@showyear[\chronos@temph]{\chronosyeari}}}; |
| 5386 |
\fi %^^A END % \ifchronos@temp |
| 5387 |
\ifchronos@marks %^^A BEGIN |
| 5388 |
\ifchronos@temp |
| 5389 |
\else |
| 5390 |
\ifnum\b=0 |
| 5391 |
\path [% |
| 5392 |
shorten <=.5*\chronos@height, |
| 5393 |
/chronos/temp@off, |
| 5394 |
/chronos/llinell amser/era switch off line% |
| 5395 |
] (\chronos@tempa pt,0pt) -- |
| 5396 |
(chronos node year \chronosyeari.center -| chronos year \chronosyeari) |
| 5397 |
;%^^A rhag ofn rotate |
| 5398 |
\chronos@temptrue |
| 5399 |
\fi |
| 5400 |
\fi |
| 5401 |
\path [shorten <=.5*\chronos@height, /chronos/temp@off] |
| 5402 |
(\chronos@tempa pt,0pt) -- |
| 5403 |
(chronos node year \chronosyeari.\chronos@timelineyearsanchor -| chronos year \chronosyeari) ; |
| 5404 |
\ifnum\dlast=\pi\relax |
| 5405 |
\else |
| 5406 |
\ifchronos@marks@bare % BEGIN |
| 5407 |
\ifnum\chronos@camrhaniadau>1 |
| 5408 |
\foreach \m [evaluate=\m as \n using {int(\m-1)}] in |
| 5409 |
{2,...,\chronos@camrhaniadau} |
| 5410 |
\path [% |
| 5411 |
shorten <=.5*\chronos@height, |
| 5412 |
/chronos/llinell amser/timeline@bare@mark@off@line% |
| 5413 |
] ([xshift={-\n*\chronos@tempg pt}]\chronos@tempa pt,0pt) |
| 5414 |
coordinate (\chronosyeari-\n) -- |
| 5415 |
(\chronosyeari-\n |- chronos node year \chronosyeari.\chronos@timelineyearsanchor); |
| 5416 |
\ifnum\b=\chronos@nextstep % BEGIN |
| 5417 |
\path (chronos year \ilast); |
| 5418 |
\pgfgetlastxy{\chronos@tempgx}{\chronos@tempgy}% |
| 5419 |
\setlength \chronos@templgtha{% |
| 5420 |
\chronos@tempgx-\chronos@tempg pt}% |
| 5421 |
\ifdim\chronos@templgtha<0pt\relax % BEGIN |
| 5422 |
\else |
| 5423 |
\foreach \n in {1,...,\chronos@tempml} |
| 5424 |
{% |
| 5425 |
\path [% |
| 5426 |
shorten <=.5*\chronos@height, |
| 5427 |
/chronos/llinell amser/timeline@bare@mark@off@line% |
| 5428 |
] (\chronos@templgtha,0pt) coordinate (a) -- |
| 5429 |
(a |- chronos node year \chronosyeari.\chronos@timelineyearsanchor); |
| 5430 |
\addtolength \chronos@templgtha{-\chronos@tempg pt}% |
| 5431 |
\ifdim\chronos@templgtha<0pt \breakforeach\fi |
| 5432 |
\global\chronos@templgtha\chronos@templgtha |
| 5433 |
}% |
| 5434 |
\fi % \ifdim\chronos@templgtha<0pt |
| 5435 |
\fi % \ifnum\b=\chronos@nextstep |
| 5436 |
\edef\chronos@tempey{\thechronos@endyear}% |
| 5437 |
\pgfmathsetmacro\chronos@tempny{int(\b+\chronos@tempv)}% |
| 5438 |
\ifnum\chronos@tempny>\thechronos@endyear % BEGIN |
| 5439 |
\path (chronos year \chronosyeari); |
| 5440 |
\pgfgetlastxy{\chronos@tempgx}{\chronos@tempgy}% |
| 5441 |
\setlength \chronos@templgtha{% |
| 5442 |
\chronos@tempgx+\chronos@tempg pt}% |
| 5443 |
\path (chronos end); |
| 5444 |
\pgfgetlastxy{\chronos@tempgx}{\chronos@tempgy}% |
| 5445 |
\ifdim\chronos@templgtha>\chronos@tempgx\relax % BEGIN |
| 5446 |
\else |
| 5447 |
\foreach \n in {1,...,\chronos@tempml} |
| 5448 |
{% |
| 5449 |
\path [% |
| 5450 |
shorten <=.5*\chronos@height,% |
| 5451 |
/chronos/llinell amser/timeline@bare@mark@off@line,% |
| 5452 |
magenta% |
| 5453 |
] (\chronos@templgtha,0pt) coordinate (a) -- |
| 5454 |
(a |- chronos node year \chronosyeari.\chronos@timelineyearsanchor); |
| 5455 |
\addtolength \chronos@templgtha{\chronos@tempg pt}% |
| 5456 |
\ifdim\chronos@templgtha>\chronos@tempgx |
| 5457 |
\breakforeach |
| 5458 |
\fi |
| 5459 |
\global\chronos@templgtha\chronos@templgtha |
| 5460 |
}% |
| 5461 |
\fi % END \ifdim\chronos@templgtha<0pt |
| 5462 |
\fi % END \ifnum\b=\thechronos@endyear |
| 5463 |
\fi % END \ifnum\chronos@camrhaniadau>1below |
| 5464 |
\fi % END \ifchronos@marks@bare |
| 5465 |
\fi % END \ifnum\dlast=\pi |
| 5466 |
\fi % END \ifchronos@marks |
| 5467 |
\fi % END years on line |
| 5468 |
\fi % \ifnum\b=-5000 |
| 5469 |
\fi % \ifnum\d=\dlast % END |
| 5470 |
}% END \foreach \b ... |
| 5471 |
\fi % END showing years |
| 5472 |
\chronos@from@clist{dyddiadau_coords}{\chronos@coords}% |
| 5473 |
\ifx\chronos@coords\@empty\relax % BEGIN |
| 5474 |
\else |
| 5475 |
\foreach \i in \chronos@coords {% |
| 5476 |
\chronos@set@date{\i}{01}{01}{tempa}% awto-cywiro am flwyddyn sero |
| 5477 |
\pgfmathsetmacro\chronos@temph{% |
| 5478 |
(\thechronos@tempadate-\thechronos@startdate)*\chronos@unit% |
| 5479 |
}% |
| 5480 |
\edef\chronos@tempa{\chronos@tempayear}\edef\chronos@tempb{\i}% |
| 5481 |
\ifx\chronos@tempa\chronos@tempb |
| 5482 |
\coordinate (chronos year \i) at (\chronos@temph pt,0pt); |
| 5483 |
\else |
| 5484 |
\coordinate (chronos date \i) at (\chronos@temph pt,0pt); |
| 5485 |
\fi |
| 5486 |
}% |
| 5487 |
\fi% END |
| 5488 |
\ifchronos@eventyearsonline |
| 5489 |
\pgfqkeys{/chronos}{% |
| 5490 |
timeline years=on line, |
| 5491 |
}% |
| 5492 |
\fi |
| 5493 |
\end{scope}% [/chronos/chronos@llinell amser@haenen] ? |
| 5494 |
% \end{macrocode} |
| 5495 |
% phantom nodes - haws i gosodi pethau \textbar\ easy to install things |
| 5496 |
% \begin{macrocode} |
| 5497 |
\begin{scope}[%^^A <<< byw,every node etc. |
| 5498 |
byw,every node/.append style={% |
| 5499 |
/chronos/@testun=chronos@prifliw,/chronos/placeholder% |
| 5500 |
}% |
| 5501 |
]% |
| 5502 |
\ifnum\chronos@uchod>0 |
| 5503 |
\node (u1) [% |
| 5504 |
anchor=south west, yshift=\chronos@borderheight+2pt, alias=level 1% |
| 5505 |
] at (chronos top -| \chronos@lefelau@at) |
| 5506 |
{\phantom{Enw}u1 \textbar{} level 1\\\phantom{1234}}; |
| 5507 |
\ifnum\chronos@uchod>1 |
| 5508 |
\foreach \i [count=\ino] in {2,...,\chronos@uchod} |
| 5509 |
\node (u\i) [anchor=south west, alias=level \i] at |
| 5510 |
(u\ino.north west) {% |
| 5511 |
\phantom{Enw}u\i{} \textbar{} level \i\\\phantom{1234}% |
| 5512 |
}; |
| 5513 |
\fi |
| 5514 |
\fi |
| 5515 |
\ifnum\chronos@isod>0 |
| 5516 |
\node (i1) [% |
| 5517 |
anchor=north west, yshift=-\chronos@borderheight-2pt, alias=level -1% |
| 5518 |
] at (chronos base -| \chronos@lefelau@at) |
| 5519 |
{\phantom{Enw}i1 \textbar{} level -1\\\phantom{1234}}; |
| 5520 |
\ifnum\chronos@isod>1 |
| 5521 |
\foreach \i [count=\ino] in {2,...,\chronos@isod} |
| 5522 |
\node (i\i) [anchor=north west, alias=level -\i] at |
| 5523 |
(i\ino.south west) |
| 5524 |
{\phantom{Enw}i\i{} \textbar{} level -\i\\\phantom{1234}}; |
| 5525 |
\fi |
| 5526 |
\fi |
| 5527 |
\ifchronos@showcoords |
| 5528 |
\begin{scope}[on chronos overlay layer] |
| 5529 |
\ifnum\chronos@uchod>0 |
| 5530 |
\foreach \i in {1,...,\chronos@uchod} |
| 5531 |
\draw [help lines, draw=chronos@lliw@node] (u\i.north east) |
| 5532 |
-| (u\i.south west) -| cycle; |
| 5533 |
\fi |
| 5534 |
\ifnum\chronos@isod>0 |
| 5535 |
\foreach \i in {1,...,\chronos@isod} |
| 5536 |
\draw [help lines, draw=chronos@lliw@node] |
| 5537 |
(i\i.north east) -| (i\i.south west) -| cycle; |
| 5538 |
\fi |
| 5539 |
\end{scope}%[on chronos overlay layer] |
| 5540 |
\fi |
| 5541 |
\end{scope}%^^A >>> byw, every node etc. |
| 5542 |
\let\ceyearlabel\chronos@yearce |
| 5543 |
\let\bceyearlabel\chronos@yearbce |
| 5544 |
\let\celabel\chronos@ce |
| 5545 |
\let\bcelabel\chronos@bce |
| 5546 |
\let\timelineborderht\chronos@borderheight |
| 5547 |
\let\timelinewd\chronos@width |
| 5548 |
\let\lineyshift\chronos@llinell@yshift |
| 5549 |
% \end{macrocode} |
| 5550 |
% At the end of \texttt{chronos} \dots |
| 5551 |
% \begin{macrocode} |
| 5552 |
}{%^^A oedd yn execute at end picture={...} |
| 5553 |
\ifchronos@frame |
| 5554 |
\ifchronos@headings\relax |
| 5555 |
\else |
| 5556 |
\ifchronos@framedefnyddiobb\relax |
| 5557 |
\else |
| 5558 |
\pgfqkeys{/chronos}{subheadings drops'=0pt:0pt}% |
| 5559 |
\chronos@headingstrue |
| 5560 |
\fi % \ifchronos@framedefnyddiobb |
| 5561 |
\fi % \ifchronos@headings |
| 5562 |
\fi % \ifchronos@frame |
| 5563 |
\ifchronos@headings |
| 5564 |
\ifdim\chronos@heading@drop=0pt |
| 5565 |
\chronos@heading@drop=15pt |
| 5566 |
\PackageWarning{chronos}{Setting headings drop to 15pt}% |
| 5567 |
\fi |
| 5568 |
\ifdim\chronos@subheading@drop@uchod=0pt |
| 5569 |
\chronos@subheading@drop@uchod=12pt |
| 5570 |
\PackageWarning{chronos}{Setting upper subheading drop to 12pt}% |
| 5571 |
\fi |
| 5572 |
\ifdim\chronos@subheading@drop@isod=0pt |
| 5573 |
\chronos@subheading@drop@isod=10pt |
| 5574 |
\PackageWarning{chronos}{Setting lower subheading drop to 10pt}% |
| 5575 |
\fi |
| 5576 |
\ifnum\chronos@uchod=0 |
| 5577 |
\coordinate (u0) at (current bounding box.north); |
| 5578 |
\PackageWarning{chronos}{% |
| 5579 |
Placing (u0) at (current bounding box.north) for headings placement.% |
| 5580 |
}% |
| 5581 |
\fi |
| 5582 |
\ifdim\chronos@border@penawdau=\pi pt |
| 5583 |
\IfIntCompareTF {\chronos@uchod > 0} |
| 5584 |
{% |
| 5585 |
\chronos@border@penawdau=15pt |
| 5586 |
\PackageWarning{chronos}{% |
| 5587 |
Allowing 15pt plus headings and subheadings drops for headings.% |
| 5588 |
}% |
| 5589 |
}{% |
| 5590 |
\chronos@border@penawdau=5pt |
| 5591 |
\PackageWarning{chronos}{% |
| 5592 |
Allowing 5pt plus headings and subheadings drops for headings.% |
| 5593 |
}% |
| 5594 |
}% |
| 5595 |
\advance \chronos@border@penawdau by \chronos@heading@drop |
| 5596 |
\advance \chronos@border@penawdau by \chronos@subheading@drop@uchod |
| 5597 |
\advance \chronos@border@penawdau by \chronos@subheading@drop@isod |
| 5598 |
\fi |
| 5599 |
\ifnum\chronos@isod=0 |
| 5600 |
\coordinate (i0) at (current bounding box.south); |
| 5601 |
\PackageWarning{chronos}{% |
| 5602 |
Placing (i0) at (current bounding box.south) for structural purposes.% |
| 5603 |
}% |
| 5604 |
\fi |
| 5605 |
\chronos@templgtha=\chronos@border@penawdau |
| 5606 |
\advance\chronos@templgtha by \chronos@border@pen |
| 5607 |
\coordinate (chronos margin top) at |
| 5608 |
($(u\[email protected] -| chronos post) + (0pt,\chronos@templgtha)$); |
| 5609 |
\chronos@templgtha=\chronos@border@pen |
| 5610 |
\advance\chronos@templgtha by \chronos@heading@drop |
| 5611 |
\coordinate (chronos main headings) at |
| 5612 |
($(chronos margin top) - (0pt,\chronos@templgtha)$);% oedd pen & gwahanol |
| 5613 |
\coordinate (chronos bottom) at |
| 5614 |
($(i\[email protected]) + (0pt,-\chronos@border@gwaelod)$);% oedd gwaelod |
| 5615 |
\coordinate (chronos upper subheadings) at |
| 5616 |
($(chronos main headings) - (0pt,\chronos@subheading@drop@uchod)$);% oedd pwy1 |
| 5617 |
\coordinate (chronos lower subheadings) at |
| 5618 |
($(chronos upper subheadings) - (0pt,\chronos@subheading@drop@isod)$);% oedd pwy2 |
| 5619 |
\coordinate (chronos@de) at ($(chronos post) + (\chronos@border@de,0pt)$);% oedd de |
| 5620 |
\coordinate (chronos@chwith) at |
| 5621 |
($(chronos pre) + (-\chronos@border@chwith,0pt)$);% oedd chwith |
| 5622 |
% \end{macrocode} |
| 5623 |
%^^A \coordinate (chronos@chwith1) at ($(chronos pre) + (\chronos@border@chwith,0pt)$);% oedd chwith1 |
| 5624 |
% \begin{macrocode} |
| 5625 |
\fi % \ifchronos@headings |
| 5626 |
\pgfqkeys{/chronos}{@before@headings}% |
| 5627 |
\chronos@at@end |
| 5628 |
\pgfqkeys{/chronos}{@before@frame}% |
| 5629 |
\ifchronos@frame |
| 5630 |
\scoped[on chronos background layer]{% |
| 5631 |
\ifchronos@framedefnyddiobb % if frame uses bb |
| 5632 |
\node (chronos frame) [% |
| 5633 |
fit=(current bounding box), /chronos/prif/@frame% |
| 5634 |
] {}; |
| 5635 |
\else |
| 5636 |
\node (chronos frame) [fit=(chronos margin top -| chronos@de) |
| 5637 |
(chronos bottom -| chronos@chwith), /chronos/prif/@frame] {}; |
| 5638 |
\fi % \ifchronos@framedefnyddiobb |
| 5639 |
\path (chronos frame.south west) |
| 5640 |
++(-\chronos@border@allanol,-\chronos@border@allanol) |- |
| 5641 |
(chronos frame.north east) -- |
| 5642 |
++(\chronos@border@allanol,\chronos@border@allanol); |
| 5643 |
}% |
| 5644 |
\fi % \ifchronos@frame |
| 5645 |
\pgfqkeys{/chronos}{@tikz}% |
| 5646 |
\end{scope}% [/chronos/@style] |
| 5647 |
\pgf@relevantforpicturesizefalse |
| 5648 |
\pgfqkeys{/chronos}{@@tikz}% |
| 5649 |
\ifchronos@showcoords |
| 5650 |
\begin{scope}[on chronos overlay layer] |
| 5651 |
\foreach \i/\j in {% |
| 5652 |
chronos foot/-55,% |
| 5653 |
chronos head/north,% |
| 5654 |
chronos base/-25,% |
| 5655 |
chronos top/120,% |
| 5656 |
chronos start/85,% |
| 5657 |
chronos end/85,% |
| 5658 |
chronos pre/west,% |
| 5659 |
chronos post/east,% |
| 5660 |
chronos pre-top/175,% |
| 5661 |
chronos post-top/15,% |
| 5662 |
chronos pre-base/south west,% |
| 5663 |
chronos post-base/south east,% |
| 5664 |
chronos pre-head/155,% |
| 5665 |
chronos post-head/north east,% |
| 5666 |
chronos pre-foot/south,% |
| 5667 |
chronos post-foot/south,% |
| 5668 |
chronos origin/-85,% |
| 5669 |
chronos mid/90,% |
| 5670 |
chronos mid-time/-90% |
| 5671 |
} |
| 5672 |
\node [/chronos/show coord={\j}{\i}] at (\i) {}; |
| 5673 |
\ifchronos@timeline@showyears |
| 5674 |
\node [/chronos/show coord={45}{chronos first marked year}] at |
| 5675 |
(chronos first marked year) {}; |
| 5676 |
\fi |
| 5677 |
\ifchronos@headings |
| 5678 |
\foreach \i/\j in {% |
| 5679 |
chronos main headings/east,% |
| 5680 |
chronos bottom/north,% |
| 5681 |
chronos upper subheadings/east,% |
| 5682 |
chronos lower subheadings/east,% |
| 5683 |
chronos margin top/north% |
| 5684 |
} |
| 5685 |
\node [/chronos/show coord={\j}{\i}] at (\i) {}; |
| 5686 |
\fi |
| 5687 |
\node (chronos@gwybodaeth@coords) [% |
| 5688 |
below=2.5pt of current bounding box.south west,% |
| 5689 |
anchor=north west,% |
| 5690 |
every pin,% |
| 5691 |
text=chronos@lliw@coord% |
| 5692 |
] {\textbullet{} coordinates}; |
| 5693 |
\end{scope}% |
| 5694 |
\fi % \ifchronos@showcoords |
| 5695 |
\ifchronos@shownodes |
| 5696 |
\begin{scope}[on chronos overlay layer] |
| 5697 |
\ifchronos@markeras |
| 5698 |
\foreach \i/\j in {chronos bce/south, chronos ce/-95} |
| 5699 |
{% |
| 5700 |
\draw [help lines, draw=chronos@lliw@node] (\i.north west) -| |
| 5701 |
(\i.south east) -| cycle; |
| 5702 |
\node [/chronos/show node coord={\j}{\i}] at (\i) {}; |
| 5703 |
}% |
| 5704 |
\fi % \ifchronos@markeras |
| 5705 |
\ifchronos@frame |
| 5706 |
\draw [help lines, draw=chronos@lliw@node] (chronos frame.north west) |
| 5707 |
-| (chronos frame.south east) -| cycle; |
| 5708 |
\node [/chronos/show node coord={north}{chronos frame}] at |
| 5709 |
(chronos frame.north) {}; |
| 5710 |
\fi % \ifchronos@frame |
| 5711 |
\ifchronos@showcoords |
| 5712 |
\node (chronos@gwybodaeth@nodes) [% |
| 5713 |
right=of chronos@[email protected] east,% |
| 5714 |
anchor=base west,% |
| 5715 |
every pin,% |
| 5716 |
text=chronos@lliw@node% |
| 5717 |
] {\textbullet{} nodes}; |
| 5718 |
\else |
| 5719 |
\node (chronos@gwybodaeth@nodes) [% |
| 5720 |
below=2.5pt of current bounding box.south west,% |
| 5721 |
anchor=north west,% |
| 5722 |
every pin,% |
| 5723 |
text=chronos@lliw@node% |
| 5724 |
] {\textbullet{} nodes}; |
| 5725 |
\fi % \ifchronos@showcoords |
| 5726 |
\end{scope}% |
| 5727 |
\fi % \ifchronos@shownodes |
| 5728 |
\ifchronos@showbb |
| 5729 |
\begin{scope}[on chronos overlay layer] |
| 5730 |
\draw [help lines,draw=chronos@lliw@bb] |
| 5731 |
(current bounding box.north east) -| (current bounding box.south west) |
| 5732 |
-| cycle; |
| 5733 |
\node [% |
| 5734 |
/chronos/show coordinate={chronos@lliw@bb}{90}{bounding box}{15pt}{}% |
| 5735 |
] at (current bounding box.120) {}; |
| 5736 |
\ifchronos@shownodes |
| 5737 |
\node (chronos@gwybodaeth@bb) [% |
| 5738 |
right=of chronos@[email protected] east,% |
| 5739 |
anchor=base west,% |
| 5740 |
every pin,% |
| 5741 |
text=chronos@lliw@bb% |
| 5742 |
] {\textbullet{} bounding box}; |
| 5743 |
\else |
| 5744 |
\ifchronos@showcoords |
| 5745 |
\node (chronos@gwybodaeth@bb) [% |
| 5746 |
right=of chronos@[email protected] east,% |
| 5747 |
anchor=base west,% |
| 5748 |
every pin,% |
| 5749 |
text=chronos@lliw@bb% |
| 5750 |
] {\textbullet{} bounding box}; |
| 5751 |
\else |
| 5752 |
\node (chronos@gwybodaeth@bb) [% |
| 5753 |
below=2.5pt of current bounding box.south west,% |
| 5754 |
anchor=north west,% |
| 5755 |
every pin,% |
| 5756 |
text=chronos@lliw@bb% |
| 5757 |
] {\textbullet{} bounding box}; |
| 5758 |
\fi % \ifchronos@showcoords |
| 5759 |
\fi % \ifchronos@shownodes |
| 5760 |
\end{scope}% |
| 5761 |
\fi % \ifchronos@showbb |
| 5762 |
\end{tikzpicture}% |
| 5763 |
% \end{macrocode} |
| 5764 |
% ailosod pethau rhagosodedig sy'n gosod gyda \cs{g} neu \cs{global} |
| 5765 |
% \begin{macrocode} |
| 5766 |
\chronos@global@clear@to@clist{century_subheadings}% |
| 5767 |
\chronos@lliwiau@clear |
| 5768 |
\ifchronos@byw@isod@rhag |
| 5769 |
\global\chronos@byw@isodtrue |
| 5770 |
\else |
| 5771 |
\global\chronos@byw@isodfalse |
| 5772 |
\fi |
| 5773 |
\ifchronos@digwyddiad@isod@rhag |
| 5774 |
\global\chronos@digwyddiad@isodtrue |
| 5775 |
\else |
| 5776 |
\global\chronos@digwyddiad@isodfalse |
| 5777 |
\fi |
| 5778 |
\ifchronos@parhad@isod@rhag |
| 5779 |
\global\chronos@parhad@isodtrue |
| 5780 |
\else |
| 5781 |
\global\chronos@parhad@isodfalse |
| 5782 |
\fi |
| 5783 |
\let\chronosset\@chronosset |
| 5784 |
} |
| 5785 |
% \end{macrocode} |
| 5786 |
% \end{environment} |
| 5787 |
%^^A END env y ddogfen >>> |
| 5788 |
%^^A BEGIN macros y ddogfen <<< |
| 5789 |
% \begin{macro}{\chronosset,\@chronosset,\@@chronosset,\s@chronos@set,\@chronos@set}%^^A <<< |
| 5790 |
% \changes{v0.9.3}{2025-07-15}{Eliminate \lpack{xparse} macros for internal commands. (According to \TeX{} SE chat this is The Right Thing To Do).} |
| 5791 |
% Provide conditional interface for defining custom styles, schemes, settings etc\@. |
| 5792 |
% We don't want this to do anything inside a \env{chronos} environment, so just issue a warning in that case. |
| 5793 |
% \begin{macrocode} |
| 5794 |
\protected\gdef\@chronosset{% |
| 5795 |
\typeout{Setting for all clangers!}% |
| 5796 |
\@ifstar\s@chronos@set\@chronos@set |
| 5797 |
} |
| 5798 |
\protected\gdef\@chronos@set#1{% |
| 5799 |
\typeout{Starless Sneetches.}% |
| 5800 |
\pgfqkeys{/chronos}{#1}% |
| 5801 |
} |
| 5802 |
\protected\gdef\s@chronos@set#1{% |
| 5803 |
\typeout{Stars upon thars.}% |
| 5804 |
\pgfqkeys{/chronos}{#1}% |
| 5805 |
\ifchronos@byw@isod |
| 5806 |
\chronos@byw@isod@rhagtrue |
| 5807 |
\else |
| 5808 |
\chronos@byw@isod@rhagfalse |
| 5809 |
\fi |
| 5810 |
\ifchronos@digwyddiad@isod |
| 5811 |
\chronos@digwyddiad@isod@rhagtrue |
| 5812 |
\else |
| 5813 |
\chronos@digwyddiad@isod@rhagfalse |
| 5814 |
\fi |
| 5815 |
\ifchronos@parhad@isod |
| 5816 |
\chronos@parhad@isod@rhagtrue |
| 5817 |
\else |
| 5818 |
\chronos@parhad@isod@rhagfalse |
| 5819 |
\fi |
| 5820 |
\chronos@lliwiau@cadw@rhag |
| 5821 |
} |
| 5822 |
\protected\gdef\@@chronosset{% |
| 5823 |
\PackageWarning{chronos}{% |
| 5824 |
\bs chronosset has no effect inside a chronos environment. |
| 5825 |
Usage ignored % |
| 5826 |
}% |
| 5827 |
\@ifstar\@gobble\@gobble |
| 5828 |
} |
| 5829 |
\let\chronosset\@chronosset |
| 5830 |
% \end{macrocode} |
| 5831 |
% \end{macro}%^^A >>> |
| 5832 |
% \begin{macro}{\byw}%^^A <<< |
| 5833 |
% That is, \cs{chronoslife}. |
| 5834 |
% \begin{macrocode} |
| 5835 |
\NewDocumentCommand\byw { m }{% |
| 5836 |
\begingroup |
| 5837 |
\Undefine\chronos@byw@labelgeni |
| 5838 |
\Undefine\chronos@byw@labelmarw |
| 5839 |
\Undefine\chronos@byw@angor |
| 5840 |
\Undefine\chronos@byw@at |
| 5841 |
\Undefine\chronos@byw@invanchor |
| 5842 |
\Undefine\chronos@cynnwys@testun |
| 5843 |
\Undefine\chronos@cynnwys@dyddiadau |
| 5844 |
\Undefine\chronos@cynnwys@enw |
| 5845 |
\Undefine\chronos@cysylltwyr |
| 5846 |
\chronos@byw@cysylltiadtheorifalse %^^A rhag ofn |
| 5847 |
\tikzset{byw={enw={??},marw={\year-\month-\day},bu farw=false,#1}}% |
| 5848 |
\ifchronos@eventdatessplit |
| 5849 |
\PackageInfo{chronos}{Setting split false for non-event.}% |
| 5850 |
\chronos@eventdatessplitfalse |
| 5851 |
\fi |
| 5852 |
\pgfmathsetmacro\chronos@temph{% |
| 5853 |
(\thechronos@genidate-\thechronos@startdate)*\chronos@unit |
| 5854 |
}% |
| 5855 |
\pgfmathsetmacro\chronos@tempk{% |
| 5856 |
(\thechronos@marwdate-\thechronos@startdate)*\chronos@unit |
| 5857 |
}% |
| 5858 |
\pgfmathsetmacro\chronos@templ{% |
| 5859 |
(\chronos@temph+\chronos@tempk)*\chronos@unit/2% |
| 5860 |
}% |
| 5861 |
% \end{macrocode} |
| 5862 |
% temporary coordinate accurate only for x |
| 5863 |
% \begin{macrocode} |
| 5864 |
\coordinate (\chronos@byw@tikzname) at (\chronos@templ pt,0pt); |
| 5865 |
% \end{macrocode} |
| 5866 |
% \changes{v0.9.3}{2025-07-09}{Add helper coordinates for placing things relative to life/period lines, including provisional coordinates for getting \texttt{x} only.} |
| 5867 |
% These are exposed publicly, as they are useful, but they are only correct for \texttt{x} during \texttt{life} creation. |
| 5868 |
% \begin{macrocode} |
| 5869 |
\coordinate [alias=birth \chronos@byw@tikzname] (geni \chronos@byw@tikzname) at (\chronos@temph pt,0pt); |
| 5870 |
\coordinate [alias=death \chronos@byw@tikzname] (marw \chronos@byw@tikzname) at (\chronos@tempk pt,0pt); |
| 5871 |
\chronos@troilliwiau@tag{byw}% |
| 5872 |
\chronos@gosodangor@tag{byw}% |
| 5873 |
\chronos@gosodborder@tag{byw}% |
| 5874 |
\IfExistTF \chronos@cynnwys@testun{% |
| 5875 |
\let\chronos@cynnwys@dyddiadau\relax |
| 5876 |
\let\chronos@cynnwys@enw\relax |
| 5877 |
}{% |
| 5878 |
\IfExistF \chronos@cynnwys@enw {% |
| 5879 |
\def \chronos@cynnwys@enw {\chronos@enw@priflythrennu{\chronos@byw@enw}}% |
| 5880 |
}% |
| 5881 |
\IfExistTF \chronos@cynnwys@dyddiadau {% |
| 5882 |
\pretocmd \chronos@cynnwys@dyddiadau {\\\chronos@byw@ffontdyddiad}{}{}% |
| 5883 |
}{% |
| 5884 |
\ifchronos@onlytext\let\chronos@cynnwys@dyddiadau\relax |
| 5885 |
\else |
| 5886 |
\ifchronos@bufarw\relax\else\def\chronos@byw@labelmarw{}\fi |
| 5887 |
\chronos@dyddiadau@tag{byw}{geni}{geni}{marw}{marw}% |
| 5888 |
\ifchronos@temp |
| 5889 |
\def \chronos@cynnwys@dyddiadau {% |
| 5890 |
\\\chronos@byw@ffontdyddiad\chronos@byw@labelmarw |
| 5891 |
}% |
| 5892 |
\else |
| 5893 |
\def \chronos@cynnwys@dyddiadau {% |
| 5894 |
\\\chronos@byw@ffontdyddiad\chronos@byw@labelgeni |
| 5895 |
--\chronos@byw@labelmarw |
| 5896 |
}% |
| 5897 |
\fi |
| 5898 |
\fi |
| 5899 |
}% |
| 5900 |
\def \chronos@cynnwys@testun {% |
| 5901 |
{\chronos@byw@ffonttestun\chronos@cynnwys@enw}\chronos@cynnwys@dyddiadau |
| 5902 |
}% |
| 5903 |
}% |
| 5904 |
\chronos@creu@llinell {byw}{\chronos@temph pt}{\chronos@tempk pt}{geni}{marw}{birth}{death}% |
| 5905 |
% \end{macrocode} |
| 5906 |
% final coordinate accurate for x and y |
| 5907 |
% |
| 5908 |
% \changes{v0.9.3}{2025-07-10}{Adjust reference coordinate placement for additional line shift.} |
| 5909 |
% Subtract additional line shift so reference coordinate is offset by standard distance from timeline (0pt or \texttt{yshift}). |
| 5910 |
% For most styles, \cs{chronos@llinell@add@yshift}\ is \texttt{0pt}. |
| 5911 |
% \begin{macrocode} |
| 5912 |
\coordinate [yshift=-\chronos@llinell@add@yshift] (\chronos@byw@tikzname) at |
| 5913 |
($(\chronos@byw@tikzname{} geni)!1/2!(\chronos@byw@tikzname{} marw)$); |
| 5914 |
% \end{macrocode} |
| 5915 |
% creu cylcu ar y lein ; testun - prif node ; testun cylch ; prif gysylltiad |
| 5916 |
% \begin{macrocode} |
| 5917 |
\chronos@creu@testun@tag{}{byw}{\chronos@cynnwys@testun}% |
| 5918 |
\ifchronos@byw@cysylltiadtheori |
| 5919 |
\chronos@angorau@theori{testun \chronos@byw@tikzname}% |
| 5920 |
{cysylltwr \chronos@byw@tikzname}{connector \chronos@byw@tikzname}% |
| 5921 |
{/chronos/@cysylltwr@testun=\chronos@byw@lliw}% |
| 5922 |
% \end{macrocode} |
| 5923 |
%^^A }% |
| 5924 |
% \begin{macrocode} |
| 5925 |
\fi |
| 5926 |
\ifchronos@every@byw@isod |
| 5927 |
\global\chronos@byw@isodtrue |
| 5928 |
\else\ifchronos@every@byw@uchod |
| 5929 |
\global\chronos@byw@isodfalse |
| 5930 |
\else |
| 5931 |
\ifchronos@byw@isod |
| 5932 |
\global\chronos@byw@isodfalse |
| 5933 |
\else |
| 5934 |
\global\chronos@byw@isodtrue |
| 5935 |
\fi |
| 5936 |
\fi |
| 5937 |
\fi |
| 5938 |
\chronos@ailosod@nodweddion |
| 5939 |
\endgroup |
| 5940 |
} |
| 5941 |
% \end{macrocode} |
| 5942 |
% \end{macro}%^^A >>> |
| 5943 |
% \begin{macro}{\digwyddiad}%^^A <<< |
| 5944 |
% That is, \cs{chronosevent}. |
| 5945 |
% \begin{macrocode} |
| 5946 |
\NewDocumentCommand\digwyddiad { m }{% |
| 5947 |
\begingroup |
| 5948 |
\Undefine\chronos@digwyddiad@angor |
| 5949 |
\Undefine\chronos@digwyddiad@invanchor |
| 5950 |
\Undefine\chronos@digwyddiad@at |
| 5951 |
\Undefine\chronos@cynnwys@testun |
| 5952 |
\Undefine\chronos@cynnwys@dyddiadau |
| 5953 |
\Undefine\chronos@cynnwys@enw |
| 5954 |
\Undefine\chronos@cysylltwyr |
| 5955 |
\chronos@digwyddiad@cysylltiadtheorifalse %^^A rhag ofn |
| 5956 |
% \end{macrocode} |
| 5957 |
% oedd problem yn pasio every@digwyddiad i digwyddiad pan iddo fe'n cynnwys font=\cs{unrhywbeth} |
| 5958 |
% \textbar{} there was a problem passing every@digwyddiad to digwyddiad (event) when it included \texttt{font=\bs something} |
| 5959 |
% \begin{macrocode} |
| 5960 |
\tikzset{digwyddiad={enw={??},#1}}% |
| 5961 |
\pgfmathsetmacro\chronos@temph{% |
| 5962 |
(\thechronos@digdate-\thechronos@startdate)*\chronos@unit |
| 5963 |
}% |
| 5964 |
% \end{macrocode} |
| 5965 |
% temporary coordinate accurate only for x |
| 5966 |
% \begin{macrocode} |
| 5967 |
\coordinate (\chronos@digwyddiad@tikzname) at (\chronos@temph pt,0pt); |
| 5968 |
\chronos@troilliwiau@tag{digwyddiad}% |
| 5969 |
\chronos@gosodangor@tag{digwyddiad}% |
| 5970 |
\chronos@gosodborder@tag{digwyddiad}% |
| 5971 |
\ifchronos@eventdatessplit |
| 5972 |
\ifchronos@onlytext\relax |
| 5973 |
\IfExistF \chronos@cynnwys@testun {% |
| 5974 |
\IfExistTF \chronos@cynnwys@enw {% |
| 5975 |
\def\chronos@cynnwys@testun {% |
| 5976 |
\chronos@digwyddiad@ffonttestun |
| 5977 |
\chronos@cynnwys@enw |
| 5978 |
} |
| 5979 |
}{% |
| 5980 |
\def \chronos@cynnwys@testun {% |
| 5981 |
\chronos@digwyddiad@ffonttestun |
| 5982 |
\chronos@enw@priflythrennu{\chronos@digwyddiad@enw}% |
| 5983 |
}% |
| 5984 |
}% |
| 5985 |
}% |
| 5986 |
\else |
| 5987 |
\IfExistF \chronos@cynnwys@testun {% |
| 5988 |
\IfExistF \chronos@cynnwys@dyddiadau {% |
| 5989 |
\def \chronos@cynnwys@dyddiadau {% |
| 5990 |
\chronos@showdate@cs[chronos@digwyddiad@fformatdyddiad]{dig}% |
| 5991 |
}% |
| 5992 |
}% |
| 5993 |
\IfExistTF \chronos@cynnwys@enw {% |
| 5994 |
\def\chronos@cynnwys@testun {% |
| 5995 |
\chronos@digwyddiad@ffonttestun |
| 5996 |
\chronos@cynnwys@enw |
| 5997 |
} |
| 5998 |
}{% |
| 5999 |
\def \chronos@cynnwys@testun {% |
| 6000 |
\chronos@digwyddiad@ffonttestun |
| 6001 |
\chronos@enw@priflythrennu{\chronos@digwyddiad@enw}% |
| 6002 |
}% |
| 6003 |
}% |
| 6004 |
}% |
| 6005 |
\fi |
| 6006 |
\else % not event date split |
| 6007 |
\IfExistTF \chronos@cynnwys@testun {% |
| 6008 |
\let\chronos@cynnwys@dyddiadau\relax |
| 6009 |
\let\chronos@cynnwys@enw\relax |
| 6010 |
}{% |
| 6011 |
\IfExistF {\chronos@cynnwys@enw}{% |
| 6012 |
\def \chronos@cynnwys@enw {% |
| 6013 |
\chronos@enw@priflythrennu{\chronos@digwyddiad@enw}% |
| 6014 |
}% |
| 6015 |
}% |
| 6016 |
\IfExistTF \chronos@cynnwys@dyddiadau {% |
| 6017 |
\apptocmd \chronos@cynnwys@dyddiadau {\\}{}{}% |
| 6018 |
\pretocmd \chronos@cynnwys@dyddiadau |
| 6019 |
{\chronos@digwyddiad@ffontdyddiad}{}{}% |
| 6020 |
}{% |
| 6021 |
\ifchronos@onlytext\let\chronos@cynnwys@dyddiadau\relax |
| 6022 |
\else |
| 6023 |
\def \chronos@cynnwys@dyddiadau {% |
| 6024 |
\chronos@digwyddiad@ffontdyddiad |
| 6025 |
\chronos@showdate@cs[chronos@digwyddiad@fformatdyddiad]{dig}\\% |
| 6026 |
}% |
| 6027 |
\fi |
| 6028 |
}% |
| 6029 |
\def \chronos@cynnwys@testun {% |
| 6030 |
\chronos@cynnwys@dyddiadau |
| 6031 |
\chronos@digwyddiad@ffonttestun |
| 6032 |
\chronos@cynnwys@enw |
| 6033 |
}% |
| 6034 |
}% |
| 6035 |
\fi |
| 6036 |
% \end{macrocode} |
| 6037 |
% marcio digwyddiad ar y lein \textbar{} mark event on line |
| 6038 |
% \begin{macrocode} |
| 6039 |
\begin{scope}[/chronos/chronos@llinell@haenen]% finalise coordinate placement |
| 6040 |
\path [/chronos/@llinell=\chronos@digwyddiad@lliw] ({\chronos@temph pt,0} |
| 6041 |
|- \chronos@border@coord) -- +(0pt,\chronos@digwyddiad@border) |
| 6042 |
coordinate (\chronos@digwyddiad@tikzname); |
| 6043 |
\ifchronos@eventdatessplit |
| 6044 |
\path [/chronos/@llinell=\chronos@digwyddiad@lliw] |
| 6045 |
({\chronos@temph pt,0} |- \chronos@border@coord@inv) -- |
| 6046 |
+(0pt,\chronos@digwyddiad@border@inv) coordinate |
| 6047 |
(\chronos@digwyddiad@tikzname-inv); |
| 6048 |
\fi |
| 6049 |
\end{scope}% |
| 6050 |
% \end{macrocode} |
| 6051 |
% creu cylch ar y lein ; testun - prif node ; testun cylch ; prif gysylltiad |
| 6052 |
% \textbar{} create circle (or other mark) on timeline ; text tag ; text tag circle (connector) ; main connection |
| 6053 |
% \begin{macrocode} |
| 6054 |
\ifchronos@eventdatessplit |
| 6055 |
% \end{macrocode} |
| 6056 |
% don't use a group here or names won't survive tag creation |
| 6057 |
% \begin{macrocode} |
| 6058 |
\chronos@hollti@testun@tagtrue |
| 6059 |
\chronos@creu@testun@tag{}{digwyddiad}{\chronos@cynnwys@dyddiadau}%^^A angen defnyddio /chronos/event date split |
| 6060 |
\chronos@hollti@testun@tagfalse |
| 6061 |
\fi |
| 6062 |
\chronos@creu@testun@tag{}{digwyddiad}{\chronos@cynnwys@testun}% |
| 6063 |
% \end{macrocode} |
| 6064 |
% dyddiad arbennig \textbar{} special date |
| 6065 |
% \begin{macrocode} |
| 6066 |
\ifchronos@eventyearsonline |
| 6067 |
\edef\chronos@tempa{none}% |
| 6068 |
\edef\chronos@tempb{\chronos@specialdate}% |
| 6069 |
\ifx\chronos@tempa\chronos@tempb |
| 6070 |
\def\chronos@tempbd{% |
| 6071 |
\chronos@showdate@cs[chronos@digwyddiad@fformatdyddiad]{dig}% |
| 6072 |
}% |
| 6073 |
\else |
| 6074 |
\let\chronos@tempbd\chronos@specialdate\gdef\chronos@specialdate{none}% |
| 6075 |
\fi |
| 6076 |
\scoped[/chronos/chronos@llinell amser@haenen]{% |
| 6077 |
\node [/chronos/event year on line] at (\chronos@temph pt,0pt) |
| 6078 |
{\chronos@tempbd};% |
| 6079 |
}% |
| 6080 |
\fi |
| 6081 |
\ifchronos@digwyddiad@cysylltiadtheori |
| 6082 |
\chronos@angorau@theori{testun \chronos@digwyddiad@tikzname}% |
| 6083 |
{cysylltwr \chronos@digwyddiad@tikzname}% |
| 6084 |
{connector \chronos@digwyddiad@tikzname}% |
| 6085 |
{/chronos/@cysylltwr@testun=\chronos@digwyddiad@lliw}% |
| 6086 |
% \end{macrocode} |
| 6087 |
%^^A }% |
| 6088 |
% \begin{macrocode} |
| 6089 |
\fi |
| 6090 |
\ifchronos@every@digwyddiad@isod |
| 6091 |
\global\chronos@digwyddiad@isodtrue |
| 6092 |
\else\ifchronos@every@digwyddiad@uchod |
| 6093 |
\global\chronos@digwyddiad@isodfalse |
| 6094 |
\else |
| 6095 |
\ifchronos@digwyddiad@isod |
| 6096 |
\global\chronos@digwyddiad@isodfalse |
| 6097 |
\else |
| 6098 |
\global\chronos@digwyddiad@isodtrue |
| 6099 |
\fi |
| 6100 |
\fi |
| 6101 |
\fi |
| 6102 |
\chronos@ailosod@nodweddion |
| 6103 |
\endgroup |
| 6104 |
} |
| 6105 |
% \end{macrocode} |
| 6106 |
% \end{macro}%^^A >>> |
| 6107 |
% \begin{macro}{\parhad}%^^A <<< |
| 6108 |
% That is, \cs{chronosperiod}. |
| 6109 |
% \begin{macrocode} |
| 6110 |
\NewDocumentCommand\parhad { m }{% |
| 6111 |
\begingroup |
| 6112 |
\Undefine\chronos@parhad@labeldechrau |
| 6113 |
\Undefine\chronos@parhad@labeldiwedd |
| 6114 |
\Undefine\chronos@parhad@angor |
| 6115 |
\Undefine\chronos@parhad@at |
| 6116 |
\Undefine\chronos@parhad@invanchor |
| 6117 |
\Undefine\chronos@cynnwys@testun |
| 6118 |
\Undefine\chronos@cynnwys@dyddiadau |
| 6119 |
\Undefine\chronos@cynnwys@enw |
| 6120 |
\Undefine\chronos@cysylltwyr |
| 6121 |
\chronos@parhad@cysylltiadtheorifalse %^^A rhag ofn |
| 6122 |
\tikzset{parhad={enw={??},diwedd={\year-\month-\day},gorffenedig=false,#1}}% |
| 6123 |
\ifchronos@eventdatessplit |
| 6124 |
\PackageInfo{chronos}{Setting split false for non-event.}% |
| 6125 |
\chronos@eventdatessplitfalse |
| 6126 |
\fi |
| 6127 |
\pgfmathsetmacro\chronos@temph{% |
| 6128 |
(\thechronos@thingdate-\thechronos@startdate)*\chronos@unit |
| 6129 |
}% |
| 6130 |
\pgfmathsetmacro\chronos@tempk{% |
| 6131 |
(\thechronos@otherthingdate-\thechronos@startdate)*\chronos@unit |
| 6132 |
}% |
| 6133 |
\pgfmathsetmacro\chronos@templ{% |
| 6134 |
(\chronos@temph+\chronos@tempk)*\chronos@unit/2% |
| 6135 |
}% |
| 6136 |
% \end{macrocode} |
| 6137 |
% temporary coordinates accurate only for x |
| 6138 |
% \begin{macrocode} |
| 6139 |
\coordinate (\chronos@parhad@tikzname) at (\chronos@templ pt,0pt); |
| 6140 |
% \end{macrocode} |
| 6141 |
% \changes{v0.9.3}{2025-07-09}{Add helper coordinates for placing things relative to life/period lines, including provisional coordinates for getting \texttt{x} only.} |
| 6142 |
% These are exposed publicly, as they are useful, but they are only correct for \texttt{x} during \texttt{period} creation. |
| 6143 |
% \begin{macrocode} |
| 6144 |
\coordinate [alias=start \chronos@parhad@tikzname] (dechrau \chronos@parhad@tikzname) at (\chronos@temph pt,0pt); |
| 6145 |
\coordinate [alias=end \chronos@parhad@tikzname] (diwedd \chronos@parhad@tikzname) at (\chronos@tempk pt,0pt); |
| 6146 |
\chronos@troilliwiau@tag{parhad}% |
| 6147 |
\chronos@gosodangor@tag{parhad}% |
| 6148 |
\chronos@gosodborder@tag{parhad}% |
| 6149 |
\IfExistTF \chronos@cynnwys@testun{% |
| 6150 |
\let\chronos@cynnwys@dyddiadau\relax |
| 6151 |
\let\chronos@cynnwys@enw\relax |
| 6152 |
}{% |
| 6153 |
\IfExistF \chronos@cynnwys@enw {% |
| 6154 |
\def \chronos@cynnwys@enw {\chronos@enw@priflythrennu{\chronos@parhad@enw}}% |
| 6155 |
}% |
| 6156 |
\IfExistTF \chronos@cynnwys@dyddiadau {% |
| 6157 |
\apptocmd \chronos@cynnwys@dyddiadau {\\}{}{}% |
| 6158 |
}{% |
| 6159 |
\ifchronos@onlytext\let\chronos@cynnwys@dyddiadau\relax |
| 6160 |
\else |
| 6161 |
\ifchronos@gorffenedig\relax\else\def\chronos@parhad@labeldiwedd{}\fi |
| 6162 |
\chronos@dyddiadau@tag{parhad}{thing}{dechrau}{otherthing}{diwedd}% |
| 6163 |
\ifchronos@temp |
| 6164 |
\def \chronos@cynnwys@dyddiadau {\chronos@parhad@labeldechrau\\}% |
| 6165 |
\else |
| 6166 |
\def \chronos@cynnwys@dyddiadau {% |
| 6167 |
\chronos@parhad@labeldechrau--\chronos@parhad@labeldiwedd\\}% |
| 6168 |
\fi |
| 6169 |
\fi |
| 6170 |
}% |
| 6171 |
\def \chronos@cynnwys@testun {% |
| 6172 |
\chronos@parhad@ffontdyddiad |
| 6173 |
\chronos@cynnwys@dyddiadau |
| 6174 |
\chronos@parhad@ffonttestun |
| 6175 |
\chronos@cynnwys@enw |
| 6176 |
}% |
| 6177 |
}% |
| 6178 |
\chronos@creu@llinell {parhad}{\chronos@temph pt}{\chronos@tempk pt}{dechrau}{diwedd}{start}{end}% |
| 6179 |
% \end{macrocode} |
| 6180 |
% final coordinate placement |
| 6181 |
% |
| 6182 |
% \changes{v0.9.3}{2025-07-10}{Adjust reference coordinate placement for additional line shift.} |
| 6183 |
% Subtract additional line shift so reference coordinate is offset by standard distance from timeline (0pt or \texttt{yshift}). |
| 6184 |
% For most styles, \cs{chronos@llinell@add@yshift}\ is \texttt{0pt}. |
| 6185 |
% \begin{macrocode} |
| 6186 |
\coordinate [yshift=-\chronos@llinell@add@yshift] (\chronos@parhad@tikzname) at |
| 6187 |
($(\chronos@parhad@tikzname{} dechrau)!1/2!(\chronos@parhad@tikzname{} diwedd)$); |
| 6188 |
% \end{macrocode} |
| 6189 |
% creu cylch ar y lein ; testun ; testun cylch ; prif gysylltiad |
| 6190 |
% \textbar{} create circle (or other mark) on timeline ; text tag ; text tag circle (connector) ; main connection |
| 6191 |
% \begin{macrocode} |
| 6192 |
\chronos@creu@testun@tag{}{parhad}{\chronos@cynnwys@testun}% |
| 6193 |
\ifchronos@parhad@cysylltiadtheori |
| 6194 |
\chronos@angorau@theori{testun \chronos@parhad@tikzname}% |
| 6195 |
{cysylltwr \chronos@parhad@tikzname}{connector \chronos@parhad@tikzname}% |
| 6196 |
{/chronos/@cysylltwr@testun=\chronos@parhad@lliw}% |
| 6197 |
\fi |
| 6198 |
\ifchronos@every@parhad@isod |
| 6199 |
\global\chronos@parhad@isodtrue |
| 6200 |
\else\ifchronos@every@parhad@uchod |
| 6201 |
\global\chronos@parhad@isodfalse |
| 6202 |
\else |
| 6203 |
\ifchronos@parhad@isod |
| 6204 |
\global\chronos@parhad@isodfalse |
| 6205 |
\else |
| 6206 |
\global\chronos@parhad@isodtrue |
| 6207 |
\fi |
| 6208 |
\fi |
| 6209 |
\fi |
| 6210 |
\chronos@ailosod@nodweddion |
| 6211 |
\endgroup |
| 6212 |
} |
| 6213 |
% \end{macrocode} |
| 6214 |
% \end{macro}%^^A >>> |
| 6215 |
% \begin{macro}{\theori}%^^A <<< |
| 6216 |
% That is, \cs{chronostheory}. |
| 6217 |
% \begin{macrocode} |
| 6218 |
\NewDocumentCommand\theori { m }{% |
| 6219 |
\begingroup |
| 6220 |
\Undefine\chronos@theori@angor |
| 6221 |
\Undefine\chronos@theori@at |
| 6222 |
\Undefine\chronos@theori@invanchor |
| 6223 |
\Undefine\chronos@cynnwys@testun |
| 6224 |
\Undefine\chronos@cynnwys@enw |
| 6225 |
\Undefine\chronos@cynnwys@dyddiadau |
| 6226 |
\Undefine\chronos@cysylltwyr |
| 6227 |
\chronos@theori@cysylltiadtheorifalse %^^A rhag ofn |
| 6228 |
\tikzset{theori={enw={??},#1}}% |
| 6229 |
\chronos@troilliwiau@tag{theori}% |
| 6230 |
\IfExistTF \chronos@theori@angor{% |
| 6231 |
\IfExistTF \chronos@cysylltwyr{% |
| 6232 |
\pretocmd\chronos@cysylltwyr{\chronos@theori@angor,}{}{}% |
| 6233 |
}{% |
| 6234 |
\def\chronos@cysylltwyr{\chronos@theori@angor}% |
| 6235 |
}% |
| 6236 |
}{% |
| 6237 |
\ifchronos@theori@isod |
| 6238 |
\def\chronos@theori@angor{north}% |
| 6239 |
\else |
| 6240 |
\def\chronos@theori@angor{south} |
| 6241 |
\fi |
| 6242 |
}% |
| 6243 |
\IfExistTF \chronos@cynnwys@testun {% |
| 6244 |
\let\chronos@cynnwys@enw\relax |
| 6245 |
}{% |
| 6246 |
\IfExistF \chronos@cynnwys@enw {% |
| 6247 |
\def \chronos@cynnwys@enw {\chronos@enw@priflythrennu{\chronos@theori@enw}}% |
| 6248 |
}% |
| 6249 |
\def \chronos@cynnwys@testun {\chronos@cynnwys@enw}% |
| 6250 |
}% |
| 6251 |
% \end{macrocode} |
| 6252 |
% creu testun \textbar{} text tag |
| 6253 |
% \begin{macrocode} |
| 6254 |
\chronos@creu@testun@tag{alias=\chronos@theori@tikzname}{theori}{% |
| 6255 |
\chronos@theori@ffonttestun\chronos@cynnwys@testun}% |
| 6256 |
\IfExistT \chronos@cysylltwyr{% |
| 6257 |
\chronos@angorau@theori{\chronos@theori@enw}{% |
| 6258 |
cysylltwr \chronos@theori@enw |
| 6259 |
}{connector \chronos@theori@enw}{% |
| 6260 |
/chronos/@cysylltwr@testun=\chronos@theori@lliw |
| 6261 |
}% |
| 6262 |
}% |
| 6263 |
\chronos@ailosod@nodweddion |
| 6264 |
\endgroup |
| 6265 |
} |
| 6266 |
% \end{macrocode} |
| 6267 |
% \end{macro}%^^A >>> |
| 6268 |
% \begin{macro}{\chronos@angorau@theori}%^^A <<< |
| 6269 |
% \changes{v0.9.3}{2025-07-18}{Remove unused variant of and use \cs{def}\ for internal macro \cs{chronos@angorau@theori}.} |
| 6270 |
% That is, anchors for \cs{chronostheory}. |
| 6271 |
% \begin{macrocode} |
| 6272 |
\protected\def \chronos@angorau@theori#1#2#3#4{% |
| 6273 |
% #1 enw y prif node ; |
| 6274 |
% #2 enw yr angor cyntaf ; |
| 6275 |
% #3 connector ; |
| 6276 |
% #4 style |
| 6277 |
\ifchronos@phantom |
| 6278 |
\PackageWarning{chronos}{Phantom tags cannot have connectors }% |
| 6279 |
\else |
| 6280 |
% \end{macrocode} |
| 6281 |
% ateb Symbol 1: \url{https://tex.stackexchange.com/a/385953/} |
| 6282 |
% \begin{macrocode} |
| 6283 |
\begin{scope}[/chronos/middle anchorborder] |
| 6284 |
\setcounter{chronos@theori@countanchors}{0}% |
| 6285 |
\@for \xx:=\chronos@cysylltwyr \do {% |
| 6286 |
\stepcounter{chronos@theori@countanchors}% |
| 6287 |
\ifnum\value{chronos@theori@countanchors}=1% |
| 6288 |
\node (#2) [% |
| 6289 |
#4,% |
| 6290 |
alias=#2\thechronos@theori@countanchors,% |
| 6291 |
alias=#3,% |
| 6292 |
alias=#3\thechronos@theori@countanchors |
| 6293 |
] at (#1.middle \xx) {}; |
| 6294 |
\else |
| 6295 |
\node (#2\thechronos@theori@countanchors) [% |
| 6296 |
#4, alias=#3\thechronos@theori@countanchors |
| 6297 |
] at (#1.middle \xx) {}; |
| 6298 |
\fi |
| 6299 |
}% |
| 6300 |
\end{scope}% |
| 6301 |
\fi |
| 6302 |
} |
| 6303 |
% \end{macrocode} |
| 6304 |
% \end{macro}%^^A >>> |
| 6305 |
% \begin{macro}{\cylchtheori}%^^A <<< - cylchau bychain yn lle bocses mawr |
| 6306 |
% That is, \cs{theorycircle}. |
| 6307 |
% \begin{macrocode} |
| 6308 |
\NewDocumentCommand \cylchtheori { m } {% |
| 6309 |
\begingroup |
| 6310 |
\Undefine\chronos@cylchtheori@at |
| 6311 |
\Undefine\chronos@cynnwys@testun |
| 6312 |
\Undefine\chronos@cynnwys@enw |
| 6313 |
\Undefine\chronos@cynnwys@dyddiadau |
| 6314 |
\tikzset{cylch theori={enw={??},#1}}% |
| 6315 |
% \end{macrocode} |
| 6316 |
%^^A % ni all wneud y cam hwn a'r un nesaf gyda'i gilydd - wn i ddim yn siwr pam lai |
| 6317 |
% \begin{macrocode} |
| 6318 |
\coordinate [% |
| 6319 |
/chronos/every@cylch cylch theori,% |
| 6320 |
/utils/exec=\pgfkeysalsofrom{\chronos@cadw}% |
| 6321 |
] (\chronos@cylchtheori@tikzname1) at (chronos@cylchtheori@at); |
| 6322 |
\path [/chronos/every@cylch cylch theori] (\chronos@cylchtheori@tikzname1) |
| 6323 |
circle (\chronos@cylchtheori@bach) circle (\chronos@cylchtheori@mawr); |
| 6324 |
\pgfmathsetlength\chronos@templgtha{\chronos@cylchtheori@bach+0.5pt}% |
| 6325 |
\pgfmathsetlength\chronos@templgthc{\chronos@[email protected]}% |
| 6326 |
\pgfmathsetlength\chronos@templgthb{\chronos@cylchtheori@mawr+2pt}% |
| 6327 |
\coordinate (\chronos@cylchtheori@tikzname2) at |
| 6328 |
($(\chronos@cylchtheori@tikzname1) - (\chronos@templgtha,0)$); |
| 6329 |
\coordinate (\chronos@cylchtheori@tikzname3) at |
| 6330 |
($(\chronos@cylchtheori@tikzname1) - (\chronos@templgthc,0)$); |
| 6331 |
\coordinate (\chronos@cylchtheori@tikzname4) at |
| 6332 |
($(\chronos@cylchtheori@tikzname1) + (0,\chronos@templgthb)$); |
| 6333 |
\coordinate (\chronos@cylchtheori@tikzname5) at |
| 6334 |
($(\chronos@cylchtheori@tikzname1) - (0,\chronos@templgthb)$); |
| 6335 |
\path [% |
| 6336 |
/chronos/every@testun cylch theori/.expanded={% |
| 6337 |
\ \chronos@cylchtheori@circletext@uchod\ % |
| 6338 |
}% |
| 6339 |
] (\chronos@cylchtheori@tikzname2) arc (180:0:\chronos@templgtha); |
| 6340 |
\path [% |
| 6341 |
/chronos/every@testun cylch theori/.expanded={% |
| 6342 |
\chronos@cylchtheori@circletext@isod |
| 6343 |
}% |
| 6344 |
] (\chronos@cylchtheori@tikzname3) arc (180:360:\chronos@templgthc); |
| 6345 |
\node (label above \chronos@cylchtheori@tikzname) [% |
| 6346 |
anchor=south, /chronos/theori/cylchau/@label |
| 6347 |
] at (\chronos@cylchtheori@tikzname4) {\chronos@cylchtheori@label@uchod}; |
| 6348 |
\node (label below \chronos@cylchtheori@tikzname) [% |
| 6349 |
anchor=north, /chronos/theori/cylchau/@label |
| 6350 |
] at (\chronos@cylchtheori@tikzname5) {\chronos@cylchtheori@label@isod}; |
| 6351 |
\node (\chronos@cylchtheori@tikzname) [% |
| 6352 |
fit=(label below \chronos@cylchtheori@tikzname) |
| 6353 |
(label above \chronos@cylchtheori@tikzname) |
| 6354 |
(\chronos@cylchtheori@tikzname4) |
| 6355 |
(\chronos@cylchtheori@tikzname5)% |
| 6356 |
] {}; |
| 6357 |
\chronos@ailosod@nodweddion |
| 6358 |
\endgroup |
| 6359 |
} |
| 6360 |
% \end{macrocode} |
| 6361 |
% \end{macro}%^^A >>> |
| 6362 |
% \begin{macro}{\prideitl}%^^A <<< |
| 6363 |
% That is, \cs{chronosmaintitle}. |
| 6364 |
% \begin{macrocode} |
| 6365 |
\NewDocumentCommand \prifdeitl { m } |
| 6366 |
{% |
| 6367 |
\begingroup |
| 6368 |
\Undefine\chronos@prifdeitl@at |
| 6369 |
\Undefine\chronos@prifdeitl@angor |
| 6370 |
\tikzset{prif={#1}}% |
| 6371 |
\IfExistF\chronos@prifdeitl@angor{\def\chronos@prifdeitl@angor{center}}% |
| 6372 |
\IfExistTF\chronos@prifdeitl@tikzname{% |
| 6373 |
\pgfqkeys{/chronos}{@tempd/.style={alias=prif deitl,alias=main title}}% |
| 6374 |
}{% |
| 6375 |
\def\chronos@prifdeitl@tikzname{prif deitl}% |
| 6376 |
\pgfqkeys{/chronos}{@tempd/.style={alias=main title}}% |
| 6377 |
}% |
| 6378 |
\IfFreeT {\chronos@prifdeitl@cynnwys}{% |
| 6379 |
\def\chronos@prifdeitl@cynnwys{% |
| 6380 |
\chronos@enw@priflythrennu{\chronos@prifdeitl@enw}% |
| 6381 |
}% |
| 6382 |
}% |
| 6383 |
\draw node (\chronos@prifdeitl@tikzname) [% |
| 6384 |
draw=none,% |
| 6385 |
/chronos/@tempd,% |
| 6386 |
/chronos/prif/@teitl,% |
| 6387 |
anchor=\chronos@prifdeitl@angor,% |
| 6388 |
/utils/exec=\pgfkeysalsofrom{\chronos@cadw}% |
| 6389 |
] at (chronos@prifdeitl@at) {\chronos@prifdeitl@cynnwys}; |
| 6390 |
\ifchronos@showcoords |
| 6391 |
\begin{scope}[on chronos overlay layer] |
| 6392 |
\draw [help lines, draw=chronos@lliw@node] |
| 6393 |
(\chronos@[email protected] east) -| |
| 6394 |
(\chronos@[email protected] west) -| cycle; |
| 6395 |
\node [% |
| 6396 |
/chronos/show coordinate={chronos show node colour}{0}{% |
| 6397 |
\chronos@prifdeitl@tikzname |
| 6398 |
}{10pt}{align=center}% |
| 6399 |
] at (\chronos@[email protected]) {}; |
| 6400 |
\end{scope}% |
| 6401 |
\fi |
| 6402 |
\endgroup |
| 6403 |
} |
| 6404 |
% \end{macrocode} |
| 6405 |
% \end{macro}%^^A >>> |
| 6406 |
% \begin{macro}{\gwybodaeth}%^^A <<< |
| 6407 |
% That is, \cs{chronosinfo}. |
| 6408 |
% \begin{macrocode} |
| 6409 |
\NewDocumentCommand \gwybodaeth { s m }{% |
| 6410 |
\begingroup |
| 6411 |
\Undefine\chronos@gwybodaeth@angor |
| 6412 |
\Undefine\chronos@gwybodaeth@at |
| 6413 |
\let\chronos@cynnwys@testun\@empty |
| 6414 |
\Undefine\chronos@cynnwys@enw |
| 6415 |
\Undefine\chronos@gwybodaeth@capsiwn |
| 6416 |
\tikzset{gwybodaeth={enw={??},#2}}% |
| 6417 |
\IfExistF \chronos@gwybodaeth@angor{\def\chronos@gwybodaeth@angor{west}}%% |
| 6418 |
\IfExistF \chronos@gwybodaeth@capsiwn {% |
| 6419 |
\def \chronos@gwybodaeth@capsiwn {% |
| 6420 |
\chronos@enw@priflythrennu{\chronos@gwybodaeth@enw}% |
| 6421 |
}% |
| 6422 |
}% |
| 6423 |
\IfExistF \chronos@gwybodaeth@lliw {% |
| 6424 |
\let\chronos@gwybodaeth@lliw\chronos@gwybodaeth@lliw@rhagosodedig |
| 6425 |
}% |
| 6426 |
\node (testun \chronos@gwybodaeth@tikzname) [% |
| 6427 |
/chronos/@testun=\chronos@gwybodaeth@lliw,% |
| 6428 |
anchor=\chronos@gwybodaeth@angor,% |
| 6429 |
/chronos/.cd,% |
| 6430 |
/utils/exec=\pgfkeysalsofrom{\chronos@cadw},% |
| 6431 |
alias=tag \chronos@gwybodaeth@tikzname,% |
| 6432 |
alias=text tag \chronos@gwybodaeth@tikzname,% |
| 6433 |
alias=\chronos@gwybodaeth@tikzname |
| 6434 |
] at (\chronos@gwybodaeth@at) {\chronos@cynnwys@testun}; |
| 6435 |
\IfBooleanF {#1}{% |
| 6436 |
\node (capsiwn \chronos@gwybodaeth@tikzname) [% |
| 6437 |
/chronos/gwybodaeth/@label,% |
| 6438 |
alias=enw \chronos@gwybodaeth@tikzname,% |
| 6439 |
alias=name \chronos@gwybodaeth@tikzname,% |
| 6440 |
alias=label \chronos@gwybodaeth@tikzname,% |
| 6441 |
alias=caption \chronos@gwybodaeth@tikzname |
| 6442 |
] at (\chronos@[email protected]) {\chronos@gwybodaeth@capsiwn}; |
| 6443 |
}% |
| 6444 |
\edef\chronos@tempa{lliw \chronos@gwybodaeth@tikzname}% |
| 6445 |
\edef\chronos@tempe{colour \chronos@gwybodaeth@tikzname}% |
| 6446 |
\edef\chronos@tempf{color \chronos@gwybodaeth@tikzname}% |
| 6447 |
\edef\chronos@tempb{\chronos@gwybodaeth@lliw}% |
| 6448 |
\xglobal\colorlet{\chronos@tempa}{\chronos@tempb}% |
| 6449 |
\xglobal\colorlet{\chronos@tempe}{\chronos@tempb}% |
| 6450 |
\xglobal\colorlet{\chronos@tempf}{\chronos@tempb}% |
| 6451 |
\colorlet{chronos current tag colour}{\chronos@tempb}% |
| 6452 |
\colorlet{chronos current tag color}{\chronos@tempb}% |
| 6453 |
\chronos@ailosod@nodweddion |
| 6454 |
\endgroup |
| 6455 |
} |
| 6456 |
% \end{macrocode} |
| 6457 |
% \end{macro}%^^A >>> |
| 6458 |
% \begin{macro}{\hawlfraint}%^^A <<< |
| 6459 |
% That is, \cs{chronoscopyright}. |
| 6460 |
% \begin{macrocode} |
| 6461 |
\NewDocumentCommand \hawlfraint { m } |
| 6462 |
{% |
| 6463 |
\begingroup |
| 6464 |
\Undefine\chronos@hawlfraint@at |
| 6465 |
\Undefine\chronos@hawlfraint@enw |
| 6466 |
\def\chronos@hawlfraint@angor{north west}% |
| 6467 |
\def\chronos@hawlfraint@cylchdroi{90}% |
| 6468 |
\tikzset{hawlfraint={#1}}% |
| 6469 |
\IfExistF{\chronos@hawlfraint@notis}{% |
| 6470 |
\ifchronos@copyleft |
| 6471 |
\def\chronos@hawlfraint@notis##1##2{Copyleft \textcopyleft{} ##1 ##2}% |
| 6472 |
\else |
| 6473 |
\def\chronos@hawlfraint@notis##1##2{Copyright \textcopyright{} ##1 ##2}% |
| 6474 |
\fi |
| 6475 |
}% |
| 6476 |
\IfExistF{\chronos@hawlfraint@at}{% |
| 6477 |
\def\chronos@hawlfraint@at{current bounding box.south west}% |
| 6478 |
\PackageWarning{chronos}{Placing copyright notice at bottom left }% |
| 6479 |
}% |
| 6480 |
\IfExistF {\chronos@hawlfraint@cynnwys}{% |
| 6481 |
\IfBooleanExprTF { |
| 6482 |
\CSFreeBoolean \chronos@hawlfraint@enw |
| 6483 |
|| ! (\CSFreeBoolean \chronos@hawlfraint@awdur) |
| 6484 |
|| ! (\CSFreeBoolean \chronos@hawlfraint@blwyddyn) |
| 6485 |
}{% |
| 6486 |
\IfExistF {\chronos@hawlfraint@awdur}{% |
| 6487 |
\IfExistTF {\svnauthor} {% |
| 6488 |
\IfExistTF {\svnFullAuthor} {% |
| 6489 |
\def\chronos@hawlfraint@awdur{\svnFullAuthor{\svnauthor}}% |
| 6490 |
}{% |
| 6491 |
\let\chronos@hawlfraint@awdur\svnauthor |
| 6492 |
}% |
| 6493 |
}{% |
| 6494 |
\def\chronos@hawlfraint@awdur{Author}% |
| 6495 |
}% |
| 6496 |
}% |
| 6497 |
\IfExistF {\chronos@hawlfraint@blwyddyn}{% |
| 6498 |
\IfExistTF {\svnyear} {% |
| 6499 |
\let\chronos@hawlfraint@blwyddyn\svnyear |
| 6500 |
}{% |
| 6501 |
\let\chronos@hawlfraint@blwyddyn\today |
| 6502 |
}% |
| 6503 |
}% |
| 6504 |
\def\chronos@hawlfraint@cynnwys{% |
| 6505 |
\chronos@hawlfraint@notis{% |
| 6506 |
\chronos@hawlfraint@blwyddyn |
| 6507 |
}{% |
| 6508 |
\chronos@hawlfraint@awdur |
| 6509 |
}% |
| 6510 |
}% |
| 6511 |
}{% |
| 6512 |
\def\chronos@hawlfraint@cynnwys{% |
| 6513 |
\chronos@hawlfraint@notis{\chronos@hawlfraint@blwyddyn}{% |
| 6514 |
\chronos@enw@priflythrennu{\chronos@hawlfraint@enw}% |
| 6515 |
}% |
| 6516 |
}% |
| 6517 |
}% |
| 6518 |
}% |
| 6519 |
\IfExistTF{\chronos@hawlfraint@tikzname}{% |
| 6520 |
\pgfqkeys{/chronos}{@tempd/.style={% |
| 6521 |
alias=hawlfraint,% |
| 6522 |
alias=copyright,% |
| 6523 |
alias=copyleft% |
| 6524 |
}}% |
| 6525 |
}{% |
| 6526 |
\def\chronos@hawlfraint@tikzname{hawlfraint}% |
| 6527 |
\pgfqkeys{/chronos}{@tempd/.style={alias=copyright,alias=copyleft}}% |
| 6528 |
}% |
| 6529 |
% \end{macrocode} |
| 6530 |
%^^A \draw node (\chronos@hawlfraint@tikzname) [draw=none,/chronos/@tempd, /chronos/@hawlfraint, anchor=\chronos@hawlfraint@angor,rotate/.expand once=\chronos@hawlfraint@cylchdroi,/utils/exec=\pgfkeysalsofrom{\chronos@cadw}] at (chronos@hawlfraint@at) {\chronos@hawlfraint@cynnwys}; |
| 6531 |
% \begin{macrocode} |
| 6532 |
\draw node (\chronos@hawlfraint@tikzname) [% |
| 6533 |
draw=none,% |
| 6534 |
/chronos/@tempd,% |
| 6535 |
/chronos/@hawlfraint,% |
| 6536 |
anchor=\chronos@hawlfraint@angor,% |
| 6537 |
rotate=\chronos@hawlfraint@cylchdroi,% |
| 6538 |
/utils/exec=\pgfkeysalsofrom{\chronos@cadw}% |
| 6539 |
] at (chronos@hawlfraint@at) {\chronos@hawlfraint@cynnwys}; |
| 6540 |
\ifchronos@showcoords |
| 6541 |
\begin{scope}[on chronos overlay layer] |
| 6542 |
\draw [help lines, draw=chronos@lliw@node] |
| 6543 |
(\chronos@[email protected] east) -| |
| 6544 |
(\chronos@[email protected] west) -| cycle; |
| 6545 |
\node [% |
| 6546 |
/chronos/show coordinate={chronos show node colour}{0}{% |
| 6547 |
\chronos@hawlfraint@tikzname |
| 6548 |
}{10pt}{align=center}% |
| 6549 |
] at (\chronos@[email protected]) {}; |
| 6550 |
\end{scope}% |
| 6551 |
\fi |
| 6552 |
\endgroup |
| 6553 |
} |
| 6554 |
% \end{macrocode} |
| 6555 |
% \end{macro} |
| 6556 |
% \begin{macro}{\chronoscopyleft} |
| 6557 |
% Variant of \cs{chronoscopyright}. |
| 6558 |
% \begin{macrocode} |
| 6559 |
\NewDocumentCommand \chronoscopyleft { m }{% |
| 6560 |
\begingroup |
| 6561 |
\chronos@copylefttrue |
| 6562 |
\hawlfraint {#1}% |
| 6563 |
\endgroup |
| 6564 |
} |
| 6565 |
% \end{macrocode} |
| 6566 |
% \end{macro}%^^A >>> |
| 6567 |
% \begin{macro}{\chronos@dyddiadau@tag}%^^A <<< \chronos@dyddiadau@tag |
| 6568 |
% Internal macro to figure out date format for tags. |
| 6569 |
% |
| 6570 |
% \#1 : tag e.g.~byw / parhad ; |
| 6571 |
% \#2 first date counter e.g.~geni / thing ; |
| 6572 |
% \#3 first label e.g.~geni / dechrau ; |
| 6573 |
% \#4 second date counter e.g.~marw / otherthing ; |
| 6574 |
% \#5 second label e.g.~marw / diwedd |
| 6575 |
% \begin{macrocode} |
| 6576 |
\protected\def \chronos@dyddiadau@tag #1#2#3#4#5{% |
| 6577 |
\IfCSExistTF{chronos@#1@label#3}{% |
| 6578 |
\IfCSExistF{chronos@#1@label#5}{% |
| 6579 |
\expandafter\def\csname chronos@#1@label#5\endcsname{% |
| 6580 |
\chronos@showdate@cs[chronos@#1@fformat#5]{#4}% |
| 6581 |
}% |
| 6582 |
}% |
| 6583 |
}{% |
| 6584 |
\IfCSExistF{chronos@#1@label#5}{% creu label yr ail ddyddiad |
| 6585 |
\expandafter\def\csname chronos@#1@label#5\endcsname{% |
| 6586 |
\chronos@showdate@cs[chronos@#1@fformat#5]{#4}% |
| 6587 |
}% |
| 6588 |
}% |
| 6589 |
\edef\tempa{}\edef\tempb{\csname chronos@#1@label#5\endcsname}% |
| 6590 |
\ifx\tempa\tempb |
| 6591 |
\expandafter\def\csname chronos@#1@label#3\endcsname{% |
| 6592 |
\chronos@showdate@cs[chronos@#1@fformat#3@cyfnodau]{#2}% |
| 6593 |
}% |
| 6594 |
\else |
| 6595 |
\expandafter\ifnum\csname chronos@#2year\endcsname<0 |
| 6596 |
\expandafter\ifnum\csname chronos@#4year\endcsname<0 |
| 6597 |
\expandafter\def\csname chronos@#1@label#3\endcsname{% |
| 6598 |
\chronos@showdate@cs[chronos@#1@fformat#3@cyfnod]{#2}% |
| 6599 |
}% |
| 6600 |
\else |
| 6601 |
\expandafter\def\csname chronos@#1@label#3\endcsname{% |
| 6602 |
\chronos@showdate@cs[chronos@#1@fformat#3@cyfnodau]{#2}% |
| 6603 |
}% |
| 6604 |
\fi |
| 6605 |
\else |
| 6606 |
\expandafter\def\csname chronos@#1@label#3\endcsname{% |
| 6607 |
\chronos@showdate@cs[chronos@#1@fformat#3@cyfnod]{#2}% |
| 6608 |
}% |
| 6609 |
\fi |
| 6610 |
\fi |
| 6611 |
}% |
| 6612 |
\ifchronos@dimondblynyddoedd |
| 6613 |
\edef\chronos@tempp{\csname chronos@#2year\endcsname}% |
| 6614 |
\edef\chronos@tempq{\csname chronos@#4year\endcsname}% |
| 6615 |
\ifnum\chronos@tempp=\chronos@tempq\relax |
| 6616 |
\chronos@temptrue |
| 6617 |
\else |
| 6618 |
\chronos@tempfalse |
| 6619 |
\fi |
| 6620 |
\else |
| 6621 |
\ifnum\value{chronos@#2date}=\value{chronos@#4date}%^^A only catches identical blynyddoedd - dal i edrych yn dwp pan dim ond blynyddoedd yn cael eu dangos & maen' nhw'n yr un peth |
| 6622 |
\chronos@temptrue |
| 6623 |
\else |
| 6624 |
\chronos@tempfalse |
| 6625 |
\fi |
| 6626 |
\fi |
| 6627 |
} |
| 6628 |
% \end{macrocode} |
| 6629 |
% \end{macro}%^^A >>> \chronos@dyddiadau@tag |
| 6630 |
% \begin{macro}{\chronos@gosodborder@tag}%^^A <<< \chronos@gosodborder@tag |
| 6631 |
% Internal macro to install connection point on timeline border. |
| 6632 |
% \begin{macrocode} |
| 6633 |
\protected\def \chronos@gosodborder@tag#1{% |
| 6634 |
\csname ifchronos@#1@isod\endcsname |
| 6635 |
\ifchronos@yearsonline |
| 6636 |
\def\chronos@border@coord{chronos base}% |
| 6637 |
\def\chronos@border@coord@inv{chronos top}% |
| 6638 |
\expandafter\setlength\csname chronos@#1@border\endcsname{% |
| 6639 |
-\chronos@borderheight}% |
| 6640 |
\expandafter\setlength\csname chronos@#1@border@inv\endcsname{% |
| 6641 |
\chronos@borderheight}% |
| 6642 |
\else |
| 6643 |
\def\chronos@border@coord{chronos top}% |
| 6644 |
\def\chronos@border@coord@inv{chronos base}% |
| 6645 |
\expandafter\setlength\csname chronos@#1@border\endcsname{% |
| 6646 |
-\chronos@height}% |
| 6647 |
\expandafter\setlength\csname chronos@#1@border@inv\endcsname{% |
| 6648 |
\chronos@height}% |
| 6649 |
\fi |
| 6650 |
\else |
| 6651 |
\ifchronos@yearsonline |
| 6652 |
\def\chronos@border@coord{chronos top}% |
| 6653 |
\def\chronos@border@coord@inv{chronos base}% |
| 6654 |
\expandafter\setlength\csname chronos@#1@border\endcsname{% |
| 6655 |
\chronos@borderheight}% |
| 6656 |
\expandafter\setlength\csname chronos@#1@border@inv\endcsname{% |
| 6657 |
-\chronos@borderheight}% |
| 6658 |
\else |
| 6659 |
\def\chronos@border@coord{chronos base}% |
| 6660 |
\def\chronos@border@coord@inv{chronos top}% |
| 6661 |
\expandafter\setlength\csname chronos@#1@border\endcsname{% |
| 6662 |
\chronos@height}% |
| 6663 |
\expandafter\setlength\csname chronos@#1@border@inv\endcsname{% |
| 6664 |
-\chronos@height}% |
| 6665 |
\fi |
| 6666 |
\fi |
| 6667 |
} |
| 6668 |
% \end{macrocode} |
| 6669 |
% \end{macro}%^^A >>> \chronos@gosodborder@tag |
| 6670 |
% \begin{macro}{\chronos@troilliwiau@tag}%^^A <<< & configure isod/uchod |
| 6671 |
% Internal macro to rotate colours and configure below/above split, as applicable. |
| 6672 |
% \begin{macrocode} |
| 6673 |
\protected\def \chronos@troilliwiau@tag#1{%^^A <<< |
| 6674 |
\IfCSExistTF {chronos@#1@at}{% |
| 6675 |
\edef\chronos@tempj{\csname chronos@#1@at\endcsname}% |
| 6676 |
\path (\chronos@tempj) ++(0pt,\chronos@yshift); |
| 6677 |
\pgfgetlastxy{\chronos@templgtha}{\chronos@templgthb}% |
| 6678 |
\ifdim\chronos@templgthb>0pt\relax |
| 6679 |
\expandafter\global\csname chronos@#1@isodfalse\endcsname |
| 6680 |
\else |
| 6681 |
\ifdim\chronos@templgthb<0pt\relax |
| 6682 |
\expandafter\global\csname chronos@#1@isodtrue\endcsname |
| 6683 |
\fi |
| 6684 |
\fi |
| 6685 |
\def\chronos@yshift@inv{-\chronos@yshift}% |
| 6686 |
}{% |
| 6687 |
\ifchronos@tag@cysylltu |
| 6688 |
\CSletCS {chronos@#1@at}{chronos@#1@tikzname}%^^A uses temporary coordinate at this point but will be aligned horizontally |
| 6689 |
\else |
| 6690 |
\expandafter\def\csname chronos@#1@at\endcsname{chronos origin}% |
| 6691 |
\PackageWarning{chronos}{Aligning #1 text tag with (chronos origin). |
| 6692 |
Set at to avoid this}% |
| 6693 |
\fi |
| 6694 |
\ifdim\chronos@yshift>0pt\relax |
| 6695 |
\expandafter\global\csname chronos@#1@isodfalse\endcsname |
| 6696 |
\def\chronos@yshift@inv{-\chronos@yshift}% |
| 6697 |
\else |
| 6698 |
\ifdim\chronos@yshift<0pt\relax |
| 6699 |
\expandafter\global\csname chronos@#1@isodtrue\endcsname |
| 6700 |
\def\chronos@yshift@inv{-\chronos@yshift}% |
| 6701 |
\else |
| 6702 |
\ifdim\chronos@testun@yshift=0pt\relax |
| 6703 |
\PackageWarning{chronos}{% |
| 6704 |
Tag will be placed at the timeline's vertical centre. |
| 6705 |
Set non-zero yshift or text tag yshift or set at to avoid this% |
| 6706 |
}% |
| 6707 |
\fi |
| 6708 |
\chronos@legacy@if{chronos@#1@isod}{% cheat! |
| 6709 |
\pretocmd\chronos@cadw{yshift=-\chronos@testun@yshift,}{}{}% |
| 6710 |
\def\chronos@yshift@inv{\chronos@testun@yshift}% |
| 6711 |
}{% |
| 6712 |
\pretocmd\chronos@cadw{yshift=\chronos@testun@yshift,}{}{}% |
| 6713 |
\def\chronos@yshift@inv{-\chronos@testun@yshift}% |
| 6714 |
}% if chronos@#1isod |
| 6715 |
\fi % if yshift<0pt |
| 6716 |
\fi % if yshift>0pt |
| 6717 |
}% |
| 6718 |
\IfCSFreeT{chronos@#1@lliw}{%^^A \ifcsunef is T even if cs is \relax (unlike \ifcsdef which is also T if cs is \relax) |
| 6719 |
\expandafter\ifchronos@troilliwiau |
| 6720 |
\csname ifchronos@#1@isod\endcsname |
| 6721 |
\chronos@troilliwiau@isod{#1} |
| 6722 |
\else |
| 6723 |
\chronos@troilliwiau@uchod{#1}% |
| 6724 |
\fi |
| 6725 |
\else |
| 6726 |
\CSletCS{chronos@#1@lliw}{chronos@#1@lliw@rhagosodedig}% |
| 6727 |
\fi |
| 6728 |
}% |
| 6729 |
\edef\chronos@tempa{lliw \csname chronos@#1@tikzname\endcsname}% |
| 6730 |
\edef\chronos@tempb{\csname chronos@#1@lliw\endcsname}% |
| 6731 |
\edef\chronos@tempe{colour \csname chronos@#1@tikzname\endcsname}% |
| 6732 |
\edef\chronos@tempf{color \csname chronos@#1@tikzname\endcsname}% |
| 6733 |
\xglobal\colorlet{\chronos@tempa}{\chronos@tempb}% |
| 6734 |
\xglobal\colorlet{\chronos@tempe}{\chronos@tempb}% |
| 6735 |
\xglobal\colorlet{\chronos@tempf}{\chronos@tempb}% |
| 6736 |
\colorlet{chronos current tag colour}{\chronos@tempb}% |
| 6737 |
\colorlet{chronos current tag color}{\chronos@tempb}% |
| 6738 |
\ifchronos@enwaulliwsyml |
| 6739 |
\edef\chronos@tempg{\csname chronos@#1@tikzname\endcsname}% |
| 6740 |
\xglobal\colorlet{\chronos@tempg}{\chronos@tempb}% |
| 6741 |
\fi |
| 6742 |
}%^^A >>> |
| 6743 |
% \end{macrocode} |
| 6744 |
% \end{macro}%^^A >>> \chronos@troilliwiau@tag |
| 6745 |
% \begin{macro}{\chronos@gosod@angor@tag}%^^A <<< |
| 6746 |
% Internal macro to add connector to tag anchors. |
| 6747 |
% \begin{macrocode} |
| 6748 |
\protected\def\chronos@gosodangor@tag#1{%i^^A <<< |
| 6749 |
\IfCSExistTF{chronos@#1@angor}{% |
| 6750 |
\expandafter\edef\expandafter\chronos@tempa\expandafter{% |
| 6751 |
\csname chronos@#1@angor\endcsname |
| 6752 |
}% |
| 6753 |
\foreach \i/\j in {% |
| 6754 |
north/south,% |
| 6755 |
south/north,% |
| 6756 |
east/west,% |
| 6757 |
west/east,% |
| 6758 |
north west/south east,% |
| 6759 |
south east/north west,% |
| 6760 |
north east/south west,% |
| 6761 |
south west/north east% |
| 6762 |
}{% |
| 6763 |
\edef\chronos@tempb{\i}% |
| 6764 |
\ifx\chronos@tempa\chronos@tempb |
| 6765 |
\global\CSlet{chronos@#1@invanchor}\j\breakforeach |
| 6766 |
\fi |
| 6767 |
}% |
| 6768 |
}{% |
| 6769 |
\csname ifchronos@#1@isod\endcsname |
| 6770 |
\expandafter\def\csname chronos@#1@angor\endcsname {north}% |
| 6771 |
\expandafter\def\csname chronos@#1@invanchor\endcsname {south}% |
| 6772 |
\else |
| 6773 |
\expandafter\def\csname chronos@#1@angor\endcsname {south}% |
| 6774 |
\expandafter\def\csname chronos@#1@invanchor\endcsname {north}% |
| 6775 |
\fi |
| 6776 |
}% |
| 6777 |
}%^^A >>> |
| 6778 |
% \end{macrocode} |
| 6779 |
% \end{macro}%^^A >>> |
| 6780 |
% \begin{macro}{\chronos@creu@llinell}%^^A <<< parhad, byw |
| 6781 |
% Internal macro to put new life or period on timeline. |
| 6782 |
% |
| 6783 |
% \#1 : tag e.g.~byw |
| 6784 |
% \#2 : x dimen dechrau/geni |
| 6785 |
% \#3 : x dimen diwedd/marw |
| 6786 |
% \#4 : i greu enw cyntaf e.g.~dechrau/geni |
| 6787 |
% \#5 : i greu'r ail enw e.g.~diwedd/marw |
| 6788 |
% \#6 : i greu alias cyntaf e.g.~start/birth |
| 6789 |
% \#7 : i greu'r ail alias e.g.~end/death |
| 6790 |
% \begin{macrocode} |
| 6791 |
\protected\def \chronos@creu@llinell #1#2#3#4#5#6#7{%^^A <<< fill (fallai draw)} llinell ar y llinell amser am dymor estynedig |
| 6792 |
% \end{macrocode} |
| 6793 |
% \begin{macrocode} |
| 6794 |
\expandafter\let\expandafter\chronos@tempa\csname chronos@#1@tikzname\endcsname |
| 6795 |
\edef\chronos@tempd{\csname chronos@#1@tikzname\endcsname-inv}% |
| 6796 |
\expandafter\let\expandafter\chronos@tempb\csname chronos@#1@border\endcsname |
| 6797 |
\expandafter\let\expandafter\chronos@tempc\csname chronos@#1@border@inv\endcsname |
| 6798 |
\advance\chronos@llinell@yshift by \chronos@llinell@add@yshift |
| 6799 |
\begin{scope}[/chronos/chronos@llinell@haenen] |
| 6800 |
\ifchronos@yearsonline |
| 6801 |
% \end{macrocode} |
| 6802 |
%^^A \IfFreeF\bagpuss{\pgfkeys{/chronos/@llinell/.show code}} |
| 6803 |
% \begin{macrocode} |
| 6804 |
\path [/chronos/@llinell/.expand once=\csname chronos@#1@lliw\endcsname] % |
| 6805 |
({#2,0} |- \chronos@border@coord) -- +(0pt,\chronos@tempb) coordinate % |
| 6806 |
(\chronos@tempa{} #4) -| ({#3,0} |- \chronos@border@coord) coordinate % |
| 6807 |
[midway] (\chronos@tempa{} #5) -- cycle; |
| 6808 |
\else |
| 6809 |
\path [/chronos/@llinell/.expand once=\csname chronos@#1@lliw\endcsname] % |
| 6810 |
({#2,0} |- \chronos@border@coord) ++(0pt,\chronos@tempb) % |
| 6811 |
++(0pt,\chronos@llinell@yshift) coordinate (\chronos@tempa{} #4) -- % |
| 6812 |
({#3,0} |- \chronos@tempa{} #4) coordinate (\chronos@tempa{} #5); |
| 6813 |
\fi |
| 6814 |
\ifchronos@eventdatessplit |
| 6815 |
\ifchronos@yearsonline |
| 6816 |
\path [/chronos/@llinell/.expand once=\csname chronos@#1@lliw\endcsname] % |
| 6817 |
({#2,0} |- \chronos@border@coord@inv) -- +(0pt,\chronos@tempc) % |
| 6818 |
coordinate (\chronos@tempd{} #4) -| ({#3,0} |- \chronos@border@coord@inv) % |
| 6819 |
coordinate [midway] (\chronos@tempd{} #5) % |
| 6820 |
-- cycle; |
| 6821 |
\else |
| 6822 |
\path [/chronos/@llinell/.expand once=\csname chronos@#1@lliw\endcsname] % |
| 6823 |
({#2,0} |- \chronos@border@coord@inv) ++(0pt,\chronos@tempc) % |
| 6824 |
++(0pt,-\chronos@llinell@yshift) coordinate (\chronos@tempd{} #4) -- % |
| 6825 |
({#3,0} |- \chronos@tempd{} #4) coordinate [midway] % |
| 6826 |
(\chronos@tempd{} #5); |
| 6827 |
\fi |
| 6828 |
\fi |
| 6829 |
% \end{macrocode} |
| 6830 |
% \changes{v0.9.3}{2025-07-09}{Add helper coordinates for placing things relative to life/period lines, including provisional coordinates for getting \texttt{x} only.} |
| 6831 |
% Re-define the start/end coordinates to correct \texttt{y}. |
| 6832 |
% \begin{macrocode} |
| 6833 |
\end{scope}% |
| 6834 |
\coordinate [alias=#6 \chronos@tempa] (#4 \chronos@tempa) at (\chronos@tempa{} #4); |
| 6835 |
\coordinate [alias=#7 \chronos@tempa] (#5 \chronos@tempa) at (\chronos@tempa{} #5); |
| 6836 |
}%^^A >>> |
| 6837 |
% \end{macrocode} |
| 6838 |
% \end{macro}%^^A >>> \chronos@creu@llinell (parhad, byw) |
| 6839 |
% \begin{macro}{\chronos@creu@testun@tag}%^^A <<< |
| 6840 |
% Internal macro to create text tags. |
| 6841 |
% \changes{v0.9.3}{2025-07-18}{Use \cs{def}\ rather than \cs{NewDocumentCommand}\ to maybe (or not) keep somebody or something happy in the unlikely event she, he, they or it should ever happen by.} |
| 6842 |
% \begin{macrocode} |
| 6843 |
\protected\long\def \chronos@creu@testun@tag#1#2#3{%^^A <<< make text tag |
| 6844 |
% #1 : allweddu ychwanegol | additional keys |
| 6845 |
% #2 : tag e.g. byw |
| 6846 |
% #3 : testun | text |
| 6847 |
\ifchronos@phantom |
| 6848 |
\relax |
| 6849 |
\else |
| 6850 |
\expandafter\let\expandafter\chronos@tempa\csname chronos@#2@tikzname\endcsname |
| 6851 |
\expandafter\let\expandafter\chronos@tempb\csname chronos@#2@at\endcsname |
| 6852 |
\ifchronos@hollti@testun@tag |
| 6853 |
\edef\chronos@tempa{\csname chronos@#2@tikzname\endcsname-inv}% |
| 6854 |
\expandafter\let\expandafter\chronos@tempc\csname chronos@#2@invanchor\endcsname |
| 6855 |
\pgfqkeys{/chronos}{% |
| 6856 |
chronos@tempa@style/.style={/chronos/event date split},% oedd yshcale=-1,... |
| 6857 |
chronos@tempb@style/.style={yshift=2*\chronos@yshift@inv}}% |
| 6858 |
\path (\chronos@tempb); |
| 6859 |
\pgfgetlastxy {\chronos@templgtha}{\chronos@templgthb}% |
| 6860 |
\ifdim\chronos@templgthb>0pt |
| 6861 |
\coordinate (chronos@temp@coord) at (\chronos@templgtha,-\chronos@templgthb); |
| 6862 |
\else |
| 6863 |
\coordinate (chronos@temp@coord) at (\chronos@templgtha,\chronos@templgthb); |
| 6864 |
\fi |
| 6865 |
\else |
| 6866 |
\expandafter\let\expandafter\chronos@tempc\csname chronos@#2@angor\endcsname |
| 6867 |
\pgfqkeys{/chronos}{% |
| 6868 |
chronos@tempa@style/.style={#1}, |
| 6869 |
chronos@tempb@style/.style={#1}}% |
| 6870 |
\coordinate (chronos@temp@coord) at (\chronos@tempb); |
| 6871 |
\fi |
| 6872 |
% \end{macrocode} |
| 6873 |
% ateb Symbol 1: \url{https://tex.stackexchange.com/a/385953/} |
| 6874 |
% \begin{macrocode} |
| 6875 |
\scoped[/chronos/middle anchorborder]{% |
| 6876 |
% \end{macrocode} |
| 6877 |
% \verb|fill opacity=0 -> problem| ; \verb|fill=none -> dim problem|; beth sy'n digwydd? |
| 6878 |
% |
| 6879 |
% for some reason \verb|fill opacity=0| causes a problem, whereas \verb|fill=none| does not, but why? |
| 6880 |
% \begin{macrocode} |
| 6881 |
\node (testun \chronos@tempa) [% |
| 6882 |
/chronos/@testun/.expand once=\csname chronos@#2@lliw\endcsname,% |
| 6883 |
anchor=\chronos@tempc,% |
| 6884 |
/chronos/.cd,/utils/exec=\pgfkeysalsofrom{\chronos@cadw},% |
| 6885 |
/chronos/chronos@tempb@style,% |
| 6886 |
/tikz/.cd,% |
| 6887 |
alias=tag \chronos@tempa,% |
| 6888 |
alias=text tag \chronos@tempa |
| 6889 |
] at (chronos@temp@coord) {#3};}% |
| 6890 |
\ifchronos@tag@cysylltu |
| 6891 |
% \end{macrocode} |
| 6892 |
% creu cylch ar y lein \textbar{} make circle on timeline |
| 6893 |
% \begin{macrocode} |
| 6894 |
\scoped[/chronos/chronos@cysylltiad@haenen]{% |
| 6895 |
\node (cysylltwr chronos \chronos@tempa) [% |
| 6896 |
/chronos/@cysylltwr@chronos/.expand once=\csname chronos@#2@lliw\endcsname,% |
| 6897 |
alias=chronos connector \chronos@tempa,% |
| 6898 |
alias=circle \chronos@tempa,% |
| 6899 |
alias=cylch \chronos@tempa |
| 6900 |
] at (\chronos@tempa) {};% |
| 6901 |
}% |
| 6902 |
% \end{macrocode} |
| 6903 |
% ateb Symbol 1: \url{https://tex.stackexchange.com/a/385953/} |
| 6904 |
% \begin{macrocode} |
| 6905 |
\begin{scope}[/chronos/middle anchorborder]% |
| 6906 |
% \end{macrocode} |
| 6907 |
% creu cysylltwyr testun ar y node testun \textbar{} make text connectors on the text node |
| 6908 |
% \begin{macrocode} |
| 6909 |
\node (cysylltwr testun \chronos@tempa) [% |
| 6910 |
/chronos/@cysylltwr@testun/.expand once=\csname chronos@#2@lliw\endcsname,% |
| 6911 |
/chronos/@cysylltwr@testun@prif/.expand once=\csname chronos@#2@lliw\endcsname,% |
| 6912 |
alias=text tag connector \chronos@tempa,% |
| 6913 |
alias=prif gysylltwr \chronos@tempa,% |
| 6914 |
alias=main connector \chronos@tempa,% |
| 6915 |
alias=cysylltwr \chronos@tempa0,% |
| 6916 |
alias=testun cylch \chronos@tempa,% |
| 6917 |
alias=connector \chronos@tempa0 |
| 6918 |
] at (testun \[email protected] \chronos@tempc) {}; |
| 6919 |
\end{scope}% |
| 6920 |
\path (cysylltwr testun \chronos@tempa); |
| 6921 |
\pgfgetlastxy{\chronos@templgtha}{\chronos@templgthb}% |
| 6922 |
\path (cysylltwr chronos \chronos@tempa); |
| 6923 |
\pgfgetlastxy{\chronos@templgthc}{\chronos@templgthb}% |
| 6924 |
\ifdim\chronos@templgtha=\chronos@templgthc |
| 6925 |
\def\chronos@tempe{--} |
| 6926 |
\else |
| 6927 |
\def\chronos@tempe{|-} |
| 6928 |
\fi |
| 6929 |
\ifbool{chronos@#2@cysylltiad}{% |
| 6930 |
% \end{macrocode} |
| 6931 |
% cysylltu llinell amser i node testun \textbar{} connect timeline to text node |
| 6932 |
% \begin{macrocode} |
| 6933 |
\scoped[/chronos/chronos@cysylltiad@haenen]{% |
| 6934 |
\draw [% |
| 6935 |
/chronos/@cysylltiad/.expand once=\csname chronos@#2@lliw\endcsname |
| 6936 |
] (cysylltwr chronos \chronos@tempa) \chronos@tempe |
| 6937 |
(cysylltwr testun \chronos@tempa) ;% |
| 6938 |
}%% oedd .\chronos@tempc |
| 6939 |
}{}% ifchronos@#2@cysylltiad |
| 6940 |
\fi % \ifchronos@tag@cysylltu |
| 6941 |
\fi |
| 6942 |
% \end{macrocode} |
| 6943 |
%^^A \edef\chronos@tempa{\csname chronos@#3@tikzname\endcsname}% |
| 6944 |
%^^A \edef\chronos@tempb{lliw \csname chronos@#3@tikzname\endcsname}% |
| 6945 |
%^^A \colorlet{chronos@temp@lliw}{\chronos@tempb}% |
| 6946 |
%^^A \chronos@darparu@lliw{\chronos@tempa}{chronos@temp@lliw}% |
| 6947 |
%^^A \draw (cylch \chronos@tempa) |- (cysylltwr testun \chronos@tempa.\chronos@tempc) ; |
| 6948 |
% \begin{macrocode} |
| 6949 |
}%^^A >>> |
| 6950 |
% \end{macrocode} |
| 6951 |
% \end{macro}%^^A >>> \chronos@creu@testun@tag |
| 6952 |
% \begin{macro}{\chronosevent,\chronoslife,\chronosperiod,\chronosinfo,\chronostheory,\chronostheorycircle,\chronosmaintitle,\chronoscopyright,\chronosshowpreset,\chronosshowcolor,\chronosshowfeatures}%^^A <<< aliases & (globalised) defaults |
| 6953 |
% Aliases and globalised defaults. |
| 6954 |
% Note these are the documented forms. |
| 6955 |
% \begin{macrocode} |
| 6956 |
\AtEndPreamble{% |
| 6957 |
\@ifpackageloaded{memoize}{% |
| 6958 |
\mmzset{% |
| 6959 |
auto={chronos}{memoize}, |
| 6960 |
}% |
| 6961 |
}{% nid yw hyn yn memoizable byth bynnag |
| 6962 |
\pgfkeys{/handlers/.meaning to context/.code={}}% |
| 6963 |
}% |
| 6964 |
\ifchronos@byw@isod |
| 6965 |
\chronos@byw@isod@rhagtrue |
| 6966 |
\else |
| 6967 |
\chronos@byw@isod@rhagfalse |
| 6968 |
\fi |
| 6969 |
\ifchronos@digwyddiad@isod |
| 6970 |
\chronos@digwyddiad@isod@rhagtrue |
| 6971 |
\else |
| 6972 |
\chronos@digwyddiad@isod@rhagfalse |
| 6973 |
\fi |
| 6974 |
\ifchronos@parhad@isod |
| 6975 |
\chronos@parhad@isod@rhagtrue |
| 6976 |
\else |
| 6977 |
\chronos@parhad@isod@rhagfalse |
| 6978 |
\fi |
| 6979 |
\chronos@lliwiau@cadw@rhag |
| 6980 |
\IfExistF \chronosevent{\let\chronosevent\digwyddiad}% |
| 6981 |
\IfExistF \chronoslife{\let\chronoslife\byw}% |
| 6982 |
\IfExistF \chronosperiod{\let\chronosperiod\parhad}% |
| 6983 |
\IfExistF \chronosinfo{\let\chronosinfo\gwybodaeth}% |
| 6984 |
\IfExistF \chronostheory{\let\chronostheory\theori}% |
| 6985 |
\IfExistF \chronostheorycircle{\let\chronostheorycircle\cylchtheori}% |
| 6986 |
\IfExistF \chronosmaintitle{\let\chronosmaintitle\prifdeitl}% |
| 6987 |
\IfExistF \chronoscopyright{\let\chronoscopyright\hawlfraint}% |
| 6988 |
\IfExistF \chronosshowpreset{\let\chronosshowpreset\chronos@dangos@gosod}% |
| 6989 |
\IfExistF \chronosshowcolor{\let\chronosshowcolor\chronosshowcolour}% |
| 6990 |
% \end{macrocode} |
| 6991 |
% \end{macro} |
| 6992 |
% \begin{macro}{\chronosshowfeatures} |
| 6993 |
% Debugging. |
| 6994 |
% \begin{macrocode} |
| 6995 |
\ProvideDocumentCommand \chronosshowfeatures { o }{% |
| 6996 |
\IfValueTF {#1} {% |
| 6997 |
\chronos@dangos@nodweddion{#1} |
| 6998 |
}{% |
| 6999 |
\chronos@dangos@nodweddion@rhag |
| 7000 |
}% |
| 7001 |
}% |
| 7002 |
% \end{macrocode} |
| 7003 |
% \end{macro} |
| 7004 |
% Required colours for \cs{chronosshowfeatures}. |
| 7005 |
% \begin{macrocode} |
| 7006 |
\providecolor{chronos show coordinate colour}{named}{chronos@lliw@coord}% |
| 7007 |
\providecolor{chronos show node colour}{named}{chronos@lliw@node}% |
| 7008 |
\providecolor{chronos show coordinate color}{named}{chronos@lliw@coord}% |
| 7009 |
\providecolor{chronos show node color}{named}{chronos@lliw@node}% |
| 7010 |
% \end{macrocode} |
| 7011 |
% \begin{macro}{\ceyearlabel,\bceyearlabel,\celabel,\bcelabel,\tlstyle,\plstyle,\sishape,\textsi,\uishape,\textui} |
| 7012 |
% Globalised defaults. |
| 7013 |
% \begin{macrocode} |
| 7014 |
\IfExistF \ceyearlabel {\let\ceyearlabel\chronos@yearce}% |
| 7015 |
\IfExistF \bceyearlabel {\let\bceyearlabel\chronos@yearbce}% |
| 7016 |
\IfExistF \celabel {\let\celabel\chronos@ce}% |
| 7017 |
\IfExistF \bcelabel {\let\bcelabel\chronos@bce}% |
| 7018 |
\IfExistF \tlstyle {\let\tlstyle\upshape}% |
| 7019 |
\IfExistF \plstyle {\let\plstyle\upshape}% |
| 7020 |
\IfExistF \sishape {\DeclareRobustCommand\sishape{\itshape\scshape}}% |
| 7021 |
\IfExistF \textsi {\DeclareTextFontCommand{\textsi}{\sishape}}% |
| 7022 |
\IfExistF \uishape {\let\uishape\itshape}% |
| 7023 |
\IfExistF \textui {\DeclareTextFontCommand{\textui}{\uishape}}% |
| 7024 |
} |
| 7025 |
% \end{macrocode} |
| 7026 |
% \end{macro}%^^A >>> aliases & globalised defaults |
| 7027 |
%^^A END macros y ddogfen >>> |
| 7028 |
% \begin{macrocode} |
| 7029 |
\chronos@presetfalse |
| 7030 |
% \end{macrocode} |
| 7031 |
% ^^A >>> chronos (pkg) |
| 7032 |
% \iffalse |
| 7033 |
%</sty> |
| 7034 |
% \fi |
| 7035 |
% |
| 7036 |
% |
| 7037 |
% \iffalse |
| 7038 |
%<*sty-styles> |
| 7039 |
% \fi |
| 7040 |
% \section[chronos-lib-styles]{\lpack{chronos-lib-styles}}\label{sec:cod-styles}%^^A <<< (pkg) |
| 7041 |
% Styles. |
| 7042 |
% \changes{v0.9.2}{2025-03-15}{Fix info reported for \texttt{chronos-lib-styles.sty}.} |
| 7043 |
% \begin{macrocode} |
| 7044 |
\RequirePackage{chronos} |
| 7045 |
\ProvidesPackageSVN[chronos-lib-styles.sty]{$Id: chronos-code.dtx 11797 2026-03-21 16:01:38Z cfrees $}[v0.9.4 \revinfo] |
| 7046 |
\pgfqkeys{/chronos}{%^^A BEGIN styles <<< |
| 7047 |
% \end{macrocode} |
| 7048 |
% Styles come in three flavours: on-line, off-line and no-year. |
| 7049 |
% \subsubsection{On-line}\label{subsubsec:cod-styles-online} |
| 7050 |
%^^A % BEGIN on line styles |
| 7051 |
% \begin{chronosstyle}{modern,lavender menace,serif on line,rainbow serif,sober judge} |
| 7052 |
% Years are marked on the timeline itself. |
| 7053 |
% \begin{macrocode} |
| 7054 |
modern/.style={% <<< |
| 7055 |
/chronos/.cd, |
| 7056 |
modern/.meaning to context, |
| 7057 |
colour scheme=modern, |
| 7058 |
no colour rotation, |
| 7059 |
timeline={% |
| 7060 |
dates=1500:1900, |
| 7061 |
timeline years=on line, |
| 7062 |
timeline line={chronos timeline background colour, opacity=1}, |
| 7063 |
timeline height'=5mm, |
| 7064 |
timeline marks, |
| 7065 |
timeline border height'=5pt, |
| 7066 |
major step font=\sffamily\bfseries\small, |
| 7067 |
minor step font=\sffamily\bfseries\footnotesize, |
| 7068 |
eras font=\sffamily\bfseries, |
| 7069 |
timeline mark={line width=.4pt, shorten <=-2pt, shorten >=0pt}, |
| 7070 |
timeline minor mark={line width=.2pt, shorten <=-2pt, shorten >=0pt}, |
| 7071 |
}, |
| 7072 |
every chronos connectors'=coordinate, |
| 7073 |
every text tag connectors+={circle, anchor=center, draw=none,% |
| 7074 |
fill=none, minimum size=\pgflinewidth}, |
| 7075 |
connections={draw=##1, {Triangle[width=0pt 3,reversed,length=0pt 1.5]}-% |
| 7076 |
{Triangle[width=0pt 5,reversed,length=0pt 2.5]}}, |
| 7077 |
period/line={fill=chronos timeline foreground colour, blend mode=overlay}, |
| 7078 |
life/line={fill=chronos timeline foreground colour, blend mode=overlay}, |
| 7079 |
event/line={draw=chronos timeline foreground colour, thick, blend mode=overlay}, |
| 7080 |
every text tags={fill=chronos main background colour, text=####1,% |
| 7081 |
fill opacity=.75, text opacity=1, draw=none, rounded corners,% |
| 7082 |
align=center, font=\sffamily\footnotesize}, |
| 7083 |
only years, |
| 7084 |
without eras, |
| 7085 |
connections on=background, |
| 7086 |
subheadings style={align=center, anchor=base, inner sep=0pt, outer sep=0pt,% |
| 7087 |
text=chronos main colour!75!chronos main background colour, opacity=.8,% |
| 7088 |
font=\sffamily\footnotesize}, |
| 7089 |
headings style={align=center, anchor=base, inner sep=0pt, outer sep=0pt,% |
| 7090 |
text=chronos main colour!75!chronos main background colour, opacity=.8,% |
| 7091 |
font=\sffamily\bfseries\small}, |
| 7092 |
main/frame={inner sep=5pt, ultra thick, draw=chronos main colour,% |
| 7093 |
fill=none,},% oedd chronos@prifliw@cefndir |
| 7094 |
main/title={/chronos/main/@frame, font=\sffamily\huge\bfseries, % |
| 7095 |
text=chronos main colour, anchor=center, align=center,% |
| 7096 |
draw=chronos main colour,ultra thick,drop shadow,% |
| 7097 |
fill=chronos main background colour,fill opacity=1}, |
| 7098 |
headings drops'=10pt:10pt:7.5pt, |
| 7099 |
bce year label=BCE, |
| 7100 |
ce year label=CE, |
| 7101 |
levels=3:3, |
| 7102 |
},% >>> |
| 7103 |
lavender menace/.style={% <<< |
| 7104 |
/chronos/.cd, |
| 7105 |
lavender menace/.meaning to context, |
| 7106 |
modern, |
| 7107 |
colour scheme=lavender, |
| 7108 |
rotate all colours, |
| 7109 |
every text tags+={draw=####1,sharp corners,text opacity=1,% |
| 7110 |
fill opacity=1,draw opacity=1,drop shadow}, |
| 7111 |
period/line+={top color=chronosSilver,% |
| 7112 |
bottom color=chronos timeline border outer colour,fill opacity=1}, |
| 7113 |
life/line+={top color=chronosSilver,% |
| 7114 |
bottom color=chronos timeline border outer colour,fill opacity=1}, |
| 7115 |
main/title+={text=chronos main colour!75!chronosDarkGray}, |
| 7116 |
},% >>> |
| 7117 |
serif on line/.style={% <<< |
| 7118 |
/chronos/.cd, |
| 7119 |
serif on line/.meaning to context, |
| 7120 |
no colour rotation, |
| 7121 |
colour scheme=default, |
| 7122 |
text tag connectors'={fill=##1, opacity=1, circle, minimum size=2.5pt,% |
| 7123 |
anchor=center, inner sep=0pt, outer sep=0pt}, |
| 7124 |
chronos connectors'={fill=##1, opacity=.75, circle, minimum size=2.5pt,% |
| 7125 |
anchor=center, inner sep=0pt, outer sep=0pt}, |
| 7126 |
timeline ce label={CE}, |
| 7127 |
timeline bce label={BCE}, |
| 7128 |
special date=none, |
| 7129 |
timeline={% |
| 7130 |
start date={1800-01-01}, |
| 7131 |
end date={1900-01-01}, |
| 7132 |
timeline years=on line, |
| 7133 |
timeline marks, |
| 7134 |
timeline year={text=chronos timeline foreground colour, align=center}, |
| 7135 |
timeline mark={draw=chronos timeline foreground colour, thick, shorten >=2.5pt}, |
| 7136 |
timeline minor mark={draw=chronos timeline foreground colour,% |
| 7137 |
thick, shorten >=3.5pt}, |
| 7138 |
timeline bare mark={draw=chronos timeline foreground colour,% |
| 7139 |
semithick, shorten >=2pt, shorten <=2pt}, |
| 7140 |
minor years, |
| 7141 |
step divisions=2, |
| 7142 |
timeline line={chronos timeline background colour}, |
| 7143 |
major step font=\normalfont\bfseries, |
| 7144 |
minor step font=\normalfont\bfseries\small, |
| 7145 |
eras font=\normalfont\bfseries, |
| 7146 |
}, |
| 7147 |
headings style={text=chronos main colour!75!chronos main background colour,% |
| 7148 |
font=\footnotesize\uishape}, |
| 7149 |
subheadings style={font=\scriptsize\uishape,% |
| 7150 |
text=chronos main colour!75!chronos main background colour}, |
| 7151 |
event/text tag+={font=\small\scshape}, |
| 7152 |
period/text tag+={font=\small\scshape}, |
| 7153 |
life/text tag+={font=\small\scshape}, |
| 7154 |
period/line+={fill=##1, fill opacity=.25}, |
| 7155 |
life/line+={fill=##1, fill opacity=.25}, |
| 7156 |
every text tags+={text=####1!75!black},%^^A add global default o/w ignored (ond nid eisiau inner sep=0pt) |
| 7157 |
levels=3:3, |
| 7158 |
main/title={font=\Large\bfseries,text=chronos main colour,draw=none}, |
| 7159 |
frame, |
| 7160 |
main/frame={draw=chronos timeline background colour, ultra thick}, |
| 7161 |
},% >>> |
| 7162 |
rainbow serif/.style={% <<< |
| 7163 |
/utils/exec={\selectcolormodel{rgb}}, |
| 7164 |
/chronos/.cd, |
| 7165 |
rainbow serif/.meaning to context, |
| 7166 |
serif on line, |
| 7167 |
colour scheme=xcolseries, |
| 7168 |
rotate all colours, |
| 7169 |
timeline={% |
| 7170 |
dates=1500:2100, |
| 7171 |
timeline mark eras, |
| 7172 |
timeline bare marks=false, |
| 7173 |
}, |
| 7174 |
only years, |
| 7175 |
without eras, |
| 7176 |
},% >>> |
| 7177 |
sober judge/.style={% <<< |
| 7178 |
/chronos/.cd, |
| 7179 |
sober judge/.meaning to context, |
| 7180 |
colour scheme=sobriety, |
| 7181 |
timeline={% |
| 7182 |
start date=1001-10-01, |
| 7183 |
end date=1003-06-14, |
| 7184 |
step years=1, |
| 7185 |
step divisions=6, |
| 7186 |
timeline minor marks, |
| 7187 |
timeline bare marks, |
| 7188 |
}, |
| 7189 |
ce year label=CE, |
| 7190 |
levels=3:3, |
| 7191 |
no colour rotation, |
| 7192 |
every connections'={draw=####1,% |
| 7193 |
-{Triangle[width=1.5pt, reversed, length=.75pt, fill=####1]}}, |
| 7194 |
every text tags'={fill opacity=.75,% |
| 7195 |
fill=####1!25, draw=####1, rounded corners,% |
| 7196 |
font=\footnotesize\sffamily, text=chronos timeline foreground colour}, |
| 7197 |
main/title={font=\sffamily\bfseries\LARGE, text=chronos main colour}, |
| 7198 |
main/frame={draw=chronos main colour, line width=1pt, rounded corners}, |
| 7199 |
headings style={font=\rmfamily\small\itshape,% |
| 7200 |
text=chronos main colour!75!chronos main background colour}, |
| 7201 |
subheadings style={/chronos/@amseraumawr,font=\scriptsize\rmfamily\itshape}, |
| 7202 |
every lines+={fill=none,draw=none}, |
| 7203 |
},% >>> |
| 7204 |
% \end{macrocode} |
| 7205 |
% \end{chronosstyle} |
| 7206 |
%^^A % END on line styles |
| 7207 |
% \subsubsection{Off-line}\label{subsubsec:cod-styles-offline} |
| 7208 |
% Years are marked somewhere off the timeline e.g.\ just above or below. |
| 7209 |
% \begin{chronosstyle}{somewhat plain,contemporary 90,blues below,flipping blues,rotated 90,off line colour,off line colour alt,off line simple,simple arrow,event splitter} |
| 7210 |
%^^A % BEGIN off line styles |
| 7211 |
% \begin{macrocode} |
| 7212 |
somewhat plain/.style={%^^A <<< |
| 7213 |
/chronos/.cd, |
| 7214 |
somewhat plain/.meaning to context, |
| 7215 |
no colour rotation, |
| 7216 |
colour scheme=default, |
| 7217 |
timeline={% |
| 7218 |
major step font=\normalfont\sffamily\small\bfseries, |
| 7219 |
minor step font=\normalfont\sffamily\footnotesize, |
| 7220 |
eras font=\normalfont\normalsize\sffamily, |
| 7221 |
timeline width'=100mm, |
| 7222 |
timeline years=above, |
| 7223 |
timeline ce label={CE}, |
| 7224 |
timeline bce label={BCE}, |
| 7225 |
timeline margin'=12.5pt, |
| 7226 |
minor years=false, |
| 7227 |
start=-500, |
| 7228 |
end=2050, |
| 7229 |
timeline year={inner xsep=0pt}, |
| 7230 |
}, |
| 7231 |
special date=none, |
| 7232 |
ce year label={CE}, |
| 7233 |
bce year label={BCE}, |
| 7234 |
text tag yshift'=-10pt, |
| 7235 |
every text tags+={fill=chronos main background colour,fill opacity=.25,% |
| 7236 |
text opacity=1,font=\sffamily\small}, |
| 7237 |
every connections+={draw=####1,% |
| 7238 |
{Triangle[width=0pt 3,reversed,length=0pt 1.5]}-% |
| 7239 |
{Triangle[width=0pt 3,reversed,length=0pt 1.5]}}, |
| 7240 |
every event below, |
| 7241 |
every period below, |
| 7242 |
every life below, |
| 7243 |
levels=0:3, |
| 7244 |
frame, |
| 7245 |
headings style={font=\footnotesize\sffamily,% |
| 7246 |
text=chronos main colour!75!chronos main background colour}, |
| 7247 |
subheadings style={/chronos/@amseraumawr,font=\scriptsize\sffamily}, |
| 7248 |
main/frame={draw=chronos main colour!75!chronos main background colour,semithick}, |
| 7249 |
main/title={/chronos/main/title lines={% |
| 7250 |
draw=chronos main colour!50!chronos main background colour,% |
| 7251 |
thick},% |
| 7252 |
text=chronos main colour!75!chronos main background colour,% |
| 7253 |
font=\Large\sffamily,}, |
| 7254 |
headings drops'=12pt:10pt:7.5pt, |
| 7255 |
headings border'=30pt, |
| 7256 |
},%^^A >>> |
| 7257 |
contemporary 90/.style={%^^A <<< |
| 7258 |
/chronos/.cd, |
| 7259 |
contemporary 90/.meaning to context, |
| 7260 |
colour scheme=contninety, |
| 7261 |
every text tags+={text=####1,font=\sffamily}, |
| 7262 |
every lines+={line width=1pt}, |
| 7263 |
no colour rotation, |
| 7264 |
timeline={% |
| 7265 |
start date=2002-01-01, |
| 7266 |
end date=2016-12-31, |
| 7267 |
timeline arrow, |
| 7268 |
conditional timeline arrow={% |
| 7269 |
timeline/timeline width-=3pt+4.5\timelineht, |
| 7270 |
timeline/timeline line+={shorten >={-3pt-4.5\timelineht}, -Stealth}, |
| 7271 |
before headings+={% |
| 7272 |
\path (chronos post) -- +(3pt+4.5\timelineht,0pt); |
| 7273 |
}, |
| 7274 |
}{}, |
| 7275 |
timeline marks, |
| 7276 |
timeline minor marks, |
| 7277 |
timeline mark={ultra thick}, |
| 7278 |
timeline minor mark={thick}, |
| 7279 |
step divisions=4, |
| 7280 |
step major years=2, |
| 7281 |
timeline year={fill=none}, |
| 7282 |
timeline margin'=5mm, |
| 7283 |
timeline width'=90mm, |
| 7284 |
timeline year={rotate=90}, |
| 7285 |
major step font=\sffamily\upshape\tlstyle\bfseries, |
| 7286 |
minor step font=\sffamily\upshape\tlstyle, |
| 7287 |
eras font=\sffamily\upshape\tlstyle\bfseries, |
| 7288 |
timeline years=above, |
| 7289 |
timeline years anchor=west, |
| 7290 |
}, |
| 7291 |
without eras, |
| 7292 |
every event below, |
| 7293 |
every life below, |
| 7294 |
every period below, |
| 7295 |
levels=0:3, |
| 7296 |
frame, |
| 7297 |
headings style={font=\small\sffamily\plstyle,% |
| 7298 |
text=chronos main colour!80!chronos main background colour}, |
| 7299 |
subheadings style={font=\footnotesize\sffamily\plstyle,% |
| 7300 |
text=chronos main colour!60!chronos main background colour}, |
| 7301 |
main/frame={% |
| 7302 |
double=chronos timeline foreground colour!25!chronos timeline background colour,% |
| 7303 |
draw=chronos timeline foreground colour!75!chronos timeline background colour,% |
| 7304 |
thin}, |
| 7305 |
main/title={font=\sffamily\upshape\plstyle\bfseries\huge,text=chronos main colour}, |
| 7306 |
},%^^A >>> |
| 7307 |
blues below/.style={%^^A <<< |
| 7308 |
/utils/exec={\selectcolormodel{rgb}}, |
| 7309 |
/chronos/.cd, |
| 7310 |
blues below/.meaning to context, |
| 7311 |
colour scheme=blues, |
| 7312 |
rotate all colours, |
| 7313 |
timeline={% |
| 7314 |
timeline years=above, |
| 7315 |
timeline marks, |
| 7316 |
timeline minor marks, |
| 7317 |
step minor year=50, |
| 7318 |
step divisions=10, |
| 7319 |
step major year=100, |
| 7320 |
dates=1550:2050, |
| 7321 |
timeline height'=3pt, |
| 7322 |
timeline line={chronos timeline foreground colour,% |
| 7323 |
double=chronos timeline background colour,% |
| 7324 |
line width=\timelineht/3,double distance=\timelineht/3}, |
| 7325 |
timeline arrow, |
| 7326 |
conditional timeline arrow={% |
| 7327 |
timeline/timeline line+={Bar-Latex,shorten <=-\timelineht/3,% |
| 7328 |
shorten >=-3pt-2.1\timelineht}, |
| 7329 |
timeline/timeline width-={3pt+2.43\timelineht}, |
| 7330 |
before headings+={\path (chronos post) -- ++(3pt+2.1\timelineht,0pt) % |
| 7331 |
coordinate (chronos arrow tip) (chronos pre) -- % |
| 7332 |
++(-\timelineht/3,0pt) coordinate (chronos arrow tail);}, |
| 7333 |
}{}, |
| 7334 |
timeline mark={chronos timeline foreground colour,line width=.6pt,shorten >=-4pt}, |
| 7335 |
timeline minor mark={chronos timeline foreground colour,% |
| 7336 |
line width=.5pt,shorten >=-3.5pt}, |
| 7337 |
timeline bare mark={% |
| 7338 |
chronos timeline foreground colour,line width=.3pt,shorten >=-2.5pt}, |
| 7339 |
timeline year={fill=none,text=chronos timeline foreground colour,% |
| 7340 |
rotate around={45:(chronos year \chronosyeari |- chronos top)}}, |
| 7341 |
major step font=\sffamily\footnotesize\tlstyle, |
| 7342 |
timeline years anchor=south west, |
| 7343 |
minor step font=\sffamily\scriptsize\tlstyle, |
| 7344 |
timeline margin'=17.5pt, |
| 7345 |
}, |
| 7346 |
minor year format={!Y}, |
| 7347 |
every event below, |
| 7348 |
every life below, |
| 7349 |
every period below, |
| 7350 |
levels=0:3, |
| 7351 |
headings style+={% |
| 7352 |
text=chronos main colour!75!chronos main background colour,% |
| 7353 |
font=\small\itshape\bfseries,% |
| 7354 |
}, |
| 7355 |
subheadings style+={% |
| 7356 |
text=chronos main colour!75!chronos main background colour,% |
| 7357 |
font=\footnotesize\itshape,% |
| 7358 |
}, |
| 7359 |
main/title+={% |
| 7360 |
font=\LARGE,text=chronos timeline foreground colour,% |
| 7361 |
draw=chronos timeline background colour,semithick,% |
| 7362 |
}, |
| 7363 |
main/frame+={% |
| 7364 |
thick,draw,chronos timeline foreground colour,% |
| 7365 |
double=chronos timeline background colour,% |
| 7366 |
}, |
| 7367 |
copyright={font=\footnotesize\sffamily, inner sep=0pt, outer sep=0pt,% |
| 7368 |
text=chronos timeline foreground colour!50!chronos main background colour}, |
| 7369 |
copyright/rotate=90, |
| 7370 |
copyright/tag anchor=north west, |
| 7371 |
},%^^A >>> |
| 7372 |
timeline year rotate/.code={% |
| 7373 |
}, |
| 7374 |
flipping blues/.style={%^^A <<< |
| 7375 |
/chronos/.cd, |
| 7376 |
flipping blues/.meaning to context, |
| 7377 |
blues below, |
| 7378 |
timeline={% |
| 7379 |
timeline years=below, |
| 7380 |
timeline year={% |
| 7381 |
fill=none,rotate around={-90:(chronos year \chronosyeari)},% |
| 7382 |
text=chronos timeline foreground colour,% |
| 7383 |
}, |
| 7384 |
timeline years anchor=north west, |
| 7385 |
}, |
| 7386 |
every event above, |
| 7387 |
every life above, |
| 7388 |
every period above, |
| 7389 |
levels=3:0, |
| 7390 |
},%^^A >>> |
| 7391 |
rotated 45/.style={%^^A <<< |
| 7392 |
/chronos/.cd, |
| 7393 |
rotated 45/.meaning to context, |
| 7394 |
colour scheme=default, |
| 7395 |
rotate all colours, |
| 7396 |
timeline={% |
| 7397 |
start date={{-25}-01-01}, |
| 7398 |
end date={20-01-01}, |
| 7399 |
step major years=5, |
| 7400 |
timeline years=off line, |
| 7401 |
timeline years=above, |
| 7402 |
timeline marks, |
| 7403 |
timeline font=\scriptsize, |
| 7404 |
mark at era switch, |
| 7405 |
}, |
| 7406 |
only text, |
| 7407 |
year format={!Y !E}, |
| 7408 |
lines={draw=#1}, |
| 7409 |
every text tags+={rotate=-45}, |
| 7410 |
event/tag+={tag anchor=west}, |
| 7411 |
period/tag+={tag anchor=west}, |
| 7412 |
life/tag+={tag anchor=west}, |
| 7413 |
text tag yshift'=2.5pt, |
| 7414 |
every event below, |
| 7415 |
every period below, |
| 7416 |
every life below, |
| 7417 |
no connectors, |
| 7418 |
no connections, |
| 7419 |
lines on=foreground, |
| 7420 |
frame, |
| 7421 |
every text tags+={font=\sffamily}, |
| 7422 |
main/frame={draw=chronos main colour,rounded corners=10pt,thick}, |
| 7423 |
main/title={% |
| 7424 |
draw=chronos main colour,rounded corners=3pt,% |
| 7425 |
semithick,font=\sffamily\LARGE,% |
| 7426 |
}, |
| 7427 |
headings style={% |
| 7428 |
font=\itshape\small\bfseries,% |
| 7429 |
text=chronos main colour!50!chronos main background colour,% |
| 7430 |
}, |
| 7431 |
subheadings style={font=\itshape\small,% |
| 7432 |
text=chronos timeline foreground colour!50!chronos timeline background colour}, |
| 7433 |
},%^^A >>> |
| 7434 |
off line colour/.style={%^^A <<< ateb: https://tex.stackexchange.com/a/324106/ |
| 7435 |
/chronos/.cd, |
| 7436 |
off line colour/.meaning to context, |
| 7437 |
colour scheme=offlinebasic, |
| 7438 |
rotate all colours, |
| 7439 |
timeline={% |
| 7440 |
timeline width'=120mm, |
| 7441 |
timeline height'=3pt, |
| 7442 |
start date={-3000}-01-01, |
| 7443 |
end date={-2000}-01-01, |
| 7444 |
timeline font=\sffamily\tiny, |
| 7445 |
timeline year={text=chronos main colour}, |
| 7446 |
timeline arrow, |
| 7447 |
conditional timeline arrow={% |
| 7448 |
timeline/timeline width-=#1, |
| 7449 |
timeline/timeline line+={% |
| 7450 |
shorten >={-#1}, -{Triangle Cap[length=#1]}, |
| 7451 |
}, |
| 7452 |
before headings+={% |
| 7453 |
\path (chronos post) -- +(#1,0pt); |
| 7454 |
}, |
| 7455 |
}{}, |
| 7456 |
timeline border height'=0pt, |
| 7457 |
step major years=100, |
| 7458 |
step minor years=0, |
| 7459 |
step divisions=0, |
| 7460 |
timeline years=below, |
| 7461 |
timeline marks, |
| 7462 |
timeline minor marks=false, |
| 7463 |
minor years=false, |
| 7464 |
timeline bare marks=false, |
| 7465 |
}, |
| 7466 |
every text tags+={% |
| 7467 |
text=####1!75!black,font=\sffamily\scriptsize,% |
| 7468 |
fill=chronos main background colour,fill opacity=.75,% |
| 7469 |
}, |
| 7470 |
every connections+={% |
| 7471 |
draw=####1,% |
| 7472 |
{Triangle[width=0pt 3,reversed,length=0pt 1.5]}-% |
| 7473 |
{Triangle[width=0pt 3,reversed,length=0pt 1.5]},% |
| 7474 |
}, |
| 7475 |
event/line'={}, |
| 7476 |
year format={!q!Y}, |
| 7477 |
event/date format={!q!Y}, |
| 7478 |
main/title={font=\sffamily\Large,text=chronos timeline foreground colour}, |
| 7479 |
chronos tikz+={% |
| 7480 |
\ifchronos@timeline@showyears |
| 7481 |
\scoped[on chronos middle ground layer]{% |
| 7482 |
\fill [chronos main background colour, fill opacity=.75] |
| 7483 |
(chronos pre) -| (chronos post |- chronos phantom year.south) -| cycle ; |
| 7484 |
} |
| 7485 |
\fi |
| 7486 |
}, |
| 7487 |
},%^^A >>> |
| 7488 |
off line colour/.default=20mm, |
| 7489 |
off line color/.forward to=/chronos/off line colour, |
| 7490 |
off line colour alt/.style={%^^A <<< |
| 7491 |
/chronos/.cd, |
| 7492 |
off line colour alt/.meaning to context, |
| 7493 |
off line colour=#1, |
| 7494 |
% \end{macrocode} |
| 7495 |
% use cronoleg colours |
| 7496 |
% \begin{macrocode} |
| 7497 |
colour scheme=offlinealt, |
| 7498 |
rotate all colours, |
| 7499 |
event/colours below from clist={lliwiau_byw_isod}, |
| 7500 |
event/colours above from clist={lliwiau_byw_uchod}, |
| 7501 |
},%^^A >>> |
| 7502 |
off line colour alt/.default=20mm, |
| 7503 |
off line color alt/.forward to=/chronos/off line colour alt, |
| 7504 |
off line simple/.style={%^^A <<< https://tex.stackexchange.com/a/324106/ |
| 7505 |
/chronos/.cd, |
| 7506 |
off line simple/.meaning to context, |
| 7507 |
off line colour=#1, |
| 7508 |
rotate no colours, |
| 7509 |
},%^^A >>> |
| 7510 |
off line simple/.default=20mm, |
| 7511 |
simple arrow/.style={%^^A <<< https://tex.stackexchange.com/a/342699/ |
| 7512 |
/chronos/.cd, |
| 7513 |
simple arrow/.meaning to context, |
| 7514 |
timeline={% |
| 7515 |
start date={1-01-01}, |
| 7516 |
end date={2000-01-01}, |
| 7517 |
step major years=250, |
| 7518 |
timeline height'=2.5mm, |
| 7519 |
timeline years=off line, |
| 7520 |
timeline width'=200mm, |
| 7521 |
timeline arrow, |
| 7522 |
conditional timeline arrow={% |
| 7523 |
timeline/timeline width-=#1, |
| 7524 |
timeline/timeline line+={shorten >={-#1}, -{Triangle Cap[length=#1]}}, |
| 7525 |
before headings+={% |
| 7526 |
\path (chronos post) -- +(#1,0pt); |
| 7527 |
}, |
| 7528 |
}{}, |
| 7529 |
mark at era switch=false, |
| 7530 |
}, |
| 7531 |
date format={!d/!m/!Y}, |
| 7532 |
every event below, |
| 7533 |
every period below, |
| 7534 |
every life below, |
| 7535 |
no colour rotation, |
| 7536 |
headings style={font=\footnotesize\itshape}, |
| 7537 |
subheadings style={font=\scriptsize\itshape}, |
| 7538 |
},%^^A >>> |
| 7539 |
simple arrow/.default=10mm, |
| 7540 |
event splitter/.style={%^^A <<< https://tex.stackexchange.com/a/325890/ |
| 7541 |
/chronos/.cd, |
| 7542 |
event splitter/.meaning to context, |
| 7543 |
no colour rotation, |
| 7544 |
timeline={% |
| 7545 |
start date=2014-01-13, |
| 7546 |
end date=2014-02-22, |
| 7547 |
timeline width'=150mm, |
| 7548 |
timeline margin'=0pt, |
| 7549 |
timeline era margin'=0pt, |
| 7550 |
timeline years=none, |
| 7551 |
timeline years=off line, |
| 7552 |
}, |
| 7553 |
event/date format={!b !d \thinspace !Y}, |
| 7554 |
event dates split, |
| 7555 |
text tag yshift'=3pt, |
| 7556 |
event text tag={font=\sffamily\small}, |
| 7557 |
no connectors, |
| 7558 |
every event below, |
| 7559 |
main/title={font=\sffamily\Large}, |
| 7560 |
frame, |
| 7561 |
main/frame={draw}, |
| 7562 |
},%^^A >>> |
| 7563 |
% \end{macrocode} |
| 7564 |
% \end{chronosstyle} |
| 7565 |
%^^A % END off line styles |
| 7566 |
% \subsubsection{No-year}\label{subsubsec:cod-styles-no-year} |
| 7567 |
% Years are not marked. |
| 7568 |
%^^A % BEGIN no year styles |
| 7569 |
% \begin{chronosstyle}{date centric,lines on line,plain arrow} |
| 7570 |
% \begin{macrocode} |
| 7571 |
date centric/.style={%^^A <<< |
| 7572 |
/chronos/.cd, |
| 7573 |
date centric/.meaning to context, |
| 7574 |
timeline={% |
| 7575 |
timeline width'=150mm, |
| 7576 |
timeline height'=5mm, |
| 7577 |
start date=1935-01-01, |
| 7578 |
end date=2010-12-31, |
| 7579 |
timeline font=\sffamily\small, |
| 7580 |
timeline border height'=5pt, |
| 7581 |
}, |
| 7582 |
event/text tag+={font=\sffamily\scriptsize, fill=none}, |
| 7583 |
no colour rotation, |
| 7584 |
event/default colour=chronos main colour, |
| 7585 |
event years on line, |
| 7586 |
main/title+={% |
| 7587 |
font=\sffamily\LARGE,text=chronos main colour,% |
| 7588 |
/chronos/main/title lines={% |
| 7589 |
draw=chronos timeline background colour,line width=1.5pt,% |
| 7590 |
}% |
| 7591 |
}, |
| 7592 |
},%^^A >>> |
| 7593 |
lines on line/.style={%^^A <<< https://tex.stackexchange.com/a/324453/ |
| 7594 |
/chronos/.cd, |
| 7595 |
lines on line/.meaning to context, |
| 7596 |
rotate all colours, |
| 7597 |
timeline={% |
| 7598 |
timeline width'=120mm, |
| 7599 |
timeline height'=#1, |
| 7600 |
start date=01-01-01, |
| 7601 |
end date=2016-12-31, |
| 7602 |
timeline years=none, |
| 7603 |
timeline years=above, |
| 7604 |
timeline arrow, |
| 7605 |
conditional timeline arrow={% |
| 7606 |
timeline/timeline width'-=20mm, |
| 7607 |
timeline/timeline line+={shorten >=-20mm, -{Triangle Cap[length=20mm]}}, |
| 7608 |
before headings+={% |
| 7609 |
\path (chronos post) -- +(20mm,0pt); |
| 7610 |
}, |
| 7611 |
}{}, |
| 7612 |
}, |
| 7613 |
only years, |
| 7614 |
period/line+={line width=#1,draw=##1}, |
| 7615 |
life/line+={line width=#1,draw=##1}, |
| 7616 |
line yshift=.5*#1, |
| 7617 |
event/line+={semithick}, |
| 7618 |
text tag yshift=2.5pt+.5*#1, |
| 7619 |
every event above, |
| 7620 |
every period below, |
| 7621 |
every life below, |
| 7622 |
headings style={font=\footnotesize\bfseries}, |
| 7623 |
subheadings style={font=\footnotesize}, |
| 7624 |
},%^^A >>> |
| 7625 |
lines on line/.default=5mm, |
| 7626 |
plain arrow/.style={%^^A <<< https://tex.stackexchange.com/a/324453/ |
| 7627 |
/chronos/.cd, |
| 7628 |
plain arrow/.meaning to context, |
| 7629 |
lines on line=#1, |
| 7630 |
line yshift'=1pt, |
| 7631 |
text tag yshift'=2.5pt, |
| 7632 |
period/line+={line width=2pt,draw=##1}, |
| 7633 |
life/line+={line width=2pt,draw=##1}, |
| 7634 |
},%^^A >>> |
| 7635 |
plain arrow/.default=5mm, |
| 7636 |
% \end{macrocode} |
| 7637 |
% \end{chronosstyle} |
| 7638 |
%^^A % END no year styles |
| 7639 |
% \begin{macrocode} |
| 7640 |
}%^^A % END styles >>> |
| 7641 |
% \end{macrocode} |
| 7642 |
% ^^A >>> styles (pkg) |
| 7643 |
% \iffalse |
| 7644 |
%</sty-styles> |
| 7645 |
% \fi |
| 7646 |
% |
| 7647 |
% \iffalse |
| 7648 |
%<*sty-colschemes> |
| 7649 |
% \fi |
| 7650 |
% \section[chronos-lib-colschemes]{\lpack{chronos-lib-colschemes}}\label{sec:cod-colours}%^^A <<< (pkg) |
| 7651 |
% Colour schemes. |
| 7652 |
% \changes{v0.9.2}{2025-03-15}{Fix info reported for \texttt{chronos-lib-styles.sty}.} |
| 7653 |
% \begin{macrocode} |
| 7654 |
\RequirePackage{chronos} |
| 7655 |
\ProvidesPackageSVN[chronos-lib-colschemes.sty]{$Id: chronos-code.dtx 11797 2026-03-21 16:01:38Z cfrees $}[v0.9.4 \revinfo] |
| 7656 |
% \end{macrocode} |
| 7657 |
% \begin{colscheme}{blues,contninety,offlinealt,xcolseries,lavender,modern,offlinebasic,sobriety}%^^A <<< BEGIN cylluniau lliwiau | colour schemes |
| 7658 |
% cylluniau lliwiau \textbar{} colour schemes |
| 7659 |
% \begin{macrocode} |
| 7660 |
\chronosnewcolourscheme[default]{blues}{%^^A <<< |
| 7661 |
timeline foreground=chronosDodgerBlue4, |
| 7662 |
timeline background=chronosDodgerBlue2, |
| 7663 |
default below={% |
| 7664 |
chronosCerulean!50!chronosDodgerBlue4,chronosCerulean!50!chronosDodgerBlue3,% |
| 7665 |
chronosCerulean!50!chronosDodgerBlue2,chronosCerulean!50!chronosDodgerBlue1,% |
| 7666 |
chronosCerulean}, |
| 7667 |
default above={chronosCerulean!50!chronosDodgerBlue4,% |
| 7668 |
chronosCerulean!50!chronosDodgerBlue3,chronosCerulean!50!chronosDodgerBlue2,% |
| 7669 |
chronosCerulean!50!chronosDodgerBlue1,chronosCerulean}, |
| 7670 |
foreground=chronosDodgerBlue4, |
| 7671 |
background=white, |
| 7672 |
}%^^A >>> |
| 7673 |
\chronosnewcolourscheme[default]{contninety}{%^^A <<< |
| 7674 |
foreground=chronosdarkgray, |
| 7675 |
timeline foreground=chronosdarkgray, |
| 7676 |
}%^^A >>> |
| 7677 |
\chronosnewcolourscheme[cronoleg]{offlinealt}{%^^A <<< |
| 7678 |
timeline foreground=blue!40, |
| 7679 |
}%^^A >>> |
| 7680 |
% \end{macrocode} |
| 7681 |
% \lpack{xcolor} manual: 35 |
| 7682 |
% \begin{macrocode} |
| 7683 |
\definecolorseries{xcolor g2}{hsb}{grad}[hsb]{.575,1,1}{.987,-.234,0} |
| 7684 |
\definecolorseries{xcolor s2}{hsb}{step}[hsb]{.575,1,1}{.11,-.05,0} |
| 7685 |
\resetcolorseries{xcolor g2} |
| 7686 |
\resetcolorseries{xcolor s2} |
| 7687 |
\chronosnewcolourscheme[default]{xcolseries}{%^^A <<< |
| 7688 |
default above={% |
| 7689 |
xcolor s2!![0],xcolor s2!![1],xcolor s2!![2],xcolor s2!![3],% |
| 7690 |
xcolor s2!![4],xcolor s2!![5],xcolor s2!![6],xcolor s2!![7],% |
| 7691 |
xcolor s2!![8],xcolor s2!![9],xcolor s2!![10],xcolor s2!![11],% |
| 7692 |
xcolor s2!![12],xcolor s2!![13],xcolor s2!![14],xcolor s2!![15]}, |
| 7693 |
default below={% |
| 7694 |
xcolor g2!![0],xcolor g2!![1],xcolor g2!![2],xcolor g2!![3],% |
| 7695 |
xcolor g2!![4],xcolor g2!![5],xcolor g2!![6],xcolor g2!![7],% |
| 7696 |
xcolor g2!![8],xcolor g2!![9],xcolor g2!![10],xcolor g2!![11],% |
| 7697 |
xcolor g2!![12],xcolor g2!![13],xcolor g2!![14],xcolor g2!![15]}, |
| 7698 |
background=white, |
| 7699 |
foreground=black, |
| 7700 |
timeline foreground=white, |
| 7701 |
timeline background=black, |
| 7702 |
timeline border inner=white, |
| 7703 |
timeline border outer=white, |
| 7704 |
timeline border middle=black!80, |
| 7705 |
life/default=chronosdarkgray, |
| 7706 |
event/default=chronosdarkgray, |
| 7707 |
period/default=chronosdarkgray, |
| 7708 |
theory/default=chronosdarkgray, |
| 7709 |
info/default=chronosdarkgray, |
| 7710 |
}%^^A >>> |
| 7711 |
\chronosnewcolourscheme[default]{lavender}{%^^A <<< |
| 7712 |
timeline foreground=chronosLavenderBlush4, |
| 7713 |
timeline background=chronosLavender, |
| 7714 |
timeline border inner=chronosLavenderBlush3, |
| 7715 |
timeline border middle=chronosLavenderBlush1, |
| 7716 |
timeline border outer=chronosLavenderBlush4, |
| 7717 |
foreground=chronosLavenderBlush4, |
| 7718 |
background=chronosLavender, |
| 7719 |
default above={% |
| 7720 |
chronosLavenderBlush4!90!chronosMediumPurple!50!chronosDarkSlateGrey,% |
| 7721 |
chronosLavenderBlush3!90!chronosMediumPurple!50!chronosDarkSlateGrey,% |
| 7722 |
chronosLavenderBlush2!90!chronosMediumPurple!50!chronosDarkSlateGrey}, |
| 7723 |
default below={% |
| 7724 |
chronosLavenderBlush2!90!chronosMediumPurple!50!chronosDarkSlateGrey,% |
| 7725 |
chronosLavenderBlush3!90!chronosMediumPurple!50!chronosDarkSlateGrey,% |
| 7726 |
chronosLavenderBlush4!90!chronosMediumPurple!50!chronosDarkSlateGrey}, |
| 7727 |
}%^^A >>> |
| 7728 |
\chronosnewcolourscheme[default]{modern}{%^^A <<< |
| 7729 |
timeline foreground=chronosSilver, |
| 7730 |
}%^^A >>> |
| 7731 |
\chronosnewcolourscheme[default]{offlinebasic}{%^^A <<< |
| 7732 |
timeline foreground=blue!40, |
| 7733 |
foreground=black, |
| 7734 |
background=white, |
| 7735 |
}%^^A >>> |
| 7736 |
\chronosnewcolourscheme[default]{sobriety}{%^^A <<< |
| 7737 |
foreground=gray, |
| 7738 |
background=white, |
| 7739 |
timeline background=gray!50, |
| 7740 |
timeline foreground=black, |
| 7741 |
life/default=gray, |
| 7742 |
event/default=gray, |
| 7743 |
period/default=gray, |
| 7744 |
theory/default=gray, |
| 7745 |
info/default=gray, |
| 7746 |
}%^^A >>> |
| 7747 |
% \end{macrocode} |
| 7748 |
% \end{colscheme}%^^A >>> END cylluniau lliwiau | colour schemes |
| 7749 |
% ^^A >>> colurs (pkg) |
| 7750 |
% \iffalse |
| 7751 |
%</sty-colschemes> |
| 7752 |
% \fi |
| 7753 |
% |
| 7754 |
% \loadgeometry{safonol}% |
| 7755 |
% |
| 7756 |
% \fancyheadoffset[lh]{0pt}% |
| 7757 |
%\Finale |
| 7758 |
% |
| 7759 |
%^^A vim: et:tw=0:sw=2:ts=2:foldmethod=marker:fmr=<<<,>>>: |