Compare commits
4 Commits
876c8907e5
...
70b5ec4e57
Author | SHA1 | Date |
---|---|---|
Martin Scheidt | 70b5ec4e57 | |
Martin Scheidt | a98f3b26bd | |
Martin Scheidt | 2c869daa70 | |
Martin Scheidt | d1ff03de71 |
|
@ -26,6 +26,9 @@ jobs:
|
|||
# Optionally strip `v` prefix
|
||||
strip_v: false
|
||||
|
||||
- name: "update tikz-trackschematic documentation before release"
|
||||
run: ./build.sh --non-interactive --compile-doc
|
||||
|
||||
- name: "create tikz-trackschematic package"
|
||||
run: ./build.sh --non-interactive --release ${{ steps.tag.outputs.tag }}
|
||||
|
||||
|
|
|
@ -10,12 +10,12 @@ Categories: Added, Changed, Deprecated, Removed, Fixed, and Security.
|
|||
|
||||
### Added
|
||||
|
||||
* interlocking symbols for other than manual interlockings
|
||||
* i18n support
|
||||
* unified build script for development
|
||||
|
||||
### Changed
|
||||
|
||||
* transmitters for balises
|
||||
* revised symbol and syntax for balises
|
||||
* the track loop was separated from the balises
|
||||
* replaced "\gettikzxy" with "\path let" syntax
|
||||
* label placement for derailers
|
||||
|
||||
|
|
223
build.sh
223
build.sh
|
@ -39,6 +39,10 @@ install, test or release a package for tikz-trackschematic
|
|||
|
||||
-t, --test Tests the current src/ against the test/.
|
||||
|
||||
-c, --compile-doc Compile documentation sources.
|
||||
|
||||
-y, --compile-symbology Compile symbology sources.
|
||||
|
||||
-r, --release VERSION Creates a .zip with the release for given VERSION in
|
||||
Semantic Versioning with leading 'v', e.g: v1.0.0
|
||||
|
||||
|
@ -50,6 +54,8 @@ VERBOSITY=2 # set by cli argument
|
|||
NOINTERACT=0 # set by cli argument
|
||||
INSTALL=0 # set by cli argument
|
||||
TESTING=0 # set by cli argument
|
||||
COMPILE=0 # set by cli argument
|
||||
SYMBOLOGY=0 # set by cli argument
|
||||
RELEASE=0 # set by cli argument
|
||||
CLEANUP=1 # set by cli argument
|
||||
|
||||
|
@ -87,6 +93,12 @@ process_arguments() {
|
|||
-t|--test)
|
||||
TESTING=1
|
||||
;;
|
||||
-c|--compile-doc)
|
||||
COMPILE=1
|
||||
;;
|
||||
-y|--compile-symbology)
|
||||
SYMBOLOGY=1
|
||||
;;
|
||||
-r|--release)
|
||||
RELEASE=1
|
||||
shift
|
||||
|
@ -253,6 +265,19 @@ check_texlive() {
|
|||
exit 1
|
||||
}
|
||||
|
||||
check_latexmk() {
|
||||
# check for latexmk
|
||||
STATUS=0
|
||||
command -v latexmk >/dev/null 2>&1 || STATUS=1
|
||||
if [ $STATUS = 0 ]; then
|
||||
log_note "latexmk found"
|
||||
return 0
|
||||
fi
|
||||
|
||||
log_error "Program 'latexmk' not found. Be sure to have texlive or mactex installed!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
check_pdflatex() {
|
||||
# check for pdflatex
|
||||
STATUS=0
|
||||
|
@ -293,6 +318,19 @@ check_pdftoppm() {
|
|||
# no # exit 1 ## can still modify ImageMagick policy!
|
||||
}
|
||||
|
||||
check_pdf2svg() {
|
||||
# check for poppler/pdf2svg
|
||||
STATUS=0
|
||||
command -v pdf2svg >/dev/null 2>&1 || STATUS=1
|
||||
if [ $STATUS = 0 ]; then
|
||||
log_note "pdf2svg found"
|
||||
return 0
|
||||
fi
|
||||
|
||||
log_note "Program 'pdf2svg' not found."
|
||||
exit 1
|
||||
}
|
||||
|
||||
check_imagemagick_policy() {
|
||||
STATUS=1
|
||||
convert -list policy | grep -q "pattern: PDF" || STATUS=0
|
||||
|
@ -347,7 +385,7 @@ check_trackschematic() {
|
|||
|
||||
log_note "Package 'tikz-trackschematic-dev' not found - using project src/."
|
||||
|
||||
export TEXINPUTS=.:../src/:$TEXINPUTS
|
||||
export TEXINPUTS=.:$(pwd)/src/:$TEXINPUTS
|
||||
}
|
||||
|
||||
## checks for updated repository
|
||||
|
@ -524,6 +562,152 @@ create_release_notes() {
|
|||
sedi "s/###/##/g" release-note-$VERSION_STR.md
|
||||
}
|
||||
|
||||
run_compile() {
|
||||
## compile order
|
||||
# 1. manual, symbology-table, snippets
|
||||
# 2. examples
|
||||
# 3. symbology
|
||||
cd doc/
|
||||
mkdir -p .tex
|
||||
log_debug "entered documentation dir"
|
||||
|
||||
## 1. main documentation
|
||||
set -- manual symbology-table snippets
|
||||
for NAME in "$@"; do
|
||||
log_info -n "compiling $NAME:"
|
||||
#
|
||||
## TeX build
|
||||
EXIT_CODE=0
|
||||
/usr/bin/time -p -o .tex/${NAME}.time \
|
||||
latexmk -pdf -f -g -emulate-aux-dir -auxdir=.tex -outdir=.tex $NAME.tex >> /dev/null 2>&1 || EXIT_CODE=1
|
||||
#
|
||||
TIME=$(awk "NR==2" .tex/${NAME}.time | cut -d " " -f2)
|
||||
# understanding TeX statistics:
|
||||
# -> https://tex.stackexchange.com/questions/26208/components-of-latexs-memory-usage
|
||||
MEMORY_USAGE=$(grep "words of memory out of" .tex/${NAME}.log | cut -d " " -f2)
|
||||
MEMORY_USAGE=$(($MEMORY_USAGE/1000))
|
||||
#
|
||||
## compiling snipptes.tex may run out of memory!
|
||||
## to increase available memory find local texmf.cnf:
|
||||
# kpsewhich -a texmf.cnf
|
||||
# returns /usr/local/texlive/2021/texmf.cnf
|
||||
## append in /usr/local/texlive/2021/texmf.cnf
|
||||
# % increase available memory
|
||||
# main_memory = 12000000
|
||||
# extra_mem_bot = 12000000
|
||||
# font_mem_size = 12000000
|
||||
# pool_size = 12000000
|
||||
# buf_size = 12000000
|
||||
## run
|
||||
# sudo mktexlsr
|
||||
#
|
||||
if [ $EXIT_CODE = 0 ]; then
|
||||
log_info " - build successful in ${TIME}s and with ${MEMORY_USAGE}k memory."
|
||||
#
|
||||
mv .tex/$NAME.pdf $NAME.pdf
|
||||
log_debug "copied $NAME to doc/"
|
||||
else
|
||||
ERROR_OCCURRED=1
|
||||
log_error " - build failed."
|
||||
fi
|
||||
done
|
||||
|
||||
## 2. examples
|
||||
cd examples/
|
||||
mkdir -p .tex
|
||||
EXAMPLEDIR="../examples"
|
||||
for EXAMPLE in `ls $EXAMPLEDIR/*.tex`; do
|
||||
FILE=$(basename "$EXAMPLE") # remove path
|
||||
NAME=${FILE%.*} # remove extension
|
||||
#
|
||||
log_info -n "compiling $FILE:"
|
||||
#
|
||||
## TeX build
|
||||
EXIT_CODE=0
|
||||
/usr/bin/time -p -o .tex/${NAME}.time \
|
||||
latexmk -pdf -f -g -emulate-aux-dir -auxdir=.tex -outdir=.tex $NAME.tex >> /dev/null 2>&1 || EXIT_CODE=1
|
||||
#
|
||||
TIME=$(awk "NR==2" .tex/${NAME}.time | cut -d " " -f2)
|
||||
# understanding TeX statistics:
|
||||
# -> https://tex.stackexchange.com/questions/26208/components-of-latexs-memory-usage
|
||||
MEMORY_USAGE=$(grep "words of memory out of" .tex/${NAME}.log | cut -d " " -f2)
|
||||
MEMORY_USAGE=$(($MEMORY_USAGE/1000))
|
||||
#
|
||||
if [ $EXIT_CODE = 0 ]; then
|
||||
log_info " - build successful in ${TIME}s and with ${MEMORY_USAGE}k memory."
|
||||
#
|
||||
mv .tex/$NAME.pdf $NAME.pdf
|
||||
log_debug "copied $NAME to doc/examples/"
|
||||
#
|
||||
if [ $PDFTOPPM_CONVERT = 0 ]; then
|
||||
# 'compare' will convert the pdf to png
|
||||
# -> this reasonably fast!
|
||||
convert -density 300 ${NAME}.pdf ${NAME}.png >> /dev/null 2>&1
|
||||
else
|
||||
# use 'pdftoppm' convert the pdf to png
|
||||
# -> this is slower!
|
||||
pdftoppm -png -r 300 -singlefile ${NAME}.pdf ${NAME}.png
|
||||
fi
|
||||
log_debug "converted $NAME.pdf to PNG"
|
||||
else
|
||||
ERROR_OCCURRED=1
|
||||
log_error " - build failed."
|
||||
fi
|
||||
done
|
||||
cd ..
|
||||
|
||||
## 3. symbology
|
||||
|
||||
cd ..
|
||||
}
|
||||
|
||||
run_symbology() {
|
||||
cd doc/symbology/
|
||||
mkdir -p .tex
|
||||
|
||||
for FILE in symbols_tikz/*.tikz; do
|
||||
SYMBOL=$(basename $FILE .tikz)
|
||||
log_note "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
|
||||
# pdflatex -output-directory=.tex tmp.tex
|
||||
pdflatex -output-directory=.tex -interaction=batchmode tmp.tex 2>&1 > /dev/null
|
||||
|
||||
## -- copy and convert symbols
|
||||
pdf2svg .tex/tmp.pdf symbols_svg/$SYMBOL.svg
|
||||
if [ $PDFTOPPM_CONVERT = 0 ]; then
|
||||
# 'compare' will convert the pdf to png
|
||||
# -> this reasonably fast!
|
||||
convert -density 600 .tex/tmp.pdf symbols_png/$SYMBOL.png >> /dev/null 2>&1
|
||||
else
|
||||
# use 'pdftoppm' convert the pdf to png
|
||||
# -> this is slower!
|
||||
pdftoppm -png -r 600 -singlefile .tex/tmp.pdf symbols_png/$SYMBOL.png
|
||||
fi
|
||||
#
|
||||
mv .tex/tmp.pdf symbols_pdf/$SYMBOL.pdf
|
||||
done
|
||||
|
||||
cd ../..
|
||||
}
|
||||
|
||||
run_test_cases() {
|
||||
|
||||
cd test/
|
||||
|
@ -704,6 +888,20 @@ cleanup() {
|
|||
$rootrun mv ${POLICY_PATH}.backup $POLICY_PATH
|
||||
fi
|
||||
|
||||
## from run_compile
|
||||
if [ $COMPILE = 1 ]; then
|
||||
# remove TMP-folder
|
||||
rm -rf doc/examples/.tex
|
||||
rm -rf doc/.tex
|
||||
fi
|
||||
|
||||
## from run_symbology
|
||||
if [ $SYMBOLOGY = 1 ]; then
|
||||
# remove TMP-folder
|
||||
rm -rf doc/symbology/.tex/
|
||||
rm doc/symbology/tmp.tex
|
||||
fi
|
||||
|
||||
## from run_test_cases
|
||||
if [ $TESTING = 1 ]; then
|
||||
# remove TMP-folder
|
||||
|
@ -751,6 +949,29 @@ if [ $TESTING = 1 ]; then
|
|||
run_test_cases
|
||||
fi
|
||||
|
||||
if [ $COMPILE = 1 ]; then
|
||||
##
|
||||
check_latexmk
|
||||
check_trackschematic
|
||||
check_imagemagick
|
||||
check_imagemagick_policy
|
||||
|
||||
##
|
||||
run_compile
|
||||
fi
|
||||
|
||||
if [ $SYMBOLOGY = 1 ]; then
|
||||
##
|
||||
check_pdflatex
|
||||
check_trackschematic
|
||||
check_imagemagick
|
||||
check_imagemagick_policy
|
||||
check_pdf2svg
|
||||
|
||||
##
|
||||
run_symbology
|
||||
fi
|
||||
|
||||
if [ $RELEASE = 1 ]; then
|
||||
## check if version ist in the correct format
|
||||
check_version_number
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
## -- increase available memory for snippets.tex
|
||||
|
||||
## find local texmf.cnf
|
||||
# kpsewhich -a texmf.cnf
|
||||
# returns /usr/local/texlive/2021/texmf.cnf
|
||||
|
||||
## append in /usr/local/texlive/2021/texmf.cnf
|
||||
# % increase available memory
|
||||
# main_memory = 12000000
|
||||
# extra_mem_bot = 12000000
|
||||
# font_mem_size = 12000000
|
||||
# pool_size = 12000000
|
||||
# buf_size = 12000000
|
||||
|
||||
## run
|
||||
# sudo mktexlsr
|
||||
|
||||
## compile order
|
||||
# 1. manual
|
||||
# 2. symbology-table
|
||||
# 3. snippets
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.9 KiB |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 73 KiB |
BIN
doc/manual.pdf
BIN
doc/manual.pdf
Binary file not shown.
|
@ -221,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}
|
||||
|
@ -1025,46 +1026,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}
|
||||
|
@ -1074,15 +1069,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}
|
||||
|
||||
|
||||
|
@ -1590,13 +1581,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.
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