Re: #12576: [Bug report] "Insert graphics" does not work anymore [LyX 2.4.0dev]

2023-07-18 Thread Pavel Sanda
On Tue, Jul 18, 2023 at 10:04:03PM +0200, Christoph Schmitz wrote:
> In the meantime, this problem has been fixed. However, due to a compiler 
> error, I can currently no longer compile LyX on macOS.

Fixed where?
We did not commit the fix yet. (But perhaps you don't use Qt 6.3.1 on platform 
cocoa anymore?)

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


Re: lyxerr categories

2023-07-18 Thread Pavel Sanda
On Tue, Jul 11, 2023 at 06:29:19PM +0200, Jean-Marc Lasgouttes wrote:
> Your plan looks fine. Please go ahead.

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


Re: #12576: [Bug report] "Insert graphics" does not work anymore [LyX 2.4.0dev]

2023-07-18 Thread Christoph Schmitz
In the meantime, this problem has been fixed. However, due to a compiler error, 
I can currently no longer compile LyX on macOS.


> Am 18.07.2023 um 16:25 schrieb LyX Ticket Tracker :
> 
> #12576: [Bug report] "Insert graphics" does not work anymore [LyX 2.4.0dev]
> ---+-
> Reporter:  docc   |   Owner:  lasgouttes
> Type:  defect |  Status:  reopened
> Priority:  high   |   Milestone:  2.4.0
> Component:  general| Version:  2.4.0dev
> Severity:  major  |  Resolution:
> Keywords:  os=macosx  |
> ---+-
> Changes (by sanda):
> 
> * priority:  normal => high
> 
> 
> Comment:
> 
> I consider this to be major issue for 2.4.
> 
> -- 
> Ticket URL: 
> The LyX Project 
> LyX -- The Document Processor

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


Re: [PATCH] Making Update::SinglePar work inside insets

2023-07-18 Thread Jean-Marc Lasgouttes

Le 17/07/2023 à 23:19, Jean-Marc Lasgouttes a écrit :
It worked well until one tries to use mathed %-] Updated patch below is 
better in this respect.


Err, I posted the same patch twice! Here is the updated one.

JMarc


From f17ff420bfa7c2390776023c566c4974ea612f28 Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes 
Date: Mon, 17 Jul 2023 14:43:29 +0200
Subject: [PATCH] Enable Update::SinglePar in nested insets too

The idea of single par update is to try to re-break only the paragraph
containing the cursor (if this paragraph contains insets etc.,
re-breaking will recursively descend).

The existing single paragraph update mechanism was tailored to work
only at top level. Indeed changing a paragraph nested into an inset may
lead to larger changes.

This commit tries a rather naive approach that seems to work well: we
need a full redraw if either

1/ the height has changed
or
2/ the width has changed and it was equal to the text metrics width;
   the goal is to catch the case of a one-row inset that grows with
   its contents, but optimize the case of typing in a short paragraph
   part of a larger inset.

NOTE: if only the height has changed, then it should be
  possible to update all metrics at minimal cost. However,
  since this is risky, we do not try that right now.

Part of bug #12297.
---
 src/BufferView.cpp | 42 +++---
 1 file changed, 27 insertions(+), 15 deletions(-)

diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 15911e8ff3..fa2c3de299 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -3023,24 +3023,36 @@ Cursor const & BufferView::cursor() const
 
 bool BufferView::singleParUpdate()
 {
-	Text & buftext = buffer_.text();
-	pit_type const bottom_pit = d->cursor_.bottom().pit();
-	TextMetrics & tm = textMetrics(&buftext);
-	Dimension const old_dim = tm.parMetrics(bottom_pit).dim();
+	CursorSlice const & its = d->cursor_.innerTextSlice();
+	pit_type const pit = its.pit();
+	TextMetrics & tm = textMetrics(its.text());
+	Dimension const old_dim = tm.parMetrics(pit).dim();
 
 	// make sure inline completion pointer is ok
 	if (d->inlineCompletionPos_.fixIfBroken())
 		d->inlineCompletionPos_ = DocIterator();
 
-	// In Single Paragraph mode, rebreak only
-	// the (main text, not inset!) paragraph containing the cursor.
-	// (if this paragraph contains insets etc., rebreaking will
-	// recursively descend)
-	tm.redoParagraph(bottom_pit);
-	ParagraphMetrics & pm = tm.parMetrics(bottom_pit);
-	if (pm.height() != old_dim.height()) {
-		// Paragraph height has changed so we cannot proceed to
-		// the singlePar optimisation.
+	/* Try to rebreak only the paragraph containing the cursor (if
+	 * this paragraph contains insets etc., rebreaking will
+	 * recursively descend). We need a full redraw if either
+	 * 1/ the height has changed
+	 * or
+	 * 2/ the width has changed and it was equal to the textmetrics
+	 *width; the goal is to catch the case of a one-row inset that
+	 *grows with its contents, but optimize the case of typing at
+	 *the end of a mmultiple-row paragraph.
+	 *
+	 * NOTE: if only the height has changed, then it should be
+	 *   possible to update all metrics at minimal cost. However,
+	 *   since this is risky, we do not try that right now.
+	 */
+	tm.redoParagraph(pit);
+	ParagraphMetrics & pm = tm.parMetrics(pit);
+	if (pm.height() != old_dim.height()
+		|| (pm.width() != old_dim.width() && old_dim.width() == tm.width())) {
+		// Paragraph height or width has changed so we cannot proceed
+		// to the singlePar optimisation.
+		LYXERR(Debug::PAINTING, "SinglePar optimization failed.");
 		return false;
 	}
 	// Since position() points to the baseline of the first row, we
@@ -3048,11 +3060,11 @@ bool BufferView::singleParUpdate()
 	// the height does not change but the ascent does.
 	pm.setPosition(pm.position() - old_dim.ascent() + pm.ascent());
 
-	tm.updatePosCache(bottom_pit);
+	tm.updatePosCache(pit);
 
 	LYXERR(Debug::PAINTING, "\ny1: " << pm.position() - pm.ascent()
 		<< " y2: " << pm.position() + pm.descent()
-		<< " pit: " << bottom_pit
+		<< " pit: " << pit
 		<< " singlepar: 1");
 	return true;
 }
-- 
2.39.2

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


Re: File format frozen?

2023-07-18 Thread Richard Kimberly Heck

On 7/18/23 07:29, Jürgen Spitzmüller wrote:

Covington recently got several new features that resulted in a modified
syntax (additional arguments and some new macros).

I'd love to add support for this to the linguistics module, but it will
require a file format change.


It's fine to go ahead. We can freeze after you do that.

Riki


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


Re: LaTeXHihglighter in pdf settings broken

2023-07-18 Thread Jürgen Spitzmüller
Am Dienstag, dem 18.07.2023 um 14:47 +0200 schrieb Pavel Sanda:
> citecolor=[rgb]{0.3,0,0.3},linkcolor=[rgb]{0.3,0,0.3},urlcolor=[rgb]{
> 0.3,0,0.3}

This one's handled properly now, as well.

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


Re: [PATCH] Is there a reason for not using macros with arguments in lib/symbols?

2023-07-18 Thread Thibaut Cuvelier
On Tue, 18 Jul 2023 at 16:55, Jean-Marc Lasgouttes 
wrote:

> Le 18/07/2023 à 16:47, Thibaut Cuvelier a écrit :
> > On Tue, 18 Jul 2023 at 16:04, Jean-Marc Lasgouttes  > > wrote:
> >
> > Le 18/07/2023 à 15:54, Thibaut Cuvelier a écrit :
> >  > Also, we already have macros with parameters:
> >  > https://github.com/cburschka/lyx/blob/master/lib/symbols#L1223
> > 
> >  >  > >
> >
> > Indeed. I'm the one who pushed that, but it did not impress me at the
> > time ;) And my question stands somehow, since I did not ask at the
> time.
> >
> > I'll push that then. I like the idea of using code as close as
> possible
> > to the LaTeX we want to emulate.
> >
> >
> > Could you please just add a TODO near the DocBook/XHTML code, so that I
> > can think about implementing the parameter mechanism at some point?
>
>
> You mean in lib/symbols? Or in some real code?
>

Any of them would be fine :)!
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [PATCH] Is there a reason for not using macros with arguments in lib/symbols?

2023-07-18 Thread Jean-Marc Lasgouttes

Le 18/07/2023 à 16:47, Thibaut Cuvelier a écrit :
On Tue, 18 Jul 2023 at 16:04, Jean-Marc Lasgouttes > wrote:


