octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #66012] printing to the pdflatex device is slo


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #66012] printing to the pdflatex device is slow
Date: Thu, 25 Jul 2024 04:47:54 -0400 (EDT)

Follow-up Comment #10, bug #66012 (group octave):

I had forgotten that enabling debug mode for latex not only printed more
verbose error messages (as stated in the doc) but also printed cached strings.
I definitely don't see 41 calls to latex (and others) but 27:


octave:1> doc "latex"
octave:2> setenv OCTAVE_LATEX_DEBUG_FLAG 1
octave:3> 
octave:3> x=rand(1000,1);
octave:4> plot(x);
octave:5> cd /tmp
octave:6> print("x","-dpdflatex");
* Caching ?:10.000000:0:0:0:0
* Caching 0:10.000000:0:0:0:0
* Caching 200:10.000000:0:0:0:0
* Caching 400:10.000000:0:0:0:0
* Caching 600:10.000000:0:0:0:0
* Caching 800:10.000000:0:0:0:0
* Caching 1000:10.000000:0:0:0:0
* Caching 0.2:10.000000:0:0:0:0
* Caching 0.4:10.000000:0:0:0:0
* Caching 0.6:10.000000:0:0:0:0
* Caching 0.8:10.000000:0:0:0:0
* Caching 1:10.000000:0:0:0:0
* Caching -1:10.000000:0:0:0:0
* Caching -0.5:10.000000:0:0:0:0
* Caching 0.5:10.000000:0:0:0:0
* Caching 0:10.000000:1:38:38:38
* Caching 200:10.000000:1:38:38:38
* Caching 400:10.000000:1:38:38:38
* Caching 600:10.000000:1:38:38:38
* Caching 800:10.000000:1:38:38:38
* Caching 1000:10.000000:1:38:38:38
* Caching 0:10.000000:2:38:38:38
* Caching 0.2:10.000000:2:38:38:38
* Caching 0.4:10.000000:2:38:38:38
* Caching 0.6:10.000000:2:38:38:38
* Caching 0.8:10.000000:2:38:38:38
* Caching 1:10.000000:2:38:38:38
octave:7> get (gca, "ztick")
ans =

  -1.0000  -0.5000        0   0.5000   1.0000

octave:8> print("x","-dpdflatex");
octave:9> 


The caching key is string:fontsize:horizontalalignment:R:G:B

The latex renderer first tests the latex toolchain by rendering a ? (the
character that will be used later when/if some string can't be parsed), then
it renders all 11 actually visible ticks [0 200 400 600 800 1000 0.2 0.4 0.6
0.8 1] in black (0:0:0 at the end of the key), but also invisible z tick
labels [-1 -0.5 0.5], and finally it re-renders visible tick labels in dark
gray (38:38:38).


The last stage is explained by this comment in print .m:


    ## With the -painters (gl2ps) renderer, line transparency is only
    ## handled for svg and pdf outputs using svgconvert.
    ## Otherwise, switch grid lines color to light gray so that the image
    ## output approximately matches on-screen experience.

 


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66012>

_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]