BFH Modules
The BFH-CI provides some features to make your document easier to read.
This includes a terminal like output, highlight box and predefined listing to show source code.
Each module can be separately loaded by the command \LoadBFHModule
within the document preamble.
\LoadBFHModule{terminal,boxes,tabular,listings,rules}
---
\begin{document}
---
For more detailed examples, have a look at the DEMO-BFHPub in the bfh-examples zip.
BFH Terminal
\LoadBFHModule{terminal}
There are two terminal styles provided by the terminal module ubuntu
and macos
.
\usepackage{caption}
\setupLinuxPrompt{student}
\begin{ubuntu}
echo "Hello World" `\StartConsole`
Hello World
\end{ubuntu}
\captionof{lstlisting}{This is a caption}
Have a look at the section color aliases for examples on how to change the colors of the terminal.
The ` are used to escape the verbatim mode within the terminal environments. You can also use this to run \setupLinuxPrompt
within the example to change the hostname. More detailed examples of this can be found within the BFHPub documentation or texdoc DEMO-BFHPub
.
BFH Boxes
\LoadBFHModule{boxes}
The boxes module provides box environments based on the BFH corporate design. The syntax is the same for all BFH boxes types.
\begin{ENV_TYPE}[COLOR_OPTION]{BOX TITLE}
Some text displayed in the color box.
\end{ENV_TYPE}
\begin{bfhBox}[BFH-MediumBlue]{\texttt{bfhBox}}
Color provided by \texttt{bfhcolors} package: \texttt{BFH-MediumBlue}
\end{bfhBox}
In addition to the color boxes, there are some notification boxes to highlight special content.
Use one of the listed ENV_TYPE
types for notification boxes:
bfhAlertBox
bfhWarnBox
bfhNoteBox
bfhRecycleBox
bfhReadBox
bfhProcessingBox
BFH Tables
\LoadBFHModule{tabular}
There are three different ways to create BFH CI compliant tables.
Using
\setupBfhTabular
macroUsing
\bfhTabular
environment provided by the BFHtabular
module.Using
\bfhTblr
environment provided by the BFHtabular
module along with the packagetabularray
.
Have a look at the section color aliases for examples on how to change the colors of the table.
Example with setupBFHTabular macro
\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}
Example with the BFH tabular environment
\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}
Example with the tabularray package
In case the package tabularray
is loaded the table module will also implement a tblr
environ to use the layout.
For further usage information please have a look at the tabularray documentation.
\begin{bfhTblr}{lll}
Header 1&Header 2&Header3\\
Content 11&Content 12&Content 13\\
Content 21&Content 22&Content 23
\end{bfhTblr}
BFH Listings
\LoadBFHModule{listings}
Loads the listings package and adjusts colors for the listing environments to match the CI.
Here is an example of, how to include the source code of expl_hello.c
as a listing with syntax highlighting for the C programming language.
\lstinputlisting[style=bfh-c,
language=C,
caption={My very first C program.},
label={lst:hello}]{listings/expl_hello.c}
There are different styles available:
bfh-c
bfh-cpp
bfh-vhdl
float
frame
linebreaks
There are different languages for highlighting available:
C
C++
VHDL