Le 18/07/2023 à 15:54, Thibaut Cuvelier a écrit :
 > Also, we already have macros with parameters:
 > https://github.com/cburschka/lyx/blob/master/lib/symbols#L1223

 > >

Indeed. I'm the one who pushed that, but it did not impress me at the
time ;) And my question stands somehow, since I did not ask at the time.

I'll push that then. I like the idea of using code as close as possible
to the LaTeX we want to emulate.


Could you please just add a TODO near the DocBook/XHTML code, so that I 
can think about implementing the parameter mechanism at some point?



You mean in lib/symbols? Or in some real code?

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


Re: [PATCH] Is there a reason for not using macros with arguments in lib/symbols?

2023-07-18 Thread Thibaut Cuvelier
On Tue, 18 Jul 2023 at 16:04, Jean-Marc Lasgouttes 
wrote:

> Le 18/07/2023 à 15:54, Thibaut Cuvelier a écrit :
> > Also, we already have macros with parameters:
> > https://github.com/cburschka/lyx/blob/master/lib/symbols#L1223
> > 
>
> Indeed. I'm the one who pushed that, but it did not impress me at the
> time ;) And my question stands somehow, since I did not ask at the time.
>
> I'll push that then. I like the idea of using code as close as possible
> to the LaTeX we want to emulate.
>

Could you please just add a TODO near the DocBook/XHTML code, so that I can
think about implementing the parameter mechanism at some point?
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] If language needs to be reset at the end of footnotes or floats

2023-07-18 Thread Scott Kostyshak
On Tue, Jul 18, 2023 at 03:28:29PM +0200, Jürgen Spitzmüller wrote:
> Am Dienstag, dem 18.07.2023 um 09:13 -0400 schrieb Scott Kostyshak:
> > Attached is a smaller example that gives the same error. Does that
> > work for you?
> 
> Yes, thanks. Try again.

Thanks, looks good. I think another case might have been in
ru/EmbeddedObjects. In any case, before your fix some of those tests
were failing and now they're passing.

Scott


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


Re: [PATCH] Is there a reason for not using macros with arguments in lib/symbols?

2023-07-18 Thread Jean-Marc Lasgouttes

Le 18/07/2023 à 15:54, Thibaut Cuvelier a écrit :
Also, we already have macros with parameters: 
https://github.com/cburschka/lyx/blob/master/lib/symbols#L1223 



Indeed. I'm the one who pushed that, but it did not impress me at the 
time ;) And my question stands somehow, since I did not ask at the time.


I'll push that then. I like the idea of using code as close as possible 
to the LaTeX we want to emulate.


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


Re: [PATCH] Is there a reason for not using macros with arguments in lib/symbols?

2023-07-18 Thread Thibaut Cuvelier
On Tue, 18 Jul 2023 at 15:45, Jean-Marc Lasgouttes 
wrote:

> Le 18/07/2023 à 15:36, Thibaut Cuvelier a écrit :
> > For the symbols in your patch, yes, export is currently broken, but it's
> > fixable.
> > I think it would still be fixable in the future with macros, as I did in
> > https://github.com/cburschka/lyx/blob/master/lib/symbols#L1128
> > .
>
> Yes, but macros with parameters?
>

I did not notice that in your patch (I'm avoiding low-level LaTeX, I find
it scary...). It's not currently supported, but we can implement a
mechanism like this. #1 and others are not used a lot (and we can implement
escaping).

Also, we already have macros with parameters:
https://github.com/cburschka/lyx/blob/master/lib/symbols#L1223
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [PATCH] Is there a reason for not using macros with arguments in lib/symbols?

2023-07-18 Thread Jean-Marc Lasgouttes

Le 18/07/2023 à 15:36, Thibaut Cuvelier a écrit :
For the symbols in your patch, yes, export is currently broken, but it's 
fixable.
I think it would still be fixable in the future with macros, as I did in 
https://github.com/cburschka/lyx/blob/master/lib/symbols#L1128 
.


Yes, but macros with parameters?

JMarc

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


Re: [PATCH] Is there a reason for not using macros with arguments in lib/symbols?

2023-07-18 Thread Thibaut Cuvelier
On Tue, 18 Jul 2023 at 15:11, Jean-Marc Lasgouttes 
wrote:

