diff options
author | Robert C. Helling <helling@atdotde.de> | 2019-01-04 23:04:36 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-01-26 07:10:29 -0800 |
commit | bfd1aaf57f07c728b8e817282c6d451889693739 (patch) | |
tree | 891552588010fee695ac8552f023e9c582fc9c5f /desktop-widgets | |
parent | 2d8a8f974bcb4e87ee8754bb965003310bb359be (diff) | |
download | subsurface-bfd1aaf57f07c728b8e817282c6d451889693739.tar.gz |
Include all tags in TeX/LaTeX export
instead of just the first
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/divelogexportdialog.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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); |