Re: tex2lyx tests failing on master

2021-01-05 Thread Richard Kimberly Heck
On 1/6/21 1:06 AM, Scott Kostyshak wrote:
> I think it's because of the format update.

Sorry, updated.

Riki


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


fr User Guide fails to compile with Lua TeX fonts

2021-01-05 Thread Scott Kostyshak
On current master, to reproduce open the French User Guide and without using 
system fonts, compile with LuaTeX. It fails for me, although it passed a couple 
of days ago.

Scott


signature.asc
Description: PGP signature
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


tex2lyx tests failing on master

2021-01-05 Thread Scott Kostyshak
I think it's because of the format update.

Scott


signature.asc
Description: PGP signature
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: #11371: default equation reference format

2021-01-05 Thread Richard Kimberly Heck
On 1/5/21 6:29 PM, Thomas wrote:
> Riki:
>
> Thank you for giving this matter some attention.
>
> Yes. (At least for me ...) Remembering a most recent case should be really 
> good. (My "most recent (and desired) outcome" has remained unchanged for 
> years. I am not certain if or how I would need to "communicate to LyX" my 
> "choice." 

Sorry, I meant that we, the developers, have various options what choice
to make about what new functionality to include. It sounds like the
right choice here is: let the context menu remember what the last format
chosen was.


> Please keep me posted regarding progress. I normally do not track 
> improvements to LyX. So, a notice from you to "update LyX to get the new 
> capability" would be appreciated.

This will be in LyX 2.4.0, I expect. Which, hopefully, will be in March.
But we'll see.


> Separately, let me see if you have advice regarding one more topic.
> Many scientific publishers offer (and seem very much to encourage the use of) 
> downloadable templates for specific journals. As far as I can tell, most of 
> those templates do not appear via my combination of LyX and MikTeX. I have 
> tried to follow various procedures that LyX and other sources describe for 
> installing templates. Only once have I been able to actually find the right 
> directories and "make it work." (The template was something like svmono, from 
> Springer.) Usually, the templates and (if any) accompanying instructions seem 
> inadequate. For example, the downloads do not have [as best I recall, 
> something like ...] .class files. Anything that I should know or can do 
> regarding overcoming this? Also, perhaps someone can automate such a process?

This is quite common, yes. Usually, the templates are just LaTeX files
and what you need to do is import them into LyX (File> Import> LaTeX).
Problems arise if there is no LyX layout for whatever class file the
template uses. But very often that's not too hard to overcome. This type
of question arises on the user list quite frequently, so if you run into
that problem, I'd suggest posting there.

Riki

PS Please post responses inline. It makes the discussion much easier to
follow.


> -Original Message-
> From: Richard Kimberly Heck  
> Sent: Tuesday, January 5, 2021 2:38 PM
> To: Thomas ; lyx-devel@lists.lyx.org
> Subject: Re: #11371: default equation reference format
>
> On 1/5/21 3:09 PM, Thomas wrote:
>> Permit me to describe the situation. Hopefully, you can tell "what to do" or 
>> "what to set" (or you can prioritize an upgrade).
>>
>> I have a long document with many (more than 100) equations and many tables.
>>
>> To generate an internal cross-reference to an equation, ...
>> 1.   I right-click on the equation.
>> 2.   I select (from the now-evident choices) "copy as reference."
>> 3.   I right-click in the document at the place in which I want to have a 
>> cross reference.
>> 4.   I select "paste."
>> 5.   This leaves something of the form "Ref: eq: ...".
>> 6.   I right-click on that and select “().”
>> 7.   This leaves something of the form “EqRef:...”.
>>
>> My request features a desire to obtain the result (7. above) without having 
>> to cope with (at least) steps 5 and 6.
>>
>> Trying to use "Insert > Cross-reference" is prohibitively difficult. The 
>> list from which to make a selection is too big.
>>
>> I would think that a "remember and act on the last choice" feature would be 
>> a benefit for many people. In my case, I want all cross-references to 
>> equations to be of the same form ("EqRef: ..."). It may be reasonable to 
>> suppose that many other people would want (after making a one-time setting 
>> or a first-time choice) uniformity throughout a document.
> This is the use-case Scott mentioned. It sounds like remembering the last 
> choice is what would be best here, yes?
>
> This is slightly tricky to do, but hardly impossible.
>
> Riki
>
>
>

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


Re: [LyX/master] Arabic Beamer template

2021-01-05 Thread Kornel Benko
Am Tue, 5 Jan 2021 18:12:00 -0500
schrieb Scott Kostyshak :

> On Tue, Jan 05, 2021 at 09:16:48PM +0100, Pavel Sanda wrote:
> > On Mon, Jan 04, 2021 at 01:47:38PM -0500, Richard Kimberly Heck wrote:  
> > > On 1/4/21 4:19 AM, Pavel Sanda wrote:  
> > > > On Mon, Jan 04, 2021 at 01:23:34AM +0100, Richard Kimberly Heck wrote:  
> > > >> commit 469d3270aee7b7b812f1e212af02f6746c15f7a8
> > > >> Author: Richard Kimberly Heck 
> > > >> Date:   Sun Jan 3 19:23:39 2021 -0500
> > > >>
> > > >> Arabic Beamer template
> > > >> ---
> > > >>  lib/templates/ar/Presentations/Beamer.lyx | 1316 
> > > >> +
> > > >>  1 files changed, 1316 insertions(+), 0 deletions(-)  
> > > > Makefile.am entry missing?  
> > > 
> > > Can you check I did that right? I'm pretty clueless about Makefiles.  
> > 
> > Looks correct to me. Pavel  
> 
> Does this file compile for anyone? I get the following:
> 
>   ! LaTeX Error: \begin{minipage} on input line 160 ended by 
> \end{otherlanguage}.
> 
> Scott

Same here. Does not work neither with lualatex nor with xetex.

Kornel


pgpPb0vyzuRE0.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Arabic Beamer template

2021-01-05 Thread Scott Kostyshak
On Tue, Jan 05, 2021 at 09:16:48PM +0100, Pavel Sanda wrote:
> On Mon, Jan 04, 2021 at 01:47:38PM -0500, Richard Kimberly Heck wrote:
> > On 1/4/21 4:19 AM, Pavel Sanda wrote:
> > > On Mon, Jan 04, 2021 at 01:23:34AM +0100, Richard Kimberly Heck wrote:
> > >> commit 469d3270aee7b7b812f1e212af02f6746c15f7a8
> > >> Author: Richard Kimberly Heck 
> > >> Date:   Sun Jan 3 19:23:39 2021 -0500
> > >>
> > >> Arabic Beamer template
> > >> ---
> > >>  lib/templates/ar/Presentations/Beamer.lyx | 1316 
> > >> +
> > >>  1 files changed, 1316 insertions(+), 0 deletions(-)
> > > Makefile.am entry missing?
> > 
> > Can you check I did that right? I'm pretty clueless about Makefiles.
> 
> Looks correct to me. Pavel

Does this file compile for anyone? I get the following:

  ! LaTeX Error: \begin{minipage} on input line 160 ended by 
\end{otherlanguage}.

Scott


signature.asc
Description: PGP signature
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: #11371: default equation reference format

2021-01-05 Thread Richard Kimberly Heck

On 1/5/21 3:09 PM, Thomas wrote:

Permit me to describe the situation. Hopefully, you can tell "what to do" or "what 
to set" (or you can prioritize an upgrade).

I have a long document with many (more than 100) equations and many tables.

To generate an internal cross-reference to an equation, ...
1.  I right-click on the equation.
2.  I select (from the now-evident choices) "copy as reference."
3.  I right-click in the document at the place in which I want to have a 
cross reference.
4.  I select "paste."
5.  This leaves something of the form "Ref: eq: ...".
6.  I right-click on that and select “().”
7.  This leaves something of the form “EqRef:...”.

My request features a desire to obtain the result (7. above) without having to 
cope with (at least) steps 5 and 6.

Trying to use "Insert > Cross-reference" is prohibitively difficult. The list 
from which to make a selection is too big.

I would think that a "remember and act on the last choice" feature would be a benefit for 
many people. In my case, I want all cross-references to equations to be of the same form 
("EqRef: ..."). It may be reasonable to suppose that many other people would want (after 
making a one-time setting or a first-time choice) uniformity throughout a document.


This is the use-case Scott mentioned. It sounds like remembering the 
last choice is what would be best here, yes?


This is slightly tricky to do, but hardly impossible.

Riki


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


Re: [LyX/master] Arabic Beamer template

2021-01-05 Thread Pavel Sanda
On Mon, Jan 04, 2021 at 01:47:38PM -0500, Richard Kimberly Heck wrote:
> On 1/4/21 4:19 AM, Pavel Sanda wrote:
> > On Mon, Jan 04, 2021 at 01:23:34AM +0100, Richard Kimberly Heck wrote:
> >> commit 469d3270aee7b7b812f1e212af02f6746c15f7a8
> >> Author: Richard Kimberly Heck 
> >> Date:   Sun Jan 3 19:23:39 2021 -0500
> >>
> >> Arabic Beamer template
> >> ---
> >>  lib/templates/ar/Presentations/Beamer.lyx | 1316 
> >> +
> >>  1 files changed, 1316 insertions(+), 0 deletions(-)
> > Makefile.am entry missing?
> 
> Can you check I did that right? I'm pretty clueless about Makefiles.

Looks correct to me. Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Legacy graphics conversion problems

2021-01-05 Thread Jean-Marc Lasgouttes

Le 13/06/2019 à 17:41, José Abílio Matos a écrit :

Last week while working with python2/python3 differences I found clues that
the legacy graphics conversion has problems.

Like I said in bugs #11457 and #11282:
"This also means that the legacy conversion has some issues but I think that
by now everyone should be using dvipng to that part of the code is not used."

So my question now is if we should, or not, make dvipng is a requirement for
the instant preview mode.

What do you think?


José, what is the status on this?

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


Re: Problem with standard regex

2021-01-05 Thread Kornel Benko
Am Mon, 4 Jan 2021 23:37:04 +0200
schrieb Yuriy Skalko :

> > Thanks. I am not so sure that 'from_ascii()' is the better choice comparing 
> > to
> > 'from_utf8()' though.  
> 
> Maybe it will be better, but I cannot remember seeing exceptions with 
> `what`-messages not in plain English. Feel free to update.
> 
> 
> > BTW, I tested the regexes with Russian documents, and found an error in 
> > Additional.lyx
> > Correction attached.  
> 
> Really, that was missed out. Please commit it.
> 

Done at c6bc5f0c

> > Is the regex handling (with enabled format) now to your liking?
> > 
> > Kornel  
> 
> I've tested the regexes (with and without format). Now there are no 
> problems with Cyrillic in any practical regexes I can think of. Thanks 
> for advsearch that is really usable now, Kornel!
> 

Tried some exotic ways?
1.) Search for 3 or more consecutive identical chars
'(\S)\1\1+'
2.) Repeated words
'\b(\w+)\s+\1\b'
  # You will find 'действительно действительно', 'после после' in Additional.lyx
