summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-10-01 03:01:47 +0000
committerNorbert Preining <norbert@preining.info>2021-10-01 03:01:47 +0000
commit569e4d488d3398f8ed12807dd67e2b301b7447d5 (patch)
treeb0649aad82d5811ce9251e770edd9a1c94b71f0f /graphics
parentc0e66330261a0098e8041d4cc1428666ef598c30 (diff)
CTAN sync 202110010301
Diffstat (limited to 'graphics')
-rw-r--r--graphics/pgf/contrib/tikz-trackschematic/README.md24
-rw-r--r--graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic-documentation.sty2
-rw-r--r--graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic.pdfbin240000 -> 235544 bytes
-rw-r--r--graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic.sty121
-rw-r--r--graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic.tex10
-rw-r--r--graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.code.tex3
-rw-r--r--graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.constructions.code.tex2
-rw-r--r--graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.electrics.code.tex2
-rw-r--r--graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.measures.code.tex2
-rw-r--r--graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.symbology.code.tex125
-rw-r--r--graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.topology.code.tex2
-rw-r--r--graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.trafficcontrol.code.tex2
-rw-r--r--graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.vehicles.code.tex2
-rw-r--r--graphics/pstricks/contrib/luapstricks/PSTricksDotFont.otfbin0 -> 7624 bytes
-rw-r--r--graphics/pstricks/contrib/luapstricks/luapstricks.lua103
15 files changed, 248 insertions, 152 deletions
diff --git a/graphics/pgf/contrib/tikz-trackschematic/README.md b/graphics/pgf/contrib/tikz-trackschematic/README.md
index 74513d88c2..f1067b5e00 100644
--- a/graphics/pgf/contrib/tikz-trackschematic/README.md
+++ b/graphics/pgf/contrib/tikz-trackschematic/README.md
@@ -19,28 +19,31 @@ The library can then be loaded through the command
```TeX
\usepackage{tikz-trackschematic}
```
-in any TeX file.
+in any LaTeX file.
------------
# Minimal working example
```TeX
-\documentclass{standalone}
-\usepackage{tikz-trackschematic}
-\begin{document}
+\documentclass{standalone} % LaTeX
+\usepackage{tikz-trackschematic} % loading the library
+\begin{document}
\begin{tikzpicture}
+ % TikZ command: specify coordinates
\coordinate (A) at (0,0);
\coordinate (B) at (6,0);
\coordinate (T) at (5,0);
+ % draw a track
\maintrack (A) -- (B);
- \train[forward] at (T) label (train);
- \end{tikzpicture}
+ % place a train on the track
+ \train[forward] at (T) label ();
+ \end{tikzpicture}
\end{document}
```
results in:
@@ -58,6 +61,12 @@ A [glossary](https://glossary.ivev.bau.tu-bs.de/tiki-index.php?page=_Symbology)
# History
+## 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
@@ -108,6 +117,7 @@ A [glossary](https://glossary.ivev.bau.tu-bs.de/tiki-index.php?page=_Symbology)
* provide option for internationalziation (i18n)
* replace "\gettikzxy" with "\path let" syntax
* rewrite library with better coding skills
+ * include support for glossaries package
------------
@@ -119,7 +129,7 @@ A [glossary](https://glossary.ivev.bau.tu-bs.de/tiki-index.php?page=_Symbology)
# License
- [![Open Source Initiative Approved License logo](https://opensource.org/files/OSIApproved_100X125.png)](https://opensource.org)
+ [![Open Source Initiative Approved License logo](https://opensource.org/files/OSIApproved_100X125.png "Open Source Initiative Approved License logo")](https://opensource.org)
Copyright (c) 2018 - 2021, Martin Scheidt \<m.scheidt@tu-bs.de\> (ISC License)
diff --git a/graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic-documentation.sty b/graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic-documentation.sty
index 0a6e159f29..d8564b8a7f 100644
--- a/graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic-documentation.sty
+++ b/graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic-documentation.sty
@@ -83,7 +83,7 @@
\sisetup{math-rm=\mathsf}
\IfFileExists{tikz-trackschematic-dev.sty}{%
- \RequirePackage[dev]{tikz-trackschematic-dev}%
+ \RequirePackage[dev]{tikz-trackschematic}%
}{%
\RequirePackage{tikz-trackschematic}%
}%
diff --git a/graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic.pdf b/graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic.pdf
index 06ead065b5..a8a367e5d5 100644
--- a/graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic.pdf
+++ b/graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic.sty b/graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic.sty
index 2afa50dbfe..39aadd7fdc 100644
--- a/graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic.sty
+++ b/graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic.sty
@@ -7,17 +7,16 @@
\NeedsTeXFormat{LaTeX2e}%
\ProvidesPackage{tikz-trackschematic}[2021/01/02 tikz-trackschematic]%
%
-% Required Packages for tikz-trackschematic
-\RequirePackage{tikz,etoolbox,lmodern}%
-%
%%%%%%%%%%%%%%%
% Package options
%%%%%%%%%%%%%%%
-\RequirePackage{xkeyval,etoolbox}%
+\RequirePackage{tikz,xkeyval,etoolbox}%
\newtoggle{development}%
\DeclareOptionX{dev}[\settoggle{development}{false}]{\settoggle{development}{true}}
\ProcessOptionsX
%
+\settoggle{development}{true}
+
\iftoggle{development}{%
\PackageInfo{tikz-trackschematic}{development mode}%
%
@@ -28,6 +27,7 @@
\usetikzlibrary{trackschematic-dev.constructions}%
\usetikzlibrary{trackschematic-dev.electrics}%
\usetikzlibrary{trackschematic-dev.measures}%
+ \usetikzlibrary{trackschematic-dev.symbology}%
\usetikzlibrary{trackschematic-dev}%
}{%
\PackageError{tikz-trackschematic}{development mode not available}{execute the dev-install.sh script provided by the package repository}%
@@ -39,120 +39,9 @@
\usetikzlibrary{trackschematic.constructions}%
\usetikzlibrary{trackschematic.electrics}%
\usetikzlibrary{trackschematic.measures}%
+ \usetikzlibrary{trackschematic.symbology}%
}%
%
%%%%%%%%%%%%%%%
-% commands
-%%%%%%%%%%%%%%%
-\RequirePackage{adjustbox}%
-\usetikzlibrary{calc}%
-%
-\DeclareRobustCommand{\tsSymbol}[2][1]{%
- \adjustbox{valign=c}{%
- \begin{tikzpicture}]%
- \pic at (0,0) {symbology_#2};%
- \path ($0.5*(-0.2,-#1)$) rectangle ($0.5*(12.2,#1)$);% background rectangle to unify every cell containing a symbol
- \end{tikzpicture}%
- }%
-}%
-%%%%%%%%%%%%%%%
-% symbology table
-%%%%%%%%%%%%%%%
-%
-%% TODO: replave with package glossaries
-% \@ifpackageloaded{glossaries}{%
-% \newglossaryentry{main_track}{name={main track},description={},symbol={\tsSymbol{main_track}}}%
-% }{}%
-%%
-\RequirePackage{booktabs,xltabular,multicol}%
-%% command
-\DeclareRobustCommand\tsFullSymbology{%
- \begin{xltabular}{\textwidth}{cX}%
- \toprule%
- \textbf{Notation} & \multicolumn{1}{c}{\textbf{Description}} \\%
- \midrule%
- \endfirsthead%
- % -----------
- \midrule%
- \textbf{Notation} & \multicolumn{1}{c}{\textbf{Description}} \\%
- \midrule%
- \endhead%
- % -----------
- \midrule%
- \multicolumn{2}{c}{\footnotesize -- continued on next page -- } \\%
- \endfoot%
- % -----------
- \bottomrule%
- \endlastfoot%
- % -----------
- \tsSymbol{main_track} & main track \\%
- \tsSymbol{secondary_track} & secondary track \\%
- \tsSymbol{track_label} & track label \\%
- \tsSymbol{bufferstop} & bufferstop \\%
- \tsSymbol{friction_bufferstop} & friction bufferstop \\%
- \tsSymbol{track_closure} & track closure \\%
- \tsSymbol{turnout} & turnout \\%
- \tsSymbol{turnout_fouling} & turnout with fouling point indicator \\%
- \tsSymbol{turnout_manually} & turnout operated manually \\%
- \tsSymbol{diamond_crossing} & diamond crossing \\%
- \tsSymbol{slip_turnout} & double-slip turnout \\%
- \tsSymbol{turnout_points_right} & turnout with points in right position \\%
- \tsSymbol{turnout_points_left} & turnout with points in left position \\%
- \tsSymbol{turnout_points_moving} & turnout with moving points \\%
- \tsSymbol{derailer} & derailer \\%
- \tsSymbol{parked_vehicles} & parked vehicles \\%
- \tsSymbol{train_shunt_mode} & train in shunting mode \\%
- \tsSymbol{train_shunting} & train shunting \\%
- \tsSymbol{train} & train \\%
- \tsSymbol{train_moving_slow} & train moving slow \\%
- \tsSymbol{train_moving} & train moving \\%
- \tsSymbol{train_moving_fast} & train moving fast \\%
- \tsSymbol{train_ghost} & train ghost \\%
- \tsSymbol{train_drive_automatic} & train operated automatic \\%
- \tsSymbol{train_drive_human} & train operated by human \\%
- \tsSymbol[1.4]{distant_signal} & distant signal \\%
- \tsSymbol[1.4]{distant_speed_signal}& distant signal with speed indicator \\%
- \tsSymbol[1.4]{speed_signal} & speed signal \\%
- \tsSymbol[1.4]{block_signal} & block signal \\%
- \tsSymbol[1.4]{route_signal} & route signal \\%
- \tsSymbol[1.4]{combined_signal} & combined signal (distant, block and route signal) \\%
- \tsSymbol[1.4]{shunt_signal} & shunt signal \\%
- \tsSymbol[1.4]{locked_shunt_signal} & shunt signal locked \\%
- \tsSymbol[1.4]{shunt_limit} & shunt limit \\%
- \tsSymbol[1.4]{train_berth_sign} & train berth sign \\%
- \tsSymbol[1.4]{view_point} & view point \\%
- \tsSymbol[1.4]{braking_point} & braking point \\%
- \tsSymbol[1.4]{end_of_authority} & end of movement authority \\%
- \tsSymbol[1.4]{danger_point} & danger point \\%
- \tsSymbol{clearing_point} & clearing point \\%
- \tsSymbol{block_clearing_point} & block clearing point \\%
- \tsSymbol{route_clearing_point} & route clearing point \\%
- \tsSymbol{transmitter} & transmitter \\%
- \tsSymbol{transmitter_forward} & transmitter effective forward \\%
- \tsSymbol{transmitter_bidirectional}& transmitter bidirectional \\%
- \tsSymbol{loop_transmitter} & loop transmitter \\%
- \tsSymbol{route} & route \\%
- \tsSymbol{direction_control} & direction control \\%
- \tsSymbol{platform} & platform \\%
- \tsSymbol{level_crossing} & level crossing \\%
- \tsSymbol[2.0]{bridge} & bridge \\%
- \tsSymbol[1.4]{hump} & hump \\%
- \tsSymbol{pylon} & pylons \\%
- \tsSymbol{interlocking} & interlocking \\%
- \tsSymbol[1.4]{distant_power_off} & distant power off \\%
- \tsSymbol[1.4]{power_off} & power off \\%
- \tsSymbol[1.4]{power_on} & power on \\%
- \tsSymbol[1.4]{distant_pantograph_down}& distant pantograph down \\%
- \tsSymbol[1.4]{pantograph_down} & pantograph down \\%
- \tsSymbol[1.4]{pantograph_up} & pantograph up \\%
- \tsSymbol[1.4]{wire_limit} & wire limit \\%
- \tsSymbol[2.0]{track_distance} & track distance \\%
- \tsSymbol{train_berth} & train berth \\%
- \tsSymbol{measure_line} & measure line \\%
- \tsSymbol{hectometer} & hectometer \\%
- \tsSymbol{track_marking} & track marking \\%
- \end{xltabular}%
-}%
-%%%%%%%%%%%%%%%
\endinput%
% \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic.tex b/graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic.tex
index fccbfebd9b..bb0ac52236 100644
--- a/graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic.tex
+++ b/graphics/pgf/contrib/tikz-trackschematic/tikz-trackschematic.tex
@@ -64,6 +64,8 @@
\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
\subsection{Requirements}\label{sec:require}
@@ -146,7 +148,7 @@
\subsection{Orientation system}\label{sec:orientationsystem}
The orientation is controlled via given Ti\emph{k}Z options or pgfkey.
- The orientation options/pgfkeys are named in relation to orientation-based coordinates, which inhibate thier meaning from reading left to right beeing \texttt{forward} and relate \texttt{left}/\texttt{right} to that movement.
+ The orientation options/pgfkeys inhibit their meaning from reading left to right as \texttt{forward} and relate \texttt{left}/\texttt{right} to that movement.
\begin{center}
\begin{tikzpicture}[font=\ttfamily]
\draw[<->] (-0.5,0) node[left] {backward} -- (0.5,0) node[right] {forward};
@@ -326,9 +328,9 @@
\end{lstlisting}
Each symbol provides a reference name fo a symbology entry if there is the need to create an own table with the symbols.
- It can be used in a normal \TeX~ environment and will show the named symbol with a length of \SI{6.2}{\cm} and a width of \SI{1}{\cm}.
+ It can be used in a normal \TeX~ environment and will show the named symbol with a length of \SI{6.2}{\cm} and a height of \SI{1}{\cm}.
\begin{lstlisting}[gobble=6]
- \tsSymbol[width]{main_track}
+ \tsSymbol[height]{symbol_name}
\end{lstlisting}
There is also a table with snippets for various situations.
@@ -1566,7 +1568,7 @@
\hline
\No & train ghost & \tsSymbol{train_ghost} & \ref{sym:trains} \\
\hline
- \No & train operated automatic & \tsSymbol{train_drive_automatic} & \ref{sym:trains} \\
+ \No & train operated automatically & \tsSymbol{train_drive_automatic} & \ref{sym:trains} \\
\hline
\No & train operated by human & \tsSymbol{train_drive_human} & \ref{sym:trains} \\
\hline
diff --git a/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.code.tex b/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.code.tex
index b26089fc75..d6d6417062 100644
--- a/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.code.tex
+++ b/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.code.tex
@@ -6,7 +6,7 @@
%
\ProvidesFileRCS{tikzlibrarytrackschematic.code.tex}%
%
-\RequirePackage{tikz,etoolbox,lmodern}%
+\RequirePackage{tikz,etoolbox}%
%
%%%%%%%%%%%%%%%
% loading sublibraries
@@ -17,6 +17,7 @@
% \usetikzlibrary{trackschematic.constructions}%
% \usetikzlibrary{trackschematic.electrics}%
% \usetikzlibrary{trackschematic.measures}%
+% \usetikzlibrary{trackschematic.symbology}%
%%%%%%%%%%%%%%%
%% template for new symbol definitions
%%%%%%%%%%%%%%%
diff --git a/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.constructions.code.tex b/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.constructions.code.tex
index d36e3bece1..2d1b5d583f 100644
--- a/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.constructions.code.tex
+++ b/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.constructions.code.tex
@@ -12,7 +12,7 @@
%%%%%%%%%%%%%%%
% global settings
%%%%%%%%%%%%%%%
-\RequirePackage{tikz,etoolbox,lmodern}%
+\RequirePackage{tikz,etoolbox}%
\usetikzlibrary{calc}%
%
\ifdeflength{\objectlength}{}{% Not defined, so define it!
diff --git a/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.electrics.code.tex b/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.electrics.code.tex
index 70956611e6..6b8942bd4f 100644
--- a/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.electrics.code.tex
+++ b/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.electrics.code.tex
@@ -12,7 +12,7 @@
%%%%%%%%%%%%%%%
% global settings
%%%%%%%%%%%%%%%
-\RequirePackage{tikz,etoolbox,lmodern}%
+\RequirePackage{tikz,etoolbox}%
\usetikzlibrary{calc,intersections,arrows.meta}%
%
% https://tex.stackexchange.com/questions/56353/extract-x-y-coordinate-of-an-arbitrary-point-on-curve-in-tikz
diff --git a/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.measures.code.tex b/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.measures.code.tex
index ac63677391..4b79f6a7a5 100644
--- a/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.measures.code.tex
+++ b/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.measures.code.tex
@@ -12,7 +12,7 @@
%%%%%%%%%%%%%%%
% global settings
%%%%%%%%%%%%%%%
-\RequirePackage{tikz,etoolbox,lmodern}%
+\RequirePackage{tikz,etoolbox}%
\usetikzlibrary{calc,intersections,arrows.meta}%
%
% https://tex.stackexchange.com/questions/56353/extract-x-y-coordinate-of-an-arbitrary-point-on-curve-in-tikz
diff --git a/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.symbology.code.tex b/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.symbology.code.tex
new file mode 100644
index 0000000000..46ae2fa4da
--- /dev/null
+++ b/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.symbology.code.tex
@@ -0,0 +1,125 @@
+%!TEX TS-program = pdflatexmk
+%!TEX root = ../test/test.tex
+%
+%% symbol library for TikZ track schematics
+%
+% Copyright (c) 2018 - 2021, 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.
+%
+\ProvidesFileRCS{tikzlibrarytrackschematic.symbology.code.tex}%
+%
+%%%%%%%%%%%%%%%
+% commands
+%%%%%%%%%%%%%%%
+\RequirePackage{adjustbox}%
+\usetikzlibrary{calc}%
+%
+\DeclareRobustCommand{\tsSymbol}[2][1]{%
+ \adjustbox{valign=c}{%
+ \begin{tikzpicture}]%
+ \pic at (0,0) {symbology_#2};%
+ \path ($0.5*(-0.2,-#1)$) rectangle ($0.5*(12.2,#1)$);% background rectangle to unify every cell containing a symbol
+ \end{tikzpicture}%
+ }%
+}%
+%%%%%%%%%%%%%%%
+% symbology table
+%%%%%%%%%%%%%%%
+%
+%% TODO: replave with package glossaries
+% \@ifpackageloaded{glossaries}{%
+% \newglossaryentry{main_track}{name={main track},description={},symbol={\tsSymbol{main_track}}}%
+% }{}%
+%%
+\RequirePackage{booktabs,xltabular,multicol}%
+%% command
+\DeclareRobustCommand\tsFullSymbology{%
+ \begin{xltabular}{\textwidth}{cX}%
+ \toprule%
+ \textbf{Notation} & \multicolumn{1}{c}{\textbf{Description}} \\%
+ \midrule%
+ \endfirsthead%
+ % -----------
+ \midrule%
+ \textbf{Notation} & \multicolumn{1}{c}{\textbf{Description}} \\%
+ \midrule%
+ \endhead%
+ % -----------
+ \midrule%
+ \multicolumn{2}{c}{\footnotesize -- continued on next page -- } \\%
+ \endfoot%
+ % -----------
+ \bottomrule%
+ \endlastfoot%
+ % -----------
+ \tsSymbol{main_track} & main track \\%
+ \tsSymbol{secondary_track} & secondary track \\%
+ \tsSymbol{track_label} & track label \\%
+ \tsSymbol{bufferstop} & bufferstop \\%
+ \tsSymbol{friction_bufferstop} & friction bufferstop \\%
+ \tsSymbol{track_closure} & track closure \\%
+ \tsSymbol{turnout} & turnout \\%
+ \tsSymbol{turnout_fouling} & turnout with fouling point indicator \\%
+ \tsSymbol{turnout_manually} & turnout operated manually \\%
+ \tsSymbol{diamond_crossing} & diamond crossing \\%
+ \tsSymbol{slip_turnout} & double-slip turnout \\%
+ \tsSymbol{turnout_points_right} & turnout with points in right position \\%
+ \tsSymbol{turnout_points_left} & turnout with points in left position \\%
+ \tsSymbol{turnout_points_moving} & turnout with moving points \\%
+ \tsSymbol{derailer} & derailer \\%
+ \tsSymbol{parked_vehicles} & parked vehicles \\%
+ \tsSymbol{train_shunt_mode} & train in shunting mode \\%
+ \tsSymbol{train_shunting} & train shunting \\%
+ \tsSymbol{train} & train \\%
+ \tsSymbol{train_moving_slow} & train moving slow \\%
+ \tsSymbol{train_moving} & train moving \\%
+ \tsSymbol{train_moving_fast} & train moving fast \\%
+ \tsSymbol{train_ghost} & train ghost \\%
+ \tsSymbol{train_drive_automatic} & train operated automatic \\%
+ \tsSymbol{train_drive_human} & train operated by human \\%
+ \tsSymbol[1.4]{distant_signal} & distant signal \\%
+ \tsSymbol[1.4]{distant_speed_signal}& distant signal with speed indicator \\%
+ \tsSymbol[1.4]{speed_signal} & speed signal \\%
+ \tsSymbol[1.4]{block_signal} & block signal \\%
+ \tsSymbol[1.4]{route_signal} & route signal \\%
+ \tsSymbol[1.4]{combined_signal} & combined signal (distant, block and route signal) \\%
+ \tsSymbol[1.4]{shunt_signal} & shunt signal \\%
+ \tsSymbol[1.4]{locked_shunt_signal} & shunt signal locked \\%
+ \tsSymbol[1.4]{shunt_limit} & shunt limit \\%
+ \tsSymbol[1.4]{train_berth_sign} & train berth sign \\%
+ \tsSymbol[1.4]{view_point} & view point \\%
+ \tsSymbol[1.4]{braking_point} & braking point \\%
+ \tsSymbol[1.4]{end_of_authority} & end of movement authority \\%
+ \tsSymbol[1.4]{danger_point} & danger point \\%
+ \tsSymbol{clearing_point} & clearing point \\%
+ \tsSymbol{block_clearing_point} & block clearing point \\%
+ \tsSymbol{route_clearing_point} & route clearing point \\%
+ \tsSymbol{transmitter} & transmitter \\%
+ \tsSymbol{transmitter_forward} & transmitter effective forward \\%
+ \tsSymbol{transmitter_bidirectional}& transmitter bidirectional \\%
+ \tsSymbol{loop_transmitter} & loop transmitter \\%
+ \tsSymbol{route} & route \\%
+ \tsSymbol{direction_control} & direction control \\%
+ \tsSymbol{platform} & platform \\%
+ \tsSymbol{level_crossing} & level crossing \\%
+ \tsSymbol[2.0]{bridge} & bridge \\%
+ \tsSymbol[1.4]{hump} & hump \\%
+ \tsSymbol{pylon} & pylons \\%
+ \tsSymbol{interlocking} & interlocking \\%
+ \tsSymbol[1.4]{distant_power_off} & distant power off \\%
+ \tsSymbol[1.4]{power_off} & power off \\%
+ \tsSymbol[1.4]{power_on} & power on \\%
+ \tsSymbol[1.4]{distant_pantograph_down}& distant pantograph down \\%
+ \tsSymbol[1.4]{pantograph_down} & pantograph down \\%
+ \tsSymbol[1.4]{pantograph_up} & pantograph up \\%
+ \tsSymbol[1.4]{wire_limit} & wire limit \\%
+ \tsSymbol[2.0]{track_distance} & track distance \\%
+ \tsSymbol{train_berth} & train berth \\%
+ \tsSymbol{measure_line} & measure line \\%
+ \tsSymbol{hectometer} & hectometer \\%
+ \tsSymbol{track_marking} & track marking \\%
+ \end{xltabular}%
+}%
+%%%%%%%%%%%%%%%
+\end \ No newline at end of file
diff --git a/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.topology.code.tex b/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.topology.code.tex
index 368986cce4..26972797f6 100644
--- a/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.topology.code.tex
+++ b/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.topology.code.tex
@@ -12,7 +12,7 @@
%%%%%%%%%%%%%%%
% Requirements
%%%%%%%%%%%%%%%
-\RequirePackage{tikz,etoolbox,lmodern}%
+\RequirePackage{tikz,etoolbox}%
\usetikzlibrary{calc,patterns}%
%
% https://tex.stackexchange.com/questions/56353/extract-x-y-coordinate-of-an-arbitrary-point-on-curve-in-tikz
diff --git a/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.trafficcontrol.code.tex b/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.trafficcontrol.code.tex
index 07b2c09065..b46450add4 100644
--- a/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.trafficcontrol.code.tex
+++ b/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.trafficcontrol.code.tex
@@ -12,7 +12,7 @@
%%%%%%%%%%%%%%%
% Requirements
%%%%%%%%%%%%%%%
-\RequirePackage{tikz,etoolbox,lmodern}%
+\RequirePackage{tikz,etoolbox}%
\usetikzlibrary{calc}%
%
% https://tex.stackexchange.com/questions/56353/extract-x-y-coordinate-of-an-arbitrary-point-on-curve-in-tikz
diff --git a/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.vehicles.code.tex b/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.vehicles.code.tex
index cf8aad3898..d8e0687fd7 100644
--- a/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.vehicles.code.tex
+++ b/graphics/pgf/contrib/tikz-trackschematic/tikzlibrarytrackschematic.vehicles.code.tex
@@ -12,7 +12,7 @@
%%%%%%%%%%%%%%%
% Requirements
%%%%%%%%%%%%%%%
-\RequirePackage{tikz,etoolbox,lmodern}%
+\RequirePackage{tikz,etoolbox}%
\usetikzlibrary{calc}%
%
% https://tex.stackexchange.com/questions/56353/extract-x-y-coordinate-of-an-arbitrary-point-on-curve-in-tikz
diff --git a/graphics/pstricks/contrib/luapstricks/PSTricksDotFont.otf b/graphics/pstricks/contrib/luapstricks/PSTricksDotFont.otf
new file mode 100644
index 0000000000..eaa5a6b93e
--- /dev/null
+++ b/graphics/pstricks/contrib/luapstricks/PSTricksDotFont.otf
Binary files differ
diff --git a/graphics/pstricks/contrib/luapstricks/luapstricks.lua b/graphics/pstricks/contrib/luapstricks/luapstricks.lua
index eebca86801..8ae9eed76d 100644
--- a/graphics/pstricks/contrib/luapstricks/luapstricks.lua
+++ b/graphics/pstricks/contrib/luapstricks/luapstricks.lua
@@ -18,8 +18,8 @@
if luatexbase then
luatexbase.provides_module {
name = 'luapstricks',
- version = 'v0.1',
- date = '2021-09-16',
+ version = 'v0.2',
+ date = '2021-09-30',
description = 'PSTricks backend for LuaLaTeX',
}
end
@@ -823,15 +823,20 @@ end
local mark = {kind = 'mark'}
local null = {kind = 'null'}
+local statusdict = {kind = 'dict', value = {}}
local globaldict = {kind = 'dict', value = {}}
local userdict = {kind = 'dict', value = {
SDict = {kind = 'dict', value = {
normalscale = {kind = 'executable', value = {kind = 'array', value = {}}},
}},
+ TeXDict = {kind = 'dict', value = {
+ Resolution = function() push((pdf.getpkresolution())) end,
+ }},
['@beginspecial'] = {kind = 'executable', value = {kind = 'array', value = {}}},
['@setspecial'] = {kind = 'executable', value = {kind = 'array', value = {}}},
['@endspecial'] = {kind = 'executable', value = {kind = 'array', value = {}}},
}}
+userdict.value.TeXDict.value.VResolution = userdict.value.TeXDict.value.Resolution
local FontDirectory = {kind = 'dict', value = {}}
local ResourceCategories = {kind = 'dict', value = {}}
@@ -860,8 +865,8 @@ local function generic_show(str, ax, ay)
local matrix = psfont.FontMatrix.value
local fonttype = psfont.FontType
if fonttype ~= 0x1CA and fonttype ~= 3 then
- texio.write_nl'Font support is not implemented'
- return true
+ texio.write_nl'luapstricks: Attempt to use unsupported font type.'
+ return nil, 'invalidfont'
end
local x0, y0 = current_point[1], current_point[2]
update_matrix(
@@ -1181,6 +1186,73 @@ systemdict = {kind = 'dict', value = {
end
end,
+ reversepath = function()
+ local state = graphics_stack[#graphics_stack]
+ local path = state.current_path
+ if not path then return end
+ local newpath = lua.newtable(#path, 0)
+ local i = 1
+ local out_ptr = 1
+ -- Iterate over groups starting with "x y m". These can contain multiple subpaths separated with `h`.
+ while path[i+2] == 'm' do
+ local x0, y0 = path[i], path[i + 1]
+ local after = i + 3
+ while path[after] and path[after + 2] ~= 'm' do
+ after = after + 1
+ end
+ local j = after
+ out_ptr = out_ptr + 3 -- Leave space for the initial `x y m`
+ newpath[out_ptr - 1] = 'm'
+ local drop_closepath = true -- If this is true we do not end with a closepath and therefore have to remove the first one.
+ while true do
+ j = j - 1
+ local cmd = path[j]
+ if cmd == 'h' then
+ if j ~= after - 1 then
+ newpath[out_ptr - 3], newpath[out_ptr - 2] = x0, y0
+ if not drop_closepath then
+ newpath[out_ptr] = 'h'
+ out_ptr = out_ptr + 1
+ end
+ out_ptr = out_ptr + 3 -- Leave space for the initial `x y m`
+ newpath[out_ptr - 1] = 'm'
+ end
+ drop_closepath = false
+ elseif cmd == 'm' then
+ newpath[out_ptr - 3], newpath[out_ptr - 2] = path[j - 2], path[j - 1]
+ break
+ else
+ if cmd == 'c' then
+ newpath[out_ptr - 3], newpath[out_ptr - 2] = path[j - 2], path[j - 1]
+ newpath[out_ptr], newpath[out_ptr + 1], newpath[out_ptr + 2], newpath[out_ptr + 3] = path[j - 4], path[j - 3], path[j - 6], path[j - 5]
+ out_ptr = out_ptr + 6
+ newpath[out_ptr] = 'c'
+ j = j - 6
+ elseif cmd == 'l' then
+ newpath[out_ptr - 3], newpath[out_ptr - 2] = path[j - 2], path[j - 1]
+ out_ptr = out_ptr + 2
+ j = j - 2
+ else
+ assert(false)
+ end
+ newpath[out_ptr] = cmd
+ out_ptr = out_ptr + 1
+ end
+ end
+ if not drop_closepath then
+ newpath[out_ptr] = 'h'
+ out_ptr = out_ptr + 1
+ end
+ i = after
+ end
+ state.current_path = newpath
+ local last_cmd = #newpath
+ if newpath[last_cmd] == 'h' then
+ last_cmd = last_cmd - 1
+ end
+ state.current_point[1], state.current_point[2] = newpath[last_cmd - 2], newpath[last_cmd - 1]
+ end,
+
pathforall = function()
local close = pop_proc()
local curve = pop_proc()
@@ -2029,6 +2101,7 @@ systemdict = {kind = 'dict', value = {
local current_path = state.current_path
local current_point = state.current_point
if not current_path then return end
+ if current_path[#current_path] == 'h' then return end
local x, y
for i=#current_path, 1, -1 do
if current_path[i] == 'm' then
@@ -2774,8 +2847,8 @@ systemdict = {kind = 'dict', value = {
local matrix = psfont.FontMatrix.value
local fonttype = psfont.FontType
if fonttype ~= 0x1CA and fonttype ~= 3 then
- texio.write_nl'Font support is not implemented'
- return
+ texio.write_nl'luapstricks: Attempt to use unsupported font type.'
+ ps_error('invalidfont')
end
local w = 0
if fonttype == 0x1CA then
@@ -2858,8 +2931,9 @@ systemdict = {kind = 'dict', value = {
fonts.definers.register(data, fid)
end
fontdict.FID = fid
+ elseif fontdict.FontType == 3 then
else
- texio.write_nl'definefont is not implemnted. Pushing dummy font.'
+ texio.write_nl'luapstricks: definefont has been called with a font type which is not supported by luapstricks. I will continue, but attempts to use this font will fail.'
end
FontDirectory[fontkey] = raw_fontdict
push(raw_fontdict)
@@ -3068,6 +3142,7 @@ systemdict = {kind = 'dict', value = {
push(rand())
end,
+ readonly = function() end, -- Concept not implemented
type = function()
local val = pop()
local tval = type(val)
@@ -3293,6 +3368,7 @@ systemdict = {kind = 'dict', value = {
['true'] = true,
['false'] = false,
systemdict = systemdict,
+ statusdict = statusdict,
globaldict = globaldict,
FontDirectory = FontDirectory,
@@ -3556,7 +3632,7 @@ systemdict = {kind = 'dict', value = {
}}
}}
systemdict.value.systemdict = systemdict
-dictionary_stack = {systemdict, globaldict, userdict}
+dictionary_stack = {systemdict, globaldict, userdict, userdict.value.TeXDict}
-- local execution_stack = {} -- Currently not implemented
-- Quite some stuff is missing here since these aren't implemented yet. Anyway mostly useful for testing.
@@ -3783,17 +3859,10 @@ local func = luatexbase.new_luafunction'showPS'
token.set_lua('showPS', func, 'protected')
lua.get_functions_table()[func] = function()
local command = token.scan_argument(true)
+ -- This will break if any graphics commands are used.
local tokens = parse_ps(command)
execute_ps(tokens)
- for i = 1, #operand_stack do
- local op = operand_stack[i]
- operand_stack[i] = nil
- if type(op) == 'table' then
- print(op.kind, op.value)
- else
- print(op)
- end
- end
+ systemdict.value.stack()
end
local ps_tokens, ps_direct, ps_context, ps_pos_x, ps_pos_y