2020-01-16 21:49:53 +01:00
# TikZ-trackschematic
2022-04-04 11:01:51 +02:00
[![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)
2022-04-01 16:10:16 +02:00
2020-01-14 17:11:10 +01:00
------------
# Installation
2018-09-14 21:04:15 +02:00
2021-10-14 13:37:42 +02:00
2020-01-14 17:11:10 +01:00
The tikz library is contained in the files:
2021-01-02 14:04:05 +01:00
* tikz-trackschematic.sty
2020-01-14 17:11:10 +01:00
* tikzlibrarytrackschematic.code.tex,
* tikzlibrarytrackschematic.topology.code.tex,
* tikzlibrarytrackschematic.trafficcontrol.code.tex,
* tikzlibrarytrackschematic.vehicles.code.tex,
2021-01-02 14:04:05 +01:00
* tikzlibrarytrackschematic.constructions.code.tex,
2022-02-19 16:40:20 +01:00
* tikzlibrarytrackschematic.symbology.code.tex,
2021-01-02 14:04:05 +01:00
* tikzlibrarytrackschematic.electrics.code.tex, and
* tikzlibrarytrackschematic.measures.code.tex.
These files should be copied wherever TeX can find it, for example in your $TEXMF folder.
2021-10-14 13:37:42 +02:00
Alternatively, the tikz library is provided by CTAN as "[tikz-trackschematic](https://ctan.org/pkg/tikz-trackschematic)" and is thus part of the TeX Live distribution or can be installed via MiKTeX.
2021-01-02 14:04:05 +01:00
The library can then be loaded through the command
```TeX
\usepackage{tikz-trackschematic}
```
2021-01-02 19:47:14 +01:00
in any LaTeX file.
2020-01-14 17:11:10 +01:00
2022-02-15 16:17:24 +01:00
The library can also be used in [Overleaf ](https://www.overleaf.com/read/crrxfcdzbhbd ).
2020-01-14 17:11:10 +01:00
------------
2019-07-21 19:28:30 +02:00
2021-01-02 14:04:05 +01:00
# Minimal working example
2019-07-21 19:28:30 +02:00
```TeX
2021-09-30 12:37:31 +02:00
\documentclass{standalone} % LaTeX
\usepackage{tikz-trackschematic} % loading the library
2019-07-21 19:28:30 +02:00
2021-09-30 12:37:31 +02:00
\begin{document}
2019-07-21 19:28:30 +02:00
\begin{tikzpicture}
2019-09-30 15:16:20 +02:00
2021-09-30 12:37:31 +02:00
% TikZ command: specify coordinates
2019-07-21 19:28:30 +02:00
\coordinate (A) at (0,0);
\coordinate (B) at (6,0);
\coordinate (T) at (5,0);
2021-09-30 12:37:31 +02:00
% draw a track
2019-09-30 15:16:20 +02:00
\maintrack (A) -- (B);
2021-09-30 12:37:31 +02:00
% place a train on the track
\train[forward] at (T) label ();
2019-07-21 19:28:30 +02:00
2021-09-30 12:37:31 +02:00
\end{tikzpicture}
2019-07-21 19:28:30 +02:00
\end{document}
```
2021-01-02 14:04:05 +01:00
results in:
2021-01-02 16:00:56 +01:00
2022-01-17 10:54:56 +01:00
![train on a track ](https://raw.githubusercontent.com/railtoolkit/tikz-trackschematic/master/doc/examples/minimal_working_example.png "train on a track" )
2021-01-02 14:04:05 +01:00
------------
# Symbology and meaning
2022-02-25 22:46:56 +01:00
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.
2019-07-21 19:28:30 +02:00
------------
2020-01-14 17:11:10 +01:00
2019-07-21 19:28:30 +02:00
# Roadmap
2018-09-14 21:04:15 +02:00
2020-01-14 17:11:10 +01:00
* rethink syntax
2019-07-21 19:28:30 +02:00
* provide option for internationalziation (i18n)
2020-01-14 17:11:10 +01:00
* rewrite library with better coding skills
2021-09-30 12:37:31 +02:00
* include support for glossaries package
2020-01-14 17:11:10 +01:00
------------
# Acknowledgement
This project has received funding from the European Union’ s Horizon 2020 research and innovation programme under grant agreement No. 826347.
------------
# License
2021-09-30 12:37:31 +02:00
[![Open Source Initiative Approved License logo ](https://opensource.org/files/OSIApproved_100X125.png "Open Source Initiative Approved License logo" )](https://opensource.org)
2020-01-14 17:11:10 +01:00
2022-01-06 20:17:51 +01:00
Copyright (c) 2018 - 2022, Martin Scheidt \<m.scheidt@tu-bs.de\> (ISC License)
2020-01-14 17:11:10 +01:00
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.