-
Notifications
You must be signed in to change notification settings - Fork 4
/
base.tex
165 lines (141 loc) · 5.29 KB
/
base.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
\usepackage[pdftex,a4paper]{geometry}
\usepackage{pdfpages}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{gensymb}
\usepackage{eurosym}
\usepackage{ifthen}
\usepackage{float}
\usepackage{calc}
\usepackage[export]{adjustbox}% http://ctan.org/pkg/adjustbox
\usepackage{xstring}
\usepackage{multicol}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage[T1]{fontenc}
% Switch font comprehensively
\usepackage[scaled]{helvet}
\renewcommand\familydefault{\sfdefault}
% Use as much of the page as we can.
\pagestyle{empty}
\setlength{\parindent}{4em}
\setlength{\parskip}{1.2em}
\setlength{\textheight}{28cm}
\setlength{\textwidth}{19cm}
\setlength{\hoffset}{-2cm}
\setlength{\voffset}{-2cm}
% DECAL function
%
% The decal function takes 5 inputs and extracts a symbol from the Italian ISO document that is included in this repository. The function then displays the symbol together with the title and warning text.
%
% Parameters: #1 Page with the symbol on it in the document.
% #2 Title
% #3 Y height on the page.
% #4 X location on the page. (not sure on this)
% #5 Warning subtext
%
\newcommand{\decal}[5]{
\begin{minipage}{\linewidth}
\begin{minipage}[t]{0.3\textwidth}
\vspace{0pt}
% The ISO document has a 'gutter' - so we shift the X a bit on the left/right page.
%
\ifthenelse{\isodd{#1}}{ %if the pagenumber is odd, use this location for the image
\includegraphics[width=0.9\textwidth,page=#1,viewport=103 #3 291 #4,clip=true]{13GR_PistopioimeniSimansi_ISO_7010.pdf}
}{ %else (because the pagenumber is even), use this location for the image.
\includegraphics[width=0.9\textwidth,page=#1,viewport=70 #3 261 #4,clip=true]{13GR_PistopioimeniSimansi_ISO_7010.pdf}
}
\end{minipage}
\begin{minipage}[t]{0.6\textwidth}
\setlength{\parindent}{4em}
\setlength{\parskip}{1.2em}
\vspace{0pt}\raggedright
{\LARGE \textbf{#2}} %include title text in bold and such
#5 %include warning subtext
\vspace{0.5cm}
\end{minipage}
\end{minipage}
}
% Some home made symbols which are not part of the official ISO list of symbols:
%
% Two person symbol
\newcommand{\twopersons}{
\raisebox{-.5\height}{\includegraphics[width=6mm]{File:Aiga_toiletsq_men}}\textbf{x 2}
}
% Some home made symbols which are not part of the official ISO list of symbols:
% Clock with 7-19 symbol
%
\newcommand{\seventoseven}{
\raisebox{-.5\height}{\includegraphics[width=10mm]{clock-limits}}
}
% Define classes for Action, Prohibit and Warn. These each take three inputs.
%
% Turns out that the symbols extracted from the ISO document with \decal are a bit
% shifted in the Y position or size depending on what class they are. So we split
% them into the three sections that have height differences.
%
% Parameters: Page with the symbol on it. Actual pagenumber, not the number on the page!
% Title
% Warning subtext
%
\newcommand{\action}[3]{\decal{#1}{#2}{520}{715}{#3}}
\newcommand{\prohib}[3]{\decal{#1}{#2}{495}{690}{#3}}
\newcommand{\warn}[3]{\decal{#1}{#2}{520}{715}{#3}}
%% Command to create a round box to call extra attention to something.
%%
\newcommand{\smallicontext}[2]{%
\begin{mdframed}[roundcorner=4pt]
\begin{tabular}{lp{0.8\linewidth}}
#1 & #2 \\
\end{tabular}
\end{mdframed}
}
% machinePage
% A full page with a machine on it. Takes 5 inputs.
%
% Params: #1 Machine name
% #2 Tokens for standard instrutions: Zero or more from
% Approval Trustee approval needed.
% Noise Not after 19:00
% Two Two people required
% Log use must be logged
% Dewalt Attach dewalt dutch extractor.
% #3 Specific instructions - added to the above text.
% #4 Warnings, Symbols - main symbols on page.
% #5 Extra footer/bottom of the page text
%
\newcommand{\machinePage}[5]{%
\begin{center}
\vspace{0cm}
{\fontsize{50}{60} \textbf{#1}}%Machine name
\action{49}{% Determines if you require approval / mandatory instructions / safety instructions
\textbf{%
\IfSubStr{#2}{Approval}%
{Instructions \& Approval Mandatory}
{\IfSubStr{#2}{NoMandatory}{Mandatory Safety Rules}{Instruction Mandatory}}%
}}
{%
\IfSubStr{#2}{NoMandatory}{}{Instruction \textbf{prior} to use is \textbf{mandatory}. Check the wiki for who can help you.}
\IfSubStr{#2}{Approval}{You must also have a `\textbf{dangerous equipment waiver}' filed with the foundations trustees and been given \textbf{approval or card access} to use the machine.}{}
#3 % added to above instructions
\IfSubStr{#2}{Noise}{\smallicontext{\seventoseven}{
Machine can only be used between 07:00 - 19:00 (be kind to our neighbours)
}
}{}
\IfSubStr{#2}{Two}{\smallicontext{\twopersons}{A second person must be present during operation, have agreed to be your second, knows how to stop the machine and what to do in an emergency, including opening the door for paramedics if needed. }
}{}
\IfSubStr{#2}{Log}{Report any use in the log - and \textbf{pay for it}!}{}
\IfSubStr{#2}{Dewalt}{Be sure to attach and power on the dust extractor.}{}
}
\begin{multicols}{2}#4\end{multicols}
\vspace{0.2cm}
#5
%footer text at the bottom of the page.
If a machine is not clean or appears broken - then report this to the mailing list. Clean/fix prior to use.
\textbf{Report any damage, issues or accident within 24 hours to the mailing list.}
\end{center}
\vfill
\begin{flushright}
{\tiny \version -- \today}
\end{flushright}
\pagebreak
}