Compare commits

...

19 Commits

Author SHA1 Message Date
Martin Scheidt c369ec7c1b excluding certain commits 2022-06-21 17:29:59 +02:00
Martin Scheidt 752340e0de updated citation 2022-06-21 17:13:13 +02:00
Martin Scheidt 580571ee1e changed Github Action for twitter 2022-06-02 17:59:17 +02:00
kaat0 b8a251cc53 DOI updated to v0.7.1 (via github action) 2022-06-02 15:53:57 +00:00
Martin Scheidt 5c2ca786c7 updated ctan-o-mat, git push, and twitter 2022-06-02 17:49:14 +02:00
Martin Scheidt 71b341934f Debugging Github Actions is my new hobby! 2022-06-02 17:07:23 +02:00
Martin Scheidt 43879c3b58 updated to new zenodraft options 2022-06-02 13:01:46 +02:00
Martin Scheidt 134edca0b1 fix wrong branch in github action 2022-06-01 15:28:56 +02:00
Martin Scheidt 1c41e85629 handeling color background and foreground with native xcolor alias "\colorlet{}{}" instead of pgf macro 2022-06-01 14:50:32 +02:00
Martin Scheidt 4e9f5ea052 updated checkout action 2022-04-18 18:03:18 +02:00
Martin Scheidt cc95bf8a15 add Twitter to release action 2022-04-16 21:13:16 +02:00
Martin Scheidt 57773951d3 removed trailing "v" for zenodo upload 2022-04-15 14:58:42 +02:00
Martin Scheidt de9ed8ca40 added zenodo's RailToolKit community 2022-04-15 14:20:02 +02:00
Martin Scheidt 95e8544139 Minor fix for Release-Notes with only one entry 2022-04-15 13:39:43 +02:00
Martin Scheidt 88de19e39c fixed typo 2022-04-09 06:55:06 +02:00
Martin Scheidt 10feea7259 small amendments in naming 2022-04-07 10:27:45 +02:00
Martin Scheidt a8a050b184 amended GitHub action release 2022-04-06 17:16:28 +02:00
Martin Scheidt 51d25db670 corrected DOI in manual 2022-04-06 17:15:40 +02:00
Martin Scheidt 48794dd20c updated DOI 2022-04-06 16:50:15 +02:00
27 changed files with 320 additions and 323 deletions

View File

@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Validate a CITATION.cff from a subdirectory
uses: citation-file-format/cffconvert-github-action@2.0.0

View File

@ -12,42 +12,8 @@ on:
## A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
create_package:
name: "create a TeX Live package"
runs-on: ubuntu-latest
steps:
# checkout the repo
- name: "checkout"
uses: actions/checkout@v2
# create package and release notes
- name: "create tikz-trackschematic package"
run: ./build.sh --non-interactive --release v0.7.0
# upload artifact two share it with other jobs
- uses: actions/upload-artifact@v3
with:
path: tikz-trackschematic-v0.7.0.zip
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
- uses: actions/upload-artifact@v3
with:
path: release-note-v0.7.0.md
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
- uses: actions/upload-artifact@v3
with:
path: .github/tex/tikz-trackschematic.pkg
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
- uses: actions/upload-artifact@v3
with:
path: .github/zenodo/metadata.json
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
# This workflow contains a single job called "build"
debug:
needs: create_package
# needs: create_package
# The type of runner that the job will run on
runs-on: ubuntu-latest
@ -55,10 +21,10 @@ jobs:
steps:
- name: "checkout"
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
uses: actions/checkout@v2
uses: actions/checkout@v3
# download artifact in folder artifact/
- uses: actions/download-artifact@v3
# # download artifact in folder artifact/
# - uses: actions/download-artifact@v3
# - name: "install ghostscript"
# run: sudo apt-get install -y ghostscript
@ -82,11 +48,12 @@ jobs:
# with:
# package-file: .github/tex/packages.test.txt
# ##
# - name: "setup TeX Live (via paolobrasolin)"
# uses: paolobrasolin/setup-texlive-action@v1
- name: "setup TeX Live (via paolobrasolin)"
uses: paolobrasolin/setup-texlive-action@v1
# with:
# profile-path: ${{ github.workspace }}/.github/tex/profile.minimal.txt
# packages-path: ${{ github.workspace }}/.github/tex/packages.doc.txt
- run: tlmgr install ctan-o-mat
# - name: "install tikz-trackschematic"
# run: ./build.sh --non-interactive --install-dev
@ -108,7 +75,7 @@ jobs:
## opening a debug console
- name: Setup upterm session
env:
# ZENODO_ACCESS_TOKEN: ${{ secrets.ZENODO_ACCESS_TOKEN }}
ZENODO_ACCESS_TOKEN: ${{ secrets.ZENODO_ACCESS_TOKEN }}
ZENODO_SANDBOX_ACCESS_TOKEN: ${{ secrets.ZENODO_SANDBOX_ACCESS_TOKEN }}
uses: lhotari/action-upterm@v1
with:

View File

@ -27,7 +27,7 @@ jobs:
# 2. checkout the repo
- name: "checkout"
uses: actions/checkout@v2
uses: actions/checkout@v3
# 3. install TeX Live
- name: "install ghostscript"
@ -111,14 +111,12 @@ jobs:
# 1. download artifact in folder artifact/ and move it one level up
- uses: actions/download-artifact@v3
- run: |
mv ./artifact/tikz-trackschematic-*.zip ./
mv ./artifact/tikz-trackschematic-${{needs.create_package.outputs.version}}.zip ./
# 2. install ctan-o-mat
- name: "setup TeX Live (via paolobrasolin)"
uses: paolobrasolin/setup-texlive-action@v1
with:
profile-path: ${{ github.workspace }}/.github/tex/profile.minimal.txt
packages-path: ${{ github.workspace }}/.github/tex/packages.upload.txt
- run: tlmgr install ctan-o-mat
# 3. upload new release to CTAN
- name: CTAN submit
@ -134,7 +132,7 @@ jobs:
# 1. download artifact in folder artifact/ and move it one level up
- uses: actions/download-artifact@v3
- run: |
mv ./artifact/tikz-trackschematic-*.zip ./
mv ./artifact/tikz-trackschematic-${{needs.create_package.outputs.version}}.zip ./
# 2. install zenodraft
- name: "install zenodraft"
@ -147,29 +145,45 @@ jobs:
ZENODO_ACCESS_TOKEN: ${{ secrets.ZENODO_ACCESS_TOKEN }}
COLLECTION: 5539844
run: |
ID=$(zenodraft deposition create in-existing-collection $COLLECTION)
ID=$(zenodraft deposition create version $COLLECTION)
zenodraft file add $ID tikz-trackschematic-*.zip
zenodraft metadata update $ID artifact/metadata.json
zenodraft deposition publish $ID
echo "::set-output name=doi::$(zenodraft deposition show prereserved $ID)"
update_citation:
needs: publish_zenodo
name: "updates CITATION.cff"
needs: [create_package, publish_zenodo]
name: "updating CITATION.cff"
runs-on: ubuntu-latest
steps:
# 1. checkout the repo for zenodraft/action@0.10.0 to work
# 1. checkout the repo
- name: "checkout"
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
# 2. update CITATION.cff
- run: ./build.sh --update-cite ${{needs.publish_zenodo.outputs.doi}}
# 3. push the change back to master
- name: push
uses: github-actions-x/commit@v2.8
uses: stefanzweifel/git-auto-commit-action@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: 'master'
force-add: 'true'
files: CITATION.cff
commit-message: 'updated DOI (via github action)'
rebase: 'true' # pull and rebase before commit
commit_message: "DOI updated to ${{needs.create_package.outputs.version}} (via github action)"
branch: master
file_pattern: CITATION.cff
commit_user_name: railtoolkit
commit_user_email: railtoolkit@ownx.net
publish_twitter:
needs: [create_package, publish_zenodo]
name: "tweet about it!"
runs-on: ubuntu-latest
steps:
- uses: devigned/go-twitter-action@v1
with:
message: "The version ${{needs.create_package.outputs.version}} of TikZ-trackschematic is available! DOI: https://doi.org/${{needs.publish_zenodo.outputs.doi}}"
apiKey: ${{ secrets.TWITTER_API_KEY }}
apiKeySecret: ${{ secrets.TWITTER_API_SECRET }}
accessToken: ${{ secrets.TWITTER_ACCESS_TOKEN }}
accessTokenSecret: ${{ secrets.TWITTER_ACCESS_SECRET }}

View File

@ -5,10 +5,34 @@ name: "continuous integration test"
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
pull_request:
branches: [ master ]
push:
branches: [ master ]
paths-ignore:
- 'CHANGELOG.md'
- 'CITATION.cff'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
- 'README.md'
- '.github/workflows/cffvalidation.yaml'
- '.github/workflows/debug.yaml'
- '.github/workflows/release.yaml'
- '.github/workflows/zenodo.yaml'
- '.github/zenodo/*'
pull_request:
branches: [ master ]
paths-ignore:
- 'CHANGELOG.md'
- 'CITATION.cff'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
- 'README.md'
- '.github/workflows/cffvalidation.yaml'
- '.github/workflows/debug.yaml'
- '.github/workflows/release.yaml'
- '.github/workflows/zenodo.yaml'
- '.github/zenodo/*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
@ -24,7 +48,7 @@ jobs:
steps:
- name: "checkout"
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: "install ghostscript"
run: sudo apt-get install -y ghostscript

View File

@ -22,7 +22,7 @@ jobs:
# checkout the repo
- name: "checkout"
uses: actions/checkout@v2
uses: actions/checkout@v3
# create package and release notes
- name: "create tikz-trackschematic package"
@ -51,7 +51,7 @@ jobs:
# steps:
# # checkout the repo
# - name: "checkout"
# uses: actions/checkout@v2
# uses: actions/checkout@v3
# # download artifact in folder artifact/
# - uses: actions/download-artifact@v3
@ -110,7 +110,7 @@ jobs:
steps:
# 1. checkout the repo for zenodraft/action@0.10.0 to work
- name: "checkout"
uses: actions/checkout@v2
uses: actions/checkout@v3
- run: ./build.sh --update-cite ${{needs.publish_zenodo.outputs.doi}}
@ -118,7 +118,7 @@ jobs:
uses: github-actions-x/commit@v2.8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: 'github-action'
push-branch: 'master'
force-add: 'true'
files: CITATION.cff
commit-message: 'updated DOI (via github action)'

View File

@ -23,5 +23,10 @@
},
"language": "eng",
"access_right": "open",
"upload_type": "software"
"upload_type": "software",
"communities": [
{
"identifier": "railtoolkit"
}
]
}

View File

@ -1,4 +1,5 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
@ -8,10 +9,18 @@ Categories: Added, Changed, Deprecated, Removed, Fixed, and Security.
## [Unreleased]
### Added
### Todo
* i18n option
## Version [0.7.1] - 2022-06-02
### Changed
* handeling color background and foreground with native xcolor alias "\colorlet{}{}" instead of pgf macro
## Version [0.7.0] - 2022-04-02
### Added
@ -31,6 +40,7 @@ Categories: Added, Changed, Deprecated, Removed, Fixed, and Security.
* foreground of sidetrack (alias)
* PackageWarning Error in development mode
## Version [0.6.3] - 2022-02-15
### Added
@ -149,7 +159,8 @@ Categories: Added, Changed, Deprecated, Removed, Fixed, and Security.
Basic concept of a library with railway topology symbols and some examples.
[Unreleased]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.7.0...master
[Unreleased]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.7.1...master
[0.7.1]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.7.0...v0.7.1
[0.7.0]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.6.3...v0.7.0
[0.6.3]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.6.2...v0.6.3
[0.6.2]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.6.1...v0.6.2

