Customizable Print Formats GSoC 2015

Robert Helling helling at atdotde.de
Wed Mar 4 03:39:38 PST 2015


Hi,

> On 03.03.2015, at 13:05, Lubomir I. Ivanov <neolit123 at gmail.com> wrote:
> 
> i think, before you start writing the proposal users should provide
> feedback on what level of customization they want from the print
> layouting.
> Davide, Robert - any ideas?

I think my old comments still apply: Typesetting is a highly non-trivial task (in particular if your expectations are more than basic), even decent line breaks are not easy to get let alone more complex formatting tasks. I think it would be foolish to attempt to set it up from scratch. Even without templates/user definable layout we currently fail miserable in this task. To my mind, we need to rely on external tools (library or program) to produce decent output on a printer. Setting things up by putting text in some rectangles will not do. For similar reasons, I don’t think html is the way to go since it is designed to render on screens rather than sheets of paper. You only need to look at the current gymnastics we do not to run over the bottom of the sheet. To me, doing proper typesetting is the hard part, making this configurable (for example with templates) is then secondary.

One way to go would be to pipe into LibreOffice writer (to use other open source software) and rely on it’s abilities to turn strings of characters and tables into decent pdf. But I don’t think this is very elegant (and it will without doubt be painful).

I would like to argue once more to use TeX as the typesetting engine (I have done so in the past).

There is one obvious downside of this: Joe Average User (probably everybody outside academia) does not have TeX installed and with all its fonts and utilities it is a huge software package. And this is why this proposal was turned down in the past.

But please, let me one last time argue its pros:

o) Even though it is not installed, it is not that hard to install. Packages exists essentially for all platforms, it is just one dependency (for pdftex) on any Linux package manager, there are ready to install (single click) packages for Windows and Mac. And is probably the prime example of stability: Since the mid-1980s every TeX source as produced exactly the same output only any platform. Version problems are nonexistent (thanks to the stubbornness of Don Knuth).

o) As it is an external program, we don’t need to force it on users. Only those users who want to use subsurface to produce prime quality paper logbook pages would need to install it.

o) Typesetting quality is second to none (as a lot of research has gone into it)

o) Its input is very simple, in that respect it is similar to html (ascii as input format).

o) As such it is trivial to use with any templating solution. In fact, since it is a macro language, it already comes with this.

To illustrate, I attached a patch that adds a simple prototype of TeX-printing to current master (I actually use this to produce my paper log from subsurface).

It does nothing unless you have “pdftex” in your path. If you do, it adds one point to the dive-list context menu, which typesets the current dive into a pdf. All layout is done in logbookstyle.tex which plays the role of a template. All subsurface has to do is to output a file dive.tex that in my case contains just

\def\date{2014-11-15}
\def\number{476}
\def\place{Allmanshausen, Badeplatz}
\def\spot{}
\def\country{}
\def\entrance{}
\def\time{44:00}
\def\depth{30.7m}
\def\gasuse{}
\def\sac{16.7 l/min}
\def\type{}
\def\viz{3}
\def\plot{\includegraphics[width=9cm,height=4cm]{profile}}
\def\comment{Vytec Batterie nicht richtig eingesetzt, zwei Weihnachtsmänner, riesiger Barschschwarm beim Auftauchen (11m), trotz Terminverpeilung durfte ich mittauchen. Wassereinbruch oben am Reissverschluss, hervorgerufen durch fehlerhafte Klebung.}
\def\buddy{Gernot, Hanah Ewa}
\input logbookstyle

to produce .

Yes, it’s huge, but I doubt you will get anything with comparable output quality at a much lighter weight.

Best
Robert

--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling     Elite Master Course Theoretical and Mathematical Physics
                      Scientific Coordinator
                      Ludwig Maximilians Universitaet Muenchen, Dept. Physik
                      Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339
                      http://www.atdotde.de

Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515  BB44 0820 367C 36BC 0C1D    and
DCED 37B6 251C 7861 270D  5613 95C7 9D32 9A8D 9B8F





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150304/bc46d212/attachment-0003.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: texexport.txt
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150304/bc46d212/attachment-0001.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150304/bc46d212/attachment-0004.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dive.pdf
Type: application/pdf
Size: 138142 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150304/bc46d212/attachment-0001.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150304/bc46d212/attachment-0005.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150304/bc46d212/attachment-0001.sig>


More information about the subsurface mailing list