Compare commits

...

6 Commits

Author SHA1 Message Date
Sven Vogel eb21aeee99 bumped version to 0.4.1
Gitea Action for checking typst compilation / run-ci-linux (push) Successful in 25s Details
release / release (push) Successful in 1m9s Details
2024-08-22 11:23:28 +02:00
Sven Vogel f237beb6fa deprecate theme (#48) 2024-08-22 11:22:34 +02:00
Sven Vogel 2b966e42a0 fix confidentiality statement not showing up in outline (#47) 2024-08-22 10:53:37 +02:00
Sven Vogel 39c620c270 add domain name after url text (#46) 2024-08-22 10:51:35 +02:00
Sven Vogel c60d81bd2d add acronym to glossary if specified (#45) 2024-08-22 10:43:13 +02:00
Sven Vogel a95b42bac3 make weight of list of figures regular (#44) 2024-08-22 10:23:09 +02:00
11 changed files with 25 additions and 620 deletions

View File

@ -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

View File

@ -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)

View File

@ -1 +0,0 @@
pyyaml

View File

@ -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>

View File

@ -180,10 +180,12 @@ SOFTWARE.*/
#block(
par(hanging-indent: 1em)[
#text(weight: "bold", entry.short)
#if hasLong {
#if hasLong and hasDesc [
(#text(entry.long))
] else if hasLong {
text(entry.long)
}
#if hasLong and hasDesc [:]
#if hasDesc [ #sym.dash.en ]
#if hasDesc [ #desc ]
#if disable-back-references != true {
term_references

View File

@ -76,7 +76,7 @@
// 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, group: glossary_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

View File

@ -40,7 +40,13 @@
}
#let url(label, content) = {
link(label)[#underline(offset: 2pt, stroke: 0.5pt + blue, text(fill: blue, 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

View File

@ -15,9 +15,9 @@
let author = config.author
if text.lang == "de" [
#heading(level: 1, "Sperrvermerk", supplement: [special])
#heading(level: 1, "Sperrvermerk")
] else if text.lang == "en" [
#heading(level: 1, "Confidentiality Statement", supplement: [special])
#heading(level: 1, "Confidentiality Statement")
]
if text.lang == "de" [

View File

@ -16,6 +16,15 @@
let elems = query(figure.where(kind: kind), here())
let count = elems.len()
show outline.entry: it => {
link(it.element.location())[
#v(12pt, weak: true)
#text(weight: "regular", it.body)
#box(width: 1fr, it.fill)
#[ #it.page]
]
}
// only show outline if there is something to list
if count > 0 {
pagebreak(weak: true)

View File

@ -68,7 +68,7 @@ $
lorem(200),
)
#url("https://github.com", "text (github.com)")
#url("https://github.com", "text")
#lorem(50)

View File

@ -1,6 +1,6 @@
[package]
name = "dhbw-abb-typst-template"
version = "0.1.0"
version = "0.4.1"
entrypoint = "src/template.typ"
authors = ["Sven Vogel <sven.vogel1@de.abb.com>"]
license = "MIT"