View File

@ -4,7 +4,7 @@
---
cff-version: 1.2.0
title: tikz-trackschematic
message: 'If you use this software, please cite it using these metadata.'
message: 'If you use this software, please cite both the proceedings from preferred-citation and the software itself.'
type: software
authors:
- given-names: Martin
@ -17,28 +17,41 @@ identifiers:
value: 10.5281/zenodo.5539844
description: 'Collection of archived snapshots of all versions of the library'
- type: doi
value: 10.5281/zenodo.6222186
value: 10.5281/zenodo.6607601
description: Current version
url: 'https://www.railtoolkit.org/projects/tikz-trackschematic/'
repository: 'https://github.com/railtoolkit/tikz-trackschematic'
repository-code: 'https://repository.ivev.bau.tu-bs.de/martin/tikz-trackschematic'
repository-artifact: 'https://ctan.org/pkg/tikz-trackschematic'
url: https://www.railtoolkit.org/projects/tikz-trackschematic
repository: https://github.com/railtoolkit/tikz-trackschematic
repository-code: https://repository.ivev.bau.tu-bs.de/martin/tikz-trackschematic
repository-artifact: https://ctan.org/pkg/tikz-trackschematic
abstract: >-
A TikZ library for creating track diagrams inz
'A TikZ library for creating track diagrams in
railways. The tikz-trackschematic library is a
toolbox of symbols geared primarily towards
creating track schematic for either research or
educational purposes. It provides a TikZ frontend
to some of the symbols which maybe needed to
describe situations and layouts in railway
operation.
operation.'
keywords:
- tex
- tikz
- symbology
- railway
- railroad
- tracks
- schematics
- operational scenarios
- graphical description
license: ISC
version: v0.6.3
date-released: 2022-02-15
version: v0.7.1
date-released: 2022-06-02
preferred-citation:
authors:
- family-names: Scheidt
given-names: Martin
orcid: https://orcid.org/0000-0002-9384-8945
- family-names: Pachl
given-names: Jörn
doi: 10.24355/dbbs.084-202204140847-0
title: 'TikZ-trackschematic library: a symbology towards a universal graphical description for operational scenarios in railway research'
type: proceedings
year: 2022
publisher:
name: "RailBeijing 2021 - the 9th International Conference on Railway Operations Modelling and Analysis (ICROMA). 3.-7. November , 2021"

View File

