Re: Primes and superscripts in mathed

2023-11-27 Thread Andrew Parsloe

On 27/11/2023 6:02 pm, Isaac Oscar Gariano wrote:
Personally, I just don't use the |'|​ in LyX at all, especially as it 
doesn't display correctly, and as you show, doesn't combine properly 
with other superscripts/subscripts.
Instead, I always do |^\prime|​ which looks much nicer, and lets you 
control things better.


So perhaps the code would work better if it just made |'|​ autocorrect 
to |^\prime|​ ?


(In fact I've defined my own |\pri|​ command which alters the LaTeX 
height of the |\prime|​ to one I like more; and ones that use the 
|unicode-math|​ multi-prime commands |\dprime|​, |\tprime|​, and 
|\qprime|​).


I was unaware of the command \prime until looking up the TeXbook for my 
email. I've also now made a shortcut that does what I want. Thank you 
(but I still think LyX should handle the combination '^ better).



Andrew



— Isaac Oscar Gariano​

*From:* lyx-devel  on behalf of 
Andrew Parsloe 

*Sent:* Monday, 27 November 2023 10:10 AM
*To:* LyX Developers 
*Subject:* Primes and superscripts in mathed

TeX accepts  S'^{2}  (between $ delimiters) as a valid construction 
(TeXbook, p.130, line above Ex. 16.5) but mathed in LyX converts this 
to S'{}^{2}. In this simple case that is not a problem (in fact the 
interpolated {} gives better spacing) but it becomes a problem with 
expressions like (real-life example)


 S'^{\,-1}_{0i}  or S_{0i}'^{\,-1}

These compile fine in TeX and display as desired but mathed turns them 
into


 S'{}_{0i}^{\,-1}  and  S_{0i}'{}^{\,-1}

which give very different and clearly wrong results in the pdf.

The combination of a prime followed by a superscript seems a 
sufficiently basic sequence to me that I think mathed should handle it 
with more finesse than immediately and always inserting an empty brace 
pair between ' and ^.


[[Speculation:  I don't know the code but perhaps the problem is that 
mathed insists on subscript preceding superscript when both are 
involved in a symbol? R^{ij}_{kl} in mathed becomes R_{kl}^{ij}, and 
inserting a prime as in R'_{kl}^{ij} then produces the double 
superscript error. In contrast, R_{kl}'^{ij} does not. TeX accepts the 
'^ combination and I think mathed should do so too.]]


Andrew
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX features/biginset] Indicate that, by default, mouse LFUN do not require a metrics update

2023-11-27 Thread Jean-Marc Lasgouttes

Le 27/11/2023 à 18:04, Pavel Sanda a écrit :

On Mon, Nov 27, 2023 at 04:31:29PM +0100, Jean-Marc Lasgouttes wrote:

-   { LFUN_MOUSE_PRESS, "", ReadOnly, Hidden },
+   { LFUN_MOUSE_PRESS, "", ReadOnly | NoUpdate, Hidden },

...

-   { LFUN_MOUSE_RELEASE, "", ReadOnly, Hidden },
+   { LFUN_MOUSE_RELEASE, "", ReadOnly | NoUpdate, Hidden },


I know nothing about this, just thinking whether triggered DEPM or 
(un)collapsing
insets when clicking away should not tigger metrics update?


I _think_ that in this case the code will override the default update. I 
can confirm that DEPM works, for example.


To be fair, I did not remember that we had this information in 
LyXAction.cpp :)


What it does is change the default update flag before going through 
dispatch. I am not sure that this is written in the best (and safest) 
possible way, though.


JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX features/biginset] Indicate that, by default, mouse LFUN do not require a metrics update

2023-11-27 Thread Pavel Sanda
On Mon, Nov 27, 2023 at 04:31:29PM +0100, Jean-Marc Lasgouttes wrote:
> - { LFUN_MOUSE_PRESS, "", ReadOnly, Hidden },
> + { LFUN_MOUSE_PRESS, "", ReadOnly | NoUpdate, Hidden },
...
> - { LFUN_MOUSE_RELEASE, "", ReadOnly, Hidden },
> + { LFUN_MOUSE_RELEASE, "", ReadOnly | NoUpdate, Hidden },

I know nothing about this, just thinking whether triggered DEPM or 
(un)collapsing
insets when clicking away should not tigger metrics update?

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: flatpak

2023-11-27 Thread Pavel Sanda
On Sat, Nov 25, 2023 at 11:03:02PM -0500, T Rex wrote:
> I have sent the add request to flathub. The compilations I have made have
> been successful, however I have had to make some unexpected maneuvers to
> allow the program to function correctly, such as editing lyxrc.defaults. I
> don't know if there is a better way. Without the modification the buttons
> to build and view are blocked.
> Here you can find the manifest and other files:
> https://github.com/bztd/flathub/tree/org.lyx.LyX
> I remain attentive to any ideas, suggestions or opinions.

I was considering flatpacking some time ago. The problem with LyX is that
its extremely dependent on many other external utilities to work well.
And it seemed to me that it's difficult to make all that work well.
I will be happy if you prove me wrong.

Sure, you can compile it, but whether that makes that system useful
is altogether different thing. So if you put that on flathub, please
make clear it's limitations, so people know what works and it's not
equivalent to properly packaged version within standard distributions.

Things to test out of my pocket:
- python
- TeXLive / common packages
- docbook
- image conversion via imagemagick
- svg conversion (either inkscape or rsvg-convert needed)
- some pdf and html viewer should be available
- literate prigramming (sweave/knitr)
- many other esoteric things need not to be present but
  at least one could indicate it's missing (lilypond for musical
  notation, gnumeric for sheets, maxima for evaluating math,, rcs/git
  for version control, etc

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel