University of Stuttgart Dr.-Ing. dissertation, Stuttgarter Maschinenbau series (isw_smb_diss)
The ISW's document class for engineering doctoral dissertations at the University of Stuttgart published in the Stuttgarter Maschinenbau series: a KOMA-based class with the Dr.-Ing. title page, submission and accepted (print) modes, A5 and binding-correction options, and English and German sample dissertations.
- Category
- Thesis
- Document class
isw_smb_diss(isw_smb_diss.cls) — ships with TeX Live- Workflow
- Thesis / dissertation — submissions and revision rounds
- Author
- University of Stuttgart, Institute for Control Engineering of Machine Tools and Manufacturing Units (ISW)
- Source
- University of Stuttgart, Institute for Control Engineering of Machine Tools and Manufacturing Units (ISW)
- Licence
- No licence is stated in the files. University of Stuttgart, Institute for Control Engineering of Machine Tools and Manufacturing Units (ISW) distributes them for authors preparing a submission.
These are the publisher’s own files. This project starts from University of Stuttgart, Institute for Control Engineering of Machine Tools and Manufacturing Units (ISW)’s package for this publication — their manuscript, their isw_smb_diss.cls, their bibliography style — so what compiles here is what they would have given you.
University of Stuttgart, Institute for Control Engineering of Machine Tools and Manufacturing Units (ISW) serves this exact file to University of Stuttgart. Check University of Stuttgart, Institute for Control Engineering of Machine Tools and Manufacturing Units (ISW)’s author pages for the current instructions.
Where this differs from the publisher’s download.
- Changed: diss_beispiel.tex, diss_example_en.tex, settings_example/tikz.tex: comments linking another online editor's help pages removed (amend-r5.mjs)..
What you get
bibliography.bib· 1 KBdiss_beispiel.tex· 9 KBdiss_example_en.tex— the file that is compiled · 9 KBisw_smb_diss.cls· 12 KBsettings_example/definitions.tex· 2 KBsettings_example/glossaries.tex· 3 KBsettings_example/tikz.tex· 5 KBsettings_example/tikz_blocks.tex· 9 KB
These become your files. Editing them afterwards changes your project and nothing else — a project owns its files from the moment it is made.
Source
bibliography.bib · 1 KB
% ****************************************
% * File: SAMPLE.BIB *
% ****************************************
% * An invented bib file *
% * For the sample texts *
% * The order is unimportant and there *
% * may be more entries than references *
% * in the text *
% ****************************************
%
@ARTICLE{smit54,
AUTHOR = {J. G. Smith and H. K. Weston},
TITLE = {Nothing Particular in this Year's History},
YEAR = {1954},
JOURNAL = {J. Geophys. Res.},
VOLUME = {2},
PAGES = {14-15}
}
@BOOK{colu92,
AUTHOR = {Christopher Columbus},
TITLE = {How {I} Discovered {America}},
YEAR = {1492},
PUBLISHER = {Hispanic Press},
ADDRESS = {Barcelona}
}
@ARTICLE{gree00,
AUTHOR = {R. J. Green and U. P. Fred and W. P. Norbert},
TITLE = {Things that Go Bump in the Night},
YEAR = {1900},
JOURNAL = {Psych. Today},
VOLUME = {46},
PAGES = {345-678}
}
@ARTICLE{phil99,
AUTHOR = {T. P. Phillips},
TITLE = {Possible Influence of the Magnetosphere on {American} History},
YEAR = {1999},
JOURNAL = {J. Oddball Res.},
VOLUME = {98},
PAGES = {1000-1003}
}
@ARTICLE{jame76,
AUTHOR = {Kelly James and Harris, Jr., George and Wilby Wollops},
TITLE = {{American} Independence and Magnetism},
YEAR = {1776},
JOURNAL = {Revol. Tracts},
VOLUME = {32},
PAGES = {34-55}
}
diss_beispiel.tex · 9 KB
% !TeX program = txs:///lualatex
% !TEX spellcheck = de-DE
% !BIB program = txs:///biber
%% magic comments above automatically switch to correct compiler in TexStudio
\documentclass[
%accepted, % uncomment this after your oral exam for the final print (changes title page)
%print,% use this flag for printing (turns links black)
english, ngerman,% Language: last one is the main language used in the document
%smallfont, % if you wish a smaller font. This is 12pt for the manuscript,
twoside, % one of {oneside, twoside} -> onesided or twosided layout. for twosided print choose twoside
toc=bib, % have bibliography listed in table of contents
BCOR=6mm, % binding correction, 6 mm for 200 pages, 80 g/m² Paper (half of thickness of book content)
%a5paper, % change paper format to true DIN-A5 (default is DIN-A4). This might lead to layout issues after conversion, prefer offloading scaling to A5 to printer
ingenieurin, % ingenieur, % for title page ... der Würde einer/eines Doktor-Ingenieurin/Ingenieurs
]{isw_smb_diss} % Relative path to class. If class is in subfolder (e.g. as git submodule) then \documentclass[...]{isw_smb_diss/isw_smb_diss}
% Rules for the design of your dissertation: http://dx.doi.org/10.18419/opus-10327 (S. 25)
% Suppress single lines on previous/next page:
\clubpenalty=10000
\widowpenalty=10000
\displaywidowpenalty=10000
%% ======= Recommended packages (not necessarily needed) =======
\usepackage{shellesc} % shell escape alternative: more flexible than --shell-escape flag
% for glossaries-extra, tikz external package
% use this to debug where borders are hurt:
%\usepackage{showframe}
\usepackage{csquotes} % for bibliography and glossaries
\usepackage{xpatch}
% Citation style. If your institute has specific requirements, configure here:
\usepackage[style=numeric,
sorting=none,
maxcitenames=2,
maxbibnames=99,
giveninits=true,
uniquelist=false,
backend=biber,
natbib=true,
bibwarn=true,
sortcites=true, % sort citations when multiple are cited, e.g. \cite{A,B,C} -> [1,2,3] instead of [3,1,2]
isbn=true]{biblatex}
% Hack: print url only if no doi is present, credits to samcarter_is_at_topanswers.xyz on https://tex.stackexchange.com/a/424775
\renewbibmacro*{doi+eprint+url}{%
\printfield{doi}%
\newunit\newblock%
\iftoggle{bbx:eprint}{%
\usebibmacro{eprint}%
}{}%
\newunit\newblock%
\iffieldundef{doi}{%
\usebibmacro{url+urldate}}%
{}%
}
\usepackage{amsmath, amssymb, bm} % math commands
\numberwithin{equation}{chapter} %ensure that equations enumeration starts at 1 for every chapter
\usepackage{xurl} %break links in bibliography
\RequirePackage{graphicx} % images
% Nice looking tables (https://nhigham.com/2019/11/19/better-latex-tables-with-booktabs/latex subfig)
\usepackage{booktabs}
% si-units: auto-rounding numbers, set same format for numbers globally, add and correclty typeset units for numbers
\usepackage{siunitx}
\sisetup{%round-mode = places,
%round-precision = 3, %
range-phrase=~--~, % --, % \qtyrange{from}{to}{unit}
table-number-alignment = center,
table-omit-exponent=false, % turn of exp representation in tables
exponent-product=\cdot,
output-decimal-marker={,}, % "," instead of "." as decimal separator (for German theses)
%exponent-mode = fixed, fixed-exponent = 0, % turn of exponent mode with Latex3e
}
% The following line should help, if you experience problems with missing hyphenation of composed words with dash
% (LaTeX turns off hyphenation when a dash is present in a word)
% Source: https://tex.stackexchange.com/questions/63232/why-can-words-with-hyphen-char-not-be-hyphenated/63234#63234
% Alternatively, explicitely hyphenate with "= (https://de.wikibooks.org/wiki/LaTeX-W%C3%B6rterbuch:_Silbentrennung)
\defaulthyphenchar=127
% Just for demonstration use
\usepackage{blindtext}
% harvey balls: e.g \harveyBallFull
% \usepackage{harveyballs}
%% mark changes after your Oral presentation for review (http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/changes/changes.english.pdf):
%% You can even list all changes so they can easily be checked with "\listofchanges"
%\usepackage[%final % keyword "final" is to hide changes highlighting
% ]{changes}
%\definechangesauthor[name=Prof. Haupt Berichter, color=Plum]{MyProf}
%\definechangesauthor[name=Prof. Mit berichter, color=OliveGreen]{OtherProf}
% Other settings you may find useful
%\input{isw_smb_diss/settings_example/definitions} % commands
%\input{isw_smb_diss/settings_example/tikz} % TikZ settings
%\input{isw_smb_diss/settings_example/tikz_blocks} % block diagrams using tikz
%% ======= End of recommended packages =======
% TODO: add your own bibliography here:
\addbibresource{bibliography.bib}
% search for images in folder img/, i.e. instead of \includegraphics{img/...}, just use \includegraphics{...}
\graphicspath{{img/}}
\title{Titel der Diss\\gerne auch mit Zeilenumbruch\\zur besseren Formatierung}
% English title: set proper title case: https://titlecaseconverter.com/
\subtitle{English Thesis Title With Line Breaks\\for Better Formatting} % Nur, wenn die Arbeit auf Deutsch ist, sonst weglassen
\author{Vorname Nachname,~M.Sc.}
\birthplace{Geburtsort}
\examiner{Univ.-Prof.~Dr.-Ing.~Haupt~Berichter}
\coexaminer{Univ.-Prof.~Dr.-Ing.~Mit~Berichter}
\faculty{Konstruktions-, Produktions- und Fahrzeugtechnik} % Fak. 7
% \faculty{Energie-, Verfahrens- und Biotechnik} % Fak. 4
\institute{Institut für Steuerungstechnik der Werkzeugmaschinen und Fertigungseinrichtungen}
\dateoforalexamination{1. Januar 2027}
\yearofpublication{2027}
% Manual hyphenation.
% More info for German hyphenation in LaTeX: https://de.wikibooks.org/wiki/LaTeX-W%C3%B6rterbuch:_Silbentrennung
\hyphenation{Dis-am-bi-gu-ie-rung, Sil-ben-trenn-ung}
%%% Acronyms and glossary:
% Glossary (Used symbols, acronyms, ...)
%\input{settings_example/glossaries}
% Define acronyms (needs \input{settings/glossaries})
% Use in text: \ac{kgt} or short \acs{kgt}
%\newacronym{ISW}{ISW}{Institut für Steuerungstechnik der Werkzeugmaschinen und Fertigungseinrichtungen}
%\newacronym{FE}{FE}{Finite Elemente}
% Glossary entries, also needs \input{settings/glossaries}, use in text as \gls{Q}
%\glsxtrnewsymbol[description={Kovarianz des Systemrauschens des Kalmanfilters}]{Q}{\ensuremath{\bm Q}}
%\glsxtrnewsymbol[description={Kovarianz des Messrauschens des Kalmanfilters}]{R}{\ensuremath{R}}
% Show page borders (useful for final checks)
%\usepackage{showframe}
\begin{document}
\frontmatter
% title page according to https://www.f07.uni-stuttgart.de/forschung/promotion-und-habilitation/promotion/dokumente/Titelblatt-Dissertation-1Einreichung_2Drucklegung.pdf
\maketitle
\onehalfspacing % line spacing: 1,5
\addchap{Vorwort}
% Formel-Beispiel
\(a_x + b_y \sum_i^N dx + \int\) \footnote{Das ist eine Formel.}
% Beispiel SI-Unit-Paket
\SI{3.14159265e1}{kg.m/s^2} \cite{colu92}
%Beispiel für referenzieren eines Glossar-Eintrags
%Matrizen \gls{Q} und \gls{R}
%auch in Gleichungen: $\gls{Q}$
%
%Beispiel fürs Referenzieren eines Akronyms:
%\ac{ISW}.
%Automatische Bindestriche bei zusammengesetzten Akronymen: \ac{FE}[-Modelle]
\cleardoublepage
% two versions required: Kurzfassung in German and Abstract in English, see
%"Richtlinien für die äußere Form der Veröffentlichung von Dissertationen"
% in https://elib.uni-stuttgart.de/items/6ff82d8a-b81e-4e55-99ac-345cbdc91e13
\addchap{Kurzfassung}
\addchap{Abstract}
\cleardoublepage
\ifpdf
\phantomsection
\pdfbookmark[0]{\contentsname}{toc}
\fi
\tableofcontents
% % List of acronyms/symbols
%\cleardoublepage
%reference with label \ref{glo:acronyms}
%\addchap{Abkürzungsverzeichnis}
%\glssetwidest{ISW~} % longest acronym to properly indent list of acronyms
%\printglossary[type=\acronymtype, style=alttree, title={Abkürzungsverzeichnis}]
%
%\cleardoublepage
%\printglossary[type=symbols,style={symbunitlong}, title={Symbolverzeichnis}]
\cleardoublepage
\listoffigures
\cleardoublepage
\listoftables
\raggedbottom % prefer having whitespace on bottom of pages (instead of stretching content to have common bottom line)
% This is required by the publisher
\mainmatter % Main contents. Tips:
% - Have separate .tex files per chapter, include them using \input{...}
% - When using versioning with git, try to start each sentence in a new line (this makes diffs cleaner)
\chapter{Einleitung}
\Blindtext
\section{Forschungsfrage und Problembeschreibung}
\section{Beitrag dieser Arbeit}
\chapter{Stand der Forschung und Technik}
\section{Zusammenfassende Bewertung des Stands der Technik}
\chapter{Ziel der Arbeit und Vorgehensweise}
% Eigene Kapitel: weitere Problemanalyse, Lösung, Validierung
\chapter{Zusammenfassung}
\section{Diskussion}
\section{Ausblick}
% TODO: nocite prints the whole bib file to the bibliography. This is for testing and should be commented out in your thesis:
\nocite{*}
% Bibliography
\setlength{\emergencystretch}{.5em}
%% Force page breaks in bibliography before splitting single entries over multiple pages
%\patchcmd{\bibsetup}{\interlinepenalty=5000}{\interlinepenalty=10000}{}{}
\printbibliography
% Appendix, if needed:
%% This uses \section and below to have everything grouped in the virtual chapter "Anhang" in the table of contents.
\startSMBAppendix
\addcontentsline{toc}{chapter}{\appendixname}
\section{Ein Anhang}
\subsection{Unteranhang 1}
\end{document}diss_example_en.tex — the file that is compiled · 9 KB
% !TeX program = txs:///lualatex
% !BIB program = txs:///biber
% !TEX spellcheck = en-GB
%% magic comments above automatically switch to correct compiler in TexStudio
\documentclass[
%accepted, % uncomment this after your oral exam for the final print (changes title page)
%print,% use this flag for printing (turns links black)
ngerman, english,% Language: last one is the main language used in the document
%smallfont, % if you wish a smaller font. This is 12pt for the manuscript,
twoside, % one of {oneside, twoside} -> onesided or twosided layout. for twosided print choose twoside
toc=bib, % have bibliography listed in table of contents
BCOR=6mm, % binding correction, 6 mm for 200 pages, 80 g/m² Paper (half of thickness of book content)
%a5paper, % change paper format to true DIN-A5 (default is DIN-A4). This might lead to layout issues after conversion, prefer offloading scaling to A5 to printer
ingenieurin, % ingenieur, % for title page ... der Würde einer/eines Doktor-Ingenieurin/Ingenieurs
]{isw_smb_diss} % Relative path to class. If class is in subfolder (e.g. as git submodule) then \documentclass[...]{isw_smb_diss/isw_smb_diss}
% Rules for the design of your dissertation: http://dx.doi.org/10.18419/opus-10327 (S. 25)
% Suppress single lines on previous/next page:
\clubpenalty=10000
\widowpenalty=10000
\displaywidowpenalty=10000
%% ======= Recommended packages (not necessarily needed) =======
\usepackage{shellesc} % shell escape alternative: more flexible than --shell-escape flag
% for glossaries-extra, tikz external package
% use this to debug where borders are hurt:
%\usepackage{showframe}
\usepackage{csquotes} % for bibliography and glossaries
\usepackage{xpatch}
% Citation style. If your institute has specific requirements, configure here:
\usepackage[style=numeric,
sorting=none,
maxcitenames=2,
maxbibnames=99,
giveninits=true,
uniquelist=false,
backend=biber,
natbib=true,
bibwarn=true,
sortcites=true, % sort citations when multiple are cited, e.g. \cite{A,B,C} -> [1,2,3] instead of [3,1,2]
isbn=true]{biblatex}
% Hack: print url only if no doi is present, credits to samcarter_is_at_topanswers.xyz on https://tex.stackexchange.com/a/424775
\renewbibmacro*{doi+eprint+url}{%
\printfield{doi}%
\newunit\newblock%
\iftoggle{bbx:eprint}{%
\usebibmacro{eprint}%
}{}%
\newunit\newblock%
\iffieldundef{doi}{%
\usebibmacro{url+urldate}}%
{}%
}
\usepackage{amsmath, amssymb, bm} % math commands
\numberwithin{equation}{chapter} %ensure that equations enumeration starts at 1 for every chapter
\usepackage{xurl} %break links in bibliography
\RequirePackage{graphicx} % images
% Nice looking tables (https://nhigham.com/2019/11/19/better-latex-tables-with-booktabs/latex subfig)
\usepackage{booktabs}
% si-units: auto-rounding numbers, set same format for numbers globally, add and correclty typeset units for numbers
\usepackage{siunitx}
\sisetup{%round-mode = places,
%round-precision = 3, %
range-phrase=~--~, % --, % \qtyrange{from}{to}{unit}
table-number-alignment = center,
table-omit-exponent=false, % turn of exp representation in tables
exponent-product=\cdot,
output-decimal-marker={,}, % "," instead of "." as decimal separator (for German theses)
%exponent-mode = fixed, fixed-exponent = 0, % turn of exponent mode with Latex3e
}
% The following line should help, if you experience problems with missing hyphenation of composed words with dash
% (LaTeX turns off hyphenation when a dash is present in a word)
% Source: https://tex.stackexchange.com/questions/63232/why-can-words-with-hyphen-char-not-be-hyphenated/63234#63234
% Alternatively, explicitely hyphenate with "= (https://de.wikibooks.org/wiki/LaTeX-W%C3%B6rterbuch:_Silbentrennung)
\defaulthyphenchar=127
% Just for demonstration use
\usepackage{blindtext}
% harvey balls: e.g \harveyBallFull
% \usepackage{harveyballs}
%% mark changes after your Oral presentation for review (http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/changes/changes.english.pdf):
%% You can even list all changes so they can easily be checked with "\listofchanges"
%\usepackage[%final % keyword "final" is to hide changes highlighting
% ]{changes}
%\definechangesauthor[name=Prof. Haupt Berichter, color=Plum]{MyProf}
%\definechangesauthor[name=Prof. Mit berichter, color=OliveGreen]{OtherProf}
% Other settings you may find useful
%\input{isw_smb_diss/settings_example/definitions} % commands
%\input{isw_smb_diss/settings_example/tikz} % TikZ settings
%\input{isw_smb_diss/settings_example/tikz_blocks} % block diagrams using tikz
%% ======= End of recommended packages =======
% TODO: add your own bibliography here:
\addbibresource{bibliography.bib}
% search for images in folder img/, i.e. instead of \includegraphics{img/...}, just use \includegraphics{...}
\graphicspath{{img/}}
\title{Your paper} % set proper title case: https://titlecaseconverter.com/
% \subtitle not needed for english title, see https://www.f07.uni-stuttgart.de/forschung/promotion-und-habilitation/promotion/dokumente/Titelblatt-Dissertation-1Einreichung_2Drucklegung.pdf (S. 25)
\author{Jane Doe,~M.Sc.}
\birthplace{Birthplace}
\examiner{Univ.-Prof.~Dr.-Ing.~Main~Examiner}
\coexaminer{Univ.-Prof.~Dr.-Ing.~Co~Examiner}
\faculty{Konstruktions-, Produktions- und Fahrzeugtechnik} % Fak. 7
% \faculty{Energie-, Verfahrens- und Biotechnik} % Fak. 4
\institute{Institut für Steuerungstechnik der Werkzeugmaschinen und Fertigungseinrichtungen}
\dateoforalexamination{1. Januar 2027}
\yearofpublication{2027}
%%% Acronyms and glossary:
% Glossary (Used symbols, acronyms, ...)
%\input{settings_example/glossaries}
% Define acronyms (needs \input{settings/glossaries})
% Use in text: \ac{kgt} or short \acs{kgt}
%\newacronym{ISW}{ISW}{Institute for Control Engineering of Machine Tools and Manufacturing Units}
%\newacronym{FE}{FE}{Finite Elements}
% Glossary entries, also needs \input{settings/glossaries}, use in text as \gls{Q}
%\glsxtrnewsymbol[description={Covariance of the system noise of the Kalman filter}]{Q}{\ensuremath{\bm Q}}
%\glsxtrnewsymbol[description={Covariance of the measurement noise of the Kalman filter}]{R}{\ensuremath{R}}
% Show page borders (useful for final checks)
%\usepackage{showframe}
\begin{document}
\frontmatter
% title page according to https://www.f07.uni-stuttgart.de/forschung/promotion-und-habilitation/promotion/dokumente/Titelblatt-Dissertation-1Einreichung_2Drucklegung.pdf
\maketitle
\onehalfspacing % line spacing: 1,5
\addchap{Preface}
% Formula example
\(a_x + b_y \sum_i^N dx + \int\) \footnote{This is a formula.}
% Example SI unit package
\SI{3.14159265e1}{kg.m/s^2} \cite{colu92}
%Example for referencing a glossary entry
%Matrices \gls{Q} and \gls{R}
%also in equations: $\gls{Q}$
%
%Example for referencing an acronym:
%\ac{ISW}.
\cleardoublepage
% two versions required: Kurzfassung in German and Abstract in English, see
%"Richtlinien für die äußere Form der Veröffentlichung von Dissertationen"
% in https://elib.uni-stuttgart.de/items/6ff82d8a-b81e-4e55-99ac-345cbdc91e13
\addchap{Abstract}
\addchap{Kurzfassung}
\cleardoublepage
\ifpdf
\phantomsection
\pdfbookmark[0]{\contentsname}{toc}
\fi
\tableofcontents
% % List of acronyms/symbols
%\cleardoublepage
%reference with label \ref{glo:acronyms}
%\addchap{Acronyms}
%\glssetwidest{ISW~} % longest acronym to properly indent list of acronyms
%\printglossary[type=\acronymtype, style=alttree, title={Acronyms}]
%
%\cleardoublepage
%\printglossary[type=symbols,style={symbunitlong}, title={List of Symbols}]
\cleardoublepage
\listoffigures
\cleardoublepage
\listoftables
\raggedbottom % prefer having whitespace on bottom of pages (instead of stretching content to have common bottom line)
% This is required by the publisher
\mainmatter % Main contents. Tips:
% - Have separate .tex files per chapter, include them using \input{...}
% - When using versioning with git, try to start each sentence in a new line (this makes diffs cleaner)
\chapter{Introduction}
\Blindtext
\section{Problem statement and Research Question}
\section{Contribution}
\chapter{Related Work}
\section{Summary and Discussion}
\chapter{Goals and Methodology}
% Own chapters: further problem analysis, solution, validation
\chapter{Conclusion}
\section{Discussion}
\section{Outlook}
% TODO: nocite prints the whole bib file to the bibliography. This is for testing and should be commented out in your thesis:
\nocite{*}
% Bibliography
\setlength{\emergencystretch}{.5em}
%% Force page breaks in bibliography before splitting single entries over multiple pages
%\patchcmd{\bibsetup}{\interlinepenalty=5000}{\interlinepenalty=10000}{}{}
\printbibliography
% Appendix, if needed:
%% This uses \section and below to have everything grouped in the virtual chapter "Anhang" in the table of contents.
\startSMBAppendix
\addcontentsline{toc}{chapter}{\appendixname}
\section{An appendix section}
\subsection{Subsection in appendix}
\end{document}isw_smb_diss.cls · 12 KB
% basiert auf den Vorlagen von O. Gerlach (2015) und Philipp Tempel (2018) erweitert von C. Hinze (2020-2024)
% Richtlinien zur Formatierung der Dissertation: http://dx.doi.org/10.18419/opus-10327
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{isw_smb_diss}[2026/03/27 v. 1.11 Stuttgarter-Maschinenbau-Reihe für Dissertationen: https://github.com/iswunistuttgart/isw_smb_diss]
\typeout{}
\typeout{Stuttgarter Maschinenbau Dissertation LaTeX template class v1.11}
\typeout{}
\typeout{Institute for Control Engineering of Machine Tools and Manufacturing}
\typeout{Units, ISW, Seidenstrasse 36, D-70174 Stuttgart, Germany.}
\typeout{}
\ProcessOptions\relax
\newcommand{\documentfontsize}{14pt}
\newcommand{\titlewidth}{1.0}
\newcommand{\paperformatScr}{a4}
\newcommand{\paperformatGeom}{a4paper}
\newcommand{\introstart}{Der Fakultät}
\newcommand{\introstatus}{vorgelegte}
\newcommand{\documentsourceintro}{von}
\newcommand{\oralexamination}{Tag der mündlichen Prüfung: \>\\}
\newcommand{\linkcolor}{uniSblue}
\DeclareOption{smallfont}{
\renewcommand{\documentfontsize}{12pt}
}
\DeclareOption{accepted}{
\renewcommand{\introstart}{Von der Fakultät}
\renewcommand{\introstatus}{genehmigte}
\renewcommand{\documentsourceintro}{Vorgelegt von}
\renewcommand{\oralexamination}{Tag der mündlichen Prüfung: \> \@dateoforalexamination \\}
% This avoids page breaks within bibliography entries
\AtBeginDocument{%
\patchcmd{\bibsetup}{\interlinepenalty=5000}{\interlinepenalty=10000}{}{}%
}%
}
\DeclareOption{print}{
\renewcommand{\linkcolor}{black}
}
\DeclareOption{a5paper}{
\renewcommand{\documentfontsize}{10pt}
\renewcommand{\paperformatScr}{a5}
\renewcommand{\paperformatGeom}{a5paper}
\DeclareOption{smallfont}{
\renewcommand{\documentfontsize}{8pt}% 8.5 would be closer, but is not supported. Scale a little smaller to avoid overflowing floating environments.
}
}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrbook}}
\newcommand{\ofADrEng}{eines Doktor-Ingenieurs}
\DeclareOption{ingenieur}{
\renewcommand{\ofADrEng}{eines Doktor-Ingenieurs}
}
\DeclareOption{ingenieurin}{
\renewcommand{\ofADrEng}{einer Doktor-Ingenieurin}
}
\ProcessOptions\relax
\PassOptionsToPackage{paper=\paperformatScr,%
}{typearea} % set papersize
\LoadClass[%
fontsize=\documentfontsize,
headings=normal,
headsepline, % head has a separating line
listof=totoc,% add a entry in table of contents for lists like LOF and LOT
toc=chapterentrywithdots, % dots in table of contents also for chapter entries
numbers=noenddot, % remove dot at end of caption and heading numbers
]{scrbook} % KOMA-Script scrreprt, DIN A5, 10pt with bibliography in TOC
% if/else (used within the class)
\RequirePackage{ifthen}
\RequirePackage{ifpdf}
\RequirePackage{ifxetex}
\RequirePackage{ifluatex}
\RequirePackage{babel} % hyphenation
\ifthenelse{\boolean{xetex}\OR\boolean{luatex}}{
\relax
}{% pdflatex needs to know the ecoding
\PassOptionsToPackage{T1}{fontenc} % T2A for cyrillics
\RequirePackage{fontenc}
\PassOptionsToPackage{utf8}{inputenc} % directly support utf8 characters, as ä,ö,ü,Ü,ß
\RequirePackage{inputenc}
}
% load fonts: this is handled differently for lualatex/xetex and pdflatex
\ifthenelse{\boolean{xetex}\OR\boolean{luatex}}
{ % use fontspec and OpenType fonts with utf8 engines
\RequirePackage{fontspec}%
\defaultfontfeatures{Ligatures=TeX}%
\setsansfont{texgyreheros}[
%Scale=MatchLowercase,% or MatchUppercase
Extension=.otf,
UprightFont=*-regular,
ItalicFont=*-italic,
BoldFont=*-bold,
BoldItalicFont=*-bolditalic,
]
\setmainfont{texgyrepagella}[
%Scale=MatchLowercase,% or MatchUppercase
Extension=.otf,
UprightFont=*-regular,
ItalicFont=*-italic,
BoldFont=*-bold,
BoldItalicFont=*-bolditalic,
%Numbers={Proportional,OldStyle}
]
\linespread{1.05} % for pagella
%\RequirePackage{unicode-math}
%\setmathfont{TeX Gyre Pagella Math}%
%\setmainfont[SmallCapsFeatures={LetterSpace=6}, Numbers={Proportional,OldStyle}]{Minion Pro}
%\setsansfont[LetterSpace=3, Numbers={Proportional,OldStyle}]{Myriad Pro}
\setmonofont[Scale=0.85]{DejaVu Sans Mono}
}
{ % use Type 1 fonts with pdflatex
\PassOptionsToPackage{osf,sc}{mathpazo}%
\RequirePackage{mathpazo} % Palatino with real small caps and old style figures
\usepackage{tgheros}
\linespread{1.05} % a bit more for Palatino
\PassOptionsToPackage{scaled=0.85}{DejaVuSansMono}%
\RequirePackage{DejaVuSansMono}%
\RequirePackage{tgpagella}% main font
\RequirePackage{textcomp}% declare missing symbols
\PassOptionsToPackage{activate={true,nocompatibility},final,tracking=true,kerning=true,spacing=true,factor=1100,stretch=10,shrink=10}{microtype}
}
% some font fine tuning
\RequirePackage{microtype}
\RequirePackage[onehalfspacing]{setspace}
\RequirePackage[automark,%
headsepline=0.20pt,% set header line
draft=false,]{scrlayer-scrpage} % header & footer layout
\automark[chapter]{chapter} % show chapters on both sides, if no section is defined
\automark*[section]{}% only show section in running header, if one is defined, otherwise use chapter title.
\pagestyle{scrheadings}
% make marks (e.g. page numbering) appearing on outer page (right) for onsesided print
\if@twoside\else
\ihead*[]{}
\chead*[]{}
\ohead*[]{\headmark}
\ifoot*[]{}
\cfoot*[]{}
\ofoot*[\pagemark]{\pagemark}
\fi
% same indentation for all sublevel headings, e.g.
% 1. Chapter
% 1.1 Section
% 1.1.1 Subsection
% source: https://tex.stackexchange.com/a/382969
% This is desired by the publisher (but generates unneeded whitespace)
\newdimen\sectionnumberwdmax
\setlength\sectionnumberwdmax{3em}%
\renewcommand*{\chapterformat}{%
\IfUsePrefixLine{\chapapp\nobreakspace\thechapter\autodot}{%
\makebox[\sectionnumberwdmax][l]{\thechapter\autodot\hfil}%
}%
}
\renewcommand*{\sectionformat}{\makebox[\sectionnumberwdmax][l]{\thesection\autodot\hfil}}
\renewcommand*{\subsectionformat}{\makebox[\sectionnumberwdmax][l]{\thesubsection\autodot\hfil}}
\renewcommand*{\subsubsectionformat}{\makebox[\sectionnumberwdmax][l]{\thesubsubsection\autodot\hfil}}
\renewcommand*{\paragraphformat}{\makebox[\sectionnumberwdmax][l]{\theparagraph\autodot\hfil}}
\renewcommand*{\subparagraphformat}{\makebox[\sectionnumberwdmax][l]{\thesubparagraph\autodot\hfil}}
% end same indentation for all sublevel headings
\RequirePackage[pdfusetitle]{hyperref}
% Colors (for links, ...)
\RequirePackage[dvipsnames]{xcolor}
\definecolor{uniSblue}{RGB}{0,65,145}
\definecolor{uniSlightblue}{RGB}{0,190,255}
\definecolor{uniSgrey}{RGB}{62, 68, 76}
\definecolor{uniSyellow}{RGB}{255, 213, 0}
\definecolor{uniSred}{RGB}{230, 0, 50}
\definecolor{uniSgreen}{RGB}{0, 200, 50}
% to include images
\RequirePackage{graphicx}
\RequirePackage{titletoc}
\contentsmargin{2.5em}
% Place Floats on top of extra float page (i.e. \begin{figure}[p])
\setlength{\@fptop}{0pt}% default is 0\p@ \@plus 1fil
\setlength{\@fpsep}{\floatsep}% default is 8\p@ \@plus 2fil
\setlength{\@fpbot}{0pt plus 1fil}% default is 0\p@ \@plus 1fil
% Title commands: (hint: \author, \title already defined)
\newcommand*{\@birthplace}{\ClassError{isw_smb_diss}{\string\birthplace\space missing}%
{You have to use \string\birthplace\space to set up the place of the author's birth.}}
\newcommand*\birthplace[1]{\renewcommand\@birthplace{#1}}
\newcommand*{\@examiner}{\ClassError{isw_smb_diss}{\string\examiner\space missing}%
{You have to use \string\examiner\space to set up the your examiner,\MessageBreak e.g. `\string\examiner{Name of examiner}'.}}
\newcommand*\examiner[1]{\renewcommand\@examiner{#1}}
\newcommand*{\@coexaminer}{\ClassError{isw_smb_diss}{\string\coexaminer\space missing}%
{You have to use \string\coexaminer\space to set up the your co-examiner,\MessageBreak e.g. `\string\coexaminer{Name of co-examiner}'.}}
\newcommand*\coexaminer[1]{\renewcommand\@coexaminer{#1}}
\newcommand*{\@faculty}{\ClassError{isw_smb_diss}{\string\institute\space missing}%
{You have to use \string\faculty\space to set up the your Institute,\MessageBreak e.g. `\string\faculty{Konstruktions-, Produktions- und Fahrzeugtechnik}'.}}
\newcommand*\faculty[1]{\renewcommand\@faculty{#1}}
\newcommand*{\@institute}{\ClassError{isw_smb_diss}{\string\institute\space missing}%
{You have to use \string\institute\space to set up the your Institute,\MessageBreak e.g. `\string\institute{Institut für Steuerungstechnik der Werkzeugmaschinen und Fertigungseinrichtungen}'.}}
\newcommand*\institute[1]{\renewcommand\@institute{#1}}
\newcommand*{\@dateoforalexamination}{\ClassError{isw_smb_diss}{\string\dateoforalexamination\space missing}%
{You have to use \string\dateoforalexamination\space to set up the date of oral examination,\MessageBreak e.g. `\string\dateoforalexamination{TT.MM.YYYY}'.}}
\newcommand*\dateoforalexamination[1]{\renewcommand\@dateoforalexamination{#1}}
\newcommand*{\@yearofpublication}{\ClassError{isw_smb_diss}{\string\yearofpublication\space missing}%
{You have to use \string\yearofpublication\space to set up the publication year of your thesis,\MessageBreak e.g. `\string\yearofpublication{YYYY}'.}}
\newcommand*\yearofpublication[1]{\renewcommand\@yearofpublication{#1}}
% title page according to https://www.f07.uni-stuttgart.de/forschung/promotion-und-habilitation/promotion/dokumente/Titelblatt-Dissertation-1Einreichung_2Drucklegung.pdf
\renewcommand*{\maketitle}{%
\begin{titlepage}
{
\centering
\begin{minipage}{\titlewidth\textwidth}
\centering
{\LARGE\bfseries\sffamily\strut\ignorespaces\@title\par}
\vspace*{1ex}
{\large\sffamily\strut\ignorespaces\@subtitle\par}
\end{minipage}
\vfill
\begin{minipage}{\titlewidth\textwidth}
\centering
\introstart\ \@faculty\\
der Universität Stuttgart\\
zur Erlangung der Würde \ofADrEng\ (Dr.-Ing.)
\introstatus\ Abhandlung\par%
\end{minipage}
\vfill
\begin{minipage}{0.8\textwidth}
\centering
\documentsourceintro\\
{\bfseries\strut\ignorespaces\@author\\}
aus \@birthplace\par%
\end{minipage}
\vfill
\begin{minipage}{0.8\textwidth}
\begin{tabbing}
Hauptberichter:\qquad\quad\qquad\qquad \=\@examiner \\
Mitberichter:\> \@coexaminer \\[\baselineskip]
\oralexamination
\end{tabbing}
\end{minipage}
\vskip 2\baselineskip
\begin{minipage}{0.8\textwidth}
\centering
\@institute\space der Universität Stuttgart\\
\vskip \baselineskip
\@yearofpublication
\end{minipage}
\clearpage
}
\end{titlepage}
}
% definitions for appendix sections
\newcommand\startSMBAppendix{
\cleardoublepage
\appendix
\renewcommand{\thesection}{\Alph{section}} % Appendix uses letters instead of numbers
\counterwithin{figure}{section} % Rename counters to start with appendix letter for easier recognition (when referencing)
\counterwithin{table}{section}
\renewcommand\thefigure{\thesection\arabic{figure}}
\renewcommand\thetable{\thesection\arabic{table}}
\automark[section]{section} %Fix the headline: chapter -> section, section -> subsection
\automark*[subsection]{}
\numberwithin{equation}{section} %Ensure that equations enumeration starts at 1
\makeatletter
\renewcommand{\@seccntformat}[1]{\appendixname~\csname the##1\endcsname\quad} % Sections start with "Anhang", e.g. "Anhang A.1" (but not in table of contents)
\makeatother
}
%\ifpdf
%\fi
% style fixes for the publisher (Fraunhofer Verlag)
% get footnotes right
\deffootnote{1em}{1em}{\makebox[1em][l]{\textsuperscript{\thefootnotemark}}}
% remove listof.... indetation
\setuptoc{lof}{noindent} % remove indentation from figures in lof
\setuptoc{lot}{noindent} % remove indentation from tables in lot
% Initialize hyperref
\hypersetup{%
%hidelinks, % hides linkcolor -> all links become black
linktocpage=true,
colorlinks=true, linktocpage=true, pdfstartpage=3,% pdfstartview=FitV,%
% uncomment the following line if you want to have black links (e.g., for printing)
%colorlinks=false, linktocpage=false, pdfstartpage=3, pdfstartview=FitV, pdfborder={0 0 0},%
breaklinks=true, pageanchor=true,%
pdfpagemode=UseNone,%
plainpages=false, bookmarksnumbered, bookmarksopen=true,% bookmarksopenlevel=1,%
hypertexnames=true, pdfhighlight=/O,%
urlcolor=\linkcolor, linkcolor=\linkcolor, citecolor=\linkcolor,%pagecolor=\linkcolor,%
}
settings_example/definitions.tex · 2 KB
%% command definitions
% Anzeige, dass noch eine Zitation fehlt: \citationneeded
\newcommand{\citationneeded}{\textcolor[rgb]{1,0,0}{\small [citation needed]}}
% Markiere offene TODOs im text: \todo{Hier noch mehr.}.
% Hierfür gibt es auch Pakete
\newcommand{\todo}[1]{\textcolor[rgb]{1,0,0}{\small TODO: #1}}
% Abkürzungen im Text
\newcommand{\zB}{z.\,B. }
\newcommand{\uU}{u.\,U. }
% Bildquelle in Hellgrau, rechts: \imgssource{Getty Images}
\newcommand{\imgsource}[1]{\begin{flushright}
\textcolor{black!40}{\tiny Source:~#1}
\end{flushright}}
% Transponiert-Zeichen, z.B.: \( \bm p^\T \)
\newcommand{\T}{\mathrm{T}}
% matrix schnell setzen mit \bmat{a & b \\ c & d}
\newcommand{\bmat}[1]{ \ensuremath{\begin{bmatrix} #1 \end{bmatrix}} }
%% mathe-Abkürzungen
\newcommand{\gdw}{\ensuremath{\Leftrightarrow}}
\newcommand{\folgt}{\Rightarrow}
\newcommand{\mustbe}{\ensuremath{\stackrel{!}{=}}}
\newcommand{\grad}{\ensuremath{\nabla}}
\newcommand{\R}{\ensuremath{\mathbb{R}}}
\newcommand{\partfrac}[2]{ \ensuremath{\frac{\partial #1}{\partial #2}} }
\newcommand{\ddiff}{\ensuremath{\mathrm{d}}}
\newcommand{\ddt}{\ensuremath{\frac{\ddiff}{\ddiff t}}}
\newcommand{\equates}{\ensuremath{\widehat{=}}}
\newcommand{\rme}{\ensuremath{\mathrm{e}}}
\newcommand{\Lscript}{\ensuremath{\mathcal{L}}}
% := (\eqdef) und =: (\defeq) für Definitionen
\newcommand*{\defeq}{\mathrel{\vcenter{\baselineskip0.5ex \lineskiplimit0pt
\hbox{\scriptsize.}\hbox{\scriptsize.}}} =}
\newcommand*{\eqdef}{=\mathrel{\vcenter{\baselineskip0.5ex \lineskiplimit0pt
\hbox{\scriptsize.}\hbox{\scriptsize.}}}}
\newcommand{\mi}{\mathrm{i}} % i für Imaginärzahlen
%% \dddot{} für dreifache Zeitableitung [https://tex.stackexchange.com/questions/131587/mathtools-dddot-cause-the-term-to-rise]
\newcommand\scaleddot{\scalebox{.89}{.}}
\makeatletter
\renewcommand{\dddot}[1]{%
{\mathop{\kern\z@#1}\limits^{\makebox[0pt][c]{\vbox to-2.2\ex@{\kern-\tw@\ex@
\hbox{\normalfont\scaleddot\kern-0.5pt\scaleddot\kern-0.5pt\scaleddot}\vss}}}}}
\renewcommand{\ddddot}[1]{%
{\mathop{\kern\z@#1}\limits^{\makebox[0pt][c]{\vbox to-2.2\ex@{\kern-\tw@\ex@
\hbox{\normalfont\scaleddot\kern-0.5pt\scaleddot\kern-0.5pt\scaleddot\kern-0.5pt\scaleddot}\vss}}}}}
\makeatother
\newcommand{\LTIsysSub}[1]{\ensuremath{\Sigma_{#1}: \bm{\dot x}_{#1} = \bm A_{#1} \bm x_{#1} + \bm b_{#1} \bm u_{#1}, \bm y_{#1} = \bm C_{#1} \bm x_{#1}, \bm x_{#1,0} = \bm x_{#1}(t=t_0)}}
settings_example/glossaries.tex · 3 KB
\RequirePackage{shellesc}
\usepackage[toc=true, % add glossaries to toc
acronyms, % we use it for acronyms
shortcuts=ac, % use acronyms with \ac{} shortcuts
symbols, % use it for table of symbols
nogroupskip,
nomain, % there is no "main" glossary
nonumberlist, %suppress page numbers where the acronym is used in list of acronyms
automake % so we won't need to call glossaries by hand
]{glossaries-extra}
%\renewcommand*{\glstextformat}[1]{\textcolor{uniSgreen!50!black}{#1}}
%\renewcommand*{\glstextformat}[1]{\textcolor{black}{#1}} % just color glossary links them black
%\usepackage{glossary-longbooktabs} % long-booktabs styles: https://www.dickimaw-books.com/gallery/glossaries-styles/#longbooktabs
% acronym style is: Long Forms (short)
% define acronyms before \begin{document} with
% \newacronym{ABSC}{ABSC}{Adaptive Backstepping Controller}
%
% and use them with
% - \ac{ABSC} ... LaTeX uses long form first with introduciton of short form, then short form only
% - \acs{ABSC} ... explicitly use short form
% - \acl{ABSC} ... explicitly use long form
% - \ac{ABSC}["=Gerät] ... compose hyphenated form with suffix
% - \glsresetall to reset all acronyms and introduce them again
%
% but also allows German composed words with \ac{EoL}["=Prüfung] => End-of-Line-Prüfung
\setabbreviationstyle[acronym]{long-hyphen-short-hyphen} % requires glossaries-extra package, otherwise use style long-short
% additionally needed to also replace spaces by hyphens in long form
\glssetcategoryattribute{\acronymtype}{markwords}{true}
% for more flexibility we define our own style here (based on longtable)
% Define glossary entries (before \begin{document}) with: \glsxtrnewsymbol[description={Tischposition},symbol={\si{m}}]{xT}{\ensuremath{x_T}}
% Refer to them in document with \gls{xT}
\newglossarystyle{symbunitlong}{%
\renewenvironment{theglossary}%
{\begin{longtable}{@{}lcp{0.6\textwidth}@{}}}%
{\end{longtable}}%
\renewcommand*{\glossaryheader}{%
\toprule
\bfseries Symbol & \bfseries Einheit & \bfseries Beschreibung \tabularnewline \midrule\endhead
\bottomrule\endfoot}%
\renewcommand{\glossentry}[2]{%
\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
\glossentrysymbol{##1} &
\glossentrydesc{##1}\\%
}%
\ifglsnogroupskip
\renewcommand*{\glsgroupskip}{}%
\else
\renewcommand*{\glsgroupskip}{ & & & \tabularnewline}%
\fi
}
\newglossarystyle{alttreetwocols}{%
\glossarystyle{alttree}%
\BeforeBeginEnvironment{theglossary}{\begin{multicols}{2}}%
\AfterEndEnvironment{theglossary}{\end{multicols}}%
}
\makeglossaries
%automatically label glossaries:
\renewcommand*{\glossarypreamble}{%
\label{glo:\currentglossary}%
}
settings_example/tikz.tex · 5 KB
%% Plot settings:
% =========================
\usepackage{tikz, pgfplots}
\usetikzlibrary{backgrounds, calc, fit, positioning, patterns, decorations.pathmorphing, decorations.markings, shapes, shapes.geometric, shapes.callouts, arrows.meta, shadings, trees, chains, 3d, shadows}
\tikzset{>={Latex[width=2mm,length=2mm]}, font=\footnotesize}
\tikzset{math3d/.style= {x={(1cm, 0cm)}, y={(.353cm,.353cm)}, z={(0cm,1cm)}}}
\pgfplotsset{compat=newest,
%tick label style = {font=\sansmath\sffamily},
%every axis label = {font=\sansmath\sffamily},
%legend style = {font=\sansmath\sffamily},
%label style = {font=\sansmath\sffamily},
grid=major,
every axis plot/.append style={thick},
%every axis label/.append style={font=\footnotesize},
every axis/.append style={font=\footnotesize},
%every node/.append style={font=\footnotesize},
}
% Switch to toggle tikz externalize. This caches tikz images so they are not compiled every time. Leads to speedup in compilation.
\newif\ifexportfigures
\exportfiguresfalse
%\exportfigurestrue
\ifexportfigures
\usetikzlibrary{external}
%\tikzset{external/only named=true} %https://tex.stackexchange.com/questions/14566/tikzexternalize-only-or-not-for-flagged-graphics
\tikzexternalize[prefix=figures/tikz/, % activate and define figures/tikz as cache folder (this folder must exist before compilation, add it by hand!)
]
\tikzset{external/only named=true} % only externalize when \tikzsetnextfilename was set
% \tikzset{external/force remake}%uncomment to force remake of all figures
\fi
\newcommand{\AxisRotator}[1][rotate=0]{% https://tex.stackexchange.com/a/36607
\tikz [x=0.25cm,y=0.60cm,line width=.2ex,-stealth,#1] \draw (0,0) arc (-150:150:1 and 1);%
}
\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}
\newlength\figureheight
\newlength\figurewidth
\setlength\figureheight{2cm}
\setlength\figurewidth{0.9\textwidth}
\newlength\halffigurewidth
\setlength\halffigurewidth{0.4\textwidth}
%\newcommand{\setfullfigwidth}{\setlength\figurewidth{.8\textwidth}}
%\newcommand{\sethalfigwidth}{\setlength\figurewidth{.35\textwidth}}
%\newcommand{\setthirdfigwidth}{\setlength\figurewidth{.26\textwidth}}
%\newcommand{\settwothirdsfigwidth}{\setlength\figurewidth{.5\textwidth}}
% Fancy node streching from http://tex.stackexchange.com/a/124507
% Examples:
%
%\node[right=of |(A)(B)(D)] {Z};
%
%\node[left=of |(A)(B), ultra thick] {Y};
%\node[left=of |(C)(D), minimum width=50pt] (X) {X};
%
%\node[span vertical=(A)(B), above=of -X] {y};
%
%\node[below=of -(A)(B)(C)(D)] {0};
\makeatletter
\def\pgfutil@firstofmany#1#2\pgf@stop{#1}
\def\pgfutil@secondofmany#1#2\pgf@stop{#2}
\def\tikz@lib@place@of@#1#2#3{%
\def\pgf@tempa{fit bounding box}%
\edef\pgf@temp{\expandafter\pgfutil@firstofmany#2\pgf@stop}
\if\pgf@temp(%
\tikz@lib@place@fit@scan{#2}{0}%
\else\if\pgf@temp|
\expandafter\tikz@lib@place@fit@scan\expandafter{\pgfutil@secondofmany#2\pgf@stop}{1}%
\else\ifx\pgf@temp\tikz@activebar
\expandafter\tikz@lib@place@fit@scan\expandafter{\pgfutil@secondofmany#2\pgf@stop}{1}%
\else\if\pgf@temp-
\expandafter\tikz@lib@place@fit@scan\expandafter{\pgfutil@secondofmany#2\pgf@stop}{2}%
\else\if\pgf@temp+
\expandafter\tikz@lib@place@fit@scan\expandafter{\pgfutil@secondofmany#2\pgf@stop}{3}%
\else
\def\pgf@tempa{#2}%
\fi
\fi
\fi
\fi
\fi
\expandafter\tikz@scan@one@point\expandafter\tikz@lib@place@remember\expandafter(\pgf@tempa)%
\iftikz@shapeborder%
% Ok, this is relative to a border.
\iftikz@lib@ignore@size%
\edef\tikz@node@at{\noexpand\pgfpointanchor{\tikz@shapeborder@name}{center}}%
\def\tikz@anchor{center}%
\else%
\edef\tikz@node@at{\noexpand\pgfpointanchor{\tikz@shapeborder@name}{#3}}%
\fi%
\fi%
\edef\tikz@lib@place@nums{#1}%
}
\def\tikz@lib@place@fit@scan#1#2{
\pgf@xb=-16000pt\relax%
\pgf@xa=16000pt\relax%
\pgf@yb=-16000pt\relax%
\pgf@ya=16000pt\relax%
\if\pgfutil@firstofmany#1\pgf@stop(%
\tikz@lib@fit@scan#1\pgf@stop%
\else
\tikz@lib@fit@scan(#1)\pgf@stop
\fi
\ifdim\pgf@xa>\pgf@xa
% shouldn't happen
\else
\expandafter\def\csname pgf@sh@ns@fit bounding box\endcsname{rectangle}%
\expandafter\edef\csname pgf@sh@np@fit bounding box\endcsname{%
\def\noexpand\southwest{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}%
\def\noexpand\northeast{\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}%
}%
\expandafter\def\csname pgf@sh@nt@fit bounding box\endcsname{{1}{0}{0}{1}{0pt}{0pt}}%
\expandafter\def\csname pgf@sh@pi@fit bounding box\endcsname{\pgfpictureid}%
\ifcase#2\relax
\or % 1 = vertical
\pgf@y=\pgf@yb%
\advance\pgf@y by-\pgf@ya%
\edef\pgf@marshal{\noexpand\tikzset{minimum height={\the\pgf@y-2*(\noexpand\pgfkeysvalueof{/pgf/outer ysep})}}}%
\pgf@marshal
\or % 2 = horizontal
\pgf@x=\pgf@xb%
\advance\pgf@x by-\pgf@xa%
\edef\pgf@marshal{\noexpand\tikzset{minimum width={\the\pgf@x-2*(\noexpand\pgfkeysvalueof{/pgf/outer xsep})}}}%
\pgf@marshal
\or % 3 = both directions
\pgf@y=\pgf@yb%
\advance\pgf@y by-\pgf@ya%
\pgf@x=\pgf@xb%
\advance\pgf@x by-\pgf@xa%
\edef\pgf@marshal{\noexpand\tikzset{minimum height={\the\pgf@y-2*(\noexpand\pgfkeysvalueof{/pgf/outer ysep})},minimum width={\the\pgf@x-2*(\noexpand\pgfkeysvalueof{/pgf/outer xsep})}}}%
\pgf@marshal
\fi
\fi
}
\tikzset{
fit bounding box/.code={\tikz@lib@place@fit@scan{#1}{0}},
span vertical/.code={\tikz@lib@place@fit@scan{#1}{1}},
span horizontal/.code={\tikz@lib@place@fit@scan{#1}{2}},
span/.code={\tikz@lib@place@fit@scan{#1}{3}}}
settings_example/tikz_blocks.tex · 9 KB
%% Generelle Blöcke, Beispiel:
% \node[block](a);
% \node[sum, left= of block](b);
% \draw[<->](a)--(b);
%
\tikzstyle{block} = [draw=black, fill=white, rectangle, align=center, minimum height=1cm, minimum width=2em]
\tikzstyle{sum} = [draw, circle, node distance=1cm]
\tikzstyle{input} = [coordinate]
\tikzstyle{output} = [coordinate]
%% Mechanik-Visualisierung
\tikzstyle{spring}=[thick,decorate,decoration={zigzag,pre length=0.2cm,post length=0.2cm,segment length=6}]
\tikzstyle{rotspring}=[thick,decoration={aspect=0.2, segment length=1.5mm, pre length=0.2cm,post length=0.3cm, amplitude=3mm,coil},decorate]
\tikzstyle{damper}=[thick,decoration={markings,
mark connection node=dmp,
mark=at position 0.5 with
{
\node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum width=15pt,minimum height=3pt,draw=none] {};
\draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
\draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
}
}, decorate]
\tikzstyle{ground}=[fill,pattern=north east lines,draw=none,minimum width=0.75cm,minimum height=0.3cm]
%% Ball-screw
% New decoration for screws
\tikzset{/pgf/decoration/.cd,
end width/.initial=0.2cm,
end length/.initial=0.5cm,
bar width/.initial=0.3cm,
thread separation/.initial=0.1cm,
ball radius/.initial=0.05cm,
screw advancement per rev/.initial=0.1cm,
}
\pgfdeclaredecoration{ballscrew}{begin}{
\def\b{\pgfkeysvalueof{/pgf/decoration/thread separation}}
\def\w{\pgfkeysvalueof{/pgf/decoration/bar width}}
\def\r{\pgfkeysvalueof{/pgf/decoration/ball radius}}
\def\h{\pgfkeysvalueof{/pgf/decoration/screw advancement per rev}/2}
\pgfmathsetmacro{\nl}{floor((\h-\b)/(\b+2*\r))}
\pgfmathsetmacro{\nr}{floor(\h/(\b+2*\r)-1)}
\pgfmathsetmacro{\ls}{\b + 2*\r}
\pgfmathsetmacro{\lo}{0}
\pgfmathsetmacro{\y}{\w/2+\r}
\def\wbprod{\w/\h}
\def\endl{\pgfkeysvalueof{/pgf/decoration/end length}}
\def\endw{\pgfkeysvalueof{/pgf/decoration/end width}}
\def\barw{\pgfkeysvalueof{/pgf/decoration/bar width}}
%
\state{begin}[width={\endl+\h}, next state=thread]{
\pgfpathlineto{\pgfpoint{0pt}{\endw/2}}
\pgfpathlineto{\pgfpoint{\endl}{\endw/2}}
\pgfpathmoveto{\pgfpoint{0.0pt}{0.0pt}}
\pgfpathlineto{\pgfpoint{0pt}{-\endw/2}}
\pgfpathlineto{\pgfpoint{\endl}{-\endw/2}}
\pgfpathmoveto{\pgfpoint{\endl}{-\y}}
\pgfpathlineto{\pgfpoint{\endl}{\y}}
\pgfpathlineto{\pgfpoint{\endl+\h}{\y}}
}
\state{thread}[width=\ls]{
\pgfsetcornersarced{\pgfpoint{0.1mm}{0.1mm}}
\pgfpathmoveto{\pgfpoint{\lo}{\y}}
\pgfpathlineto{\pgfpoint{\lo + \b}{\y}}
\pgfpatharc{-180}{0}{\r}
\pgfpathlineto{\pgfpoint{\lo-\h+\ls}{-\y}}
\pgfpatharc{0}{180}{\r}
\pgfpathlineto{\pgfpoint{\lo+\b}{\y}}
\pgfpathmoveto{\pgfpoint{\lo-\h}{-\y}}
\pgfpathlineto{\pgfpoint{\lo-\h+\b}{-\y}}
}
\state{final}[width=\pgfkeysvalueof{/pgf/decoration/end width}]{
\pgfpathmoveto{\pgfpoint{\lo-\h}{-\y}}
\pgfpathlineto{\pgfpoint{\lo+\b}{-\y}}
\pgfpathlineto{\pgfpoint{\lo+\b}{\y}}
\pgfpathlineto{\pgfpoint{\lo}{\y}}
\pgfpathmoveto{\pgfpoint{\lo+\b}{\endw/2}}
\pgfpathlineto{\pgfpoint{\lo+\b+\endl}{\endw/2}}
\pgfpathlineto{\pgfpoint{\lo+\b+\endl}{-\endw/2}}
\pgfpathlineto{\pgfpoint{\lo+\b}{-\endw/2}}
}
}
%%---------------------
% Blockdefinitionen basierend auf https://tex.stackexchange.com/a/311358
% Z.B. einbinden als \input{tikz_blocks}
%
% Verwendungsbeispiel:
% \node [Integ block = {$T_i$}, minimum size=1cm, right = 5cm of sumofinputerror, yshift=-1.5cm] (ki) {};
%
%% --------------------
\tikzstyle{block} = [draw=black, fill=white, rectangle, align=center, minimum height=2em, minimum width=2em]
\tikzstyle{sum} = [draw, circle, node distance=1cm]
\tikzstyle{input} = [coordinate]
\tikzstyle{output} = [coordinate]
% Saturation block:
% ____
% |/
% ----/---
% ___/|
\tikzset{%
saturation/.style={%
draw,
minimum size=1cm,
path picture={
% Get the width and height of the path picture node
\pgfpointdiff{\pgfpointanchor{path picture bounding box}{south west}}%
{\pgfpointanchor{path picture bounding box}{north east}}
\pgfgetlastxy\x\y
% Scale the x and y vectors so that the range
% -1 to 1 is slightly shorter than the size of the node
\tikzset{x=\x*.4, y=\y*.4}
%
% Draw annotation
\draw [very thin] (-1,0) -- (1,0) (0,-1) -- (0,1);
\draw [very thick] (-1,-.7) -- (-.7,-.7) -- (.7,.7) -- (1,.7);
},
append after command={\pgfextra{\let\mainnode=\tikzlastnode}
node[above] at (\mainnode.north) {#1}%
}
}
}
% PT1-Glied
\tikzset{%
PT1/.style = {%
draw,
minimum size=1cm,
path picture={
% Get the width and height of the path picture node
\pgfpointdiff{\pgfpointanchor{path picture bounding box}{south west}}%
{\pgfpointanchor{path picture bounding box}{north east}}
\pgfgetlastxy\x\y
% Scale the x and y vectors so that the range
% -1 to 1 is slightly shorter than the size of the node
\tikzset{x=\x*.4, y=\y*.4}
%
% Draw annotation
\draw [very thin] (-1,-1) -- (-1,1) (-1,-1) -- (1,-1);
\draw [very thick] (-1.0, -1) arc [x radius =1.9, y radius = 1.4, start angle = 180, end angle = 90] ;
},
append after command={\pgfextra{\let\mainnode=\tikzlastnode}
node[above] at (\mainnode.north) {#1}%
}
}
}
% PT2-Glied
\tikzset{%
PT2/.style = {%
draw,
minimum size=1cm,
path picture={
% Get the width and height of the path picture node
\pgfpointdiff{\pgfpointanchor{path picture bounding box}{south west}}%
{\pgfpointanchor{path picture bounding box}{north east}}
\pgfgetlastxy\x\y
% Scale the x and y vectors so that the range
% -1 to 1 is slightly shorter than the size of the node
\tikzset{x=\x*.4, y=\y*.4}
%
% Draw annotation
\draw [very thin] (-1,-1) -- (-1,1) (-1,-1) -- (1,-1);
\draw [very thick] plot [smooth] coordinates { (-1.0, -1) (-0.3,1) (0.0, 0.3) (0.4, 0.9) (0.7, 0.5) (0.85, 0.65) (1, 0.7)};
},
append after command={\pgfextra{\let\mainnode=\tikzlastnode}
node[above] at (\mainnode.north) {#1}%
}
}
}
% Gain, P-Regler
\tikzset{%
Pctrl/.style={%
draw,
minimum size=1cm,
path picture={
% Get the width and height of the path picture node
\pgfpointdiff{\pgfpointanchor{path picture bounding box}{south west}}%
{\pgfpointanchor{path picture bounding box}{north east}}
\pgfgetlastxy\x\y
% Scale the x and y vectors so that the range
% -1 to 1 is slightly shorter than the size of the node
\tikzset{x=\x*.4, y=\y*.4}
%
% Draw annotation
\draw [very thin] (-1,-1) -- (-1,1) (-1,-1) -- (1,-1);
\draw [very thick] (-1,.4) -- (1,.4);
},
append after command={\pgfextra{\let\mainnode=\tikzlastnode}
node[above] at (\mainnode.north) {#1}%
}
}
}
% PI-Regler
\tikzset{%
PIctrl/.style={%
draw,
minimum size=1cm,
path picture={
% Get the width and height of the path picture node
\pgfpointdiff{\pgfpointanchor{path picture bounding box}{south west}}%
{\pgfpointanchor{path picture bounding box}{north east}}
\pgfgetlastxy\x\y
% Scale the x and y vectors so that the range
% -1 to 1 is slightly shorter than the size of the node
\tikzset{x=\x*.4, y=\y*.4}
%
% Draw annotation
\draw [very thin] (-1,-1) -- (-1,1) (-1,-1) -- (1,-1);
\draw [very thick] (-0.9,-1) -- (-0.9, -0.2) -- (0.9,.4);
},
append after command={\pgfextra{\let\mainnode=\tikzlastnode}
node[above] at (\mainnode.north) {#1}%
}
}
}
% Integrator
\tikzset{%
int/.style={%
draw,
minimum size=1cm,
path picture={
% Get the width and height of the path picture node
\pgfpointdiff{\pgfpointanchor{path picture bounding box}{south west}}%
{\pgfpointanchor{path picture bounding box}{north east}}
\pgfgetlastxy\x\y
% Scale the x and y vectors so that the range
% -1 to 1 is slightly shorter than the size of the node
\tikzset{x=\x*.4, y=\y*.4}
%
% Draw annotation
\draw [very thin] (-1,-1) -- (-1,1) (-1,-1) -- (1,-1);
\draw [very thick] (-1,-1) -- (1, 1);
},
append after command={\pgfextra{\let\mainnode=\tikzlastnode}
node[above] at (\mainnode.north) {#1}%
}
}
}
% Differenzierer
\tikzset{%
diff/.style={%
draw,
minimum size=1cm,
path picture={
% Get the width and height of the path picture node
\pgfpointdiff{\pgfpointanchor{path picture bounding box}{south west}}%
{\pgfpointanchor{path picture bounding box}{north east}}
\pgfgetlastxy\x\y
% Scale the x and y vectors so that the range
% -1 to 1 is slightly shorter than the size of the node
\tikzset{x=\x*.4, y=\y*.4}
%
% Draw annotation
\draw [very thin] (-1,-1) -- (-1,1) (-1,-1) -- (1,-1);
\draw [very thick] (-0.9,-1) -- (-0.9, 0.6);
},
append after command={\pgfextra{\let\mainnode=\tikzlastnode}
node[above] at (\mainnode.north) {#1}%
}
}
}
%%---------------------
% Ende Blöcke
%% --------------------The first page, as this template compiles today. Click it to enlarge, and again to shrink. Open the file ↗