Debian Codegraph @

texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.code.tex

raw
1 %% symbol library for TikZ track schematics
2 %
3 % Copyright (c) 2018 - 2022, Martin Scheidt (ISC license)
4 %
5 % Permission to use, copy, modify, and/or distribute this file for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
6 %
7 \ProvidesFileRCS{tikzlibrarytrackschematic.code.tex}%
8 %
9 \RequirePackage{tikz,etoolbox}%
10 % colors
11 \colorlet{background}{white}
12 \colorlet{foreground}{black}
13 %
14 %%%%%%%%%%%%%%%
15 % loading sublibraries
16 %%%%%%%%%%%%%%%
17 % \usetikzlibrary{trackschematic.topology}%
18 % \usetikzlibrary{trackschematic.trafficcontrol}%
19 % \usetikzlibrary{trackschematic.vehicles}%
20 % \usetikzlibrary{trackschematic.constructions}%
21 % \usetikzlibrary{trackschematic.electrics}%
22 % \usetikzlibrary{trackschematic.measures}%
23 % \usetikzlibrary{trackschematic.symbology}%
24 %%%%%%%%%%%%%%%
25 %% template for new symbol definitions
26 %%%%%%%%%%%%%%%
27 % %
28 % \newcommand\XXXX{}% just for safety
29 % \def\XXXX[#1]#2(#3)#4(#5){% \XXXX[options] at (coord) label (name);
30 % \pic[#1] at (#3) {XXXX={#2/#4/#5}}% symbol
31 % }%
32 % % tikz keys
33 % \pgfkeys{%
34 % /tikz/trackschematic/.is family,%
35 % /tikz/trackschematic//.cd,%
36 % }%
37 % % symbol definition
38 % \tikzset{%
39 % pics/XXXX/.default=,%
40 % pics/XXXX/.style args={#1/#2/#3}{code={%
41 % %% settings
42 % \def\coordcommand{#1}% beware of leading and tailing spaces!
43 % \def\labelcommand{#2}% beware of leading and tailing spaces!
44 % \def\labelcontent{#3}%
45 % %% symbol marker
46 % %
47 % %% label
48 % \ifdefstring{\labelcontent}{}{}{% label NOT empty
49 % \coordinate (label-coord) at (coord);%
50 % \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
51 % \path let \p1=\labelcoord in coordinate (label-coord) at ($(label-coord)+(\x1,\y1)$);%
52 % }%
53 % \node at (label-coord) {\footnotesize \labelcontent};%
54 % }%
55 % }},% END of pics/XXXX/.style args={#1/#2/#3}
56 % % symbology entry
57 % symbology_XXXX/.pic = {%
58 % \maintrack (0,0) -- (6,0);%
59 % \XXXX at (3,0);%
60 % },%
61 % }%
62 % %
63 %%%%%%%%%%%%%%%
64 % anchor are used in converting a symbol to .svg for further import in different tools
65 %%%%%%%%%%%%%%%
66 \newcommand\anchor{}% just for safety
67 \def\anchor#1(#2){% \anchor at (coord);
68 \pic at (#2) {anchor}% symbol
69 }%
70 % symbol definition
71 \tikzset{%
72 anchor/.pic={\fill[magenta] (0,0) circle (0.004);};%
73 }%
74 %
75 %%%%%%%%%%%%%%%
76 \endinput%
77 %