Debian Codegraph @

texmf-dist/doc/latex/tikz-trackschematic/tikz-trackschematic-documentation.sty

raw
1 %% symbol library for TikZ track schematics
2 %
3 % Copyright (c) 2018 - 2022, Martin Scheidt (ISC license)
4
5 % 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.
6
7 \ProvidesPackage{tikz-trackschematic-documentation}[2020-12-30 Documentation Package for the tikz-trackschematic library]
8
9 % ---[ HTML ]---
10 \usepackage{iftex}
11 \usepackage[
12 HomeHTMLFilename=index, % Filename of the homepage.
13 % IndexLanguage=english, % Language for xindy index, glossary.
14 latexmk % Use latexmk to compile.
15 ]{lwarp}
16 % --------[ Coding and Language ]----------
17 \ifPDFTeX
18 \RequirePackage{scrhack,marginnote}
19 \RequirePackage[utf8]{inputenc}
20 \RequirePackage[T1]{fontenc}
21 \fi
22 \RequirePackage[main=english]{babel}
23 % --------[ revision history ]----------
24 \RequirePackage[tocentry]{vhistory}
25 % --------[ Layout ]-----------
26 \ifPDFTeX
27 \pretolerance=8000
28 \tolerance=9500
29 \hbadness=8000
30 \vbadness=10000
31 \displaywidowpenalty=10000
32 \clubpenalty=10000
33 \widowpenalty=10000
34 \RequirePackage{lmodern,microtype,mathptmx,courier}
35 \RequirePackage[scaled=0.92]{helvet}
36 \RequirePackage[%
37 automark,%
38 headsepline,%
39 draft=false,%
40 ]{scrlayer-scrpage}%
41 \pagestyle{scrheadings}
42 \fi
43 \RequirePackage{multicol}
44 % ----------[ display ]-----------
45 \RequirePackage[prefix=]{xcolor-solarized}
46 \RequirePackage[inline]{enumitem}
47
48 \RequirePackage[final]{listings}
49 \lstdefinelanguage{tikz}{%
50 keywordsprefix = \\,
51 alsoletter = \\,%
52 morekeywords = {},%
53 sensitive = true,%
54 morecomment = [l]\%,%
55 morestring=[s][\bfseries\color{magenta}]{\[}{\]},%
56 morestring=[s][\bfseries\color{violet}]{\{}{\}},%
57 morestring=[s][\bfseries\color{violet}]{(}{)},%
58 }[keywords,comments,strings]%
59
60 \lstset{%
61 language = tikz,%
62 basicstyle = \scriptsize\ttfamily,%
63 keywordstyle = \bfseries\color{blue},%
64 commentstyle = \itshape\color{green},%
65 backgroundcolor = \color{base3},%
66 showstringspaces = false,%
67 columns = fullflexible,%
68 breaklines = true,%
69 frame = single,%
70 }%
71
72 \RequirePackage{longtable,tikz,adjustbox,rotating}
73 \RequirePackage{siunitx}[=v2]
74 % \sisetup{
75 % text-family-to-math = true,
76 % text-series-to-math = true
77 % }
78
79 \IfFileExists{tikz-trackschematic-dev.sty}{%
80 \RequirePackage[dev]{tikz-trackschematic}%
81 }{%
82 \RequirePackage{tikz-trackschematic}%
83 }%
84 % -----------[ linking ]----------------
85 \RequirePackage{xr-hyper}
86 \RequirePackage[%
87 % pdftex,%
88 % pdfpagelabels, % modify PDF page labels
89 hyperindex,%
90 hyperfigures,%
91 bookmarksopen,%
92 bookmarksnumbered,%
93 draft=false,%
94 pageanchor=true, % Determines whether every page is given an implicit anchor at the top left corner
95 %pagebackref, % Adds ‘backlink’ text to the end of each item in the bibliography, as a list of page numbers
96 %linktocpage, % make page number, not text, be link on TOC, LOF and LOT
97 breaklinks=true, % allow links to break over lines by making links over multiple lines into PDF links to the same target
98 colorlinks=true, % Colors the text of links and anchors
99 linkcolor=base01, % Color for normal internal links
100 urlcolor=blue, % Color for web links
101 ]{hyperref} % PDF with a linked TableOfContent
102 \RequirePackage{url}
103
104
105 % -----------[ special commands ]----------------
106 \renewcommand{\symbol}[2][1.0]{%
107 \adjustbox{valign=c}{\begin{tikzpicture}[scale=#1]%
108 \input{./snippets/#2}%
109 \path (-0.1,-1.1) rectangle (6.1,1.1); % background rectangle to unify every cell containing a symbol
110 \end{tikzpicture}}%
111 }%
112
113 \newcommand{\code}[1]{\lstinputlisting[firstline=7]{./snippets/#1}}%
114
115 \newcounter{symbolNo}%
116 \def\No{\stepcounter{symbolNo}\arabic{symbolNo}}%
117
118 \newcommand{\symboldescription}[1]{\paragraph*{#1}\marginnote{\tikz{\fill (-0.4,0.15)--(-0.4,-0.15)--(0,0)--cycle;}}\mbox{}\\}%
119
120 \setlength{\parindent}{0cm}
121 \reversemarginpar
122 %%%%%%%%%%%%%%%
123 \endinput%
124 %