Diveplan line breaks in UI and printing - <div> vs. <br> - Linux vs. Windows

Lubomir I. Ivanov neolit123 at gmail.com
Fri Feb 3 12:51:46 PST 2017


On 3 February 2017 at 22:22, Stefan Fuchs <sfuchs at gmx.de> wrote:
> Hi All,
>
> you may know me as a complete newbie managed to do my first small change to
> the Subsurface planner: Adding surface pressure and SAC to the planner
> results.
>
> Now I found out there is one issue left concerning printing. I attached 4
> screen shots:
>
> - Output in UI in planner looks good
> - Output in UI in main window in notes section looks good
> - Printing (template "Onedive") in linux is complete crap because the <br>
> are not translated at all. --> Issue (1)
>   I would expect this is even an old issue?!
> - Printing (template "Onedive") in win is also not perfect because a few
> line breaks are missing which are there in the UI.
>   Line breaks missing are: Before "Runtime...", "Deco model...", "ATM
> pressure..." and "Gas consumption...". --> Issue (2)
>
> What can we do about (1) which is even more serious?
>

dirk, already responded to this one.

> For (2) I guess I forgot to put a few <br>. But why line breaks in UI then
> work? Can s.o. please explain me the concept of <div></div> and <br> and how
> this works differently (?!) in UI and planner?
>

a <div> tag may create a new line by itself.so,  if the rich text
field in the planner has a <div>, plus it has a <br> tag, you could
end up with a couple of line breaks in the planner.
but the printed notes only support <br> tags (if |safe is enabled that
is) and also they don't really support rich formatting like colors and
fonts.

this means that the printed dive notes will look much more simplistic
and for printing we don't really support the rich formatting that the
default planner notes introduce.

lubomir
--


More information about the subsurface mailing list