diff options
author | Y. Wang <yw05@forksworld.de> | 2021-12-11 12:51:49 +0100 |
---|---|---|
committer | Y. Wang <yw05@forksworld.de> | 2021-12-11 12:51:49 +0100 |
commit | 205924d5c7d2217b32443373914fd2564a38ad3e (patch) | |
tree | 60b2fef6da20778042594d6521d6871a57d2fdee /assets | |
parent | 5a6a2ffd43fd1c07beaf1a1748d69508f9443aa9 (diff) | |
download | advtrains-205924d5c7d2217b32443373914fd2564a38ad3e.tar.gz advtrains-205924d5c7d2217b32443373914fd2564a38ad3e.tar.bz2 advtrains-205924d5c7d2217b32443373914fd2564a38ad3e.zip |
Fixup: use pattern fill for PDF output and color fill otherwise
Diffstat (limited to 'assets')
-rw-r--r-- | assets/manual/manual.tex | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/assets/manual/manual.tex b/assets/manual/manual.tex index fc89119..b15a219 100644 --- a/assets/manual/manual.tex +++ b/assets/manual/manual.tex @@ -102,6 +102,15 @@ \draw [<->] (-0.15,0.2) -- (0.15,0.2); } } +\ifdefined\HCode +\tikzset{ + pattern or line fill/.style={fill=cyan} +} +\else +\tikzset{ + pattern or line fill/.style={pattern=north west lines,pattern color=gray} +} +\fi \title{The \advtrains{} mod for Minetest} \author{} @@ -173,7 +182,7 @@ Unlike regular carts in Minetest, tracks can connect in 16 cardinal directions i 0/-1,-1/-2,-1/-1,-2/-1,-1/0,-2/1,-1/1,-1/2 } \foreach \dx/\dy in \dirs { - \draw[fill=cyan,shift={(\dx,\dy)}] (2,2) rectangle +(1,1); + \draw[pattern or line fill,shift={(\dx,\dy)}] (2,2) rectangle +(1,1); } \foreach \dx/\dy in \dirs { \draw[very thick,->] (2.5,2.5) -- +(\dx,\dy); @@ -190,7 +199,7 @@ The use of 16 cardinal directions instead of four allows the creation of curves \begin{centeredtikzpicture} \draw[step=1,gray,very thin] (0,0) grid (6,6); \foreach \x/\y in {0/0,0/1,1/3,2/4,4/5,5/5} { - \draw[fill=cyan] (\x,\y) rectangle +(1,1); + \draw[pattern or line fill] (\x,\y) rectangle +(1,1); } \draw[<->,very thick] (0.5,0.5) -- ++(0,1) -- ++(1,2) -- ++(1,1) -- ++(2,1) -- ++(1,0); \end{centeredtikzpicture} @@ -286,7 +295,7 @@ It is also possible to create track layouts without using crossings. Some exampl 5/0,7/1,9/2,11/3,6/3,7/2,8/1,9/0 } \foreach \x/\y in \squares { - \draw [fill=cyan,shift={(-0.5,-0.5)}] (\x,\y) rectangle +(1,1); + \draw [pattern or line fill,shift={(-0.5,-0.5)}] (\x,\y) rectangle +(1,1); } \foreach \ax/\ay/\bx/\by in \lines { \draw [<->, very thick] (\ax,\ay) -- (\bx,\by); @@ -1091,11 +1100,11 @@ This chapter shows some example setups that you can use on your rail lines. Thes \lstinputlisting[style=luastyle]{station.lua} \subsection{T junction}\label{s:stjunction} -\begin{centeredtikzpicture}[very thick,draw=white,scale=0.6] +\begin{centeredtikzpicture}[very thick,draw=black,scale=0.6] \fill [red] (-0.5,6.5) rectangle ++(16,3); \fill [orange] (-0.5,7.5) |- ++(3,-3) -- ++(2,-2) |- ++(3,-3) -- ++(0,8) -- cycle; \fill [green] (15.5,7.5) |- ++(-3,-3) -- ++(-2,-2) |- ++(-3,-3) -- ++(0,8) -- cycle; - \fill [blue] (2.5,7.5) -- ++(5,-5) -- ++(5,5) -- cycle; + \fill [cyan] (2.5,7.5) -- ++(5,-5) -- ++(5,5) -- cycle; \draw [shift={(-0.5,-0.5)},gray,thin] (0,0) grid (16,10); \foreach \x/\s in {0/1,-15/-1} { \draw [<->,xscale=\s] (\x,6) -- ++(2,0) -- ++(2,-1) -- ++(1,-1) -- ++(1,-2) -- ++(0,-2); |