From 26533372a9fcdee289d39b608c323c81959f42b3 Mon Sep 17 00:00:00 2001 From: Martin Scheidt Date: Wed, 23 Feb 2022 10:35:52 +0100 Subject: [PATCH] prepared for lwarp package --- doc/tikz-trackschematic-documentation.sty | 102 ++++++++++++---------- 1 file changed, 55 insertions(+), 47 deletions(-) diff --git a/doc/tikz-trackschematic-documentation.sty b/doc/tikz-trackschematic-documentation.sty index b54f4b7..da150e4 100644 --- a/doc/tikz-trackschematic-documentation.sty +++ b/doc/tikz-trackschematic-documentation.sty @@ -6,51 +6,41 @@ \ProvidesPackage{tikz-trackschematic-documentation}[2020-12-30 Documentation Package for the tikz-trackschematic library] +% ---[ HTML ]--- +\usepackage{iftex} +\usepackage[ + HomeHTMLFilename=index, % Filename of the homepage. + % IndexLanguage=english, % Language for xindy index, glossary. + latexmk % Use latexmk to compile. +]{lwarp} % --------[ Coding and Language ]---------- -\RequirePackage{scrhack,marginnote} -\RequirePackage[utf8]{inputenc} -\RequirePackage[T1]{fontenc} +\ifPDFTeX + \RequirePackage{scrhack,marginnote} + \RequirePackage[utf8]{inputenc} + \RequirePackage[T1]{fontenc} +\fi \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} +\ifPDFTeX + \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} +\fi \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} @@ -79,22 +69,40 @@ frame = single,% }% -\RequirePackage{longtable,tikz,siunitx,adjustbox,rotating} -\sisetup{ - text-family-to-math = true, - text-series-to-math = true -} +\RequirePackage{longtable,tikz,adjustbox,rotating} +\RequirePackage{siunitx}[=v2] +% \sisetup{ +% text-family-to-math = true, +% text-series-to-math = true +% } \IfFileExists{tikz-trackschematic-dev.sty}{% \RequirePackage[dev]{tikz-trackschematic}% }{% \RequirePackage{tikz-trackschematic}% }% +% -----------[ 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{url} -\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}} +% -----------[ special commands ]---------------- \renewcommand{\symbol}[2][1.0]{% \adjustbox{valign=c}{\begin{tikzpicture}[scale=#1]% \input{./snippets/#2}%