> Hello,
>
> In the attached patch, I am able to support the mod/bmod/pmod/pod macros
> by just defining them in lib/symbols with an argument.
>
> The result is a more pleasing editing process (IMO) and a simplification
> of the documentation.
>
> Since this use of \def is not documented, I have to ask: is there a
> reason for not doing it?
>
> One downside may be that exporting to html/docbook does not really work,
> but it has always been the case, AFAIK.
>

For the symbols in your patch, yes, export is currently broken, but it's
fixable.
I think it would still be fixable in the future with macros, as I did in
https://github.com/cburschka/lyx/blob/master/lib/symbols#L1128.

My question is: should I create a full-fledged math inset instead? It is
> doable too, nd at least I'd get the spacing right depending on the
> context (script...).
>
> JMarc--
>
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: LaTeXHihglighter in pdf settings broken

2023-07-18 Thread Pavel Sanda
On Tue, Jul 18, 2023 at 03:13:19PM +0200, Jürgen Spitzmüller wrote:
> Am Dienstag, dem 18.07.2023 um 14:47 +0200 schrieb Pavel Sanda:
> > the newly born pdfSupportModule->optionsTE in pdf settings got
> > LaTeXHighlighter
> > enabled, but it gets the higlighting wrong.
> > 
> > Not sure whether this is bug in highlighter or it's simply fact that
> > you don't put in full fledged latex constructions.
> 
> Both. The latter is fixed now.

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


Re: [LyX/master] If language needs to be reset at the end of footnotes or floats

2023-07-18 Thread Jürgen Spitzmüller
Am Dienstag, dem 18.07.2023 um 09:13 -0400 schrieb Scott Kostyshak:
> Attached is a smaller example that gives the same error. Does that
> work for you?

Yes, thanks. Try again.

-- 
Jürgen


signature.asc
Description: This is a digitally signed message part
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: LaTeXHihglighter in pdf settings broken

2023-07-18 Thread Jürgen Spitzmüller
Am Dienstag, dem 18.07.2023 um 14:47 +0200 schrieb Pavel Sanda:
> the newly born pdfSupportModule->optionsTE in pdf settings got
> LaTeXHighlighter
> enabled, but it gets the higlighting wrong.
> 
> Not sure whether this is bug in highlighter or it's simply fact that
> you don't put in full fledged latex constructions.

Both. The latter is fixed now.

> 
> Try e.g.:
> citecolor=[rgb]{0.3,0,0.3},linkcolor=[rgb]{0.3,0,0.3},urlcolor=[rgb]{
> 0.3,0,0.3}
> or
> draft,linkcolor=blue
> 
> Should I just disable it? (The same question probably applies to
> pdfSupportModule->metadataTE).

No, it just needs to be improved for more complex keyval options.

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


Re: [LyX/master] If language needs to be reset at the end of footnotes or floats

2023-07-18 Thread Scott Kostyshak
On Tue, Jul 18, 2023 at 02:45:08PM +0200, Jürgen Spitzmüller wrote:
> Am Dienstag, dem 18.07.2023 um 08:01 -0400 schrieb Scott Kostyshak:
> > I'm not sure, but I think this commit might have broken the following
> > test:
> > 
> >   DEFAULTOUTPUT_export/export/latex/inputenc-luatex-utf8_pdf5_texF
> 
> I am not able to compile this document due to a font error. Are you
> able to produce a minimal example document that pinpoints the problem
> more precisely?

Attached is a smaller example that gives the same error. Does that work for you?

I also attach a screenshot showing the LaTeX difference in the generated LaTeX 
that seems to cause the error.

Scott


example-smaller.lyx
Description: application/lyx


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


[PATCH] Is there a reason for not using macros with arguments in lib/symbols?

2023-07-18 Thread Jean-Marc Lasgouttes

Hello,

In the attached patch, I am able to support the mod/bmod/pmod/pod macros 
by just defining them in lib/symbols with an argument.


The result is a more pleasing editing process (IMO) and a simplification 
of the documentation.


Since this use of \def is not documented, I have to ask: is there a 
reason for not doing it?


One downside may be that exporting to html/docbook does not really work, 
but it has always been the case, AFAIK.


My question is: should I create a full-fledged math inset instead? It is 
doable too, nd at least I'd get the spacing right depending on the 
context (script...).


JMarcFrom bc03ea8ed0030e470cf7528004a7c9e51b1733b7 Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes 
Date: Tue, 18 Jul 2023 14:27:24 +0200
Subject: [PATCH] Use macros with parameters for modulo macros

It turns out that it is possible to use macros with parameters in lib/symbols.

I use this to simplify the use of mod-like macros.

Update documentation.
---
 lib/doc/Math.lyx | 250 +--
 lib/symbols  |  20 +++-
 2 files changed, 258 insertions(+), 12 deletions(-)

diff --git a/lib/doc/Math.lyx b/lib/doc/Math.lyx
index 0f1460934f..a9fbcf9d17 100644
--- a/lib/doc/Math.lyx
+++ b/lib/doc/Math.lyx
@@ -236,6 +236,7 @@ logicalmkup
 \docbook_mathml_prefix 1
 \author -584632292 "Richard Kimberly Heck"
 \author -563046850 "Jean-Marc LASGOUTTES"
+\author -495245474 "Jean-Marc Lasgouttes"
 \author 177693 "x"
 \author 5863208 "ab"
 \author 47243155 "Jean-Marc"
@@ -29069,24 +29070,257 @@ modulo-
 \begin_layout Standard
 The modulo-function is special,
  because it exists in four variants.
- The variants in a displayed formula are:
+ The variants in a
+\change_deleted -495245474 1689684546
+ displayed
+\change_inserted -495245474 1689684548
+n inline
+\change_unchanged
+ formula are:
+\change_deleted -495245474 1689684526
+
 \begin_inset Formula 
 \begin{align*}
 \underline{\textrm{Command}\raisebox{-0.9mm}{}} &  & \underline{\textrm{Result}}\\
-\mathrm{a\backslash mod\textrm{␣}b} &  & a\mod b\\
-\mathrm{a\backslash pmod\textrm{␣}b} &  & a\pmod b\\
-\mathrm{a\backslash bmod\textrm{␣}b} &  & a\bmod b\\
-\mathrm{a\backslash pod\textrm{␣}b} &  & a\pod b
+\mathrm{a\backslash mod\textrm{␣}b\textrm{␣}} &  & a\mod b\\
+\mathrm{a\backslash pmod\textrm{␣}b\textrm{␣}} &  & a\pmod b\\
+\mathrm{a\backslash bmod\textrm{␣}b\textrm{␣}} &  & a\bmod b\\
+\mathrm{a\backslash pod\textrm{␣}b\textrm{␣}} &  & a\pod b
 \end{align*}
 
 \end_inset
 
 
+\change_inserted -495245474 1689684215
+
 \end_layout
 
 \begin_layout Standard
-In an inline formula less space is set before the function names for all variants.
- By default the modulo-functions take only the first character following the command into account.
+\noindent
+\align center
+
+\change_inserted -495245474 1689684215
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted -495245474 1689684215
+Command
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted -495245474 1689684215
+Result
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted -495245474 1689684286
+a
+\backslash
+mod
+\begin_inset space \textvisiblespace{}
+\end_inset
+
+b
+\change_unchanged
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted -495245474 1689684457
+\begin_inset Formula $a\mod b$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted -495245474 1689684416
+a
+\backslash
+pmod
+\begin_inset space \textvisiblespace{}
+\end_inset
+
+b
+\begin_inset space \textvisiblespace{}
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted -495245474 1689684474
+\begin_inset Formula $a\pmod b$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted -495245474 1689684419
+a
+\backslash
+bmod
+\begin_inset space \textvisiblespace{}
+\end_inset
+
+b
+\begin_inset space \textvisiblespace{}
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted -495245474 1689684488
+\begin_inset Formula $a\bmod b$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted -495245474 1689684421
+a
+\backslash
+pod
+\begin_inset space \textvisiblespace{}
+\end_inset
+
+b
+\begin_inset space \textvisiblespace{}
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\change_inserted -495245474 1689684502
+\begin_inset Formula $a\pod b$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\change_unchanged
+
+\end_layout
+
+\begin_layout Standard
+In a
+\change_deleted -495245474 1689684554
+n inline
+\change_inserted -495245474 1689684556
+ d

Re: [LyX/master] Acount for all non-negative spaces used by lyx

2023-07-18 Thread Kornel Benko
Am Tue, 18 Jul 2023 14:54:46 +0200
schrieb Jean-Marc Lasgouttes :

> Le 18/07/2023 à 14:47, Kornel Benko a écrit :
> > Am Tue, 18 Jul 2023 13:58:51 +0200
> > schrieb Jean-Marc Lasgouttes :  
> >> Is this octal representation? Why is it needed? I think that we use
> >> hexadecimal in the rest of the code, don't we?
> >>
> >> JMarc  
> > 
> > True, but we are using here standard regex, so we have string() and not 
> > docstring()
> > here.  
> 
> And what's wrong with 0xc2 instead of \302? (or maybe \xc2)
> 
> JMarc
> 

Nothing's wrong. These are the values showed while debugging in gdb, so I used 
them.

Kornel


pgpCKeBsAGBwr.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] Acount for all non-negative spaces used by lyx

2023-07-18 Thread Jean-Marc Lasgouttes

Le 18/07/2023 à 14:47, Kornel Benko a écrit :

Am Tue, 18 Jul 2023 13:58:51 +0200
schrieb Jean-Marc Lasgouttes :

Is this octal representation? Why is it needed? I think that we use
hexadecimal in the rest of the code, don't we?

JMarc


True, but we are using here standard regex, so we have string() and not 
docstring() here.


And what's wrong with 0xc2 instead of \302? (or maybe \xc2)

JMarc

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


LaTeXHihglighter in pdf settings broken

2023-07-18 Thread Pavel Sanda
Hi Juergen,

the newly born pdfSupportModule->optionsTE in pdf settings got LaTeXHighlighter
enabled, but it gets the higlighting wrong.

Not sure whether this is bug in highlighter or it's simply fact that you
don't put in full fledged latex constructions.

Try e.g.:
citecolor=[rgb]{0.3,0,0.3},linkcolor=[rgb]{0.3,0,0.3},urlcolor=[rgb]{0.3,0,0.3}
or
draft,linkcolor=blue

Should I just disable it? (The same question probably applies to 
pdfSupportModule->metadataTE).

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


Re: [LyX/master] Acount for all non-negative spaces used by lyx

2023-07-18 Thread Kornel Benko
Am Tue, 18 Jul 2023 13:58:51 +0200
schrieb Jean-Marc Lasgouttes :

> Le 18/07/2023 à 12:03, Kornel Benko a écrit :
> > commit 8eda9e25e00effe8eec6adef8244fc81b888c78f
> > Author: Kornel Benko 
> > Date:   Tue Jul 18 13:09:55 2023 +0200
> > 
> >  Acount for all non-negative spaces used by lyx
> >  
> >  The unicode representation in an ascii-string string is
> >  \302\240Normal space
> >  \342\200\257Non-breaking Thin (1/6 em)
> >  \342\200\213\342\200\205\342\200\213Medium(2/9 em)
> >  \342\200\213\342\200\204\342\200\213Thick (5/18 em)
> >  \342\201\240\342\200\202\342\201\240Half Quad(0.5 em)
> >  \342\200\203Quad(1 em)
> >  \342\200\203\342\200\203Double Quad(2 em)
> >  \342\220\243Visible space  
> 
> Is this octal representation? Why is oit needed. I think that we use 
> hexadecimal in the rest of the code, don't we?
> 
> JMarc

True, but we are using here standard regex, so we have string() and not 
docstring() here.

Kornel


pgpqF_auZDHPT.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] If language needs to be reset at the end of footnotes or floats

2023-07-18 Thread Jürgen Spitzmüller
Am Dienstag, dem 18.07.2023 um 08:01 -0400 schrieb Scott Kostyshak:
> I'm not sure, but I think this commit might have broken the following
> test:
> 
>   DEFAULTOUTPUT_export/export/latex/inputenc-luatex-utf8_pdf5_texF

I am not able to compile this document due to a font error. Are you
able to produce a minimal example document that pinpoints the problem
more precisely?

-- 
Jürgen


signature.asc
Description: This is a digitally signed message part
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] If language needs to be reset at the end of footnotes or floats

2023-07-18 Thread Scott Kostyshak
On Sun, Jul 16, 2023 at 03:20:32PM +0200, Juergen Spitzmueller wrote:
> 
> commit 243b0ef90c09d52ba52e9918f2f80ba4557d068e
> Author: Juergen Spitzmueller 
> Date:   Sun Jul 16 16:31:31 2023 +0200
> 
> If language needs to be reset at the end of footnotes or floats
> 
> then do reset it only after footnotes or floats. \selectlanguage at
> the end of environments might produce spurious vertical space
> (see https://marc.info/?l=lyx-devel&m=168872369617866)
> ---

I'm not sure, but I think this commit might have broken the following test:

  DEFAULTOUTPUT_export/export/latex/inputenc-luatex-utf8_pdf5_texF

I get the following error:

  ! LaTeX Error: Command \ng unavailable in encoding LTH.

Scott


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


Re: [LyX/master] Acount for all non-negative spaces used by lyx

2023-07-18 Thread Jean-Marc Lasgouttes

Le 18/07/2023 à 12:03, Kornel Benko a écrit :

commit 8eda9e25e00effe8eec6adef8244fc81b888c78f
Author: Kornel Benko 
Date:   Tue Jul 18 13:09:55 2023 +0200

 Acount for all non-negative spaces used by lyx
 
 The unicode representation in an ascii-string string is

 \302\240Normal space
 \342\200\257Non-breaking Thin (1/6 em)
 \342\200\213\342\200\205\342\200\213Medium(2/9 em)
 \342\200\213\342\200\204\342\200\213Thick (5/18 em)
 \342\201\240\342\200\202\342\201\240Half Quad(0.5 em)
 \342\200\203Quad(1 em)
 \342\200\203\342\200\203Double Quad(2 em)
 \342\220\243Visible space


Is this octal representation? Why is oit needed. I think that we use 
hexadecimal in the rest of the code, don't we?


JMarc
 
 'Double Quad' counts as 2 spaces, all others count as 1 space in the search regex

---
  src/lyxfind.cpp |   42 ++
  1 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index df5752f..13159b5 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -831,13 +831,47 @@ string string2regex(string in)
// normal blanks
blanks++;
}
-   else if ((tempx[i] == '\302' && tempx[i+1] == '\240')
-   || (tempx[i] == '\342' && tempx[i+1] == '\202')) {
-   // protected space
-   // thin space
+   else if (tempx[i] == '\302' && tempx[i+1] == '\240') {
+   // Normal Space
blanks++;
i++;
}
+   else if (tempx[i] == '\342') {
+   if (tempx[i+1] == '\200') {
+   if ((tempx[i+2] == '\257')
+  || (tempx[i+2] == '\203')
+  || (tempx[i+2] == '\202')) {
+   // Non-breaking Thin (1/6 em)
+   // Quad(1 em), (Double quad counts as 2 
blanks)
+   // Half Quad
+   blanks++;
+   i += 2;
+   }
+   else if (tempx[i+2] == '\213') {
+   // Ignoring parts of Medium and Thick
+   i += 2;
+   continue;
+   }
+   else if ((tempx[i+2] == '\204') || (tempx[i+2] 
== '\205')) {
+   // Thick
+   // Medium
+   blanks++;
+   i += 2;
+   }
+   }
+   else if (tempx[i+1] == '\201') {
+   if (tempx[i+2] == '\240') {
+   // Ignoring parts of half quad
+   i += 2;
+   continue;
+   }
+   }
+   else if ((tempx[i+1] == '\220') && (tempx[i+2] == 
'\243')) {
+   // Visible space
+   blanks++;
+   i += 2;
+   }
+   }
else {
if (blanks > 0) {
temp += getRegexSpaceCount(blanks);


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


File format frozen?

2023-07-18 Thread Jürgen Spitzmüller
Covington recently got several new features that resulted in a modified
syntax (additional arguments and some new macros).

I'd love to add support for this to the linguistics module, but it will
require a file format change.

Is this too late now? (I am fully fine with that; just asking).
 
-- 
Jürgen
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: ./configure goes through, build fails with no library

2023-07-18 Thread Enrico Forestieri

On Mon, Jul 17, 2023 at 09:34:40PM +0200, Jean-Marc Lasgouttes wrote:


Moreover, I think that the Qt4 version would need a different 
approach, even if the info can be obtained by qmake. I recall that 
André even put up a build system based on qmake ;)


The good thing about Qt4 is that we removed support for it :)


Doh! Then I think it is easily feasible.

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