wxMaxima-developers / wxmaxima

A gui for the computer algebra system Maxima built with wxWidgets
https://wxMaxima-developers.github.io/wxmaxima/
Other
461 stars 96 forks source link

Wrong reference point for the left printout margin (IMO the issue in the final remarks in closed #1787) #1791

Open yurytch opened 11 months ago

yurytch commented 11 months ago

I don't quite get what the 'persisting problem' mentioned in the final remarks in the #1787 actually is, but my guess it's what's in the PNG converted from PDF I'm attaching. The printout was done with the left margin set to 0. I'm summing it up as a 'wrong reference point' somewhat far-fetchedly, yes. But there is an issue there:

While the margin itself seems to be correct, all the 'real' content is offset to the right from the 'wxMaxima document' header string.

So, suggestions:

  1. Do away with the 'wxMaxima document' header string? We have several kinds of title cells, after all. If headers/footers are needed/included in future, they should follow the margins set for the main content.
  2. Calculate printout's left margin from the cells' labels left ruling line or from cells' left ruling line, w/r to the brackets visibility setting.

print_preview_0

gunterkoenigsmann commented 11 months ago

I translated "reference point" with "indent" and think I found an approach (Commit 4de1f6659..959e8b516): The left edge of the cell brackets should now be at the left edge of the paper if brackets are printed. If they aren't: Do we want to set the left indent to -m_configuration->GetLabelWidth()?

yurytch commented 11 months ago

Looks nice, thank you very much! Only I don't see a config option to omit input labels? I was sure I've seen such option somewhere.

Also, why keep the 'wxMaxima document' header? It's completely uninformative as it is.

bllamarodri commented 11 months ago

Hello, I thank you very much for the effort to try to improve the printing. It no longer gives me error when printing but it only lets me print the first sheet of the document and the graphics are rescaled a lot. Demo.pdf

yurytch commented 11 months ago

it only lets me print the first sheet of the document

Doesn't wxmaxima stop evaluating the file on first error? In your case, log(0) in f(2).

But I see another issue there. Expressions after ; get inline labels, which isn't an expected behaviour.

bllamarodri commented 11 months ago

Hi, In this example I have put the same command 4 times to generate more than one page. So, it is not a problem of the error. I don't know if it will be a problem of the size of the chart and maybe solving this would print all the pages.

Print_Example.pdf Screen_Example.pdf

gunterkoenigsmann commented 11 months ago

That sounds like a possible cause => Will try to make the ppi rate that is used in scaling images more consistent: Currently we use more than one Source Of Truth.

gunterkoenigsmann commented 11 months ago

Seems like printing currently enters an endless loop. Will find out why tomorrow.

bllamarodri commented 11 months ago

Hi, I just tried the version from 29-07-2023 and, although it now prints all the pages, the graphics come out very small (this was happening in version 5.45.1 but was fixed in version 5.47). The integral symbol is also missing now (I am attaching the PDFs). Print.pdf Screen.pdf