Customizable Print Formats GSoC 2015
David Tillotson
david at acmelabs.co.uk
Fri Mar 6 06:49:06 PST 2015
On 6 March 2015 14:37:45 GMT+00:00, Dirk Hohndel <dirk at hohndel.org> wrote:
>No, we will not include TeX or assume that is installed. I see the
>technical benefit, it's completely unrealistic as print backend for a
>dive log app
>
>/D
>
>Sent from my phone
>
>> On Mar 4, 2015, at 3:39 AM, Robert Helling <helling at atdotde.de>
>wrote:
>>
>> 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).
>> <texexport.txt>
>>
>> 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
>> <dive.pdf>
>> .
>>
>> 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
>>
>>
>>
>>
>>
>> _______________________________________________
>> subsurface mailing list
>> subsurface at subsurface-divelog.org
>>
>http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>subsurface mailing list
>subsurface at subsurface-divelog.org
>http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
As a user, while I agree that expecting or including TeX is not really feasible, Robert's patch does only do something if it finds pdftex. I have been looking at this problem, as I need to re-do my logbook, and with some work, I might take advantage of that patch. I have been playing a little with the template, and I am working on adding some more data to the export for my own use.
Robert, is there a reason for some hard-coding in the dive.tex output, or is it just an artifact from the hack?
--
David Tillotson
More information about the subsurface
mailing list