From bfd1aaf57f07c728b8e817282c6d451889693739 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Fri, 4 Jan 2019 23:04:36 +0100 Subject: Include all tags in TeX/LaTeX export instead of just the first Signed-off-by: Robert C. Helling --- desktop-widgets/divelogexportdialog.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/desktop-widgets/divelogexportdialog.cpp b/desktop-widgets/divelogexportdialog.cpp index 3e8bb3584..9c08d7f08 100644 --- a/desktop-widgets/divelogexportdialog.cpp +++ b/desktop-widgets/divelogexportdialog.cpp @@ -347,7 +347,14 @@ void DiveLogExportDialog::export_TeX(const char *filename, const bool selected_o dive->maxdepth.mm ? put_format(&buf, "\\def\\%smaximumdepth{%.1f\\%sdepthunit}\n", ssrf, get_depth_units(dive->maxdepth.mm, NULL, &unit), ssrf) : put_format(&buf, "\\def\\%smaximumdepth{}\n", ssrf); dive->meandepth.mm ? put_format(&buf, "\\def\\%smeandepth{%.1f\\%sdepthunit}\n", ssrf, get_depth_units(dive->meandepth.mm, NULL, &unit), ssrf) : put_format(&buf, "\\def\\%smeandepth{}\n", ssrf); - put_format(&buf, "\\def\\%stype{%s}\n", ssrf, dive->tag_list ? dive->tag_list->tag->name : ""); + struct tag_entry *tag = dive->tag_list; + QString tags; + if (tag) { + tags = tag->tag->name; + while ((tag = tag->next)) + tags += QString(", ") + QString(tag->tag->name); + } + put_format(&buf, "\\def\\%stype{%s}\n", ssrf, qPrintable(tags)); put_format(&buf, "\\def\\%sviz{%s}\n", ssrf, qPrintable(viz)); put_format(&buf, "\\def\\%srating{%s}\n", ssrf, qPrintable(rating)); put_format(&buf, "\\def\\%splot{\\includegraphics[width=9cm,height=4cm]{profile%d}}\n", ssrf, dive->number); -- cgit v1.2.3-70-g09d2