Compare commits
174 Commits
Author | SHA1 | Date |
---|---|---|
Martin Scheidt | c369ec7c1b | |
Martin Scheidt | 752340e0de | |
Martin Scheidt | 580571ee1e | |
kaat0 | b8a251cc53 | |
Martin Scheidt | 5c2ca786c7 | |
Martin Scheidt | 71b341934f | |
Martin Scheidt | 43879c3b58 | |
Martin Scheidt | 134edca0b1 | |
Martin Scheidt | 1c41e85629 | |
Martin Scheidt | 4e9f5ea052 | |
Martin Scheidt | cc95bf8a15 | |
Martin Scheidt | 57773951d3 | |
Martin Scheidt | de9ed8ca40 | |
Martin Scheidt | 95e8544139 | |
Martin Scheidt | 88de19e39c | |
Martin Scheidt | 10feea7259 | |
Martin Scheidt | a8a050b184 | |
Martin Scheidt | 51d25db670 | |
Martin Scheidt | 48794dd20c | |
Martin Scheidt | 0b1a14fbc9 | |
Martin Scheidt | bdf679986e | |
Jurriaan H. Spaaks | 3eef5a1e18 | |
Martin Scheidt | 162d59e14a | |
Martin Scheidt | ae8ed95aee | |
Martin Scheidt | ac3e664ae6 | |
Martin Scheidt | e64e57d728 | |
Martin Scheidt | 2683bf27c2 | |
Martin Scheidt | c159bb00a2 | |
Martin Scheidt | 8934fecbf7 | |
Martin Scheidt | 4f9932d33c | |
Martin Scheidt | 9d705de572 | |
Martin Scheidt | 25c007c70f | |
Martin Scheidt | 25e66b6e79 | |
Martin Scheidt | 1e8de05d95 | |
Martin Scheidt | 7ae66cc182 | |
Martin Scheidt | f46d7a7770 | |
Martin Scheidt | 70b5ec4e57 | |
Martin Scheidt | a98f3b26bd | |
Martin Scheidt | 2c869daa70 | |
Martin Scheidt | d1ff03de71 | |
Martin Scheidt | 876c8907e5 | |
Martin Scheidt | c0ad07f84e | |
Martin Scheidt | c9f5e7a7ba | |
Martin Scheidt | 9a7828e059 | |
Martin Scheidt | 7ed8411378 | |
Martin Scheidt | 43c132a957 | |
Martin Scheidt | 1dfb44feed | |
Martin Scheidt | 3d6030b43b | |
Martin Scheidt | f90b3a9b0d | |
Martin Scheidt | 44110223b6 | |
Martin Scheidt | 90aebcda84 | |
Martin Scheidt | 7dfad7eef5 | |
Gregor | 8d27ed80ad | |
Martin Scheidt | f5e79dedb2 | |
Gregor | b4f1112448 | |
Gregor | 91b9b3631c | |
Martin Scheidt | 42773fc910 | |
Martin Scheidt | 6a73b502e2 | |
Martin Scheidt | 9f72df2b64 | |
Gregor | 540813a062 | |
Martin Scheidt | c44553d7ad | |
Martin Scheidt | beb481d2a7 | |
Martin Scheidt | 1ac4d7a596 | |
Martin Scheidt | 42dd769fcf | |
Martin Scheidt | bb1f41080a | |
Martin Scheidt | 864d0dfb87 | |
Martin Scheidt | 5afacf62fc | |
Martin Scheidt | 8f7ecbc04b | |
Martin Scheidt | c317a8dc0c | |
Martin Scheidt | 07de619804 | |
Martin Scheidt | 520d94848a | |
Martin Scheidt | 6c64c241c9 | |
Martin Scheidt | 7bfdbfacfc | |
Martin Scheidt | d0710c39f2 | |
Martin Scheidt | 4567a56fa2 | |
Martin Scheidt | 1a9fa2ea68 | |
Martin Scheidt | cc0c6306f0 | |
Martin Scheidt | 4974780cf5 | |
Martin Scheidt | bb6cb783cc | |
Martin Scheidt | 54019d15ad | |
Martin Scheidt | f498dd4a85 | |
Martin Scheidt | 4d6d5a2cdd | |
Martin Scheidt | b970ff7357 | |
Martin Scheidt | 65552d40d6 | |
Martin Scheidt | 9947c24f65 | |
Martin Scheidt | 16ec1a0fb7 | |
Martin Scheidt | 267ca88ff8 | |
Martin Scheidt | 96f6eeb9c0 | |
Martin Scheidt | b68b787bff | |
Martin Scheidt | 9b8ae101cd | |
Martin Scheidt | 92cb3f0b57 | |
Gregor | 25f8b42af2 | |
Martin Scheidt | 1ead291f21 | |
Martin Scheidt | 83a0a6f2ec | |
Martin Scheidt | 714536ab9f | |
Martin Scheidt | ad0efb5b00 | |
Martin Scheidt | ddb997de1d | |
Martin Scheidt | ee00fd7173 | |
Martin Scheidt | 373d234a1b | |
Martin Scheidt | 531edef131 | |
Gregor | 1902a16bcc | |
Martin Scheidt | ac6386b69f | |
Martin Scheidt | e4921ab06e | |
Martin Scheidt | 26533372a9 | |
Martin Scheidt | 71ae156dbb | |
Martin Scheidt | ad91fd973d | |
Martin Scheidt | b33cdec179 | |
Martin Scheidt | c170becf2e | |
Martin Scheidt | b1961f274f | |
Martin Scheidt | 3757f750b2 | |
Martin Scheidt | 02005f3cbf | |
Martin Scheidt | 5ca71c0d03 | |
Martin Scheidt | 62642983d1 | |
Martin Scheidt | e52205f004 | |
Martin Scheidt | 2e6b6fd7ae | |
Martin Scheidt | 142709e43e | |
Martin Scheidt | 1119e991ad | |
Martin Scheidt | 0e47498055 | |
Martin Scheidt | 3c83ea03cd | |
Martin Scheidt | 82e81aa750 | |
Martin Scheidt | 98992c5855 | |
Martin Scheidt | 6cbca99d1d | |
Martin Scheidt | 38f1e6b529 | |
Martin Scheidt | 1776f620f5 | |
Martin Scheidt | 417cc0b29a | |
Martin Scheidt | b92f8685b5 | |
Martin Scheidt | 6dc00facc4 | |
Martin Scheidt | f0772c5742 | |
Martin Scheidt | 75aabc3c19 | |
Martin Scheidt | d64b1fcc02 | |
Martin Scheidt | dafec941d2 | |
Martin Scheidt | 585439d473 | |
Martin Scheidt | bafeb79b2d | |
Martin Scheidt | 79e6999507 | |
Martin Scheidt | 586bd5bd94 | |
Martin Scheidt | a85ceae8ff | |
Martin Scheidt | 5c38af9a3f | |
Martin Scheidt | 546c2da7ca | |
Martin Scheidt | 379ce3a724 | |
Martin Scheidt | ac37402cf7 | |
Martin Scheidt | d25d6b0e93 | |
Martin Scheidt | d9f09f1a2d | |
Martin Scheidt | 24a3f95a5b | |
Martin Scheidt | b4d0080c3e | |
Martin Scheidt | ba299daaa6 | |
Martin Scheidt | b060ee2c54 | |
Martin Scheidt | 96e1255653 | |
Martin Scheidt | 683a931192 | |
Martin Scheidt | 2ebd817e33 | |
Martin Scheidt | 8893421b0c | |
Martin Scheidt | e83eaba0cd | |
Martin Scheidt | 7e7051d6ad | |
Martin Scheidt | 799102f211 | |
Martin Scheidt | ea2e92d197 | |
Martin Scheidt | 15877acfa0 | |
Martin Scheidt | d311ea4afe | |
Martin Scheidt | 98d20e1070 | |
Martin Scheidt | 8b9f09aff6 | |
Martin Scheidt | 0144aef64c | |
Martin Scheidt | 926a484baf | |
Martin Scheidt | 5c6113eecd | |
Martin Scheidt | 4902c59ee3 | |
Martin Scheidt | 8dee36fcdd | |
Martin Scheidt | 706803d391 | |
Martin Scheidt | 2b0a6dd3aa | |
Martin Scheidt | 02b247a088 | |
Martin Scheidt | c8ec753ce7 | |
Martin Scheidt | d725200dc1 | |
Martin Scheidt | 65368ec61a | |
Martin Scheidt | 476f263972 | |
Martin Scheidt | 74a419c972 | |
Martin Scheidt | d762a9bc8e | |
Martin Scheidt | 10408acab5 | |
Martin Scheidt | d58c4046f8 |
|
@ -0,0 +1,53 @@
|
|||
## -- engine used to compile (pdflatex)
|
||||
latex-bin
|
||||
latexmk
|
||||
|
||||
## -- direct dependencies
|
||||
tikz-trackschematic
|
||||
koma-script
|
||||
pgf
|
||||
xkeyval
|
||||
etoolbox
|
||||
adjustbox
|
||||
booktabs
|
||||
xltabular
|
||||
tools
|
||||
marginnote
|
||||
babel-english
|
||||
vhistory
|
||||
carlisle
|
||||
xcolor-solarized
|
||||
enumitem
|
||||
listings
|
||||
siunitx
|
||||
amsmath
|
||||
hyperref
|
||||
bookmark
|
||||
preprint
|
||||
|
||||
## -- lwarp dependencies
|
||||
lwarp
|
||||
ifptex
|
||||
|
||||
## -- indirect dependencies
|
||||
standalone
|
||||
epstopdf-pkg
|
||||
ltablex
|
||||
collectbox
|
||||
geometry
|
||||
environ
|
||||
xpatch
|
||||
infwarerr
|
||||
catchfile
|
||||
ltxcmds
|
||||
etexcmds
|
||||
letltxmacro
|
||||
newunicodechar
|
||||
upquote
|
||||
kvoptions
|
||||
kvsetkeys
|
||||
comment
|
||||
xstring
|
||||
microtype
|
||||
psnfss
|
||||
collection-fontsrecommended
|
|
@ -0,0 +1,19 @@
|
|||
## -- engine used to compile (pdflatex)
|
||||
latex-bin
|
||||
|
||||
## -- direct dependencies
|
||||
pgf
|
||||
xkeyval
|
||||
etoolbox
|
||||
adjustbox
|
||||
booktabs
|
||||
xltabular
|
||||
tools
|
||||
|
||||
## -- indirect dependencies
|
||||
standalone
|
||||
epstopdf-pkg
|
||||
ltablex
|
||||
collectbox
|
||||
geometry
|
||||
environ
|
|
@ -0,0 +1,2 @@
|
|||
## -- upload
|
||||
ctan-o-mat
|
|
@ -0,0 +1,13 @@
|
|||
# .github/tex/basic.profile.txt
|
||||
# used for paolobrasolin/setup-texlive-action@v1
|
||||
# Install the scheme:
|
||||
#
|
||||
# basic scheme (<minimal> and latex)
|
||||
#
|
||||
selected_scheme scheme-basic
|
||||
# Omit documentation files:
|
||||
tlpdbopt_install_docfiles 0
|
||||
# Omit source files:
|
||||
tlpdbopt_install_srcfiles 0
|
||||
# Avoid doing backups:
|
||||
tlpdbopt_autobackup 0
|
|
@ -0,0 +1,13 @@
|
|||
# .github/tex/full.profile.txt
|
||||
# used for paolobrasolin/setup-texlive-action@v1
|
||||
# Install the scheme:
|
||||
#
|
||||
# full scheme (everything)
|
||||
#
|
||||
selected_scheme scheme-full
|
||||
# Omit documentation files:
|
||||
tlpdbopt_install_docfiles 0
|
||||
# Omit source files:
|
||||
tlpdbopt_install_srcfiles 0
|
||||
# Avoid doing backups:
|
||||
tlpdbopt_autobackup 0
|
|
@ -0,0 +1,13 @@
|
|||
# .github/tex/medium.profile.txt
|
||||
# used for paolobrasolin/setup-texlive-action@v1
|
||||
# Install the scheme:
|
||||
#
|
||||
# medium scheme (<small> + more packages and languages)
|
||||
#
|
||||
selected_scheme scheme-medium
|
||||
# Omit documentation files:
|
||||
tlpdbopt_install_docfiles 0
|
||||
# Omit source files:
|
||||
tlpdbopt_install_srcfiles 0
|
||||
# Avoid doing backups:
|
||||
tlpdbopt_autobackup 0
|
|
@ -0,0 +1,13 @@
|
|||
# .github/tex/minimal.profile.txt
|
||||
# used for paolobrasolin/setup-texlive-action@v1
|
||||
# Install the scheme:
|
||||
#
|
||||
# minimal scheme (plain only)
|
||||
#
|
||||
selected_scheme scheme-minimal
|
||||
# Omit documentation files:
|
||||
tlpdbopt_install_docfiles 0
|
||||
# Omit source files:
|
||||
tlpdbopt_install_srcfiles 0
|
||||
# Avoid doing backups:
|
||||
tlpdbopt_autobackup 0
|
|
@ -0,0 +1,13 @@
|
|||
# .github/tex/small.profile.txt
|
||||
# used for paolobrasolin/setup-texlive-action@v1
|
||||
# Install the scheme:
|
||||
#
|
||||
# small scheme (<basic> + xetex, metapost, and a few languages)
|
||||
#
|
||||
selected_scheme scheme-small
|
||||
# Omit documentation files:
|
||||
tlpdbopt_install_docfiles 0
|
||||
# Omit source files:
|
||||
tlpdbopt_install_srcfiles 0
|
||||
# Avoid doing backups:
|
||||
tlpdbopt_autobackup 0
|
|
@ -0,0 +1,125 @@
|
|||
% This is a description file for ctan-o-mat.
|
||||
% It manages uploads of a package to
|
||||
% CTAN -- the Comprehensive TeX Archive Network.
|
||||
%
|
||||
% The syntax is roughly oriented towards (La)TeX.
|
||||
% Two form of the macros are used. The simple macros take one argument
|
||||
% in braces. Here the argument may not contain embedded macros.
|
||||
%
|
||||
% The second form uses an environment enclosed in \begin{}/\end{}.
|
||||
% In the long text fields logo macros can be used.
|
||||
%
|
||||
% You should enter your values between the begin and the end of the
|
||||
% named type.
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the CTAN id of the package.
|
||||
% The value is optional.
|
||||
% The value is restricted to 32 characters.
|
||||
\pkg{tikz-trackschematic}
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the version of the package.
|
||||
% The value is optional.
|
||||
% The value is restricted to 32 characters.
|
||||
\version{}%%[SCRIPT]
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the name of the author(s).
|
||||
% The value is optional.
|
||||
% The value is restricted to 128 characters.
|
||||
\author{Martin Scheidt}
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the email address of the uploader.
|
||||
% The value is an email address.
|
||||
% The value is restricted to 255 characters.
|
||||
\email{m.scheidt@tu-braunschweig.de}
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the name of the uploader.
|
||||
% The value is restricted to 255 characters.
|
||||
\uploader{Martin Scheidt (via github actions)}
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the directory on CTAN.
|
||||
% The value is optional.
|
||||
% The value is restricted to 255 characters.
|
||||
\ctanPath{/graphics/pgf/contrib/tikz-trackschematic}
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the license.
|
||||
% The value is optional.
|
||||
% The value is restricted to 2048 characters.
|
||||
% Multiple values are allowed.
|
||||
\license{isc}
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the URL of the home page.
|
||||
% The value is optional.
|
||||
% The value is a URL.
|
||||
% The value is restricted to 255 characters.
|
||||
% Multiple values are allowed.
|
||||
\home{https://www.railtoolkit.org/projects/tikz-trackschematic/}
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the URL of the bug tracker.
|
||||
% The value is optional.
|
||||
% The value is a URL.
|
||||
% The value is restricted to 255 characters.
|
||||
% Multiple values are allowed.
|
||||
\bugtracker{https://github.com/railtoolkit/tikz-trackschematic/issues}
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the support channel.
|
||||
% The value is optional.
|
||||
% The value is a URL.
|
||||
% The value is restricted to 255 characters.
|
||||
% Multiple values are allowed.
|
||||
\support{}
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the version management.
|
||||
% The value is optional.
|
||||
% The value is a URL.
|
||||
% The value is restricted to 255 characters.
|
||||
% Multiple values are allowed.
|
||||
\repository{https://github.com/railtoolkit/tikz-trackschematic}
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the developer's channel.
|
||||
% The value is optional.
|
||||
% The value is a URL.
|
||||
% The value is restricted to 255 characters.
|
||||
% Multiple values are allowed.
|
||||
\development{}
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the update indicator; true for update.
|
||||
% The value is optional.
|
||||
% The value is restricted to 8 characters.
|
||||
\update{true}
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the topics id.
|
||||
% The value is optional.
|
||||
% The value is restricted to 1024 characters.
|
||||
% Multiple values are allowed.
|
||||
\topic{}
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the text for the mail announcement.
|
||||
% The value is optional.
|
||||
% The value is restricted to 8192 characters.
|
||||
\begin{announcement}
|
||||
%RELEASE-NOTES%%[SCRIPT]
|
||||
\end{announcement}
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the one-liner for the package.
|
||||
% The value is optional.
|
||||
% The value is restricted to 128 characters.
|
||||
\summary{A TikZ library for creating track diagrams in railways}
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the descriptive abstract for the package.
|
||||
% The value is optional.
|
||||
% The value is restricted to 4096 characters.
|
||||
\begin{description}
|
||||
This TikZ 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 may be needed to describe situations and layouts in railway operation. The library is divided into sublibraries: topology, trafficcontrol, vehicles, constructions, electrics, symbology, and measures.
|
||||
\end{description}
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the note to the CTAN upload managers.
|
||||
% The value is optional.
|
||||
% The value is restricted to 2048 characters.
|
||||
\begin{note}
|
||||
Uploaded automatically by ctan-o-mat (via github actions)
|
||||
\end{note}
|
||||
% -------------------------------------------------------------------------
|
||||
% This field contains the archive file.
|
||||
% The value is the file name of the archive to be uploaded.
|
||||
% It may have a relative or absolute directory.
|
||||
\file{}%%[SCRIPT]
|
|
@ -0,0 +1,25 @@
|
|||
### github action to publish a new CITATION.cff
|
||||
##
|
||||
name: "cff validation"
|
||||
|
||||
## Controls when the workflow will run
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- CITATION.cff
|
||||
|
||||
## Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
name: "validate"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out a copy of the repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Validate a CITATION.cff from a subdirectory
|
||||
uses: citation-file-format/cffconvert-github-action@2.0.0
|
||||
with:
|
||||
args: "--infile ./CITATION.cff --validate"
|
|
@ -0,0 +1,82 @@
|
|||
### github action to publish a debug
|
||||
##
|
||||
name: "debug"
|
||||
|
||||
## Controls when the workflow will run
|
||||
on:
|
||||
# push:
|
||||
# branches: [ github-action ]
|
||||
|
||||
## Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
## A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
debug:
|
||||
# needs: create_package
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
- name: "checkout"
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# # download artifact in folder artifact/
|
||||
# - uses: actions/download-artifact@v3
|
||||
|
||||
# - name: "install ghostscript"
|
||||
# run: sudo apt-get install -y ghostscript
|
||||
|
||||
###### multiple options for a TeX environment
|
||||
# ##
|
||||
# - name: "setup TeX Live (via apt-get)"
|
||||
# # old TeX Live version: 2019
|
||||
# run: |
|
||||
# sudo apt-get update -y || sudo apt-get update -y || sudo apt-get update -y
|
||||
# sudo apt-get install -y texlive-latex-base || sudo apt-get install -y texlive-latex-base || sudo apt-get install -y texlive-latex-base
|
||||
# ##
|
||||
# - name: "setup TeX Live (via DanySK)"
|
||||
# # old TeX Live version: 2019
|
||||
# uses: DanySK/setup-texlive-action@master
|
||||
# with:
|
||||
# requirements-file: .github/tex/packages.test.txt
|
||||
# ##
|
||||
# - name: "setup TeX Live (via teatimeguest)"
|
||||
# uses: teatimeguest/setup-texlive-action@v2
|
||||
# with:
|
||||
# package-file: .github/tex/packages.test.txt
|
||||
# ##
|
||||
- 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
|
||||
|
||||
# - name: "test tikz-trackschematic"
|
||||
# run: ./build.sh --non-interactive --test --verbose
|
||||
|
||||
# ## create varibale ${{ steps.tag.outputs.tag }}
|
||||
# - name: "get tag"
|
||||
# id: tag
|
||||
# uses: dawidd6/action-get-tag@v1
|
||||
# with:
|
||||
# # Optionally strip `v` prefix
|
||||
# strip_v: false
|
||||
|
||||
# - name: "create tikz-trackschematic package"
|
||||
# run: ./build.sh --non-interactive --release ${{ steps.tag.outputs.tag }}
|
||||
|
||||
## opening a debug console
|
||||
- name: Setup upterm session
|
||||
env:
|
||||
ZENODO_ACCESS_TOKEN: ${{ secrets.ZENODO_ACCESS_TOKEN }}
|
||||
ZENODO_SANDBOX_ACCESS_TOKEN: ${{ secrets.ZENODO_SANDBOX_ACCESS_TOKEN }}
|
||||
uses: lhotari/action-upterm@v1
|
||||
with:
|
||||
limit-access-to-actor: true
|
|
@ -0,0 +1,189 @@
|
|||
### github action to make and publish a release
|
||||
##
|
||||
name: release
|
||||
|
||||
## Controls when the workflow will run
|
||||
on:
|
||||
## Triggers the workflow on push or pull request events but only for the master branch
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
## 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 for tikz-trackschematic"
|
||||
outputs:
|
||||
version: ${{ steps.tag.outputs.tag }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# 1. get varibale tag and put it in ${{ steps.tag.outputs.tag }}
|
||||
- name: "get tag"
|
||||
id: tag
|
||||
uses: dawidd6/action-get-tag@v1
|
||||
with:
|
||||
# Optionally strip `v` prefix
|
||||
strip_v: false
|
||||
|
||||
# 2. checkout the repo
|
||||
- name: "checkout"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 3. install TeX Live
|
||||
- name: "install ghostscript"
|
||||
run: sudo apt-get install -y ghostscript
|
||||
|
||||
- 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
|
||||
|
||||
# 4. (re-)compile the documentation
|
||||
- name: "update tikz-trackschematic documentation before release"
|
||||
run: ./build.sh --non-interactive --memory-increase --compile-doc
|
||||
|
||||
# 5. create package and release notes
|
||||
- name: "create tikz-trackschematic package"
|
||||
run: ./build.sh --non-interactive --release ${{ steps.tag.outputs.tag }}
|
||||
|
||||
# 6. upload artifact to share it with other jobs
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: |
|
||||
tikz-trackschematic-${{ steps.tag.outputs.tag }}.zip
|
||||
release-note-${{ steps.tag.outputs.tag }}.md
|
||||
if-no-files-found: error # '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: error # 'warn' or 'ignore' are also available, defaults to `warn`
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: .github/zenodo/metadata.json
|
||||
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
|
||||
|
||||
publish_github:
|
||||
needs: create_package
|
||||
name: "publish on github"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# 1. download artifact in folder artifact/
|
||||
- uses: actions/download-artifact@v3
|
||||
|
||||
# 2. creating a new release
|
||||
- name: "create release"
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
body_path: artifact/release-note-${{needs.create_package.outputs.version}}.md
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
# 3. upload package to new release
|
||||
- name: "upload release asset"
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifact/tikz-trackschematic-${{needs.create_package.outputs.version}}.zip
|
||||
asset_name: tikz-trackschematic-${{needs.create_package.outputs.version}}.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
# 4. publish release on github
|
||||
- name: "publish release"
|
||||
uses: StuYarrow/publish-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
id: ${{ steps.create_release.outputs.id }}
|
||||
|
||||
publish_CTAN:
|
||||
needs: create_package
|
||||
name: "publish on CTAN"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# 1. download artifact in folder artifact/ and move it one level up
|
||||
- uses: actions/download-artifact@v3
|
||||
- run: |
|
||||
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
|
||||
- run: tlmgr install ctan-o-mat
|
||||
|
||||
# 3. upload new release to CTAN
|
||||
- name: CTAN submit
|
||||
run: ctan-o-mat --verbose --submit artifact/tikz-trackschematic.pkg
|
||||
|
||||
publish_zenodo:
|
||||
needs: create_package
|
||||
name: "publish on zenodo"
|
||||
outputs:
|
||||
doi: ${{ steps.zenodraft.outputs.doi }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# 1. download artifact in folder artifact/ and move it one level up
|
||||
- uses: actions/download-artifact@v3
|
||||
- run: |
|
||||
mv ./artifact/tikz-trackschematic-${{needs.create_package.outputs.version}}.zip ./
|
||||
|
||||
# 2. install zenodraft
|
||||
- name: "install zenodraft"
|
||||
run: npm install -g zenodraft
|
||||
|
||||
# 3. upload new release to zenodo
|
||||
- name: "uploading to zenodo"
|
||||
id: zenodraft
|
||||
env:
|
||||
ZENODO_ACCESS_TOKEN: ${{ secrets.ZENODO_ACCESS_TOKEN }}
|
||||
COLLECTION: 5539844
|
||||
run: |
|
||||
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: [create_package, publish_zenodo]
|
||||
name: "updating CITATION.cff"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# 1. checkout the repo
|
||||
- name: "checkout"
|
||||
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: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
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 }}
|
|
@ -0,0 +1,63 @@
|
|||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
test:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
- name: "checkout"
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: "install ghostscript"
|
||||
run: sudo apt-get install -y ghostscript
|
||||
|
||||
- name: "setup TeX Live (via paolobrasolin)"
|
||||
uses: paolobrasolin/setup-texlive-action@v1
|
||||
with:
|
||||
profile-path: ${{ github.workspace }}/.github/tex/profile.basic.txt
|
||||
packages-path: ${{ github.workspace }}/.github/tex/packages.test.txt
|
||||
|
||||
- name: "test tikz-trackschematic"
|
||||
run: ./build.sh --non-interactive --test --verbose
|
|
@ -0,0 +1,126 @@
|
|||
name: zenodo sandbox test
|
||||
on:
|
||||
# # Trigger when you publish a release via GitHub's release page
|
||||
# release:
|
||||
# types:
|
||||
# - published
|
||||
|
||||
# # Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
create_package:
|
||||
name: "create a TeX Live package"
|
||||
outputs:
|
||||
version: ${{ steps.tag.outputs.tag }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# set varibale ${{ steps.tag.outputs.tag }}
|
||||
- name: "get tag"
|
||||
id: tag
|
||||
run: echo "::set-output name=tag::v0.7.0"
|
||||
|
||||
# checkout the repo
|
||||
- name: "checkout"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# create package and release notes
|
||||
- name: "create tikz-trackschematic package"
|
||||
run: ./build.sh --non-interactive --release ${{ steps.tag.outputs.tag }}
|
||||
|
||||
# upload artifact to share it with other jobs
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: |
|
||||
tikz-trackschematic-${{ steps.tag.outputs.tag }}.zip
|
||||
release-note-${{ steps.tag.outputs.tag }}.md
|
||||
if-no-files-found: error # '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: error # 'warn' or 'ignore' are also available, defaults to `warn`
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: .github/zenodo/metadata.json
|
||||
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
|
||||
|
||||
# publish_zenodo:
|
||||
# needs: create_package
|
||||
# name: "publish on zenodo sandbox"
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# # checkout the repo
|
||||
# - name: "checkout"
|
||||
# uses: actions/checkout@v3
|
||||
|
||||
# # download artifact in folder artifact/
|
||||
# - uses: actions/download-artifact@v3
|
||||
# - run: |
|
||||
# mv ./artifact/tikz-trackschematic-*.zip ./
|
||||
# mv ./artifact/metadata.json ./
|
||||
|
||||
# - name: "uploading to zenodo sandbox"
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# # ZENODO_ACCESS_TOKEN: ${{ secrets.ZENODO_ACCESS_TOKEN }}
|
||||
# ZENODO_SANDBOX_ACCESS_TOKEN: ${{ secrets.ZENODO_SANDBOX_ACCESS_TOKEN }}
|
||||
# uses: zenodraft/action@0.10.0
|
||||
# with:
|
||||
# # collection: 5539844
|
||||
# collection: 1047380
|
||||
# filenames: tikz-trackschematic-v0.7.0.zip
|
||||
# upsert-doi: true
|
||||
# upsert-location: identifiers[1]
|
||||
# metadata: metadata.json
|
||||
# publish: true
|
||||
# sandbox: true
|
||||
# verbose: true
|
||||
|
||||
publish_zenodo:
|
||||
needs: create_package
|
||||
name: "publish on zenodo sandbox"
|
||||
outputs:
|
||||
doi: ${{ steps.zenodraft.outputs.doi }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# download artifact in folder artifact/
|
||||
- uses: actions/download-artifact@v3
|
||||
- run: |
|
||||
mv ./artifact/tikz-trackschematic-${{needs.create_package.outputs.version}}.zip ./
|
||||
|
||||
- name: "install zenodraft"
|
||||
run: npm install -g zenodraft
|
||||
|
||||
- name: "uploading to zenodo sandbox"
|
||||
id: zenodraft
|
||||
env:
|
||||
ZENODO_SANDBOX_ACCESS_TOKEN: ${{ secrets.ZENODO_SANDBOX_ACCESS_TOKEN }}
|
||||
COLLECTION: 1047380
|
||||
run: |
|
||||
ID=$(zenodraft --sandbox deposition create in-existing-collection $COLLECTION)
|
||||
zenodraft --sandbox file add $ID tikz-trackschematic-*.zip
|
||||
zenodraft --sandbox metadata update $ID artifact/metadata.json
|
||||
zenodraft --sandbox deposition publish $ID
|
||||
echo "::set-output name=doi::$(zenodraft --sandbox deposition show prereserved $ID)"
|
||||
|
||||
update_citation:
|
||||
needs: publish_zenodo
|
||||
name: "updates CITATION.cff"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# 1. checkout the repo for zenodraft/action@0.10.0 to work
|
||||
- name: "checkout"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- run: ./build.sh --update-cite ${{needs.publish_zenodo.outputs.doi}}
|
||||
|
||||
- name: push
|
||||
uses: github-actions-x/commit@v2.8
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
push-branch: 'master'
|
||||
force-add: 'true'
|
||||
files: CITATION.cff
|
||||
commit-message: 'updated DOI (via github action)'
|
||||
name: Martin Scheidt
|
||||
email: m.scheidt@tu-bs.de
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"title": "TikZ-trackschematic",
|
||||
"version": "%%[SCRIPT]",
|
||||
"publication_date": "%%[SCRIPT]",
|
||||
"creators": [
|
||||
{
|
||||
"orcid": "0000-0002-9384-8945",
|
||||
"affiliation": "TU Braunschweig",
|
||||
"name": "Scheidt, Martin"
|
||||
}
|
||||
],
|
||||
"description": "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.",
|
||||
"keywords": [
|
||||
"tex",
|
||||
"tikz",
|
||||
"railway",
|
||||
"railroad",
|
||||
"tracks",
|
||||
"schematics"
|
||||
],
|
||||
"license": {
|
||||
"id": "ISC"
|
||||
},
|
||||
"language": "eng",
|
||||
"access_right": "open",
|
||||
"upload_type": "software",
|
||||
"communities": [
|
||||
{
|
||||
"identifier": "railtoolkit"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -277,4 +277,6 @@ Temporary Items
|
|||
.apdisk
|
||||
|
||||
# Archives for upload
|
||||
*.zip
|
||||
artifact
|
||||
tikz-trackschematic-*.zip
|
||||
release-note-*.md
|
|
@ -0,0 +1,174 @@
|
|||
# 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/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
Categories: Added, Changed, Deprecated, Removed, Fixed, and Security.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### 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
|
||||
|
||||
* unified build script for development
|
||||
|
||||
### Changed
|
||||
|
||||
* revised symbol and syntax for balises
|
||||
* the track loop was separated from the balises
|
||||
* replaced "\gettikzxy" with "\path let" syntax
|
||||
* label placement for derailers
|
||||
|
||||
### Fixed
|
||||
|
||||
* wrong option for labels in vehicles
|
||||
* foreground of sidetrack (alias)
|
||||
* PackageWarning Error in development mode
|
||||
|
||||
|
||||
## Version [0.6.3] - 2022-02-15
|
||||
|
||||
### Added
|
||||
|
||||
* anchor for SVG export
|
||||
* automated testing and releasing
|
||||
* separate changelog
|
||||
|
||||
### Fixed
|
||||
|
||||
* documented (slip-)turnout option: points=moving
|
||||
* spelling error in documentation
|
||||
* URL to signalschablone
|
||||
|
||||
|
||||
## Version [0.6.2] - 2021-10-15
|
||||
|
||||
### Fixed
|
||||
|
||||
* runaway argument
|
||||
* developer mode always on
|
||||
|
||||
|
||||
## Version [0.6.1] - 2021-09-30
|
||||
|
||||
### Added
|
||||
|
||||
* added citation information
|
||||
|
||||
### Removed
|
||||
|
||||
* removed package requirement lmodern
|
||||
|
||||
### Fixed
|
||||
|
||||
* minor correction in manual
|
||||
|
||||
|
||||
## Version [0.6] - 2021-01-02
|
||||
|
||||
### Added
|
||||
|
||||
* created an encapsulating package for future flexibility
|
||||
* added symbols for direction control, track marking, pylons and electric wiring
|
||||
|
||||
### Changed
|
||||
|
||||
* changed symbol for friction bufferstop;
|
||||
* changed load command to \usepackage{tikz-trackschematic}
|
||||
|
||||
|
||||
## Version [0.5.1] - 2020-02-10
|
||||
|
||||
### Added
|
||||
|
||||
* added symbols "braking point" and "danger point"
|
||||
|
||||
### Changed
|
||||
|
||||
* modified symbol "end of movement authority"
|
||||
|
||||
|
||||
## Version [0.5] - 2020-01-14
|
||||
|
||||
### Added
|
||||
|
||||
* documentation
|
||||
|
||||
### Changed
|
||||
|
||||
* new improved syntax for topology
|
||||
|
||||
|
||||
## Version [0.4] - 2019-07-21
|
||||
|
||||
### Added
|
||||
|
||||
* added document for symbology
|
||||
|
||||
### Changed
|
||||
|
||||
* renamed overview to snippets
|
||||
* reworked library for common tikz library layout
|
||||
|
||||
|
||||
## Version [0.3] - 2019-04-04
|
||||
|
||||
### Added
|
||||
|
||||
* added shunting movements
|
||||
* added points to turnouts
|
||||
* added moving trains
|
||||
* defined and used color foreground and background
|
||||
|
||||
### Changed
|
||||
|
||||
* moved snippet folder to root folder
|
||||
|
||||
|
||||
## Version [0.2] - 2018-12-19
|
||||
|
||||
### Added
|
||||
|
||||
* added transmitters
|
||||
|
||||
### Changed
|
||||
|
||||
* reorganized src library
|
||||
* minor improvements
|
||||
|
||||
|
||||
## Version [0.1] - 2018-09-14
|
||||
|
||||
### Added
|
||||
|
||||
Basic concept of a library with railway topology symbols and some examples.
|
||||
|
||||
|
||||
[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
|
||||
[0.6.1]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.6...v0.6.1
|
||||
[0.6]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.5.1...v0.6
|
||||
[0.5.1]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.5...v0.5.1
|
||||
[0.5]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.4...v0.5
|
||||
[0.4]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.3...v0.4
|
||||
[0.3]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.2...v0.3
|
||||
[0.2]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.1...v0.2
|
||||
[0.1]: https://github.com/railtoolkit/tikz-trackschematic/releases/tag/v0.1
|
72
CITATION.cff
72
CITATION.cff
|
@ -1,25 +1,57 @@
|
|||
# YAML 1.2
|
||||
# This CITATION.cff file was generated with cffinit.
|
||||
# Visit https://bit.ly/cffinit to generate yours today!
|
||||
---
|
||||
cff-version: 1.2.0
|
||||
message: If you use this software, please cite it using these metadata.
|
||||
title: TikZ-trackschematics
|
||||
abstract: A TikZ library for creating track diagrams in railways.
|
||||
title: tikz-trackschematic
|
||||
message: 'If you use this software, please cite both the proceedings from preferred-citation and the software itself.'
|
||||
type: software
|
||||
authors:
|
||||
- family-names: Scheidt
|
||||
given-names: Martin
|
||||
orcid: "https://orcid.org/0000-0002-9384-8945"
|
||||
version: 0.6.2
|
||||
date-released: "2021-10-15"
|
||||
- given-names: Martin
|
||||
family-names: Scheidt
|
||||
email: m.scheidt@tu-bs.de
|
||||
orcid: 'https://orcid.org/0000-0002-9384-8945'
|
||||
affiliation: TU Braunschweig
|
||||
identifiers:
|
||||
- description: This is the collection of archived snapshots of all versions of My Research Software
|
||||
type: doi
|
||||
value: "10.5281/zenodo.5539844"
|
||||
- description: Current version
|
||||
type: doi
|
||||
value: "10.5281/zenodo.5571594"
|
||||
- description: Package at Comprehensive TeX Archive Network (CTAN)
|
||||
type: url
|
||||
value: "https://ctan.org/pkg/tikz-trackschematic"
|
||||
license: ISC License
|
||||
repository-code: "https://repository.ivev.bau.tu-bs.de/martin/tikz-trackschematic"
|
||||
...
|
||||
- type: doi
|
||||
value: 10.5281/zenodo.5539844
|
||||
description: 'Collection of archived snapshots of all versions of the library'
|
||||
- type: doi
|
||||
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
|
||||
abstract: >-
|
||||
'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.'
|
||||
keywords:
|
||||
- tex
|
||||
- symbology
|
||||
- railway
|
||||
- railroad
|
||||
- operational scenarios
|
||||
- graphical description
|
||||
license: ISC
|
||||
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"
|
|
@ -5,19 +5,24 @@ email, or any other method with the owners of this repository before making a ch
|
|||
|
||||
Please note we have a code of conduct, please follow it in all your interactions with the project.
|
||||
|
||||
# Enhancing and developing the tikz-trackschematic library
|
||||
|
||||
1. The tikz-trackschematic should be regularly installed via TeX Live to modify the library. The distributed package comes with a development switch.
|
||||
2. Run the build script with `sudo ./build.sh --install-dev`. This will soft link the local files out of src folder into your TeX Live installation.
|
||||
3. The TeX command `\usepackage[dev]{tikz-trackschematic}` will load the linked src folder instead of the distributed package from TeX Live.
|
||||
4. After implementing your modification run `./build.sh --test` to check for any breaking changes.
|
||||
|
||||
# Pull Request Process
|
||||
|
||||
1. Ensure any install or build dependencies are removed before the end of the layer when doing a
|
||||
build.
|
||||
2. Update the README.md with details of changes to the interface, this includes new environment
|
||||
2. Update the CHANGELOG.md with details of changes to the interface, this includes new environment
|
||||
variables, exposed ports, useful file locations and container parameters.
|
||||
3. The versioning scheme we use is [SemVer](http://semver.org/). Increase the version numbers in the following files to the new version that this Pull Request would represent:
|
||||
1. README.md
|
||||
2. doc/versionhistory.tex and recompile manual.tex & snippets.tex
|
||||
3. src/tikz-trackschematic.sty
|
||||
1. CHANGELOG.md
|
||||
2. doc/versionhistory.tex
|
||||
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
|
||||
do not have permission to do that, you may request the second reviewer to merge it for you.
|
||||
5. The following versioning steps will be taken care of by the maintainer:
|
||||
1. git repo with tag
|
||||
2. CITATION.cff including DOI for current version
|
||||
3. sync Overleaf project
|
||||
2. sync Overleaf project
|
||||
|
|
72
README.md
72
README.md
|
@ -1,5 +1,7 @@
|
|||
# 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) [![CI test](https://github.com/railtoolkit/tikz-trackschematic/actions/workflows/testing.yaml/badge.svg)](https://github.com/railtoolkit/tikz-trackschematic/actions/workflows/testing.yaml)
|
||||
|
||||
------------
|
||||
|
||||
# Installation
|
||||
|
@ -12,6 +14,7 @@ The tikz library is contained in the files:
|
|||
* tikzlibrarytrackschematic.trafficcontrol.code.tex,
|
||||
* tikzlibrarytrackschematic.vehicles.code.tex,
|
||||
* tikzlibrarytrackschematic.constructions.code.tex,
|
||||
* tikzlibrarytrackschematic.symbology.code.tex,
|
||||
* tikzlibrarytrackschematic.electrics.code.tex, and
|
||||
* tikzlibrarytrackschematic.measures.code.tex.
|
||||
|
||||
|
@ -25,6 +28,8 @@ The library can then be loaded through the command
|
|||
```
|
||||
in any LaTeX file.
|
||||
|
||||
The library can also be used in [Overleaf](https://www.overleaf.com/read/crrxfcdzbhbd).
|
||||
|
||||
------------
|
||||
|
||||
# Minimal working example
|
||||
|
@ -54,75 +59,11 @@ results in:
|
|||
|
||||
![train on a track](https://raw.githubusercontent.com/railtoolkit/tikz-trackschematic/master/doc/examples/minimal_working_example.png "train on a track")
|
||||
|
||||
The library can also be used in [Overleaf](https://www.overleaf.com/read/crrxfcdzbhbd).
|
||||
|
||||
------------
|
||||
|
||||
# Symbology and meaning
|
||||
|
||||
Please consult the [symbology table](https://github.com/railtoolkit/tikz-trackschematic/blob/master/doc/symbology_table.pdf) for further information regarding meaning of the symbols.
|
||||
|
||||
------------
|
||||
|
||||
# History
|
||||
|
||||
## Version 0.6.3
|
||||
|
||||
ADDED: anchor for SVG export
|
||||
FIXED: documented (slip-)turnout option: points=moving
|
||||
FIXED: spelling error in documentation
|
||||
|
||||
## Version 0.6.2
|
||||
|
||||
bug fixing
|
||||
|
||||
## Version 0.6.1
|
||||
|
||||
* removed package requirement lmodern
|
||||
* minor correction in manual
|
||||
* added citation information
|
||||
|
||||
## Version 0.6
|
||||
|
||||
* created an encapsulating package for future flexibility
|
||||
* added symbols for direction control, track marking, pylons and electric wiring
|
||||
* change symbol for friction bufferstop;
|
||||
* changed load command to \usepackage{tikz-trackschematic}
|
||||
|
||||
## Version 0.5.1
|
||||
|
||||
* modified symbol "end of movement authority"
|
||||
* added symbols "braking point" and "danger point"
|
||||
|
||||
## Version 0.5
|
||||
|
||||
* new improved syntax for topology
|
||||
* documentation
|
||||
|
||||
## Version 0.4
|
||||
|
||||
* added document for symbology
|
||||
* renamed overview to snippets
|
||||
* reworked library for common tikz library layout
|
||||
|
||||
## Version 0.3
|
||||
|
||||
* moved snippet folder to root folder
|
||||
* added shunting movements
|
||||
* added points to turnouts
|
||||
* added moving trains
|
||||
* defined and used color foreground and background
|
||||
|
||||
|
||||
## Version 0.2
|
||||
|
||||
* added transmitters
|
||||
* reorganized src library
|
||||
* minor improvements
|
||||
|
||||
## Version 0.1
|
||||
|
||||
Basic concept of a library with railway topology symbols and some examples.
|
||||
Please consult the [symbology table](https://github.com/railtoolkit/tikz-trackschematic/blob/master/doc/symbology-table.pdf) for further information regarding meaning of the symbols.
|
||||
|
||||
------------
|
||||
|
||||
|
@ -130,7 +71,6 @@ Please consult the [symbology table](https://github.com/railtoolkit/tikz-tracksc
|
|||
|
||||
* rethink syntax
|
||||
* provide option for internationalziation (i18n)
|
||||
* replace "\gettikzxy" with "\path let" syntax
|
||||
* rewrite library with better coding skills
|
||||
* include support for glossaries package
|
||||
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Copyright (c) 2018 - 2022, Martin Scheidt (ISC license)
|
||||
# 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.
|
||||
|
||||
echo "specify version ( e.g. v0.6 ):"
|
||||
read VERSION
|
||||
|
||||
# create temporary folder
|
||||
mkdir tikz-trackschematic-$VERSION
|
||||
|
||||
# copy README and .sty-file
|
||||
cp README.md tikz-trackschematic-$VERSION/README.md
|
||||
cp doc/tikz-trackschematic-documentation.sty tikz-trackschematic-$VERSION/tikz-trackschematic-documentation.sty
|
||||
|
||||
# copy and rename documentation
|
||||
cp doc/manual.pdf tikz-trackschematic-$VERSION/tikz-trackschematic.pdf
|
||||
cp doc/manual.tex tikz-trackschematic-$VERSION/tikz-trackschematic.tex
|
||||
cp doc/snippets.pdf tikz-trackschematic-$VERSION/tikz-trackschematic-snippets.pdf
|
||||
cp doc/snippets.tex tikz-trackschematic-$VERSION/tikz-trackschematic-snippets.tex
|
||||
mkdir tikz-trackschematic-$VERSION/tikz-trackschematic-examples
|
||||
mkdir tikz-trackschematic-$VERSION/tikz-trackschematic-snippets
|
||||
cp -R doc/examples/* tikz-trackschematic-$VERSION/tikz-trackschematic-examples
|
||||
cp -R doc/snippets/* tikz-trackschematic-$VERSION/tikz-trackschematic-snippets
|
||||
|
||||
# copy src
|
||||
cp src/tikz-trackschematic.sty tikz-trackschematic-$VERSION/tikz-trackschematic.sty
|
||||
cp src/tikzlibrarytrackschematic.code.tex tikz-trackschematic-$VERSION/tikzlibrarytrackschematic.code.tex
|
||||
cp src/tikzlibrarytrackschematic.constructions.code.tex tikz-trackschematic-$VERSION/tikzlibrarytrackschematic.constructions.code.tex
|
||||
cp src/tikzlibrarytrackschematic.electrics.code.tex tikz-trackschematic-$VERSION/tikzlibrarytrackschematic.electrics.code.tex
|
||||
cp src/tikzlibrarytrackschematic.measures.code.tex tikz-trackschematic-$VERSION/tikzlibrarytrackschematic.measures.code.tex
|
||||
cp src/tikzlibrarytrackschematic.topology.code.tex tikz-trackschematic-$VERSION/tikzlibrarytrackschematic.topology.code.tex
|
||||
cp src/tikzlibrarytrackschematic.trafficcontrol.code.tex tikz-trackschematic-$VERSION/tikzlibrarytrackschematic.trafficcontrol.code.tex
|
||||
cp src/tikzlibrarytrackschematic.vehicles.code.tex tikz-trackschematic-$VERSION/tikzlibrarytrackschematic.vehicles.code.tex
|
||||
cp src/tikzlibrarytrackschematic.symbology.code.tex tikz-trackschematic-$VERSION/tikzlibrarytrackschematic.symbology.code.tex
|
||||
|
||||
# zip package
|
||||
zip -r tikz-trackschematic-$VERSION.zip tikz-trackschematic-$VERSION/*
|
||||
|
||||
#cleanup
|
||||
rm -rf tikz-trackschematic-$VERSION/*
|
||||
rmdir tikz-trackschematic-$VERSION
|
115
dev-install.sh
115
dev-install.sh
|
@ -1,115 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Copyright (c) 2018 - 2022, Martin Scheidt (ISC license)
|
||||
# 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.
|
||||
|
||||
## -- log functions
|
||||
|
||||
# Halt on error
|
||||
set -e
|
||||
|
||||
ECHO=`which echo`
|
||||
|
||||
error_occured=0
|
||||
|
||||
exec 3>&2 # logging stream (file descriptor 3) defaults to STDERR
|
||||
verbosity=2 # default to show warnings
|
||||
silent_lvl=0
|
||||
err_lvl=1
|
||||
wrn_lvl=2
|
||||
inf_lvl=3
|
||||
dbg_lvl=4
|
||||
|
||||
log_n() { log $silent_lvl "NOTE: $1"; } # Always prints
|
||||
log_e() { log $err_lvl "ERROR: $1"; }
|
||||
log_w() { log $wrn_lvl "WARNING: $1"; }
|
||||
log_i() { log $inf_lvl "INFO: $1"; } # "info" is already a command
|
||||
log_d() { log $dbg_lvl "DEBUG: $1"; }
|
||||
log() {
|
||||
if [ $verbosity -ge $1 ]; then
|
||||
# Expand escaped characters, wrap at 70 chars, indent wrapped lines
|
||||
$ECHO "$2" | fold -w80 -s >&3 || true
|
||||
fi
|
||||
$ECHO "$2" | fold -w80 -s >> $logfile || true
|
||||
}
|
||||
|
||||
## -- commands
|
||||
TEXlsr=`which mktexlsr`
|
||||
|
||||
check_texlive() {
|
||||
# check for kpsewhich
|
||||
status=0
|
||||
command -v kpsewhich >/dev/null 2>&1 || status=1
|
||||
if [ $status = 0 ]; then
|
||||
log_d "kpsewhich found"
|
||||
return 0
|
||||
fi
|
||||
|
||||
log_e "Program 'kpsewhich' not found."
|
||||
log_e "Be sure to use texlive or mactex!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# checks if sudo is available
|
||||
check_sudo() {
|
||||
rootrun=""
|
||||
# If we are root, we do note require sudo
|
||||
if [ "$EUID" = 0 ]; then
|
||||
log_d "you are root"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if sudo -v >/dev/null 2>&1; then
|
||||
log_d "sudo ok"
|
||||
rootrun="sudo"
|
||||
else
|
||||
log_d "sudo failed"
|
||||
# Check if user is root (might be unnecessary)
|
||||
if ! [ $(id -u) = 0 ]; then
|
||||
log_e "This script must be run as root" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
check_texlive
|
||||
check_sudo
|
||||
|
||||
TEXMFLOCAL=$(kpsewhich --var-value TEXMFLOCAL)
|
||||
|
||||
DEVDIR="tikz-trackschematic-dev"
|
||||
|
||||
PROJECTDIR=$(pwd -P)
|
||||
|
||||
echo ""
|
||||
echo "Do you wish to link this package from"
|
||||
echo "$PROJECTDIR/src to"
|
||||
echo "$TEXMFLOCAL/tex/latex/$DEVDIR?"
|
||||
echo "(y/n)"
|
||||
while true; do
|
||||
read -p "" answer
|
||||
case $answer in
|
||||
[Yy]* ) break;;
|
||||
[Nn]* ) exit 1;;
|
||||
* ) echo "Please answer yes or no.";;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ! -d "$TEXMFLOCAL/tex/latex/$DEVDIR" ]; then
|
||||
$rootrun mkdir -p $TEXMFLOCAL/tex/latex/$DEVDIR
|
||||
fi
|
||||
|
||||
|
||||
$rootrun ln -sfn $PROJECTDIR/src/tikz-trackschematic.sty $TEXMFLOCAL/tex/latex/$DEVDIR/tikz-trackschematic-dev.sty
|
||||
$rootrun ln -sfn $PROJECTDIR/src/tikzlibrarytrackschematic.code.tex $TEXMFLOCAL/tex/latex/$DEVDIR/tikzlibrarytrackschematic-dev.code.tex
|
||||
$rootrun ln -sfn $PROJECTDIR/src/tikzlibrarytrackschematic.constructions.code.tex $TEXMFLOCAL/tex/latex/$DEVDIR/tikzlibrarytrackschematic-dev.constructions.code.tex
|
||||
$rootrun ln -sfn $PROJECTDIR/src/tikzlibrarytrackschematic.electrics.code.tex $TEXMFLOCAL/tex/latex/$DEVDIR/tikzlibrarytrackschematic-dev.electrics.code.tex
|
||||
$rootrun ln -sfn $PROJECTDIR/src/tikzlibrarytrackschematic.measures.code.tex $TEXMFLOCAL/tex/latex/$DEVDIR/tikzlibrarytrackschematic-dev.measures.code.tex
|
||||
$rootrun ln -sfn $PROJECTDIR/src/tikzlibrarytrackschematic.topology.code.tex $TEXMFLOCAL/tex/latex/$DEVDIR/tikzlibrarytrackschematic-dev.topology.code.tex
|
||||
$rootrun ln -sfn $PROJECTDIR/src/tikzlibrarytrackschematic.trafficcontrol.code.tex $TEXMFLOCAL/tex/latex/$DEVDIR/tikzlibrarytrackschematic-dev.trafficcontrol.code.tex
|
||||
$rootrun ln -sfn $PROJECTDIR/src/tikzlibrarytrackschematic.vehicles.code.tex $TEXMFLOCAL/tex/latex/$DEVDIR/tikzlibrarytrackschematic-dev.vehicles.code.tex
|
||||
$rootrun ln -sfn $PROJECTDIR/src/tikzlibrarytrackschematic.symbology.code.tex $TEXMFLOCAL/tex/latex/$DEVDIR/tikzlibrarytrackschematic-dev.symbology.code.tex
|
||||
|
||||
$rootrun $TEXlsr --quiet
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
@ -1,19 +1,16 @@
|
|||
\documentclass{standalone} % LaTeX
|
||||
\usepackage{tikz-trackschematic} % loading the library
|
||||
\documentclass{standalone}
|
||||
|
||||
\begin{document}
|
||||
\begin{tikzpicture}
|
||||
% loading the library
|
||||
\usepackage{tikz-trackschematic}
|
||||
|
||||
% TikZ command: specify coordinates
|
||||
\coordinate (A) at (0,0);
|
||||
\coordinate (B) at (6,0);
|
||||
\coordinate (T) at (5,0);
|
||||
\begin{document} % LaTeX
|
||||
\begin{tikzpicture} % TikZ
|
||||
|
||||
% draw a track
|
||||
\maintrack (A) -- (B);
|
||||
% draw a track with (x,y) coordinates
|
||||
\maintrack (0,0) -- (6,0);
|
||||
|
||||
% place a train on the track
|
||||
\train[forward] at (T) label ();
|
||||
\train[forward] at (5,0) label ();
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{document}
|
||||
\end{document}
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
|
@ -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};
|
||||
|
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 73 KiB |
|
@ -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};
|
||||
|
|
BIN
doc/manual.pdf
BIN
doc/manual.pdf
Binary file not shown.
146
doc/manual.tex
146
doc/manual.tex
|
@ -4,15 +4,7 @@
|
|||
|
||||
% 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.
|
||||
|
||||
\documentclass[
|
||||
paper=a4,
|
||||
% version=3.25,
|
||||
pagesize=pdftex,
|
||||
twoside=false,
|
||||
toc=listof,
|
||||
BCOR=0pt,
|
||||
DIV=15,
|
||||
]{scrartcl}
|
||||
\documentclass{scrartcl}
|
||||
|
||||
\usepackage{tikz-trackschematic-documentation}
|
||||
|
||||
|
@ -21,7 +13,7 @@
|
|||
%\newcommand{\initials}{fullname}
|
||||
\newcommand{\MS}{Martin Scheidt}
|
||||
\newcommand{\GW}{Gregor Wehrle}
|
||||
\newcommand{\authorlist}{\MS, \GW}
|
||||
\newcommand{\authorlist}{by the project contributors}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
@ -35,7 +27,7 @@
|
|||
|
||||
\begin{document}
|
||||
|
||||
\title{\tikz\node[scale=1.2]{\color{gray}\Huge\sffamily \{\textcolor{black}{Ti\textcolor{orange}{\emph{k}}Z}-\textcolor{blue}{trackschematic}\}};}
|
||||
\title{\color{gray}\Huge\sffamily \{\textcolor{black}{Ti\textcolor{orange}{\emph{k}}Z}-\textcolor{blue}{trackschematic}\}}
|
||||
\subtitle{A Ti\emph{k}Z library for track schematics}
|
||||
\author{\authorlist}
|
||||
\date{Version \vhCurrentVersion~ from \vhCurrentDate}
|
||||
|
@ -49,42 +41,43 @@
|
|||
|
||||
\section{Introduction}\label{sec:intro}
|
||||
|
||||
\subsection[About]{About tikz-trackschematic}
|
||||
\subsection{About tikz-trackschematic}
|
||||
|
||||
The Ti\emph{k}Z-\emph{trackschematic} library is a toolbox of symbols geared primarily towards creating track schematic for either research or educational purposes.
|
||||
It provides a Ti\emph{k}Z frontend to some of the symbols which maybe needed to describe situations and layouts in railway operation.
|
||||
The library is divided into four sublibraries:
|
||||
\begin{itemize*}[label={}]
|
||||
The library is divided into the following sublibraries:
|
||||
\begin{itemize}
|
||||
\item \texttt{topology},
|
||||
\item \texttt{trafficcontrol},
|
||||
\item \texttt{vehicles},
|
||||
\item \texttt{constructions},
|
||||
\item \texttt{symbology},
|
||||
\item \texttt{electrics}, and
|
||||
\item \texttt{measures}.
|
||||
\end{itemize*}
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Acknowledgement}
|
||||
|
||||
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}
|
||||
|
||||
The library uses Ti\emph{k}Z and it is based the following packages:
|
||||
\begin{itemize*}[label={}]
|
||||
\begin{itemize}
|
||||
\item \texttt{tikz},
|
||||
\item \texttt{lmodern},
|
||||
\item \texttt{xcolor}, and
|
||||
\item \texttt{etoolbox}.
|
||||
\end{itemize*}
|
||||
\end{itemize}
|
||||
|
||||
Further more it uses the following Ti\emph{k}Z libraries:
|
||||
\begin{itemize*}[label={}]
|
||||
\begin{itemize}
|
||||
\item \texttt{calc},
|
||||
\item \texttt{intersections},
|
||||
\item \texttt{patterns}, and
|
||||
\item \texttt{arrows.meta}.
|
||||
\end{itemize*}
|
||||
\end{itemize}
|
||||
|
||||
|
||||
\subsection{License}
|
||||
|
@ -94,7 +87,7 @@
|
|||
|
||||
\subsection{Alternatives}
|
||||
|
||||
Apart from this library, there is also a \href{https://tu-dresden.de/bu/verkehr/ibv/vst/die-professur/mitarb/ulrich-maschek/signalschablone}{Signalschablone} with german (Deutsche Bahn) symbols for MS Visio.
|
||||
Apart from this library, there is also the \href{https://tu-dresden.de/bu/verkehr/ibv/vst/die-professur/mitarb/ulrich-maschek/signalschablone}{Signalschablone} with german (Deutsche Bahn) symbols for MS Visio.
|
||||
|
||||
|
||||
% \newpage
|
||||
|
@ -105,24 +98,7 @@
|
|||
Here is a complete working minimal example which will produce a single PDF file with the figure on the right:\\
|
||||
\begin{minipage}[c]{0.51\textwidth}
|
||||
\centering
|
||||
\begin{lstlisting}[gobble=8]
|
||||
\documentclass{standalone}
|
||||
|
||||
% loading the library
|
||||
\usepackage{tikz-trackschematic}
|
||||
|
||||
\begin{document}
|
||||
\begin{tikzpicture}
|
||||
|
||||
% draw a track
|
||||
\maintrack (0,0) -- (6,0);
|
||||
|
||||
% place a train on the track
|
||||
\train[forward] at (5,0) label ();
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{document}
|
||||
\end{lstlisting}
|
||||
\lstinputlisting{examples/minimal_working_example.tex}
|
||||
\end{minipage}
|
||||
\hfil
|
||||
\begin{minipage}[c]{0.45\textwidth}
|
||||
|
@ -167,7 +143,7 @@
|
|||
\begin{minipage}[c]{0.68\textwidth}
|
||||
\begin{lstlisting}[gobble=6]
|
||||
|
||||
\train[face=forward ] at (coordinate) label ();
|
||||
\train[face=forward] at (coordinate) label ();
|
||||
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
|
@ -207,7 +183,7 @@
|
|||
\begin{minipage}[c]{0.68\textwidth}
|
||||
\begin{lstlisting}[gobble=6]
|
||||
|
||||
\turnout[forward ,branch=right] at (coordinate) label ();
|
||||
\turnout[forward,branch=right] at (coordinate) label ();
|
||||
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
|
@ -218,7 +194,7 @@
|
|||
\begin{minipage}[c]{0.68\textwidth}
|
||||
\begin{lstlisting}[gobble=6]
|
||||
|
||||
\turnout[backward,branch=left ] at (coordinate) label ();
|
||||
\turnout[backward,branch=left] at (coordinate) label ();
|
||||
|
||||
\end{lstlisting}
|
||||
\end{minipage}
|
||||
|
@ -245,6 +221,7 @@
|
|||
The default traffic practice for this library ist right-hand traffic.
|
||||
You can change it either globally or locally with the key \texttt{traffic practice=left}.
|
||||
There is also the alias \texttt{position} for single local entries.
|
||||
|
||||
\begin{minipage}[c]{0.65\textwidth}
|
||||
\begin{lstlisting}[gobble=8]
|
||||
\documentclass{standalone}
|
||||
|
@ -285,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]
|
||||
|
@ -294,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}
|
||||
|
@ -309,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);
|
||||
|
@ -550,7 +529,7 @@
|
|||
values for \texttt{options} (comma seperated):
|
||||
\begin{itemize}[label={}]
|
||||
\item \texttt{length=\textit{length unit}} (optional, default 4cm)
|
||||
\item \texttt{label at=\{\textit{(label-coord)}\}} (optional, default: \textit{center})
|
||||
\item \texttt{shift label=\{\textit{(label-coord)}\}} (optional, default: (0,0))
|
||||
\item \texttt{label align=left} or \texttt{label align=right} (optional, default: center)
|
||||
\item \texttt{foreground=\textit{color}} (optional, default: \texttt{black})
|
||||
\item \texttt{background=\textit{color}} (optional, default: \texttt{white})
|
||||
|
@ -578,7 +557,7 @@
|
|||
\item \texttt{operation=manual} or \texttt{operation=automatic} (optional) % \texttt{operation=undefined} (default)
|
||||
\item \texttt{bend left at=\{\textit{(bend-coord)}\}} (optional, default: \textit{none})
|
||||
\item \texttt{bend right at=\{\textit{(bend-coord)}\}} (optional, default: \textit{none})
|
||||
\item \texttt{label at=\{\textit{(label-coord)}\}} (optional, default: \textit{center})
|
||||
\item \texttt{shift label=\{\textit{(label-coord)}\}} (optional, default: (0,0))
|
||||
\item \texttt{label align=left} or \texttt{label align=right} (optional, default: center)
|
||||
\item \texttt{foreground=\textit{color}} (optional, default: \texttt{black})
|
||||
\item \texttt{background=\textit{color}} (optional, default: \texttt{white})
|
||||
|
@ -1049,46 +1028,40 @@
|
|||
|
||||
\subsubsection{Transmitters}\label{sec:transmitters}
|
||||
|
||||
\symboldescription{Generic transmitter command}\label{sym:generictransmitter}
|
||||
\begin{lstlisting}[gobble=10]
|
||||
\transmitter[options] at (coord) label (name);
|
||||
\end{lstlisting}
|
||||
values for \texttt{options} (comma seperated):
|
||||
\begin{itemize}[label={}]
|
||||
\item \texttt{type=balise} or \texttt{type=loop} (mandatory)
|
||||
\item \texttt{forward}, \texttt{backward} or \texttt{bidirectional} (optional)
|
||||
\item \texttt{position=left} or \texttt{position=right} (optional, default: \textit{traffic practice})
|
||||
\item \texttt{shift label=\{\textit{(label-coord)}\}} (optional, default: (0,0))
|
||||
\item \texttt{foreground=\textit{color}} (optional, default: \texttt{black})
|
||||
\end{itemize}
|
||||
|
||||
|
||||
\symboldescription{Balise}\label{sym:balise}
|
||||
\tsSymbol{transmitter_forward}
|
||||
\tsSymbol{balise_group}
|
||||
\tsSymbol{balise_individual}
|
||||
\begin{lstlisting}[gobble=10]
|
||||
\balise[options] at (coord) label (name);
|
||||
\end{lstlisting}
|
||||
values for \texttt{options} (comma seperated):
|
||||
\begin{itemize}[label={}]
|
||||
\item \texttt{forward}, \texttt{backward} or \texttt{bidirectional} (optional)
|
||||
\item \texttt{forward}, or \texttt{backward} (mandatory)
|
||||
\item \texttt{position=left} or \texttt{position=right} (optional, default: \textit{traffic practice})
|
||||
\item \texttt{switched} (optional)
|
||||
\item \texttt{shift label=\{\textit{(label-coord)}\}} (optional, default: (0,0))
|
||||
\item \texttt{foreground=\textit{color}} (optional, default: \texttt{black})
|
||||
\end{itemize}
|
||||
This command is equivalent to:
|
||||
\begin{lstlisting}[gobble=10]
|
||||
\transmitter[type=balise,options] at (coord) label (name);
|
||||
\end{lstlisting}
|
||||
The basic state is one in which the individual balises are not shown. The direction of the balises is the same as the direction of action. The direction of the balises is indicated by the orientation of the label. The \texttt{switched} option changes the symbol over the entire length.
|
||||
\begin{itemize}[label={}]
|
||||
\item \texttt{along=\{\textit{comma separated list of integers}\}} (optional)
|
||||
\item \texttt{oppose=\{\textit{comma separated list of integers}\}} (optional)
|
||||
\item \texttt{along switched=\{\textit{comma separated list of integers}\}} (optional)
|
||||
\item \texttt{oppose switched=\{\textit{comma separated list of integers}\}} (optional)
|
||||
\item \texttt{index} (optional)
|
||||
\end{itemize}
|
||||
If individual balises are to be shown, they are indicated via the \texttt{along} or \texttt{along switched} with the direction of the balise and with \texttt{oppose} or \texttt{oppose switched} against the balise. A list with integer values is passed to the parameter. The list starts with 0. For example, three individual balises are drawn with the list \{0,1,3\} and the balise at position 2 is left out. With the option \texttt{index}, the index number can also be displayed. If one of the options \texttt{along}, \texttt{along switched}, \texttt{oppose}, or \texttt{oppose switched} is set, the \texttt{switched} option is ignored.
|
||||
|
||||
\mbox{}\\[0.2cm]
|
||||
Symbology entry as seen at top:
|
||||
\begin{lstlisting}[gobble=10]
|
||||
\tsSymbol{transmitter_forward}% TeX environment
|
||||
\tsSymbol{balise_group}% TeX environment
|
||||
\tsSymbol{balise_individual}% TeX environment
|
||||
\end{lstlisting}
|
||||
|
||||
|
||||
\symboldescription{Loop}\label{sym:loop}
|
||||
\tsSymbol{loop_transmitter}
|
||||
\tsSymbol{trackloop}
|
||||
\begin{lstlisting}[gobble=10]
|
||||
\trackloop[options] at (coord) label (name);
|
||||
\end{lstlisting}
|
||||
|
@ -1098,15 +1071,11 @@
|
|||
\item \texttt{shift label=\{\textit{(label-coord)}\}} (optional, default: (0,0))
|
||||
\item \texttt{foreground=\textit{color}} (optional, default: \texttt{black})
|
||||
\end{itemize}
|
||||
This command is equivalent to:
|
||||
\begin{lstlisting}[gobble=10]
|
||||
\transmitter[type=loop,options] at (coord) label (name);
|
||||
\end{lstlisting}
|
||||
|
||||
\mbox{}\\[0.2cm]
|
||||
Symbology entry as seen at top:
|
||||
\begin{lstlisting}[gobble=10]
|
||||
\tsSymbol{loop_transmitter}% TeX environment
|
||||
\tsSymbol{trackloop}% TeX environment
|
||||
\end{lstlisting}
|
||||
|
||||
|
||||
|
@ -1402,7 +1371,7 @@
|
|||
\end{lstlisting}
|
||||
|
||||
|
||||
\subsection{Messures}\label{sec:measures}
|
||||
\subsection{Measures}\label{sec:measures}
|
||||
|
||||
\symboldescription{Track distance}\label{sym:trackdistance}
|
||||
\tsSymbol[2.0]{track_distance}
|
||||
|
@ -1446,8 +1415,13 @@
|
|||
\end{lstlisting}
|
||||
No \texttt{options} available.\\
|
||||
This command is equivalent to:
|
||||
\begin{lstlisting}[gobble=10]
|
||||
\path[draw=foreground!50!background,dashed,shorten <=0.75cm,shorten >=0.75cm] (coord1) -- (coord2);
|
||||
\begin{lstlisting}[gobble=8]
|
||||
\path[
|
||||
draw=foreground!50!background,
|
||||
dashed,
|
||||
shorten <=0.75cm,
|
||||
shorten >=0.75cm
|
||||
] (coord1) -- (coord2);
|
||||
\end{lstlisting}
|
||||
|
||||
\mbox{}\\[0.2cm]
|
||||
|
@ -1483,7 +1457,7 @@
|
|||
|
||||
\symboldescription{Track Marking}\label{sym:trackmarking}
|
||||
\tsSymbol{track_marking}
|
||||
\begin{lstlisting}[gobble=10]
|
||||
\begin{lstlisting}[gobble=8]
|
||||
\trackmarking[color] (coord1) -- (coord2);
|
||||
\end{lstlisting}
|
||||
\begin{itemize}[label={}]
|
||||
|
@ -1614,13 +1588,11 @@
|
|||
\hline
|
||||
\No & direction control & \tsSymbol{direction_control} & \ref{sec:routes} \\
|
||||
\hline
|
||||
\No & transmitter & \tsSymbol{transmitter} & \ref{sec:transmitters} \\
|
||||
\No & balise group & \tsSymbol{balise_group} & \ref{sec:transmitters} \\
|
||||
\hline
|
||||
\No & transmitter effective forward & \tsSymbol{transmitter_forward} & \ref{sec:transmitters} \\
|
||||
\No & balise individual & \tsSymbol{balise_individual} & \ref{sec:transmitters} \\
|
||||
\hline
|
||||
\No & transmitter bidirectional & \tsSymbol{transmitter_bidirectional} & \ref{sec:transmitters} \\
|
||||
\hline
|
||||
\No & loop transmitter & \tsSymbol{loop_transmitter} & \ref{sec:transmitters} \\
|
||||
\No & track loop & \tsSymbol{trackloop} & \ref{sec:transmitters} \\
|
||||
\hline
|
||||
\No & platform & \tsSymbol[1.4]{platform} & \ref{sec:constructions} \\
|
||||
\hline
|
||||
|
|
BIN
doc/snippets.pdf
BIN
doc/snippets.pdf
Binary file not shown.
|
@ -569,33 +569,33 @@ No. & Name & Clip & Code & Manual reference\\
|
|||
%% transmitter %%
|
||||
|
||||
\hline
|
||||
\No & transmitter (right \& left) &
|
||||
\symbol{transmitter.tikz} & \code{transmitter.tikz} &
|
||||
\parbox[c]{4cm}{\centering\texttt{trafficcontrol} \\ Section \ref{sym:generictransmitter} p. \pageref{sym:generictransmitter}} \\
|
||||
|
||||
\hline
|
||||
\No & \parbox[c]{5cm}{transmitter (right)\\with signal} &
|
||||
\symbol{transmitter_right_with_signal.tikz} & \code{transmitter_right_with_signal.tikz} &
|
||||
\parbox[c]{4cm}{\centering\texttt{trafficcontrol} \\ Section \ref{sym:generictransmitter} p. \pageref{sym:generictransmitter} \\ \& \\ Section \ref{sym:routesignal} p. \pageref{sym:routesignal}} \\
|
||||
|
||||
\hline
|
||||
\No & \parbox[c]{5cm}{transmitter (right \& left)\\ effective forward} &
|
||||
\symbol{transmitter_forward.tikz} & \code{transmitter_forward.tikz} &
|
||||
\No & balise (forward \& backward) &
|
||||
\symbol{balises.tikz} & \code{balises.tikz} &
|
||||
\parbox[c]{4cm}{\centering\texttt{trafficcontrol} \\ Section \ref{sym:balise} p. \pageref{sym:balise}} \\
|
||||
|
||||
\hline
|
||||
\No & \parbox[c]{5cm}{transmitter (right \& left)\\ effective backward} &
|
||||
\symbol{transmitter_backward.tikz} & \code{transmitter_backward.tikz} &
|
||||
\No & \parbox[c]{5cm}{balise (forward)\\with signal} &
|
||||
\symbol{balise_forward_with_signal.tikz} & \code{balise_forward_with_signal.tikz} &
|
||||
\parbox[c]{4cm}{\centering\texttt{trafficcontrol} \\ Section \ref{sym:balise} p. \pageref{sym:balise} \\ \& \\ Section \ref{sym:routesignal} p. \pageref{sym:routesignal}} \\
|
||||
|
||||
\hline
|
||||
\No & \parbox[c]{5cm}{balise (forward \& backward)\\ switched} &
|
||||
\symbol{balise_switched.tikz} & \code{balise_switched.tikz} &
|
||||
\parbox[c]{4cm}{\centering\texttt{trafficcontrol} \\ Section \ref{sym:balise} p. \pageref{sym:balise}} \\
|
||||
|
||||
\hline
|
||||
\No & \parbox[c]{5cm}{transmitter (right \& left)\\ effective bidirectional} &
|
||||
\symbol{transmitter_bidirectional.tikz} & \code{transmitter_bidirectional.tikz} &
|
||||
\No & \parbox[c]{5cm}{individual balises\\ (forward \& backward)} &
|
||||
\symbol{individual_balises.tikz} & \code{individual_balises.tikz} &
|
||||
\parbox[c]{4cm}{\centering\texttt{trafficcontrol} \\ Section \ref{sym:balise} p. \pageref{sym:balise}} \\
|
||||
|
||||
\hline
|
||||
\No & loop transmitter&
|
||||
\symbol{loop_transmitter.tikz} & \code{loop_transmitter.tikz} &
|
||||
\No & \parbox[c]{5cm}{individual balises\\ (forward \& backward) mixed} &
|
||||
\symbol{individual_balises_mixed.tikz} & \code{individual_balises_mixed.tikz} &
|
||||
\parbox[c]{4cm}{\centering\texttt{trafficcontrol} \\ Section \ref{sym:balise} p. \pageref{sym:balise}} \\
|
||||
|
||||
\hline
|
||||
\No & track loop &
|
||||
\symbol{trackloop.tikz} & \code{trackloop.tikz} &
|
||||
\parbox[c]{4cm}{\centering\texttt{trafficcontrol} \\ Section \ref{sym:loop} p. \pageref{sym:loop}} \\
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%
|
||||
|
|
|
@ -11,4 +11,4 @@
|
|||
\maintrack (A) -- (B);
|
||||
|
||||
\routesignal[forward] at (S) label ();
|
||||
\balise[] at (S) label ();
|
||||
\balise[forward] at (S) label ();
|
|
@ -11,5 +11,5 @@
|
|||
|
||||
\maintrack (A) -- (B);
|
||||
|
||||
\balise[forward] at (T1) label ();
|
||||
\balise[forward,position=left] at (T2) label ();
|
||||
\balise[forward,switched] at (T1) label ();
|
||||
\balise[backward,switched] at (T2) label ();
|
|
@ -11,5 +11,5 @@
|
|||
|
||||
\maintrack (A) -- (B);
|
||||
|
||||
\balise[] at (T1) label ();
|
||||
\balise[position=left] at (T2) label ();
|
||||
\balise[forward] at (T1) label ();
|
||||
\balise[backward] at (T2) label ();
|
|
@ -11,5 +11,5 @@
|
|||
|
||||
\maintrack (A) -- (B);
|
||||
|
||||
\balise[backward] at (T1) label ();
|
||||
\balise[backward,position=left] at (T2) label ();
|
||||
\balise[forward,along={0,1,2,3}] at (T1) label (A);
|
||||
\balise[backward,along={0,1,2,3}] at (T2) label (B);
|
|
@ -11,5 +11,17 @@
|
|||
|
||||
\maintrack (A) -- (B);
|
||||
|
||||
\balise[bidirectional] at (T1) label ();
|
||||
\balise[bidirectional,position=left] at (T2) label ();
|
||||
\balise[
|
||||
forward,
|
||||
along={0,1,3},
|
||||
along switched={2},
|
||||
oppose={0,2},
|
||||
] at (T1) label (A);
|
||||
\balise[
|
||||
backward,
|
||||
along={0,1,3},
|
||||
along switched={2},
|
||||
oppose={0,2,3},
|
||||
oppose switched={1},
|
||||
index % show index number
|
||||
] at (T2) label (B);
|
|
@ -1,13 +0,0 @@
|
|||
%!TEX TS-program = pdflatexmk
|
||||
%!TEX root = ../snippets.tex
|
||||
|
||||
% Copyright (c) 2018 - 2022, Martin Scheidt (ISC license)
|
||||
% 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.
|
||||
|
||||
\coordinate (A) at (0,0);
|
||||
\coordinate (B) at (6,0);
|
||||
\coordinate (T) at (3,0);
|
||||
|
||||
\maintrack (A) -- (B);
|
||||
|
||||
\transmitter[type=loop] at (T) label ();
|
|
@ -10,4 +10,4 @@
|
|||
|
||||
\maintrack (A) -- (B);
|
||||
|
||||
\balise[] at (T) label ();
|
||||
\trackloop[] at (T) label ();
|
|
@ -1,13 +0,0 @@
|
|||
%!TEX TS-program = pdflatexmk
|
||||
%!TEX root = ../snippets.tex
|
||||
|
||||
% Copyright (c) 2018 - 2022, Martin Scheidt (ISC license)
|
||||
% 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.
|
||||
|
||||
\coordinate (A) at (0,0);
|
||||
\coordinate (B) at (6,0);
|
||||
\coordinate (T) at (3,0);
|
||||
|
||||
\maintrack (A) -- (B);
|
||||
|
||||
\balise[bidirectional] at (T) label ();
|
|
@ -1,13 +0,0 @@
|
|||
%!TEX TS-program = pdflatexmk
|
||||
%!TEX root = ../snippets.tex
|
||||
|
||||
% Copyright (c) 2018 - 2022, Martin Scheidt (ISC license)
|
||||
% 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.
|
||||
|
||||
\coordinate (A) at (0,0);
|
||||
\coordinate (B) at (6,0);
|
||||
\coordinate (T) at (3,0);
|
||||
|
||||
\maintrack (A) -- (B);
|
||||
|
||||
\balise[forward] at (T) label ();
|
Binary file not shown.
|
@ -10,7 +10,7 @@ The symbols are:
|
|||
- in a forward direction (if applicable)
|
||||
- added with an anchor or two (a small magenta dot) for the placement along the track(s)
|
||||
|
||||
Run the script "generate_symbols.sh" to generate the PDF, PNG, and SVG version from the files in the "symbols_tikz" folder.
|
||||
Run the script "./build.sh --compile-symbology" to generate the PDF, PNG, and SVG version from the files in the "symbols_tikz" folder.
|
||||
|
||||
|
||||
The Visio symbols are provided as a stencil. Copy the stencil to the folder named "Documents/My Shapes" which should be present on your computer. Master-shapes in this stencil are smart; just drop a master on a drawing page and right-click.
|
|
@ -1,46 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Copyright (c) 2018 - 2022, Martin Scheidt (ISC license)
|
||||
# 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.
|
||||
|
||||
LATEX=$(which pdflatex)
|
||||
PDF2SVG=$(which pdf2svg)
|
||||
CONVERT=$(which convert)
|
||||
|
||||
mkdir -p .tex
|
||||
|
||||
for FILE in symbols_tikz/*.tikz; do
|
||||
SYMBOL=$(basename $FILE .tikz)
|
||||
echo "converting: $SYMBOL"
|
||||
|
||||
## -- header tex file
|
||||
echo '\\documentclass[tikz,border=0]{standalone}' > tmp.tex
|
||||
echo '\\usepackage[dev]{tikz-trackschematic}' >> tmp.tex
|
||||
echo '\\begin{document}' >> tmp.tex
|
||||
echo '\\begin{tikzpicture}[font=\\sffamily]' >> tmp.tex
|
||||
|
||||
## -- input symbol
|
||||
echo '\\input{'$FILE'}' >> tmp.tex
|
||||
|
||||
## -- footer tex file
|
||||
echo '\\end{tikzpicture}' >> tmp.tex
|
||||
echo '\\end{document}' >> tmp.tex
|
||||
|
||||
# echo "---------------"
|
||||
# cat tmp.tex
|
||||
# echo "---------------"
|
||||
|
||||
## -- compile tmp.tex
|
||||
# $LATEX -output-directory=.tex tmp.tex
|
||||
$LATEX -output-directory=.tex -interaction=batchmode tmp.tex 2>&1 > /dev/null
|
||||
|
||||
## -- copy and convert symbols
|
||||
$PDF2SVG .tex/tmp.pdf symbols_svg/$SYMBOL.svg
|
||||
$CONVERT -density 300 .tex/tmp.pdf symbols_png/$SYMBOL.png
|
||||
mv .tex/tmp.pdf symbols_pdf/$SYMBOL.pdf
|
||||
|
||||
done
|
||||
|
||||
## -- cleanup
|
||||
rm -rf .tex/
|
||||
rm tmp.tex
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue