@@ -361,6 +361,11 @@ class format_help_base : public format_base
361361 void parse (parser_meta_data & parser_meta)
362362 {
363363 meta = parser_meta;
364+ #pragma GCC diagnostic push
365+ #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
366+ if (!meta.citation .empty ())
367+ meta.citations .emplace_back (std::move (meta.citation ));
368+ #pragma GCC diagnostic pop
364369
365370 derived_t ().print_header ();
366371
@@ -568,7 +573,7 @@ class format_help_base : public format_base
568573 void print_legal ()
569574 {
570575 // Print legal stuff
571- if ((!empty (meta.short_copyright )) || (!empty (meta.long_copyright )) || (!empty (meta.citation ))
576+ if ((!empty (meta.short_copyright )) || (!empty (meta.long_copyright )) || (!empty (meta.citations ))
572577 || (!empty (meta.author )) || (!empty (meta.email )))
573578 {
574579 derived_t ().print_section (" Legal" );
@@ -593,10 +598,19 @@ class format_help_base : public format_base
593598 + " 2006-2025 Knut Reinert, FU-Berlin; released under the 3-clause BSDL." ,
594599 false );
595600
596- if (!empty (meta.citation ))
601+ if (!empty (meta.citations ))
597602 {
598- derived_t ().print_line (derived_t ().in_bold (" In your academic works please cite: " ) + meta.citation ,
599- false );
603+ derived_t ().print_line (derived_t ().in_bold (" In your academic works please cite: " ), false );
604+ for (size_t i = 0 ; i < meta.citations .size (); ++i)
605+ {
606+ // Using `\\fB` and `\\fP` instead of `derived_t().in_bold()` here.
607+ // `format_help::print_list_item` uses `format_help::text_width` to determine whether
608+ // there should be a new line after the key ("[i]").
609+ // `format_help::text_width` ignores special sequences such as `\\fB` and `\\fP`,
610+ // but not the actual control sequences produced by `derived_t().in_bold()`.
611+ // All formats support `\\fB` and `\\fP`.
612+ derived_t ().print_list_item (" \\ fB[" + std::to_string (i + 1u ) + " ]\\ fP" , meta.citations [i]);
613+ }
600614 }
601615
602616 if (!empty (meta.long_copyright ))
0 commit comments