summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/bfh-ci/DEMO-BFHPub.tex
blob: 18d4887a46eb6ec29b221e4028389d384e57fb29 (plain)
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
\documentclass[
%	invert-title=true,
%	titlepage=false,
%	titleimage-ratio=34
]{bfhpub}				% KOMA-script report
%-----------------  Base packages     --------------------------------------
% Include Packages
\usepackage[french,ngerman,main=english]{babel}
%---------------------------------------------------------------------------
% Hyperref Package (Create links in a pdf)
%---------------------------------------------------------------------------
\usepackage[
	hidelinks,
  pdfusetitle
]{hyperref}


% document specific setup.
% Should not be included for own documents!
\usepackage{multicol}

\newcommand*{\pkg}[1]{\texttt{#1}}
\newcommand*{\cls}[1]{\texttt{#1}}
\newcommand*{\code}[1]{\texttt{#1}}
\newcommand*{\file}[1]{\texttt{#1}}
\newcommand*{\opt}[1]{\texttt{#1}}

\newcommand\BFHcolorBox[1]{\textcolor{#1}{\rule{2em}{1em}}\hspace{0.5em}#1}

\LoadBFHModule{terminal,boxes,rules}

%\tcbuselibrary{minted}
\begin{document}

  %----------------  BFH tile page   -----------------------------------------
  \title{BFH-CI}
  \subtitle{\LaTeX{} Bundle for Bern University of Applied Sciences}
  \author{Marei Peischl\thanks{bfh-ci@peitex.de}}
%  \subject{Subject}
  \publishers{pei\TeX{}}
  \institution{Bern University of Applied Sciences}
%  \department{}
%  \institute{Mikro- und Medizintechnik}
  \version{2.0.0}
  \date{2021/12/23}
  %The starred variant will automatically scale and clip the image. the non-starred one will allow you to set the size yourself
  \titlegraphic*{\includegraphics{example-image}}
  
  \maketitle
  %------------ TABLEOFCONTENTS ---------------
  \tableofcontents
 

\section{Quickstart}
BFH-CI provides mechanisms for different types of documents.
Most mechanisms exist among all types. These can be extended by using the BFHModule mechanism (see \autoref{sec:bfhmodule}).

The release includes the following example files:

\begin{description}
	\item[DEMO-BFHPub.tex] The source to this document. General example for print publications. There are some more specific variants for project proposals (\file{DEMO-BFHProjektProposal.tex}) or fact sheets (\file{DEMO-BFHFactsheet.tex}).
	\item[DEMO-BFHBeamer.tex] Beamer presentations. There's also a variant with a sidebar in \file{DEMO-BFHBeamer-Sidebar.tex}
	\item[DEMO-BFHThesis.tex] Thesis template including an affidavit and additional title fields.
	\item[DEMO-BFHLetter.tex] Letters using \pkg{bfhletter} a layouting wrapper package for \pkg{scrletter}.
	\item[DEMO-BFHSciPoster.tex] Scientific posters based on \pkg{tcolorbox}'s poster library.
\end{description}

\noindent It might be useful to start a new document using one of these example files.
An extended variant of this documentation and general advice for LaTeX users can be found at \url{https://latex.ti.bfh.ch}

\section{Helper packages}


The basic design elements for BFH-CI are implemented by the packages \pkg{bfhcolors}, \pkg{bfhfonts} and \pkg{bfhlogo}.
The latter one is not included in the CTAN Releas due to trademark restrictions.
Users can download it from the internal GitLab.
Detailed Information can be found at the installation instructions at  \url{https://latex.ti.bfh.ch}.

These packages will be loaded automatically if one of the bfh-classes or the letter package are loaded.

The classes \cls{bfhpub} and \cls{bfhthesis} as well as the beamerarticle-mode of bfhbeamer also load the \pkg{bfhlayout} package.
It provides the basic layout functionality without a documentclass requirement.
Though it should not be loaded without a \KOMAScript{} class.


\subsection{bfhcolors}

\subsubsection{Available Colors}

The following table shows all by \pkg{bfhcolors} defined colors. For their usage please have a look at the \pkg{xcolor} documentation.

\medskip
\begin{tabular}{@{}lll}
	\BFHcolorBox{BFH-DarkBlue}   & \BFHcolorBox{BFH-MediumBlue}   & \BFHcolorBox{BFH-LightBlue}   \\
	\BFHcolorBox{BFH-DarkGreen}  & \BFHcolorBox{BFH-MediumGreen}  & \BFHcolorBox{BFH-LightGreen}  \\
	\BFHcolorBox{BFH-DarkPurple} & \BFHcolorBox{BFH-MediumPurple} & \BFHcolorBox{BFH-LightPurple} \\
	\BFHcolorBox{BFH-DarkOcher}  & \BFHcolorBox{BFH-MediumOcher}  & \BFHcolorBox{BFH-LightOcher}  \\
	\BFHcolorBox{BFH-DarkRed}    & \BFHcolorBox{BFH-MediumRed}    & \BFHcolorBox{BFH-LightRed}    \\[1em]
	\BFHcolorBox{BFH-Orange} &\BFHcolorBox{BFH-Gray}
\end{tabular}


\subsubsection{Package Options}

The \opt{colormode} option can be used to select the correct definitions for the output.
The names match the design guideline.

\begin{description}
	\item[colormode=4CU] 4 colors uncoated paper (default)
	\item[colormode=4CC] 4 colors coated paper
	\item[colorode=RGB] RGB colors for screens or beamer presentations
	\item[colormode=SW] grayscale for internal documents
\end{description}

\subsection{bfhfonts}

The CI guideline generally requires the Fonts Unit Slab Pro and Unit Rounded Pro.
Due to license restrictions these cannot be published together with BFH-CI.
BFH-CI provides fallbacks for Source Serif Pro and Nunito which will be loaded if the official fonts cannot be found.
If you want to use the official fonts please have a look at the installation instructions at  \url{https://latex.ti.bfh.ch}.

These changes have been approved by the communications department and can be used as full replacements.

\pkg{bfhfonts} will try to load fontspec and only use Type 1 fonts if pdf\LaTeX{} is used to compile the documents.

\subsection{bfhlogo}

The \pkg{bfhlogo} package provides translations of the word marks of the BFH logo.
Generally this package will use the base language but there's also an option to provide multi language support.

\subsubsection{Package options}

\begin{description}
	\item[language=] The language options accepts the self explaining values \verb+de+, \verb+fr+, \verb+en+, \verb+de_fr+, \verb+de_fr_en+.
	\item[invert-logo-colors=true/false] This option can be used to invert the logo colors. It's internally used in some poster and beamer elements.
	\item[trilingual/bilingual/monolingual] These keys only exist for compatibility reasons and will be mapped to the corresponding \verb+language=+ options.
\end{description}

\section{The base layout for text documents}
The base mechanism for all text documents is provided using the \pkg{bfhlayout} package.
\cls{bfhpub} and \cls{bfhthesis} load this package. The other bfh-classes provide the functionality differently.
Please have a look at the corresponding demo files if you use want to create another document type.

\cls{bfhpub} and \cls{bfhthesis} will pass all their document class options to this package.
\begin{description}
	\item[titleimage-ratio=] This choice key accepts the values \code{12} (1:2),\code{13} (1:3), \code{23} (2:3), \code{34} (3:4), \code{56} (5:6) , \code{1011} (10:11).
	It will adjust the size of the colored area or titlegraphic on the titlepage.
	For \cls{bfhthesis} some values might be forbidden if the title information takes too much space.
	
	The value is initialized to \code{titleimage-ratio=12}. the value will be ignored if no titlepage is generated e.\,g. with \code{titlepage=false}.

	\item[invert-title=true/false] This switch toggles the color of text \& logo on the titlepage. If set to true, the base colors of titlepage (BFH-Orange/BFH-Gray) are switched.
\end{description}


\section{Additional layout modules}
\label{sec:bfhmodule}

To support some layout elements among all document types BFH-CI introduces the Macro
\begin{verbatim}
	\LoadBFHModule{<List of Modules>}
\end{verbatim}

These modules can be used to extend the basic mechanisms on additional elements.

Currently there are 3 Modules prepared:
\begin{itemize}
	\item table
	\item listings
	\item terminal
	\item boxes
	\item rules
\end{itemize}

The corresponding filenames following the structure \file{bfh-layout-<modulename>.cfg}. User defined modules can be added.

\subsection{table module}

This module is automatically loaded by all document types beside \cls{bfhletter.cls}.

\begin{verbatim}
	\LoadBFHModule{table}
\end{verbatim}

BFH-CI should used colored tabulars. It combined all necessary adjustments in the \verb+\setupBfhTabular+ macro. It will adjust the rowcolor using \pkg{xcolor}. To use the recommended tabular setup one could use

\begin{verbatim}
\begin{table}
	\centering
	\setupBfhTabular
	\begin{tabular}{lll}
	\rowcolor{BFH-tablehead}
	Header 1&Header 2&Header3\\\hline
	Content 11&Content 12&Content 13\\\hline
	Content 21&Content 22&Content 23
	\end{tabular}
	\caption{table caption}
	\label{table-label}
\end{table}
\end{verbatim}

\begin{table}[ht]
	\centering
	\setupBfhTabular
	\begin{tabular}{lll}
		\rowcolor{BFH-tablehead}
		Header 1&Header 2&Header3\\\hline
		Content 11&Content 12&Content 13\\\hline
		Content 21&Content 22&Content 23
	\end{tabular}
	\caption{table caption}
	\label{table-label}
\end{table}

To simplify the usage the \pkg{bfhlayout} also provides a \verb+bfhTabular+ environment. The upper example would be equal to:

\begin{verbatim}
\begin{table}
	\begin{bfhTabular}{lll}
	Header 1&Header 2&Header3\\
	Content 11&Content 12&Content 13\\
	Content 21&Content 22&Content 23
	\end{bfhTabular}
	\caption{table caption}
	\label{table-label}
\end{table}
\end{verbatim}

In case the package \pkg{tabularray} ist loaded the table module will also implement a tblr environ to use the layout.
For further usage information please have a look at the \pkg{tabularray} documentation.

\begin{verbatim}
\begin{bfhTblr}{lll}
	Header 1&Header 2&Header3\\
	Content 11&Content 12&Content 13\\
	Content 21&Content 22&Content 23
\end{bfhTblr}
\end{verbatim}

\subsection{listings module}

Loades the \pkg{listings} package and adjusts colors for the listing environments to match the CI.

\subsection{terminal module}

Provides some terminal mechanisms to be similar to OSX and ubuntu terminals.
The mechanism is based on \pkg{tcolorbox} and either \pkg{listings} or \pkg{minted} can be used as listing engine.

The syntax was adapted from internal packages providing this functionality.
Therefore the syntax for adjusting the terminal propmts is slightly different for the minted engine in contrast to listings.

The following examples show the difference.

Please pay attention to the fact that the current implementation to change the prompt needs global assignments. A reset at start of a new terminal environment might be required.


\begin{multicols}{2}[\subsubsection{terminal using listings}]
\tcbset{listing engine=listings}
\setupLinuxPrompt{student}
\begin{ubuntu}
	whoami `\StartConsole`
	student `\setupLinuxPrompt{student}`
	sudo su `\setupLinuxPrompt{root}`
	hostname `\StartConsole`
	ubuntu`\setupLinuxPrompt{root}`
	ssh bob@remotehost`\StartConsole`
	student@remotehost's`\ `password:
	Linux remote host 2.6.32-5-686 #1 SMP Sun Sep 23 09:49:36 UTC 2012 i686
	You have mail.
	Last login: Wed Oct 16 01:12:35 2012 from localhost`\setupLinuxPrompt{remote}`
	whoami`\StartConsole`
	user`\setupLinuxPrompt{remote}`
	_
\end{ubuntu}

\begin{macos}
	whoami `\StartConsole`
	root `\setupOSXPrompt{root}`
	hostname `\StartConsole`
	ubuntu`\setupOSXPrompt{root}`
	ssh bob@remotehost`\StartConsole`
	bob@remotehost's`\ `password:
	Linux remote host 2.6.32-5-686 #1 SMP Sun Sep 23 09:49:36 UTC 2012 i686
	You have mail.
	Last login: Wed Oct 16 01:12:35 2012 from localhost`\setupOSXPrompt{remote}`
	whoami`\StartConsole`
	user`\setupOSXPrompt{remote}`
	_
\end{macos}
\end{multicols}

\subsubsection{terminal using minted}

This section is commented because minted has to be set up to use it.
In case this should be used minted has been loaded before the terminal module.

%\tcbset{listing engine=minted}
%\begin{multicols}{2}
%\setupLinuxPrompt{student}
%\begin{ubuntu}
%	whoami
%	student  `\StartConsole`
%	sudo su `\setupLinuxPrompt{student}`
%	hostname `\setupLinuxPrompt{root}`
%	ubuntu`\StartConsole`
%	ssh bob@remotehost`\setupLinuxPrompt{root}`
%	student@remotehost's`\ `password: `\StartConsole`
%	Linux remotehost 2.6.32-5-686 #1 SMP Sun Sep 23 09:49:36 UTC 2012 i686
%	You have mail.
%	Last login: Wed Oct 16 01:12:35 2012 from localhost
%	whoami`\setupLinuxPrompt{remote}`
%	user`\StartConsole`
%	_`\setupOSXPrompt{remote}`
%\end{ubuntu}
%
%\setupOSXPrompt{student}
%\begin{macos}
%	whoami
%	root`\StartConsole`
%	hostname`\setupOSXPrompt{root}`
%	ubuntu`\StartConsole`
%	ssh bob@remotehost`\setupOSXPrompt{root}`
%	bob@remotehost's`\ `password:`\StartConsole`
%	Linux remotehost 2.6.32-5-686 #1 SMP Sun Sep 23 09:49:36 UTC 2012 i686
%	You have mail.
%	Last login: Wed Oct 16 01:12:35 2012 from localhost
%	whoami`\setupOSXPrompt{remote}`
%	user`\StartConsole`
%	_`\setupOSXPrompt{remote}`
%\end{macos}
%\end{multicols}

\subsection{boxes module}

The boxes module provides box environments based on the BFH coporate identity.
All of them follow the same syntax:

\begin{verbatim}
	\begin{ENV_TYPE}[COLOR_OPTION]{BOX TITLE}
		Some text displayed in the color box.
	\end{ENV_TYPE}
\end{verbatim}

General use of the BFH notification box environment.
\begin{verbatim}
	\begin{NOTIFICATION_TYPE}
		Some text displayed in the color box.
	\end{NOTIFICATION_TYPE}
\end{verbatim}


\subsubsection{The general purpose box}
The BFH color box using the option to set user defined color.

\begin{verbatim}
	\begin{bfhBox}[BFH-MediumBlue]{\texttt{bfhBox}}
		Color provided by \texttt{bfhcolors} package: \texttt{BFH-MediumBlue}
	\end{bfhBox}
\end{verbatim}


\begin{bfhBox}[BFH-MediumBlue]{\texttt{bfhBox}}
	Color provided by \texttt{bfhcolors} package: \texttt{BFH-MediumBlue}
\end{bfhBox}

The box without the color option falls back to default color box in BFH medium green.

\begin{verbatim}
	\begin{bfhBox}{\texttt{bfhBox}}
		Color provided by \texttt{bfhcolors} package: \texttt{BFH-MediumGreen}
		Default color
	\end{bfhBox}
\end{verbatim}

\begin{bfhBox}{\texttt{bfhBox}}
	Color provided by \texttt{bfhcolors} package: \texttt{BFH-MediumGreen}
	Default color
\end{bfhBox}


\subsubsection{Theme boxes}

\begin{verbatim}
	\begin{bfhAlertBox}
		Some text to emphasis.
	\end{bfhAlertBox}
\end{verbatim}

\begin{bfhAlertBox}
	An alert box.
\end{bfhAlertBox}

\begin{verbatim}
	\begin{bfhWarnBox}
		Some text to emphasis.
	\end{bfhWarnBox}
\end{verbatim}

\begin{bfhWarnBox}
	A warning box.
\end{bfhWarnBox}

\begin{verbatim}
	\begin{bfhNoteBox}
		Some text to emphasis.
	\end{bfhNoteBox}
\end{verbatim}

\begin{bfhNoteBox}
	A note box.
\end{bfhNoteBox}

\begin{verbatim}
	\begin{bfhRecycleBox}
		Some text to emphasis.
	\end{bfhRecycleBox}
\end{verbatim}

\begin{bfhRecycleBox}
	A recycle box.
\end{bfhRecycleBox}

\begin{verbatim}
	\begin{bfhReadBox}
		Some text to emphasis.
	\end{bfhReadBox}
\end{verbatim}

\begin{bfhReadBox}
	A read box.
\end{bfhReadBox}


\begin{verbatim}
	\begin{bfhProcessingBox}
		Some text to emphasis.
	\end{bfhProcessingBox}
\end{verbatim}

\begin{bfhProcessingBox}
	A processing box.
\end{bfhProcessingBox}

\subsection{rules module}
The rules module adds user macros to create separation rules as described in the CI guideline.

\begin{verbatim}
	\bfhRule[optional length]
\end{verbatim}

\bfhRule

\end{document}