Changeset 514c298 in subsurface


Ignore:
Timestamp:
Aug 10, 2017, 9:08:02 AM (5 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
f21ae69
Parents:
d5d9787
git-author:
Robert C. Helling <helling@…> (08/09/17 03:44:38)
git-committer:
Dirk Hohndel <dirk@…> (08/10/17 09:08:02)
Message:

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@…>

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • desktop-widgets/divelogexportdialog.cpp

    rd5d9787 r514c298  
    358358                        if (is_cylinder_used(dive, i) || (prefs.display_unused_tanks && dive->cylinder[i].type.description)){
    359359                                put_format(&buf, "\\def\\cyl%cdescription{%s}\n", 'a' + i, dive->cylinder[i].type.description);
     360                                put_format(&buf, "\\def\\cyl%cgasname{%s}\n", 'a' + i, gasname(&dive->cylinder[i].gasmix));
    360361                                put_format(&buf, "\\def\\cyl%cmixO2{%.1f\\%%}\n", 'a' + i, get_o2(&dive->cylinder[i].gasmix)/10.0);
    361362                                put_format(&buf, "\\def\\cyl%cmixHe{%.1f\\%%}\n", 'a' + i, get_he(&dive->cylinder[i].gasmix)/10.0);
    362363                                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)));
    363364                                delta_p.mbar += dive->cylinder[i].start.mbar - dive->cylinder[i].end.mbar;
    364                                 put_format(&buf, "\\def\\cyl%cstartpress{%.1f \\pressureunit}\n", 'a' + i, get_pressure_units(dive->cylinder[i].start.mbar, &unit)/1.0);
    365                                 put_format(&buf, "\\def\\cyl%cendpress{%.1f \\pressureunit}\n", 'a' + i, get_pressure_units(dive->cylinder[i].end.mbar, &unit)/1.0);
     365                                put_format(&buf, "\\def\\cyl%cstartpress{%.1f\\pressureunit}\n", 'a' + i, get_pressure_units(dive->cylinder[i].start.mbar, &unit)/1.0);
     366                                put_format(&buf, "\\def\\cyl%cendpress{%.1f\\pressureunit}\n", 'a' + i, get_pressure_units(dive->cylinder[i].end.mbar, &unit)/1.0);
    366367                                qty_cyl += 1;
    367368                        } else {
    368369                                put_format(&buf, "\\def\\cyl%cdescription{}\n", 'a' + i);
     370                                put_format(&buf, "\\def\\cyl%cgasname{}\n", 'a' + i);
    369371                                put_format(&buf, "\\def\\cyl%cmixO2{}\n", 'a' + i);
    370372                                put_format(&buf, "\\def\\cyl%cmixHe{}\n", 'a' + i);
  • subsurfacetemplate.tex

    rd5d9787 r514c298  
    55\font\winzig=cmr5
    66\def\slinie{\hrulefill\hskip 3em}
     7\def\leer{}
    78\overfullrule=0pt
    89\def\p{\hskip 0.5cm}  % typical horizontal room
     
    4445\hbox to 10cm{\hss\breit\strut \time \p@\p\hbox to 1.5cm{\hss\depth}\hss}
    4546\bigskip
    46 \hbox to 10cm{\klein\p $\Delta p$:\hbox to 1cm{\hrulefill\gasuse}\hss
    47 SAC:\hbox to 1.5cm{\hrulefill\sac}\hss
    48 Type:\hbox to 1.2cm{\hrulefill\type}\hss Viz.:
     47\hbox to 10cm{\klein\p $\Delta p$: \hbox to 1cm{\hrulefill\gasuse}\hss
     48SAC: \hbox to 1.5cm{\hrulefill\sac}\hss
     49Type: \hbox to 1.2cm{\hrulefill\type}\hss Viz.:
    4950\hbox to 0.8cm{\hrulefill\viz}\p}
     51
     52\ifx\cylagasname\leer\else
     53\hbox to 10cm{\p\klein
     54\cyladescription\ \cylagasname: \cylastartpress\ -- \cylaendpress
     55\hss}
     56\fi
     57\ifx\cylbgasname\leer\else
     58\hbox to 10cm{\p\klein
     59\cylbdescription\ \cylbgasname: \cylbstartpress\ -- \cylbendpress
     60\hss}
     61\fi
     62\ifx\cylcgasname\leer\else
     63\hbox to 10cm{\p\klein
     64\cylcdescription\ \cylcgasname: \cylcstartpress\ -- \cylcendpress
     65\hss}
     66\fi
    5067\bigskip
    5168\hbox{\p\hsize = 9cm
Note: See TracChangeset for help on using the changeset viewer.