From ab19e5378e9509be1beaf5c1ca837c1acf69e764 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 31 Dec 2020 22:25:51 -0800 Subject: [PATCH] csv: Change footnote format. --- src/output/csv.c | 8 +++----- tests/language/stats/correlations.at | 16 ++++------------ tests/language/stats/examine.at | 8 ++------ tests/output/render.at | 12 +++++------- tests/perl-module.at | 8 ++------ 5 files changed, 16 insertions(+), 36 deletions(-) diff --git a/src/output/csv.c b/src/output/csv.c index bde8711314..4940d3c18c 100644 --- a/src/output/csv.c +++ b/src/output/csv.c @@ -264,13 +264,11 @@ csv_submit (struct output_driver *driver, size_t n_footnotes = table_collect_footnotes (table_item, &f); if (n_footnotes) { - fputs ("\nFootnotes:\n", csv->file); - for (size_t i = 0; i < n_footnotes; i++) { - csv_output_field (csv, f[i]->marker); - fputs (csv->separator, csv->file); - csv_output_field (csv, f[i]->content); + char *s = xasprintf ("Footnote: %s. %s", f[i]->marker, f[i]->content); + csv_output_field (csv, s); + free (s); putc ('\n', csv->file); } diff --git a/tests/language/stats/correlations.at b/tests/language/stats/correlations.at index 1662ee7499..9a24da63f2 100644 --- a/tests/language/stats/correlations.at +++ b/tests/language/stats/correlations.at @@ -61,9 +61,7 @@ wiz,Pearson Correlation,.890[a],.519,1.000,-.344 ,Sig. (2-tailed),.017,.291,,.505 bang,Pearson Correlation,-.308,.118,-.344,1.000 ,Sig. (2-tailed),.553,.824,.505, - -Footnotes: -a,Significant at .05 level +Footnote: a. Significant at .05 level Table: Correlations ,,bar,wiz @@ -86,9 +84,7 @@ wiz,Pearson Correlation,.883[a],.497,1.000,-.337 bang,Pearson Correlation,-.308,.164,-.337,1.000 ,Sig. (2-tailed),.553,.725,.460, ,N,6,7,7,7 - -Footnotes: -a,Significant at .05 level +Footnote: a. Significant at .05 level ]]) AT_CLEANUP @@ -357,9 +353,7 @@ var2,Pearson Correlation,.3792[a],-.0407 var3,Pearson Correlation,.3699[a],-.0543 ,Sig. (2-tailed),.000,.603 ,N,95,94 - -Footnotes: -a,Significant at .05 level +Footnote: a. Significant at .05 level Table: Correlations ,,var1,var2 @@ -372,9 +366,7 @@ var4,Pearson Correlation,.5693[a],.3792[a] var5,Pearson Correlation,-.0519,-.0407 ,Sig. (2-tailed),.623,.698 ,N,92,93 - -Footnotes: -a,Significant at .05 level +Footnote: a. Significant at .05 level ]]) AT_CLEANUP diff --git a/tests/language/stats/examine.at b/tests/language/stats/examine.at index f22a4f5ce4..6c76b62d6d 100644 --- a/tests/language/stats/examine.at +++ b/tests/language/stats/examine.at @@ -860,9 +860,7 @@ x,.,4,100.0%,0,.0%,4,100.0% ,2,9,100.0%,0,.0%,9,100.0% ,9[a],4,100.0%,0,.0%,4,100.0% ,99[a],5,100.0%,0,.0%,5,100.0% - -Footnotes: -a,User-missing value. +Footnote: a. User-missing value. Table: Extreme Values ,g,,,Case Number,Value @@ -916,9 +914,7 @@ x,.,Highest,1,31,4004 ,,,3,25,701 ,,,4,26,801 ,,,5,27,901 - -Footnotes: -a,User-missing value. +Footnote: a. User-missing value. ]]) AT_CLEANUP diff --git a/tests/output/render.at b/tests/output/render.at index 67e3290b76..2bdac10f46 100644 --- a/tests/output/render.at +++ b/tests/output/render.at @@ -262,13 +262,11 @@ f[b]" h i[c][d][e]",j, ,klm, - -Footnotes: -a,Approximation. -b,This is a very long footnote that will have to wrap from one line to the next. Let's see if the rendering engine does it acceptably. -c,One -d,Two -e,Three +Footnote: a. Approximation. +Footnote: b. This is a very long footnote that will have to wrap from one line to the next. Let's see if the rendering engine does it acceptably. +Footnote: c. One +Footnote: d. Two +Footnote: e. Three ]]) AT_CLEANUP diff --git a/tests/perl-module.at b/tests/perl-module.at index 58b3900cdf..5466dbc8b6 100644 --- a/tests/perl-module.at +++ b/tests/perl-module.at @@ -479,9 +479,7 @@ A Short String Variable,1111,ones A Numeric Variable,1,Unity ,2,Duality ,3,Thripality - -Footnotes: -a,User-missing value +Footnote: a. User-missing value Table: Variable and Dataset Attributes Variable and Name,,Value @@ -516,9 +514,7 @@ A Short String Variable,1111,ones A Numeric Variable,1,Unity ,2,Duality ,3,Thripality - -Footnotes: -a,User-missing value +Footnote: a. User-missing value Table: Variable and Dataset Attributes Variable and Name,,Value -- 2.30.2