Compare commits
6 Commits
c1af367b67
...
fedf9d8833
Author | SHA1 | Date |
---|---|---|
Sven Vogel | fedf9d8833 | |
Sven Vogel | ccd8e89131 | |
Sven Vogel | eb8e457a0c | |
Sven Vogel | 04705b2003 | |
Sven Vogel | 9c71251771 | |
Sven Vogel | 5f4044111e |
|
@ -13,5 +13,9 @@ jobs:
|
|||
uses: actions/checkout@v3
|
||||
- name: Install Typst CLI
|
||||
run: curl -fsSL https://typst.community/typst-install/install.sh | sh -s "$TYPST_VERSION"
|
||||
- name: Set up Python 3
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Run CI
|
||||
run: bash -c ./run-ci.sh
|
||||
|
|
|
@ -14,6 +14,10 @@ jobs:
|
|||
fetch-depth: 0
|
||||
- name: Install Typst CLI
|
||||
run: curl -fsSL https://typst.community/typst-install/install.sh | sh -s "$TYPST_VERSION"
|
||||
- name: Set up Python 3
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Run CI
|
||||
run: bash -c ./run-ci.sh
|
||||
- name: Setup go
|
||||
|
|
|
@ -26,6 +26,11 @@ Header and footer do not overlap into this margin in order to conform to univers
|
|||
Bibliography is formated with the IEEE style. <br>
|
||||
Appendecies make use of an abbreviation of APA style.
|
||||
|
||||
Complies with ABB branding guidelines such as:
|
||||
- proper usage of the logo
|
||||
- respecting the logo safe area
|
||||
- brand colors (in syntax highlightning)
|
||||
|
||||
## 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:
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# Base16 ABB branded color scheme
|
||||
scheme-author: "Sven Vogel"
|
||||
scheme-slug: "abb-base16"
|
||||
scheme-name: "ABB Base16"
|
||||
base00: "ffffff" # Default Background
|
||||
base01: "fafafa" # Lighter Background
|
||||
base02: "f0f0f0" # Selection Background
|
||||
base03: "6e6e6e" # Comments, Invisibles, Line Highlighting
|
||||
base04: "000000" # Dark Foreground
|
||||
base05: "000000" # Default Foreground, Caret, Delimiters, Operators
|
||||
base06: "fafafa" # Light Foreground (Not often used)
|
||||
base07: "fafafa" # Light Background (Not often used)
|
||||
base08: "262626" # Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted
|
||||
base09: "004c97" # Integers, Boolean, Constants, XML Attributes, Markup Link Url
|
||||
base0A: "ff000f" # Classes, Markup Bold, Search Text Background
|
||||
base0B: "004c97" # Strings, Inherited Class, Markup Code, Diff Inserted
|
||||
base0C: "262626" # Support, Regular Expressions, Escape Characters, Markup Quotes
|
||||
base0D: "007a33" # Functions, Methods, Attribute IDs, Headings
|
||||
base0E: "ff000f" # Keywords, Storage, Selector, Markup Italic, Diff Changed
|
||||
base0F: "6e6e6e" # Deprecated, Opening/Closing Embedded Language Tags
|
|
@ -0,0 +1,30 @@
|
|||
import yaml
|
||||
import logging
|
||||
import sys
|
||||
import re
|
||||
|
||||
global data
|
||||
|
||||
def replace_tag(match):
|
||||
return data[match.group(1)]
|
||||
|
||||
if __name__ == '__main__':
|
||||
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
|
||||
logger = logging.getLogger()
|
||||
|
||||
with open(sys.argv[1], 'r') as file:
|
||||
data = yaml.safe_load(file)
|
||||
|
||||
content = ""
|
||||
|
||||
with open(sys.argv[2], "r") as file:
|
||||
logger.info(f"opened file: {sys.argv[2]}")
|
||||
content = file.read()
|
||||
logger.info(f"read file: {sys.argv[2]}")
|
||||
|
||||
logger.info(f"converting...")
|
||||
content = re.sub("\\{\\{([a-z0-9-]+)\\}\\}", replace_tag, content, 0, re.IGNORECASE)
|
||||
|
||||
with open(sys.argv[3], "w") as file:
|
||||
logger.info(f"writing changes...")
|
||||
file.write(content)
|
|
@ -0,0 +1 @@
|
|||
pyyaml
|
|
@ -0,0 +1,561 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Template: Chris Kempson, Scheme: {{scheme-author}}</string>
|
||||
<key>name</key>
|
||||
<string>Base16 {{scheme-name}}</string>
|
||||
<key>semanticClass</key>
|
||||
<string>theme.base16.{{scheme-slug}}</string>
|
||||
<key>colorSpaceName</key>
|
||||
<string>sRGB</string>
|
||||
<key>gutterSettings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#{{base01}}</string>
|
||||
<key>divider</key>
|
||||
<string>#{{base01}}</string>
|
||||
<key>foreground</key>
|
||||
<string>#{{base03}}</string>
|
||||
<key>selectionBackground</key>
|
||||
<string>#{{base02}}</string>
|
||||
<key>selectionForeground</key>
|
||||
<string>#{{base04}}</string>
|
||||
</dict>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#{{base00}}</string>
|
||||
<key>caret</key>
|
||||
<string>#{{base05}}</string>
|
||||
<key>foreground</key>
|
||||
<string>#{{base05}}</string>
|
||||
<key>invisibles</key>
|
||||
<string>#{{base03}}</string>
|
||||
<key>lineHighlight</key>
|
||||
<string>#{{base03}}55</string>
|
||||
<key>selection</key>
|
||||
<string>#{{base02}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Text</string>
|
||||
<key>scope</key>
|
||||
<string>variable.parameter.function</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base05}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Comments</string>
|
||||
<key>scope</key>
|
||||
<string>comment, punctuation.definition.comment</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base03}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Punctuation</string>
|
||||
<key>scope</key>
|
||||
<string>punctuation.definition.string, punctuation.definition.variable, punctuation.definition.string, punctuation.definition.parameters, punctuation.definition.string, punctuation.definition.array</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base05}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Delimiters</string>
|
||||
<key>scope</key>
|
||||
<string>none</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base05}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Operators</string>
|
||||
<key>scope</key>
|
||||
<string>keyword.operator</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base05}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Keywords</string>
|
||||
<key>scope</key>
|
||||
<string>keyword</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0E}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Variables</string>
|
||||
<key>scope</key>
|
||||
<string>variable</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base08}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Functions</string>
|
||||
<key>scope</key>
|
||||
<string>entity.name.function, meta.require, support.function.any-method, variable.function, variable.annotation, support.macro</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0D}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Labels</string>
|
||||
<key>scope</key>
|
||||
<string>entity.name.label</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0F}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Classes</string>
|
||||
<key>scope</key>
|
||||
<string>support.class, entity.name.class, entity.name.type.class</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0A}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Classes</string>
|
||||
<key>scope</key>
|
||||
<string>meta.class</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base07}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Methods</string>
|
||||
<key>scope</key>
|
||||
<string>keyword.other.special-method</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0D}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Storage</string>
|
||||
<key>scope</key>
|
||||
<string>storage</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0E}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Support</string>
|
||||
<key>scope</key>
|
||||
<string>support.function</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0C}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Strings, Inherited Class</string>
|
||||
<key>scope</key>
|
||||
<string>string, constant.other.symbol, entity.other.inherited-class</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0B}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Integers</string>
|
||||
<key>scope</key>
|
||||
<string>constant.numeric</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base09}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Floats</string>
|
||||
<key>scope</key>
|
||||
<string>none</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base09}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Boolean</string>
|
||||
<key>scope</key>
|
||||
<string>none</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base09}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Constants</string>
|
||||
<key>scope</key>
|
||||
<string>constant</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base09}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Tags</string>
|
||||
<key>scope</key>
|
||||
<string>entity.name.tag</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base08}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Attributes</string>
|
||||
<key>scope</key>
|
||||
<string>entity.other.attribute-name</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base09}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Attribute IDs</string>
|
||||
<key>scope</key>
|
||||
<string>entity.other.attribute-name.id, punctuation.definition.entity</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0D}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Selector</string>
|
||||
<key>scope</key>
|
||||
<string>meta.selector</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0E}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Values</string>
|
||||
<key>scope</key>
|
||||
<string>none</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base09}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Headings</string>
|
||||
<key>scope</key>
|
||||
<string>markup.heading punctuation.definition.heading, entity.name.section</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string></string>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0D}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Units</string>
|
||||
<key>scope</key>
|
||||
<string>keyword.other.unit</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base09}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Bold</string>
|
||||
<key>scope</key>
|
||||
<string>markup.bold, punctuation.definition.bold</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string>bold</string>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0A}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Italic</string>
|
||||
<key>scope</key>
|
||||
<string>markup.italic, punctuation.definition.italic</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string>italic</string>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0E}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Code</string>
|
||||
<key>scope</key>
|
||||
<string>markup.raw.inline</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0B}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Link Text</string>
|
||||
<key>scope</key>
|
||||
<string>string.other.link, punctuation.definition.string.end.markdown, punctuation.definition.string.begin.markdown</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base08}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Link Url</string>
|
||||
<key>scope</key>
|
||||
<string>meta.link</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base09}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Lists</string>
|
||||
<key>scope</key>
|
||||
<string>markup.list</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base08}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Quotes</string>
|
||||
<key>scope</key>
|
||||
<string>markup.quote</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base09}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Separator</string>
|
||||
<key>scope</key>
|
||||
<string>meta.separator</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#{{base02}}</string>
|
||||
<key>foreground</key>
|
||||
<string>#{{base05}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Inserted</string>
|
||||
<key>scope</key>
|
||||
<string>markup.inserted</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0B}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Deleted</string>
|
||||
<key>scope</key>
|
||||
<string>markup.deleted</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base08}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Changed</string>
|
||||
<key>scope</key>
|
||||
<string>markup.changed</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0E}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Colors</string>
|
||||
<key>scope</key>
|
||||
<string>constant.other.color</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0C}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Regular Expressions</string>
|
||||
<key>scope</key>
|
||||
<string>string.regexp</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0C}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Escape Characters</string>
|
||||
<key>scope</key>
|
||||
<string>constant.character.escape</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0C}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Embedded</string>
|
||||
<key>scope</key>
|
||||
<string>punctuation.section.embedded, variable.interpolation</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#{{base0E}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Illegal</string>
|
||||
<key>scope</key>
|
||||
<string>invalid.illegal</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#{{base08}}</string>
|
||||
<key>foreground</key>
|
||||
<string>#{{base07}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Broken</string>
|
||||
<key>scope</key>
|
||||
<string>invalid.broken</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#{{base09}}</string>
|
||||
<key>foreground</key>
|
||||
<string>#{{base00}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Deprecated</string>
|
||||
<key>scope</key>
|
||||
<string>invalid.deprecated</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#{{base0F}}</string>
|
||||
<key>foreground</key>
|
||||
<string>#{{base07}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Unimplemented</string>
|
||||
<key>scope</key>
|
||||
<string>invalid.unimplemented</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#{{base03}}</string>
|
||||
<key>foreground</key>
|
||||
<string>#{{base07}}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>uuid</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
pip install -r base16/requirements.txt
|
||||
python base16/generator.py base16/abb.yml base16/template.tmTheme src/res/abb.tmTheme
|
|
@ -33,6 +33,7 @@ function enter-section() {
|
|||
log "INFO" "section $1 completed successfully"
|
||||
}
|
||||
|
||||
enter-section "BUILD: ABB code theme" "./generate-theme.sh" 0
|
||||
enter-section "Compiling template..." "typst compile template/main.typ --root . example.pdf" 0
|
||||
enter-section "TEST: local template import" "typst compile tests/local-import/main.typ --root ." 0
|
||||
enter-section "TEST: invalid config case 1" "typst compile tests/invalid-config/test-case-1.typ --root ." 1
|
||||
|
|
16
src/conf.typ
16
src/conf.typ
|
@ -9,9 +9,13 @@
|
|||
|
||||
// default configuration
|
||||
#let default-config = (
|
||||
lang: "en",
|
||||
region: "en",
|
||||
// language settings used to make decisions about hyphenation and others
|
||||
lang: "en", // ISO 3166 language code of text: "de", "en"
|
||||
region: "en", // region code
|
||||
// mark this thesis as draft
|
||||
// Adds preleminarry note page and watermark
|
||||
draft: true,
|
||||
// information about author(s)
|
||||
author: (
|
||||
name: "Sven Vogel",
|
||||
semester: 4,
|
||||
|
@ -22,12 +26,14 @@
|
|||
company: "ABB AG",
|
||||
supervisor: "Benny Goodman",
|
||||
matriculation-number: 123456789),
|
||||
// information about thesis
|
||||
thesis: (
|
||||
title: "Unofficial ABB/DHBW Typst template",
|
||||
subtitle: "for reports and thesises",
|
||||
subtitle: "for reports and thesises", // subtitle may be none
|
||||
submission-date: "23rd march 2020",
|
||||
timeframe: "1st january 2020 - 20th march 2020",
|
||||
kind: "T2000",
|
||||
// translated version of abstract, only used in case language is not english
|
||||
summary: none,
|
||||
abstract: none,
|
||||
preface: none,
|
||||
|
@ -37,9 +43,11 @@
|
|||
appendices: none),
|
||||
style: (
|
||||
header: (
|
||||
bottom-padding: 1.5em,
|
||||
content-padding: 1.5em,
|
||||
underline-top-padding: 0pt,
|
||||
logo-height: 3em),
|
||||
footer: (
|
||||
content-padding: 1.5em),
|
||||
page: (
|
||||
format: "a4",
|
||||
margin: (
|
||||
|
|
28
src/lib.typ
28
src/lib.typ
|
@ -7,9 +7,6 @@
|
|||
// Edited: 27.06.2024
|
||||
// License: MIT
|
||||
|
||||
// start of template pages and styles
|
||||
#let dhbw-template(config: dictionary, body) = [
|
||||
|
||||
#import "conf.typ": validate-config
|
||||
#import "style.typ": global_styled_doc, content_styled, end_styled
|
||||
#import "pages/titlepage.typ": new_title_page
|
||||
|
@ -21,18 +18,19 @@
|
|||
#import "pages/preface.typ": new-preface
|
||||
#import "pages/appendix.typ": show-appendix
|
||||
|
||||
// start of template pages and styles
|
||||
#let dhbw-template(config, body) = [
|
||||
#let config = validate-config(config)
|
||||
|
||||
#let doc = body
|
||||
|
||||
// set document properties
|
||||
#set document(
|
||||
author: config.author.name,
|
||||
keywords: config.thesis.keywords,
|
||||
title: config.thesis.title)
|
||||
|
||||
// apply global style to every element in the argument content
|
||||
#global_styled_doc(config: config, body: [
|
||||
#global_styled_doc(config)[
|
||||
|
||||
// set document properties
|
||||
#set document(
|
||||
author: config.author.name,
|
||||
keywords: config.thesis.keywords,
|
||||
title: config.thesis.title)
|
||||
|
||||
// configure text locale
|
||||
#set text(
|
||||
|
@ -72,11 +70,11 @@
|
|||
// mark end of prelude
|
||||
#metadata("prelude terminate") <end-of-prelude>
|
||||
|
||||
#content_styled(config: config, body: doc)
|
||||
#content_styled(config, doc)
|
||||
|
||||
#metadata("content terminate") <end-of-content>
|
||||
|
||||
#end_styled(config: config, body: [
|
||||
#end_styled(config)[
|
||||
// add bibliography if set
|
||||
#if "bibliography" in config.thesis and config.thesis.bibliography != none {
|
||||
pagebreak(weak: true)
|
||||
|
@ -87,6 +85,6 @@
|
|||
|
||||
// appendix
|
||||
#show-appendix(config: config)
|
||||
])
|
||||
])
|
||||
]
|
||||
]
|
||||
]
|
|
@ -6,23 +6,22 @@
|
|||
// Edited: 28.06.2024
|
||||
// License: MIT
|
||||
|
||||
#let new_abstract(config) = context [
|
||||
#let new_abstract(config) = context {
|
||||
|
||||
#pagebreak(weak: true)
|
||||
set align(center + horizon)
|
||||
|
||||
#let thesis = config.thesis
|
||||
|
||||
#pagebreak(weak: true)
|
||||
#align(center + horizon)[
|
||||
#if text.lang == "de" [
|
||||
= Zusammenfassung
|
||||
|
||||
#thesis.summary
|
||||
]
|
||||
|
||||
// only include summary when a language other than english is used
|
||||
if text.lang == "de" [
|
||||
// Summary is supposed to be on separate page
|
||||
#pagebreak(weak: true)
|
||||
= Abstract
|
||||
|
||||
#thesis.abstract
|
||||
= Zusammenfassung
|
||||
#config.thesis.summary
|
||||
]
|
||||
]
|
||||
|
||||
// abstract is supposed to be on separate page
|
||||
pagebreak(weak: true)
|
||||
|
||||
heading("Abstract")
|
||||
config.thesis.abstract
|
||||
}
|
|
@ -1,3 +1,10 @@
|
|||
// .--------------------------------------------------------------------------.
|
||||
// | Appendix |
|
||||
// '--------------------------------------------------------------------------'
|
||||
|
||||
// Author: Sven Vogel
|
||||
// Edited: 28.06.2024
|
||||
// License: MIT
|
||||
|
||||
#let show-appendix(config: dictionary) = context {
|
||||
counter(heading).update(0)
|
||||
|
|
|
@ -1,53 +1,62 @@
|
|||
// .--------------------------------------------------------------------------.
|
||||
// | Confidentiality Statement |
|
||||
// '--------------------------------------------------------------------------'
|
||||
|
||||
#let new_confidentiality_statement_page(config) = context [
|
||||
// Author: Sven Vogel
|
||||
// Edited: 28.06.2024
|
||||
// License: MIT
|
||||
|
||||
#pagebreak(weak: true)
|
||||
#let new_confidentiality_statement_page(config) = context {
|
||||
|
||||
#let thesis = config.thesis
|
||||
#let author = config.author
|
||||
pagebreak(weak: true)
|
||||
|
||||
#v(2em)
|
||||
#if text.lang == "de" [
|
||||
#text(size: 20pt, weight: "semibold", font: "Montserrat", "Sperrvermerk")
|
||||
let thesis = config.thesis
|
||||
let author = config.author
|
||||
|
||||
if text.lang == "de" [
|
||||
#heading(level: 1, "Sperrvermerk", supplement: [special])
|
||||
] else if text.lang == "en" [
|
||||
#text(size: 20pt, weight: "semibold", font: "Montserrat", "Confidentiality statement")
|
||||
#heading(level: 1, "Confidentiality Statement", supplement: [special])
|
||||
]
|
||||
|
||||
#if text.lang == "de" [
|
||||
if text.lang == "de" [
|
||||
Der Inhalt der dieser Arbeit mit dem Thema
|
||||
] else if text.lang == "en" [
|
||||
The content of this work with the topic
|
||||
]
|
||||
|
||||
#v(1em)
|
||||
v(1em)
|
||||
|
||||
#set align(center)
|
||||
set align(center)
|
||||
|
||||
*#thesis.title*
|
||||
text(weight: "bold", thesis.title)
|
||||
|
||||
#thesis.subtitle
|
||||
if thesis.subtitle != none {
|
||||
linebreak()
|
||||
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.
|
||||
] 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.
|
||||
]
|
||||
|
||||
#v(25%)
|
||||
set align(horizon)
|
||||
|
||||
#grid(
|
||||
grid(
|
||||
// set width of columns
|
||||
// we need two, so make both half the page width
|
||||
columns: (50%, 50%),
|
||||
row-gutter: 0.75em,
|
||||
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) }))
|
||||
]
|
||||
}
|
|
@ -1,52 +1,64 @@
|
|||
// .--------------------------------------------------------------------------.
|
||||
// | Declaration of Authorship |
|
||||
// '--------------------------------------------------------------------------'
|
||||
|
||||
#let new_declaration_of_authorship(config) = context [
|
||||
// Author: Sven Vogel
|
||||
// Edited: 28.06.2024
|
||||
// License: MIT
|
||||
|
||||
#pagebreak(weak: true)
|
||||
#let new_declaration_of_authorship(config) = context {
|
||||
|
||||
#let thesis = config.thesis
|
||||
#let author = config.author
|
||||
pagebreak(weak: true)
|
||||
|
||||
#v(2em)
|
||||
#if text.lang == "de" [
|
||||
#text(size: 20pt, weight: "semibold", font: "Montserrat", "Selbständigkeitserklärung")
|
||||
let thesis = config.thesis
|
||||
let author = config.author
|
||||
|
||||
if text.lang == "de" [
|
||||
#heading("Selbständigkeitserklärung")
|
||||
] else if text.lang == "en" [
|
||||
#text(size: 20pt, weight: "semibold", font: "Montserrat", "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
|
||||
] else if text.lang == "en" [
|
||||
I hereby certify that I have passed my examination 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)
|
||||
|
||||
*#thesis.title*
|
||||
text(weight: "bold", thesis.title)
|
||||
|
||||
#thesis.subtitle
|
||||
if thesis.subtitle != none {
|
||||
linebreak()
|
||||
thesis.subtitle
|
||||
}
|
||||
|
||||
#set align(left)
|
||||
set align(left)
|
||||
|
||||
#v(1em)
|
||||
v(1em)
|
||||
|
||||
#set par(justify: true)
|
||||
set par(justify: true)
|
||||
|
||||
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.
|
||||
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.
|
||||
] 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.
|
||||
]
|
||||
|
||||
#v(25%)
|
||||
set align(horizon)
|
||||
|
||||
#grid(
|
||||
grid(
|
||||
// set width of columns
|
||||
// we need two, so make both half the page width
|
||||
columns: (50%, 50%),
|
||||
row-gutter: 0.75em,
|
||||
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) }))
|
||||
|
||||
]
|
||||
}
|
|
@ -1,3 +1,10 @@
|
|||
// .--------------------------------------------------------------------------.
|
||||
// | Document Outline |
|
||||
// '--------------------------------------------------------------------------'
|
||||
|
||||
// Author: Sven Vogel
|
||||
// Edited: 28.06.2024
|
||||
// License: MIT
|
||||
|
||||
// render an outline of figures
|
||||
// with a specific title and filter by a specifc kind of figure
|
||||
|
@ -89,7 +96,7 @@
|
|||
show outline.entry.where(
|
||||
level: 1,
|
||||
): it => {
|
||||
v(18pt, weak: true)
|
||||
v(1.5em, weak: true)
|
||||
strong(it)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// .--------------------------------------------------------------------------.
|
||||
// | Preface |
|
||||
// '--------------------------------------------------------------------------'
|
||||
|
||||
// Author: Sven Vogel
|
||||
// Edited: 28.06.2024
|
||||
// License: MIT
|
||||
|
||||
#let new-preface(config) = {
|
||||
if config.thesis.preface != none {
|
||||
|
|
|
@ -1,47 +1,56 @@
|
|||
// .--------------------------------------------------------------------------.
|
||||
// | Preleminary release Notice |
|
||||
// '--------------------------------------------------------------------------'
|
||||
|
||||
#let new_prerelease_note(config) = context [
|
||||
// Author: Sven Vogel
|
||||
// Edited: 28.06.2024
|
||||
// License: MIT
|
||||
|
||||
#pagebreak(weak: true)
|
||||
#let new_prerelease_note(config) = context {
|
||||
|
||||
#let thesis = config.thesis
|
||||
#let author = config.author
|
||||
pagebreak(weak: true)
|
||||
|
||||
#v(2em)
|
||||
#if text.lang == "de" [
|
||||
#text(size: 20pt, weight: "semibold", font: "Montserrat", "Vorabfassung")
|
||||
let thesis = config.thesis
|
||||
let author = config.author
|
||||
|
||||
if text.lang == "de" [
|
||||
#heading("Vorabfassung")
|
||||
] else if text.lang == "en" [
|
||||
#text(size: 20pt, weight: "semibold", font: "Montserrat", "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
|
||||
] else if text.lang == "en" [
|
||||
This edition of the work with the subject
|
||||
]
|
||||
|
||||
#v(1em)
|
||||
v(1em)
|
||||
|
||||
#set align(center)
|
||||
set align(center)
|
||||
|
||||
*#thesis.title*
|
||||
text(weight: "bold", thesis.title)
|
||||
|
||||
#thesis.subtitle
|
||||
if thesis.subtitle != none {
|
||||
linebreak()
|
||||
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" [
|
||||
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()
|
||||
|
||||
]
|
||||
v(1em)
|
||||
h(1em)
|
||||
[#author.name, #datetime.today().display()]
|
||||
}
|
|
@ -1,3 +1,10 @@
|
|||
// .--------------------------------------------------------------------------.
|
||||
// | Titlepage |
|
||||
// '--------------------------------------------------------------------------'
|
||||
|
||||
// Author: Sven Vogel
|
||||
// Edited: 28.06.2024
|
||||
// License: MIT
|
||||
|
||||
#let new_title_page(config) = context [
|
||||
|
||||
|
@ -45,7 +52,7 @@
|
|||
#author.university
|
||||
]
|
||||
|
||||
#set align(bottom + left)
|
||||
#set align(horizon + left)
|
||||
|
||||
#if text.lang == "de" [
|
||||
#table(
|
||||
|
@ -101,8 +108,7 @@
|
|||
#context panic("no translation for language: ", text.lang)
|
||||
]
|
||||
|
||||
#pad(
|
||||
top: 1cm,
|
||||
#align(bottom,
|
||||
grid(
|
||||
// set width of columns
|
||||
// we need two, so make both half the page width
|
||||
|
@ -115,9 +121,7 @@
|
|||
#context panic("no translation for language: ", text.lang)
|
||||
]
|
||||
),
|
||||
align(right, {line(length: 6cm)})
|
||||
)
|
||||
)
|
||||
align(right, {line(length: 6cm)})))
|
||||
|
||||
#counter(page).update(0)
|
||||
]
|
||||
|
|
|
@ -1 +1,10 @@
|
|||
|
||||
// .--------------------------------------------------------------------------.
|
||||
// | Required packages for template use |
|
||||
// '--------------------------------------------------------------------------'
|
||||
|
||||
// Author: Sven Vogel
|
||||
// Edited: 05.07.2024
|
||||
// License: MIT
|
||||
|
||||
#import "@preview/glossarium:0.4.1": *
|
|
@ -1,5 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<!--
|
||||
.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
|
||||
| ABB logo |
|
||||
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
|
||||
|
||||
Author: N/A
|
||||
Changed: Sven Vogel
|
||||
Edited: 05.07.2024
|
||||
License: MIT
|
||||
|
||||
Source: https://commons.wikimedia.org/wiki/File:ABB_logo.svg
|
||||
|
||||
Created with Inkscape (http://www.inkscape.org/)
|
||||
-->
|
||||
|
||||
<svg
|
||||
width="385.80621mm"
|
||||
|
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.7 KiB |
|
@ -1,5 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<!--
|
||||
.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
|
||||
| DHBW logo |
|
||||
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
|
||||
|
||||
Author: N/A
|
||||
Changed: Sven Vogel
|
||||
Edited: 05.07.2024
|
||||
License: MIT
|
||||
|
||||
Source: https://upload.wikimedia.org/wikipedia/de/1/1d/DHBW-Logo.svg
|
||||
|
||||
Created with Inkscape (http://www.inkscape.org/)
|
||||
-->
|
||||
|
||||
<svg
|
||||
width="353.7124mm"
|
||||
|
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
|
@ -0,0 +1,561 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Template: Chris Kempson, Scheme: Sven Vogel</string>
|
||||
<key>name</key>
|
||||
<string>Base16 ABB Base16</string>
|
||||
<key>semanticClass</key>
|
||||
<string>theme.base16.abb-base16</string>
|
||||
<key>colorSpaceName</key>
|
||||
<string>sRGB</string>
|
||||
<key>gutterSettings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#fafafa</string>
|
||||
<key>divider</key>
|
||||
<string>#fafafa</string>
|
||||
<key>foreground</key>
|
||||
<string>#6e6e6e</string>
|
||||
<key>selectionBackground</key>
|
||||
<string>#f0f0f0</string>
|
||||
<key>selectionForeground</key>
|
||||
<string>#000000</string>
|
||||
</dict>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#ffffff</string>
|
||||
<key>caret</key>
|
||||
<string>#000000</string>
|
||||
<key>foreground</key>
|
||||
<string>#000000</string>
|
||||
<key>invisibles</key>
|
||||
<string>#6e6e6e</string>
|
||||
<key>lineHighlight</key>
|
||||
<string>#6e6e6e55</string>
|
||||
<key>selection</key>
|
||||
<string>#f0f0f0</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>#000000</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>#6e6e6e</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>#000000</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Delimiters</string>
|
||||
<key>scope</key>
|
||||
<string>none</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#000000</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>#000000</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Keywords</string>
|
||||
<key>scope</key>
|
||||
<string>keyword</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#ff000f</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Variables</string>
|
||||
<key>scope</key>
|
||||
<string>variable</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#262626</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>#007a33</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>#6e6e6e</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>#ff000f</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>#fafafa</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>#007a33</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Storage</string>
|
||||
<key>scope</key>
|
||||
<string>storage</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#ff000f</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>#262626</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>#004c97</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>#004c97</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Floats</string>
|
||||
<key>scope</key>
|
||||
<string>none</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#004c97</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Boolean</string>
|
||||
<key>scope</key>
|
||||
<string>none</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#004c97</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Constants</string>
|
||||
<key>scope</key>
|
||||
<string>constant</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#004c97</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>#262626</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>#004c97</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>#007a33</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>#ff000f</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Values</string>
|
||||
<key>scope</key>
|
||||
<string>none</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#004c97</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>#007a33</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>#004c97</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>#ff000f</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>#ff000f</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>#004c97</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>#262626</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>#004c97</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>#262626</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>#004c97</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>#f0f0f0</string>
|
||||
<key>foreground</key>
|
||||
<string>#000000</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>#004c97</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>#262626</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>#ff000f</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>#262626</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>#262626</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>#262626</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>#ff000f</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>#262626</string>
|
||||
<key>foreground</key>
|
||||
<string>#fafafa</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>#004c97</string>
|
||||
<key>foreground</key>
|
||||
<string>#ffffff</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>#6e6e6e</string>
|
||||
<key>foreground</key>
|
||||
<string>#fafafa</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>#6e6e6e</string>
|
||||
<key>foreground</key>
|
||||
<string>#fafafa</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>uuid</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -9,30 +9,26 @@
|
|||
|
||||
#let watermark-color = luma(50%).transparentize(70%)
|
||||
|
||||
#let watermark() = rotate(-45deg,
|
||||
rect(radius: 1em, inset: 1em, stroke: watermark-color, {
|
||||
text(size: 48pt, weight: "bold", fill: watermark-color, "DRAFT")
|
||||
linebreak()
|
||||
text(size: 14pt, weight: "bold", fill: watermark-color)[
|
||||
This page is part of a preliminary
|
||||
#linebreak()
|
||||
document version.
|
||||
#linebreak()
|
||||
#text(size: 10pt, "Further usage without the authors consent is not permitted.")
|
||||
]
|
||||
}))
|
||||
#let watermark(config) = if config.draft {
|
||||
rotate(-22.5deg)[
|
||||
#rect(
|
||||
radius: 1em,
|
||||
inset: 1em,
|
||||
stroke: watermark-color)[
|
||||
#text(size: 4em, weight: "bold", fill: watermark-color, "DRAFT")
|
||||
#linebreak()
|
||||
#text(size: 1.25em, weight: "bold", fill: watermark-color)[
|
||||
This page is part of a preliminary
|
||||
#linebreak()
|
||||
document version.
|
||||
#linebreak()
|
||||
#text(size: 0.75em, "Further usage without the authors consent is not permitted.")]]]}
|
||||
|
||||
// global style of document
|
||||
#let global_styled_doc(config: dictionary, body: content) = context {
|
||||
#let global_styled_doc(config, body) = {
|
||||
let thesis = config.thesis
|
||||
let style = config.style
|
||||
|
||||
// set page geometry
|
||||
// and paper format
|
||||
set page(
|
||||
paper: style.page.format,
|
||||
margin: style.page.margin)
|
||||
|
||||
set text(
|
||||
size: style.text.size,
|
||||
ligatures: true,
|
||||
|
@ -52,15 +48,9 @@
|
|||
show heading.where(level: 3): it => v(0.5em) + it + v(0.25em)
|
||||
|
||||
// set theme for code blocks
|
||||
set raw(tab-size: 4, theme: "res/github.tmTheme")
|
||||
show raw.where(block: true): code => {
|
||||
show raw.line: line => {
|
||||
text(fill: gray)[#line.number]
|
||||
h(1em)
|
||||
line.body
|
||||
}
|
||||
code
|
||||
}
|
||||
set raw(tab-size: 4, theme: "res/abb.tmTheme")
|
||||
|
||||
show figure: set block(breakable: true)
|
||||
|
||||
set block(spacing: 2em)
|
||||
set par(
|
||||
|
@ -74,14 +64,15 @@
|
|||
|
||||
set heading(numbering: none)
|
||||
set page(
|
||||
foreground: if config.draft {
|
||||
watermark()
|
||||
},
|
||||
header-ascent: style.header.underline-top-padding + style.header.bottom-padding,
|
||||
footer-descent: 1em,
|
||||
paper: style.page.format,
|
||||
foreground: watermark(config),
|
||||
header-ascent: style.header.content-padding,
|
||||
footer-descent: style.header.content-padding,
|
||||
margin: (
|
||||
top: style.page.margin.top + style.header.logo-height + style.header.underline-top-padding + style.header.bottom-padding,
|
||||
bottom: style.page.margin.bottom + 1em),
|
||||
top: style.page.margin.top + style.header.logo-height + style.header.underline-top-padding + style.header.content-padding,
|
||||
bottom: style.page.margin.bottom + style.footer.content-padding,
|
||||
left: style.page.margin.left,
|
||||
right: style.page.margin.right),
|
||||
numbering: (..nums) => {
|
||||
let current-page = here().page()
|
||||
if current-page == 1{
|
||||
|
@ -159,19 +150,14 @@
|
|||
body
|
||||
}
|
||||
|
||||
#let content_styled(config: dictionary, body: content) = [
|
||||
#set heading(numbering: "1.")
|
||||
#let content_styled(config, body) = {
|
||||
set heading(numbering: "1.")
|
||||
|
||||
#let thesis = config.thesis
|
||||
body
|
||||
}
|
||||
|
||||
#body
|
||||
]
|
||||
#let end_styled(config, body) = {
|
||||
set heading(numbering: "1.")
|
||||
|
||||
#let end_styled(config: dictionary, body: content) = [
|
||||
|
||||
#set heading(numbering: "1.")
|
||||
|
||||
#let thesis = config.thesis
|
||||
|
||||
#body
|
||||
]
|
||||
body
|
||||
}
|
||||
|
|
|
@ -3,33 +3,32 @@
|
|||
#import "glossary.typ": glossary
|
||||
#import "abstract.typ": abstract, summary
|
||||
|
||||
#show: dhbw-template.with(
|
||||
config: (
|
||||
lang: "en",
|
||||
region: "en",
|
||||
author: (
|
||||
name: "Sven Vogel",
|
||||
semester: 4,
|
||||
program: "Informationtechnology",
|
||||
course: "TINF19IT1",
|
||||
faculty: "Technik",
|
||||
university: "DHBW Mannheim",
|
||||
company: "ABB AG",
|
||||
supervisor: "Benny Goodman",
|
||||
matriculation-number: 123456789),
|
||||
thesis: (
|
||||
title: "Unofficial ABB/DHBW Typst template",
|
||||
subtitle: "for reports and thesises",
|
||||
submission-date: "23rd march 2020",
|
||||
timeframe: "1st january 2020 - 20th march 2020",
|
||||
kind: "T2000",
|
||||
summary: summary,
|
||||
abstract: abstract,
|
||||
preface: include "preface.typ",
|
||||
keywords: ( "IT", "other stuff" ),
|
||||
bibliography: bibliography("refs.bib"),
|
||||
glossary: glossary,
|
||||
appendices: include "appendix.typ")))
|
||||
#show: dhbw-template.with((
|
||||
lang: "en",
|
||||
region: "en",
|
||||
author: (
|
||||
name: "Sven Vogel",
|
||||
semester: 4,
|
||||
program: "Informationtechnology",
|
||||
course: "TINF19IT1",
|
||||
faculty: "Technik",
|
||||
university: "DHBW Mannheim",
|
||||
company: "ABB AG",
|
||||
supervisor: "Benny Goodman",
|
||||
matriculation-number: 123456789),
|
||||
thesis: (
|
||||
title: "Unofficial ABB/DHBW Typst template",
|
||||
subtitle: "for reports and thesises",
|
||||
submission-date: "23rd march 2020",
|
||||
timeframe: "1st january 2020 - 20th march 2020",
|
||||
kind: "T2000",
|
||||
summary: summary,
|
||||
abstract: abstract,
|
||||
preface: include "preface.typ",
|
||||
keywords: ( "IT", "other stuff" ),
|
||||
bibliography: bibliography("refs.bib"),
|
||||
glossary: glossary,
|
||||
appendices: include "appendix.typ")))
|
||||
|
||||
#import "@preview/wrap-it:0.1.0": wrap-content
|
||||
|
||||
|
|
Loading…
Reference in New Issue