3.) Different languages (e.g.Latin) (Wrap the whole expression into Latin env
'.+'
etc

> Yuriy

Happy it works.

Kornel


pgpz94jx6MDob.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: XML stream writer library

2021-01-05 Thread Joel Kulesza
On Tue, Jan 5, 2021 at 1:19 AM Pavel Sanda  wrote:

> On Mon, Jan 04, 2021 at 09:48:42PM +0100, Thibaut Cuvelier wrote:
> > There are multiple issues here. What is needed to generate HTML and
> DocBook
> > is a simple SAX writer, not a parser. I've done plenty of research about
> > it, there's no XML library that does that. Most of them are using a DOM,
> > which is a total waste of memory for such an application: it stores a
> > complete XML tree in memory before serialising it. With SAX, you just
> need
> > a string backend, which is much more lightweight (by several factors).
>
> After little bit more thinking, is using DOM actually that big issue?
> I mean how much it takes - for document of length n its O(n) in space?
>
> Sure, it might be cut to constant, but practically speaking when you have
> 100 pages document what is the real time/memory consumption. Timewise
> you spent 1s in XML compared to next 30s in conversion figures to pdf or
> whatever format? Spacewise probably one more time than what we
> already allocated for document itself.
>
> If using more heavy-weight caliber xml lib is not pain from API point
> of view (and I do not know, you are the expert here) then we might
> actually consider it, given the difficulties in SAX space?
>

I had a similar thought and will note that I've had good success on other
projects with pugixml.

Regards,
Joel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: XML stream writer library

2021-01-05 Thread Pavel Sanda
On Mon, Jan 04, 2021 at 09:48:42PM +0100, Thibaut Cuvelier wrote:
> There are multiple issues here. What is needed to generate HTML and DocBook
> is a simple SAX writer, not a parser. I've done plenty of research about
> it, there's no XML library that does that. Most of them are using a DOM,
> which is a total waste of memory for such an application: it stores a
> complete XML tree in memory before serialising it. With SAX, you just need
> a string backend, which is much more lightweight (by several factors). 

After little bit more thinking, is using DOM actually that big issue?
I mean how much it takes - for document of length n its O(n) in space? 

Sure, it might be cut to constant, but practically speaking when you have 
100 pages document what is the real time/memory consumption. Timewise
you spent 1s in XML compared to next 30s in conversion figures to pdf or
whatever format? Spacewise probably one more time than what we
already allocated for document itself.

If using more heavy-weight caliber xml lib is not pain from API point
of view (and I do not know, you are the expert here) then we might
actually consider it, given the difficulties in SAX space?

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