From 31bfcf1d705c5a2cdb44e6b5e4d99e7b2f0f0224 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Wed, 19 Aug 2020 11:47:52 +0200 Subject: [PATCH] improved footnote formatting --- bibel.awk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bibel.awk b/bibel.awk index 3aa838a..0b97b00 100644 --- a/bibel.awk +++ b/bibel.awk @@ -217,8 +217,8 @@ function printfootnote(footnote, word_count, characters_printed) { printf("\n\t\t*") characters_printed=17 #account for indents at beginning of each multiline footnote (2 tabs + "*") for (i = 1; i <= word_count; i++) { - if (characters_printed + length(words[i]) + (characters_printed > 0 ? 1 : 0) > MAX_WIDTH) { - printf("\n") + if (characters_printed + length(words[i]) + (characters_printed > 0 ? 1 : 0) > MAX_WIDTH - 8 ) { + printf("\n\t") characters_printed = 0 } if (i != 1 && characters_printed > 0) { #Do not print empty space in front of first word for the first line (since characters_printed gets initialized > 0 we need this