Re: [LyX/master] Paragraph::needsCProtection(): use inset list
On Mon, Dec 27, 2021 at 09:55:11AM +0100, Jürgen Spitzmüller wrote: > Am Sonntag, dem 26.12.2021 um 12:15 -0500 schrieb Scott Kostyshak: > > Strangely I could not create an example (to put in tests) that fails > > to compile with 2.3.0 (no cprotect) but compiles with master (which > > uses cprotect). I wonder if a LaTeX figure improved this situation in > > the last couple of years? > > I suspect this has been fixes with > https://github.com/latex3/latex2e/issues/123 > > or subsequent robustification (which has been one core aim of recent > LaTeX release). > > At least the MATH_AMSARRAY_CODE can go now, AFAICS- Need to check the > other cases. Thank you for finding that, Jürgen and solving the mystery. 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] Paragraph::needsCProtection(): use inset list
Am Sonntag, dem 26.12.2021 um 12:15 -0500 schrieb Scott Kostyshak: > Strangely I could not create an example (to put in tests) that fails > to compile with 2.3.0 (no cprotect) but compiles with master (which > uses cprotect). I wonder if a LaTeX figure improved this situation in > the last couple of years? I suspect this has been fixes with https://github.com/latex3/latex2e/issues/123 or subsequent robustification (which has been one core aim of recent LaTeX release). At least the MATH_AMSARRAY_CODE can go now, AFAICS- Need to check the other cases. 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] Paragraph::needsCProtection(): use inset list
On Sun, Dec 26, 2021 at 05:48:02PM +0100, Jean-Marc Lasgouttes wrote: > Le 23/12/2021 à 07:52, Jürgen Spitzmüller a écrit : > > Am Mittwoch, dem 22.12.2021 um 16:16 +0100 schrieb Jean-Marc > > Lasgouttes: > > > Jürgen, can you tell me what is the purpose of the test against math > > > insets? > > > > Some math insets need to be \cprotect'ed in macro arguments (e.g., > > captions). See > > https://www.lyx.org/trac/ticket/6243 > > > Yes, this is the bug. I should have read that before sending my previous > message. Strangely I could not create an example (to put in tests) that fails to compile with 2.3.0 (no cprotect) but compiles with master (which uses cprotect). I wonder if a LaTeX figure improved this situation in the last couple of years? 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] Paragraph::needsCProtection(): use inset list
Le 23/12/2021 à 04:05, Scott Kostyshak a écrit : Yes, that would be nice. I added a test at 87bea678. I'll add more files to that directory (autotests/export/latex/lyxbugs-resolved/cprotect) as I find them. Thanks for the tests. JMarc -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] Paragraph::needsCProtection(): use inset list
Le 23/12/2021 à 07:52, Jürgen Spitzmüller a écrit : Am Mittwoch, dem 22.12.2021 um 16:16 +0100 schrieb Jean-Marc Lasgouttes: Jürgen, can you tell me what is the purpose of the test against math insets? Some math insets need to be \cprotect'ed in macro arguments (e.g., captions). See https://www.lyx.org/trac/ticket/6243 Yes, this is the bug. I should have read that before sending my previous message. JMarc -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] Paragraph::needsCProtection(): use inset list
Le 21/12/2021 à 16:32, Jürgen Spitzmüller a écrit : Am Dienstag, dem 21.12.2021 um 15:45 +0100 schrieb Jean-Marc Lasgouttes: I could try to help with this, but for that I would have to understand what the code does (and what cprotect does). \cprotect allows to put verbatim context into places where this would normally be invalid (basically macro arguments) by outsourcing stuff to aux files. This fixes many shortcomings we had with things in footnotes, sections, and other places that simply didn't compile. That's what the doc says, but it is also used for math arrays, right? I have to say that I do not understand everything yet. JMarc -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] Paragraph::needsCProtection(): use inset list
On Sun, Dec 26, 2021 at 02:27:12AM +0100, Thibaut Cuvelier wrote: > On Fri, 24 Dec 2021 at 03:39, Scott Kostyshak wrote: > > > On Fri, Dec 24, 2021 at 01:13:24AM +0100, Thibaut Cuvelier wrote: > > > On Fri, 24 Dec 2021 at 00:57, Thibaut Cuvelier > > wrote: > > > > > > > On Fri, 24 Dec 2021 at 00:50, Thibaut Cuvelier > > wrote: > > > > > > > >> On Thu, 23 Dec 2021 at 22:26, Scott Kostyshak > > wrote: > > > >> > > > >>> On Thu, Dec 23, 2021 at 03:07:00PM -0500, Scott Kostyshak wrote: > > > >>> > On Thu, Dec 23, 2021 at 11:36:53AM +0100, Kornel Benko wrote: > > > >>> > > Am Wed, 22 Dec 2021 22:05:02 -0500 > > > >>> > > schrieb Scott Kostyshak : > > > >>> > > > > > >>> > > > On Wed, Dec 22, 2021 at 05:16:45PM +0100, Jean-Marc Lasgouttes > > > >>> wrote: > > > >>> > > > > Le 22/12/2021 à 16:52, Scott Kostyshak a écrit : > > > >>> > > > > > On Wed, Dec 22, 2021 at 04:16:30PM +0100, Jean-Marc > > Lasgouttes > > > >>> wrote: > > > >>> > > > > > > > > >>> > > > > > > Do we have a cprotect torture test, BTW? > > > >>> > > > > > > > > >>> > > > > > We don't. But I could spend some time setting these up. > > Just > > > >>> to make > > > >>> > > > > > sure, you mean examples of .lyx files that need the > > cprotect > > > >>> feature to > > > >>> > > > > > compile without error, right? > > > >>> > > > > > > > >>> > > > > Yes, that would be nice. > > > >>> > > > > > > >>> > > > I added a test at 87bea678. I'll add more files to that > > directory > > > >>> > > > (autotests/export/latex/lyxbugs-resolved/cprotect) as I find > > them. > > > >>> > > > > > > >>> > > > Scott > > > >>> > > > > > >>> > > From the tests there, only > > > >>> > > > > > >>> > > export/export/latex/lyxbugs-resolved/cprotect/9313-comment-in-figure-float-caption_docbook5 > > > >>> > > fails. > > > >>> > > > > >>> > Indeed, thanks for catching that, Kornel. Thibaut, is this an easy > > fix > > > >>> > or should we invert? > > > >>> > > > >>> Thibaut, please also check 7779-float-in-par-env.lyx. > > > >>> > > > >> > > > >> DocBook-wise, 9313 is truly a bug (the export code thinks there is a > > > >> title, but as there's just a comment and no actual title it all > > breaks). > > > >> 7779 is really strange, I'll have to take a deeper look to see what's > > going > > > >> on. > > > >> > > > > > > > > For 7779, there is no hope, as a figure within a title does not make > > sense > > > > at all, so it cannot be valid DocBook under any circumstances. This one > > > > should be inverted. > > > > > > > > > > I didn't expect it would be so easy to fix, so > > > c734504d3b4bac795627e1c4fa5b2e27b15e8653 should fix the validation > > problem > > > for 9313. Let me know if this is enough! > > > > Thank you for the quick fix, Thibaut! The test now passes. After your > > patch though the following test now fails for me: > > > > export/export/docbook/basic_docbook5 > > > > Wow, that was quite a bug that I introduced... I fixed that in 4c27a730. > Thanks for noticing this! Looks good, Thibaut. Thanks for the quick fix! 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] Paragraph::needsCProtection(): use inset list
On Fri, 24 Dec 2021 at 03:39, Scott Kostyshak wrote: > On Fri, Dec 24, 2021 at 01:13:24AM +0100, Thibaut Cuvelier wrote: > > On Fri, 24 Dec 2021 at 00:57, Thibaut Cuvelier > wrote: > > > > > On Fri, 24 Dec 2021 at 00:50, Thibaut Cuvelier > wrote: > > > > > >> On Thu, 23 Dec 2021 at 22:26, Scott Kostyshak > wrote: > > >> > > >>> On Thu, Dec 23, 2021 at 03:07:00PM -0500, Scott Kostyshak wrote: > > >>> > On Thu, Dec 23, 2021 at 11:36:53AM +0100, Kornel Benko wrote: > > >>> > > Am Wed, 22 Dec 2021 22:05:02 -0500 > > >>> > > schrieb Scott Kostyshak : > > >>> > > > > >>> > > > On Wed, Dec 22, 2021 at 05:16:45PM +0100, Jean-Marc Lasgouttes > > >>> wrote: > > >>> > > > > Le 22/12/2021 à 16:52, Scott Kostyshak a écrit : > > >>> > > > > > On Wed, Dec 22, 2021 at 04:16:30PM +0100, Jean-Marc > Lasgouttes > > >>> wrote: > > >>> > > > > > > > >>> > > > > > > Do we have a cprotect torture test, BTW? > > >>> > > > > > > > >>> > > > > > We don't. But I could spend some time setting these up. > Just > > >>> to make > > >>> > > > > > sure, you mean examples of .lyx files that need the > cprotect > > >>> feature to > > >>> > > > > > compile without error, right? > > >>> > > > > > > >>> > > > > Yes, that would be nice. > > >>> > > > > > >>> > > > I added a test at 87bea678. I'll add more files to that > directory > > >>> > > > (autotests/export/latex/lyxbugs-resolved/cprotect) as I find > them. > > >>> > > > > > >>> > > > Scott > > >>> > > > > >>> > > From the tests there, only > > >>> > > > > >>> > export/export/latex/lyxbugs-resolved/cprotect/9313-comment-in-figure-float-caption_docbook5 > > >>> > > fails. > > >>> > > > >>> > Indeed, thanks for catching that, Kornel. Thibaut, is this an easy > fix > > >>> > or should we invert? > > >>> > > >>> Thibaut, please also check 7779-float-in-par-env.lyx. > > >>> > > >> > > >> DocBook-wise, 9313 is truly a bug (the export code thinks there is a > > >> title, but as there's just a comment and no actual title it all > breaks). > > >> 7779 is really strange, I'll have to take a deeper look to see what's > going > > >> on. > > >> > > > > > > For 7779, there is no hope, as a figure within a title does not make > sense > > > at all, so it cannot be valid DocBook under any circumstances. This one > > > should be inverted. > > > > > > > I didn't expect it would be so easy to fix, so > > c734504d3b4bac795627e1c4fa5b2e27b15e8653 should fix the validation > problem > > for 9313. Let me know if this is enough! > > Thank you for the quick fix, Thibaut! The test now passes. After your > patch though the following test now fails for me: > > export/export/docbook/basic_docbook5 > Wow, that was quite a bug that I introduced... I fixed that in 4c27a730. Thanks for noticing this! -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] Paragraph::needsCProtection(): use inset list
On Fri, Dec 24, 2021 at 01:13:24AM +0100, Thibaut Cuvelier wrote: > On Fri, 24 Dec 2021 at 00:57, Thibaut Cuvelier wrote: > > > On Fri, 24 Dec 2021 at 00:50, Thibaut Cuvelier wrote: > > > >> On Thu, 23 Dec 2021 at 22:26, Scott Kostyshak wrote: > >> > >>> On Thu, Dec 23, 2021 at 03:07:00PM -0500, Scott Kostyshak wrote: > >>> > On Thu, Dec 23, 2021 at 11:36:53AM +0100, Kornel Benko wrote: > >>> > > Am Wed, 22 Dec 2021 22:05:02 -0500 > >>> > > schrieb Scott Kostyshak : > >>> > > > >>> > > > On Wed, Dec 22, 2021 at 05:16:45PM +0100, Jean-Marc Lasgouttes > >>> wrote: > >>> > > > > Le 22/12/2021 à 16:52, Scott Kostyshak a écrit : > >>> > > > > > On Wed, Dec 22, 2021 at 04:16:30PM +0100, Jean-Marc Lasgouttes > >>> wrote: > >>> > > > > > > >>> > > > > > > Do we have a cprotect torture test, BTW? > >>> > > > > > > >>> > > > > > We don't. But I could spend some time setting these up. Just > >>> to make > >>> > > > > > sure, you mean examples of .lyx files that need the cprotect > >>> feature to > >>> > > > > > compile without error, right? > >>> > > > > > >>> > > > > Yes, that would be nice. > >>> > > > > >>> > > > I added a test at 87bea678. I'll add more files to that directory > >>> > > > (autotests/export/latex/lyxbugs-resolved/cprotect) as I find them. > >>> > > > > >>> > > > Scott > >>> > > > >>> > > From the tests there, only > >>> > > > >>> export/export/latex/lyxbugs-resolved/cprotect/9313-comment-in-figure-float-caption_docbook5 > >>> > > fails. > >>> > > >>> > Indeed, thanks for catching that, Kornel. Thibaut, is this an easy fix > >>> > or should we invert? > >>> > >>> Thibaut, please also check 7779-float-in-par-env.lyx. > >>> > >> > >> DocBook-wise, 9313 is truly a bug (the export code thinks there is a > >> title, but as there's just a comment and no actual title it all breaks). > >> 7779 is really strange, I'll have to take a deeper look to see what's going > >> on. > >> > > > > For 7779, there is no hope, as a figure within a title does not make sense > > at all, so it cannot be valid DocBook under any circumstances. This one > > should be inverted. > > > > I didn't expect it would be so easy to fix, so > c734504d3b4bac795627e1c4fa5b2e27b15e8653 should fix the validation problem > for 9313. Let me know if this is enough! Thank you for the quick fix, Thibaut! The test now passes. After your patch though the following test now fails for me: export/export/docbook/basic_docbook5 > (By the way: merry Christmas!) Merry Christmas to you too! 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] Paragraph::needsCProtection(): use inset list
On Fri, Dec 24, 2021 at 12:57:20AM +0100, Thibaut Cuvelier wrote: > On Fri, 24 Dec 2021 at 00:50, Thibaut Cuvelier wrote: > > > On Thu, 23 Dec 2021 at 22:26, Scott Kostyshak wrote: > > > >> On Thu, Dec 23, 2021 at 03:07:00PM -0500, Scott Kostyshak wrote: > >> > On Thu, Dec 23, 2021 at 11:36:53AM +0100, Kornel Benko wrote: > >> > > Am Wed, 22 Dec 2021 22:05:02 -0500 > >> > > schrieb Scott Kostyshak : > >> > > > >> > > > On Wed, Dec 22, 2021 at 05:16:45PM +0100, Jean-Marc Lasgouttes > >> wrote: > >> > > > > Le 22/12/2021 à 16:52, Scott Kostyshak a écrit : > >> > > > > > On Wed, Dec 22, 2021 at 04:16:30PM +0100, Jean-Marc Lasgouttes > >> wrote: > >> > > > > > > >> > > > > > > Do we have a cprotect torture test, BTW? > >> > > > > > > >> > > > > > We don't. But I could spend some time setting these up. Just to > >> make > >> > > > > > sure, you mean examples of .lyx files that need the cprotect > >> feature to > >> > > > > > compile without error, right? > >> > > > > > >> > > > > Yes, that would be nice. > >> > > > > >> > > > I added a test at 87bea678. I'll add more files to that directory > >> > > > (autotests/export/latex/lyxbugs-resolved/cprotect) as I find them. > >> > > > > >> > > > Scott > >> > > > >> > > From the tests there, only > >> > > > >> export/export/latex/lyxbugs-resolved/cprotect/9313-comment-in-figure-float-caption_docbook5 > >> > > fails. > >> > > >> > Indeed, thanks for catching that, Kornel. Thibaut, is this an easy fix > >> > or should we invert? > >> > >> Thibaut, please also check 7779-float-in-par-env.lyx. > >> > > > > DocBook-wise, 9313 is truly a bug (the export code thinks there is a > > title, but as there's just a comment and no actual title it all breaks). > > 7779 is really strange, I'll have to take a deeper look to see what's going > > on. > > > > For 7779, there is no hope, as a figure within a title does not make sense > at all, so it cannot be valid DocBook under any circumstances. This one > should be inverted. Thanks for taking a look. Inverted at 9d64a2f2. 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] Paragraph::needsCProtection(): use inset list
On Fri, 24 Dec 2021 at 00:57, Thibaut Cuvelier wrote: > On Fri, 24 Dec 2021 at 00:50, Thibaut Cuvelier wrote: > >> On Thu, 23 Dec 2021 at 22:26, Scott Kostyshak wrote: >> >>> On Thu, Dec 23, 2021 at 03:07:00PM -0500, Scott Kostyshak wrote: >>> > On Thu, Dec 23, 2021 at 11:36:53AM +0100, Kornel Benko wrote: >>> > > Am Wed, 22 Dec 2021 22:05:02 -0500 >>> > > schrieb Scott Kostyshak : >>> > > >>> > > > On Wed, Dec 22, 2021 at 05:16:45PM +0100, Jean-Marc Lasgouttes >>> wrote: >>> > > > > Le 22/12/2021 à 16:52, Scott Kostyshak a écrit : >>> > > > > > On Wed, Dec 22, 2021 at 04:16:30PM +0100, Jean-Marc Lasgouttes >>> wrote: >>> > > > > > >>> > > > > > > Do we have a cprotect torture test, BTW? >>> > > > > > >>> > > > > > We don't. But I could spend some time setting these up. Just >>> to make >>> > > > > > sure, you mean examples of .lyx files that need the cprotect >>> feature to >>> > > > > > compile without error, right? >>> > > > > >>> > > > > Yes, that would be nice. >>> > > > >>> > > > I added a test at 87bea678. I'll add more files to that directory >>> > > > (autotests/export/latex/lyxbugs-resolved/cprotect) as I find them. >>> > > > >>> > > > Scott >>> > > >>> > > From the tests there, only >>> > > >>> export/export/latex/lyxbugs-resolved/cprotect/9313-comment-in-figure-float-caption_docbook5 >>> > > fails. >>> > >>> > Indeed, thanks for catching that, Kornel. Thibaut, is this an easy fix >>> > or should we invert? >>> >>> Thibaut, please also check 7779-float-in-par-env.lyx. >>> >> >> DocBook-wise, 9313 is truly a bug (the export code thinks there is a >> title, but as there's just a comment and no actual title it all breaks). >> 7779 is really strange, I'll have to take a deeper look to see what's going >> on. >> > > For 7779, there is no hope, as a figure within a title does not make sense > at all, so it cannot be valid DocBook under any circumstances. This one > should be inverted. > I didn't expect it would be so easy to fix, so c734504d3b4bac795627e1c4fa5b2e27b15e8653 should fix the validation problem for 9313. Let me know if this is enough! (By the way: merry Christmas!) -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] Paragraph::needsCProtection(): use inset list
On Fri, 24 Dec 2021 at 00:50, Thibaut Cuvelier wrote: > On Thu, 23 Dec 2021 at 22:26, Scott Kostyshak wrote: > >> On Thu, Dec 23, 2021 at 03:07:00PM -0500, Scott Kostyshak wrote: >> > On Thu, Dec 23, 2021 at 11:36:53AM +0100, Kornel Benko wrote: >> > > Am Wed, 22 Dec 2021 22:05:02 -0500 >> > > schrieb Scott Kostyshak : >> > > >> > > > On Wed, Dec 22, 2021 at 05:16:45PM +0100, Jean-Marc Lasgouttes >> wrote: >> > > > > Le 22/12/2021 à 16:52, Scott Kostyshak a écrit : >> > > > > > On Wed, Dec 22, 2021 at 04:16:30PM +0100, Jean-Marc Lasgouttes >> wrote: >> > > > > > >> > > > > > > Do we have a cprotect torture test, BTW? >> > > > > > >> > > > > > We don't. But I could spend some time setting these up. Just to >> make >> > > > > > sure, you mean examples of .lyx files that need the cprotect >> feature to >> > > > > > compile without error, right? >> > > > > >> > > > > Yes, that would be nice. >> > > > >> > > > I added a test at 87bea678. I'll add more files to that directory >> > > > (autotests/export/latex/lyxbugs-resolved/cprotect) as I find them. >> > > > >> > > > Scott >> > > >> > > From the tests there, only >> > > >> export/export/latex/lyxbugs-resolved/cprotect/9313-comment-in-figure-float-caption_docbook5 >> > > fails. >> > >> > Indeed, thanks for catching that, Kornel. Thibaut, is this an easy fix >> > or should we invert? >> >> Thibaut, please also check 7779-float-in-par-env.lyx. >> > > DocBook-wise, 9313 is truly a bug (the export code thinks there is a > title, but as there's just a comment and no actual title it all breaks). > 7779 is really strange, I'll have to take a deeper look to see what's going > on. > For 7779, there is no hope, as a figure within a title does not make sense at all, so it cannot be valid DocBook under any circumstances. This one should be inverted. -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] Paragraph::needsCProtection(): use inset list
On Thu, 23 Dec 2021 at 22:26, Scott Kostyshak wrote: > On Thu, Dec 23, 2021 at 03:07:00PM -0500, Scott Kostyshak wrote: > > On Thu, Dec 23, 2021 at 11:36:53AM +0100, Kornel Benko wrote: > > > Am Wed, 22 Dec 2021 22:05:02 -0500 > > > schrieb Scott Kostyshak : > > > > > > > On Wed, Dec 22, 2021 at 05:16:45PM +0100, Jean-Marc Lasgouttes wrote: > > > > > Le 22/12/2021 à 16:52, Scott Kostyshak a écrit : > > > > > > On Wed, Dec 22, 2021 at 04:16:30PM +0100, Jean-Marc Lasgouttes > wrote: > > > > > > > > > > > > > Do we have a cprotect torture test, BTW? > > > > > > > > > > > > We don't. But I could spend some time setting these up. Just to > make > > > > > > sure, you mean examples of .lyx files that need the cprotect > feature to > > > > > > compile without error, right? > > > > > > > > > > Yes, that would be nice. > > > > > > > > I added a test at 87bea678. I'll add more files to that directory > > > > (autotests/export/latex/lyxbugs-resolved/cprotect) as I find them. > > > > > > > > Scott > > > > > > From the tests there, only > > > > export/export/latex/lyxbugs-resolved/cprotect/9313-comment-in-figure-float-caption_docbook5 > > > fails. > > > > Indeed, thanks for catching that, Kornel. Thibaut, is this an easy fix > > or should we invert? > > Thibaut, please also check 7779-float-in-par-env.lyx. > DocBook-wise, 9313 is truly a bug (the export code thinks there is a title, but as there's just a comment and no actual title it all breaks). 7779 is really strange, I'll have to take a deeper look to see what's going on. -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] Paragraph::needsCProtection(): use inset list
On Thu, Dec 23, 2021 at 03:07:00PM -0500, Scott Kostyshak wrote: > On Thu, Dec 23, 2021 at 11:36:53AM +0100, Kornel Benko wrote: > > Am Wed, 22 Dec 2021 22:05:02 -0500 > > schrieb Scott Kostyshak : > > > > > On Wed, Dec 22, 2021 at 05:16:45PM +0100, Jean-Marc Lasgouttes wrote: > > > > Le 22/12/2021 à 16:52, Scott Kostyshak a écrit : > > > > > On Wed, Dec 22, 2021 at 04:16:30PM +0100, Jean-Marc Lasgouttes wrote: > > > > > > > > > > > Do we have a cprotect torture test, BTW? > > > > > > > > > > We don't. But I could spend some time setting these up. Just to make > > > > > sure, you mean examples of .lyx files that need the cprotect feature > > > > > to > > > > > compile without error, right? > > > > > > > > Yes, that would be nice. > > > > > > I added a test at 87bea678. I'll add more files to that directory > > > (autotests/export/latex/lyxbugs-resolved/cprotect) as I find them. > > > > > > Scott > > > > From the tests there, only > > export/export/latex/lyxbugs-resolved/cprotect/9313-comment-in-figure-float-caption_docbook5 > > fails. > > Indeed, thanks for catching that, Kornel. Thibaut, is this an easy fix > or should we invert? Thibaut, please also check 7779-float-in-par-env.lyx. 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] Paragraph::needsCProtection(): use inset list
On Thu, Dec 23, 2021 at 11:36:53AM +0100, Kornel Benko wrote: > Am Wed, 22 Dec 2021 22:05:02 -0500 > schrieb Scott Kostyshak : > > > On Wed, Dec 22, 2021 at 05:16:45PM +0100, Jean-Marc Lasgouttes wrote: > > > Le 22/12/2021 à 16:52, Scott Kostyshak a écrit : > > > > On Wed, Dec 22, 2021 at 04:16:30PM +0100, Jean-Marc Lasgouttes wrote: > > > > > > > > > Do we have a cprotect torture test, BTW? > > > > > > > > We don't. But I could spend some time setting these up. Just to make > > > > sure, you mean examples of .lyx files that need the cprotect feature to > > > > compile without error, right? > > > > > > Yes, that would be nice. > > > > I added a test at 87bea678. I'll add more files to that directory > > (autotests/export/latex/lyxbugs-resolved/cprotect) as I find them. > > > > Scott > > From the tests there, only > export/export/latex/lyxbugs-resolved/cprotect/9313-comment-in-figure-float-caption_docbook5 > fails. Indeed, thanks for catching that, Kornel. Thibaut, is this an easy fix or should we invert? 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] Paragraph::needsCProtection(): use inset list
Am Wed, 22 Dec 2021 22:05:02 -0500 schrieb Scott Kostyshak : > On Wed, Dec 22, 2021 at 05:16:45PM +0100, Jean-Marc Lasgouttes wrote: > > Le 22/12/2021 à 16:52, Scott Kostyshak a écrit : > > > On Wed, Dec 22, 2021 at 04:16:30PM +0100, Jean-Marc Lasgouttes wrote: > > > > > > > Do we have a cprotect torture test, BTW? > > > > > > We don't. But I could spend some time setting these up. Just to make > > > sure, you mean examples of .lyx files that need the cprotect feature to > > > compile without error, right? > > > > Yes, that would be nice. > > I added a test at 87bea678. I'll add more files to that directory > (autotests/export/latex/lyxbugs-resolved/cprotect) as I find them. > > Scott From the tests there, only export/export/latex/lyxbugs-resolved/cprotect/9313-comment-in-figure-float-caption_docbook5 fails. Kornel pgpIakq93Tsyl.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] Paragraph::needsCProtection(): use inset list
Am Mittwoch, dem 22.12.2021 um 16:16 +0100 schrieb Jean-Marc Lasgouttes: > Jürgen, can you tell me what is the purpose of the test against math > insets? Some math insets need to be \cprotect'ed in macro arguments (e.g., captions). See https://www.lyx.org/trac/ticket/6243 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] Paragraph::needsCProtection(): use inset list
On Wed, Dec 22, 2021 at 05:16:45PM +0100, Jean-Marc Lasgouttes wrote: > Le 22/12/2021 à 16:52, Scott Kostyshak a écrit : > > On Wed, Dec 22, 2021 at 04:16:30PM +0100, Jean-Marc Lasgouttes wrote: > > > > > Do we have a cprotect torture test, BTW? > > > > We don't. But I could spend some time setting these up. Just to make > > sure, you mean examples of .lyx files that need the cprotect feature to > > compile without error, right? > > Yes, that would be nice. I added a test at 87bea678. I'll add more files to that directory (autotests/export/latex/lyxbugs-resolved/cprotect) as I find them. 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] Paragraph::needsCProtection(): use inset list
Le 22/12/2021 à 16:52, Scott Kostyshak a écrit : On Wed, Dec 22, 2021 at 04:16:30PM +0100, Jean-Marc Lasgouttes wrote: Do we have a cprotect torture test, BTW? We don't. But I could spend some time setting these up. Just to make sure, you mean examples of .lyx files that need the cprotect feature to compile without error, right? Yes, that would be nice. JMarc -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] Paragraph::needsCProtection(): use inset list
On Wed, Dec 22, 2021 at 04:16:30PM +0100, Jean-Marc Lasgouttes wrote: > Do we have a cprotect torture test, BTW? We don't. But I could spend some time setting these up. Just to make sure, you mean examples of .lyx files that need the cprotect feature to compile without error, right? As mentioned by Jürgen, there are indeed many examples and applications of cprotect. 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] Paragraph::needsCProtection(): use inset list
Le 21/12/2021 à 16:32, Jürgen Spitzmüller a écrit : Am Dienstag, dem 21.12.2021 um 15:45 +0100 schrieb Jean-Marc Lasgouttes: I could try to help with this, but for that I would have to understand what the code does (and what cprotect does). \cprotect allows to put verbatim context into places where this would normally be invalid (basically macro arguments) by outsourcing stuff to aux files. This fixes many shortcomings we had with things in footnotes, sections, and other places that simply didn't compile. The code needs to assure at several places whether macros need to be \cprotect'ed (and the cprotect package loaded). This only needs to be checked once and only at LaTeX export. But there are several individual places and constellations to check for. E.g., does an inset need to be cprotected? Maybe only in a given context? So it would be a bit of work to move this code to using the validate framework (that would set a needs_cprotect boolean property to text insets). I suspect that now is not the right time to do it, since it can wait and we do not want to destabilize current code. But this code definitely needs some love. And all the explicit test of inset codes should go. Jürgen, can you tell me what is the purpose of the test against math insets? Do we have a cprotect torture test, BTW? JMarc -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] Paragraph::needsCProtection(): use inset list
Am Dienstag, dem 21.12.2021 um 15:45 +0100 schrieb Jean-Marc Lasgouttes: > I could try to help with this, but for that I would have to > understand what the code does (and what cprotect does). \cprotect allows to put verbatim context into places where this would normally be invalid (basically macro arguments) by outsourcing stuff to aux files. This fixes many shortcomings we had with things in footnotes, sections, and other places that simply didn't compile. The code needs to assure at several places whether macros need to be \cprotect'ed (and the cprotect package loaded). This only needs to be checked once and only at LaTeX export. But there are several individual places and constellations to check for. E.g., does an inset need to be cprotected? Maybe only in a given context? This is basically what the code does. 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] Paragraph::needsCProtection(): use inset list
Le 19/12/2021 à 15:13, Juergen Spitzmueller a écrit : commit 61b8afd893ecdbc15924aaf8f44014b41c5623ef Author: Juergen Spitzmueller Date: Sun Dec 19 15:39:49 2021 +0100 Paragraph::needsCProtection(): use inset list rather than checking each pos whether it's an inset or not. This was a significant performance bottleneck (particularly getInset() itself seems slow). FWIW, running the hotspot profiler on an export to LaTeX of user guide tells me that needsCProtect and friends use 40% of CPU time; the export part of total run time is 60%. So cprotect handling is 2/3rd of export. This happens because the code as I understand it goes several times through the same inset hierarchy. The right way to do such things IMO is the updateBuffer machinery. In the same profile, it uses only 3.6% of total time; or we could use validate, which clocks at 1.74% I could try to help with this, but for that I would have to understand what the code does (and what cprotect does). JMarc -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel