decrease newlines

This commit is contained in:
2025-12-16 18:11:51 +01:00
parent 69a85dacdc
commit f29ae86a8a

View File

@@ -307,11 +307,11 @@ function printfootnote(footnote_num, footnote, word_count, characters_printed
for ( i=1; i <= MAX_WIDTH - length(footnote) - 1; i++){ for ( i=1; i <= MAX_WIDTH - length(footnote) - 1; i++){
printf(" ") printf(" ")
} }
printf("%s%s", sup_num, footnote) printf("%s%s\n", sup_num, footnote)
} }
else{ else{
word_count = split(footnote, words, " ") word_count = split(footnote, words, " ")
printf("\n\t\t%s", sup_num) printf("\t\t%s", sup_num)
characters_printed=17 #account for indents at beginning of each multiline footnote (2 tabs + sup_num) characters_printed=17 #account for indents at beginning of each multiline footnote (2 tabs + sup_num)
for (i = 1; i <= word_count; i++) { for (i = 1; i <= word_count; i++) {
if (characters_printed + length(words[i]) + (characters_printed > 0 ? 1 : 0) > MAX_WIDTH - 8 ) { if (characters_printed + length(words[i]) + (characters_printed > 0 ? 1 : 0) > MAX_WIDTH - 8 ) {
@@ -327,7 +327,6 @@ function printfootnote(footnote_num, footnote, word_count, characters_printed
} }
printf("\n") printf("\n")
} }
printf("\n")
} }
} }