From e2e83f16561e965de19fefb342627a7a8fa5eee0 Mon Sep 17 00:00:00 2001 From: Jan Wille <jan.wille@stud.hs-hannover.de> Date: Fri, 13 May 2022 15:49:56 +0200 Subject: [PATCH] included autogobble for listings (#8) --- CHANGELOG.md | 5 +++++ HsH-classes.dtx | 2 ++ src/config.tex | 2 ++ 3 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0edcb9e..349abdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. ## [Current] +### Added + +- autobobble option for `listings`, which automaticly determins the indentation width and gooble it up, removing the need to put `gobble=n` manually + every time. (#8) + ### Changed - `\title` now accepts an optional argument. It will be used as a short version of the title and will be put into the header. diff --git a/HsH-classes.dtx b/HsH-classes.dtx index 1c3869e..f18773f 100644 --- a/HsH-classes.dtx +++ b/HsH-classes.dtx @@ -658,6 +658,7 @@ \@ifpackageloaded{listings}{ \PassOptionsToPackage{svgnames}{xcolor} \RequirePackage{xcolor} + \RequirePackage{lstautogobble} \lstset{ commentstyle=\color{gray}, keywordstyle=\color{FireBrick}\bfseries, @@ -667,6 +668,7 @@ tabsize=4, literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1, escapeinside={(*@}{@*)}, + autogobble=true, } }{} \@ifpackageloaded{enumitem}{ diff --git a/src/config.tex b/src/config.tex index a41def4..4c891fc 100644 --- a/src/config.tex +++ b/src/config.tex @@ -33,6 +33,7 @@ \@ifpackageloaded{listings}{ \PassOptionsToPackage{svgnames}{xcolor} \RequirePackage{xcolor} + \RequirePackage{lstautogobble} \lstset{ commentstyle=\color{gray}, keywordstyle=\color{FireBrick}\bfseries, @@ -42,6 +43,7 @@ tabsize=4, literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1, escapeinside={(*@}{@*)}, + autogobble=true, } }{} \@ifpackageloaded{enumitem}{ -- GitLab