Compare commits
No commits in common. "fbf52d75e331126356d100659fe9bd48bdf2a0e9" and "968f63be78153c02f1d9f7d0a6adf2c7d6de5bf7" have entirely different histories.
fbf52d75e3
...
968f63be78
|
@ -1,19 +0,0 @@
|
||||||
name: Gitea Action for checking typst compilation
|
|
||||||
run-name: ${{ gitea.actor }} is performing typst compilation
|
|
||||||
on: [push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
Explore-Gitea-Actions:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- run: echo "This job is now running on a ${{ runner.os }}"
|
|
||||||
- run: echo "The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: typst-community/setup-typst@v3
|
|
||||||
- run: echo "The ${{ gitea.repository }} repository has been cloned to the runner."
|
|
||||||
- name: Install dependencies
|
|
||||||
run: apt update -y
|
|
||||||
- uses: typst-community/setup-typst@v3
|
|
||||||
with:
|
|
||||||
typst-version: '0.11.0'
|
|
||||||
- run: bash run-ci.sh
|
|
Binary file not shown.
Before Width: | Height: | Size: 54 KiB |
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
= Ein Text im Anhang
|
||||||
|
#label("Anhang-A")
|
||||||
|
|
||||||
|
#lorem(50)
|
||||||
|
|
||||||
|
== Noch mehr Text im Anhang
|
||||||
|
|
||||||
|
#lorem(50)
|
Before Width: | Height: | Size: 244 KiB After Width: | Height: | Size: 244 KiB |
|
@ -0,0 +1,115 @@
|
||||||
|
|
||||||
|
#import "../src/template.typ": dhbw-template
|
||||||
|
|
||||||
|
#let config = (
|
||||||
|
lang: "de",
|
||||||
|
region: "de",
|
||||||
|
author: (
|
||||||
|
name: "Sven Vogel",
|
||||||
|
semester: 4,
|
||||||
|
program: "Informationstechnik",
|
||||||
|
course: "TINF22IT2",
|
||||||
|
faculty: "Technik",
|
||||||
|
university: "DHBW Mannheim",
|
||||||
|
company: "ABB AG",
|
||||||
|
supervisor: "Florian Miedniak",
|
||||||
|
matriculation-number: 1191225),
|
||||||
|
thesis: (
|
||||||
|
title: "Konfiguration & Integration von PROFINET",
|
||||||
|
subtitle: "für die AC500 SPS",
|
||||||
|
submission-date: "20. März 2024",
|
||||||
|
timeframe: "1. Januar 2023 - 20. März 2024",
|
||||||
|
kind: "T2000",
|
||||||
|
summary: "",
|
||||||
|
abstract: "",
|
||||||
|
keywords: ( "IT", "PROFINET" ),
|
||||||
|
bibliography: bibliography("refs.yml"),
|
||||||
|
glossary: (
|
||||||
|
(
|
||||||
|
key: "oidc",
|
||||||
|
short: "OIDC",
|
||||||
|
long: "OpenID Connect",
|
||||||
|
desc: [OpenID is an open standard and decentralized authentication protocol promoted by the non-profit #link("https://en.wikipedia.org/wiki/OpenID#OpenID_Foundation")[OpenID Foundation].]
|
||||||
|
),
|
||||||
|
(
|
||||||
|
key: "potato",
|
||||||
|
short: "potato",
|
||||||
|
plural: "potatoes",
|
||||||
|
desc: [#lorem(10)]
|
||||||
|
),
|
||||||
|
),
|
||||||
|
appendices: include "appendix.typ"
|
||||||
|
))
|
||||||
|
|
||||||
|
#show: doc => dhbw-template(config: config, doc: doc)
|
||||||
|
|
||||||
|
= Lorem Ipsum
|
||||||
|
|
||||||
|
#lorem(25)
|
||||||
|
@oidc
|
||||||
|
|
||||||
|
#lorem(100)
|
||||||
|
@Anhang-A
|
||||||
|
|
||||||
|
== Lorem Ipsum 2
|
||||||
|
|
||||||
|
#lorem(200)
|
||||||
|
@texbook
|
||||||
|
|
||||||
|
= Lorem Ipsum 3
|
||||||
|
|
||||||
|
#lorem(15)
|
||||||
|
|
||||||
|
$
|
||||||
|
angle.l a, b angle.r &= arrow(a) dot arrow(b) \
|
||||||
|
&= a_1 b_1 + a_2 b_2 + ... a_n b_n \
|
||||||
|
&= sum_(i=1)^n a_i b_i.
|
||||||
|
$
|
||||||
|
|
||||||
|
#figure(image("digitaldog.jpg", height: 480pt), caption: [ Some image caption ])
|
||||||
|
|
||||||
|
#figure(
|
||||||
|
table(
|
||||||
|
columns: 2,
|
||||||
|
"Hello", "World"),
|
||||||
|
caption: [ Some table ])
|
||||||
|
|
||||||
|
#pagebreak()
|
||||||
|
|
||||||
|
#figure(
|
||||||
|
```rust
|
||||||
|
use std::env;
|
||||||
|
use std::fs::OpenOptions;
|
||||||
|
use std::io::Write;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
// Get the file path from the environment variable
|
||||||
|
let file_path = match env::var("OUTPUT_FILE") {
|
||||||
|
Ok(path) => path,
|
||||||
|
Err(_) => {
|
||||||
|
eprintln!("Error: OUTPUT_FILE environment variable is not set");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Open the file in append mode, create it if it doesn't exist
|
||||||
|
let mut file = match OpenOptions::new()
|
||||||
|
.append(true)
|
||||||
|
.create(true)
|
||||||
|
.open(&file_path)
|
||||||
|
{
|
||||||
|
Ok(file) => file,
|
||||||
|
Err(e) => {
|
||||||
|
eprintln!("Error opening file {}: {}", file_path, e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Write "Hello, World" to the file
|
||||||
|
if let Err(e) = writeln!(file, "Hello, World") {
|
||||||
|
eprintln!("Error writing to file: {}", e);
|
||||||
|
} else {
|
||||||
|
println!("Successfully appended 'Hello, World' to {}", file_path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```, caption: [Some code])
|
|
@ -0,0 +1,6 @@
|
||||||
|
texbook:
|
||||||
|
type: book
|
||||||
|
title: The {TeX} Book
|
||||||
|
author: Knuth, Donald E.
|
||||||
|
date: 1986
|
||||||
|
publisher: Addison-Wesley Professional
|
14
run-ci.sh
14
run-ci.sh
|
@ -1,14 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
function abort() {
|
|
||||||
echo "test case `$1` has failed" 1>&2
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "Running tests..."
|
|
||||||
|
|
||||||
typst compile tests/local-import/main.typ --root . || abort "local-import"
|
|
||||||
|
|
||||||
echo "Tests completed successfully"
|
|
|
@ -6,3 +6,5 @@
|
||||||
// Author: Sven Vogel
|
// Author: Sven Vogel
|
||||||
// Edited: 27.06.2024
|
// Edited: 27.06.2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
#if text.lang == "de" [
|
#if text.lang == "de" [
|
||||||
darf weder als Ganzes noch in Auszügen Personen außerhalb des Prüfungsprozesses und des Evalua-tionsverfahrens zugänglich gemacht werden, sofern keine anderslautende Genehmigung der Ausbildungsstätte vorliegt.
|
darf weder als Ganzes noch in Auszügen Personen außerhalb des Prüfungsprozesses und des Evalua-tionsverfahrens zugänglich gemacht werden, sofern keine anderslautende Genehmigung der Ausbildungsstätte vorliegt.
|
||||||
] else if text.lang == "en" [
|
] else if text.lang = "en" [
|
||||||
may not be made accessible to persons outside the examination process and the evaluation procedure, either as a whole or in excerpts, unless otherwise authorized by the training institution.
|
may not be made accessible to persons outside the examination process and the evaluation procedure, either as a whole or in excerpts, unless otherwise authorized by the training institution.
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#if text.lang == "de" [
|
#if text.lang == "de" [
|
||||||
handelt es sich _nicht_ um die fertige Fassung. Das Dokument kann Inhaltliche-, Grammatikalische- sowie Format-Fehler enthalten. Das Dokument ist im Rahmen der Aufgabenstellung von Seiten der #author.university nicht zur Bewertung freigegeben und ein anderer Verwendungszweck als eine Vorschau ist nicht gestattet.
|
handelt es sich _nicht_ um die fertige Fassung. Das Dokument kann Inhaltliche-, Grammatikalische- sowie Format-Fehler enthalten. Das Dokument ist im Rahmen der Aufgabenstellung von Seiten der #author.university nicht zur Bewertung freigegeben und ein anderer Verwendungszweck als eine Vorschau ist nicht gestattet.
|
||||||
] else if text.lang == "en" [
|
] else if text.lang == "en" [
|
||||||
is not the final version. The document may contain errors in content, grammar and formatting. The document may not be released for evaluation to #author.university as part of the assignment, and any use other than a preview is not permitted.
|
is _not_ the final version. The document may contain content, grammatical and format errors. The document is not released for evaluation by #author.university within the scope of the assignment and any use other than a preview is not permitted.
|
||||||
]
|
]
|
||||||
|
|
||||||
#v(1em)
|
#v(1em)
|
||||||
|
|
|
@ -127,6 +127,11 @@
|
||||||
]
|
]
|
||||||
|
|
||||||
#let content_styled(config: dictionary, body: content) = [
|
#let content_styled(config: dictionary, body: content) = [
|
||||||
|
// setup equate for sub equation labeling
|
||||||
|
#import "@preview/equate:0.2.0": equate
|
||||||
|
#show: equate.with(breakable: true, sub-numbering: true)
|
||||||
|
#set math.equation(numbering: "(1.1)")
|
||||||
|
|
||||||
#set heading(numbering: "1.")
|
#set heading(numbering: "1.")
|
||||||
|
|
||||||
#let thesis = config.thesis
|
#let thesis = config.thesis
|
||||||
|
|
|
@ -8,12 +8,10 @@
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
// start of template pages and styles
|
// start of template pages and styles
|
||||||
#let dhbw-template(config: dictionary, body) = [
|
#let dhbw-template(config: dictionary, doc: content) = [
|
||||||
|
|
||||||
#import "style.typ": global_styled_doc, content_styled, end_styled
|
#import "style.typ": global_styled_doc, content_styled, end_styled
|
||||||
|
|
||||||
#let doc = body
|
|
||||||
|
|
||||||
// set document properties
|
// set document properties
|
||||||
#set document(
|
#set document(
|
||||||
author: config.author.name,
|
author: config.author.name,
|
||||||
|
@ -49,9 +47,6 @@
|
||||||
#pagebreak(weak: true)
|
#pagebreak(weak: true)
|
||||||
#new_prerelease_note(config)
|
#new_prerelease_note(config)
|
||||||
|
|
||||||
#pagebreak(weak: true)
|
|
||||||
#new_abstract(config)
|
|
||||||
|
|
||||||
#pagebreak(weak: true)
|
#pagebreak(weak: true)
|
||||||
#new_outline()
|
#new_outline()
|
||||||
|
|
||||||
|
@ -62,14 +57,15 @@
|
||||||
|
|
||||||
#pagebreak(weak: true)
|
#pagebreak(weak: true)
|
||||||
|
|
||||||
#if "glossary" in config.thesis and config.thesis.glossary != none {
|
#heading(supplement: [outline], "Glossar")
|
||||||
heading(supplement: [outline], "Glossar")
|
|
||||||
|
|
||||||
print-glossary(config.thesis.glossary)
|
#print-glossary(config.thesis.glossary)
|
||||||
|
|
||||||
pagebreak(weak: true)
|
#pagebreak(weak: true)
|
||||||
counter(page).update(1)
|
#new_abstract(config)
|
||||||
}
|
|
||||||
|
#pagebreak(weak: true)
|
||||||
|
#counter(page).update(1)
|
||||||
|
|
||||||
// mark end of prelude
|
// mark end of prelude
|
||||||
#metadata("prelude terminate") <end-of-prelude>
|
#metadata("prelude terminate") <end-of-prelude>
|
|
@ -1,12 +0,0 @@
|
||||||
|
|
||||||
// English summary "abstract" is content of this block:
|
|
||||||
#let abstract = [
|
|
||||||
#lorem(100)
|
|
||||||
]
|
|
||||||
|
|
||||||
// Other languages abstract translation is content of this block:
|
|
||||||
// NOTE: An abstract is required in case the thesis is not written primarily in english
|
|
||||||
// if writing in english (and the language is set to "en") this can be let empty or set to none
|
|
||||||
#let summary = [
|
|
||||||
#lorem(100)
|
|
||||||
]
|
|
|
@ -1,9 +0,0 @@
|
||||||
|
|
||||||
= Raw data
|
|
||||||
#label("Anhang-A")
|
|
||||||
|
|
||||||
#lorem(50)
|
|
||||||
|
|
||||||
== More raw data
|
|
||||||
|
|
||||||
#lorem(50)
|
|
|
@ -1,15 +0,0 @@
|
||||||
|
|
||||||
#let glossary = (
|
|
||||||
(
|
|
||||||
key: "oidc",
|
|
||||||
short: "OIDC",
|
|
||||||
long: "OpenID Connect",
|
|
||||||
desc: [OpenID is an open standard and decentralized authentication protocol promoted by the non-profit #link("https://en.wikipedia.org/wiki/OpenID#OpenID_Foundation")[OpenID Foundation].]
|
|
||||||
),
|
|
||||||
(
|
|
||||||
key: "potato",
|
|
||||||
short: "potato",
|
|
||||||
plural: "potatoes",
|
|
||||||
desc: [#lorem(10)]
|
|
||||||
),
|
|
||||||
)
|
|
|
@ -1,112 +0,0 @@
|
||||||
#import "../src/lib.typ": dhbw-template
|
|
||||||
|
|
||||||
#import "glossary.typ": glossary
|
|
||||||
#import "abstract.typ": abstract, summary
|
|
||||||
|
|
||||||
#show: dhbw-template.with(
|
|
||||||
config: (
|
|
||||||
lang: "en",
|
|
||||||
region: "en",
|
|
||||||
author: (
|
|
||||||
name: "Sven Vogel",
|
|
||||||
semester: 4,
|
|
||||||
program: "Informationtechnology",
|
|
||||||
course: "TINF19IT1",
|
|
||||||
faculty: "Technik",
|
|
||||||
university: "DHBW Mannheim",
|
|
||||||
company: "ABB AG",
|
|
||||||
supervisor: "Benny Goodman",
|
|
||||||
matriculation-number: 123456789),
|
|
||||||
thesis: (
|
|
||||||
title: "Unofficial ABB/DHBW Typst template",
|
|
||||||
subtitle: "for reports and thesises",
|
|
||||||
submission-date: "23rd march 2020",
|
|
||||||
timeframe: "1st january 2020 - 20th march 2020",
|
|
||||||
kind: "T2000",
|
|
||||||
summary: summary,
|
|
||||||
abstract: abstract,
|
|
||||||
keywords: ( "IT", "other stuff" ),
|
|
||||||
bibliography: bibliography("refs.bib"),
|
|
||||||
glossary: glossary,
|
|
||||||
appendices: include "appendix.typ")))
|
|
||||||
|
|
||||||
#import "@preview/wrap-it:0.1.0": wrap-content
|
|
||||||
|
|
||||||
= Lorem Ipsum
|
|
||||||
|
|
||||||
#lorem(25)
|
|
||||||
@oidc
|
|
||||||
|
|
||||||
#lorem(100)
|
|
||||||
@Anhang-A
|
|
||||||
|
|
||||||
== Lorem Ipsum 2
|
|
||||||
|
|
||||||
#lorem(200)
|
|
||||||
@einstein
|
|
||||||
|
|
||||||
= Lorem Ipsum 3
|
|
||||||
|
|
||||||
#lorem(15)
|
|
||||||
|
|
||||||
$
|
|
||||||
angle.l a, b angle.r &= arrow(a) dot arrow(b) \
|
|
||||||
&= a_1 b_1 + a_2 b_2 + ... a_n b_n \
|
|
||||||
&= sum_(i=1)^n a_i b_i.
|
|
||||||
$
|
|
||||||
|
|
||||||
#lorem(140)
|
|
||||||
|
|
||||||
#wrap-content(
|
|
||||||
figure(image("assets/digitaldog.jpg", width: 200pt), caption: [ Some image caption ]),
|
|
||||||
lorem(200))
|
|
||||||
|
|
||||||
#figure(
|
|
||||||
table(
|
|
||||||
columns: 2,
|
|
||||||
"Hello", "World"),
|
|
||||||
caption: [ Some table ])
|
|
||||||
|
|
||||||
#pagebreak()
|
|
||||||
|
|
||||||
#figure(
|
|
||||||
```rust
|
|
||||||
use std::env;
|
|
||||||
use std::fs::OpenOptions;
|
|
||||||
use std::io::Write;
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
// Get the file path from the environment variable
|
|
||||||
let file_path = match env::var("OUTPUT_FILE") {
|
|
||||||
Ok(path) => path,
|
|
||||||
Err(_) => {
|
|
||||||
eprintln!("Error: OUTPUT_FILE environment variable is not set");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Open the file in append mode, create it if it doesn't exist
|
|
||||||
let mut file = match OpenOptions::new()
|
|
||||||
.append(true)
|
|
||||||
.create(true)
|
|
||||||
.open(&file_path)
|
|
||||||
{
|
|
||||||
Ok(file) => file,
|
|
||||||
Err(e) => {
|
|
||||||
eprintln!("Error opening file {}: {}", file_path, e);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Write "Hello, World" to the file
|
|
||||||
if let Err(e) = writeln!(file, "Hello, World") {
|
|
||||||
eprintln!("Error writing to file: {}", e);
|
|
||||||
} else {
|
|
||||||
println!("Successfully appended 'Hello, World' to {}", file_path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```, caption: [Some code])
|
|
||||||
|
|
||||||
= Conclusion
|
|
||||||
|
|
||||||
#lorem(320)
|
|
|
@ -1,12 +0,0 @@
|
||||||
@article{einstein,
|
|
||||||
author = "Albert Einstein",
|
|
||||||
title = "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
|
|
||||||
[{On} the electrodynamics of moving bodies]",
|
|
||||||
journal = "Annalen der Physik",
|
|
||||||
volume = "322",
|
|
||||||
number = "10",
|
|
||||||
pages = "891--921",
|
|
||||||
year = "1905",
|
|
||||||
DOI = "http://dx.doi.org/10.1002/andp.19053221004",
|
|
||||||
keywords = "physics"
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
|
|
||||||
#import "../../src/lib.typ": dhbw-template
|
|
||||||
|
|
||||||
#show: dhbw-template.with(
|
|
||||||
config: (
|
|
||||||
lang: "en",
|
|
||||||
region: "en",
|
|
||||||
author: (
|
|
||||||
name: "Sven Vogel",
|
|
||||||
semester: 4,
|
|
||||||
program: "Informationtechnology",
|
|
||||||
course: "TINF19IT1",
|
|
||||||
faculty: "Technik",
|
|
||||||
university: "DHBW Mannheim",
|
|
||||||
company: "ABB AG",
|
|
||||||
supervisor: "Benny Goodman",
|
|
||||||
matriculation-number: 123456789),
|
|
||||||
thesis: (
|
|
||||||
title: "Unofficial ABB/DHBW Typst template",
|
|
||||||
subtitle: "for reports and thesises",
|
|
||||||
submission-date: "23rd march 2020",
|
|
||||||
timeframe: "1st january 2020 - 20th march 2020",
|
|
||||||
kind: "T2000",
|
|
||||||
summary: none,
|
|
||||||
abstract: none,
|
|
||||||
keywords: ( "IT", "other stuff" ),
|
|
||||||
bibliography: none,
|
|
||||||
glossary: none,
|
|
||||||
appendices: none)))
|
|
16
typst.toml
16
typst.toml
|
@ -1,16 +0,0 @@
|
||||||
[package]
|
|
||||||
name = "dhbw-abb-typst-template"
|
|
||||||
version = "0.1.0"
|
|
||||||
entrypoint = "src/template.typ"
|
|
||||||
authors = ["Sven Vogel <sven.vogel1@de.abb.com>"]
|
|
||||||
license = "MIT"
|
|
||||||
description = "Unoffical typst DHBW/ABB template for use as thesis and report works"
|
|
||||||
repository = "https://git.montehaselino.de/DHBW/dhbw-abb-typst-template"
|
|
||||||
keywords = ["dhbw", "abb", "thesis"]
|
|
||||||
categories = ["paper", "thesis", "report"]
|
|
||||||
exclude = ["examples"]
|
|
||||||
|
|
||||||
[template]
|
|
||||||
path = "template"
|
|
||||||
entrypoint = "main.typ"
|
|
||||||
thumbnail = "assets/thumbnail.png"
|
|
Loading…
Reference in New Issue