summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/divelogexportdialog.cpp6
-rw-r--r--subsurfacetemplate.tex23
2 files changed, 24 insertions, 5 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);
diff --git a/subsurfacetemplate.tex b/subsurfacetemplate.tex
index 2441aa32e..09de1f6db 100644
--- a/subsurfacetemplate.tex
+++ b/subsurfacetemplate.tex
@@ -4,6 +4,7 @@
\font\klein=cmr9
\font\winzig=cmr5
\def\slinie{\hrulefill\hskip 3em}
+\def\leer{}
\overfullrule=0pt
\def\p{\hskip 0.5cm} % typical horizontal room
\parindent=1cm
@@ -43,10 +44,26 @@ $\vbox to 15cm{ % height of box
\bigskip
\hbox to 10cm{\hss\breit\strut \time \p@\p\hbox to 1.5cm{\hss\depth}\hss}
\bigskip
-\hbox to 10cm{\klein\p $\Delta p$:\hbox to 1cm{\hrulefill\gasuse}\hss
-SAC:\hbox to 1.5cm{\hrulefill\sac}\hss
-Type:\hbox to 1.2cm{\hrulefill\type}\hss Viz.:
+\hbox to 10cm{\klein\p $\Delta p$: \hbox to 1cm{\hrulefill\gasuse}\hss
+SAC: \hbox to 1.5cm{\hrulefill\sac}\hss
+Type: \hbox to 1.2cm{\hrulefill\type}\hss Viz.:
\hbox to 0.8cm{\hrulefill\viz}\p}
+
+\ifx\cylagasname\leer\else
+\hbox to 10cm{\p\klein
+\cyladescription\ \cylagasname: \cylastartpress\ -- \cylaendpress
+\hss}
+\fi
+\ifx\cylbgasname\leer\else
+\hbox to 10cm{\p\klein
+\cylbdescription\ \cylbgasname: \cylbstartpress\ -- \cylbendpress
+\hss}
+\fi
+\ifx\cylcgasname\leer\else
+\hbox to 10cm{\p\klein
+\cylcdescription\ \cylcgasname: \cylcstartpress\ -- \cylcendpress
+\hss}
+\fi
\bigskip
\hbox{\p\hsize = 9cm
\vbox{\noindent