tikz-trackschematic/doc/tikz-trackschematic-documen...

113 lines
3.9 KiB
TeX
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

%% 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.
\ProvidesPackage{tikz-trackschematic-documentation}[2020-12-30 Documentation Package for the tikz-trackschematic library]
% --------[ Coding and Language ]----------
\RequirePackage{scrhack,marginnote}
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage[main=english]{babel}
% --------[ revision history ]----------
\RequirePackage[tocentry]{vhistory}
% --------[ Layout ]-----------
\pretolerance=8000
\tolerance=9500
\hbadness=8000
\vbadness=10000
\displaywidowpenalty=10000
\clubpenalty=10000
\widowpenalty=10000
\RequirePackage{lmodern,microtype,mathptmx,courier}
\RequirePackage[scaled=0.92]{helvet}
\RequirePackage[%
automark,%
headsepline,%
draft=false,%
]{scrlayer-scrpage}%
\pagestyle{scrheadings}
\RequirePackage{multicol}
% -----------[ PDF linking ]----------------
\RequirePackage{xr-hyper}
\RequirePackage[%
pdftex,%
pdfpagelabels, % modify PDF page labels
hyperindex,%
hyperfigures,%
bookmarksopen,%
bookmarksnumbered,%
draft=false,%
pageanchor=true, % Determines whether every page is given an implicit anchor at the top left corner
%pagebackref, % Adds ‘backlink’ text to the end of each item in the bibliography, as a list of page numbers
%linktocpage, % make page number, not text, be link on TOC, LOF and LOT
breaklinks=true, % allow links to break over lines by making links over multiple lines into PDF links to the same target
colorlinks=true, % Colors the text of links and anchors
linkcolor=base01, % Color for normal internal links
urlcolor=blue, % Color for web links
]{hyperref} % PDF with a linked TableOfContent
\RequirePackage{bookmark} % Adding package bookmark improves bookmarks handling.
\RequirePackage{url}
% ----------[ display ]-----------
\RequirePackage[prefix=]{xcolor-solarized}
\RequirePackage[inline]{enumitem}
\RequirePackage[final]{listings}
\lstdefinelanguage{tikz}{%
keywordsprefix = \\,
alsoletter = \\,%
morekeywords = {},%
sensitive = true,%
morecomment = [l]\%,%
morestring=[s][\bfseries\color{magenta}]{\[}{\]},%
morestring=[s][\bfseries\color{violet}]{\{}{\}},%
morestring=[s][\bfseries\color{violet}]{(}{)},%
}[keywords,comments,strings]%
\lstset{%
language = tikz,%
basicstyle = \scriptsize\ttfamily,%
keywordstyle = \bfseries\color{blue},%
commentstyle = \itshape\color{green},%
backgroundcolor = \color{base3},%
showstringspaces = false,%
columns = fullflexible,%
breaklines = true,%
frame = single,%
}%
\RequirePackage{longtable,tikz,siunitx,adjustbox,rotating}
\sisetup{math-rm=\mathsf}
\IfFileExists{tikz-trackschematic-dev.sty}{%
\RequirePackage[dev]{tikz-trackschematic}%
}{%
\RequirePackage{tikz-trackschematic}%
}%
\usepackage[obeyDraft,textsize=footnotesize]{todonotes}
\newcommand{\TODO}{\todo[linecolor=orange,backgroundcolor=orange!20,bordercolor=orange,inline,]{\textcolor{orange}{Todo}}}
% \newcommand{\TODO}[1]{\todo[linecolor=orange,backgroundcolor=orange!20,bordercolor=orange,inline,]{\textcolor{orange}{Todo:~}#1}}
\renewcommand{\symbol}[2][1.0]{%
\adjustbox{valign=c}{\begin{tikzpicture}[scale=#1]%
\input{./snippets/#2}%
\path (-0.1,-1.1) rectangle (6.1,1.1); % background rectangle to unify every cell containing a symbol
\end{tikzpicture}}%
}%
\newcommand{\code}[1]{\lstinputlisting[firstline=7]{./snippets/#1}}%
\newcounter{symbolNo}%
\def\No{\stepcounter{symbolNo}\arabic{symbolNo}}%
\newcommand{\symboldescription}[1]{\paragraph*{#1}\marginnote{\tikz{\fill (-0.4,0.15)--(-0.4,-0.15)--(0,0)--cycle;}}\mbox{}\\}%
\setlength{\parindent}{0cm}
\reversemarginpar
%%%%%%%%%%%%%%%
\endinput%
%