Compare commits
No commits in common. "main" and "feature/github-workflow" have entirely different histories.
main
...
feature/gi
|
@ -1,33 +1,19 @@
|
||||||
name: Build'n check
|
name: Gitea Action for checking typst compilation
|
||||||
run-name: Performing Typst compilation
|
run-name: Performing Typst compilation
|
||||||
on:
|
on: [push]
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
jobs:
|
jobs:
|
||||||
run-ci-linux:
|
run-ci-linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# run action mutally exclusive on PRs or
|
env:
|
||||||
# push with commit containing "Run-Checks"
|
TYPST_INSTALL: /usr/local
|
||||||
if: >
|
TYPST_VERSION: 0.11.1
|
||||||
(contains(github.event.head_commit.message, 'Run-Checks') &&
|
|
||||||
github.event_name == 'push') ||
|
|
||||||
github.event_name == 'pull_request'
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Install dependencies for Nix setup action
|
- name: Install Typst CLI
|
||||||
run: |
|
run: curl -fsSL https://typst.community/typst-install/install.sh | sh -s "$TYPST_VERSION"
|
||||||
apt update -y
|
- name: Set up Python 3
|
||||||
apt install sudo -y
|
run: apt update -y && apt install python3-pip -y
|
||||||
- name: Setup Nix
|
- name: Run CI
|
||||||
uses: cachix/install-nix-action@v27
|
run: bash -c ./run-ci.sh
|
||||||
with:
|
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
|
||||||
- name: Stylecheck
|
|
||||||
run: nix-shell --run "./run-fmt.sh --check src/lib.typ"
|
|
||||||
- id: build
|
|
||||||
name: Build
|
|
||||||
run: |
|
|
||||||
nix-shell --run ./run-ci.sh
|
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
name: release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Install Typst CLI
|
||||||
|
run: curl -fsSL https://typst.community/typst-install/install.sh | sh -s "$TYPST_VERSION"
|
||||||
|
- name: Set up Python 3
|
||||||
|
run: apt update -y && apt install python3-pip -y
|
||||||
|
- name: Run CI
|
||||||
|
run: bash -c ./run-ci.sh
|
||||||
|
- name: Setup go
|
||||||
|
uses: https://github.com/actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: '>=1.20.1'
|
||||||
|
- name: Create release
|
||||||
|
id: create-release
|
||||||
|
uses: https://gitea.com/actions/release-action@main
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
example.pdf
|
||||||
|
api_key: '${{secrets.RELEASE_TOKEN}}'
|
|
@ -0,0 +1,20 @@
|
||||||
|
name: GitHub Action for checking typst compilation
|
||||||
|
run-name: Performing Typst compilation
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run-ci-linux:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
TYPST_INSTALL: $HOME/.typst
|
||||||
|
TYPST_VERSION: 0.11.1
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Install Typst CLI
|
||||||
|
run: curl -fsSL https://typst.community/typst-install/install.sh | sh -s "$TYPST_VERSION"
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- name: Run CI
|
||||||
|
run: export PATH="$TYPST_INSTALL/bin:$PATH" && bash -c ./run-ci.sh
|
|
@ -1,64 +1,32 @@
|
||||||
name: Build'n check
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
# Sequence of patterns matched against refs/tags
|
||||||
- main
|
tags:
|
||||||
|
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||||
|
|
||||||
|
name: Create Release
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Check Template and Build example
|
name: Create Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Setup Nix
|
- name: Install Typst CLI
|
||||||
uses: cachix/install-nix-action@v27
|
run: curl -fsSL https://typst.community/typst-install/install.sh | sh -s "$TYPST_VERSION"
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
python-version: '3.11'
|
||||||
- name: Stylecheck
|
- name: Run CI
|
||||||
run: nix-shell --run "./run-fmt.sh --check src/lib.typ"
|
run: export PATH="$TYPST_INSTALL/bin:$PATH" && bash -c ./run-ci.sh
|
||||||
- id: build
|
- name: Create Release
|
||||||
name: Build
|
id: create_release
|
||||||
run: |
|
uses: actions/create-release@latest
|
||||||
nix-shell --run ./run-ci.sh
|
env:
|
||||||
- name: Upload artifact
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
||||||
id: artifact-upload
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
with:
|
||||||
name: example-document
|
tag_name: ${{ github.ref }}
|
||||||
path: ${{ github.workspace }}/example.pdf
|
release_name: Release ${{ github.ref }}
|
||||||
if-no-files-found: error
|
draft: false
|
||||||
retention-days: 1
|
prerelease: false
|
||||||
- name: Output artifact ID
|
|
||||||
run: echo 'Artifact ID is ${{ steps.artifact-upload.outputs.artifact-id }}'
|
|
||||||
release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: build
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Setup go
|
|
||||||
uses: actions/setup-go@v4
|
|
||||||
with:
|
|
||||||
go-version: '>=1.20.1'
|
|
||||||
- name: Download Artifcat
|
|
||||||
id: download
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: example-document
|
|
||||||
path: ${{ github.workspace }}/Example.pdf
|
|
||||||
- name: 'Artifact Download Path'
|
|
||||||
run: echo ${{ steps.download.outputs.download-path }}
|
|
||||||
- name: Prepare Release
|
|
||||||
run: echo ${{ github.sha }} > Release.txt
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
Example.pdf
|
|
||||||
Release.txt
|
|
||||||
LICENSE
|
|
18
LICENSE
18
LICENSE
|
@ -2,20 +2,8 @@ MIT License
|
||||||
|
|
||||||
Copyright (c) 2024 Sven Vogel
|
Copyright (c) 2024 Sven Vogel
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
|
||||||
the Software without restriction, including without limitation the rights to
|
|
||||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
||||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
||||||
subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
95
README.md
95
README.md
|
@ -2,23 +2,20 @@
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<h1>DHBW-ABB template for Typst</h1>
|
<h1>DHBW-ABB template for Typst</h1>
|
||||||
<img src="https://img.shields.io/gitea/last-commit/dhbw/dhbw-abb-typst-template?gitea_url=https%3A%2F%2Fgit.montehaselino.de">
|
<img src="https://img.shields.io/gitea/last-commit/dhbw/dhbw-abb-typst-template?gitea_url=https%3A%2F%2Fgit.montehaselino.de">
|
||||||
<img src="https://img.shields.io/github/actions/workflow/status/Servostar/dhbw-abb-typst-template/ci.yml?label=build">
|
|
||||||
<img src="https://img.shields.io/gitea/v/release/dhbw/dhbw-abb-typst-template?gitea_url=https%3A%2F%2Fgit.montehaselino.de&display_name=release">
|
<img src="https://img.shields.io/gitea/v/release/dhbw/dhbw-abb-typst-template?gitea_url=https%3A%2F%2Fgit.montehaselino.de&display_name=release">
|
||||||
<img src="https://img.shields.io/badge/license-MIT-ff0000">
|
|
||||||
<img src="https://img.shields.io/badge/Typst-2B9CB0">
|
<img src="https://img.shields.io/badge/Typst-2B9CB0">
|
||||||
<img src="https://img.shields.io/gitea/languages/count/dhbw/dhbw-abb-typst-template?gitea_url=https%3A%2F%2Fgit.montehaselino.de">
|
<img src="https://img.shields.io/gitea/languages/count/dhbw/dhbw-abb-typst-template?gitea_url=https%3A%2F%2Fgit.montehaselino.de">
|
||||||
|
<img src="https://img.shields.io/badge/license-MIT-ff0000">
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<b>Unofficial</b> but feature rich Typst template for writing a thesis or report at DHBW<br>
|
<b>Unofficial</b> but feature rich Typst template for writing a thesis or report at DHBW<br>
|
||||||
with according ABB AG branding in mind.
|
with according ABB AG branding in mind.
|
||||||
<br>
|
<br>
|
||||||
<br>
|
|
||||||
<img width="1000pt" src="./assets/banner.png">
|
<img width="1000pt" src="./assets/banner.png">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
1. [Contribution](#contribution)
|
|
||||||
1. [Features](#features)
|
1. [Features](#features)
|
||||||
2. [Usage](#usage)
|
2. [Usage](#usage)
|
||||||
2. [Preview of pages](#preview)
|
2. [Preview of pages](#preview)
|
||||||
|
@ -31,12 +28,6 @@
|
||||||
1. [Typst vs LaTeX](#why-typst-instead-of-latex)
|
1. [Typst vs LaTeX](#why-typst-instead-of-latex)
|
||||||
2. [Source of logos](#where-are-the-logos-from)
|
2. [Source of logos](#where-are-the-logos-from)
|
||||||
|
|
||||||
## Contribution
|
|
||||||
|
|
||||||
> ⚠️ **Important** <br>
|
|
||||||
> Development happens at an external site [here](https://git.montehaselino.de/DHBW/dhbw-abb-typst-template).
|
|
||||||
> The GitHub repository is only a push mirror, but issues are still welcome at any time!
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
> ⚠️ **Notice** <br>
|
> ⚠️ **Notice** <br>
|
||||||
|
@ -75,78 +66,31 @@ The default configuration can be found in `src/conf.typ`.
|
||||||
#import "src/lib.typ": *
|
#import "src/lib.typ": *
|
||||||
|
|
||||||
#show: dhbw-template.with((
|
#show: dhbw-template.with((
|
||||||
// language settings used to make decisions about hyphenation and others
|
lang: "en",
|
||||||
lang: "en", // ISO 3166 language code of text: "de", "en"
|
region: "en",
|
||||||
region: "en", // region code
|
author: (
|
||||||
// mark this thesis as draft
|
|
||||||
// Adds preleminarry note page and watermark
|
|
||||||
draft: true,
|
|
||||||
// information about author(s)
|
|
||||||
university: (
|
|
||||||
program: "Informationtechnology",
|
|
||||||
faculty: "Technik",
|
|
||||||
name: "dualen Hochschule Baden-Württemberg",
|
|
||||||
campus: "Eppelheim"
|
|
||||||
),
|
|
||||||
authors: (
|
|
||||||
(
|
|
||||||
name: "Sven Vogel",
|
name: "Sven Vogel",
|
||||||
|
semester: 4,
|
||||||
|
program: "Informationtechnology",
|
||||||
course: "TINF19IT1",
|
course: "TINF19IT1",
|
||||||
|
faculty: "Technik",
|
||||||
|
university: "DHBW Mannheim",
|
||||||
company: "ABB AG",
|
company: "ABB AG",
|
||||||
supervisor: "Benny Goodman",
|
supervisor: "Benny Goodman",
|
||||||
matriculation-number: 123456789
|
matriculation-number: 123456789),
|
||||||
),
|
|
||||||
(
|
|
||||||
name: "Kurt Jammer",
|
|
||||||
course: "TINF24AI2",
|
|
||||||
company: "Siemens",
|
|
||||||
supervisor: "Henry Badman",
|
|
||||||
matriculation-number: 478568763
|
|
||||||
),
|
|
||||||
),
|
|
||||||
// information about thesis
|
|
||||||
thesis: (
|
thesis: (
|
||||||
title: "Unofficial ABB/DHBW Typst template",
|
title: "Unofficial ABB/DHBW Typst template",
|
||||||
subtitle: "for reports and thesises", // subtitle may be none
|
subtitle: "for reports and thesises",
|
||||||
submission-date: "23rd march 2020",
|
submission-date: "23rd march 2020",
|
||||||
timeframe: "1st january 2020 - 20th march 2020",
|
timeframe: "1st january 2020 - 20th march 2020",
|
||||||
kind: "T2000",
|
kind: "T2000",
|
||||||
// translated version of abstract, only used in case language is not english
|
summary: summary,
|
||||||
summary: none,
|
abstract: abstract,
|
||||||
abstract: none,
|
preface: include "preface.typ",
|
||||||
preface: none,
|
|
||||||
keywords: ( "IT", "other stuff" ),
|
keywords: ( "IT", "other stuff" ),
|
||||||
bibliography: none /* bibliography("refs.bib") */,
|
bibliography: bibliography("refs.bib"),
|
||||||
glossary: none,
|
glossary: yaml("glossary.yml"),
|
||||||
appendices: none),
|
appendices: include "appendix.typ")))
|
||||||
style: (
|
|
||||||
header: (
|
|
||||||
content-padding: 1.5em,
|
|
||||||
underline-top-padding: 0pt,
|
|
||||||
logo-height: 5em,
|
|
||||||
logo-image: "res/ABB.svg"),
|
|
||||||
footer: (
|
|
||||||
content-padding: 1.5em),
|
|
||||||
page: (
|
|
||||||
format: "a4",
|
|
||||||
margin: (
|
|
||||||
left: 3cm,
|
|
||||||
right: 2.5cm,
|
|
||||||
top: 2.5cm,
|
|
||||||
bottom: 2.5cm)),
|
|
||||||
text: (
|
|
||||||
size: 12pt,
|
|
||||||
font: "Fira Sans"),
|
|
||||||
heading: (
|
|
||||||
font: "Fira Sans"),
|
|
||||||
code: (
|
|
||||||
theme: "res/abb.tmTheme",
|
|
||||||
font: "FiraCode Nerd Font",
|
|
||||||
lines: false,
|
|
||||||
size: 10pt,
|
|
||||||
tab-size: 4),
|
|
||||||
link: (
|
|
||||||
color: ABB-GRAY-02)))
|
|
||||||
|
|
||||||
// Your document code goes here!
|
// Your document code goes here!
|
||||||
|
|
||||||
|
@ -178,10 +122,9 @@ Complies with ABB branding guidelines such as:
|
||||||
|
|
||||||
## Fonts
|
## Fonts
|
||||||
|
|
||||||
Both fonts used in the document are licensed under the [Open Font License](https://openfontlicense.org/) and can be used for non-commercial as well as commercial purposes:
|
Both fonts used in the document are licensed under the [Open Font License](https://openfontlicense.org/) and can be used for non-commercial as well as commercial purposes. They can be downloaded from google fonts:
|
||||||
- [Fira Sans](https://github.com/bBoxType/FiraSans)
|
- [Montserrat](https://fonts.google.com/specimen/Montserrat)
|
||||||
- [Fira Math](https://github.com/firamath/firamath)
|
- [Open Sans](https://fonts.google.com/specimen/Open+Sans)
|
||||||
- [Fira Code NF](https://www.nerdfonts.com/font-downloads)
|
|
||||||
|
|
||||||
Consider giving the creators of the font credit for their amazing work!
|
Consider giving the creators of the font credit for their amazing work!
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Base16 ABB branded color scheme
|
||||||
|
scheme-author: "Sven Vogel"
|
||||||
|
scheme-slug: "abb-base16"
|
||||||
|
scheme-name: "ABB Base16"
|
||||||
|
base00: "ffffff" # Default Background
|
||||||
|
base01: "fafafa" # Lighter Background
|
||||||
|
base02: "f0f0f0" # Selection Background
|
||||||
|
base03: "6e6e6e" # Comments, Invisibles, Line Highlighting
|
||||||
|
base04: "000000" # Dark Foreground
|
||||||
|
base05: "000000" # Default Foreground, Caret, Delimiters, Operators
|
||||||
|
base06: "fafafa" # Light Foreground (Not often used)
|
||||||
|
base07: "fafafa" # Light Background (Not often used)
|
||||||
|
base08: "262626" # Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted
|
||||||
|
base09: "004c97" # Integers, Boolean, Constants, XML Attributes, Markup Link Url
|
||||||
|
base0A: "ff000f" # Classes, Markup Bold, Search Text Background
|
||||||
|
base0B: "004c97" # Strings, Inherited Class, Markup Code, Diff Inserted
|
||||||
|
base0C: "262626" # Support, Regular Expressions, Escape Characters, Markup Quotes
|
||||||
|
base0D: "007a33" # Functions, Methods, Attribute IDs, Headings
|
||||||
|
base0E: "ff000f" # Keywords, Storage, Selector, Markup Italic, Diff Changed
|
||||||
|
base0F: "6e6e6e" # Deprecated, Opening/Closing Embedded Language Tags
|
|
@ -0,0 +1,30 @@
|
||||||
|
import yaml
|
||||||
|
import logging
|
||||||
|
import sys
|
||||||
|
import re
|
||||||
|
|
||||||
|
global data
|
||||||
|
|
||||||
|
def replace_tag(match):
|
||||||
|
return data[match.group(1)]
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
|
||||||
|
logger = logging.getLogger()
|
||||||
|
|
||||||
|
with open(sys.argv[1], 'r') as file:
|
||||||
|
data = yaml.safe_load(file)
|
||||||
|
|
||||||
|
content = ""
|
||||||
|
|
||||||
|
with open(sys.argv[2], "r") as file:
|
||||||
|
logger.info(f"opened file: {sys.argv[2]}")
|
||||||
|
content = file.read()
|
||||||
|
logger.info(f"read file: {sys.argv[2]}")
|
||||||
|
|
||||||
|
logger.info(f"converting...")
|
||||||
|
content = re.sub("\\{\\{([a-z0-9-]+)\\}\\}", replace_tag, content, 0, re.IGNORECASE)
|
||||||
|
|
||||||
|
with open(sys.argv[3], "w") as file:
|
||||||
|
logger.info(f"writing changes...")
|
||||||
|
file.write(content)
|
|
@ -0,0 +1 @@
|
||||||
|
pyyaml
|
|
@ -0,0 +1,561 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>author</key>
|
||||||
|
<string>Template: Chris Kempson, Scheme: {{scheme-author}}</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Base16 {{scheme-name}}</string>
|
||||||
|
<key>semanticClass</key>
|
||||||
|
<string>theme.base16.{{scheme-slug}}</string>
|
||||||
|
<key>colorSpaceName</key>
|
||||||
|
<string>sRGB</string>
|
||||||
|
<key>gutterSettings</key>
|
||||||
|
<dict>
|
||||||
|
<key>background</key>
|
||||||
|
<string>#{{base01}}</string>
|
||||||
|
<key>divider</key>
|
||||||
|
<string>#{{base01}}</string>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base03}}</string>
|
||||||
|
<key>selectionBackground</key>
|
||||||
|
<string>#{{base02}}</string>
|
||||||
|
<key>selectionForeground</key>
|
||||||
|
<string>#{{base04}}</string>
|
||||||
|
</dict>
|
||||||
|
<key>settings</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>background</key>
|
||||||
|
<string>#{{base00}}</string>
|
||||||
|
<key>caret</key>
|
||||||
|
<string>#{{base05}}</string>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base05}}</string>
|
||||||
|
<key>invisibles</key>
|
||||||
|
<string>#{{base03}}</string>
|
||||||
|
<key>lineHighlight</key>
|
||||||
|
<string>#{{base03}}55</string>
|
||||||
|
<key>selection</key>
|
||||||
|
<string>#{{base02}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Text</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>variable.parameter.function</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base05}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Comments</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>comment, punctuation.definition.comment</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base03}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Punctuation</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>punctuation.definition.string, punctuation.definition.variable, punctuation.definition.string, punctuation.definition.parameters, punctuation.definition.string, punctuation.definition.array</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base05}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Delimiters</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>none</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base05}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Operators</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>keyword.operator</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base05}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Keywords</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>keyword</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0E}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Variables</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>variable</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base08}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Functions</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>entity.name.function, meta.require, support.function.any-method, variable.function, variable.annotation, support.macro</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0D}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Labels</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>entity.name.label</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0F}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Classes</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>support.class, entity.name.class, entity.name.type.class</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0A}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Classes</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>meta.class</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base07}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Methods</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>keyword.other.special-method</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0D}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Storage</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>storage</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0E}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Support</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>support.function</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0C}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Strings, Inherited Class</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>string, constant.other.symbol, entity.other.inherited-class</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0B}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Integers</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>constant.numeric</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base09}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Floats</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>none</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base09}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Boolean</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>none</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base09}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Constants</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>constant</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base09}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Tags</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>entity.name.tag</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base08}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Attributes</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>entity.other.attribute-name</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base09}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Attribute IDs</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>entity.other.attribute-name.id, punctuation.definition.entity</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0D}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Selector</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>meta.selector</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0E}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Values</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>none</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base09}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Headings</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>markup.heading punctuation.definition.heading, entity.name.section</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0D}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Units</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>keyword.other.unit</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base09}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Bold</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>markup.bold, punctuation.definition.bold</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>bold</string>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0A}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Italic</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>markup.italic, punctuation.definition.italic</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0E}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Code</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>markup.raw.inline</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0B}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Link Text</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>string.other.link, punctuation.definition.string.end.markdown, punctuation.definition.string.begin.markdown</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base08}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Link Url</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>meta.link</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base09}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Lists</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>markup.list</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base08}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Quotes</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>markup.quote</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base09}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Separator</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>meta.separator</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>background</key>
|
||||||
|
<string>#{{base02}}</string>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base05}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Inserted</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>markup.inserted</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0B}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Deleted</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>markup.deleted</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base08}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Changed</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>markup.changed</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0E}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Colors</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>constant.other.color</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0C}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Regular Expressions</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>string.regexp</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0C}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Escape Characters</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>constant.character.escape</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0C}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Embedded</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>punctuation.section.embedded, variable.interpolation</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base0E}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Illegal</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>invalid.illegal</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>background</key>
|
||||||
|
<string>#{{base08}}</string>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base07}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Broken</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>invalid.broken</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>background</key>
|
||||||
|
<string>#{{base09}}</string>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base00}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Deprecated</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>invalid.deprecated</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>background</key>
|
||||||
|
<string>#{{base0F}}</string>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base07}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Unimplemented</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>invalid.unimplemented</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>background</key>
|
||||||
|
<string>#{{base03}}</string>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#{{base07}}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>uuid</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,93 +0,0 @@
|
||||||
Copyright (c) 2014, The Fira Code Project Authors (https://github.com/tonsky/FiraCode)
|
|
||||||
|
|
||||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
||||||
This license is copied below, and is also available with a FAQ at:
|
|
||||||
http://scripts.sil.org/OFL
|
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------
|
|
||||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
||||||
-----------------------------------------------------------
|
|
||||||
|
|
||||||
PREAMBLE
|
|
||||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
||||||
development of collaborative font projects, to support the font creation
|
|
||||||
efforts of academic and linguistic communities, and to provide a free and
|
|
||||||
open framework in which fonts may be shared and improved in partnership
|
|
||||||
with others.
|
|
||||||
|
|
||||||
The OFL allows the licensed fonts to be used, studied, modified and
|
|
||||||
redistributed freely as long as they are not sold by themselves. The
|
|
||||||
fonts, including any derivative works, can be bundled, embedded,
|
|
||||||
redistributed and/or sold with any software provided that any reserved
|
|
||||||
names are not used by derivative works. The fonts and derivatives,
|
|
||||||
however, cannot be released under any other type of license. The
|
|
||||||
requirement for fonts to remain under this license does not apply
|
|
||||||
to any document created using the fonts or their derivatives.
|
|
||||||
|
|
||||||
DEFINITIONS
|
|
||||||
"Font Software" refers to the set of files released by the Copyright
|
|
||||||
Holder(s) under this license and clearly marked as such. This may
|
|
||||||
include source files, build scripts and documentation.
|
|
||||||
|
|
||||||
"Reserved Font Name" refers to any names specified as such after the
|
|
||||||
copyright statement(s).
|
|
||||||
|
|
||||||
"Original Version" refers to the collection of Font Software components as
|
|
||||||
distributed by the Copyright Holder(s).
|
|
||||||
|
|
||||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
||||||
or substituting -- in part or in whole -- any of the components of the
|
|
||||||
Original Version, by changing formats or by porting the Font Software to a
|
|
||||||
new environment.
|
|
||||||
|
|
||||||
"Author" refers to any designer, engineer, programmer, technical
|
|
||||||
writer or other person who contributed to the Font Software.
|
|
||||||
|
|
||||||
PERMISSION & CONDITIONS
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
||||||
redistribute, and sell modified and unmodified copies of the Font
|
|
||||||
Software, subject to the following conditions:
|
|
||||||
|
|
||||||
1) Neither the Font Software nor any of its individual components,
|
|
||||||
in Original or Modified Versions, may be sold by itself.
|
|
||||||
|
|
||||||
2) Original or Modified Versions of the Font Software may be bundled,
|
|
||||||
redistributed and/or sold with any software, provided that each copy
|
|
||||||
contains the above copyright notice and this license. These can be
|
|
||||||
included either as stand-alone text files, human-readable headers or
|
|
||||||
in the appropriate machine-readable metadata fields within text or
|
|
||||||
binary files as long as those fields can be easily viewed by the user.
|
|
||||||
|
|
||||||
3) No Modified Version of the Font Software may use the Reserved Font
|
|
||||||
Name(s) unless explicit written permission is granted by the corresponding
|
|
||||||
Copyright Holder. This restriction only applies to the primary font name as
|
|
||||||
presented to the users.
|
|
||||||
|
|
||||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
||||||
Software shall not be used to promote, endorse or advertise any
|
|
||||||
Modified Version, except to acknowledge the contribution(s) of the
|
|
||||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
||||||
permission.
|
|
||||||
|
|
||||||
5) The Font Software, modified or unmodified, in part or in whole,
|
|
||||||
must be distributed entirely under this license, and must not be
|
|
||||||
distributed under any other license. The requirement for fonts to
|
|
||||||
remain under this license does not apply to any document created
|
|
||||||
using the Font Software.
|
|
||||||
|
|
||||||
TERMINATION
|
|
||||||
This license becomes null and void if any of the above conditions are
|
|
||||||
not met.
|
|
||||||
|
|
||||||
DISCLAIMER
|
|
||||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
||||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
||||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
||||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
||||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
|
@ -1,48 +0,0 @@
|
||||||
# Nerd Fonts
|
|
||||||
|
|
||||||
This is an archived font from the Nerd Fonts release v3.2.1.
|
|
||||||
|
|
||||||
For more information see:
|
|
||||||
* https://github.com/ryanoasis/nerd-fonts/
|
|
||||||
* https://github.com/ryanoasis/nerd-fonts/releases/latest/
|
|
||||||
|
|
||||||
# Fira Code
|
|
||||||
|
|
||||||
**Fira Code** is a free monospaced font with programming ligatures.
|
|
||||||
|
|
||||||
For more information have a look at the upstream website: https://github.com/tonsky/FiraCode
|
|
||||||
|
|
||||||
Version: 6.2
|
|
||||||
|
|
||||||
## Which font?
|
|
||||||
|
|
||||||
### TL;DR
|
|
||||||
|
|
||||||
* Pick your font family:
|
|
||||||
* If you are limited to monospaced fonts (because of your terminal, etc) then pick a font with `Nerd Font Mono` (or `NFM`).
|
|
||||||
* If you want to have bigger icons (usually around 1.5 normal letters wide) pick a font without `Mono` i.e. `Nerd Font` (or `NF`). Most terminals support this, but ymmv.
|
|
||||||
* If you work in a proportional context (GUI elements or edit a presentation etc) pick a font with `Nerd Font Propo` (or `NFP`).
|
|
||||||
|
|
||||||
### Ligatures
|
|
||||||
|
|
||||||
Ligatures are generally preserved in the patched fonts.
|
|
||||||
Nerd Fonts `v2.0.0` had no ligatures in the `Nerd Font Mono` fonts, this has been dropped with `v2.1.0`.
|
|
||||||
If you have a ligature-aware terminal and don't want ligatures you can (usually) disable them in the terminal settings.
|
|
||||||
|
|
||||||
### Explanation
|
|
||||||
|
|
||||||
Once you narrow down your font choice of family (`Droid Sans`, `Inconsolata`, etc) and style (`bold`, `italic`, etc) you have 2 main choices:
|
|
||||||
|
|
||||||
#### `Option 1: Download already patched font`
|
|
||||||
|
|
||||||
* For a stable version download a font package from the [release page](https://github.com/ryanoasis/nerd-fonts/releases)
|
|
||||||
* Or download the development version from the folders here
|
|
||||||
|
|
||||||
#### `Option 2: Patch your own font`
|
|
||||||
|
|
||||||
* Patch your own variations with the various options provided by the font patcher (i.e. not include all symbols for smaller font size)
|
|
||||||
|
|
||||||
For more information see: [The FAQ](https://github.com/ryanoasis/nerd-fonts/wiki/FAQ-and-Troubleshooting#which-font)
|
|
||||||
|
|
||||||
[SIL-RFN]:http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web_fonts_and_RFNs#14cbfd4a
|
|
||||||
|
|
Binary file not shown.
|
@ -1,92 +0,0 @@
|
||||||
Copyright (C) 2018--2023 by Xiangdong Zeng <xdzeng96@gmail.com>
|
|
||||||
|
|
||||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
||||||
This license is copied below, and is also available with a FAQ at:
|
|
||||||
http://scripts.sil.org/OFL
|
|
||||||
|
|
||||||
-----------------------------------------------------------
|
|
||||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
||||||
-----------------------------------------------------------
|
|
||||||
|
|
||||||
PREAMBLE
|
|
||||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
||||||
development of collaborative font projects, to support the font creation
|
|
||||||
efforts of academic and linguistic communities, and to provide a free and
|
|
||||||
open framework in which fonts may be shared and improved in partnership
|
|
||||||
with others.
|
|
||||||
|
|
||||||
The OFL allows the licensed fonts to be used, studied, modified and
|
|
||||||
redistributed freely as long as they are not sold by themselves. The
|
|
||||||
fonts, including any derivative works, can be bundled, embedded,
|
|
||||||
redistributed and/or sold with any software provided that any reserved
|
|
||||||
names are not used by derivative works. The fonts and derivatives,
|
|
||||||
however, cannot be released under any other type of license. The
|
|
||||||
requirement for fonts to remain under this license does not apply
|
|
||||||
to any document created using the fonts or their derivatives.
|
|
||||||
|
|
||||||
DEFINITIONS
|
|
||||||
"Font Software" refers to the set of files released by the Copyright
|
|
||||||
Holder(s) under this license and clearly marked as such. This may
|
|
||||||
include source files, build scripts and documentation.
|
|
||||||
|
|
||||||
"Reserved Font Name" refers to any names specified as such after the
|
|
||||||
copyright statement(s).
|
|
||||||
|
|
||||||
"Original Version" refers to the collection of Font Software components as
|
|
||||||
distributed by the Copyright Holder(s).
|
|
||||||
|
|
||||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
||||||
or substituting -- in part or in whole -- any of the components of the
|
|
||||||
Original Version, by changing formats or by porting the Font Software to a
|
|
||||||
new environment.
|
|
||||||
|
|
||||||
"Author" refers to any designer, engineer, programmer, technical
|
|
||||||
writer or other person who contributed to the Font Software.
|
|
||||||
|
|
||||||
PERMISSION AND CONDITIONS
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
||||||
redistribute, and sell modified and unmodified copies of the Font
|
|
||||||
Software, subject to the following conditions:
|
|
||||||
|
|
||||||
1) Neither the Font Software nor any of its individual components,
|
|
||||||
in Original or Modified Versions, may be sold by itself.
|
|
||||||
|
|
||||||
2) Original or Modified Versions of the Font Software may be bundled,
|
|
||||||
redistributed and/or sold with any software, provided that each copy
|
|
||||||
contains the above copyright notice and this license. These can be
|
|
||||||
included either as stand-alone text files, human-readable headers or
|
|
||||||
in the appropriate machine-readable metadata fields within text or
|
|
||||||
binary files as long as those fields can be easily viewed by the user.
|
|
||||||
|
|
||||||
3) No Modified Version of the Font Software may use the Reserved Font
|
|
||||||
Name(s) unless explicit written permission is granted by the corresponding
|
|
||||||
Copyright Holder. This restriction only applies to the primary font name as
|
|
||||||
presented to the users.
|
|
||||||
|
|
||||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
||||||
Software shall not be used to promote, endorse or advertise any
|
|
||||||
Modified Version, except to acknowledge the contribution(s) of the
|
|
||||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
||||||
permission.
|
|
||||||
|
|
||||||
5) The Font Software, modified or unmodified, in part or in whole,
|
|
||||||
must be distributed entirely under this license, and must not be
|
|
||||||
distributed under any other license. The requirement for fonts to
|
|
||||||
remain under this license does not apply to any document created
|
|
||||||
using the Font Software.
|
|
||||||
|
|
||||||
TERMINATION
|
|
||||||
This license becomes null and void if any of the above conditions are
|
|
||||||
not met.
|
|
||||||
|
|
||||||
DISCLAIMER
|
|
||||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
||||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
||||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
||||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
||||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
pip install -r base16/requirements.txt
|
||||||
|
python base16/generator.py base16/abb.yml base16/template.tmTheme src/res/abb.tmTheme
|
42
run-ci.sh
42
run-ci.sh
|
@ -1,3 +1,43 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
typst compile template/main.typ --root . --font-path fonts example.pdf
|
function log() {
|
||||||
|
local timestamp=$(date +"%Y-%m-%d %H:%M:%S")
|
||||||
|
echo "$1 at $timestamp: $2"
|
||||||
|
}
|
||||||
|
|
||||||
|
function abort() {
|
||||||
|
log "ERROR" "test case $1 has failed"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function print-box() {
|
||||||
|
printf "\\n"
|
||||||
|
echo ".----------------------------------------------------------------."
|
||||||
|
printf "| %-62s |\\n" "$1"
|
||||||
|
echo "'----------------------------------------------------------------'"
|
||||||
|
}
|
||||||
|
|
||||||
|
function enter-section() {
|
||||||
|
print-box "$1"
|
||||||
|
|
||||||
|
log "INFO" "running task in section $1: $2"
|
||||||
|
log "INFO" "section output following..."
|
||||||
|
printf "\\n"
|
||||||
|
|
||||||
|
eval "$2"
|
||||||
|
if [ $? -neq $3 ]; then
|
||||||
|
abort "command: $2 failed in section: $1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "\\n"
|
||||||
|
log "INFO" "section $1 completed successfully"
|
||||||
|
}
|
||||||
|
|
||||||
|
enter-section "BUILD: ABB code theme" "./generate-theme.sh" 0
|
||||||
|
enter-section "Compiling template..." "typst compile template/main.typ --root . example.pdf" 0
|
||||||
|
enter-section "TEST: local template import" "typst compile tests/local-import/main.typ --root ." 0
|
||||||
|
enter-section "TEST: invalid config case 1" "typst compile tests/invalid-config/test-case-1.typ --root ." 1
|
||||||
|
enter-section "TEST: invalid config case 2" "compile tests/invalid-config/test-case-2.typ" 0
|
||||||
|
enter-section "TEST: invalid config case 3" "typst compile tests/invalid-config/test-case-3.typ --root ." 1
|
||||||
|
|
||||||
|
log "INFO" "CI completed successfully"
|
||||||
|
|
42
run-fmt.sh
42
run-fmt.sh
|
@ -1,42 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
function format() {
|
|
||||||
# format file
|
|
||||||
# typstyle --format $1
|
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
local wd=$(dirname $(realpath "$1"))
|
|
||||||
|
|
||||||
echo "processing file $1..."
|
|
||||||
typstyle "$2" "$1" > /dev/null
|
|
||||||
if [ $? -eq 1 ]; then
|
|
||||||
echo "failed format validation: $1"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
local imports=$(rg "#import \"([a-z0-9/\-]+\.typ)\"" -Nor '$1' "$1")
|
|
||||||
|
|
||||||
# format all included files
|
|
||||||
while IFS= read -r line; do
|
|
||||||
if [ -z "$line" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
format "$wd/$line" "$2"
|
|
||||||
done <<< "$imports"
|
|
||||||
}
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
"--format")
|
|
||||||
format "$2" "--inplace"
|
|
||||||
;;
|
|
||||||
"--check")
|
|
||||||
format "$2" "--check"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "unknown option: $1"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
13
shell.nix
13
shell.nix
|
@ -1,13 +0,0 @@
|
||||||
let
|
|
||||||
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.11";
|
|
||||||
pkgs = import nixpkgs { config = {}; overlays = []; };
|
|
||||||
in
|
|
||||||
|
|
||||||
pkgs.mkShellNoCC {
|
|
||||||
packages = with pkgs; [
|
|
||||||
python312
|
|
||||||
python312Packages.pyyaml
|
|
||||||
typst
|
|
||||||
typstyle
|
|
||||||
];
|
|
||||||
}
|
|
37
src/conf.typ
37
src/conf.typ
|
@ -18,28 +18,16 @@
|
||||||
// Adds preleminarry note page and watermark
|
// Adds preleminarry note page and watermark
|
||||||
draft: true,
|
draft: true,
|
||||||
// information about author(s)
|
// information about author(s)
|
||||||
university: (
|
author: (
|
||||||
program: "Informationtechnology",
|
|
||||||
faculty: "Technik",
|
|
||||||
name: "dualen Hochschule Baden-Württemberg",
|
|
||||||
campus: "Eppelheim"
|
|
||||||
),
|
|
||||||
authors: (
|
|
||||||
(
|
|
||||||
name: "Sven Vogel",
|
name: "Sven Vogel",
|
||||||
|
semester: 4,
|
||||||
|
program: "Informationtechnology",
|
||||||
course: "TINF19IT1",
|
course: "TINF19IT1",
|
||||||
|
faculty: "Technik",
|
||||||
|
university: "DHBW Mannheim",
|
||||||
company: "ABB AG",
|
company: "ABB AG",
|
||||||
supervisor: "Benny Goodman",
|
supervisor: "Benny Goodman",
|
||||||
matriculation-number: 123456789
|
matriculation-number: 123456789),
|
||||||
),
|
|
||||||
(
|
|
||||||
name: "Kurt Jammer",
|
|
||||||
course: "TINF24AI2",
|
|
||||||
company: "Siemens",
|
|
||||||
supervisor: "Henry Badman",
|
|
||||||
matriculation-number: 478568763
|
|
||||||
),
|
|
||||||
),
|
|
||||||
// information about thesis
|
// information about thesis
|
||||||
thesis: (
|
thesis: (
|
||||||
title: "Unofficial ABB/DHBW Typst template",
|
title: "Unofficial ABB/DHBW Typst template",
|
||||||
|
@ -59,8 +47,7 @@
|
||||||
header: (
|
header: (
|
||||||
content-padding: 1.5em,
|
content-padding: 1.5em,
|
||||||
underline-top-padding: 0pt,
|
underline-top-padding: 0pt,
|
||||||
logo-height: 5em,
|
logo-height: 3em),
|
||||||
logo-image: "res/ABB.svg"),
|
|
||||||
footer: (
|
footer: (
|
||||||
content-padding: 1.5em),
|
content-padding: 1.5em),
|
||||||
page: (
|
page: (
|
||||||
|
@ -72,14 +59,12 @@
|
||||||
bottom: 2.5cm)),
|
bottom: 2.5cm)),
|
||||||
text: (
|
text: (
|
||||||
size: 12pt,
|
size: 12pt,
|
||||||
font: "Fira Sans"),
|
font: "Open Sans"),
|
||||||
heading: (
|
heading: (
|
||||||
font: "Fira Sans"),
|
font: "Montserrat"),
|
||||||
code: (
|
code: (
|
||||||
theme: "res/abb.tmTheme",
|
theme: "res/abb.tmTheme",
|
||||||
font: "FiraCode Nerd Font",
|
font: "FiraCode Nerd Font",
|
||||||
lines: false,
|
|
||||||
size: 10pt,
|
|
||||||
tab-size: 4),
|
tab-size: 4),
|
||||||
link: (
|
link: (
|
||||||
color: ABB-GRAY-02)))
|
color: ABB-GRAY-02)))
|
||||||
|
@ -99,9 +84,7 @@
|
||||||
if key in update {
|
if key in update {
|
||||||
let update_val = update.at(key)
|
let update_val = update.at(key)
|
||||||
|
|
||||||
if type(val) == array {
|
if type(val) == dictionary and type(update_val) == dictionary {
|
||||||
// ignore checking arraay
|
|
||||||
} else if type(val) == dictionary and type(update_val) == dictionary {
|
|
||||||
base.insert(key, deep-insert-checked(val, update_val))
|
base.insert(key, deep-insert-checked(val, update_val))
|
||||||
} else if val == none or type(val) == type(update_val) {
|
} else if val == none or type(val) == type(update_val) {
|
||||||
base.insert(key, update_val)
|
base.insert(key, update_val)
|
||||||
|
|
|
@ -30,13 +30,11 @@ SOFTWARE.*/
|
||||||
#let __query_labels_with_key(loc, key, before: false) = {
|
#let __query_labels_with_key(loc, key, before: false) = {
|
||||||
if before {
|
if before {
|
||||||
query(
|
query(
|
||||||
selector(label(__glossary_label_prefix + key)).before(
|
selector(label(__glossary_label_prefix + key)).before(loc, inclusive: false),
|
||||||
loc,
|
loc,
|
||||||
inclusive: false,
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
query(selector(label(__glossary_label_prefix + key)))
|
query(selector(label(__glossary_label_prefix + key)), loc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +46,7 @@ SOFTWARE.*/
|
||||||
// Reference a term
|
// Reference a term
|
||||||
#let gls(key, suffix: none, long: none, display: none) = {
|
#let gls(key, suffix: none, long: none, display: none) = {
|
||||||
context {
|
context {
|
||||||
let __glossary_entries = __glossary_entries.final()
|
let __glossary_entries = __glossary_entries.final(here())
|
||||||
if key in __glossary_entries {
|
if key in __glossary_entries {
|
||||||
let entry = __glossary_entries.at(key)
|
let entry = __glossary_entries.at(key)
|
||||||
|
|
||||||
|
@ -58,18 +56,13 @@ SOFTWARE.*/
|
||||||
let entlong = entry.at("long", default: "")
|
let entlong = entry.at("long", default: "")
|
||||||
let textLink = if display != none {
|
let textLink = if display != none {
|
||||||
[#display]
|
[#display]
|
||||||
} else if (
|
} else if (is_first or long == true) and entlong != [] and entlong != "" and long != false {
|
||||||
is_first or long == true
|
|
||||||
) and entlong != [] and entlong != "" and long != false {
|
|
||||||
[#entlong (#entry.short#suffix)]
|
[#entlong (#entry.short#suffix)]
|
||||||
} else {
|
} else {
|
||||||
[#entry.short#suffix]
|
[#entry.short#suffix]
|
||||||
}
|
}
|
||||||
|
|
||||||
[#link(
|
[#link(label(entry.key), textLink)#label(__glossary_label_prefix + entry.key)]
|
||||||
label(entry.key),
|
|
||||||
textLink,
|
|
||||||
)#label(__glossary_label_prefix + entry.key)]
|
|
||||||
} else {
|
} else {
|
||||||
panic(__not-found-panic-error-msg(key))
|
panic(__not-found-panic-error-msg(key))
|
||||||
}
|
}
|
||||||
|
@ -87,10 +80,10 @@ SOFTWARE.*/
|
||||||
let gloss = __query_labels_with_key(here(), key, before: true)
|
let gloss = __query_labels_with_key(here(), key, before: true)
|
||||||
|
|
||||||
let is_first = gloss == ()
|
let is_first = gloss == ()
|
||||||
let entlongplural = entry.at("longplural", default: "")
|
let entlongplural = entry.at("longplural", default: "");
|
||||||
let entlong = if entlongplural == [] or entlongplural == "" {
|
let entlong = if entlongplural == [] or entlongplural == "" {
|
||||||
// if the entry long plural is not provided, then fallback to adding 's' suffix
|
// if the entry long plural is not provided, then fallback to adding 's' suffix
|
||||||
let entlong = entry.at("long", default: "")
|
let entlong = entry.at("long", default: "");
|
||||||
if entlong != [] and entlong != "" {
|
if entlong != [] and entlong != "" {
|
||||||
[#entlong#suffix]
|
[#entlong#suffix]
|
||||||
} else {
|
} else {
|
||||||
|
@ -100,25 +93,20 @@ SOFTWARE.*/
|
||||||
[#entlongplural]
|
[#entlongplural]
|
||||||
}
|
}
|
||||||
|
|
||||||
let entplural = entry.at("plural", default: "")
|
let entplural = entry.at("plural", default: "");
|
||||||
let short = if entplural == [] or entplural == "" {
|
let short = if entplural == [] or entplural == "" {
|
||||||
[#entry.short#suffix]
|
[#entry.short#suffix]
|
||||||
} else {
|
} else {
|
||||||
[#entplural]
|
[#entplural]
|
||||||
}
|
}
|
||||||
|
|
||||||
let textLink = if (
|
let textLink = if (is_first or long == true) and entlong != [] and entlong != "" and long != false {
|
||||||
is_first or long == true
|
|
||||||
) and entlong != [] and entlong != "" and long != false {
|
|
||||||
[#entlong (#short)]
|
[#entlong (#short)]
|
||||||
} else {
|
} else {
|
||||||
[#short]
|
[#short]
|
||||||
}
|
}
|
||||||
|
|
||||||
[#link(
|
[#link(label(entry.key), textLink)#label(__glossary_label_prefix + entry.key)]
|
||||||
label(entry.key),
|
|
||||||
textLink,
|
|
||||||
)#label(__glossary_label_prefix + entry.key)]
|
|
||||||
} else {
|
} else {
|
||||||
panic(__not-found-panic-error-msg(key))
|
panic(__not-found-panic-error-msg(key))
|
||||||
}
|
}
|
||||||
|
@ -128,9 +116,7 @@ SOFTWARE.*/
|
||||||
// show rule to make the references for glossarium
|
// show rule to make the references for glossarium
|
||||||
#let make-glossary(body) = {
|
#let make-glossary(body) = {
|
||||||
show ref: r => {
|
show ref: r => {
|
||||||
if r.element != none and r.element.func() == figure and r
|
if r.element != none and r.element.func() == figure and r.element.kind == __glossarium_figure {
|
||||||
.element
|
|
||||||
.kind == __glossarium_figure {
|
|
||||||
// call to the general citing function
|
// call to the general citing function
|
||||||
gls(str(r.target), suffix: r.citation.supplement)
|
gls(str(r.target), suffix: r.citation.supplement)
|
||||||
} else {
|
} else {
|
||||||
|
@ -184,72 +170,51 @@ SOFTWARE.*/
|
||||||
numbering: none,
|
numbering: none,
|
||||||
caption: {
|
caption: {
|
||||||
context {
|
context {
|
||||||
let key = if entry.key.ends-with("__glossary_entry") {
|
let term_references = __query_labels_with_key(here(), entry.key)
|
||||||
entry.key.replace("__glossary_entry", "")
|
if term_references.len() != 0 or show-all {
|
||||||
} else {
|
let desc = entry.at("desc", default: "")
|
||||||
entry.key
|
let long = entry.at("long", default: "")
|
||||||
|
let hasLong = long != "" and long != []
|
||||||
|
let hasDesc = desc != "" and desc != []
|
||||||
|
grid(
|
||||||
|
columns: 2,
|
||||||
|
column-gutter: 1em,
|
||||||
|
text(weight: "bold", entry.short),
|
||||||
|
{
|
||||||
|
if hasLong {
|
||||||
|
text(weight: "bold", entry.long)
|
||||||
}
|
}
|
||||||
|
if hasLong and hasDesc [:]
|
||||||
let term_references = __query_labels_with_key(here(), key)
|
if hasDesc [ #desc ] else [. ]
|
||||||
if term_references.len() != 0 or show-all [
|
if disable-back-references != true {
|
||||||
#let desc = entry.at("desc", default: "")
|
term_references.map(x => x.location()).sorted(key: x => x.page()).fold(
|
||||||
#let long = entry.at("long", default: "")
|
|
||||||
#let hasLong = long != "" and long != []
|
|
||||||
#let hasDesc = desc != "" and desc != []
|
|
||||||
|
|
||||||
#block(
|
|
||||||
below: 1.5em,
|
|
||||||
width: 100%,
|
|
||||||
par(hanging-indent: 1em, align(left)[
|
|
||||||
#text(weight: "bold", entry.short)
|
|
||||||
#if hasLong and hasDesc [
|
|
||||||
(#text(entry.long))
|
|
||||||
] else if hasLong {
|
|
||||||
text(entry.long)
|
|
||||||
}
|
|
||||||
#if hasDesc [ #sym.dash.en ]
|
|
||||||
#if hasDesc [ #desc ]
|
|
||||||
#if disable-back-references != true {
|
|
||||||
term_references
|
|
||||||
.map(x => x.location())
|
|
||||||
.sorted(key: x => x.page())
|
|
||||||
.fold(
|
|
||||||
(values: (), pages: ()),
|
(values: (), pages: ()),
|
||||||
((values, pages), x) => if pages.contains(
|
((values, pages), x) => if pages.contains(x.page()) {
|
||||||
x.page(),
|
|
||||||
) {
|
|
||||||
(values: values, pages: pages)
|
(values: values, pages: pages)
|
||||||
} else {
|
} else {
|
||||||
values.push(x)
|
values.push(x)
|
||||||
pages.push(x.page())
|
pages.push(x.page())
|
||||||
(values: values, pages: pages)
|
(values: values, pages: pages)
|
||||||
},
|
},
|
||||||
)
|
).values.map(x => {
|
||||||
.values
|
let page-numbering = x.page-numbering();
|
||||||
.map(x => {
|
|
||||||
let page-numbering = x.page-numbering()
|
|
||||||
if page-numbering == none {
|
if page-numbering == none {
|
||||||
page-numbering = "1"
|
page-numbering = "1"
|
||||||
}
|
}
|
||||||
link(x)[#numbering(
|
link(x)[#numbering(page-numbering, ..counter(page).at(x))]
|
||||||
page-numbering,
|
}
|
||||||
..counter(page).at(x),
|
).join(", ")
|
||||||
)]
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.join(", ")
|
|
||||||
}
|
}
|
||||||
]),
|
|
||||||
)
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
)[] #label(entry.key)
|
)[] #label(entry.key)
|
||||||
|
#parbreak()
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if enable-group-pagebreak {
|
if enable-group-pagebreak { pagebreak(weak: true) }
|
||||||
pagebreak(weak: true)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -7,94 +7,68 @@
|
||||||
// Edited: 08.07.2024
|
// Edited: 08.07.2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#let glossary(entries, config) = {
|
#let glossary(entries) = {
|
||||||
|
|
||||||
assert(
|
assert(
|
||||||
type(entries) == dictionary,
|
type(entries) == dictionary,
|
||||||
message: "The glossary is not a dictionary",
|
message: "The glossary is not a dictionary",
|
||||||
)
|
)
|
||||||
|
|
||||||
let processed_glossary = (:)
|
|
||||||
|
|
||||||
for (k, v) in entries.pairs() {
|
for (k, v) in entries.pairs() {
|
||||||
assert(
|
assert(
|
||||||
type(v) == dictionary,
|
type(v) == dictionary,
|
||||||
message: "The glossary entry `" + k + "` is not a dictionary",
|
message: "The glossary entry `" + k + "` is not a dictionary")
|
||||||
)
|
|
||||||
|
|
||||||
for key in v.keys() {
|
for key in v.keys() {
|
||||||
assert(
|
assert(
|
||||||
key in ("short", "long", "desc", "group"),
|
key in ("short", "long", "desc", "group"),
|
||||||
message: "Found unexpected key `" + key + "` in glossary entry `" + k,
|
message: "Found unexpected key `" + key + "` in glossary entry `" + k)
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(
|
assert(
|
||||||
type(v.short) == str,
|
type(v.short) == str,
|
||||||
message: "The short form of glossary entry `" + k + "` is not a string",
|
message: "The short form of glossary entry `" + k + "` is not a string")
|
||||||
)
|
|
||||||
|
|
||||||
if "long" in v {
|
if "long" in v {
|
||||||
assert(
|
assert(
|
||||||
type(v.long) == str,
|
type(v.long) == str,
|
||||||
message: "The long form of glossary entry `" + k + "` is not a string",
|
message: "The long form of glossary entry `" + k + "` is not a string")
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if "desc" in v {
|
if "desc" in v {
|
||||||
assert(
|
assert(
|
||||||
type(v.desc) == str,
|
type(v.desc) == str,
|
||||||
message: "The description of glossary entry `" + k + "` is not a string",
|
message: "The description of glossary entry `" + k + "` is not a string")
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if "group" in v {
|
if "group" in v {
|
||||||
assert(
|
assert(
|
||||||
type(v.group) == str,
|
type(v.group) == str,
|
||||||
message: "The optional group of glossary entry `" + k + "` is not a string",
|
message: "The optional group of glossary entry `" + k + "` is not a string")
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
let acronym_group = if config.lang == "de" {
|
let group = if "long" in v {
|
||||||
"Abkürzungsverzeichnis"
|
if (context text.lang) == "de" {
|
||||||
|
"Akronyme"
|
||||||
} else {
|
} else {
|
||||||
"List of Acronyms"
|
"Acronyms"
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
let glossary_group = if config.lang == "de" {
|
if (context text.lang) == "de" {
|
||||||
"Begriffe"
|
"Begriffe"
|
||||||
} else {
|
} else {
|
||||||
"Glossary"
|
"Terms"
|
||||||
}
|
|
||||||
|
|
||||||
let group = if "long" in v {
|
|
||||||
acronym_group
|
|
||||||
} else {
|
|
||||||
glossary_group
|
|
||||||
}
|
|
||||||
|
|
||||||
// create dedicated entries for
|
|
||||||
// acronym and glossary
|
|
||||||
if "long" in v and "desc" in v {
|
|
||||||
processed_glossary.insert(
|
|
||||||
k,
|
|
||||||
(short: v.short, long: v.long, group: acronym_group),
|
|
||||||
)
|
|
||||||
processed_glossary.insert(
|
|
||||||
k + "__glossary_entry",
|
|
||||||
(short: v.short, desc: v.desc, long: v.long, group: glossary_group),
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
processed_glossary.insert(k, v)
|
|
||||||
processed_glossary.at(k).group = group
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return processed_glossary.pairs().map(((key, entry)) => (
|
entries.at(k).group = group
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return entries.pairs().map(((key, entry)) => (
|
||||||
key: key,
|
key: key,
|
||||||
short: entry.short,
|
short: eval(entry.short, mode: "markup"),
|
||||||
long: eval(entry.at("long", default: ""), mode: "markup"),
|
long: eval(entry.at("long", default: ""), mode: "markup"),
|
||||||
desc: eval(entry.at("desc", default: ""), mode: "markup"),
|
desc: eval(entry.at("desc", default: ""), mode: "markup"),
|
||||||
group: entry.at("group", default: ""),
|
group: entry.at("group", default: "")
|
||||||
))
|
))
|
||||||
}
|
}
|
53
src/lib.typ
53
src/lib.typ
|
@ -7,15 +7,13 @@
|
||||||
// Edited: 27.06.2024
|
// Edited: 27.06.2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#import "conf.typ": validate-config, default-config
|
#import "conf.typ": validate-config
|
||||||
#import "branding.typ": *
|
#import "branding.typ": *
|
||||||
#import "style.typ": global_styled_doc, content_styled, end_styled
|
#import "style.typ": global_styled_doc, content_styled, end_styled
|
||||||
#import "glossary.typ": glossary
|
#import "glossary.typ": glossary
|
||||||
#import "pages/titlepage.typ": new_title_page
|
#import "pages/titlepage.typ": new_title_page
|
||||||
#import "pages/declaration-of-authorship.typ": new_declaration_of_authorship
|
#import "pages/declaration-of-authorship.typ": new_declaration_of_authorship
|
||||||
#import "pages/confidentiality-statement.typ": (
|
#import "pages/confidentiality-statement.typ": new_confidentiality_statement_page
|
||||||
new_confidentiality_statement_page,
|
|
||||||
)
|
|
||||||
#import "pages/prerelease-note.typ": new_prerelease_note
|
#import "pages/prerelease-note.typ": new_prerelease_note
|
||||||
#import "pages/outline.typ": new_outline
|
#import "pages/outline.typ": new_outline
|
||||||
#import "pages/abstract.typ": new_abstract
|
#import "pages/abstract.typ": new_abstract
|
||||||
|
@ -26,41 +24,6 @@
|
||||||
[#pagebreak()]
|
[#pagebreak()]
|
||||||
}
|
}
|
||||||
|
|
||||||
#let inline-color(color, content) = {
|
|
||||||
box(
|
|
||||||
stroke: 1pt + ABB-GRAY-05,
|
|
||||||
radius: 2pt,
|
|
||||||
inset: (left: 2pt, right: 2pt),
|
|
||||||
outset: (top: 4pt, bottom: 4pt),
|
|
||||||
fill: ABB-GRAY-06,
|
|
||||||
[#box(
|
|
||||||
fill: rgb(color),
|
|
||||||
radius: 2pt,
|
|
||||||
inset: 0pt,
|
|
||||||
width: 0.75em,
|
|
||||||
height: 0.75em,
|
|
||||||
) #text(
|
|
||||||
font: default-config.style.code.font,
|
|
||||||
size: default-config.style.code.size,
|
|
||||||
content,
|
|
||||||
)],
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
#let url(label, content) = {
|
|
||||||
link(label)[#underline(
|
|
||||||
offset: 2pt,
|
|
||||||
stroke: 0.5pt + blue,
|
|
||||||
text(fill: blue)[
|
|
||||||
#content
|
|
||||||
#let domain = label.find(regex("\w+\.\w+(?:\.\w+)*"))
|
|
||||||
#if domain.len() > 0 [
|
|
||||||
(#domain)
|
|
||||||
]
|
|
||||||
],
|
|
||||||
)]
|
|
||||||
}
|
|
||||||
|
|
||||||
// start of template pages and styles
|
// start of template pages and styles
|
||||||
#let dhbw-template(config, body) = [
|
#let dhbw-template(config, body) = [
|
||||||
#let config = validate-config(config)
|
#let config = validate-config(config)
|
||||||
|
@ -71,16 +34,14 @@
|
||||||
|
|
||||||
// set document properties
|
// set document properties
|
||||||
#set document(
|
#set document(
|
||||||
// author: config.author.name,
|
author: config.author.name,
|
||||||
keywords: config.thesis.keywords,
|
keywords: config.thesis.keywords,
|
||||||
title: config.thesis.title,
|
title: config.thesis.title)
|
||||||
)
|
|
||||||
|
|
||||||
// configure text locale
|
// configure text locale
|
||||||
#set text(
|
#set text(
|
||||||
lang: config.lang,
|
lang: config.lang,
|
||||||
region: config.region,
|
region: config.region)
|
||||||
)
|
|
||||||
|
|
||||||
// preppend title page
|
// preppend title page
|
||||||
#new_title_page(config)
|
#new_title_page(config)
|
||||||
|
@ -105,11 +66,9 @@
|
||||||
|
|
||||||
#if "glossary" in config.thesis and config.thesis.glossary != none {
|
#if "glossary" in config.thesis and config.thesis.glossary != none {
|
||||||
print-glossary(
|
print-glossary(
|
||||||
show-all: false,
|
|
||||||
disable-back-references: true,
|
disable-back-references: true,
|
||||||
enable-group-pagebreak: true,
|
enable-group-pagebreak: true,
|
||||||
glossary(config.thesis.glossary, config),
|
glossary(config.thesis.glossary))
|
||||||
)
|
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,7 @@
|
||||||
// Edited: 28.06.2024
|
// Edited: 28.06.2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#let new_abstract(config) = (
|
#let new_abstract(config) = context {
|
||||||
context {
|
|
||||||
|
|
||||||
set align(center + horizon)
|
set align(center + horizon)
|
||||||
|
|
||||||
|
@ -26,4 +25,3 @@
|
||||||
heading("Abstract")
|
heading("Abstract")
|
||||||
config.thesis.abstract
|
config.thesis.abstract
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
|
@ -6,8 +6,7 @@
|
||||||
// Edited: 28.06.2024
|
// Edited: 28.06.2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#let show-appendix(config: dictionary) = (
|
#let show-appendix(config: dictionary) = context {
|
||||||
context {
|
|
||||||
counter(heading).update(0)
|
counter(heading).update(0)
|
||||||
|
|
||||||
let title = if text.lang == "en" {
|
let title = if text.lang == "en" {
|
||||||
|
@ -43,4 +42,3 @@
|
||||||
config.thesis.appendices
|
config.thesis.appendices
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
|
@ -6,21 +6,21 @@
|
||||||
// Edited: 28.06.2024
|
// Edited: 28.06.2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#let new_confidentiality_statement_page(config) = (
|
#let new_confidentiality_statement_page(config) = context {
|
||||||
context {
|
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
|
|
||||||
let thesis = config.thesis
|
let thesis = config.thesis
|
||||||
|
let author = config.author
|
||||||
|
|
||||||
if text.lang == "de" [
|
if text.lang == "de" [
|
||||||
#heading(level: 1, "Sperrvermerk")
|
#heading(level: 1, "Sperrvermerk", supplement: [special])
|
||||||
] else if text.lang == "en" [
|
] else if text.lang == "en" [
|
||||||
#heading(level: 1, "Confidentiality Statement")
|
#heading(level: 1, "Confidentiality Statement", supplement: [special])
|
||||||
]
|
]
|
||||||
|
|
||||||
if text.lang == "de" [
|
if text.lang == "de" [
|
||||||
Der Inhalt dieser Arbeit mit dem Thema
|
Der Inhalt der dieser Arbeit mit dem Thema
|
||||||
] else if text.lang == "en" [
|
] else if text.lang == "en" [
|
||||||
The content of this work with the topic
|
The content of this work with the topic
|
||||||
]
|
]
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
set par(justify: true)
|
set par(justify: true)
|
||||||
|
|
||||||
if text.lang == "de" [
|
if text.lang == "de" [
|
||||||
darf weder als Ganzes noch in Auszügen Personen außerhalb des Prüfungsprozesses und des Evaluationsverfahrens 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.
|
||||||
]
|
]
|
||||||
|
@ -60,4 +60,3 @@
|
||||||
align(left, if text.lang == "de" [ Ort, Datum ] else if text.lang == "en" [ Place, Date ] else { panic("no translation for language: ", text.lang) }),
|
align(left, if text.lang == "de" [ Ort, Datum ] else if text.lang == "en" [ Place, Date ] else { panic("no translation for language: ", text.lang) }),
|
||||||
align(left, if text.lang == "de" [ Unterschrift ] else if text.lang == "en" [ Signature ] else { panic("no translation for language: ", text.lang) }))
|
align(left, if text.lang == "de" [ Unterschrift ] else if text.lang == "en" [ Signature ] else { panic("no translation for language: ", text.lang) }))
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
// Edited: 28.06.2024
|
// Edited: 28.06.2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#let new_declaration_of_authorship(config) = (
|
#let new_declaration_of_authorship(config) = context {
|
||||||
context {
|
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
|
|
||||||
let thesis = config.thesis
|
let thesis = config.thesis
|
||||||
|
let author = config.author
|
||||||
|
|
||||||
if text.lang == "de" [
|
if text.lang == "de" [
|
||||||
#heading("Selbständigkeitserklärung")
|
#heading("Selbständigkeitserklärung")
|
||||||
|
@ -62,4 +62,3 @@
|
||||||
align(left, if text.lang == "de" [ Ort, Datum ] else if text.lang == "en" [ Place, Date ] else { panic("no translation for language: ", text.lang) }),
|
align(left, if text.lang == "de" [ Ort, Datum ] else if text.lang == "en" [ Place, Date ] else { panic("no translation for language: ", text.lang) }),
|
||||||
align(left, if text.lang == "de" [ Unterschrift ] else if text.lang == "en" [ Signature ] else { panic("no translation for language: ", text.lang) }))
|
align(left, if text.lang == "de" [ Unterschrift ] else if text.lang == "en" [ Signature ] else { panic("no translation for language: ", text.lang) }))
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
|
@ -10,34 +10,21 @@
|
||||||
// with a specific title and filter by a specifc kind of figure
|
// with a specific title and filter by a specifc kind of figure
|
||||||
// can optionally insert a pagebreak after the outline
|
// can optionally insert a pagebreak after the outline
|
||||||
// NOTE: will not render in case the listing is empty
|
// NOTE: will not render in case the listing is empty
|
||||||
#let render_filtered_outline(title: str, kind: selector) = (
|
#let render_filtered_outline(title: str, kind: selector) = context {
|
||||||
context {
|
|
||||||
|
|
||||||
let elems = query(figure.where(kind: kind))
|
let elems = query(figure.where(kind: kind), here())
|
||||||
let count = elems.len()
|
let count = elems.len()
|
||||||
|
|
||||||
show outline.entry: it => {
|
|
||||||
link(it.element.location())[
|
|
||||||
#v(12pt, weak: true)
|
|
||||||
#text(weight: "regular", it.body)
|
|
||||||
#box(width: 1fr, it.fill)
|
|
||||||
#[ #it.page]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
// only show outline if there is something to list
|
// only show outline if there is something to list
|
||||||
if count > 0 {
|
if count > 0 {
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
outline(
|
outline(
|
||||||
title: title,
|
title: title,
|
||||||
target: figure.where(kind: kind),
|
target: figure.where(kind: kind))
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
||||||
#let render_figures_outline() = (
|
#let render_figures_outline() = context {
|
||||||
context {
|
|
||||||
let title = if (text.lang == "de") {
|
let title = if (text.lang == "de") {
|
||||||
"Abbildungsverzeichnis"
|
"Abbildungsverzeichnis"
|
||||||
} else if text.lang == "en" {
|
} else if text.lang == "en" {
|
||||||
|
@ -46,10 +33,8 @@
|
||||||
|
|
||||||
render_filtered_outline(title: title, kind: image)
|
render_filtered_outline(title: title, kind: image)
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
||||||
#let render_table_outline() = (
|
#let render_table_outline() = context {
|
||||||
context {
|
|
||||||
let title = if (text.lang == "de") {
|
let title = if (text.lang == "de") {
|
||||||
"Tabellenverzeichnis"
|
"Tabellenverzeichnis"
|
||||||
} else if text.lang == "en" {
|
} else if text.lang == "en" {
|
||||||
|
@ -58,10 +43,8 @@
|
||||||
|
|
||||||
render_filtered_outline(title: title, kind: table)
|
render_filtered_outline(title: title, kind: table)
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
||||||
#let render_raw_outline() = (
|
#let render_raw_outline() = context {
|
||||||
context {
|
|
||||||
let title = if (text.lang == "de") {
|
let title = if (text.lang == "de") {
|
||||||
"Quelltextverzeichnis"
|
"Quelltextverzeichnis"
|
||||||
} else if text.lang == "en" {
|
} else if text.lang == "en" {
|
||||||
|
@ -70,33 +53,22 @@
|
||||||
|
|
||||||
render_filtered_outline(title: title, kind: raw)
|
render_filtered_outline(title: title, kind: raw)
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
||||||
#let render_heading_outline() = (
|
#let render_heading_outline() = context {
|
||||||
context {
|
|
||||||
let title = if (text.lang == "de") {
|
let title = if (text.lang == "de") {
|
||||||
"Inhaltsverzeichnis"
|
"Inhaltsverzeichnis"
|
||||||
} else if text.lang == "en" {
|
} else if text.lang == "en" {
|
||||||
"Table of Contents"
|
"Table of Contents"
|
||||||
}
|
}
|
||||||
|
|
||||||
let header-supplement = if (text.lang == "de") {
|
|
||||||
"Kapitel"
|
|
||||||
} else {
|
|
||||||
"chapter"
|
|
||||||
}
|
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
outline(
|
outline(
|
||||||
target: heading.where(supplement: [#header-supplement]),
|
target: heading.where(supplement: [chapter]),
|
||||||
title: title,
|
title: title,
|
||||||
indent: auto,
|
indent: auto)
|
||||||
)
|
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
||||||
#let render_appendix_outline() = (
|
#let render_appendix_outline() = context {
|
||||||
context {
|
|
||||||
let supplement = if text.lang == "en" {
|
let supplement = if text.lang == "en" {
|
||||||
[Appendix]
|
[Appendix]
|
||||||
} else {
|
} else {
|
||||||
|
@ -114,16 +86,16 @@
|
||||||
outline(
|
outline(
|
||||||
target: heading.where(supplement: supplement),
|
target: heading.where(supplement: supplement),
|
||||||
title: title,
|
title: title,
|
||||||
indent: auto,
|
indent: auto)
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
||||||
#let new_outline() = {
|
#let new_outline() = {
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
|
|
||||||
show outline.entry.where(level: 1): it => {
|
show outline.entry.where(
|
||||||
|
level: 1,
|
||||||
|
): it => {
|
||||||
v(1.5em, weak: true)
|
v(1.5em, weak: true)
|
||||||
strong(it)
|
strong(it)
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,7 @@
|
||||||
// Edited: 28.06.2024
|
// Edited: 28.06.2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#let new_prerelease_note(config) = (
|
#let new_prerelease_note(config) = context {
|
||||||
context {
|
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
|
|
||||||
|
@ -55,4 +54,3 @@
|
||||||
h(1em)
|
h(1em)
|
||||||
[#author.name, #datetime.today().display()]
|
[#author.name, #datetime.today().display()]
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
|
@ -6,59 +6,41 @@
|
||||||
// Edited: 28.06.2024
|
// Edited: 28.06.2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#let new_title_page(config) = (
|
#let new_title_page(config) = context [
|
||||||
context [
|
|
||||||
|
|
||||||
#let thesis = config.thesis
|
#let thesis = config.thesis
|
||||||
|
#let author = config.author
|
||||||
// logo of ABB and DHBW
|
|
||||||
#v(-config.style.header.content-padding)
|
|
||||||
#grid(
|
|
||||||
// set width of columns
|
|
||||||
// we need two, so make both half the page width
|
|
||||||
columns: (50%, 50%),
|
|
||||||
// left align logo of ABB
|
|
||||||
if config.style.header.logo-image == none {
|
|
||||||
// error
|
|
||||||
} else if config.style.header.logo-image.len() > 0 {
|
|
||||||
align(left, image(config.style.header.logo-image, height: config.style.header.logo-height))
|
|
||||||
} else {
|
|
||||||
align(left, image("../res/DHBW.svg", height: config.style.header.logo-height))
|
|
||||||
},
|
|
||||||
// right align logo of DHBW
|
|
||||||
if config.style.header.logo-image.len() > 0 {
|
|
||||||
align(right, image("../res/DHBW.svg", height: config.style.header.logo-height))
|
|
||||||
})
|
|
||||||
|
|
||||||
#set align(center)
|
#set align(center)
|
||||||
|
|
||||||
// title
|
// title
|
||||||
#v(2cm)
|
#v(2cm)
|
||||||
#par(justify: false, leading: 1.5em)[
|
#text(size: 2em, weight: "semibold", thesis.title)
|
||||||
#text(size: 2em, weight: "bold", hyphenate: false, thesis.title)
|
|
||||||
#linebreak()
|
|
||||||
// subtitle
|
|
||||||
#text(size: 2em, weight: "light", thesis.subtitle)
|
|
||||||
]
|
|
||||||
|
|
||||||
#set align(center + horizon)
|
// subtitle
|
||||||
|
#text(size: 1.5em, thesis.subtitle)
|
||||||
|
|
||||||
// type of paper
|
// type of paper
|
||||||
#text(size: 1.5em, weight: "medium", thesis.kind)
|
#v(1cm)
|
||||||
|
#text(size: 1.5em, weight: "bold", thesis.kind)
|
||||||
|
|
||||||
// faculty
|
// faculty
|
||||||
#pad()[
|
#pad(top: 0.5cm)[
|
||||||
#if text.lang == "de" [
|
#if text.lang == "de" [
|
||||||
aus dem Studiengang #config.university.program | #config.university.faculty
|
Praxisphase des #author.semester Studienjahrs an der Fakultät für #author.faculty
|
||||||
|
#linebreak()
|
||||||
|
im Studiengang #author.program
|
||||||
] else if text.lang == "en" [
|
] else if text.lang == "en" [
|
||||||
from the course of studies #config.university.program | #config.university.faculty
|
Practical phase of the #author.semester academic year at the Faculty of #author.faculty
|
||||||
|
#linebreak()
|
||||||
|
in the degree program #author.program
|
||||||
] else [
|
] else [
|
||||||
#context panic("no translation for language: ", text.lang)
|
#context panic("no translation for language: ", text.lang)
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
// university
|
// university
|
||||||
#pad()[
|
#pad(top: 0.5cm)[
|
||||||
#if text.lang == "de" [
|
#if text.lang == "de" [
|
||||||
an der
|
an der
|
||||||
] else if text.lang == "en" [
|
] else if text.lang == "en" [
|
||||||
|
@ -66,89 +48,67 @@
|
||||||
] else [
|
] else [
|
||||||
#context panic("no translation for language: ", text.lang)
|
#context panic("no translation for language: ", text.lang)
|
||||||
]
|
]
|
||||||
#config.university.name
|
|
||||||
#linebreak()
|
#linebreak()
|
||||||
#config.university.campus
|
#author.university
|
||||||
]
|
]
|
||||||
|
|
||||||
#pad(top: 1em)[
|
#set align(horizon + left)
|
||||||
#let names = ()
|
|
||||||
#for author in config.authors {
|
|
||||||
names.push(author.name)
|
|
||||||
}
|
|
||||||
#if text.lang == "de" [
|
|
||||||
von
|
|
||||||
] else if text.lang == "en" [
|
|
||||||
by
|
|
||||||
] else [
|
|
||||||
#context panic("no translation for language: ", text.lang)
|
|
||||||
]
|
|
||||||
#set text(size: 16pt)
|
|
||||||
#grid(columns: 1, row-gutter: 1em, ..names)
|
|
||||||
]
|
|
||||||
|
|
||||||
#pad(top: 1em)[
|
|
||||||
#thesis.timeframe
|
|
||||||
]
|
|
||||||
|
|
||||||
#set align(bottom + left)
|
|
||||||
|
|
||||||
#if text.lang == "de" [
|
#if text.lang == "de" [
|
||||||
#grid(
|
#table(
|
||||||
columns: 2,
|
columns: 2,
|
||||||
column-gutter: 1cm,
|
column-gutter: 1cm,
|
||||||
row-gutter: 0.5cm,
|
align: left,
|
||||||
align: top + left,
|
|
||||||
stroke: none,
|
stroke: none,
|
||||||
[Matrikelnummer, Kurs:],
|
|
||||||
par(
|
|
||||||
leading: 0.5em,
|
|
||||||
for author in config.authors {
|
|
||||||
str(author.matriculation-number) + ", " + author.course
|
|
||||||
linebreak()
|
|
||||||
},
|
|
||||||
),
|
|
||||||
|
|
||||||
[Betrieb, Betreuer:],
|
[*Verfasser:*],
|
||||||
par(
|
author.name,
|
||||||
leading: 0.5em,
|
|
||||||
for author in config.authors {
|
[*Bearbeitungszeitraum:*],
|
||||||
author.company + ", " + author.supervisor
|
thesis.timeframe,
|
||||||
linebreak()
|
|
||||||
},
|
[*Matrikelnummer, Kurs:*],
|
||||||
),
|
str(author.matriculation-number) + ", " + author.course,
|
||||||
|
|
||||||
|
[*Ausbildungsbetrieb:*],
|
||||||
|
author.company,
|
||||||
|
|
||||||
|
[*Betrieblicher Betreuer:*],
|
||||||
|
author.supervisor,
|
||||||
|
|
||||||
|
[*Abgabedatum:*],
|
||||||
|
thesis.submission-date
|
||||||
)
|
)
|
||||||
] else if text.lang == "en" [
|
] else if text.lang == "en" [
|
||||||
#grid(
|
#table(
|
||||||
columns: 2,
|
columns: 2,
|
||||||
column-gutter: 1cm,
|
column-gutter: 1cm,
|
||||||
row-gutter: 0.5cm,
|
align: left,
|
||||||
align: top + left,
|
|
||||||
stroke: none,
|
stroke: none,
|
||||||
[Student ID, Course:],
|
|
||||||
par(
|
|
||||||
leading: 0.5em,
|
|
||||||
for author in config.authors {
|
|
||||||
str(author.matriculation-number) + ", " + author.course
|
|
||||||
linebreak()
|
|
||||||
},
|
|
||||||
),
|
|
||||||
|
|
||||||
[Company, Supervisor:],
|
[*Author:*],
|
||||||
par(
|
author.name,
|
||||||
leading: 0.5em,
|
|
||||||
for author in config.authors {
|
[*Editing period:*],
|
||||||
author.company + ", " + author.supervisor
|
thesis.timeframe,
|
||||||
linebreak()
|
|
||||||
},
|
[*Matriculation number, course:*],
|
||||||
),
|
str(author.matriculation-number) + ", " + author.course,
|
||||||
|
|
||||||
|
[*Training company:*],
|
||||||
|
author.company,
|
||||||
|
|
||||||
|
[*Company supervisor:*],
|
||||||
|
author.supervisor,
|
||||||
|
|
||||||
|
[*Submission date:*],
|
||||||
|
thesis.submission-date
|
||||||
)
|
)
|
||||||
] else [
|
] else [
|
||||||
#context panic("no translation for language: ", text.lang)
|
#context panic("no translation for language: ", text.lang)
|
||||||
]
|
]
|
||||||
|
|
||||||
#align(
|
#align(bottom,
|
||||||
bottom,
|
|
||||||
grid(
|
grid(
|
||||||
// set width of columns
|
// set width of columns
|
||||||
// we need two, so make both half the page width
|
// we need two, so make both half the page width
|
||||||
|
@ -161,9 +121,7 @@
|
||||||
#context panic("no translation for language: ", text.lang)
|
#context panic("no translation for language: ", text.lang)
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
align(right, {line(length: 6cm)})),
|
align(right, {line(length: 6cm)})))
|
||||||
)
|
|
||||||
|
|
||||||
#counter(page).update(0)
|
#counter(page).update(0)
|
||||||
]
|
]
|
||||||
)
|
|
||||||
|
|
184
src/style.typ
184
src/style.typ
|
@ -12,13 +12,7 @@
|
||||||
#let watermark-color = luma(50%).transparentize(70%)
|
#let watermark-color = luma(50%).transparentize(70%)
|
||||||
|
|
||||||
#let watermark-pattern = pattern(size: (5pt, 5pt))[
|
#let watermark-pattern = pattern(size: (5pt, 5pt))[
|
||||||
#place(
|
#place(line(start: (50%, 0%), end: (50%, 100%), stroke: (paint: watermark-color, thickness: 3pt)))
|
||||||
line(
|
|
||||||
start: (50%, 0%),
|
|
||||||
end: (50%, 100%),
|
|
||||||
stroke: (paint: watermark-color, thickness: 3pt),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
]
|
]
|
||||||
|
|
||||||
#let watermark(config) = if config.draft {
|
#let watermark(config) = if config.draft {
|
||||||
|
@ -26,8 +20,7 @@
|
||||||
#rect(
|
#rect(
|
||||||
radius: 1em,
|
radius: 1em,
|
||||||
inset: 1em,
|
inset: 1em,
|
||||||
stroke: watermark-color,
|
stroke: watermark-color)[
|
||||||
)[
|
|
||||||
#text(size: 4em, weight: "bold", fill: watermark-pattern, "DRAFT")
|
#text(size: 4em, weight: "bold", fill: watermark-pattern, "DRAFT")
|
||||||
#linebreak()
|
#linebreak()
|
||||||
#text(size: 1.25em, weight: "bold", fill: watermark-color)[
|
#text(size: 1.25em, weight: "bold", fill: watermark-color)[
|
||||||
|
@ -35,11 +28,7 @@
|
||||||
#linebreak()
|
#linebreak()
|
||||||
document version.
|
document version.
|
||||||
#linebreak()
|
#linebreak()
|
||||||
#text(
|
#text(size: 0.75em, "Further usage without the authors consent is not permitted.")]]]}
|
||||||
size: 0.75em,
|
|
||||||
"Further usage without the authors consent is not permitted.",
|
|
||||||
)]]]
|
|
||||||
}
|
|
||||||
|
|
||||||
#let numberingH(c)={
|
#let numberingH(c)={
|
||||||
return numbering(c.numbering,..counter(heading).at(c.location()))
|
return numbering(c.numbering,..counter(heading).at(c.location()))
|
||||||
|
@ -70,24 +59,15 @@
|
||||||
hyphenate: true,
|
hyphenate: true,
|
||||||
dir: ltr,
|
dir: ltr,
|
||||||
font: style.text.font,
|
font: style.text.font,
|
||||||
fill: ABB-BLACK,
|
fill: ABB-BLACK)
|
||||||
)
|
|
||||||
|
|
||||||
show heading: set text(
|
show heading: set text(
|
||||||
font: style.heading.font,
|
font: style.heading.font,
|
||||||
weight: "bold",
|
weight: "semibold")
|
||||||
)
|
|
||||||
|
|
||||||
let header-supplement = if config.lang == "de" {
|
set heading(supplement: [chapter])
|
||||||
"Kapitel"
|
|
||||||
} else {
|
|
||||||
"chapter"
|
|
||||||
}
|
|
||||||
|
|
||||||
set heading(supplement: [#header-supplement])
|
|
||||||
|
|
||||||
set math.equation(numbering: "(1)")
|
set math.equation(numbering: "(1)")
|
||||||
show math.equation: set text(font: "Fira Math", size: 12pt)
|
|
||||||
|
|
||||||
// Set header spacing
|
// Set header spacing
|
||||||
show heading.where(level: 1): it => v(2em) + it + v(1em)
|
show heading.where(level: 1): it => v(2em) + it + v(1em)
|
||||||
|
@ -95,87 +75,10 @@
|
||||||
show heading.where(level: 3): it => v(0.5em) + it + v(0.25em)
|
show heading.where(level: 3): it => v(0.5em) + it + v(0.25em)
|
||||||
|
|
||||||
// set theme for code blocks
|
// set theme for code blocks
|
||||||
set raw(tab-size: style.code.tab-size)
|
set raw(
|
||||||
show raw.where(block: false): it => box(
|
tab-size: style.code.tab-size,
|
||||||
stroke: 1pt + ABB-GRAY-05,
|
theme: style.code.theme)
|
||||||
radius: 2pt,
|
show raw: set text(font: style.code.font)
|
||||||
inset: (left: 2pt, right: 2pt),
|
|
||||||
outset: (top: 4pt, bottom: 4pt),
|
|
||||||
fill: ABB-GRAY-06,
|
|
||||||
text(font: style.code.font, size: style.code.size, it.text),
|
|
||||||
)
|
|
||||||
show figure.where(kind: raw): it => align(left)[
|
|
||||||
#let content = it.body
|
|
||||||
#let lang = if content.has("lang") {
|
|
||||||
it.body.lang
|
|
||||||
} else {
|
|
||||||
none
|
|
||||||
}
|
|
||||||
#block(
|
|
||||||
width: 100%,
|
|
||||||
fill: ABB-GRAY-06,
|
|
||||||
stroke: 1pt + ABB-GRAY-05,
|
|
||||||
radius: 0.5em,
|
|
||||||
inset: 0.75em,
|
|
||||||
clip: false,
|
|
||||||
{
|
|
||||||
let (columns, align, make_row) = {
|
|
||||||
if style.code.lines {
|
|
||||||
(
|
|
||||||
(auto, 1fr),
|
|
||||||
(right + top, left),
|
|
||||||
e => {
|
|
||||||
let (i, l) = e
|
|
||||||
let n = i + 1
|
|
||||||
let n_str = if (calc.rem(n, 1) == 0) or (true and i == 0) {
|
|
||||||
text(
|
|
||||||
font: style.code.font,
|
|
||||||
size: style.code.size,
|
|
||||||
fill: ABB-BLACK,
|
|
||||||
str(n),
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
none
|
|
||||||
}
|
|
||||||
(n_str + h(0.5em), raw(block: true, lang: lang, l))
|
|
||||||
},
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
(
|
|
||||||
(1fr,),
|
|
||||||
(left,),
|
|
||||||
e => {
|
|
||||||
let (i, l) = e
|
|
||||||
raw(block: true, lang: lang, l)
|
|
||||||
},
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
grid(
|
|
||||||
stroke: none,
|
|
||||||
columns: columns,
|
|
||||||
rows: (auto,),
|
|
||||||
gutter: 0pt,
|
|
||||||
inset: 0.25em,
|
|
||||||
align: (col, _) => align.at(col),
|
|
||||||
fill: ABB-GRAY-06,
|
|
||||||
..content
|
|
||||||
.text
|
|
||||||
.split("\n")
|
|
||||||
.enumerate()
|
|
||||||
.map(make_row)
|
|
||||||
.flatten()
|
|
||||||
.map(c => if c.has("text") and c.text == "" {
|
|
||||||
v(1em)
|
|
||||||
} else {
|
|
||||||
c
|
|
||||||
})
|
|
||||||
)
|
|
||||||
},
|
|
||||||
)
|
|
||||||
#v(-1em)
|
|
||||||
#align(center + top, it.caption)
|
|
||||||
]
|
|
||||||
|
|
||||||
show figure: set block(breakable: true)
|
show figure: set block(breakable: true)
|
||||||
|
|
||||||
|
@ -183,8 +86,8 @@
|
||||||
// based on: https://github.com/typst/typst/discussions/3871
|
// based on: https://github.com/typst/typst/discussions/3871
|
||||||
show figure.caption: c => [
|
show figure.caption: c => [
|
||||||
#if c.body.fields().len() > 0 {
|
#if c.body.fields().len() > 0 {
|
||||||
text(weight: "medium")[
|
text(weight: "semibold")[
|
||||||
#c.supplement #context c.counter.display("1.1.1")
|
#c.supplement #c.counter.display("1.1.1")
|
||||||
]
|
]
|
||||||
c.separator
|
c.separator
|
||||||
}
|
}
|
||||||
|
@ -208,20 +111,8 @@
|
||||||
stroke: (x, y) => (
|
stroke: (x, y) => (
|
||||||
left: none,
|
left: none,
|
||||||
right: none,
|
right: none,
|
||||||
top: if y == 0 {
|
top: if y == 0 { 1.5pt } else if y < 2 { 1pt } else { 0.5pt },
|
||||||
1.5pt
|
bottom: if y == 0 { 1pt } else { 1.5pt } ))
|
||||||
} else if y < 2 {
|
|
||||||
1pt
|
|
||||||
} else {
|
|
||||||
0.5pt
|
|
||||||
},
|
|
||||||
bottom: if y == 0 {
|
|
||||||
1pt
|
|
||||||
} else {
|
|
||||||
1.5pt
|
|
||||||
},
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
// make table header bold
|
// make table header bold
|
||||||
show table.cell.where(y: 0): set text(weight: "bold")
|
show table.cell.where(y: 0): set text(weight: "bold")
|
||||||
|
@ -230,8 +121,7 @@
|
||||||
set par(
|
set par(
|
||||||
justify: true,
|
justify: true,
|
||||||
first-line-indent: 1em,
|
first-line-indent: 1em,
|
||||||
leading: 1em,
|
leading: 1em)
|
||||||
)
|
|
||||||
|
|
||||||
// give links a color
|
// give links a color
|
||||||
show link: set text(fill: style.link.color)
|
show link: set text(fill: style.link.color)
|
||||||
|
@ -244,26 +134,17 @@
|
||||||
header-ascent: style.header.content-padding,
|
header-ascent: style.header.content-padding,
|
||||||
footer-descent: style.header.content-padding,
|
footer-descent: style.header.content-padding,
|
||||||
margin: (
|
margin: (
|
||||||
top: style.page.margin.top + style.header.underline-top-padding + style
|
top: style.page.margin.top + style.header.underline-top-padding + style.header.content-padding,
|
||||||
.header
|
|
||||||
.content-padding,
|
|
||||||
bottom: style.page.margin.bottom + style.footer.content-padding,
|
bottom: style.page.margin.bottom + style.footer.content-padding,
|
||||||
left: style.page.margin.left,
|
left: style.page.margin.left,
|
||||||
right: style.page.margin.right,
|
right: style.page.margin.right),
|
||||||
),
|
|
||||||
numbering: (..nums) => {
|
numbering: (..nums) => {
|
||||||
let current-page = here().page()
|
let current-page = here().page()
|
||||||
if current-page == 1{
|
if current-page == 1{
|
||||||
[]
|
[]
|
||||||
} else if query(<end-of-prelude>)
|
} else if query(<end-of-prelude>).first().location().page() > current-page {
|
||||||
.first()
|
|
||||||
.location()
|
|
||||||
.page() > current-page {
|
|
||||||
numbering("I", nums.pos().first())
|
numbering("I", nums.pos().first())
|
||||||
} else if query(<end-of-content>)
|
} else if query(<end-of-content>).first().location().page() >= current-page {
|
||||||
.first()
|
|
||||||
.location()
|
|
||||||
.page() >= current-page {
|
|
||||||
numbering("1", nums.pos().first())
|
numbering("1", nums.pos().first())
|
||||||
} else {
|
} else {
|
||||||
numbering("a", nums.pos().first())
|
numbering("a", nums.pos().first())
|
||||||
|
@ -280,11 +161,7 @@
|
||||||
set align(center)
|
set align(center)
|
||||||
numbering("I", page-counter)
|
numbering("I", page-counter)
|
||||||
} else if query(<end-of-content>).first().location().page() >= page-number {
|
} else if query(<end-of-content>).first().location().page() >= page-number {
|
||||||
numbering(
|
numbering("1 / 1", page-counter, counter(page).at(<end-of-content>).last())
|
||||||
"1 / 1",
|
|
||||||
page-counter,
|
|
||||||
counter(page).at(<end-of-content>).last(),
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
numbering("a", page-counter)
|
numbering("a", page-counter)
|
||||||
}
|
}
|
||||||
|
@ -294,15 +171,17 @@
|
||||||
let current-page = here().page()
|
let current-page = here().page()
|
||||||
|
|
||||||
if current-page == 1 {
|
if current-page == 1 {
|
||||||
// logo moved to content
|
// logo of ABB and DHBW
|
||||||
|
grid(
|
||||||
|
// set width of columns
|
||||||
|
// we need two, so make both half the page width
|
||||||
|
columns: (50%, 50%),
|
||||||
|
// left align logo of ABB
|
||||||
|
align(left, image("res/ABB.svg", height: style.header.logo-height)),
|
||||||
|
// right align logo of DHBW
|
||||||
|
align(right, image("res/DHBW.svg", height: style.header.logo-height)))
|
||||||
|
|
||||||
} else if query(<end-of-content>)
|
} else if query(<end-of-content>).first().location().page() >= current-page and query(<end-of-prelude>).first().location().page() < current-page + 1 {
|
||||||
.first()
|
|
||||||
.location()
|
|
||||||
.page() >= current-page and query(<end-of-prelude>)
|
|
||||||
.first()
|
|
||||||
.location()
|
|
||||||
.page() < current-page + 1 {
|
|
||||||
let heading = currentH()
|
let heading = currentH()
|
||||||
|
|
||||||
heading.at(0)
|
heading.at(0)
|
||||||
|
@ -315,8 +194,7 @@
|
||||||
v(style.header.underline-top-padding - 1em)
|
v(style.header.underline-top-padding - 1em)
|
||||||
line(length: 100%)
|
line(length: 100%)
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
)
|
|
||||||
|
|
||||||
body
|
body
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,3 @@
|
||||||
== More raw data
|
== More raw data
|
||||||
|
|
||||||
#lorem(50)
|
#lorem(50)
|
||||||
|
|
||||||
#figure(```
|
|
||||||
```)
|
|
||||||
|
|
|
@ -7,7 +7,3 @@ oidc:
|
||||||
potato:
|
potato:
|
||||||
short: potato
|
short: potato
|
||||||
desc: "#lorem(50)"
|
desc: "#lorem(50)"
|
||||||
|
|
||||||
HTTP:
|
|
||||||
short: HTTP
|
|
||||||
long: Hyper Text Transfer Protocol
|
|
||||||
|
|
|
@ -3,9 +3,8 @@
|
||||||
#import "abstract.typ": abstract, summary
|
#import "abstract.typ": abstract, summary
|
||||||
|
|
||||||
#show: dhbw-template.with((
|
#show: dhbw-template.with((
|
||||||
lang: "de",
|
lang: "en",
|
||||||
region: "de",
|
region: "en",
|
||||||
draft: false,
|
|
||||||
author: (
|
author: (
|
||||||
name: "Sven Vogel",
|
name: "Sven Vogel",
|
||||||
semester: 4,
|
semester: 4,
|
||||||
|
@ -15,8 +14,7 @@
|
||||||
university: "DHBW Mannheim",
|
university: "DHBW Mannheim",
|
||||||
company: "ABB AG",
|
company: "ABB AG",
|
||||||
supervisor: "Benny Goodman",
|
supervisor: "Benny Goodman",
|
||||||
matriculation-number: 123456789,
|
matriculation-number: 123456789),
|
||||||
),
|
|
||||||
thesis: (
|
thesis: (
|
||||||
title: "Unofficial ABB/DHBW Typst template",
|
title: "Unofficial ABB/DHBW Typst template",
|
||||||
subtitle: "for reports and thesises",
|
subtitle: "for reports and thesises",
|
||||||
|
@ -29,14 +27,7 @@
|
||||||
keywords: ( "IT", "other stuff" ),
|
keywords: ( "IT", "other stuff" ),
|
||||||
bibliography: bibliography("refs.bib"),
|
bibliography: bibliography("refs.bib"),
|
||||||
glossary: yaml("glossary.yml"),
|
glossary: yaml("glossary.yml"),
|
||||||
appendices: include "appendix.typ",
|
appendices: include "appendix.typ")))
|
||||||
),
|
|
||||||
style: (
|
|
||||||
header: (
|
|
||||||
logo-image: ""
|
|
||||||
)
|
|
||||||
)
|
|
||||||
))
|
|
||||||
|
|
||||||
#import "@preview/wrap-it:0.1.0": wrap-content
|
#import "@preview/wrap-it:0.1.0": wrap-content
|
||||||
|
|
||||||
|
@ -56,27 +47,21 @@
|
||||||
#lorem(200)
|
#lorem(200)
|
||||||
@einstein
|
@einstein
|
||||||
|
|
||||||
= Lorem Ipsum 3 <sec:hello>
|
= Lorem Ipsum 3
|
||||||
|
|
||||||
#lorem(15) t `Hello, World!` #lorem(50)
|
#lorem(15)
|
||||||
|
|
||||||
$
|
$
|
||||||
angle.l a, b angle.r &= arrow(a) dot arrow(b) \
|
angle.l a, b angle.r &= arrow(a) dot arrow(b) \
|
||||||
&= a_1 b_1 + a_2 b_2 + ... a_n b_n \
|
&= a_1 b_1 + a_2 b_2 + ... a_n b_n \
|
||||||
&= sum_(i=1)^n a_i b_i. \
|
&= sum_(i=1)^n a_i b_i.
|
||||||
integral_2^4(3x + 4x^2)
|
|
||||||
$
|
$
|
||||||
|
|
||||||
#lorem(140)
|
#lorem(140)
|
||||||
|
|
||||||
#wrap-content(
|
#wrap-content(
|
||||||
figure(image("assets/digitaldog.jpg", width: 200pt), caption: [ Some image caption ]),
|
figure(image("assets/digitaldog.jpg", width: 200pt), caption: [ Some image caption ]),
|
||||||
lorem(200),
|
lorem(200))
|
||||||
)
|
|
||||||
|
|
||||||
#url("https://github.com", "text") @sec:hello
|
|
||||||
|
|
||||||
#lorem(50)
|
|
||||||
|
|
||||||
#figure(
|
#figure(
|
||||||
table(
|
table(
|
||||||
|
@ -90,16 +75,11 @@ $
|
||||||
[2023-03-18], [Yoga], [200],
|
[2023-03-18], [Yoga], [200],
|
||||||
[2023-03-15], [Swimming], [400],
|
[2023-03-15], [Swimming], [400],
|
||||||
[2023-03-17], [Weightlifting], [250],
|
[2023-03-17], [Weightlifting], [250],
|
||||||
[2023-03-18], [Yoga], [200],
|
[2023-03-18], [Yoga], [200]),
|
||||||
),
|
caption: [ Some table ])
|
||||||
caption: [ Some table ],
|
|
||||||
)
|
|
||||||
|
|
||||||
#pagebreak()
|
#pagebreak()
|
||||||
|
|
||||||
#lorem(100)
|
|
||||||
#inline-color("#ff0000", "red") @HTTP
|
|
||||||
|
|
||||||
#figure(
|
#figure(
|
||||||
```rust
|
```rust
|
||||||
use std::env;
|
use std::env;
|
||||||
|
@ -107,16 +87,40 @@ $
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Hello, World!!!");
|
// 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;
|
||||||
}
|
}
|
||||||
```,
|
};
|
||||||
caption: [Some code],
|
|
||||||
)
|
|
||||||
|
|
||||||
#lorem(100)
|
// 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])
|
||||||
|
|
||||||
#pagebreak()
|
#pagebreak()
|
||||||
|
|
||||||
|
|
||||||
= Conclusion
|
= Conclusion
|
||||||
|
|
||||||
#lorem(320)
|
#lorem(320)
|
|
@ -0,0 +1,29 @@
|
||||||
|
|
||||||
|
#import "../../src/lib.typ": dhbw-template
|
||||||
|
|
||||||
|
#show: dhbw-template.with(
|
||||||
|
config: (
|
||||||
|
lang: none,
|
||||||
|
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)))
|
|
@ -0,0 +1,30 @@
|
||||||
|
|
||||||
|
#import "../../src/lib.typ": dhbw-template
|
||||||
|
|
||||||
|
#show: dhbw-template.with(
|
||||||
|
config: (
|
||||||
|
lang: "en",
|
||||||
|
this-key-is-not-in-config: "Ha Ha",
|
||||||
|
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)))
|
|
@ -0,0 +1,24 @@
|
||||||
|
|
||||||
|
#import "../../src/lib.typ": dhbw-template
|
||||||
|
|
||||||
|
#show: dhbw-template.with(
|
||||||
|
config: (
|
||||||
|
lang: "en",
|
||||||
|
region: "en",
|
||||||
|
author: (
|
||||||
|
university: "DHBW Mannheim",
|
||||||
|
company: "ABB AG",
|
||||||
|
supervisor: none,
|
||||||
|
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)))
|
|
@ -0,0 +1,29 @@
|
||||||
|
|
||||||
|
#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)))
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "dhbw-abb-typst-template"
|
name = "dhbw-abb-typst-template"
|
||||||
version = "0.4.1"
|
version = "0.1.0"
|
||||||
entrypoint = "src/template.typ"
|
entrypoint = "src/template.typ"
|
||||||
authors = ["Sven Vogel <sven.vogel1@de.abb.com>"]
|
authors = ["Sven Vogel <sven.vogel1@de.abb.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
Loading…
Reference in New Issue