Compare commits
40 Commits
Author | SHA1 | Date |
---|---|---|
Sven Vogel | 56f330693d | |
Sven Vogel | 1a263f66ac | |
Sven Vogel | 75d50f3207 | |
Sven Vogel | 6a4d78ba8b | |
Sven Vogel | 4da04a195c | |
Sven Vogel | 572d505701 | |
Sven Vogel | 255cdfeae1 | |
Sven Vogel | 1548bf8c5b | |
Sven Vogel | dabe0a2ef5 | |
Sven Vogel | 6c8f94e4b7 | |
Sven Vogel | ae729230bb | |
Sven Vogel | 9c3ae5c9e7 | |
Sven Vogel | 093ed09293 | |
Sven Vogel | 946a16fce6 | |
Sven Vogel | 7ad138dc00 | |
Sven Vogel | 201e991ac4 | |
Sven Vogel | 2daf7bb6c9 | |
Sven Vogel | 37e60a315e | |
Sven Vogel | 9f9225910f | |
Sven Vogel | e1b8eceea6 | |
Sven Vogel | 0438d73ab5 | |
Sven Vogel | 410c753339 | |
Sven Vogel | dd6a9ccce0 | |
Sven Vogel | eb21aeee99 | |
Sven Vogel | f237beb6fa | |
Sven Vogel | 2b966e42a0 | |
Sven Vogel | 39c620c270 | |
Sven Vogel | c60d81bd2d | |
Sven Vogel | a95b42bac3 | |
Sven Vogel | 4084960737 | |
Sven Vogel | dd902adebd | |
Sven Vogel | 3026dc1a1e | |
Sven Vogel | 418992d27f | |
Sven Vogel | b1aca1b18b | |
Sven Vogel | 08a6eaf79f | |
Sven Vogel | a4e6e6c47a | |
Sven Vogel | 9ba1fea4d7 | |
Sven Vogel | 4a1fcd0a35 | |
Sven Vogel | d648d5121c | |
Sven Vogel | 4fd088ce3f |
|
@ -5,15 +5,16 @@ on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
run-ci-linux:
|
run-ci-linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
TYPST_INSTALL: /usr/local
|
|
||||||
TYPST_VERSION: 0.11.1
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Install Typst CLI
|
- name: Install dependencies for Nix setup action
|
||||||
run: curl -fsSL https://typst.community/typst-install/install.sh | sh -s "$TYPST_VERSION"
|
run: |
|
||||||
- name: Set up Python 3
|
apt update -y
|
||||||
run: apt update -y && apt install python3-pip -y
|
apt install sudo -y
|
||||||
|
- name: Setup Nix
|
||||||
|
uses: cachix/install-nix-action@v27
|
||||||
|
with:
|
||||||
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
- name: Run CI
|
- name: Run CI
|
||||||
run: bash -c ./run-ci.sh
|
run: nix-shell --run ./run-ci.sh
|
||||||
|
|
|
@ -3,21 +3,24 @@ name: release
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- 'v*.*.*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Install dependencies for Nix setup action
|
||||||
|
run: |
|
||||||
|
apt update -y
|
||||||
|
apt install sudo -y
|
||||||
|
- name: Setup Nix
|
||||||
|
uses: cachix/install-nix-action@v27
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
- 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
|
- name: Run CI
|
||||||
run: bash -c ./run-ci.sh
|
run: nix-shell --run ./run-ci.sh
|
||||||
- name: Setup go
|
- name: Setup go
|
||||||
uses: https://github.com/actions/setup-go@v4
|
uses: https://github.com/actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -5,16 +5,12 @@ on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
run-ci-linux:
|
run-ci-linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
TYPST_INSTALL: $HOME/.typst
|
|
||||||
TYPST_VERSION: 0.11.1
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Install Typst CLI
|
- name: Setup Nix
|
||||||
run: curl -fsSL https://typst.community/typst-install/install.sh | sh -s "$TYPST_VERSION"
|
uses: cachix/install-nix-action@v27
|
||||||
- uses: actions/setup-python@v5
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
- name: Run CI
|
- name: Run CI
|
||||||
run: export PATH="$TYPST_INSTALL/bin:$PATH" && bash -c ./run-ci.sh
|
run: nix-shell --run ./run-ci.sh
|
||||||
|
|
|
@ -1,32 +1,30 @@
|
||||||
|
name: release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
# Sequence of patterns matched against refs/tags
|
|
||||||
tags:
|
tags:
|
||||||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
- 'v*.*.*'
|
||||||
|
|
||||||
name: Create Release
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
release:
|
||||||
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: Install Typst CLI
|
- name: Setup Nix
|
||||||
run: curl -fsSL https://typst.community/typst-install/install.sh | sh -s "$TYPST_VERSION"
|
uses: cachix/install-nix-action@v27
|
||||||
- uses: actions/setup-python@v5
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
- name: Run CI
|
- name: Run CI
|
||||||
run: export PATH="$TYPST_INSTALL/bin:$PATH" && bash -c ./run-ci.sh
|
run: nix-shell --run ./run-ci.sh
|
||||||
- name: Create Release
|
- name: Setup go
|
||||||
id: create_release
|
uses: https://github.com/actions/setup-go@v4
|
||||||
uses: actions/create-release@latest
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.PAT }}
|
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ github.ref }}
|
go-version: '>=1.20.1'
|
||||||
release_name: Release ${{ github.ref }}
|
- name: Create release
|
||||||
draft: false
|
id: create-release
|
||||||
prerelease: false
|
uses: https://gitea.com/actions/release-action@main
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
example.pdf
|
||||||
|
api_key: '${{secrets.RELEASE_TOKEN}}'
|
||||||
|
|
|
@ -131,9 +131,10 @@ 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. They can be downloaded from google 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:
|
||||||
- [Montserrat](https://fonts.google.com/specimen/Montserrat)
|
- [Fira Sans](https://github.com/bBoxType/FiraSans)
|
||||||
- [Open Sans](https://fonts.google.com/specimen/Open+Sans)
|
- [Fira Math](https://github.com/firamath/firamath)
|
||||||
|
- [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!
|
||||||
|
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
# 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
|
|
|
@ -1,30 +0,0 @@
|
||||||
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)
|
|
|
@ -1 +0,0 @@
|
||||||
pyyaml
|
|
|
@ -1,561 +0,0 @@
|
||||||
<?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.
|
@ -0,0 +1,93 @@
|
||||||
|
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.
|
|
@ -0,0 +1,48 @@
|
||||||
|
# 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.
|
@ -0,0 +1,92 @@
|
||||||
|
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.
26
run-ci.sh
26
run-ci.sh
|
@ -25,19 +25,29 @@ function enter-section() {
|
||||||
printf "\\n"
|
printf "\\n"
|
||||||
|
|
||||||
eval "$2"
|
eval "$2"
|
||||||
if [ $? -neq $3 ]; then
|
exit_status=$?
|
||||||
abort "command: $2 failed in section: $1"
|
|
||||||
|
if [ "$3" == "should fail" ]; then
|
||||||
|
log "INFO" "expected to fail..."
|
||||||
|
if [ $exit_status -eq 0 ]; then
|
||||||
|
abort "command: $2 failed in section: $1 with: $exit_status"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
log "INFO" "expected to pass..."
|
||||||
|
if [ ! $exit_status -eq 0 ]; then
|
||||||
|
abort "command: $2 failed in section: $1 with: $exit_status"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "\\n"
|
printf "\\n"
|
||||||
log "INFO" "section $1 completed successfully"
|
log "INFO" "section $1 completed successfully"
|
||||||
}
|
}
|
||||||
|
|
||||||
enter-section "BUILD: ABB code theme" "./generate-theme.sh" 0
|
enter-section "Typstyle checking" "./run-fmt.sh --check src/lib.typ" 0
|
||||||
enter-section "Compiling template..." "typst compile template/main.typ --root . example.pdf" 0
|
enter-section "Compiling template..." "typst compile template/main.typ --root . --font-path fonts example.pdf"
|
||||||
enter-section "TEST: local template import" "typst compile tests/local-import/main.typ --root ." 0
|
enter-section "TEST: local template import" "typst compile tests/local-import/main.typ --root . --font-path fonts"
|
||||||
enter-section "TEST: invalid config case 1" "typst compile tests/invalid-config/test-case-1.typ --root ." 1
|
enter-section "TEST: invalid config case 1" "typst compile tests/invalid-config/test-case-1.typ --root . --font-path fonts" "should fail"
|
||||||
enter-section "TEST: invalid config case 2" "compile tests/invalid-config/test-case-2.typ" 0
|
enter-section "TEST: invalid config case 2" "typst compile tests/invalid-config/test-case-2.typ --root . --font-path fonts"
|
||||||
enter-section "TEST: invalid config case 3" "typst compile tests/invalid-config/test-case-3.typ --root ." 1
|
enter-section "TEST: invalid config case 3" "typst compile tests/invalid-config/test-case-3.typ --root . --font-path fonts" "should fail"
|
||||||
|
|
||||||
log "INFO" "CI completed successfully"
|
log "INFO" "CI completed successfully"
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
#!/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
|
|
@ -0,0 +1,13 @@
|
||||||
|
let
|
||||||
|
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-unstable";
|
||||||
|
pkgs = import nixpkgs { config = {}; overlays = []; };
|
||||||
|
in
|
||||||
|
|
||||||
|
pkgs.mkShellNoCC {
|
||||||
|
packages = with pkgs; [
|
||||||
|
python312
|
||||||
|
python312Packages.pyyaml
|
||||||
|
typst
|
||||||
|
typstyle
|
||||||
|
];
|
||||||
|
}
|
|
@ -3,16 +3,16 @@
|
||||||
// https://brand.abb/portal/en/branding-principles/basic-brand-elements/color
|
// https://brand.abb/portal/en/branding-principles/basic-brand-elements/color
|
||||||
|
|
||||||
// ABB branding colors
|
// ABB branding colors
|
||||||
#let ABB-RED = cmyk(0%, 100%, 95%, 0%)
|
#let ABB-RED = cmyk(0%, 100%, 95%, 0%)
|
||||||
#let ABB-BLACK = cmyk(0%, 0%, 0%, 100%)
|
#let ABB-BLACK = cmyk(0%, 0%, 0%, 100%)
|
||||||
#let ABB-GRAY-01 = cmyk(0%, 0%, 0%, 90%)
|
#let ABB-GRAY-01 = cmyk(0%, 0%, 0%, 90%)
|
||||||
#let ABB-GRAY-02 = cmyk(0%, 0%, 0%, 75%)
|
#let ABB-GRAY-02 = cmyk(0%, 0%, 0%, 75%)
|
||||||
#let ABB-GRAY-03 = cmyk(0%, 0%, 0%, 55%)
|
#let ABB-GRAY-03 = cmyk(0%, 0%, 0%, 55%)
|
||||||
#let ABB-GRAY-04 = cmyk(0%, 0%, 0%, 35%)
|
#let ABB-GRAY-04 = cmyk(0%, 0%, 0%, 35%)
|
||||||
#let ABB-GRAY-05 = cmyk(0%, 0%, 0%, 15%)
|
#let ABB-GRAY-05 = cmyk(0%, 0%, 0%, 15%)
|
||||||
#let ABB-GRAY-06 = cmyk(0%, 0%, 0%, 5%)
|
#let ABB-GRAY-06 = cmyk(0%, 0%, 0%, 5%)
|
||||||
#let ABB-WHITE = cmyk(0%, 0%, 0%, 0%)
|
#let ABB-WHITE = cmyk(0%, 0%, 0%, 0%)
|
||||||
// ABB branding functinal colors
|
// ABB branding functinal colors
|
||||||
#let ABB-BLUE = cmyk(100%, 53%, 2%, 16%)
|
#let ABB-BLUE = cmyk(100%, 53%, 2%, 16%)
|
||||||
#let ABB-GREEN = cmyk(91%, 4%, 100%, 25%)
|
#let ABB-GREEN = cmyk(91%, 4%, 100%, 25%)
|
||||||
#let ABB-YELLOW = cmyk(0%, 9%, 100%, 0%)
|
#let ABB-YELLOW = cmyk(0%, 9%, 100%, 0%)
|
||||||
|
|
24
src/conf.typ
24
src/conf.typ
|
@ -59,9 +59,9 @@
|
||||||
bottom: 2.5cm)),
|
bottom: 2.5cm)),
|
||||||
text: (
|
text: (
|
||||||
size: 12pt,
|
size: 12pt,
|
||||||
font: "Open Sans"),
|
font: "Fira Sans"),
|
||||||
heading: (
|
heading: (
|
||||||
font: "Montserrat"),
|
font: "Fira Sans"),
|
||||||
code: (
|
code: (
|
||||||
theme: "res/abb.tmTheme",
|
theme: "res/abb.tmTheme",
|
||||||
font: "FiraCode Nerd Font",
|
font: "FiraCode Nerd Font",
|
||||||
|
@ -83,20 +83,20 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
for (key, val) in base {
|
for (key, val) in base {
|
||||||
if key in update {
|
if key in update {
|
||||||
let update_val = update.at(key)
|
let update_val = update.at(key)
|
||||||
|
|
||||||
if type(val) == dictionary and type(update_val) == dictionary {
|
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)
|
||||||
} else {
|
|
||||||
panic("missmatched dictionary entry `" + key + "` type: expected `" + type(val) + "` got `" + type(update_val) + "`")
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
base.insert(key, val)
|
panic("missmatched dictionary entry `" + key + "` type: expected `" + type(val) + "` got `" + type(update_val) + "`")
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
base.insert(key, val)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return base
|
return base
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,10 @@ 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(loc, inclusive: false),
|
selector(label(__glossary_label_prefix + key)).before(
|
||||||
|
loc,
|
||||||
|
inclusive: false,
|
||||||
|
),
|
||||||
loc,
|
loc,
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
@ -40,7 +43,7 @@ SOFTWARE.*/
|
||||||
|
|
||||||
// key not found error
|
// key not found error
|
||||||
#let __not-found-panic-error-msg(key) = {
|
#let __not-found-panic-error-msg(key) = {
|
||||||
__glossarium_error_prefix+"key '"+key+"' not found"
|
__glossarium_error_prefix + "key '" + key + "' not found"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference a term
|
// Reference a term
|
||||||
|
@ -56,13 +59,18 @@ 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 (is_first or long == true) and entlong != [] and entlong != "" and long != false {
|
} else if (
|
||||||
|
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(label(entry.key), textLink)#label(__glossary_label_prefix + entry.key)]
|
[#link(
|
||||||
|
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))
|
||||||
}
|
}
|
||||||
|
@ -80,10 +88,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 {
|
||||||
|
@ -93,20 +101,25 @@ 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 (is_first or long == true) and entlong != [] and entlong != "" and long != false {
|
let textLink = if (
|
||||||
|
is_first or long == true
|
||||||
|
) and entlong != [] and entlong != "" and long != false {
|
||||||
[#entlong (#short)]
|
[#entlong (#short)]
|
||||||
} else {
|
} else {
|
||||||
[#short]
|
[#short]
|
||||||
}
|
}
|
||||||
|
|
||||||
[#link(label(entry.key), textLink)#label(__glossary_label_prefix + entry.key)]
|
[#link(
|
||||||
|
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))
|
||||||
}
|
}
|
||||||
|
@ -116,7 +129,9 @@ 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.element.kind == __glossarium_figure {
|
if r.element != none and r.element.func() == figure and r
|
||||||
|
.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 {
|
||||||
|
@ -164,57 +179,77 @@ SOFTWARE.*/
|
||||||
if entry.group == group {
|
if entry.group == group {
|
||||||
[
|
[
|
||||||
#show figure.where(kind: __glossarium_figure): it => it.caption
|
#show figure.where(kind: __glossarium_figure): it => it.caption
|
||||||
#figure(
|
#figure(
|
||||||
supplement: "",
|
supplement: "",
|
||||||
kind: __glossarium_figure,
|
kind: __glossarium_figure,
|
||||||
numbering: none,
|
numbering: none,
|
||||||
caption: {
|
caption: {
|
||||||
context {
|
context {
|
||||||
let term_references = __query_labels_with_key(here(), entry.key)
|
let key = if entry.key.ends-with("__glossary_entry") {
|
||||||
if term_references.len() != 0 or show-all {
|
entry.key.replace("__glossary_entry", "")
|
||||||
let desc = entry.at("desc", default: "")
|
} else {
|
||||||
let long = entry.at("long", default: "")
|
entry.key
|
||||||
let hasLong = long != "" and long != []
|
}
|
||||||
let hasDesc = desc != "" and desc != []
|
|
||||||
grid(
|
let term_references = __query_labels_with_key(here(), key)
|
||||||
columns: 2,
|
if term_references.len() != 0 or show-all [
|
||||||
column-gutter: 1em,
|
#let desc = entry.at("desc", default: "")
|
||||||
text(weight: "bold", entry.short),
|
#let long = entry.at("long", default: "")
|
||||||
{
|
#let hasLong = long != "" and long != []
|
||||||
if hasLong {
|
#let hasDesc = desc != "" and desc != []
|
||||||
text(weight: "bold", entry.long)
|
|
||||||
}
|
#block(
|
||||||
if hasLong and hasDesc [:]
|
below: 1.5em,
|
||||||
if hasDesc [ #desc ] else [. ]
|
par(hanging-indent: 1em)[
|
||||||
if disable-back-references != true {
|
#text(weight: "bold", entry.short)
|
||||||
term_references.map(x => x.location()).sorted(key: x => x.page()).fold(
|
#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(x.page()) {
|
((values, pages), x) => if pages.contains(
|
||||||
|
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 => {
|
)
|
||||||
let page-numbering = x.page-numbering();
|
.values
|
||||||
|
.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(page-numbering, ..counter(page).at(x))]
|
link(x)[#numbering(
|
||||||
|
page-numbering,
|
||||||
|
..counter(page).at(x),
|
||||||
|
)]
|
||||||
}
|
}
|
||||||
).join(", ")
|
)
|
||||||
}
|
.join(", ")
|
||||||
}
|
}
|
||||||
)
|
],
|
||||||
}
|
)
|
||||||
}
|
]
|
||||||
},
|
}
|
||||||
)[] #label(entry.key)
|
},
|
||||||
#parbreak()
|
)[] #label(entry.key)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if enable-group-pagebreak { pagebreak(weak: true) }
|
if enable-group-pagebreak {
|
||||||
|
pagebreak(weak: true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
140
src/glossary.typ
140
src/glossary.typ
|
@ -7,68 +7,94 @@
|
||||||
// Edited: 08.07.2024
|
// Edited: 08.07.2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#let glossary(entries) = {
|
#let glossary(entries, config) = {
|
||||||
|
|
||||||
|
assert(
|
||||||
|
type(entries) == dictionary,
|
||||||
|
message: "The glossary is not a dictionary",
|
||||||
|
)
|
||||||
|
|
||||||
|
let processed_glossary = (:)
|
||||||
|
|
||||||
|
for (k, v) in entries.pairs() {
|
||||||
assert(
|
assert(
|
||||||
type(entries) == dictionary,
|
type(v) == dictionary,
|
||||||
message: "The glossary is not a dictionary",
|
message: "The glossary entry `" + k + "` is not a dictionary",
|
||||||
)
|
)
|
||||||
|
|
||||||
for (k, v) in entries.pairs() {
|
for key in v.keys() {
|
||||||
assert(
|
assert(
|
||||||
type(v) == dictionary,
|
key in ("short", "long", "desc", "group"),
|
||||||
message: "The glossary entry `" + k + "` is not a dictionary")
|
message: "Found unexpected key `" + key + "` in glossary entry `" + k,
|
||||||
|
)
|
||||||
for key in v.keys() {
|
|
||||||
assert(
|
|
||||||
key in ("short", "long", "desc", "group"),
|
|
||||||
message: "Found unexpected key `" + key + "` in glossary entry `" + k)
|
|
||||||
}
|
|
||||||
|
|
||||||
assert(
|
|
||||||
type(v.short) == str,
|
|
||||||
message: "The short form of glossary entry `" + k + "` is not a string")
|
|
||||||
|
|
||||||
if "long" in v {
|
|
||||||
assert(
|
|
||||||
type(v.long) == str,
|
|
||||||
message: "The long form of glossary entry `" + k + "` is not a string")
|
|
||||||
}
|
|
||||||
|
|
||||||
if "desc" in v {
|
|
||||||
assert(
|
|
||||||
type(v.desc) == str,
|
|
||||||
message: "The description of glossary entry `" + k + "` is not a string")
|
|
||||||
}
|
|
||||||
|
|
||||||
if "group" in v {
|
|
||||||
assert(
|
|
||||||
type(v.group) == str,
|
|
||||||
message: "The optional group of glossary entry `" + k + "` is not a string")
|
|
||||||
} else {
|
|
||||||
let group = if "long" in v {
|
|
||||||
if (context text.lang) == "de" {
|
|
||||||
"Akronyme"
|
|
||||||
} else {
|
|
||||||
"Acronyms"
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (context text.lang) == "de" {
|
|
||||||
"Begriffe"
|
|
||||||
} else {
|
|
||||||
"Terms"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
entries.at(k).group = group
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return entries.pairs().map(((key, entry)) => (
|
assert(
|
||||||
key: key,
|
type(v.short) == str,
|
||||||
short: eval(entry.short, mode: "markup"),
|
message: "The short form of glossary entry `" + k + "` is not a string",
|
||||||
long: eval(entry.at("long", default: ""), mode: "markup"),
|
)
|
||||||
desc: eval(entry.at("desc", default: ""), mode: "markup"),
|
|
||||||
group: entry.at("group", default: "")
|
if "long" in v {
|
||||||
))
|
assert(
|
||||||
|
type(v.long) == str,
|
||||||
|
message: "The long form of glossary entry `" + k + "` is not a string",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if "desc" in v {
|
||||||
|
assert(
|
||||||
|
type(v.desc) == str,
|
||||||
|
message: "The description of glossary entry `" + k + "` is not a string",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if "group" in v {
|
||||||
|
assert(
|
||||||
|
type(v.group) == str,
|
||||||
|
message: "The optional group of glossary entry `" + k + "` is not a string",
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
let acronym_group = if config.lang == "de" {
|
||||||
|
"Abkürzungsverzeichnis"
|
||||||
|
} else {
|
||||||
|
"List of Acronyms"
|
||||||
|
}
|
||||||
|
|
||||||
|
let glossary_group = if config.lang == "de" {
|
||||||
|
"Begriffe"
|
||||||
|
} else {
|
||||||
|
"Glossary"
|
||||||
|
}
|
||||||
|
|
||||||
|
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)) => (
|
||||||
|
key: key,
|
||||||
|
short: entry.short,
|
||||||
|
long: eval(entry.at("long", default: ""), mode: "markup"),
|
||||||
|
desc: eval(entry.at("desc", default: ""), mode: "markup"),
|
||||||
|
group: entry.at("group", default: ""),
|
||||||
|
))
|
||||||
}
|
}
|
71
src/lib.typ
71
src/lib.typ
|
@ -7,23 +7,58 @@
|
||||||
// Edited: 27.06.2024
|
// Edited: 27.06.2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#import "conf.typ": validate-config
|
#import "conf.typ": validate-config, default-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": new_confidentiality_statement_page
|
#import "pages/confidentiality-statement.typ": 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
|
||||||
#import "pages/preface.typ": new-preface
|
#import "pages/preface.typ": new-preface
|
||||||
#import "pages/appendix.typ": show-appendix
|
#import "pages/appendix.typ": show-appendix
|
||||||
|
|
||||||
#let group-break()= {
|
#let group-break() = {
|
||||||
[#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)
|
||||||
|
@ -36,12 +71,14 @@
|
||||||
#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)
|
||||||
|
@ -66,9 +103,11 @@
|
||||||
|
|
||||||
#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))
|
glossary(config.thesis.glossary, config),
|
||||||
|
)
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,22 +6,24 @@
|
||||||
// Edited: 28.06.2024
|
// Edited: 28.06.2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#let new_abstract(config) = context {
|
#let new_abstract(config) = (
|
||||||
|
context {
|
||||||
|
|
||||||
set align(center + horizon)
|
set align(center + horizon)
|
||||||
|
|
||||||
// only include summary when a language other than english is used
|
// only include summary when a language other than english is used
|
||||||
if text.lang == "de" [
|
if text.lang == "de" [
|
||||||
// Summary is supposed to be on separate page
|
// Summary is supposed to be on separate page
|
||||||
#pagebreak(weak: true)
|
#pagebreak(weak: true)
|
||||||
|
|
||||||
= Zusammenfassung
|
= Zusammenfassung
|
||||||
#config.thesis.summary
|
#config.thesis.summary
|
||||||
]
|
]
|
||||||
|
|
||||||
// abstract is supposed to be on separate page
|
// abstract is supposed to be on separate page
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
|
|
||||||
heading("Abstract")
|
heading("Abstract")
|
||||||
config.thesis.abstract
|
config.thesis.abstract
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
|
|
@ -6,39 +6,41 @@
|
||||||
// Edited: 28.06.2024
|
// Edited: 28.06.2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#let show-appendix(config: dictionary) = context {
|
#let show-appendix(config: dictionary) = (
|
||||||
counter(heading).update(0)
|
context {
|
||||||
|
counter(heading).update(0)
|
||||||
|
|
||||||
let title = if text.lang == "en" {
|
let title = if text.lang == "en" {
|
||||||
"Appendix"
|
"Appendix"
|
||||||
} else {
|
} else {
|
||||||
"Anhang"
|
"Anhang"
|
||||||
}
|
|
||||||
|
|
||||||
if "appendices" in config.thesis {
|
|
||||||
pagebreak(weak: true)
|
|
||||||
|
|
||||||
// appendix will be invisible on the appendecies page
|
|
||||||
// but still listed in the ToC
|
|
||||||
show heading: it => []
|
|
||||||
heading(level: 1, numbering: none, title)
|
|
||||||
|
|
||||||
// APA style appendix
|
|
||||||
show heading: it => {
|
|
||||||
let number = if it.numbering != none {
|
|
||||||
counter(heading).display(it.numbering)
|
|
||||||
}
|
|
||||||
block()[
|
|
||||||
#title #number - #it.body
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
show heading.where(level: 1): it => v(2em) + it + v(1em)
|
if "appendices" in config.thesis {
|
||||||
show heading.where(level: 2): it => v(1em) + it + v(0.5em)
|
pagebreak(weak: true)
|
||||||
show heading.where(level: 3): it => v(0.5em) + it + v(0.25em)
|
|
||||||
|
|
||||||
set heading(numbering: "A.1", supplement: title)
|
// appendix will be invisible on the appendecies page
|
||||||
|
// but still listed in the ToC
|
||||||
|
show heading: it => []
|
||||||
|
heading(level: 1, numbering: none, title)
|
||||||
|
|
||||||
config.thesis.appendices
|
// APA style appendix
|
||||||
|
show heading: it => {
|
||||||
|
let number = if it.numbering != none {
|
||||||
|
counter(heading).display(it.numbering)
|
||||||
|
}
|
||||||
|
block()[
|
||||||
|
#title #number - #it.body
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
show heading.where(level: 1): it => v(2em) + it + v(1em)
|
||||||
|
show heading.where(level: 2): it => v(1em) + it + v(0.5em)
|
||||||
|
show heading.where(level: 3): it => v(0.5em) + it + v(0.25em)
|
||||||
|
|
||||||
|
set heading(numbering: "A.1", supplement: title)
|
||||||
|
|
||||||
|
config.thesis.appendices
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
)
|
||||||
|
|
|
@ -6,51 +6,52 @@
|
||||||
// Edited: 28.06.2024
|
// Edited: 28.06.2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#let new_confidentiality_statement_page(config) = context {
|
#let new_confidentiality_statement_page(config) = (
|
||||||
|
context {
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
|
|
||||||
let thesis = config.thesis
|
let thesis = config.thesis
|
||||||
let author = config.author
|
let author = config.author
|
||||||
|
|
||||||
if text.lang == "de" [
|
if text.lang == "de" [
|
||||||
#heading(level: 1, "Sperrvermerk", supplement: [special])
|
#heading(level: 1, "Sperrvermerk")
|
||||||
] else if text.lang == "en" [
|
] else if text.lang == "en" [
|
||||||
#heading(level: 1, "Confidentiality Statement", supplement: [special])
|
#heading(level: 1, "Confidentiality Statement")
|
||||||
]
|
]
|
||||||
|
|
||||||
if text.lang == "de" [
|
if text.lang == "de" [
|
||||||
Der Inhalt der dieser Arbeit mit dem Thema
|
Der Inhalt 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
|
||||||
]
|
]
|
||||||
|
|
||||||
v(1em)
|
v(1em)
|
||||||
|
|
||||||
set align(center)
|
set align(center)
|
||||||
|
|
||||||
text(weight: "bold", thesis.title)
|
text(weight: "bold", thesis.title)
|
||||||
|
|
||||||
if thesis.subtitle != none {
|
if thesis.subtitle != none {
|
||||||
linebreak()
|
linebreak()
|
||||||
thesis.subtitle
|
thesis.subtitle
|
||||||
}
|
}
|
||||||
|
|
||||||
set align(left)
|
set align(left)
|
||||||
|
|
||||||
v(1em)
|
v(1em)
|
||||||
|
|
||||||
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 Evalua-tionsverfahrens zugänglich gemacht werden, sofern keine anderslautende Genehmigung der Ausbildungsstätte vorliegt.
|
darf weder als Ganzes noch in Auszügen Personen außerhalb des Prüfungsprozesses und des Evaluationsverfahrens 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.
|
||||||
]
|
]
|
||||||
|
|
||||||
set align(horizon)
|
set align(horizon)
|
||||||
|
|
||||||
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
|
||||||
columns: (50%, 50%),
|
columns: (50%, 50%),
|
||||||
|
@ -59,4 +60,5 @@
|
||||||
align(left, {line(length: 6cm)}),
|
align(left, {line(length: 6cm)}),
|
||||||
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,53 +6,54 @@
|
||||||
// Edited: 28.06.2024
|
// Edited: 28.06.2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#let new_declaration_of_authorship(config) = context {
|
#let new_declaration_of_authorship(config) = (
|
||||||
|
context {
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
|
|
||||||
let thesis = config.thesis
|
let thesis = config.thesis
|
||||||
let author = config.author
|
let author = config.author
|
||||||
|
|
||||||
if text.lang == "de" [
|
if text.lang == "de" [
|
||||||
#heading("Selbständigkeitserklärung")
|
#heading("Selbständigkeitserklärung")
|
||||||
] else if text.lang == "en" [
|
] else if text.lang == "en" [
|
||||||
#heading("Declaration of Authorship")
|
#heading("Declaration of Authorship")
|
||||||
]
|
]
|
||||||
|
|
||||||
v(1em)
|
v(1em)
|
||||||
|
|
||||||
if text.lang == "de" [
|
if text.lang == "de" [
|
||||||
Ich versichere hiermit, dass ich meine Prüfung mit dem Thema
|
Ich versichere hiermit, dass ich meine Prüfung mit dem Thema
|
||||||
] else if text.lang == "en" [
|
] else if text.lang == "en" [
|
||||||
I hereby confirm that I have written this thesis with the subject
|
I hereby confirm that I have written this thesis with the subject
|
||||||
]
|
]
|
||||||
|
|
||||||
v(1em)
|
v(1em)
|
||||||
|
|
||||||
set align(center)
|
set align(center)
|
||||||
|
|
||||||
text(weight: "bold", thesis.title)
|
text(weight: "bold", thesis.title)
|
||||||
|
|
||||||
if thesis.subtitle != none {
|
if thesis.subtitle != none {
|
||||||
linebreak()
|
linebreak()
|
||||||
thesis.subtitle
|
thesis.subtitle
|
||||||
}
|
}
|
||||||
|
|
||||||
set align(left)
|
set align(left)
|
||||||
|
|
||||||
v(1em)
|
v(1em)
|
||||||
|
|
||||||
set par(justify: true)
|
set par(justify: true)
|
||||||
|
|
||||||
if text.lang == "de" [
|
if text.lang == "de" [
|
||||||
selbständig verfasst und keine anderen als die angegebenen Quellen und Hilfsmittel benutzt habe. Ich versichere zudem, dass die eingereichte elektronische Fassung mit der gedruckten Fassung übereinstimmt.
|
selbständig verfasst und keine anderen als die angegebenen Quellen und Hilfsmittel benutzt habe. Ich versichere zudem, dass die eingereichte elektronische Fassung mit der gedruckten Fassung übereinstimmt.
|
||||||
] else if text.lang == "en" [
|
] else if text.lang == "en" [
|
||||||
independently and have not used any sources or aids other than those specified. I also confirm that the electronic version submitted is identical to the printed version.
|
independently and have not used any sources or aids other than those specified. I also confirm that the electronic version submitted is identical to the printed version.
|
||||||
]
|
]
|
||||||
|
|
||||||
set align(horizon)
|
set align(horizon)
|
||||||
|
|
||||||
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
|
||||||
columns: (50%, 50%),
|
columns: (50%, 50%),
|
||||||
|
@ -61,4 +62,5 @@
|
||||||
align(left, {line(length: 6cm)}),
|
align(left, {line(length: 6cm)}),
|
||||||
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,92 +10,120 @@
|
||||||
// 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) = context {
|
#let render_filtered_outline(title: str, kind: selector) = (
|
||||||
|
context {
|
||||||
|
|
||||||
let elems = query(figure.where(kind: kind), here())
|
let elems = query(figure.where(kind: kind), here())
|
||||||
let count = elems.len()
|
let count = elems.len()
|
||||||
|
|
||||||
// only show outline if there is something to list
|
show outline.entry: it => {
|
||||||
if count > 0 {
|
link(it.element.location())[
|
||||||
pagebreak(weak: true)
|
#v(12pt, weak: true)
|
||||||
outline(
|
#text(weight: "regular", it.body)
|
||||||
title: title,
|
#box(width: 1fr, it.fill)
|
||||||
target: figure.where(kind: kind))
|
#[ #it.page]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
// only show outline if there is something to list
|
||||||
|
if count > 0 {
|
||||||
|
pagebreak(weak: true)
|
||||||
|
outline(
|
||||||
|
title: title,
|
||||||
|
target: figure.where(kind: kind),
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
)
|
||||||
|
|
||||||
#let render_figures_outline() = context {
|
#let render_figures_outline() = (
|
||||||
let title = if (text.lang == "de") {
|
context {
|
||||||
|
let title = if (text.lang == "de") {
|
||||||
"Abbildungsverzeichnis"
|
"Abbildungsverzeichnis"
|
||||||
} else if text.lang == "en" {
|
} else if text.lang == "en" {
|
||||||
"List of Figures"
|
"List of Figures"
|
||||||
}
|
}
|
||||||
|
|
||||||
render_filtered_outline(title: title, kind: image)
|
render_filtered_outline(title: title, kind: image)
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
|
||||||
#let render_table_outline() = context {
|
#let render_table_outline() = (
|
||||||
let title = if (text.lang == "de") {
|
context {
|
||||||
|
let title = if (text.lang == "de") {
|
||||||
"Tabellenverzeichnis"
|
"Tabellenverzeichnis"
|
||||||
} else if text.lang == "en" {
|
} else if text.lang == "en" {
|
||||||
"List of Tables"
|
"List of Tables"
|
||||||
}
|
}
|
||||||
|
|
||||||
render_filtered_outline(title: title, kind: table)
|
render_filtered_outline(title: title, kind: table)
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
|
||||||
#let render_raw_outline() = context {
|
#let render_raw_outline() = (
|
||||||
let title = if (text.lang == "de") {
|
context {
|
||||||
|
let title = if (text.lang == "de") {
|
||||||
"Quelltextverzeichnis"
|
"Quelltextverzeichnis"
|
||||||
} else if text.lang == "en" {
|
} else if text.lang == "en" {
|
||||||
"Code Snippets"
|
"Code Snippets"
|
||||||
}
|
}
|
||||||
|
|
||||||
render_filtered_outline(title: title, kind: raw)
|
render_filtered_outline(title: title, kind: raw)
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
|
||||||
#let render_heading_outline() = context {
|
#let render_heading_outline() = (
|
||||||
let title = if (text.lang == "de") {
|
context {
|
||||||
|
let title = if (text.lang == "de") {
|
||||||
"Inhaltsverzeichnis"
|
"Inhaltsverzeichnis"
|
||||||
} else if text.lang == "en" {
|
} else if text.lang == "en" {
|
||||||
"Table of Contents"
|
"Table of Contents"
|
||||||
}
|
}
|
||||||
|
|
||||||
pagebreak(weak: true)
|
let header-supplement = if (text.lang == "de") {
|
||||||
outline(
|
"Kapitel"
|
||||||
target: heading.where(supplement: [chapter]),
|
} else {
|
||||||
title: title,
|
"chapter"
|
||||||
indent: auto)
|
|
||||||
}
|
|
||||||
|
|
||||||
#let render_appendix_outline() = context {
|
|
||||||
let supplement = if text.lang == "en" {
|
|
||||||
[Appendix]
|
|
||||||
} else {
|
|
||||||
[Anhang]
|
|
||||||
}
|
|
||||||
|
|
||||||
if query(heading.where(supplement: supplement)).len() > 0 {
|
|
||||||
let title = if (text.lang == "de") {
|
|
||||||
"Anhangsverzeichnis"
|
|
||||||
} else if text.lang == "en" {
|
|
||||||
"Table of Appendices"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
outline(
|
outline(
|
||||||
|
target: heading.where(supplement: [#header-supplement]),
|
||||||
|
title: title,
|
||||||
|
indent: auto,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
#let render_appendix_outline() = (
|
||||||
|
context {
|
||||||
|
let supplement = if text.lang == "en" {
|
||||||
|
[Appendix]
|
||||||
|
} else {
|
||||||
|
[Anhang]
|
||||||
|
}
|
||||||
|
|
||||||
|
if query(heading.where(supplement: supplement)).len() > 0 {
|
||||||
|
let title = if (text.lang == "de") {
|
||||||
|
"Anhangsverzeichnis"
|
||||||
|
} else if text.lang == "en" {
|
||||||
|
"Table of Appendices"
|
||||||
|
}
|
||||||
|
|
||||||
|
pagebreak(weak: true)
|
||||||
|
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(
|
show outline.entry.where(level: 1): it => {
|
||||||
level: 1,
|
|
||||||
): it => {
|
|
||||||
v(1.5em, weak: true)
|
v(1.5em, weak: true)
|
||||||
strong(it)
|
strong(it)
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,51 +6,53 @@
|
||||||
// Edited: 28.06.2024
|
// Edited: 28.06.2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#let new_prerelease_note(config) = context {
|
#let new_prerelease_note(config) = (
|
||||||
|
context {
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
|
|
||||||
let thesis = config.thesis
|
let thesis = config.thesis
|
||||||
let author = config.author
|
let author = config.author
|
||||||
|
|
||||||
if text.lang == "de" [
|
if text.lang == "de" [
|
||||||
#heading("Vorabfassung")
|
#heading("Vorabfassung")
|
||||||
] else if text.lang == "en" [
|
] else if text.lang == "en" [
|
||||||
#heading("Preliminary Version")
|
#heading("Preliminary Version")
|
||||||
]
|
]
|
||||||
|
|
||||||
v(1em)
|
v(1em)
|
||||||
|
|
||||||
if text.lang == "de" [
|
if text.lang == "de" [
|
||||||
Bei dieser Ausgabe der Arbeit mit dem Thema
|
Bei dieser Ausgabe der Arbeit mit dem Thema
|
||||||
] else if text.lang == "en" [
|
] else if text.lang == "en" [
|
||||||
This edition of the work with the subject
|
This edition of the work with the subject
|
||||||
]
|
]
|
||||||
|
|
||||||
v(1em)
|
v(1em)
|
||||||
|
|
||||||
set align(center)
|
set align(center)
|
||||||
|
|
||||||
text(weight: "bold", thesis.title)
|
text(weight: "bold", thesis.title)
|
||||||
|
|
||||||
if thesis.subtitle != none {
|
if thesis.subtitle != none {
|
||||||
linebreak()
|
linebreak()
|
||||||
thesis.subtitle
|
thesis.subtitle
|
||||||
|
}
|
||||||
|
|
||||||
|
set align(left)
|
||||||
|
|
||||||
|
v(1em)
|
||||||
|
|
||||||
|
set par(justify: true)
|
||||||
|
|
||||||
|
if text.lang == "de" [
|
||||||
|
handelt es sich _nicht_ um die fertige Fassung. Das Dokument kann Inhaltliche-, Grammatikalische- sowie Format-Fehler enthalten. Das Dokument ist im Rahmen der Aufgabenstellung von Seiten der #author.university nicht zur Bewertung freigegeben und ein anderer Verwendungszweck als eine Vorschau ist nicht gestattet.
|
||||||
|
] else if text.lang == "en" [
|
||||||
|
is not the final version. The document may contain errors in content, grammar and formatting. The document may not be released for evaluation to #author.university as part of the assignment, and any use other than a preview is not permitted.
|
||||||
|
]
|
||||||
|
|
||||||
|
v(1em)
|
||||||
|
h(1em)
|
||||||
|
[#author.name, #datetime.today().display()]
|
||||||
}
|
}
|
||||||
|
)
|
||||||
set align(left)
|
|
||||||
|
|
||||||
v(1em)
|
|
||||||
|
|
||||||
set par(justify: true)
|
|
||||||
|
|
||||||
if text.lang == "de" [
|
|
||||||
handelt es sich _nicht_ um die fertige Fassung. Das Dokument kann Inhaltliche-, Grammatikalische- sowie Format-Fehler enthalten. Das Dokument ist im Rahmen der Aufgabenstellung von Seiten der #author.university nicht zur Bewertung freigegeben und ein anderer Verwendungszweck als eine Vorschau ist nicht gestattet.
|
|
||||||
] else if text.lang == "en" [
|
|
||||||
is not the final version. The document may contain errors in content, grammar and formatting. The document may not be released for evaluation to #author.university as part of the assignment, and any use other than a preview is not permitted.
|
|
||||||
]
|
|
||||||
|
|
||||||
v(1em)
|
|
||||||
h(1em)
|
|
||||||
[#author.name, #datetime.today().display()]
|
|
||||||
}
|
|
||||||
|
|
|
@ -6,110 +6,91 @@
|
||||||
// Edited: 28.06.2024
|
// Edited: 28.06.2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#let new_title_page(config) = context [
|
#let new_title_page(config) = (
|
||||||
|
context [
|
||||||
|
|
||||||
#let thesis = config.thesis
|
#let thesis = config.thesis
|
||||||
#let author = config.author
|
#let author = config.author
|
||||||
|
|
||||||
#set align(center)
|
#set align(center)
|
||||||
|
|
||||||
// title
|
// title
|
||||||
#v(2cm)
|
#v(2cm)
|
||||||
#text(size: 2em, weight: "semibold", thesis.title)
|
#par(justify: false, leading: 1.5em)[
|
||||||
|
#text(size: 2em, weight: "bold", hyphenate: false, thesis.title)
|
||||||
|
#linebreak()
|
||||||
|
// subtitle
|
||||||
|
#text(size: 2em, weight: "light", thesis.subtitle)
|
||||||
|
]
|
||||||
|
|
||||||
// subtitle
|
#set align(center + horizon)
|
||||||
#text(size: 1.5em, thesis.subtitle)
|
|
||||||
|
|
||||||
// type of paper
|
// type of paper
|
||||||
#v(1cm)
|
#text(size: 1.5em, weight: "medium", thesis.kind)
|
||||||
#text(size: 1.5em, weight: "bold", thesis.kind)
|
|
||||||
|
// faculty
|
||||||
|
#pad()[
|
||||||
|
#if text.lang == "de" [
|
||||||
|
Praxisphase des #author.semester Semesters an der Fakultät für #author.faculty
|
||||||
|
#linebreak()
|
||||||
|
im Studiengang #author.program
|
||||||
|
] else if text.lang == "en" [
|
||||||
|
Practical phase of the #author.semester semester at the Faculty of #author.faculty
|
||||||
|
#linebreak()
|
||||||
|
in the degree program #author.program
|
||||||
|
] else [
|
||||||
|
#context panic("no translation for language: ", text.lang)
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
|
// university
|
||||||
|
#pad()[
|
||||||
|
#if text.lang == "de" [
|
||||||
|
an der
|
||||||
|
] else if text.lang == "en" [
|
||||||
|
at
|
||||||
|
] else [
|
||||||
|
#context panic("no translation for language: ", text.lang)
|
||||||
|
]
|
||||||
|
#linebreak()
|
||||||
|
#author.university
|
||||||
|
]
|
||||||
|
|
||||||
|
#set align(bottom + left)
|
||||||
|
|
||||||
// faculty
|
|
||||||
#pad(top: 0.5cm)[
|
|
||||||
#if text.lang == "de" [
|
#if text.lang == "de" [
|
||||||
Praxisphase des #author.semester Studienjahrs an der Fakultät für #author.faculty
|
#table(
|
||||||
#linebreak()
|
columns: 2,
|
||||||
im Studiengang #author.program
|
column-gutter: 1cm,
|
||||||
|
align: left,
|
||||||
|
stroke: none,
|
||||||
|
[*Verfasser:*], author.name,
|
||||||
|
[*Bearbeitungszeitraum:*], thesis.timeframe,
|
||||||
|
[*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" [
|
||||||
Practical phase of the #author.semester academic year at the Faculty of #author.faculty
|
#table(
|
||||||
#linebreak()
|
columns: 2,
|
||||||
in the degree program #author.program
|
column-gutter: 1cm,
|
||||||
|
align: left,
|
||||||
|
stroke: none,
|
||||||
|
[*Author:*], author.name,
|
||||||
|
[*Editing period:*], thesis.timeframe,
|
||||||
|
[*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)
|
||||||
]
|
]
|
||||||
]
|
|
||||||
|
|
||||||
// university
|
#align(
|
||||||
#pad(top: 0.5cm)[
|
bottom,
|
||||||
#if text.lang == "de" [
|
grid(
|
||||||
an der
|
|
||||||
] else if text.lang == "en" [
|
|
||||||
at
|
|
||||||
] else [
|
|
||||||
#context panic("no translation for language: ", text.lang)
|
|
||||||
]
|
|
||||||
#linebreak()
|
|
||||||
#author.university
|
|
||||||
]
|
|
||||||
|
|
||||||
#set align(horizon + left)
|
|
||||||
|
|
||||||
#if text.lang == "de" [
|
|
||||||
#table(
|
|
||||||
columns: 2,
|
|
||||||
column-gutter: 1cm,
|
|
||||||
align: left,
|
|
||||||
stroke: none,
|
|
||||||
|
|
||||||
[*Verfasser:*],
|
|
||||||
author.name,
|
|
||||||
|
|
||||||
[*Bearbeitungszeitraum:*],
|
|
||||||
thesis.timeframe,
|
|
||||||
|
|
||||||
[*Matrikelnummer, Kurs:*],
|
|
||||||
str(author.matriculation-number) + ", " + author.course,
|
|
||||||
|
|
||||||
[*Ausbildungsbetrieb:*],
|
|
||||||
author.company,
|
|
||||||
|
|
||||||
[*Betrieblicher Betreuer:*],
|
|
||||||
author.supervisor,
|
|
||||||
|
|
||||||
[*Abgabedatum:*],
|
|
||||||
thesis.submission-date
|
|
||||||
)
|
|
||||||
] else if text.lang == "en" [
|
|
||||||
#table(
|
|
||||||
columns: 2,
|
|
||||||
column-gutter: 1cm,
|
|
||||||
align: left,
|
|
||||||
stroke: none,
|
|
||||||
|
|
||||||
[*Author:*],
|
|
||||||
author.name,
|
|
||||||
|
|
||||||
[*Editing period:*],
|
|
||||||
thesis.timeframe,
|
|
||||||
|
|
||||||
[*Matriculation number, course:*],
|
|
||||||
str(author.matriculation-number) + ", " + author.course,
|
|
||||||
|
|
||||||
[*Training company:*],
|
|
||||||
author.company,
|
|
||||||
|
|
||||||
[*Company supervisor:*],
|
|
||||||
author.supervisor,
|
|
||||||
|
|
||||||
[*Submission date:*],
|
|
||||||
thesis.submission-date
|
|
||||||
)
|
|
||||||
] else [
|
|
||||||
#context panic("no translation for language: ", text.lang)
|
|
||||||
]
|
|
||||||
|
|
||||||
#align(bottom,
|
|
||||||
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
|
||||||
columns: (60%, 40%),
|
columns: (60%, 40%),
|
||||||
|
@ -121,7 +102,9 @@
|
||||||
#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)
|
||||||
]
|
]
|
||||||
|
)
|
||||||
|
|
205
src/style.typ
205
src/style.typ
|
@ -12,15 +12,22 @@
|
||||||
#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(line(start: (50%, 0%), end: (50%, 100%), stroke: (paint: watermark-color, thickness: 3pt)))
|
#place(
|
||||||
|
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 {
|
||||||
rotate(-22.5deg)[
|
rotate(-22.5deg)[
|
||||||
#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)[
|
||||||
|
@ -28,13 +35,17 @@
|
||||||
#linebreak()
|
#linebreak()
|
||||||
document version.
|
document version.
|
||||||
#linebreak()
|
#linebreak()
|
||||||
#text(size: 0.75em, "Further usage without the authors consent is not permitted.")]]]}
|
#text(
|
||||||
|
size: 0.75em,
|
||||||
#let numberingH(c)={
|
"Further usage without the authors consent is not permitted.",
|
||||||
return numbering(c.numbering,..counter(heading).at(c.location()))
|
)]]]
|
||||||
}
|
}
|
||||||
|
|
||||||
#let currentH(level: 1)={
|
#let numberingH(c) = {
|
||||||
|
return numbering(c.numbering, ..counter(heading).at(c.location()))
|
||||||
|
}
|
||||||
|
|
||||||
|
#let currentH(level: 1) = {
|
||||||
let elems = query(selector(heading.where(level: level)).after(here()))
|
let elems = query(selector(heading.where(level: level)).after(here()))
|
||||||
|
|
||||||
if elems.len() != 0 and elems.first().location().page() == here().page() {
|
if elems.len() != 0 and elems.first().location().page() == here().page() {
|
||||||
|
@ -59,15 +70,24 @@
|
||||||
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: "semibold")
|
weight: "bold"
|
||||||
|
)
|
||||||
|
|
||||||
set heading(supplement: [chapter])
|
let header-supplement = if config.lang == "de" {
|
||||||
|
"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)
|
||||||
|
@ -75,10 +95,15 @@
|
||||||
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(
|
set raw(tab-size: style.code.tab-size)
|
||||||
tab-size: style.code.tab-size,
|
show raw.where(block: false): it => box(
|
||||||
theme: style.code.theme)
|
stroke: 1pt + ABB-GRAY-05,
|
||||||
show raw.where(block: false): it => box(stroke: 1pt + ABB-GRAY-05, radius: 2pt, 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))
|
radius: 2pt,
|
||||||
|
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)[
|
show figure.where(kind: raw): it => align(left)[
|
||||||
#let content = it.body
|
#let content = it.body
|
||||||
#let lang = if content.has("lang") {
|
#let lang = if content.has("lang") {
|
||||||
|
@ -87,51 +112,66 @@
|
||||||
none
|
none
|
||||||
}
|
}
|
||||||
#block(
|
#block(
|
||||||
width: 100%,
|
width: 100%,
|
||||||
fill: ABB-GRAY-06,
|
fill: ABB-GRAY-06,
|
||||||
stroke: 1pt + ABB-GRAY-05,
|
stroke: 1pt + ABB-GRAY-05,
|
||||||
radius: 0.5em,
|
radius: 0.5em,
|
||||||
inset: 0.75em,
|
inset: 0.75em,
|
||||||
clip: false,
|
clip: false,
|
||||||
{
|
{
|
||||||
let (columns, align, make_row) = {
|
let (columns, align, make_row) = {
|
||||||
if style.code.lines {(
|
if style.code.lines {
|
||||||
|
(
|
||||||
(auto, 1fr),
|
(auto, 1fr),
|
||||||
(right + top, left),
|
(right + top, left),
|
||||||
e => {
|
e => {
|
||||||
let (i, l) = e
|
let (i, l) = e
|
||||||
let n = i + 1
|
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 }
|
let n_str = if (calc.rem(n, 1) == 0) or (true and i == 0) {
|
||||||
(n_str + h(0.5em), raw(block: true, lang: lang, l))
|
text(
|
||||||
})
|
font: style.code.font,
|
||||||
}
|
size: style.code.size,
|
||||||
else {
|
fill: ABB-BLACK,
|
||||||
( ( 1fr, ),
|
str(n),
|
||||||
( left, ),
|
|
||||||
e => {
|
|
||||||
let (i, l) = e
|
|
||||||
raw(block: true, lang: lang, l)
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
}
|
} 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,
|
grid(
|
||||||
columns: columns,
|
stroke: none,
|
||||||
rows: (auto,),
|
columns: columns,
|
||||||
gutter: 0pt,
|
rows: (auto,),
|
||||||
inset: 0.25em,
|
gutter: 0pt,
|
||||||
align: (col, _) => align.at(col),
|
inset: 0.25em,
|
||||||
fill: ABB-GRAY-06,
|
align: (col, _) => align.at(col),
|
||||||
..content
|
fill: ABB-GRAY-06,
|
||||||
.text
|
..content
|
||||||
.split("\n")
|
.text
|
||||||
.enumerate()
|
.split("\n")
|
||||||
.map(make_row)
|
.enumerate()
|
||||||
.flatten()
|
.map(make_row)
|
||||||
.map(c => if c.has("text") and c.text == "" { v(1em) } else { c })
|
.flatten()
|
||||||
)
|
.map(c => if c.has("text") and c.text == "" {
|
||||||
}
|
v(1em)
|
||||||
|
} else {
|
||||||
|
c
|
||||||
|
})
|
||||||
|
)
|
||||||
|
},
|
||||||
)
|
)
|
||||||
#v(-1em)
|
#v(-1em)
|
||||||
#align(center + top, it.caption)
|
#align(center + top, it.caption)
|
||||||
|
@ -143,7 +183,7 @@
|
||||||
// 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: "semibold")[
|
text(weight: "medium")[
|
||||||
#c.supplement #c.counter.display("1.1.1")
|
#c.supplement #c.counter.display("1.1.1")
|
||||||
]
|
]
|
||||||
c.separator
|
c.separator
|
||||||
|
@ -168,8 +208,20 @@
|
||||||
stroke: (x, y) => (
|
stroke: (x, y) => (
|
||||||
left: none,
|
left: none,
|
||||||
right: none,
|
right: none,
|
||||||
top: if y == 0 { 1.5pt } else if y < 2 { 1pt } else { 0.5pt },
|
top: if y == 0 {
|
||||||
bottom: if y == 0 { 1pt } else { 1.5pt } ))
|
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")
|
||||||
|
@ -178,7 +230,8 @@
|
||||||
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)
|
||||||
|
@ -191,17 +244,26 @@
|
||||||
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.header.content-padding,
|
top: style.page.margin.top + style.header.underline-top-padding + style
|
||||||
|
.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>).first().location().page() > current-page {
|
} else if query(<end-of-prelude>)
|
||||||
|
.first()
|
||||||
|
.location()
|
||||||
|
.page() > current-page {
|
||||||
numbering("I", nums.pos().first())
|
numbering("I", nums.pos().first())
|
||||||
} else if query(<end-of-content>).first().location().page() >= current-page {
|
} else if query(<end-of-content>)
|
||||||
|
.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())
|
||||||
|
@ -218,7 +280,11 @@
|
||||||
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("1 / 1", page-counter, counter(page).at(<end-of-content>).last())
|
numbering(
|
||||||
|
"1 / 1",
|
||||||
|
page-counter,
|
||||||
|
counter(page).at(<end-of-content>).last(),
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
numbering("a", page-counter)
|
numbering("a", page-counter)
|
||||||
}
|
}
|
||||||
|
@ -238,7 +304,13 @@
|
||||||
// right align logo of DHBW
|
// right align logo of DHBW
|
||||||
align(right, image("res/DHBW.svg", height: style.header.logo-height)))
|
align(right, image("res/DHBW.svg", height: style.header.logo-height)))
|
||||||
|
|
||||||
} else if query(<end-of-content>).first().location().page() >= current-page and query(<end-of-prelude>).first().location().page() < current-page + 1 {
|
} else if query(<end-of-content>)
|
||||||
|
.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)
|
||||||
|
@ -251,7 +323,8 @@
|
||||||
v(style.header.underline-top-padding - 1em)
|
v(style.header.underline-top-padding - 1em)
|
||||||
line(length: 100%)
|
line(length: 100%)
|
||||||
}
|
}
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
|
||||||
body
|
body
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,5 @@
|
||||||
|
|
||||||
#lorem(50)
|
#lorem(50)
|
||||||
|
|
||||||
#figure(
|
#figure(```
|
||||||
```
|
```)
|
||||||
```
|
|
||||||
)
|
|
||||||
|
|
|
@ -7,3 +7,7 @@ oidc:
|
||||||
potato:
|
potato:
|
||||||
short: potato
|
short: potato
|
||||||
desc: "#lorem(50)"
|
desc: "#lorem(50)"
|
||||||
|
|
||||||
|
HTTP:
|
||||||
|
short: HTTP
|
||||||
|
long: Hyper Text Transfer Protocol
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#import "abstract.typ": abstract, summary
|
#import "abstract.typ": abstract, summary
|
||||||
|
|
||||||
#show: dhbw-template.with((
|
#show: dhbw-template.with((
|
||||||
lang: "en",
|
lang: "de",
|
||||||
region: "en",
|
region: "de",
|
||||||
draft: false,
|
draft: false,
|
||||||
author: (
|
author: (
|
||||||
name: "Sven Vogel",
|
name: "Sven Vogel",
|
||||||
|
@ -15,7 +15,8 @@
|
||||||
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",
|
||||||
|
@ -25,10 +26,12 @@
|
||||||
summary: summary,
|
summary: summary,
|
||||||
abstract: abstract,
|
abstract: abstract,
|
||||||
preface: include "preface.typ",
|
preface: include "preface.typ",
|
||||||
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",
|
||||||
|
),
|
||||||
|
))
|
||||||
|
|
||||||
#import "@preview/wrap-it:0.1.0": wrap-content
|
#import "@preview/wrap-it:0.1.0": wrap-content
|
||||||
|
|
||||||
|
@ -48,21 +51,27 @@
|
||||||
#lorem(200)
|
#lorem(200)
|
||||||
@einstein
|
@einstein
|
||||||
|
|
||||||
= Lorem Ipsum 3
|
= Lorem Ipsum 3 <sec:hello>
|
||||||
|
|
||||||
#lorem(15) t `Hello, World!` #lorem(50)
|
#lorem(15) t `Hello, World!` #lorem(50)
|
||||||
|
|
||||||
$
|
$
|
||||||
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(
|
||||||
|
@ -76,29 +85,33 @@ $
|
||||||
[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)
|
#lorem(100)
|
||||||
|
#inline-color("#ff0000", "red") @HTTP
|
||||||
|
|
||||||
#figure(
|
#figure(
|
||||||
```rust
|
```rust
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::fs::OpenOptions;
|
use std::fs::OpenOptions;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Hello, World!!!");
|
println!("Hello, World!!!");
|
||||||
}
|
}
|
||||||
```, caption: [Some code])
|
```,
|
||||||
|
caption: [Some code],
|
||||||
|
)
|
||||||
|
|
||||||
#lorem(100)
|
#lorem(100)
|
||||||
|
|
||||||
#pagebreak()
|
#pagebreak()
|
||||||
|
|
||||||
|
|
||||||
= Conclusion
|
= Conclusion
|
||||||
|
|
||||||
#lorem(320)
|
#lorem(320)
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
#import "../../src/lib.typ": dhbw-template
|
#import "../../src/lib.typ": dhbw-template
|
||||||
|
|
||||||
#show: dhbw-template.with(
|
#show: dhbw-template.with((
|
||||||
config: (
|
|
||||||
lang: none,
|
lang: none,
|
||||||
region: "en",
|
region: "en",
|
||||||
author: (
|
author: (
|
||||||
|
|
|
@ -1,30 +1,34 @@
|
||||||
|
|
||||||
#import "../../src/lib.typ": dhbw-template
|
#import "../../src/lib.typ": dhbw-template
|
||||||
|
|
||||||
#show: dhbw-template.with(
|
#show: dhbw-template.with((
|
||||||
config: (
|
lang: "en",
|
||||||
lang: "en",
|
this-key-is-not-in-config: "Ha Ha",
|
||||||
this-key-is-not-in-config: "Ha Ha",
|
region: "en",
|
||||||
region: "en",
|
author: (
|
||||||
author: (
|
name: "Sven Vogel",
|
||||||
name: "Sven Vogel",
|
semester: 4,
|
||||||
semester: 4,
|
program: "Informationtechnology",
|
||||||
program: "Informationtechnology",
|
course: "TINF19IT1",
|
||||||
course: "TINF19IT1",
|
faculty: "Technik",
|
||||||
faculty: "Technik",
|
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",
|
||||||
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",
|
||||||
summary: none,
|
summary: none,
|
||||||
abstract: none,
|
abstract: none,
|
||||||
keywords: ( "IT", "other stuff" ),
|
keywords: ("IT", "other stuff"),
|
||||||
bibliography: none,
|
bibliography: none,
|
||||||
glossary: none,
|
glossary: none,
|
||||||
appendices: none)))
|
appendices: none,
|
||||||
|
),
|
||||||
|
))
|
||||||
|
|
||||||
|
= Heading
|
||||||
|
|
|
@ -1,24 +1,26 @@
|
||||||
|
|
||||||
#import "../../src/lib.typ": dhbw-template
|
#import "../../src/lib.typ": dhbw-template
|
||||||
|
|
||||||
#show: dhbw-template.with(
|
#show: dhbw-template.with((
|
||||||
config: (
|
lang: "en",
|
||||||
lang: "en",
|
region: "en",
|
||||||
region: "en",
|
author: (
|
||||||
author: (
|
university: "DHBW Mannheim",
|
||||||
university: "DHBW Mannheim",
|
company: "ABB AG",
|
||||||
company: "ABB AG",
|
supervisor: none,
|
||||||
supervisor: none,
|
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",
|
||||||
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",
|
||||||
summary: none,
|
summary: none,
|
||||||
abstract: none,
|
abstract: none,
|
||||||
keywords: ( "IT", "other stuff" ),
|
keywords: ("IT", "other stuff"),
|
||||||
bibliography: none,
|
bibliography: none,
|
||||||
glossary: none,
|
glossary: none,
|
||||||
appendices: none)))
|
appendices: none,
|
||||||
|
),
|
||||||
|
))
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
#import "../../src/lib.typ": dhbw-template
|
#import "../../src/lib.typ": dhbw-template
|
||||||
|
|
||||||
#show: dhbw-template.with(
|
#show: dhbw-template.with((
|
||||||
config: (
|
|
||||||
lang: "en",
|
lang: "en",
|
||||||
region: "en",
|
region: "en",
|
||||||
author: (
|
author: (
|
||||||
|
@ -27,3 +26,5 @@
|
||||||
bibliography: none,
|
bibliography: none,
|
||||||
glossary: none,
|
glossary: none,
|
||||||
appendices: none)))
|
appendices: none)))
|
||||||
|
|
||||||
|
= Heading
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "dhbw-abb-typst-template"
|
name = "dhbw-abb-typst-template"
|
||||||
version = "0.1.0"
|
version = "0.4.1"
|
||||||
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