Skip to content
Snippets Groups Projects
Commit 9dc6ead6 authored by mirabilos's avatar mirabilos
Browse files

add first version of helper macros for LeoCAD-Bauanleitungs

parent abb42733
No related branches found
No related tags found
No related merge requests found
% -*- mode: tex -*-
%-
% Copyright © 2018
% mirabilos <thorsten.glaser@teckids.org>
%
% Provided that these terms and disclaimer and all copyright notices
% are retained or reproduced in an accompanying document, permission
% is granted to deal in this work without restriction, including un‐
% limited rights to use, publicly perform, distribute, sell, modify,
% merge, give away, or sublicence.
%
% This work is provided “AS IS” and WITHOUT WARRANTY of any kind, to
% the utmost extent permitted by applicable law, neither express nor
% implied; without malicious intent or gross negligence. In no event
% may a licensor, author or contributor be held liable for indirect,
% direct, other damage, loss, or other issues arising in any way out
% of dealing in the work, even if advised of the possibility of such
% damage or existence of a defect, except proven that it results out
% of said person’s immediate fault when using the work as intended.
\NeedsTeXFormat{LaTeX2e}%
\ProvidesPackage{teckidsfdanleitung}[2018/02/17 1.0 Freedroidz-Bauanleitungsmakros]%
\RequirePackage{marginnote}%
% From Bernd Raichle via http://www.gust.org.pl/projects/pearls/2006p/index_html
\def\tbifdef#1#2#3{%
\begingroup \expandafter \endgroup \expandafter%
\ifx\csname#1\endcsname\undefined#3\else#2\fi%
}%
\geometry{includemp,marginparwidth=1cm}%
\setlength{\fboxsep}{2ex}%
\newcommand{\tbVorher}{}%
\newcommand{\tbNachTeilen}{}%
\newcommand{\tbHinterher}{}%
\newcommand{\vorher}[1]{%
\renewcommand{\tbVorher}{#1}%
}%
\newcommand{\nachteilen}[1]{%
\renewcommand{\tbNachTeilen}{#1}%
}%
\newcommand{\hinterher}[1]{%
\renewcommand{\tbHinterher}{#1}%
}%
\newcommand{\schritt}[2]{%
\tbifdef{tbS#1}{%
\PackageError{teckidsfdanleitung}%
{Schritt \##1 bereits definiert!}{}%
}{}%
\expandafter\newcommand\csname tbS#1\endcsname{#2}%
}%
\newcommand{\tbSchritt}[2]{%
\fbox{\parbox{\linewidth-3.5ex}{%
\marginnote{\Huge\ttfamily\color[HTML]{444444}#2}%
{%
\centering%
\includegraphics[width=.8\linewidth]{\jobname.LEO/\jobname-#1.png}%
}%
\tbifdef{tbS#2}{%
\csname tbS#2\endcsname%
}{%
\textbf{ACHTUNG: Schritt \##2 nicht definiert ⚠}%
}%
}}%
}%
\newcommand{\tbTeileliste}{%
\textit{TODO: pieces}%
}%
\endinput
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment