diff options
author | Robert C. Helling <helling@atdotde.de> | 2017-08-09 12:44:38 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-08-10 09:08:02 -0700 |
commit | 514c298600956ae416fdf42046ffde2772e844c7 (patch) | |
tree | 0dcff862b8d905abbe4a88897a6e6dfe041bacf4 /desktop-widgets | |
parent | d5d97870c3b0c09693697be8c37b205fbea99acd (diff) | |
download | subsurface-514c298600956ae416fdf42046ffde2772e844c7.tar.gz |
More details for TeX export
Include the gasname, get rid of more spaces in front of units,
update the template to use new gas fields.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/divelogexportdialog.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop-widgets/divelogexportdialog.cpp b/desktop-widgets/divelogexportdialog.cpp index dd6a20a9c..eeaabb35b 100644 --- a/desktop-widgets/divelogexportdialog.cpp +++ b/desktop-widgets/divelogexportdialog.cpp @@ -357,15 +357,17 @@ void DiveLogExportDialog::export_TeX(const char *filename, const bool selected_o if (is_cylinder_used(dive, i) || (prefs.display_unused_tanks && dive->cylinder[i].type.description)){ put_format(&buf, "\\def\\cyl%cdescription{%s}\n", 'a' + i, dive->cylinder[i].type.description); + put_format(&buf, "\\def\\cyl%cgasname{%s}\n", 'a' + i, gasname(&dive->cylinder[i].gasmix)); put_format(&buf, "\\def\\cyl%cmixO2{%.1f\\%%}\n", 'a' + i, get_o2(&dive->cylinder[i].gasmix)/10.0); put_format(&buf, "\\def\\cyl%cmixHe{%.1f\\%%}\n", 'a' + i, get_he(&dive->cylinder[i].gasmix)/10.0); put_format(&buf, "\\def\\cyl%cmixN2{%.1f\\%%}\n", 'a' + i, (100.0 - (get_o2(&dive->cylinder[i].gasmix)/10.0) - (get_he(&dive->cylinder[i].gasmix)/10.0))); delta_p.mbar += dive->cylinder[i].start.mbar - dive->cylinder[i].end.mbar; - put_format(&buf, "\\def\\cyl%cstartpress{%.1f \\pressureunit}\n", 'a' + i, get_pressure_units(dive->cylinder[i].start.mbar, &unit)/1.0); - put_format(&buf, "\\def\\cyl%cendpress{%.1f \\pressureunit}\n", 'a' + i, get_pressure_units(dive->cylinder[i].end.mbar, &unit)/1.0); + put_format(&buf, "\\def\\cyl%cstartpress{%.1f\\pressureunit}\n", 'a' + i, get_pressure_units(dive->cylinder[i].start.mbar, &unit)/1.0); + put_format(&buf, "\\def\\cyl%cendpress{%.1f\\pressureunit}\n", 'a' + i, get_pressure_units(dive->cylinder[i].end.mbar, &unit)/1.0); qty_cyl += 1; } else { put_format(&buf, "\\def\\cyl%cdescription{}\n", 'a' + i); + put_format(&buf, "\\def\\cyl%cgasname{}\n", 'a' + i); put_format(&buf, "\\def\\cyl%cmixO2{}\n", 'a' + i); put_format(&buf, "\\def\\cyl%cmixHe{}\n", 'a' + i); put_format(&buf, "\\def\\cyl%cmixN2{}\n", 'a' + i); |