Re: [O] Bug: Latex preview overlay scaling not consistent across PPI

2016-12-01 Thread Nicolas Goaziou
Hello,

Scott Otterson  writes:

> I'd like to test your fix but I'm a github newbie (*).

Org main repository is not in github.

> Where did you check it in?

In "maint" branch of our repository.

> I don't know if it's melpa or elpa, or if the fix is in a personal
> account or something official. Is there a standard way everybody
> contributes their fixes?

See above. See also .

The fix wannabe will hit Org ELPA on Monday.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Latex preview overlay scaling not consistent across PPI

2016-11-30 Thread Scott Otterson
Thanks Nicolas,

I'd like to test your fix but I'm a github newbie (*).  Where did you check
it in?  I don't know if it's melpa or elpa, or if the fix is in a personal
account or something official.  Is there a standard way everybody
contributes their fixes?

Scott

(*) For the same reason, I still haven't been able to test the other dvips
customization fix you recently made.


Re: [O] Bug: Latex preview overlay scaling not consistent across PPI

2016-11-30 Thread Nicolas Goaziou
Hello,

Scott Otterson  writes:

> The size of the latex preview overlay scaling is inconsistent across
> screens with different pixel densities.
>
> I've set my customization to use dvipng for the latex previews I see when I
> type C-c C-x C-l.  Dvipng is customized as follows:
>
> [image: Inline image 1]
>
> The "Value" is set to (1.0 . 1.0), which I would think means that the font
> size in the preview overlay is scaled the same as the font size org
> buffer's normal text.
>
> This is more or less true for a Windows 7 machine connected to a 24",
> 1920x1080 pixel monitor:
>
> [image: Inline image 2]
>
> However, on a Windows 10 machine with a 12.3", 2736x1824 pixel monitor, the
> same customization looks like this:
>
> [image: Inline image 3]
>
> On the second computer (a Surface Pro 4) the previews are tiny because the
> screen has a much higher pixel density; the normal text is scaled
> appropriately but the overlays aren't scaled to match.

I made a change to how dpi is computed in `org-create-formula-image'.
Could you test it and report if it fixes your issue ?

Regards,

-- 
Nicolas Goaziou



[O] Bug: Latex preview overlay scaling not consistent across PPI

2016-11-30 Thread Scott Otterson
The size of the latex preview overlay scaling is inconsistent across
screens with different pixel densities.

I've set my customization to use dvipng for the latex previews I see when I
type C-c C-x C-l.  Dvipng is customized as follows:

[image: Inline image 1]

The "Value" is set to (1.0 . 1.0), which I would think means that the font
size in the preview overlay is scaled the same as the font size org
buffer's normal text.

This is more or less true for a Windows 7 machine connected to a 24",
1920x1080 pixel monitor:

[image: Inline image 2]

However, on a Windows 10 machine with a 12.3", 2736x1824 pixel monitor, the
same customization looks like this:

[image: Inline image 3]

On the second computer (a Surface Pro 4) the previews are tiny because the
screen has a much higher pixel density; the normal text is scaled
appropriately but the overlays aren't scaled to match.

I'd like keep the same .emacs file across all the machines I have to use,
so it would be best if the preview scaling was consistent.

Possibly the overlay scaling calculation is done using the function
window-text-width without the *pixelwise *argument, which would return a
width in characters.  To avoid changing the calculation too much, you could
use window-max-chars-per-line, which considers font size and some things
that would be missed by window-text-width even if *pixelwise* was used.

-- my setup
--
Emacs  : GNU Emacs 25.1.1 (i686-w64-mingw32)
 of 2016-09-17
Package: Org mode version 9.0.1 (9.0.1-elpaplus @
c:/Users/sotterson/home/.emacs.d/elpa/org-plus-contrib-20161118/)