@ -1,6 +1,6 @@
# TikZ-trackschematic
[![License: ISC](https://img.shields.io/badge/license-ISC-green.svg)](https://opensource.org/licenses/ISC) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5539844.svg)](https://doi.org/10.5281/zenodo.5539844) [![continuous integration test](https://github.com/railtoolkit/tikz-trackschematic/actions/workflows/testing.yml/badge.svg)](https://github.com/railtoolkit/tikz-trackschematic/actions/workflows/testing.yml)
[![License: ISC](https://img.shields.io/badge/license-ISC-green.svg)](https://opensource.org/licenses/ISC) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5539844.svg)](https://doi.org/10.5281/zenodo.5539844) [![CI test](https://github.com/railtoolkit/tikz-trackschematic/actions/workflows/testing.yaml/badge.svg)](https://github.com/railtoolkit/tikz-trackschematic/actions/workflows/testing.yaml)
------------

View File

@ -593,7 +593,7 @@ create_release_notes() {
# determine beginning and end in CHANGELOG.md
TOP=$(grep -n "Version \[$VERSION_NUM\]" CHANGELOG.md | cut -d: -f1)
awk "NR>$TOP" CHANGELOG.md > release-note.tmp.md
BOTTOM=$(grep -n -m 1 "## Version" release-note.tmp.md | cut -d: -f1)
BOTTOM=$(grep -n -m 1 "## Version\|[Unreleased]:" release-note.tmp.md | cut -d: -f1)
BOTTOM=$(( $TOP + $BOTTOM ))
BOTTOM=$(( $BOTTOM - 2 ))
TOP=$(( $TOP + 1 ))
@ -618,7 +618,7 @@ create_ctan_configuration() {
create_zenodo_metadata() {
# modify the file .github/zenodo/metadata.json for zenodo upload
# 1. replace "version": "%%[SCRIPT]"
sed -i".backup" -e"s/\"version\": \"%%\[SCRIPT\]\"/\"version\": \"$VERSION_STR\"/g" .github/zenodo/metadata.json
sed -i".backup" -e"s/\"version\": \"%%\[SCRIPT\]\"/\"version\": \"$VERSION_NUM\"/g" .github/zenodo/metadata.json
# 2. replace "publication_date": "%%[SCRIPT]"
sedi "s/\"publication_date\": \"%%\[SCRIPT\]\"/\"publication_date\": \"$DATE\"/g" .github/zenodo/metadata.json

View File

@ -9,7 +9,7 @@
\begin{document}
\begin{tikzpicture}[font=\sffamily]
{ % station names
\tikzset{every node/.style={\foreground!50!\background}};
\tikzset{every node/.style={foreground!50!background}};
\node[right,align=left] at ( 2,1.3) {to and from\\ Arnau};
\node at (21,3.3) {{\LARGE Bf Berg}};
\node[left,align=right] at (38,1.3) {to and from\\ Chamstadt};

View File

@ -9,7 +9,7 @@
\begin{document}
\begin{tikzpicture}[font=\sffamily]
{ % station names
\tikzset{every node/.style={\foreground!50!\background}};
\tikzset{every node/.style={foreground!50!background}};
\node[right,align=left] at ( 5,1.3) {to and from\\ Berg};
\node at (21,3.9) {{\LARGE Bf Chamstadt}};
\node[left,align=right] at (37.5,1.3) {to and from\\ Dornroda};

Binary file not shown.

View File

@ -60,7 +60,7 @@
This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No. 826347.
If you want to cite this project please use the follwoing informations:\\
Scheidt, M. (2021). TikZ-trackschematics (Version \vhCurrentVersion) DOI: 10.5281/zenodo.5539845
Scheidt, M. (2021). TikZ-trackschematics (Version \vhCurrentVersion) DOI: 10.5281/zenodo.5539844
\subsection{Requirements}\label{sec:require}
@ -262,8 +262,8 @@
\subsection{Colors: background and foreground}\label{sec:colors}
The two main colors \texttt{white} and \texttt{black} are set for the \texttt{background} and \texttt{foreground} keys by default.
If you want to change them, provide a new value for the keys.
The two main colors \texttt{background} and \texttt{foreground} are set as an alias to \texttt{white} and \texttt{black} by default.
If you want to change them, override them by defining a new alias.
For example like this:\\
\begin{minipage}[c]{0.65\textwidth}
\begin{lstlisting}[gobble=8]
@ -271,12 +271,13 @@
% load the library
\usepackage{tikz-trackschematic}
% set the colors
\colorlet{background}{lightgray}
\colorlet{foreground}{violet}
\begin{document}
\begin{tikzpicture}
% set the colors
\tikzset{background=lightgray,foreground=violet}
\maintrack (0,0) -- (6,0);
\train[forward] at (5,0) label (grey train);
\end{tikzpicture}
@ -286,7 +287,8 @@
\hfil
\begin{minipage}[c]{0.34\textwidth}
\begin{tikzpicture}
\tikzset{background=lightgray,foreground=violet}
\colorlet{background}{lightgray}
\colorlet{foreground}{violet}
\path (-0.2,-1.6) rectangle (5.2,1.6);
\coordinate (A) at (0 ,0);
\coordinate (T) at (4.5,0);

View File

@ -39,4 +39,7 @@
\vhEntry{0.7.0}{2022-04-02}{MS|GW}{
revised symbol and syntax for balises; replaced "\textbackslash gettikzxy" with "\textbackslash path let" syntax; fixed PackageWarning Error in development mode; fixed foreground of sidetrack (alias)
}
\vhEntry{0.7.1}{2022-06-02}{MS}{
handeling color background and foreground with native xcolor alias "\textbackslash colorlet{}{}" instead of pgf macro
}
\end{versionhistory}

View File

@ -15,6 +15,9 @@
\DeclareOptionX{dev}[\settoggle{development}{false}]{\settoggle{development}{true}}
\ProcessOptionsX
%
% colors
\colorlet{background}{white}
\colorlet{foreground}{black}
\iftoggle{development}{%
\PackageInfo{tikz-trackschematic}{development mode}%

View File

@ -7,6 +7,9 @@
\ProvidesFileRCS{tikzlibrarytrackschematic.code.tex}%
%
\RequirePackage{tikz,etoolbox}%
% colors
\colorlet{background}{white}
\colorlet{foreground}{black}
%
%%%%%%%%%%%%%%%
% loading sublibraries

View File

@ -23,14 +23,6 @@
\pgfkeys{%
/tikz/trackschematic/.is family,%
/tikz/trackschematic/.cd,%
%% color foreground
foreground/.store in=\foreground,%
foreground=black,% DEFAULT
/tikz/foreground/.forward to=/tikz/trackschematic/foreground,%
%% color background
background/.store in=\background,%
background=white,% DEFAULT
/tikz/background/.forward to=/tikz/trackschematic/background,%
%% length
length/.store in=\objectlength,% default length 4cm
/tikz/length/.forward to=/tikz/trackschematic/length,%
@ -84,7 +76,7 @@
}%
}% end \ifdefstring{\side}
%% platform shape
\tikzset{every path/.style={draw=\foreground,line width=0.75pt}};%
\tikzset{every path/.style={draw=foreground,line width=0.75pt}};%
\ifdefstring{\side}{both}{% double side
\path ($-0.5*(\objectlength,0) + (0, \objectwidth)$) --%
($-0.5*(\objectlength,0) + (0, 0.2)$) --%
@ -159,7 +151,7 @@
}%
}% end \ifdefstring{\trafficpractice}
%% symbol
\tikzset{every path/.style={draw=\foreground,line width=1pt}};%
\tikzset{every path/.style={draw=foreground,line width=1pt}};%
\iftoggle{show_road}{% true
\path ($0.5*(-\roadwidth,0) + (0,-0.1)$) --%
++($(0,-\objectwidth)$);% road part 1
@ -172,18 +164,18 @@
}{}% END \iftoggle{show_road}
\ifdefstring{\barrier}{full}{% full barrier
\ifdefstring{\side}{both}{%
\filldraw[\foreground]% left barrier part 1
\filldraw[foreground]% left barrier part 1
($(-0.5\roadwidth,0)+(-0.2,0)+(0,0.35)$) circle (0.05);%
\filldraw[\foreground]% left barrier part 2
\filldraw[foreground]% left barrier part 2
($( 0.5\roadwidth,0)+( 0.2,0)+(0,0.35)$) circle (0.05);%
\path ($(-0.5\roadwidth,0)+(-0.2,0)+(0,0.35)$) --%
++($( 0.45\roadwidth,0)+( 0.2,0)$);% left barrier part 3
\path ($( 0.5\roadwidth,0)+( 0.2,0)+(0,0.35)$) --%
++($(-0.45\roadwidth,0)+(-0.2,0)$);% left barrier part 4
%
\filldraw[\foreground]% right barrier part 1
\filldraw[foreground]% right barrier part 1
($( 0.5\roadwidth,0)+( 0.2,0)+(0,-0.35)$) circle (0.05);%
\filldraw[\foreground]% right barrier part 2
\filldraw[foreground]% right barrier part 2
($(-0.5\roadwidth,0)+(-0.2,0)+(0,-0.35)$) circle (0.05);%
\path ($( 0.5\roadwidth,0)+( 0.2,0)+(0,-0.35)$) --%
++($(-0.45\roadwidth,0)+(-0.2,0)$);% right barrier part 3
@ -191,9 +183,9 @@
++($( 0.45\roadwidth,0)+( 0.2,0)$);% right barrier part 4
}{%
\ifdefstring{\side}{left}{%
\filldraw[\foreground]% left barrier part 1
\filldraw[foreground]% left barrier part 1
($(-0.5\roadwidth,0)+(-0.2,0)+(0,0.35)$) circle (0.05);%
\filldraw[\foreground]% left barrier part 2
\filldraw[foreground]% left barrier part 2
($( 0.5\roadwidth,0)+( 0.2,0)+(0,0.35)$) circle (0.05);%
\path ($(-0.5\roadwidth,0)+(-0.2,0)+(0,0.35)$) --%
++($( 0.45\roadwidth,0)+( 0.2,0)$);% left barrier part 3
@ -201,9 +193,9 @@
++($(-0.45\roadwidth,0)+(-0.2,0)$);% left barrier part 4
}{%
\ifdefstring{\side}{right}{%
\filldraw[\foreground]% right barrier part 1
\filldraw[foreground]% right barrier part 1
($( 0.5\roadwidth,0)+( 0.2,0)+(0,-0.35)$) circle (0.05);%
\filldraw[\foreground]% right barrier part 2
\filldraw[foreground]% right barrier part 2
($(-0.5\roadwidth,0)+(-0.2,0)+(0,-0.35)$) circle (0.05);%
\path ($( 0.5\roadwidth,0)+( 0.2,0)+(0,-0.35)$) --%
++($(-0.45\roadwidth,0)+(-0.2,0)$);% right barrier part 3
@ -217,24 +209,24 @@
}{%
\ifdefstring{\barrier}{semi}{% semi barrier
\ifdefstring{\side}{both}{%
\filldraw[\foreground]% left barrier part 1
\filldraw[foreground]% left barrier part 1
($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)+(0,0.35)$) circle (0.05);%
\path ($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)+(0,0.35)$) --%
++($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)$);% left barrier part 2
%
\filldraw[\foreground]% right barrier part 1
\filldraw[foreground]% right barrier part 1
($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)+(0,-0.35)$) circle (0.05);%
\path ($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)+(0,-0.35)$) --%
++($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)$);% right barrier part 2
}{%
\ifdefstring{\side}{left}{%
\filldraw[\foreground]% left barrier part 1
\filldraw[foreground]% left barrier part 1
($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)+(0,0.35)$) circle (0.05);%
\path ($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)+(0,0.35)$) --%
++($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)$);% left barrier part 2
}{%
\ifdefstring{\side}{right}{%
\filldraw[\foreground]% right barrier part 1
\filldraw[foreground]% right barrier part 1
($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)+(0,-0.35)$) circle (0.05);%
\path ($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)+(0,-0.35)$) --%
++($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)$);% right barrier part 2
@ -292,11 +284,11 @@
\def\coordcommand{#1} % beware of leading and tailing spaces!
%% symbol
\iftoggle{show_background}{% true
\fill[\background]%
\fill[background]%
($(-0.5\objectlength,\objectwidth)+(0,-0.1)$) rectangle%
($(0.5\objectlength,-\objectwidth)+(0,0.1)$);%
}{}%
\tikzset{every path/.style={draw=\foreground,line width=0.75pt}};%
\tikzset{every path/.style={draw=foreground,line width=0.75pt}};%
\ifdefstring{\side}{both}{%
\path ($-0.5*(\objectlength,0)+(-0.1,0)+(\shiftleft,\objectwidth)$) --%
++($(0.1,-0.1)$) --%
@ -352,10 +344,10 @@
%% settings
\def\coordcommand{#1} % beware of leading and tailing spaces!
%% symbol
\tikzset{every path/.style={draw=\foreground,line width=1pt}};%
\tikzset{every path/.style={draw=foreground,line width=1pt}};%
\path (-0.6,-0.4 ) rectangle ++(1.2,0.8); % building
\path[fill=\foreground] (-0.5,-0.3 ) rectangle ++(1.0,0.2); % table
\path[fill=\foreground] ( 0 , 0.15) circle (0.15); % human dot
\path[fill=foreground] (-0.5,-0.3 ) rectangle ++(1.0,0.2); % table
\path[fill=foreground] ( 0 , 0.15) circle (0.15); % human dot
}},% END pics/interlocking/.style args={#1}
% symbology entry
symbology_interlocking/.pic = {
@ -384,7 +376,7 @@
%% settings
\def\coordcommand{#1} % beware of leading and tailing spaces!
%% symbol
\tikzset{every path/.style={draw=\foreground,line width=0.75pt}};%
\tikzset{every path/.style={draw=foreground,line width=0.75pt}};%
% left side
\path (-0.3, 0.1) -- ++(0,0.05);
\path (-0.2, 0.1) -- ++(0,0.15);
@ -439,7 +431,7 @@
}%
}% end \ifdefstring{\side}
%% pylon shape
\tikzset{every path/.style={draw=\foreground,line width=0.5pt}};%
\tikzset{every path/.style={draw=foreground,line width=0.5pt}};%
\ifdefstring{\side}{both}{% double side
\path (0,-0.5) circle [radius=0.075];% part 1
\path (0, 0.5) circle [radius=0.075];% part 2

View File

@ -19,14 +19,6 @@
\pgfkeys{%
/tikz/trackschematic/.is family,%
/tikz/trackschematic/.cd,%
%% color foreground
foreground/.store in=\foreground,%
foreground=black,% DEFAULT
/tikz/foreground/.forward to=/tikz/trackschematic/foreground,%
%% color background
background/.store in=\background,%
background=white,% DEFAULT
/tikz/background/.forward to=/tikz/trackschematic/background,%
%% face
face/.value required,% forward, backward OR bidirectional
face/.store in=\face,% forward, backward OR bidirectional
@ -99,20 +91,20 @@
}% end \ifdefstring{\face}
%
%% signal pole
\path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
\path[draw=foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
%% signal marker
\path[draw=\foreground,line width=0.1pt,double=\background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
\path[draw=foreground,line width=0.1pt,double=background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign
\path[fill=\background]%
\path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.45,0)$) rectangle%
++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*(-0.1,0)$)%
($\trafficfactor*\facefactor*(0,-0.5) + \facefactor*( 0.45,0)$) rectangle%
++($\trafficfactor*\facefactor*(0, 0.05) + \facefactor*(-0.1,0)$);% symbol
%% label
\tikzset{every node/.style={text=\foreground,inner sep=1pt}};%
\tikzset{every node/.style={text=foreground,inner sep=1pt}};%
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
@ -171,14 +163,14 @@
}% end \ifdefstring{\face}
%
%% signal pole
\path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
\path[draw=foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
%% signal marker
\path[draw=\foreground,line width=0.1pt,double=\background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
\path[draw=foreground,line width=0.1pt,double=background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign
\path[fill=\background]%
\path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.5,0)$) rectangle%
++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*(-0.1,0)$)%
($\trafficfactor*\facefactor*(0,-0.5) + \facefactor*( 0.5,0)$) rectangle%
@ -186,7 +178,7 @@
($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.3,0)$) rectangle%
++($\trafficfactor*\facefactor*(0,-0.2) + \facefactor*( 0.05,0)$);% symbol
%% label
\tikzset{every node/.style={text=\foreground,inner sep=1pt}};%
\tikzset{every node/.style={text=foreground,inner sep=1pt}};%
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
@ -245,23 +237,23 @@
}% end \ifdefstring{\face}
%
%% signal pole
\path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
\path[draw=foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
%% signal marker
\path[draw=\foreground,line width=0.1pt,double=\background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
\path[draw=foreground,line width=0.1pt,double=background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign
\path[fill=\background]%
\path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.475,0)$) rectangle%
++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*(-0.11,0)$)%
($\trafficfactor*\facefactor*(0,-0.5) + \facefactor*( 0.475,0)$) rectangle%
++($\trafficfactor*\facefactor*(0, 0.05) + \facefactor*(-0.11,0)$);% symbol part1
\path[fill=\background]%
\path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.325,0)$) rectangle%
++($\trafficfactor*\facefactor*(0,-0.2) + \facefactor*( 0.05,0)$);% symbol part2
%% label
\tikzset{every node/.style={text=\foreground,inner sep=1pt}};%
\tikzset{every node/.style={text=foreground,inner sep=1pt}};%
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
@ -320,14 +312,14 @@
}% end \ifdefstring{\face}
%
%% signal pole
\path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
\path[draw=foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
%% signal marker
\path[draw=\foreground,line width=0.1pt,double=\background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
\path[draw=foreground,line width=0.1pt,double=background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign
\path[fill=\background]%
\path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.23) + \facefactor*( 0.35,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.2)$) -- ++($\facefactor*(-0.05,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.15)$) -- cycle%
@ -335,7 +327,7 @@
++($\trafficfactor*\facefactor*(0, 0.2)$) -- ++($\facefactor*(0.05,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.15)$) -- cycle;% symbol
%% label
\tikzset{every node/.style={text=\foreground,inner sep=1pt}};%
\tikzset{every node/.style={text=foreground,inner sep=1pt}};%
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
@ -395,14 +387,14 @@
}% end \ifdefstring{\face}
%
%% signal pole
\path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
\path[draw=foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
%% signal marker
\path[draw=\foreground,line width=0.1pt,double=\background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
\path[draw=foreground,line width=0.1pt,double=background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign
\path[fill=\background]%
\path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.18) + \facefactor*( 0.4 ,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.03) + \facefactor*( 0.03,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.38)$) --%
@ -410,7 +402,7 @@
++($\trafficfactor*\facefactor*(0, 0.03) + \facefactor*(-0.03,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.38)$) -- cycle;% symbol
%% label
\tikzset{every node/.style={text=\foreground,inner sep=1pt}};%
\tikzset{every node/.style={text=foreground,inner sep=1pt}};%
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
@ -470,14 +462,14 @@
}% end \ifdefstring{\face}
%
%% signal pole
\path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
\path[draw=foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
%% signal marker
\path[draw=\foreground,line width=0.1pt,double=\background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
\path[draw=foreground,line width=0.1pt,double=background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign
\path[fill=\background]%
\path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.4 ) + \facefactor*( 0.62,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.03) + \facefactor*(-0.03,0)$) --%
++($\facefactor*(-0.38,0)$) --%
@ -485,7 +477,7 @@
++($\trafficfactor*\facefactor*(0, 0.03) + \facefactor*( 0.03,0)$) --%
++($\facefactor*( 0.38,0)$) -- cycle;% symbol
%% label
\tikzset{every node/.style={text=\foreground,inner sep=1pt}};%
\tikzset{every node/.style={text=foreground,inner sep=1pt}};%
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
@ -545,14 +537,14 @@
}% end \ifdefstring{\face}
%
%% signal pole
\path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
\path[draw=foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
%% signal marker
\path[draw=\foreground,line width=0.1pt,double=\background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
\path[draw=foreground,line width=0.1pt,double=background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign
\path[fill=\background]%
\path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.4 ,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*(-0.15,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.15,0)$) --%
@ -562,13 +554,13 @@
++($\trafficfactor*\facefactor*(0,-0.1 ) + \facefactor*(-0.1 ,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.1 ) + \facefactor*( 0.1 ,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.1 ) + \facefactor*( 0.1 ,0)$) -- cycle;% symbol
\path[fill=\background]%
\path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.35) + \facefactor*( 0.4 ,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*(-0.05,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*( 0.05,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.05) + \facefactor*( 0.05,0)$) -- cycle;% symbol
%% label
\tikzset{every node/.style={text=\foreground,inner sep=1pt}};%
\tikzset{every node/.style={text=foreground,inner sep=1pt}};%
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default

View File

@ -23,14 +23,6 @@
\pgfkeys{%
/tikz/trackschematic/.is family,%
/tikz/trackschematic/.cd,%
%% color foreground
foreground/.store in=\foreground,%
foreground=black,% DEFAULT
/tikz/foreground/.forward to=/tikz/trackschematic/foreground,%
%% color background
background/.store in=\background,%
background=white,% DEFAULT
/tikz/background/.forward to=/tikz/trackschematic/background,%
%% face
face/.value required,% forward, backward OR bidirectional
face/.store in=\face,% forward, backward OR bidirectional
@ -59,7 +51,7 @@
/tikz/trackschematic/measures/.cd,%
%% color hectometer
color/.store in=\hectometercolor,%
color=\foreground!50!\background,% DEFAULT
color=foreground!50!background,% DEFAULT
/tikz/hectometer color/.forward to=/tikz/trackschematic/measures/color,%
}%
%%%%%%%%%%%%%%%%
@ -104,7 +96,7 @@
}%
}% end \ifdefstring{\trafficpractice}
%
\tikzset{every path/.style={draw=\foreground,line width=0.75pt,line cap=round,dash pattern=on 0pt off 2.4\pgflinewidth}};%
\tikzset{every path/.style={draw=foreground,line width=0.75pt,line cap=round,dash pattern=on 0pt off 2.4\pgflinewidth}};%
\path% berth shape forward
($-0.5*(\objectlength,0) + (-0.05,0) + \trafficfactor*\facefactor*(0,-0.25)$) --%
($-0.5*(\objectlength,0) + (-0.05,0) + \trafficfactor*\facefactor*(0,-0.35)$)%
@ -112,10 +104,10 @@
($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.35)$)%
($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.25)$) --%
($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.35)$);% berth shape forward
\path[draw=none,fill=\foreground]% arrow front
\path[draw=none,fill=foreground]% arrow front
($\facefactor*0.5*(\objectlength,0) + \facefactor*(-0.1,0) + \trafficfactor*\facefactor*(0,-0.35)$) --%
++($(0,-0.04) + \facefactor*(-0.1,0)$) -- ++(0,0.08) -- cycle;% arrow
\path[draw=none,fill=\foreground]% arrow back
\path[draw=none,fill=foreground]% arrow back
($\facefactor*-0.5*(\objectlength,0) + \facefactor*(0.2,0) + \trafficfactor*\facefactor*(0,-0.35)$) --%
++($(0,-0.04) + \facefactor*(-0.1,0)$) -- ++(0,0.08) -- cycle;% arrow
\ifdefstring{\face}{bidirectional}{% bidirectional
@ -127,19 +119,19 @@
($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.35)$)%
($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.25)$) --%
($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.35)$);% berth shape forward
\path[draw=none,fill=\foreground]% arrow front
\path[draw=none,fill=foreground]% arrow front
($\facefactor*0.5*(\objectlength,0) + \facefactor*(-0.1,0) + \trafficfactor*\facefactor*(0,-0.35)$) --%
++($(0,-0.04) + \facefactor*(-0.1,0)$) -- ++(0,0.08) -- cycle;% arrow
\path[draw=none,fill=\foreground]% arrow back
\path[draw=none,fill=foreground]% arrow back
($\facefactor*-0.5*(\objectlength,0) + \facefactor*(0.2,0) + \trafficfactor*\facefactor*(0,-0.35)$) --%
++($(0,-0.04) + \facefactor*(-0.1,0)$) -- ++(0,0.08) -- cycle;% arrow
}{}%
%% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\node[fill=\background,text=\foreground,inner sep=1pt] at ($\facefactor*(0,-0.35)$) {\tiny \labelcontent};%
\node[fill=background,text=foreground,inner sep=1pt] at ($\facefactor*(0,-0.35)$) {\tiny \labelcontent};%
\ifdefstring{\face}{bidirectional}{% bidirectional
\pgfmathsetmacro{\facefactor}{1}%
\node[fill=\background,text=\foreground,inner sep=1pt] at ($\facefactor*(0,-0.35)$) {\tiny \labelcontent};%
\node[fill=background,text=foreground,inner sep=1pt] at ($\facefactor*(0,-0.35)$) {\tiny \labelcontent};%
}{}%
}%
}},% END pics/train_berth/.style args={#1/#2/#3}
@ -157,8 +149,8 @@
%% command
\newcommand\trackdistance{}% just for safety
\def\trackdistance#1(#2)#3(#4)#5(#6){% \trackdistance between (coord1) and (coord2) distance (distance);
\path[draw=\background,<->,>={Stealth[\foreground,inset=0pt,angle=50:0.2cm]},shorten <=1pt,shorten >=1pt] (#2) -- (#4)% arrow tips
node[hectometer base=(current bounding box.center),text=\foreground,midway,sloped,rotate=90] {#6};% label
\path[draw=background,<->,>={Stealth[foreground,inset=0pt,angle=50:0.2cm]},shorten <=1pt,shorten >=1pt] (#2) -- (#4)% arrow tips
node[hectometer base=(current bounding box.center),text=foreground,midway,sloped,rotate=90] {#6};% label
}%
% symbology entry
\tikzset{%
@ -230,7 +222,7 @@
(0,0) -- (ts-hm-b1) -- (ts-hm-b2) -- (ts-hm-l);%
%% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\node[font=\sffamily,text=\hectometercolor,rotate=-90,\orientation,align=\align,fill=\background] at (ts-hm-l) {\labelcontent};%
\node[font=\sffamily,text=\hectometercolor,rotate=-90,\orientation,align=\align,fill=background] at (ts-hm-l) {\labelcontent};%
}%
}},% END
% symbology entry

View File

@ -18,14 +18,6 @@
\pgfkeys{%
/tikz/trackschematic/.is family,%
/tikz/trackschematic/.cd,%
%% color foreground
foreground/.store in=\foreground,%
foreground=black,% DEFAULT
/tikz/foreground/.forward to=/tikz/trackschematic/foreground,%
%% color background
background/.store in=\background,%
background=white,% DEFAULT
/tikz/background/.forward to=/tikz/trackschematic/background,%
%% face
face/.value required,% forward OR backward
face/.store in=\face,%
@ -67,11 +59,11 @@
%
% commands
\newcommand\maintrack{}% just for safety
\def\maintrack{\path[draw=\foreground,MainTrack]}% \maintrack (coord1) -- (coord2);
\def\maintrack{\path[draw=foreground,MainTrack]}% \maintrack (coord1) -- (coord2);
\newcommand\secondarytrack{}% just for safety
\def\secondarytrack{\path[draw=\foreground,SecondaryTrack]}% \secondarytrack (coord1) -- (coord2);
\def\secondarytrack{\path[draw=foreground,SecondaryTrack]}% \secondarytrack (coord1) -- (coord2);
\newcommand\sidetrack{}% just for safety
\def\sidetrack{\path[draw=\foreground,SecondaryTrack]}% alias for \secondarytrack
\def\sidetrack{\path[draw=foreground,SecondaryTrack]}% alias for \secondarytrack
%
%% symbol definition
\tikzset{%
@ -109,7 +101,7 @@
\def\labelcontent{#3}
%% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={fill=\background,text=\foreground}};%
\tikzset{every node/.style={fill=background,text=foreground}};%
\coordinate (ts-tl-l) at (0,0);%
\ifdefstring{\labelcoord}{(none)}{% default coord
}{% initialize if NOT default
@ -163,12 +155,12 @@
}% end \ifdefstring{\face}
%% symbol
\ifdefstring{\friction}{none}{% none friction
\path[draw=\foreground, line width=1pt]%
\path[draw=foreground, line width=1pt]%
($\facefactor*(-0.1,0) + (0,0.2)$) -- ++($\facefactor*( 0.1,0)$) -- ++(0,-0.4) -- ++ ($\facefactor*(-0.1,0)$);% bufferstop marker
}{% friction
\path[draw=\foreground, line width=1pt]%
\path[draw=foreground, line width=1pt]%
($\facefactor*(-\friction,0) + \facefactor*(-0.05,0) + (0,0.2)$) -- ++($\facefactor*(0.1,0)$) -- ++(0,-0.4) -- ++ ($\facefactor*(-0.1,0)$);% bufferstop marker
\fill[\foreground] (0,0) circle (0.06);% track closure indicator
\fill[foreground] (0,0) circle (0.06);% track closure indicator
}%
}},% END pics/bufferstop/.style args={#1}
%
@ -200,8 +192,8 @@
%% settings
\def\coordcommand{#1} % beware of leading and tailing spaces!
%%
\fill[\foreground] (0,0) circle (0.06);% track closure indicator
% \path[fill=\foreground] (0.04,0.02) -- (0.04,-0.02) -- (0.02,-0.04) -- (-0.02,-0.04) -- (-0.04,-0.02) -- (-0.04,0.02) -- (-0.02,0.04) -- (0.02,0.04) -- cycle;% label
\fill[foreground] (0,0) circle (0.06);% track closure indicator
% \path[fill=foreground] (0.04,0.02) -- (0.04,-0.02) -- (0.02,-0.04) -- (-0.02,-0.04) -- (-0.04,-0.02) -- (-0.04,0.02) -- (-0.02,0.04) -- (0.02,0.04) -- cycle;% label
}},% END pics/track_closure/.style args={#1}
%
% symbology entry
@ -272,13 +264,13 @@
\def\patterntype{north east lines}%
}%
}%
\path[draw=\foreground,pattern=\patterntype, pattern color=\foreground] (0,0) -- ++($\facefactor*(0.4,0)$) -- ++($\branchfactor*(0,0.4)$) -- cycle;% turnout marker
\path[draw=foreground,pattern=\patterntype, pattern color=foreground] (0,0) -- ++($\facefactor*(0.4,0)$) -- ++($\branchfactor*(0,0.4)$) -- cycle;% turnout marker
}{%
\ifdefstring{\operationmode}{remote}{% operation=remote
\path[fill=\foreground] (0,0) -- ++($\facefactor*(0.4,0)$) -- ++($\branchfactor*(0,0.4)$) -- cycle;% turnout marker
\path[fill=foreground] (0,0) -- ++($\facefactor*(0.4,0)$) -- ++($\branchfactor*(0,0.4)$) -- cycle;% turnout marker
}{%
\ifdefstring{\operationmode}{none}{
\path[draw=\foreground] (0,0) -- ++($\facefactor*(0.4,0)$) -- ++($\branchfactor*(0,0.4)$) -- cycle;% turnout marker
\path[draw=foreground] (0,0) -- ++($\facefactor*(0.4,0)$) -- ++($\branchfactor*(0,0.4)$) -- cycle;% turnout marker
}{%
\pgfkeys{/errors/unknown choice value={/tikz/trackschematic/operation}{“manual“, “remote“ OR “none“ as key required}}%
}%
@ -287,7 +279,7 @@
%
%% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={text=\foreground}};%
\tikzset{every node/.style={text=foreground}};%
\coordinate (ts-y-l) at ($\branchfactor*(0,-8pt)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
\path let \p1=\labelcoord in coordinate (ts-y-l) at ($(ts-y-l)+(\x1,\y1)$);%
@ -297,29 +289,29 @@
%
%% fouling point indicator
\iftoggle{fouling_point}{%
\path[draw=\foreground] ($\facefactor*(0.7,0)$) -- ++($\branchfactor*(0,0.7)$);% fouling point indicator
\path[draw=foreground] ($\facefactor*(0.7,0)$) -- ++($\branchfactor*(0,0.7)$);% fouling point indicator
}{}%
%
%% points
\ifdefstring{\points}{left}{% points left
\ifdefstring{\branch}{left}{%
\path[draw=\foreground,line width=1.5pt] ($\facefactor*(-0.035,0)+(0,0.1)$) -- ++($\facefactor*(0.2,0)+(0,0.2)$);%
\path[draw=foreground,line width=1.5pt] ($\facefactor*(-0.035,0)+(0,0.1)$) -- ++($\facefactor*(0.2,0)+(0,0.2)$);%
}{%
\path[draw=\foreground,line width=1.5pt] ($\facefactor*( 0.035,0)+(0,0.1)$) -- ++($\facefactor*( 0.265,0 )$);%
\path[draw=foreground,line width=1.5pt] ($\facefactor*( 0.035,0)+(0,0.1)$) -- ++($\facefactor*( 0.265,0 )$);%
}%
}{%
\ifdefstring{\points}{right}{% points right
\ifdefstring{\branch}{left}{%
\path[draw=\foreground,line width=1.5pt] ($\facefactor*( 0.035,0)+(0,-0.1)$) -- ++($\facefactor*( 0.265,0 )$);%
\path[draw=foreground,line width=1.5pt] ($\facefactor*( 0.035,0)+(0,-0.1)$) -- ++($\facefactor*( 0.265,0 )$);%
}{%
\path[draw=\foreground,line width=1.5pt] ($\facefactor*(-0.035,0)+(0,-0.1)$) -- ++($\facefactor*(0.2,0)+(0,-0.2)$);%
\path[draw=foreground,line width=1.5pt] ($\facefactor*(-0.035,0)+(0,-0.1)$) -- ++($\facefactor*(0.2,0)+(0,-0.2)$);%
}%
}{%
\ifdefstring{\points}{moving}{% moving points
\fill[\foreground] ($\facefactor*(0.075,0) + \branchfactor*(0,-0.1 )$) circle (0.05);% points indicator left
\fill[\foreground] ($\facefactor*(0.225,0) + \branchfactor*(0,-0.1 )$) circle (0.05);% points indicator left
\fill[\foreground] ($\facefactor*(0.015,0) + \branchfactor*(0, 0.15)$) circle (0.05);% points indicator right
\fill[\foreground] ($\facefactor*(0.115,0) + \branchfactor*(0, 0.25)$) circle (0.05);% points indicator right
\fill[foreground] ($\facefactor*(0.075,0) + \branchfactor*(0,-0.1 )$) circle (0.05);% points indicator left
\fill[foreground] ($\facefactor*(0.225,0) + \branchfactor*(0,-0.1 )$) circle (0.05);% points indicator left
\fill[foreground] ($\facefactor*(0.015,0) + \branchfactor*(0, 0.15)$) circle (0.05);% points indicator right
\fill[foreground] ($\facefactor*(0.115,0) + \branchfactor*(0, 0.25)$) circle (0.05);% points indicator right
}{% error message
\ifdefstring{\points}{none}{%
}{%
@ -413,12 +405,12 @@
}{%
\def\patterntype{north east lines}%
}%
\path[draw,pattern=\patterntype, pattern color=\foreground] (0,0) -- ++($( 0.4,0)$) -- ++($\branchfactor*(0, 0.4)$) -- cycle;% turnout marker
\path[draw,pattern=\patterntype, pattern color=\foreground] (0,0) -- ++($(-0.4,0)$) -- ++($\branchfactor*(0,-0.4)$) -- cycle;% turnout marker
\path[draw,pattern=\patterntype, pattern color=foreground] (0,0) -- ++($( 0.4,0)$) -- ++($\branchfactor*(0, 0.4)$) -- cycle;% turnout marker
\path[draw,pattern=\patterntype, pattern color=foreground] (0,0) -- ++($(-0.4,0)$) -- ++($\branchfactor*(0,-0.4)$) -- cycle;% turnout marker
}{% operated automaticly
\ifdefstring{\operationmode}{remote}{% operation=remote
\path[fill=\foreground] (0,0) -- ++($( 0.4,0)$) -- ++($\branchfactor*(0, 0.4)$) -- cycle;% turnout marker
\path[fill=\foreground] (0,0) -- ++($(-0.4,0)$) -- ++($\branchfactor*(0,-0.4)$) -- cycle;% turnout marker
\path[fill=foreground] (0,0) -- ++($( 0.4,0)$) -- ++($\branchfactor*(0, 0.4)$) -- cycle;% turnout marker
\path[fill=foreground] (0,0) -- ++($(-0.4,0)$) -- ++($\branchfactor*(0,-0.4)$) -- cycle;% turnout marker
}{%
\ifdefstring{\operationmode}{none}{}{%
\pgfkeys{/errors/unknown choice value={/tikz/trackschematic/operation}{“manual“, “remote“ OR “none“ as key required}}%
@ -427,30 +419,30 @@
}%
%% fouling point indicator
\iftoggle{fouling_point}{%
\path[draw=\foreground] ( 0.7,0) -- ++($\branchfactor*(0, 0.7)$);% fouling point indicator
\path[draw=\foreground] (-0.7,0) -- ++($\branchfactor*(0,-0.7)$);% fouling point indicator
\path[draw=foreground] ( 0.7,0) -- ++($\branchfactor*(0, 0.7)$);% fouling point indicator
\path[draw=foreground] (-0.7,0) -- ++($\branchfactor*(0,-0.7)$);% fouling point indicator
}{}%
%
%% points
\ifdefstring{\forwardpoints}{left}{% points left
\ifdefstring{\branch}{left}{%
\path[draw=\foreground,line width=1.5pt] (-0.035,0.1) -- ++(0.2,0.2);%
\path[draw=foreground,line width=1.5pt] (-0.035,0.1) -- ++(0.2,0.2);%
}{%
\path[draw=\foreground,line width=1.5pt] ( 0.035,0.1) -- ++(0.265,0);%
\path[draw=foreground,line width=1.5pt] ( 0.035,0.1) -- ++(0.265,0);%
}%
}{%
\ifdefstring{\forwardpoints}{right}{% points right
\ifdefstring{\branch}{left}{%
\path[draw=\foreground,line width=1.5pt] ( 0.035,-0.1) -- ++(0.265,0);
\path[draw=foreground,line width=1.5pt] ( 0.035,-0.1) -- ++(0.265,0);
}{%
\path[draw=\foreground,line width=1.5pt] (-0.035,-0.1) -- ++(0.2,-0.2);%
\path[draw=foreground,line width=1.5pt] (-0.035,-0.1) -- ++(0.2,-0.2);%
}%
}{%
\ifdefstring{\forwardpoints}{moving}{% moving points
\fill[\foreground] ($(0.075,0) + \branchfactor*(0,-0.1 )$) circle (0.05);% points indicator left
\fill[\foreground] ($(0.225,0) + \branchfactor*(0,-0.1 )$) circle (0.05);% points indicator left
\fill[\foreground] ($(0.015,0) + \branchfactor*(0, 0.15)$) circle (0.05);% points indicator right
\fill[\foreground] ($(0.115,0) + \branchfactor*(0, 0.25)$) circle (0.05);% points indicator right
\fill[foreground] ($(0.075,0) + \branchfactor*(0,-0.1 )$) circle (0.05);% points indicator left
\fill[foreground] ($(0.225,0) + \branchfactor*(0,-0.1 )$) circle (0.05);% points indicator left
\fill[foreground] ($(0.015,0) + \branchfactor*(0, 0.15)$) circle (0.05);% points indicator right
\fill[foreground] ($(0.115,0) + \branchfactor*(0, 0.25)$) circle (0.05);% points indicator right
}{% error message
\ifdefstring{\forwardpoints}{none}{%
}{%
@ -461,23 +453,23 @@
}% end of \ifdefstring{\forwardpoints}
\ifdefstring{\backwardpoints}{left}{% points left
\ifdefstring{\branch}{left}{%
\path[draw=\foreground,line width=1.5pt] (0.035,-0.1) -- ++(-0.2,-0.2);%
\path[draw=foreground,line width=1.5pt] (0.035,-0.1) -- ++(-0.2,-0.2);%
}{%
\path[draw=\foreground,line width=1.5pt] (-0.035,-0.1) -- ++(-0.265,0);%
\path[draw=foreground,line width=1.5pt] (-0.035,-0.1) -- ++(-0.265,0);%
}%
}{%
\ifdefstring{\backwardpoints}{right}{% points right
\ifdefstring{\branch}{left}{%
\path[draw=\foreground,line width=1.5pt] (-0.035,0.1) -- ++(-0.265,0);
\path[draw=foreground,line width=1.5pt] (-0.035,0.1) -- ++(-0.265,0);
}{%
\path[draw=\foreground,line width=1.5pt] (0.035,0.1) -- ++(-0.2,0.2);%
\path[draw=foreground,line width=1.5pt] (0.035,0.1) -- ++(-0.2,0.2);%
}%
}{%
\ifdefstring{\backwardpoints}{moving}{% moving points
\fill[\foreground] ($(-0.075,0) + \branchfactor*(0, 0.1 )$) circle (0.05);% points indicator left
\fill[\foreground] ($(-0.225,0) + \branchfactor*(0, 0.1 )$) circle (0.05);% points indicator left
\fill[\foreground] ($(-0.015,0) + \branchfactor*(0,-0.15)$) circle (0.05);% points indicator right
\fill[\foreground] ($(-0.115,0) + \branchfactor*(0,-0.25)$) circle (0.05);% points indicator right
\fill[foreground] ($(-0.075,0) + \branchfactor*(0, 0.1 )$) circle (0.05);% points indicator left
\fill[foreground] ($(-0.225,0) + \branchfactor*(0, 0.1 )$) circle (0.05);% points indicator left
\fill[foreground] ($(-0.015,0) + \branchfactor*(0,-0.15)$) circle (0.05);% points indicator right
\fill[foreground] ($(-0.115,0) + \branchfactor*(0,-0.25)$) circle (0.05);% points indicator right
}{% error message
\ifdefstring{\backwardpoints}{none}{%
}{%
@ -489,14 +481,14 @@
%
%% slips
\ifdefstring{\slip}{double}{% slip
\path[draw=\foreground,line width=0.75pt] ($\branchfactor*(-0.4,0) + (0, 0.1)$) -- ($\branchfactor*( 0.3,0) + (0, 0.4)$);% slip
\path[draw=\foreground,line width=0.75pt] ($\branchfactor*( 0.4,0) + (0,-0.1)$) -- ($\branchfactor*(-0.3,0) + (0,-0.4)$);% slip
\path[draw=foreground,line width=0.75pt] ($\branchfactor*(-0.4,0) + (0, 0.1)$) -- ($\branchfactor*( 0.3,0) + (0, 0.4)$);% slip
\path[draw=foreground,line width=0.75pt] ($\branchfactor*( 0.4,0) + (0,-0.1)$) -- ($\branchfactor*(-0.3,0) + (0,-0.4)$);% slip
}{%
\ifdefstring{\slip}{left}{%
\path[draw=\foreground,line width=0.75pt] ($\branchfactor*(-0.4,0) + (0,0.1)$) -- ($\branchfactor*(0.3,0) + (0,0.4)$);% slip
\path[draw=foreground,line width=0.75pt] ($\branchfactor*(-0.4,0) + (0,0.1)$) -- ($\branchfactor*(0.3,0) + (0,0.4)$);% slip
}{%
\ifdefstring{\slip}{right}{%
\path[draw=\foreground,line width=0.75pt] ($\branchfactor*(0.4,0) + (0,-0.1)$) -- ($\branchfactor*(-0.3,0) + (0,-0.4)$);% slip
\path[draw=foreground,line width=0.75pt] ($\branchfactor*(0.4,0) + (0,-0.1)$) -- ($\branchfactor*(-0.3,0) + (0,-0.4)$);% slip
}{%
\ifdefstring{\slip}{none}{%
%
@ -508,7 +500,7 @@
}%
%
%% label
\tikzset{every node/.style={text=\foreground}};%
\tikzset{every node/.style={text=foreground}};%
\ifdefstring{\labelcontentleft}{}{}{% label NOT empty
\coordinate (ts-sy-l1) at ($(2pt,0) + \branchfactor*(0, 10pt)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
@ -563,12 +555,12 @@
}%
%
%% crossing marker
\path[draw=\foreground] (0,0) -- ++( 0.4,0) -- ++($\branchfactor*(0, 0.4)$) -- cycle;% turnout marker
\path[draw=\foreground] (0,0) -- ++(-0.4,0) -- ++($\branchfactor*(0,-0.4)$) -- cycle;% turnout marker
\path[draw=foreground] (0,0) -- ++( 0.4,0) -- ++($\branchfactor*(0, 0.4)$) -- cycle;% turnout marker
\path[draw=foreground] (0,0) -- ++(-0.4,0) -- ++($\branchfactor*(0,-0.4)$) -- cycle;% turnout marker
%
%% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={text=\foreground}};%
\tikzset{every node/.style={text=foreground}};%
\coordinate (ts-x-l) at ($(2pt,0) + \branchfactor*(0,-9pt)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
\path let \p1=\labelcoord in coordinate (ts-x-l) at ($(ts-x-l)+(\x1,\y1)$);%
@ -578,8 +570,8 @@
%
%% fouling point indicator
\iftoggle{fouling_point}{%
\path[draw=\foreground] ( 0.7,0) -- ++($\branchfactor*(0, 0.7)$);% fouling point indicator
\path[draw=\foreground] (-0.7,0) -- ++($\branchfactor*(0,-0.7)$);% fouling point indicator
\path[draw=foreground] ( 0.7,0) -- ++($\branchfactor*(0, 0.7)$);% fouling point indicator
\path[draw=foreground] (-0.7,0) -- ++($\branchfactor*(0,-0.7)$);% fouling point indicator
}{}%
%
}},% end of pics/crossing/.style args={#1/#2/#3}
@ -639,12 +631,12 @@
}% end \ifdefstring{\branch}
%
%% symbol
\path[draw=\foreground, line width=1pt] (0,0.1) -- ++(0,-0.2);% derailer marker
\path[draw=\foreground,->,>=latex,line width=1pt,dashed] (0,0) -- ++($\facefactor*(0.4,0) + \branchfactor*(0,0.4)$);% derailer arrow
\path[draw=foreground, line width=1pt] (0,0.1) -- ++(0,-0.2);% derailer marker
\path[draw=foreground,->,>=latex,line width=1pt,dashed] (0,0) -- ++($\facefactor*(0.4,0) + \branchfactor*(0,0.4)$);% derailer arrow
%
%% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={text=\foreground}};%
\tikzset{every node/.style={text=foreground}};%
\coordinate (ts-dr-l) at ($\branchfactor*(0,-0.3)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
\path let \p1=\labelcoord in coordinate (ts-dr-l) at ($(ts-dr-l)+(\x1,\y1)$);%

View File

@ -18,14 +18,6 @@
\pgfkeys{%
/tikz/trackschematic/.is family,%
/tikz/trackschematic/.cd,%
%% color \foreground
foreground/.store in=\foreground,%
foreground=black,% DEFAULT
/tikz/foreground/.forward to=/tikz/trackschematic/foreground,%
%% color \background
background/.store in=\background,%
background=white,% DEFAULT
/tikz/background/.forward to=/tikz/trackschematic/background,%
%% face
face/.value required,% forward OR backward
face/.store in=\face,% forward OR backward
@ -189,8 +181,8 @@
\pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}%
}%
}% end \ifdefstring{\face}
\tikzset{every path/.style={draw=\foreground,line width=1pt}};%
\tikzset{every node/.style={text=\foreground,inner sep=1pt}};%
\tikzset{every path/.style={draw=foreground,line width=1pt}};%
\tikzset{every node/.style={text=foreground,inner sep=1pt}};%
%% signal pole
\path (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.7,0)$);% signal pole
%
@ -202,7 +194,7 @@
}%
\node[\align] at (ts-s-l) {\footnotesize \labelcontent};%
}%
\tikzset{every path/.style={draw=\foreground,line width=1pt,fill=\background},rounded corners=0.1pt};%
\tikzset{every path/.style={draw=foreground,line width=1pt,fill=background},rounded corners=0.1pt};%
%% signal marker
\iftoggle{is_distant_type}{% marker for distant signal
\path ($\trafficfactor*\facefactor*(0,-0.4) + \facefactor*(0.35,0)$) --%
@ -250,7 +242,7 @@
}{}%
%% speed indicator
\ifdefstring{\speed}{}{}{% speed NOT empty
\tikzset{every node/.style={font=\sffamily,text=\foreground}};%
\tikzset{every node/.style={font=\sffamily,text=foreground}};%
\iftoggle{is_speed_type}{% marker for speed signal
\node[rotate=\rotate] at ($\trafficfactor*\facefactor*(0,-0.4) + \facefactor*(0.85,0)$) {\speed};%
}{%
@ -260,7 +252,7 @@
}%
}%
\ifdefstring{\distantspeed}{}{}{% distant speed NOT empty
\tikzset{every node/.style={font=\sffamily,text=\foreground,fill=\background,inner sep=0.5pt}};%
\tikzset{every node/.style={font=\sffamily,text=foreground,fill=background,inner sep=0.5pt}};%
\node[rotate=\rotate] at ($\trafficfactor*\facefactor*(0,-0.4) + \facefactor*(0.2,0)$) {\distantspeed};%
}%
%% locked
@ -382,7 +374,7 @@
}{% default case
\pgfmathsetmacro{\facefactor}{1}%
}% end \ifdefstring{\face}
\tikzset{every path/.style={draw=\foreground,line width=1pt}};%
\tikzset{every path/.style={draw=foreground,line width=1pt}};%
%% marker
\path ($\trafficfactor*\facefactor*(0,-0.1)$) -- ++($\trafficfactor*\facefactor*(0,0.2)$);% marker
%% sign
@ -400,7 +392,7 @@
}{}%
%% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={font=\sffamily,text=\foreground}};%
\tikzset{every node/.style={font=\sffamily,text=foreground}};%
\coordinate (ts-cp-l) at ($\trafficfactor*\facefactor*(0,0.25)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
\path let \p1=\labelcoord in coordinate (ts-cp-l) at ($(ts-cp-l)+(\x1,\y1)$);%
@ -452,11 +444,11 @@
}%
}% end \ifdefstring{\trafficpractice}
%% marker
\tikzset{every path/.style={draw=\foreground}};%
\tikzset{every path/.style={draw=foreground}};%
\path[line width=1pt] ($\trafficfactor*(0,-0.175)$) -- ++(-0.0625,-0.0625) -- ++(-0.2,0) -- ++(-0.125,0.125) -- ++(-0.1,0) -- ++(0,-0.125) -- ++(0.1,0) -- ++(0.125,0.125) -- ++(0.2,0) -- ++(0.125,-0.125) -- ++(0.2,0) -- ++(0.125,0.125) -- ++(0.1,0) -- ++(0,-0.125) -- ++(-0.1,0) -- ++(-0.125,0.125) -- ++(-0.2,0) -- cycle;% loop marker
%% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={font=\sffamily,text=\foreground}};%
\tikzset{every node/.style={font=\sffamily,text=foreground}};%
\coordinate (ts-tm-l) at ($\trafficfactor*(0,0.25)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
\path let \p1=\labelcoord in coordinate (ts-tm-l) at ($(ts-tm-l)+(\x1,\y1)$);%
@ -567,54 +559,54 @@
%%
%%%%%%%%%%%%%%%%%%%%
%% 1. marker
\tikzset{every path/.style={draw=\foreground,line width=0.75pt,rounded corners=0.2pt}};%
\tikzset{every path/.style={draw=foreground,line width=0.75pt,rounded corners=0.2pt}};%
%%
\iftoggle{unnumberd}{% no number has been set
%% marker for undefined balises
\path[fill=\background] ($(-0.3,0)$) rectangle ($\trafficfactor*\facefactor*(0,-0.25) + (0.3,0)$);% balise marker
\path[fill=background] ($(-0.3,0)$) rectangle ($\trafficfactor*\facefactor*(0,-0.25) + (0.3,0)$);% balise marker
\iftoggle{switched}{% balises can be switched
\path[fill=\foreground] ($\trafficfactor*\facefactor*(0,-0.075) + (-0.225,0)$) rectangle%
\path[fill=foreground] ($\trafficfactor*\facefactor*(0,-0.075) + (-0.225,0)$) rectangle%
($\trafficfactor*\facefactor*(0,-0.175) + ( 0.225,0)$);% switch marker
}{}%
}{% a number has been set
%% marker for numbered balises
\ifdefstring{\along}{none}{}{
\foreach \n in \along{%
\path[fill=\background] ($\n*\facefactor*(0.2,0)$) rectangle%
\path[fill=background] ($\n*\facefactor*(0.2,0)$) rectangle%
($\n*\facefactor*(0.2,0) + (0.2 ,0) + \trafficfactor*\facefactor*(0,-0.25)$);% balise marker
\iftoggle{index_number}{%
\node[text=\foreground] at ($\n*\facefactor*(0.2,0) + (0.1,0) + \trafficfactor*\facefactor*(0,-0.125)$) {\tiny\n};%
\node[text=foreground] at ($\n*\facefactor*(0.2,0) + (0.1,0) + \trafficfactor*\facefactor*(0,-0.125)$) {\tiny\n};%
}{}%
}%
}%
\ifdefstring{\oppose}{none}{}{
\foreach \n in \oppose{%
\path[fill=\background] ($\n*\facefactor*(0.2,0)$) rectangle%
\path[fill=background] ($\n*\facefactor*(0.2,0)$) rectangle%
($\n*\facefactor*(0.2,0) + (0.2 ,0) + \trafficfactor*\facefactor*(0,0.25)$);% balise marker
\iftoggle{index_number}{%
\node[text=\foreground] at ($\n*\facefactor*(0.2,0) + (0.1,0) + \trafficfactor*\facefactor*(0,0.125)$) {\tiny\n};%
\node[text=foreground] at ($\n*\facefactor*(0.2,0) + (0.1,0) + \trafficfactor*\facefactor*(0,0.125)$) {\tiny\n};%
}{}%
}%
}%
\ifdefstring{\alongswitched}{none}{}{
\foreach \n in \alongswitched{%
\path[fill=\background] ($\n*\facefactor*(0.2,0)$) rectangle%
\path[fill=background] ($\n*\facefactor*(0.2,0)$) rectangle%
($\n*\facefactor*(0.2,0) + (0.2 ,0) + \trafficfactor*\facefactor*(0,-0.25)$);% balise marker
\path[fill=\foreground] ($\n*\facefactor*(0.2,0) + (0.05,0) + \trafficfactor*\facefactor*(0,-0.05)$) rectangle%
\path[fill=foreground] ($\n*\facefactor*(0.2,0) + (0.05,0) + \trafficfactor*\facefactor*(0,-0.05)$) rectangle%
($\n*\facefactor*(0.2,0) + (0.15,0) + \trafficfactor*\facefactor*(0,-0.2)$);% switch marker
\iftoggle{index_number}{%
\node[text=\background] at ($\n*\facefactor*(0.2,0) + (0.1,0) + \trafficfactor*\facefactor*(0,-0.125)$) {\tiny\n};%
\node[text=background] at ($\n*\facefactor*(0.2,0) + (0.1,0) + \trafficfactor*\facefactor*(0,-0.125)$) {\tiny\n};%
}{}%
}%
}%
\ifdefstring{\opposeswitched}{none}{}{
\foreach \n in \opposeswitched{%
\path[fill=\background] ($\n*\facefactor*(0.2,0)$) rectangle%
\path[fill=background] ($\n*\facefactor*(0.2,0)$) rectangle%
($\n*\facefactor*(0.2,0) + (0.2 ,0) + \trafficfactor*\facefactor*(0,0.25)$);% balise marker
\path[fill=\foreground] ($\n*\facefactor*(0.2,0) + (0.05,0) + \trafficfactor*\facefactor*(0,0.05)$) rectangle%
\path[fill=foreground] ($\n*\facefactor*(0.2,0) + (0.05,0) + \trafficfactor*\facefactor*(0,0.05)$) rectangle%
($\n*\facefactor*(0.2,0) + (0.15,0) + \trafficfactor*\facefactor*(0,0.2)$);% switch marker
\iftoggle{index_number}{%
\node[text=\background] at ($\n*\facefactor*(0.2,0) + (0.1,0) + \trafficfactor*\facefactor*(0,0.125)$) {\tiny\n};%
\node[text=background] at ($\n*\facefactor*(0.2,0) + (0.1,0) + \trafficfactor*\facefactor*(0,0.125)$) {\tiny\n};%
}{}%
}%
}%
@ -633,7 +625,7 @@
\path let \p1=\labelcoord in coordinate (label-coord) at ($(label-coord)+(\x1,\y1)$);%
}%
%% label style
\tikzset{every node/.style={font=\sffamily,text=\foreground}};%
\tikzset{every node/.style={font=\sffamily,text=foreground}};%
%
\ifdefstring{\trafficpractice}{left}{%
\tikzset{every node/.append style={left,align=right}};%
@ -695,11 +687,11 @@
}%
}% end \ifdefstring{\trafficpractice}
%% arrow
\path[draw=\foreground,<-,>=latex,line width=1pt]%
\path[draw=foreground,<-,>=latex,line width=1pt]%
($\facefactor*\trafficfactor*(0,-0.1)$) -- ++($\facefactor*\trafficfactor*(0,-0.3)$) -- ++($\facefactor*(0.2,0)$);% arrow
%% eye
\filldraw[\foreground] ($\facefactor*(0.4,0) + \facefactor*\trafficfactor*(0,-0.4)$) circle (0.1);% pupil
\path[draw=\foreground, line width=1pt]% eye contour
\filldraw[foreground] ($\facefactor*(0.4,0) + \facefactor*\trafficfactor*(0,-0.4)$) circle (0.1);% pupil
\path[draw=foreground, line width=1pt]% eye contour
($\facefactor*(0.4, 0) + \facefactor*\trafficfactor*(0,-0.15)$) .. controls%
($\facefactor*(0.25,0) + \facefactor*\trafficfactor*(0,-0.25)$) and%
($\facefactor*(0.25,0) + \facefactor*\trafficfactor*(0,-0.55)$) ..%
@ -754,16 +746,16 @@
\pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}%
}%
}% end \ifdefstring{\face}
\tikzset{every path/.style={draw=\foreground,line width=1pt}};%
\tikzset{every path/.style={draw=foreground,line width=1pt}};%
%% marker
\path ($\trafficfactor*\facefactor*(0,-0.55) + \facefactor*(0.3,0)$) rectangle%
++($\trafficfactor*\facefactor*(0, 0.3) + \facefactor*(0.3,0)$);%
%% arrow
\path[draw=\foreground,<-,>=latex,line width=1pt]%
\path[draw=foreground,<-,>=latex,line width=1pt]%
($\facefactor*\trafficfactor*(0,-0.1)$) -- ++($\facefactor*\trafficfactor*(0,-0.3)$) -- ++($\facefactor*(0.2,0)$);% arrow
%% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={font=\sffamily,text=\foreground}};%
\tikzset{every node/.style={font=\sffamily,text=foreground}};%
\coordinate (ts-ma-l) at ($\trafficfactor*\facefactor*(0,-0.6) + \facefactor*(0.3,0)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
\path let \p1=\labelcoord in coordinate (ts-ma-l) at ($(ts-ma-l)+(\x1,\y1)$);%
@ -817,17 +809,17 @@
\pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}%
}%
}% end \ifdefstring{\face}
\tikzset{every path/.style={draw=\foreground,line width=1pt}};%
\tikzset{every path/.style={draw=foreground,line width=1pt}};%
%% marker
\path ($\trafficfactor*\facefactor*(0,-0.4) + \facefactor*(0.3,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*(0.25,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.3)$) -- cycle;% signal marker
%% arrow
\path[draw=\foreground,<-,>=latex,line width=1pt]%
\path[draw=foreground,<-,>=latex,line width=1pt]%
($\facefactor*\trafficfactor*(0,-0.1)$) -- ++($\facefactor*\trafficfactor*(0,-0.3)$) -- ++($\facefactor*(0.2,0)$);% arrow
%% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={font=\sffamily,text=\foreground}};%
\tikzset{every node/.style={font=\sffamily,text=foreground}};%
\coordinate (ts-bp-l) at ($\trafficfactor*\facefactor*(0,-0.6) + \facefactor*(0.3,0)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
\path let \p1=\labelcoord in coordinate (ts-bp-l) at ($(ts-bp-l)+(\x1,\y1)$);%
@ -881,18 +873,18 @@
\pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}%
}%
}% end \ifdefstring{\face}
\tikzset{every path/.style={draw=\foreground,line width=1pt}};%
\tikzset{every path/.style={draw=foreground,line width=1pt}};%
%% marker
\path ($\trafficfactor*\facefactor*(0,-0.4)$) --%
++($\trafficfactor*\facefactor*(0,-0.1) + \facefactor*(-0.1,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.1) + \facefactor*( 0.1,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.1) + \facefactor*( 0.1,0)$) -- cycle;% sign
%% arrow
\path[draw=\foreground,<-,>=latex,line width=1pt]%
\path[draw=foreground,<-,>=latex,line width=1pt]%
($\facefactor*\trafficfactor*(0,-0.1)$) -- ++($\facefactor*\trafficfactor*(0,-0.25)$);% arrow
%% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={font=\sffamily,text=\foreground}};%
\tikzset{every node/.style={font=\sffamily,text=foreground}};%
\coordinate (ts-dp-l) at ($\trafficfactor*\facefactor*(0,0.25)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
\path let \p1=\labelcoord in coordinate (ts-dp-l) at ($(ts-dp-l)+(\x1,\y1)$);%
@ -932,7 +924,7 @@
}%
}% end \ifdefstring{\face}
%% symbol
\fill[\foreground] ($\facefactor*(-0.175,0)+(0,-0.15)$) --%
\fill[foreground] ($\facefactor*(-0.175,0)+(0,-0.15)$) --%
($\facefactor*(-0.175,0)+(0, 0.15)$) --%
($\facefactor*( 0.175,0)+(0, 0 )$) -- cycle;%
}},% END pics/route/.style args={#1}
@ -971,31 +963,31 @@
%
%% face setup
\ifdefstring{\face}{forward}{% face
\path[draw=\foreground,line width=0.5pt,densely dotted]%
\path[draw=foreground,line width=0.5pt,densely dotted]%
($\trafficfactor*(0,0.1) + (-0.0125,0)$) -- ($\trafficfactor*(0,0.25) + (-0.2125,0)$) -- ($\trafficfactor*(0,0.4) + (-0.0125,0)$) --%
($\trafficfactor*(0,0.325) + (-0.0125,0)$) -- ($\trafficfactor*(0,0.325) + (0.1875,0)$) -- ($\trafficfactor*(0,0.175) + (0.1875,0)$) --%
($\trafficfactor*(0,0.175) + (-0.0125,0)$) -- cycle;% arrow backward
\fill[\foreground]%
\fill[foreground]%
($\trafficfactor*(0,-0.1) + (0.0125,0)$) -- ($\trafficfactor*(0,-0.25) + (0.2125,0)$) -- ($\trafficfactor*(0,-0.4) + (0.0125,0)$) --%
($\trafficfactor*(0,-0.325) + (0.0125,0)$) -- ($\trafficfactor*(0,-0.325)+(-0.1875,0)$) -- ($\trafficfactor*(0,-0.175) + (-0.1875,0)$) --%
($\trafficfactor*(0,-0.175) + (0.0125,0)$) -- cycle;% arrow forward
}{%
\ifdefstring{\face}{backward}{% face
\fill[\foreground]%
\fill[foreground]%
($\trafficfactor*(0,0.1) + (-0.0125,0)$) -- ($\trafficfactor*(0,0.25) + (-0.2125,0)$) -- ($\trafficfactor*(0,0.4) + (-0.0125,0)$) --%
($\trafficfactor*(0,0.325) + (-0.0125,0)$) -- ($\trafficfactor*(0,0.325) + (0.1875,0)$) -- ($\trafficfactor*(0,0.175) + (0.1875,0)$) --%
($\trafficfactor*(0,0.175) + (-0.0125,0)$) -- cycle;% arrow backward
\path[draw=\foreground,line width=0.5pt,densely dotted]%
\path[draw=foreground,line width=0.5pt,densely dotted]%
($\trafficfactor*(0,-0.1) + (0.0125,0)$) -- ($\trafficfactor*(0,-0.25) + (0.2125,0)$) -- ($\trafficfactor*(0,-0.4) + (0.0125,0)$) --%
($\trafficfactor*(0,-0.325)+(0.0125,0)$) -- ($\trafficfactor*(0,-0.325)+(-0.1875,0)$) -- ($\trafficfactor*(0,-0.175) + (-0.1875,0)$) --%
($\trafficfactor*(0,-0.175) + (0.0125,0)$) -- cycle;% arrow forward
}{
\ifdefstring{\face}{bidirectional}{% face
\path[draw=\foreground,line width=0.5pt]%
\path[draw=foreground,line width=0.5pt]%
($\trafficfactor*(0,0.1) + (-0.0125,0)$) -- ($\trafficfactor*(0,0.25) + (-0.2125,0)$) -- ($\trafficfactor*(0,0.4) + (-0.0125,0)$) --%
($\trafficfactor*(0,0.325) +(-0.0125,0)$) -- ($\trafficfactor*(0,0.325) +(0.1875,0)$) -- ($\trafficfactor*(0,0.175) + (0.1875,0)$) --%
($\trafficfactor*(0,0.175) + (-0.0125,0)$) -- cycle;% arrow backward
\path[draw=\foreground,line width=0.5pt]%
\path[draw=foreground,line width=0.5pt]%
($\trafficfactor*(0,-0.1) + (0.0125,0)$) -- ($\trafficfactor*(0,-0.25) + (0.2125,0)$) -- ($\trafficfactor*(0,-0.4) + (0.0125,0)$) --%
($\trafficfactor*(0,-0.325)+(0.0125,0)$) -- ($\trafficfactor*(0,-0.325)+(-0.1875,0)$) -- ($\trafficfactor*(0,-0.175)+(-0.1875,0)$) --%
($\trafficfactor*(0,-0.175) + (0.0125,0)$) -- cycle;% arrow forward
@ -1005,7 +997,7 @@
}%
}% end \ifdefstring{\face}
%% frame
% \path[draw=\foreground,line width=0.5pt]%
% \path[draw=foreground,line width=0.5pt]%
% (-0.3, 0.1) -- (-0.3, 0.5) -- (0.3, 0.5) -- (0.3, 0.1)
% (-0.3,-0.1) -- (-0.3,-0.5) -- (0.3,-0.5) -- (0.3,-0.1);
}},% END pics/direction_control/.style args={#1}

View File

@ -23,14 +23,6 @@
\pgfkeys{%
/tikz/trackschematic/.is family,%
/tikz/trackschematic/.cd,%
%% color foreground
foreground/.store in=\foreground,%
foreground=black,% DEFAULT
/tikz/foreground/.forward to=/tikz/trackschematic/foreground,%
%% color background
background/.store in=\background,%
background=white,% DEFAULT
/tikz/background/.forward to=/tikz/trackschematic/background,%
%% face
face/.value required,% forward OR backward
face/.store in=\face,%
@ -274,12 +266,12 @@
%% 2. vehicle style
\iftoggle{in_train_mode}{% train mode
\iftoggle{train_is_a_ghost}{% ghost train
\tikzset{every path/.style={draw=\foreground, line width=0.8pt, dashed}};%
\tikzset{every path/.style={draw=foreground, line width=0.8pt, dashed}};%
}{% normal train
\tikzset{every path/.style={draw=\foreground, line width=1pt, fill=\background}};%
\tikzset{every path/.style={draw=foreground, line width=1pt, fill=background}};%
}%
}{% shunting mode
\tikzset{every path/.style={draw=\foreground, double, double distance=0.5mm, line width=0.3pt, fill=\background}};%
\tikzset{every path/.style={draw=foreground, double, double distance=0.5mm, line width=0.3pt, fill=background}};%
}%
%%
%%%%%%%%%%%%%%%%%%%%
@ -287,11 +279,11 @@
%% (order before vehicle shape due to background fill!)
\iftoggle{is_shunting}{% arrow for shunting
\iftoggle{in_shunting_mode}{% shunting mode
\fill[draw=none,fill=\background] ($\facefactor*(-0.3, 0.3)$) --%
\fill[draw=none,fill=background] ($\facefactor*(-0.3, 0.3)$) --%
($\facefactor*(-0.1, 0.3)$) --%
($\facefactor*( 0.2, 0 )$) --%
($\facefactor*(-0.1,-0.3)$) --%
($\facefactor*(-0.3,-0.3)$) -- cycle;% \background fill
($\facefactor*(-0.3,-0.3)$) -- cycle;% background fill
\path[line cap=rect,fill=none] ($\facefactor*(-0.1, 0.3)$) --%
($\facefactor*( 0.2, 0 )$) --%
($\facefactor*(-0.1,-0.3)$);% arrow shape
@ -302,11 +294,11 @@
\ifdefstring{\trainrun}{none}{}{% DEFAULT no arrow for train
\iftoggle{in_train_mode}{% train mode
\ifdefstring{\trainrun}{slow}{%
\fill[draw=none,fill=\background] ($\facefactor*(-0.3, 0.3)$) --%
\fill[draw=none,fill=background] ($\facefactor*(-0.3, 0.3)$) --%
($\facefactor*(-0.1, 0.3)$) --%
($\facefactor*( 0.2, 0 )$) --%
($\facefactor*(-0.1,-0.3)$) --%
($\facefactor*(-0.3,-0.3)$) -- cycle;% \background fill
($\facefactor*(-0.3,-0.3)$) -- cycle;% background fill
\path[fill=none] ($\facefactor*(-0.15, 0.3)$) --%
($\facefactor*(-0.1 , 0.3)$) --%
($\facefactor*( 0.2 , 0 )$) --%
@ -314,11 +306,11 @@
($\facefactor*(-0.15,-0.3)$);% arrow shape
}{%
\ifdefstring{\trainrun}{normal}{%
\fill[draw=none,fill=\background] ($\facefactor*(-0.3, 0.3)$) --%
\fill[draw=none,fill=background] ($\facefactor*(-0.3, 0.3)$) --%
($\facefactor*( 0.1, 0.3)$) --%
($\facefactor*( 0.4, 0 )$) --%
($\facefactor*( 0.1,-0.3)$) --%
($\facefactor*(-0.3,-0.3)$) -- cycle;% \background fill
($\facefactor*(-0.3,-0.3)$) -- cycle;% background fill
\path[fill=none] ($\facefactor*(-0.15, 0.3)$) --%
($\facefactor*(-0.1 , 0.3)$) --%
($\facefactor*( 0.2 , 0 )$) --%
@ -332,11 +324,11 @@
%
}{%
\ifdefstring{\trainrun}{fast}{%
\fill[draw=none,fill=\background] ($\facefactor*(-0.3, 0.3)$) --%
\fill[draw=none,fill=background] ($\facefactor*(-0.3, 0.3)$) --%
($\facefactor*( 0.3, 0.3)$) --%
($\facefactor*( 0.6, 0 )$) --%
($\facefactor*( 0.3,-0.3)$) --%
($\facefactor*(-0.3,-0.3)$) -- cycle;% \background fill
($\facefactor*(-0.3,-0.3)$) -- cycle;% background fill
\path[fill=none] ($\facefactor*(-0.15, 0.3)$) --%
($\facefactor*(-0.1 , 0.3)$) --%
($\facefactor*( 0.2 , 0 )$) --%
@ -374,10 +366,10 @@
%% 5. operation mode
\iftoggle{is_parked}{}{% vehicle NOT parked
\ifdefstring{\operationmode}{manual}{%
\path[draw=none, fill=\foreground] ($\facefactor*(-0.4,0)$) circle (0.15);% dot
\path[draw=none, fill=foreground] ($\facefactor*(-0.4,0)$) circle (0.15);% dot
}{
\ifdefstring{\operationmode}{automatic}{%
\path[draw=none, fill=\foreground] ($\facefactor*(-0.15,0)$) -- ++($\facefactor*(-0.15,0) +(0,0.15)$) -- ++(0,-0.3) -- cycle;% triangle
\path[draw=none, fill=foreground] ($\facefactor*(-0.15,0)$) -- ++($\facefactor*(-0.15,0) +(0,0.15)$) -- ++(0,-0.3) -- cycle;% triangle
}{%
\ifdefstring{\operationmode}{undefined}{}{%
\pgfkeys{/errors/unknown choice value={/tikz/trackschematic/operation}{“manual“, “automatic“ OR “undefined“ as key required}}%
@ -419,7 +411,7 @@
}% \ifdefstring{\labelalign}{right}
}% \ifdefstring{\labelalign}{left}
}% \ifdefstring{\labelalign}{center}
\node[text=\foreground,anchor=\labelanchor,align=\labelalign] at (ts-v-l) {\footnotesize \labelcontent};% label
\node[text=foreground,anchor=\labelanchor,align=\labelalign] at (ts-v-l) {\footnotesize \labelcontent};% label
}%
}},% END pics/vehicles/.style args={#1/#2/#3}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -16,7 +16,7 @@
\begin{adjustbox}{width=\textwidth}
\begin{tikzpicture}
{ % station names
\tikzset{every node/.style={\foreground!50!\background}};
\tikzset{every node/.style={foreground!50!background}};
\node[right,align=left] at ( 2,1.3) {to and from\\ Arnau};
\node at (21,3.3) {{\LARGE Bf Berg}};
\node[left,align=right] at (38,1.3) {to and from\\ Chamstadt};

View File

@ -29,7 +29,7 @@
\begin{scaletikzpicturetowidth}{\textwidth}
\begin{tikzpicture}[scale=\tikzscale,transform shape]
{ % station names
\tikzset{every node/.style={\foreground!50!\background}};
\tikzset{every node/.style={foreground!50!background}};
\node[right,align=left] at ( 2,1.3) {to and from\\ Arnau};
\node at (21,3.3) {{\LARGE Bf Berg}};
\node[left,align=right] at (38,1.3) {to and from\\ Chamstadt};

View File

@ -16,7 +16,7 @@
\begin{adjustbox}{width=\textwidth}
\begin{tikzpicture}
{ % station names
\tikzset{every node/.style={\foreground!50!\background}};
\tikzset{every node/.style={foreground!50!background}};
\node[right,align=left] at ( 2,1.3) {to and from\\ Arnau};
\node at (21,3.3) {{\LARGE Bf Berg}};
\node[left,align=right] at (38,1.3) {to and from\\ Chamstadt};

View File

@ -29,7 +29,7 @@
\begin{scaletikzpicturetowidth}{\textwidth}
\begin{tikzpicture}[scale=\tikzscale,transform shape]
{ % station names
\tikzset{every node/.style={\foreground!50!\background}};
\tikzset{every node/.style={foreground!50!background}};
\node[right,align=left] at ( 2,1.3) {to and from\\ Arnau};
\node at (21,3.3) {{\LARGE Bf Berg}};
\node[left,align=right] at (38,1.3) {to and from\\ Chamstadt};