From f1206f3d1eb7fea3b05f850d6db049cd9058c716 Mon Sep 17 00:00:00 2001 From: Rdeisenroth Date: Tue, 20 Aug 2024 18:46:14 +0200 Subject: [PATCH 1/5] improve makefiles (fix racecondition for cleaning) --- exercises/Makefile | 74 +++++++++++++++++++++++++----------- lecture/Makefile | 74 +++++++++++++++++++++++++----------- misc/linux_commands/Makefile | 73 ++++++++++++++++++++++++----------- 3 files changed, 153 insertions(+), 68 deletions(-) diff --git a/exercises/Makefile b/exercises/Makefile index 43758f2..662e349 100755 --- a/exercises/Makefile +++ b/exercises/Makefile @@ -2,10 +2,19 @@ OUT_DIR := pdfout/ FILES := $(wildcard Aufgabe*.tex) +# Compile LaTeX with jobname and environment variables +# $1: tex file to compile +# $2: jobname (output file name without extension) +# $3: environment variables +# $4: directory to compile in define compile_latex_with_jobname_and_env cd $(4) && $(3) latexmk --shell-escape -synctex=1 -interaction=nonstopmode -file-line-error -lualatex -jobname=$(2) "$(1)" endef +# Build LaTeX with jobname and environment variables, compile and copy to output directory +# $1: tex file to compile +# $2: jobname (output file name without extension) +# $3: environment variables define build_latex_with_jobname_and_env $(eval DIR := $(dir $(1))) $(eval FILE := $(notdir $(1))) @@ -17,7 +26,6 @@ define build_latex_with_jobname_and_env endef all: - $(MAKE) clean $(MAKE) compile $(FILES:.tex=.tex.regular): @@ -47,31 +55,51 @@ $(FILES:.tex=.tex.sol.high-contrast): compile: $(FILES:.tex=.tex.regular) $(FILES:.tex=.tex.sol.regular) $(FILES:.tex=.tex.dark) $(FILES:.tex=.tex.sol.dark) $(FILES:.tex=.tex.high-contrast) $(FILES:.tex=.tex.sol.high-contrast) @echo -e "\e[1;42mAll Done. PDFs can be found in $(OUT_DIR)\e[0m" +# Remove files with a specific pattern recursively +# $1: pattern to match +# $2: additional global find parameters +# $3: additional directories to exclude +# Example: $(call remove_files,**/*.pdf, -maxdepth 1) +# explanation of find parameters: +# -depth: process each directory's contents before the directory itself (otherwise, the directory itself would be deleted first leading to errors when processing the contents) +# -not \( -path "*/.git/*" -prune \): exclude .git directories +# -wholename '$(1)': match the pattern +# -exec rm -rf {} \;: remove the matched files (-r also works on files, but is needed for directories) +define remove_files + @find . $(if $(strip $(2)),$(2),) -depth -not \( -path "*/.git/*" $(foreach dir,$(strip $(3)),-o -path "*/$(dir)*") -prune \) -wholename '$(1)' -exec rm -rf {} \; +endef + clean: @echo -e "\e[1;34mCleaning up leftover build files...$<\e[0m" @latexmk -C -f - @find . -wholename '**/options.cfg' -delete - @find . -maxdepth 1 -wholename '**/*.pdf' -delete - @find . -wholename '**/*.aux' -delete - @find . -wholename '**/*.fdb_latexmk' -delete - @find . -wholename '**/*.fls' -delete - @find . -wholename '**/*.len' -delete - @find . -wholename '**/*.listing' -delete - @find . -wholename '**/*.log' -delete - @find . -wholename '**/*.out' -delete - @find . -wholename '**/*.synctex.gz' -delete - @find . -wholename '**/*.toc' -delete - @find . -wholename '**/*.nav' -delete - @find . -wholename '**/*.snm' -delete - @find . -wholename '**/*.vrb' -delete - @find . -wholename '**/*.bbl' -delete - @find . -wholename '**/*.blg' -delete - @find . -wholename '**/*.idx' -delete - @find . -wholename '**/*.ilg' -delete - @find . -wholename '**/*.ind' -delete - @find . -wholename '**/*.pyg' -delete - @find . -wholename '**/*.bak[0-9]*' -delete - @find . -wholename '**/_minted-*' -delete + $(call remove_files,**/options.cfg) + $(call remove_files,**/*.pdf,,$(OUT_DIR) media) + $(call remove_files,**/*.aux) + $(call remove_files,**/*.fdb_latexmk) + $(call remove_files,**/*.fls) + $(call remove_files,**/*.len) + $(call remove_files,**/*.listing) + $(call remove_files,**/*.log) + $(call remove_files,**/*.out) + $(call remove_files,**/*.synctex.gz) + $(call remove_files,**/*.toc) + $(call remove_files,**/*.nav) + $(call remove_files,**/*.snm) + $(call remove_files,**/*.vrb) + $(call remove_files,**/*.bbl) + $(call remove_files,**/*.bbl-SAVE-ERROR) + $(call remove_files,**/*.bcf-SAVE-ERROR) + $(call remove_files,**/*.blg) + $(call remove_files,**/*.idx) + $(call remove_files,**/*.ilg) + $(call remove_files,**/*.ind) + $(call remove_files,**/*.pyg) + $(call remove_files,**/*.bcf) + $(call remove_files,**/*.xmpdata) + $(call remove_files,**/*.xmpi) + $(call remove_files,**/*.run.xml) + $(call remove_files,**/*.bak[0-9]*) + $(call remove_files,**/_minted-*) @echo -e "\e[1;44mDone cleaning up leftover build files.$<\e[0m" cleanBuild: diff --git a/lecture/Makefile b/lecture/Makefile index be4d309..eefed57 100644 --- a/lecture/Makefile +++ b/lecture/Makefile @@ -2,10 +2,19 @@ TOPTARGETS := all clean OUT_DIR := pdfout/ FILES := $(wildcard */*.tex) +# Compile LaTeX with jobname and environment variables +# $1: tex file to compile +# $2: jobname (output file name without extension) +# $3: environment variables +# $4: directory to compile in define compile_latex_with_jobname_and_env cd $(4) && $(3) latexmk --shell-escape -synctex=1 -interaction=nonstopmode -file-line-error -lualatex -jobname=$(2) "$(1)" endef +# Build LaTeX with jobname and environment variables, compile and copy to output directory +# $1: tex file to compile +# $2: jobname (output file name without extension) +# $3: environment variables define build_latex_with_jobname_and_env $(eval DIR := $(dir $(1))) $(eval FILE := $(notdir $(1))) @@ -17,7 +26,6 @@ define build_latex_with_jobname_and_env endef all: - $(MAKE) clean $(MAKE) compile $(FILES:.tex=.tex.regular): @@ -67,31 +75,51 @@ endef $(eval FILE := $(patsubst %.tex.highcontrast,%.tex,$@)) $(call recursive_cp_helper,$(FILE),$(patsubst %.tex,%-high-contrast,$(notdir $(FILE))),DARK_MODE=2) +# Remove files with a specific pattern recursively +# $1: pattern to match +# $2: additional global find parameters +# $3: additional directories to exclude +# Example: $(call remove_files,**/*.pdf, -maxdepth 1) +# explanation of find parameters: +# -depth: process each directory's contents before the directory itself (otherwise, the directory itself would be deleted first leading to errors when processing the contents) +# -not \( -path "*/.git/*" -prune \): exclude .git directories +# -wholename '$(1)': match the pattern +# -exec rm -rf {} \;: remove the matched files (-r also works on files, but is needed for directories) +define remove_files + @find . $(if $(strip $(2)),$(2),) -depth -not \( -path "*/.git/*" $(foreach dir,$(strip $(3)),-o -path "*/$(dir)*") -prune \) -wholename '$(1)' -exec rm -rf {} \; +endef + clean: @echo -e "\e[1;34mCleaning up leftover build files...$<\e[0m" @latexmk -C -f - @find . -wholename '**/options.cfg' -delete - @find . -maxdepth 2 -wholename '**/*.pdf' -delete - @find . -wholename '**/*.aux' -delete - @find . -wholename '**/*.fdb_latexmk' -delete - @find . -wholename '**/*.fls' -delete - @find . -wholename '**/*.len' -delete - @find . -wholename '**/*.listing' -delete - @find . -wholename '**/*.log' -delete - @find . -wholename '**/*.out' -delete - @find . -wholename '**/*.synctex.gz' -delete - @find . -wholename '**/*.toc' -delete - @find . -wholename '**/*.nav' -delete - @find . -wholename '**/*.snm' -delete - @find . -wholename '**/*.vrb' -delete - @find . -wholename '**/*.bbl' -delete - @find . -wholename '**/*.blg' -delete - @find . -wholename '**/*.idx' -delete - @find . -wholename '**/*.ilg' -delete - @find . -wholename '**/*.ind' -delete - @find . -wholename '**/*.pyg' -delete - @find . -wholename '**/*.bak[0-9]*' -delete - @find . -wholename '**/_minted-*' -delete + $(call remove_files,**/options.cfg) + $(call remove_files,**/*.pdf,,$(OUT_DIR) media) + $(call remove_files,**/*.aux) + $(call remove_files,**/*.fdb_latexmk) + $(call remove_files,**/*.fls) + $(call remove_files,**/*.len) + $(call remove_files,**/*.listing) + $(call remove_files,**/*.log) + $(call remove_files,**/*.out) + $(call remove_files,**/*.synctex.gz) + $(call remove_files,**/*.toc) + $(call remove_files,**/*.nav) + $(call remove_files,**/*.snm) + $(call remove_files,**/*.vrb) + $(call remove_files,**/*.bbl) + $(call remove_files,**/*.bbl-SAVE-ERROR) + $(call remove_files,**/*.bcf-SAVE-ERROR) + $(call remove_files,**/*.blg) + $(call remove_files,**/*.idx) + $(call remove_files,**/*.ilg) + $(call remove_files,**/*.ind) + $(call remove_files,**/*.pyg) + $(call remove_files,**/*.bcf) + $(call remove_files,**/*.xmpdata) + $(call remove_files,**/*.xmpi) + $(call remove_files,**/*.run.xml) + $(call remove_files,**/*.bak[0-9]*) + $(call remove_files,**/_minted-*) @echo -e "\e[1;44mDone cleaning up leftover build files.$<\e[0m" cleanBuild: diff --git a/misc/linux_commands/Makefile b/misc/linux_commands/Makefile index 7e725a2..0672390 100644 --- a/misc/linux_commands/Makefile +++ b/misc/linux_commands/Makefile @@ -2,10 +2,19 @@ TOPTARGETS := all clean OUT_DIR := pdfout/ FILES := $(wildcard *.tex) +# Compile LaTeX with jobname and environment variables +# $1: tex file to compile +# $2: jobname (output file name without extension) +# $3: environment variables +# $4: directory to compile in define compile_latex_with_jobname_and_env cd $(4) && $(3) latexmk --shell-escape -synctex=1 -interaction=nonstopmode -file-line-error -lualatex -jobname=$(2) "$(1)" endef +# Build LaTeX with jobname and environment variables, compile and copy to output directory +# $1: tex file to compile +# $2: jobname (output file name without extension) +# $3: environment variables define build_latex_with_jobname_and_env $(eval DIR := $(dir $(1))) $(eval FILE := $(notdir $(1))) @@ -35,31 +44,51 @@ $(FILES:.tex=.tex.highcontrast): compile: $(FILES:.tex=.tex.regular) $(FILES:.tex=.tex.darkmode) $(FILES:.tex=.tex.highcontrast) @echo -e "\e[1;42mAll Done. PDFs can be found in $(OUT_DIR)\e[0m" +# Remove files with a specific pattern recursively +# $1: pattern to match +# $2: additional global find parameters +# $3: additional directories to exclude +# Example: $(call remove_files,**/*.pdf, -maxdepth 1) +# explanation of find parameters: +# -depth: process each directory's contents before the directory itself (otherwise, the directory itself would be deleted first leading to errors when processing the contents) +# -not \( -path "*/.git/*" -prune \): exclude .git directories +# -wholename '$(1)': match the pattern +# -exec rm -rf {} \;: remove the matched files (-r also works on files, but is needed for directories) +define remove_files + @find . $(if $(strip $(2)),$(2),) -depth -not \( -path "*/.git/*" $(foreach dir,$(strip $(3)),-o -path "*/$(dir)*") -prune \) -wholename '$(1)' -exec rm -rf {} \; +endef + clean: @echo -e "\e[1;34mCleaning up leftover build files...$<\e[0m" @latexmk -C -f - @find . -wholename '**/options.cfg' -delete - @find . -maxdepth 2 -wholename '**/*.pdf' -delete - @find . -wholename '**/*.aux' -delete - @find . -wholename '**/*.fdb_latexmk' -delete - @find . -wholename '**/*.fls' -delete - @find . -wholename '**/*.len' -delete - @find . -wholename '**/*.listing' -delete - @find . -wholename '**/*.log' -delete - @find . -wholename '**/*.out' -delete - @find . -wholename '**/*.synctex.gz' -delete - @find . -wholename '**/*.toc' -delete - @find . -wholename '**/*.nav' -delete - @find . -wholename '**/*.snm' -delete - @find . -wholename '**/*.vrb' -delete - @find . -wholename '**/*.bbl' -delete - @find . -wholename '**/*.blg' -delete - @find . -wholename '**/*.idx' -delete - @find . -wholename '**/*.ilg' -delete - @find . -wholename '**/*.ind' -delete - @find . -wholename '**/*.pyg' -delete - @find . -wholename '**/*.bak[0-9]*' -delete - @find . -wholename '**/_minted-*' -delete + $(call remove_files,**/options.cfg) + $(call remove_files,**/*.pdf,,$(OUT_DIR) media) + $(call remove_files,**/*.aux) + $(call remove_files,**/*.fdb_latexmk) + $(call remove_files,**/*.fls) + $(call remove_files,**/*.len) + $(call remove_files,**/*.listing) + $(call remove_files,**/*.log) + $(call remove_files,**/*.out) + $(call remove_files,**/*.synctex.gz) + $(call remove_files,**/*.toc) + $(call remove_files,**/*.nav) + $(call remove_files,**/*.snm) + $(call remove_files,**/*.vrb) + $(call remove_files,**/*.bbl) + $(call remove_files,**/*.bbl-SAVE-ERROR) + $(call remove_files,**/*.bcf-SAVE-ERROR) + $(call remove_files,**/*.blg) + $(call remove_files,**/*.idx) + $(call remove_files,**/*.ilg) + $(call remove_files,**/*.ind) + $(call remove_files,**/*.pyg) + $(call remove_files,**/*.bcf) + $(call remove_files,**/*.xmpdata) + $(call remove_files,**/*.xmpi) + $(call remove_files,**/*.run.xml) + $(call remove_files,**/*.bak[0-9]*) + $(call remove_files,**/_minted-*) @echo -e "\e[1;44mDone cleaning up leftover build files.$<\e[0m" cleanBuild: From fbb4954539c9be1bffe13317eab9efe040d10358 Mon Sep 17 00:00:00 2001 From: Rdeisenroth Date: Tue, 20 Aug 2024 18:47:06 +0200 Subject: [PATCH 2/5] update linter settings --- .pre-commit-config.yaml | 15 +- codingchallenges/2021/2048-advanced.py | 6 +- latexindent.yaml | 487 +----------------- lecture/03_Variablen/03_Variablen.tex | 2 +- .../listings/bsp_recursion_1.kts | 1 - .../listings/bsp_recursion_2.kts | 1 - shared/globalCommon.tex | 78 +-- 7 files changed, 53 insertions(+), 537 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 89719c4..25d7c63 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,24 +2,23 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 + rev: v4.6.0 hooks: - - id: mixed-line-ending - args: [--fix=lf] - id: end-of-file-fixer - id: check-yaml - # - id: check-added-large-files + - id: mixed-line-ending + args: [--fix=lf] - repo: https://github.com/cmhughes/latexindent.pl.git - rev: V3.18 + rev: V3.24.4 hooks: - id: latexindent args: ["--overwriteIfDifferent", "--silent", "-l=latexindent.yaml"] -- repo: https://github.com/pre-commit/mirrors-autopep8 - rev: 'v1.7.0' # Use the sha / tag you want to point at +- repo: https://github.com/hhatto/autopep8 + rev: 'v2.3.1' # Use the sha / tag you want to point at hooks: - id: autopep8 - repo: https://github.com/editorconfig-checker/editorconfig-checker.python - rev: '2.6.1' # pick a git hash / tag to point to + rev: '2.7.3' # pick a git hash / tag to point to hooks: - id: editorconfig-checker exclude_types: [tex,python] diff --git a/codingchallenges/2021/2048-advanced.py b/codingchallenges/2021/2048-advanced.py index 98cf21c..963ac7d 100644 --- a/codingchallenges/2021/2048-advanced.py +++ b/codingchallenges/2021/2048-advanced.py @@ -118,8 +118,8 @@ def printField(state: list, style: int = 1, color_new: bool = False, new_fields: borderspacer = "|" betweenspacer = "|" else: - hlineupper = f"{('╭'+ '-' * maxLength+'╮')*len(state)}\n" - hlinelower = f"{('╰'+ '-' * maxLength+'╯')*len(state)}\n" + hlineupper = f"{('╭' + '-' * maxLength+'╮')*len(state)}\n" + hlinelower = f"{('╰' + '-' * maxLength+'╯')*len(state)}\n" borderspacer = "|" betweenspacer = "||" for y, row in enumerate(state): @@ -152,7 +152,7 @@ def printGameState(state: list, game_round: int, new_fields: list = [[3, 0]]): print("\033[H\033[J\033[0m", end="") print(f"Zug: {game_round}") print( - f"Höchster Wert: {max(map(lambda x : max(map(lambda y : y if isinstance(y,int) else 0, x)),state))}") + f"Höchster Wert: {max(map(lambda x: max(map(lambda y: y if isinstance(y, int) else 0, x)), state))}") printField(state, display_style, color_new, new_fields) diff --git a/latexindent.yaml b/latexindent.yaml index 5a414a0..7efff74 100644 --- a/latexindent.yaml +++ b/latexindent.yaml @@ -1,149 +1,24 @@ # Formatting Settings by Ruben Deisenroth -# -# based on defaultSettings.yaml for latexindent.pl, version 3.15, 2022-01-21 -# a script that aims to -# beautify .tex, .sty, .cls files -# -# (or latexindent.exe if you're on Windows) -# -#--------------------------------------------------------------------------------------- -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# See http://www.gnu.org/licenses/. -# -# Chris Hughes, 2017 -# -# For all communication, please visit: https://github.com/cmhughes/latexindent.pl -# -#--------------------------------------------------------------------------------------- - -# latexindent can be called to act on a file without using the file's extension, -# e.g, simply -# latexindent myfile -# in which case the choice of file extension is chosen -# according to the choices made in fileExtensionPreference -# Other file extensions can be added. fileExtensionPreference: .tex: 1 .sty: 2 .cls: 3 .bib: 4 + .def: 5 -# default file extension of backup file (if -w switch is active) -# for example, if your .tex file is called -# myfile.tex -# and you specify the backupExtension as BACKUP.bak then your -# backup file will be -# myfileBACKUP.bak -backupExtension: .bak - -# only one backup per file: -# - if onlyOneBackUp is 0 then, as a safety measure, -# the number on the extension increments by 1 each time: -# -# myfile.bak0, myfile.bak1, myfile.bak2 -# - if you set onlyOnebackUp to 1, then the backup file will -# be overwritten each time (not recommended until you trust the script) -onlyOneBackUp: 0 - -# some users may want a finite number of backup files, -# say at most 3; in which case, they can change this maxNumberOfBackUps. -# -# If maxNumberOfBackUps is set to 0 (or less) then infinitely -# many backups are possible, unless onlyOneBackUp is switched on -maxNumberOfBackUps: 0 - -# some users may wish to cycle through back up files. -# -# for example, with maxNumberOfBackUps: 4, they may -# wish to delete the oldest back up file, and keep only the most recent. -# -# copy myfile.bak1 to myfile.bak0 -# copy myfile.bak2 to myfile.bak1 -# copy myfile.bak3 to myfile.bak2 -# copy myfile.bak4 to myfile.bak3 -# -# the back up will be written to myfile.bak4 -cycleThroughBackUps: 0 - -# preferences for information displayed in the log file -logFilePreferences: - showEveryYamlRead: 1 - showAmalgamatedSettings: 0 - showDecorationStartCodeBlockTrace: 0 - showDecorationFinishCodeBlockTrace: 0 - endLogFileWith: "--------------" - showGitHubInfoFooter: 1 - Dumper: - Terse: 1 - Indent: 1 - Useqq: 1 - Deparse: 1 - Quotekeys: 0 - Sortkeys: 1 - Pair: " => " - -# verbatim environments specified -# in this field will not be changed at all! verbatimEnvironments: - verbatim: 1 - lstlisting: 1 - minted: 1 codeBlock: 1 -# verbatim commands such as \verb! body !, \lstinline$something else$ verbatimCommands: - verb: 1 - lstinline: 1 inlinejava: 1 inlineracket: 1 -# no indent blocks (not necessarily verbatim -# environments) which are marked as %\begin{noindent} -# or anything else that you detail in the following -noIndentBlock: - noindent: 1 - cmhtest: 1 - -# \begin{document} and \end{document} are treated differently -# by latexindent within filecontents environments -fileContentsEnvironments: - filecontents: 1 - filecontents*: 1 - # indent preamble indentPreamble: 1 -# assume no preamble in cls, sty, by default -lookForPreamble: - .tex: 1 - .sty: 0 - .cls: 0 - .bib: 0 - -# some preambles can contain \begin and \end statements -# that are not in their 'standard environment block', for example, -# consider the following key = values: -# preheadhook={\begin{mdframed}[style=myframedstyle]}, -# postfoothook=\end{mdframed}, -preambleCommandsBeforeEnvironments: 0 - # default value of indentation defaultIndent: " " -# remove trailing whitespace from all lines -removeTrailingWhitespace: - beforeProcessing: 0 - afterProcessing: 1 - # name of code blocks that should have their body aligned at ampersand delimiters lookForAlignDelims: tabular: @@ -174,136 +49,6 @@ lookForAlignDelims: delimiterRegEx: '(?]*?>)' - keyEqualsValuesBracesBrackets: - name: '[a-zA-Z@\*0-9_\/.:\#-]+[a-zA-Z@\*0-9_\/.\h\{\}:\#-]*?' - follow: '(?:(?<]+?' - follow: '\h|\R|\{|\[|\$|\)|\(' - UnNamedGroupingBracesBrackets: - follow: '\{|\[|,|&|\)|\(|\$' - arguments: - before: '(?:#\d\h*;?,?\/?)+|\<.*?\>' - between: '_|\^|\*' - trailingComments: - notPreceededBy: '(?<~\\=\\-]+?" + follow: "\\h|\\R|\\{|\\[|\\$|\\)|\\(" diff --git a/lecture/03_Variablen/03_Variablen.tex b/lecture/03_Variablen/03_Variablen.tex index 2b111de..82d0668 100644 --- a/lecture/03_Variablen/03_Variablen.tex +++ b/lecture/03_Variablen/03_Variablen.tex @@ -252,7 +252,7 @@ \subsection{If-Anweisung} \slidehead % Define block styles \tikzstyle{block} = [rectangle, draw, fill=\IfDarkModeTF{TUDa-2b!40!black}{TUDa-2b}, - text width=10em, text centered, rounded corners, minimum height=4em] + text width=10em, text centered, rounded corners, minimum height=4em] \tikzstyle{line} = [draw, -latex'] \begin{center} diff --git a/lecture/06_Funktionen/listings/bsp_recursion_1.kts b/lecture/06_Funktionen/listings/bsp_recursion_1.kts index 8317660..5b3390e 100644 --- a/lecture/06_Funktionen/listings/bsp_recursion_1.kts +++ b/lecture/06_Funktionen/listings/bsp_recursion_1.kts @@ -4,4 +4,3 @@ fun fib(x: Int): Int { } return fib(x - 1) + fib(x - 2) } - diff --git a/lecture/06_Funktionen/listings/bsp_recursion_2.kts b/lecture/06_Funktionen/listings/bsp_recursion_2.kts index 59dcf04..00c8ee7 100644 --- a/lecture/06_Funktionen/listings/bsp_recursion_2.kts +++ b/lecture/06_Funktionen/listings/bsp_recursion_2.kts @@ -5,4 +5,3 @@ fun fib(x: Int): Int { // Rekursionsaufruf return fib(x - 1) + fib(x - 2) } - diff --git a/shared/globalCommon.tex b/shared/globalCommon.tex index 26ed7de..119793f 100644 --- a/shared/globalCommon.tex +++ b/shared/globalCommon.tex @@ -162,47 +162,47 @@ \ExplSyntaxOn \DeclareTCBListing{codeBlock}{ O{} m }{ -listing~engine=minted, % Minted verwenden -colback=\IfDarkModeTF{codebg}{black!10!\thepagecolor}, %Hintergrundfarbe -colframe=black!70, % Randfarbe -coltext=., -listing~only, % Sonst will er den Plain Text nach dem Minted Listing noch anfügen -frame~hidden, -boxrule=0pt, -arc=\rubos@boxarc, -%hbox, % This option could be used to limit the Length of Code Blocks automatically, but does not work with the minted Line Numbers -title~style=\IfDarkModeTF{accentcolor!60!black}{accentcolor}, -minted~style/.expanded=\IfDarkModeTF{native}{tango}, % Highlighting Style anpassen -minted~language=java, % Sprache setzen -minted~options={ %Minted Optionen -linenos=true, -numbersep=3mm, -texcl=true, -autogobble, -escapeinside=@@, -breaklines, -highlightcolor=\IfDarkModeTF{yellow!50!black}{yellow!80}, -#1 % weitere optionen für Minted zulassen -}, -left=7.1mm, % Links Platz lassen -enhanced, % Erlaubt uns, den ramen zu zeichnen -fonttitle=\sffamily, % Titelschriftart auf -overlay={ % Für Grauen Bereich links - \begin{tcbclipinterior} - \fill[black!70] (frame.south~west) rectangle ([xshift=5mm]frame.north~west); % Zeilennummernbereich färben - \end{tcbclipinterior} -}, -#2 % Weitere Argumente zulassen + listing~engine=minted, % Minted verwenden + colback=\IfDarkModeTF{codebg}{black!10!\thepagecolor}, %Hintergrundfarbe + colframe=black!70, % Randfarbe + coltext=., + listing~only, % Sonst will er den Plain Text nach dem Minted Listing noch anfügen + frame~hidden, + boxrule=0pt, + arc=\rubos@boxarc, + %hbox, % This option could be used to limit the Length of Code Blocks automatically, but does not work with the minted Line Numbers + title~style=\IfDarkModeTF{accentcolor!60!black}{accentcolor}, + minted~style/.expanded=\IfDarkModeTF{native}{tango}, % Highlighting Style anpassen + minted~language=java, % Sprache setzen + minted~options={ %Minted Optionen + linenos=true, + numbersep=3mm, + texcl=true, + autogobble, + escapeinside=@@, + breaklines, + highlightcolor=\IfDarkModeTF{yellow!50!black}{yellow!80}, + #1 % weitere optionen für Minted zulassen + }, + left=7.1mm, % Links Platz lassen + enhanced, % Erlaubt uns, den ramen zu zeichnen + fonttitle=\sffamily, % Titelschriftart auf + overlay={ % Für Grauen Bereich links + \begin{tcbclipinterior} + \fill[black!70] (frame.south~west) rectangle ([xshift=5mm]frame.north~west); % Zeilennummernbereich färben + \end{tcbclipinterior} + }, + #2 % Weitere Argumente zulassen } \NewTCBInputListing{\inputErrorCode}{ O{} m }{ -listing~file={#2}, -coltext=red, -listing~only, % Sonst will er den Plain Text nach dem Minted Listing noch anfügen -colback=\IfDarkModeTF{black}{black!80}, -colupper=white, -colframe=TUDa-3a, -before~upper=\color{TUDa-9b}, -#1 % Weitere Argumente zulassen + listing~file={#2}, + coltext=red, + listing~only, % Sonst will er den Plain Text nach dem Minted Listing noch anfügen + colback=\IfDarkModeTF{black}{black!80}, + colupper=white, + colframe=TUDa-3a, + before~upper=\color{TUDa-9b}, + #1 % Weitere Argumente zulassen } \ExplSyntaxOff From 965527781c6f36eb0b696fbcf2049542f6fa4e37 Mon Sep 17 00:00:00 2001 From: Rdeisenroth Date: Tue, 20 Aug 2024 18:50:43 +0200 Subject: [PATCH 3/5] remove unnecessairy build step --- .github/workflows/build.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 97355ca..6f5dcd1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,12 +28,6 @@ jobs: - name: Set up Git repository uses: actions/checkout@v3 - # 2. Link texmf folder to the current texmf home - - name: Link texmf folder to the current texmf home - run: | - ln -s /root/texmf $(kpsewhich -var-value=TEXMFHOME) - texhash --verbose - # 3. Build the documents - name: "Build the documents" run: | From 7c832d36c1778de43cc1fc6d30119e376c587a77 Mon Sep 17 00:00:00 2001 From: Rdeisenroth Date: Tue, 20 Aug 2024 20:39:23 +0200 Subject: [PATCH 4/5] update actions --- .github/workflows/build.yml | 6 +++--- .github/workflows/check-formatting.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6f5dcd1..9d81605 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: steps: # 1. Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Set up Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # 3. Build the documents - name: "Build the documents" @@ -41,7 +41,7 @@ jobs: # 4. Upload artifacts to GitHub - name: Upload artifacts to GitHub - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Vorkurs-Materialien path: "pdfout/*.pdf" @@ -86,7 +86,7 @@ jobs: # save the pdf file from the previous workflow - name: Save pdf file - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: . name: Vorkurs-Materialien diff --git a/.github/workflows/check-formatting.yaml b/.github/workflows/check-formatting.yaml index 05a978f..618ca69 100644 --- a/.github/workflows/check-formatting.yaml +++ b/.github/workflows/check-formatting.yaml @@ -12,10 +12,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" - name: Execute Pre-commit Hooks - uses: pre-commit/action@v3.0.0 + uses: pre-commit/action@v3.0.1 From 976fb0bb89e8e2696fb21925f7a5741f601dd0d0 Mon Sep 17 00:00:00 2001 From: Rdeisenroth Date: Mon, 26 Aug 2024 21:34:18 +0200 Subject: [PATCH 5/5] use old design --- lecture/global.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lecture/global.tex b/lecture/global.tex index a699521..59ad57d 100644 --- a/lecture/global.tex +++ b/lecture/global.tex @@ -12,7 +12,7 @@ \gdef\GlobalAlreadyIncluded{} % -\documentclass[accentcolor=3c,landscape,ngerman,presentation,t,usenames,dvipsnames,svgnames,table, aspectratio=169,colorframetitle=true]{tudabeamer} +\documentclass[accentcolor=3c,landscape,ngerman,presentation,t,usenames,dvipsnames,svgnames,table, aspectratio=169,colorframetitle=true,design=2008]{tudabeamer} %>>>>>>> online_rebase % Template-Modifikationen