[LyX/master] Some minor corrections to the Additional revisions

2023-01-07 Thread Juergen Spitzmueller
commit 6c98a0a6d2da1d3e3d1d5f2b8e00242b0c3b2638
Author: Juergen Spitzmueller 
Date:   Sat Jan 7 13:17:05 2023 +0100

Some minor corrections to the Additional revisions

More might follow.
---
 lib/doc/Additional.lyx |  316 +++-
 1 files changed, 288 insertions(+), 28 deletions(-)

diff --git a/lib/doc/Additional.lyx b/lib/doc/Additional.lyx
index 205b597..b241d1f 100644
--- a/lib/doc/Additional.lyx
+++ b/lib/doc/Additional.lyx
@@ -2917,7 +2917,11 @@ David Johnson
 \noun default
  and updated by 
 \noun on
-Richard Heck
+Richard 
+\change_inserted -712698321 1673082716
+Kimberly 
+\change_inserted 564990737 1672345298
+Heck
 \noun default
  and the \SpecialChar LyX
  Team
@@ -2990,7 +2994,13 @@ ftp://ftp.ams.org/pub/tex/amslatex/
 \end_layout
 
 \begin_layout Standard
-There are two basic AMS \SpecialChar LaTeX
+There are 
+\change_deleted -712698321 1673083001
+two
+\change_inserted -712698321 1673083002
+three
+\change_unchanged
+ basic AMS \SpecialChar LaTeX
  layouts:
  
 \end_layout
@@ -3035,11 +3045,7 @@ American Mathematical Society (AMS)
 \begin_layout Itemize
 
 \change_inserted 564990737 1672345383
-
-\family sans
-amsproc
-\family default
-:
+amsproc:
  the standard AMS proceedings format.
 \end_layout
 
@@ -3245,7 +3251,13 @@ AMS Theorems
 status collapsed
 
 \begin_layout Plain Layout
+
+\change_deleted -712698321 1673083855
 article
+\change_inserted -712698321 1673083855
+Article (Standard Class)
+\change_unchanged
+
 \end_layout
 
 \end_inset
@@ -3256,7 +3268,13 @@ article
 status collapsed
 
 \begin_layout Plain Layout
+
+\change_deleted -712698321 1673083858
 report
+\change_inserted -712698321 1673083862
+Report (Standard Class)
+\change_unchanged
+
 \end_layout
 
 \end_inset
@@ -3267,7 +3285,13 @@ report
 status collapsed
 
 \begin_layout Plain Layout
+
+\change_deleted -712698321 1673083819
 book (KOMA-script)
+\change_inserted -712698321 1673083822
+KOMA-Script Book
+\change_unchanged
+
 \end_layout
 
 \end_inset
@@ -3464,7 +3488,23 @@ AMS Theorems
 
 \family default
  modules,
- in the latter case in both starred (unnumbered) and unstarred (numbered) 
versions.
+ in the latter case in both 
+\change_deleted -712698321 1673084072
+starred (
+\change_unchanged
+unnumbered
+\change_deleted -712698321 1673084073
+)
+\change_unchanged
+ and 
+\change_deleted -712698321 1673084075
+unstarred (
+\change_unchanged
+numbered
+\change_deleted -712698321 1673084077
+)
+\change_unchanged
+ versions.
  These same environments are provided only in the starred versions by the 
 \change_deleted 564990737 1672345596
 
@@ -3482,6 +3522,8 @@ Theorems (Starred)
 
 \family sans
 Standard Theorems
+\change_inserted -712698321 1673084060
+ (Unnumbered)
 \change_unchanged
 
 \family default
@@ -3841,74 +3883,156 @@ Japanese
 
 \change_inserted 564990737 1671383236
 The document classes 
+\change_inserted -712698321 1673089024
+
 \family sans
-article
+Japanese 
+\change_deleted -712698321 1673089025
+a
+\change_inserted -712698321 1673089025
+A
+\change_inserted 564990737 1671383236
+rticle
 \begin_inset space \thinspace{}
 \end_inset
 
-(Japanese JS Class)
+(
+\change_deleted -712698321 1673089027
+Japanese 
+\change_inserted 564990737 1671383236
+JS Class)
 \family default
 ,
 
 \family sans
- article
+ 
+\change_deleted -712698321 1673089041
+article
+\change_inserted -712698321 1673089041
+Japanese Article
+\change_inserted 564990737 1671383236
+
 \begin_inset space \thinspace{}
 \end_inset
 
-(Japanese Standard Class Vertical Writing)
+(
+\change_deleted -712698321 1673089044
+Japanese 
+\change_inserted 564990737 1671383236
+Standard Class Vertical Writing)
 \family default
 ,
  
+\change_deleted -712698321 1673089041
+
 \family sans
 article
 \begin_inset space \thinspace{}
 \end_inset
 
 (Japanese Standard Class)
+\change_inserted -712698321 1673088992
+Japanese Article (Standard Class)
+\change_inserted 564990737 1671383236
+
 \family default
 ,
  
+\change_inserted -712698321 1673089053
+
 \family sans
-book
+Japanese 
+\change_deleted -712698321 1673089053
+b
+\change_inserted -712698321 1673089064
+B
+\change_inserted 564990737 1671383236
+ook
 \begin_inset space \thinspace{}
 \end_inset
 
-(Japanese JS Class)
+(
+\change_deleted -712698321 1673089067
+Japanese 
+\change_inserted 564990737 1671383236
+JS Class)
 \family default
 ,
 
 \family sans
- book
+ 
+\change_inserted -712698321 1673089073
+Japanese B
+\change_deleted -712698321 1673089270
+b
+\change_inserted 564990737 1671383236
+ook
 \begin_inset space \thinspace{}
 \end_inset
 
-(Japanese Standard Class Vertical Writing)
+(
+\change_deleted -712698321 1673089077
+Japanese 
+\change_inserted 564990737 1671383236
+Standard Class Vertical Writing)
 \family default
 ,
  
+\change_deleted -712698321 1673089083
+
 \family sans
-book
+b
+\change_inserted -712698321 1673089083
+Japanese B
+\change_inserted 564990737 1671383236
+ook
 \begin_inset space \thinspace{}
 \end_inset
 
-(Japanese 

[LyX/master] Update sk.po

2023-01-07 Thread Kornel Benko
commit 093a86270e0a98993530acaece5246a0d7d17ef4
Author: Kornel Benko 
Date:   Sat Jan 7 13:38:01 2023 +0100

Update sk.po
---
 po/sk.po |   26 +++---
 1 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/po/sk.po b/po/sk.po
index 224101c..61c09cb 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -3,13 +3,13 @@
 #
 # Zdenko Podobný , 2003, 2006.
 # Kornel Benko , 2009.
-# Kornel Benko , 2009-2022.
+# Kornel Benko , 2009-2023.
 msgid ""
 msgstr ""
 "Project-Id-Version: LyX-2.4\n"
 "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n"
-"POT-Creation-Date: 2022-12-26 11:28+0100\n"
-"PO-Revision-Date: 2022-12-26 10:31+\n"
+"POT-Creation-Date: 2023-01-07 13:27+0100\n"
+"PO-Revision-Date: 2023-01-07 12:36+\n"
 "Last-Translator: Kornel Benko \n"
 "Language-Team: Slovak \n"
 "Language: sk\n"
@@ -29632,6 +29632,18 @@ msgstr "V&ytvoriť adresár"
 msgid "&Exit LyX"
 msgstr "&Ukončiť LyX"
 
+#: src/LyX.cpp:617
+msgid "No python is found"
+msgstr "Nenájdený program python"
+
+#: src/LyX.cpp:618
+msgid ""
+"LyX will only have minimal functionality because no python interpreter has "
+"been found. Consider download and install of an python interpreter."
+msgstr ""
+"LyX bude len minimálne fungovať lebo sa nenašiel interpreter python. Uvážte "
+"stiahnuť a inštalovať nejaký python interpreter."
+
 #: src/LyX.cpp:1097
 msgid "No user LyX directory. Exiting."
 msgstr "Žiadny užívateľský adresár LyX-u. Koniec."
@@ -35936,14 +35948,14 @@ msgstr "e-mail"
 msgid "file"
 msgstr "súbor"
 
-#: src/insets/InsetHyperlink.cpp:284
+#: src/insets/InsetHyperlink.cpp:283
 msgid "other[[Hyperlink Type]]"
-msgstr "iný"
+msgstr "iný typ"
 
-#: src/insets/InsetHyperlink.cpp:275
+#: src/insets/InsetHyperlink.cpp:284
 #, c-format
 msgid "Hyperlink (%1$s) to %2$s"
-msgstr "Hyperlinka (%1$s) na %2$s"
+msgstr "Hyperlinka (%1$s) na cieľ %2$s"
 
 #: src/insets/InsetInclude.cpp:402
 msgid "MISSING:"
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] updatelayouts.py: skip .txt files

2023-01-07 Thread Scott Kostyshak
commit 95dd4f6bf63da04a28165fa901ef6c4016e2c898
Author: Scott Kostyshak 
Date:   Sat Jan 7 09:43:47 2023 -0500

updatelayouts.py: skip .txt files
---
 development/tools/updatelayouts.py |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/development/tools/updatelayouts.py 
b/development/tools/updatelayouts.py
index ad02f8a..81bf4d6 100755
--- a/development/tools/updatelayouts.py
+++ b/development/tools/updatelayouts.py
@@ -29,7 +29,8 @@ def main(argv):
 os.chdir(directory)
 for i in os.listdir("."):
 (base, ext) = os.path.splitext(i)
-if ext == ".old":
+# Skip files like lib/layouts/TODO.txt
+if ext in [ ".old", ".txt" ]:
 continue
 args = ["layout2layout", i + ".old", i]
 shutil.copy(args[2], args[1])
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] LyXHTML: use a lower-case meta for generator, this is the most common convention.

2023-01-07 Thread Thibaut Cuvelier
commit 6a3bd6403277c5a2fd7cc93f88f1ed7e7d492145
Author: Thibaut Cuvelier 
Date:   Sat Jan 7 16:24:57 2023 +0100

LyXHTML: use a lower-case meta for generator, this is the most common 
convention.
---
 src/Buffer.cpp |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 32d3e89..2e43a15 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -2254,7 +2254,7 @@ Buffer::ExportStatus 
Buffer::writeLyXHTMLSource(odocstream & os,
os << "\n"
   << "http://www.w3.org/1999/xhtml\"; lang=\"" << 
from_ascii(htmlCode) << "\">\n"
   << "\n"
-  << "\n"
+  << "\n"
   // FIXME Presumably need to set this right
   << "\n";
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] LyXHTML: add a missing space in the content-type annotation.

2023-01-07 Thread Thibaut Cuvelier
commit a5c6215ebde966f2e33b51706fe4356cd52dde40
Author: Thibaut Cuvelier 
Date:   Sat Jan 7 16:23:56 2023 +0100

LyXHTML: add a missing space in the content-type annotation.
---
 src/Buffer.cpp |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 3f66864..32d3e89 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -2256,7 +2256,7 @@ Buffer::ExportStatus 
Buffer::writeLyXHTMLSource(odocstream & os,
   << "\n"
   << "\n"
   // FIXME Presumably need to set this right
-  << "\n";
+  << "\n";
 
docstring const & doctitle = features.htmlTitle();
os << ""
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Update fr.po

2023-01-07 Thread jpc
commit b12875206e6433dcb110ba518f5fa9a5f89e9096
Author: jpc 
Date:   Sat Jan 7 17:59:59 2023 +0100

   Update fr.po

 po/fr.gmo |  Bin 638374 -> 638793 bytes
 po/fr.po  | 2909 +++--
 2 files changed, 1461 insertions(+), 1448 deletions(-)
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


r41290 - in www-user/trunk: announce farm/cookbook/LyX misc/rss

2023-01-07 Thread rikiheck
Author: rikiheck
Date: Sat Jan  7 17:36:01 2023
New Revision: 41290
URL: http://www.lyx.org/trac/changeset/41290

Log:
2.3.7

Added:
   www-user/trunk/announce/2_3_7.txt
Modified:
   www-user/trunk/farm/cookbook/LyX/i18n.inc
   www-user/trunk/farm/cookbook/LyX/news.inc
   www-user/trunk/misc/rss/lyx_news_feed.xml

Added: www-user/trunk/announce/2_3_7.txt
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ www-user/trunk/announce/2_3_7.txt   Sat Jan  7 17:36:01 2023(r41290)
@@ -0,0 +1,206 @@
+Public release of LyX version 2.3.7
+===
+
+We are proud to announce the release of LyX 2.3.7. This is the seventh
+maintenance release in the 2.3.x series. We encourage all users to
+upgrade to this version.
+
+You can download LyX 2.3.7 from https://www.lyx.org/Download/.
+
+LyX is a document processor that encourages an approach to writing based 
+on the structure of your documents and not simply their appearance. It is
+released under a Free and Open Source Software license.
+
+LyX 2.3.7 is the  result of on-going efforts to make our stable version
+more reliable and more stable. Since it has been quite a long time (for
+unsurprising reasons) since the last update, this one contains more fixes
+than usual. We have fixed a number of crashes.
+
+If you think you have found a bug in LyX 2.3.7, please open a bug report at
+https://www.lyx.org/trac/wiki/BugTrackerHome. If you're not sure whether it
+really is a bug, you can e-mail the LyX developers' mailing list (lyx-devel 
+ lists.lyx.org) and ask. 
+
+If you have trouble using LyX or have a question, consult the documentation 
+that comes with LyX (under the Help or Apple menu) and the LyX wiki, which 
+is at https://wiki.lyx.org/. If you can't find the answer there, e-mail the 
+LyX users' list (lyx-users  lists.lyx.org), where you will find an 
+active community of people who are ready to help.
+
+We hope you enjoy using LyX 2.3.7.
+
+The LyX team.
+https://www.lyx.org
+
+
+What's new
+==
+
+** Updates:
+***
+
+* DOCUMENT INPUT/OUTPUT
+
+- Support \bigtimes from the mathtools package (bug 11223).
+
+- Support 0x019b via tipa (bug 12426).
+
+
+* USER INTERFACE
+
+- If the bibliography processor requested by a document is not available, do 
not
+  silently fall back to default. Rather than that, warn the user, keep the 
requested
+  processor and only fall back to an alternative at processing stage.
+
+- Backspace at the very start of a cell part of eqnarray or align environments
+  does not move the cursor out of the whole equation anymore and is now
+  equivalent to hitting the left arrow key (bug 11678).
+
+- Other than directly inserted, now references can also be pasted as insets
+  into an equation, instead of simply as text (bug 11539).
+
+- Add support for High DPI screens in Windows and Linux (bug 12060).
+
+- Add Qt platform name in About dialog.
+
+- Add new pref variable \draw_strategy to fix some cases where display
+  is blinking (bug 12119).
+
+
+
+* DOCUMENTATION AND LOCALIZATION
+
+- Update the H-P-Statments example document.
+
+
+** Bug fixes:
+*
+
+* DOCUMENT INPUT/OUTPUT
+
+- Fix Open Document (tex4ht) output converter.
+
+- Fix output of bibliography environment to make backref work
+  (bug 12041).
+
+- Fix tables in title.
+
+- Fix issue causing the coalesce of an empty description list item and an
+  immediately following nested itemize environment when loading documents
+  created with version 2.1 or earlier (bug 12148).
+
+- Fix export of the optional argument of \sqrt when it contains other
+  commands with optional arguments (bug 3294).
+
+- Fix loading subscript package with only LaTeX < 2005/12/01 (bug 12387).
+
+- Fix modernCV.lyx for Texlive 2021 (bug 12311).
+
+- Fix validating a macro definitions (bug 12524).
+
+- Fix crashing due to uncodable character in math macro name (bug 11855).
+
+
+
+* USER INTERFACE
+
+- Re-enable input of non-LyX files (e.g., tex, pgf) (bug 12056).
+
+- Fix problem with display of menus on Gnome Wayland (bug 11746).
+
+- Improve error message for VCS file registration when RCS package
+  is not installed.
+
+- Make bibliographies work with grandchildren (bug 12033).
+
+- Do not close spellchecker after "Replace All" action (bug 11310).
+
+- Fix width of collapsible insets with sublabels (bug 12046).
+
+- Fix Hebrew characters overflow in insets (bug 12030).
+
+- Fix unwanted scrolling of window when using "copy". (bug 11225).
+
+- Disable direct insertion of multiple spaces in mathed text (bug 1311).
+
+- Fix crash in tabular when an empty paragraph is removed
+  automatically (bug 12117).
+
+- Fix crash in tabular when resetting font (bug 12566).
+
+- Fix crash when using Hebrew (bug 12464).
+
+- On screen, show upper case greek letters in \mathbf as bold (bug 3751).
+
+- Fix coloring of text-mode material in math equations (bug 11007).
+
+- 

[LyX/2.3.x] Fix status file

2023-01-07 Thread Richard Kimberly Heck
commit 4392031f1f9ab97c99694e4d4a2e65821c85af2f
Author: Richard Kimberly Heck 
Date:   Sat Jan 7 12:47:49 2023 -0500

Fix status file
---
 ANNOUNCE   |7 +++
 status.23x |  152 +---
 2 files changed, 8 insertions(+), 151 deletions(-)

diff --git a/ANNOUNCE b/ANNOUNCE
index 929f0f8..9f96799 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -16,6 +16,13 @@ more reliable and more stable. Since it has been quite a 
long time (for
 unsurprising reasons) since the last update, this one contains more fixes
 than usual. We have fixed a number of crashes.
 
+One important note: Recent versions of Mac OSX do not include a working 
+version of Python. LyX needs this for proper functionality. See 
+"https://wiki.lyx.org/Mac/Mac#toc2 for information on how to install 
+Python, if you need to do so. The most obvious sympton is that, on 
+startup, LyX reports that it will have 'minimal functionality'. Another
+symptom is that images or previews do not display properly.
+
 If you think you have found a bug in LyX 2.3.6, please open a bug report at
 https://www.lyx.org/trac/wiki/BugTrackerHome. If you're not sure whether it
 really is a bug, you can e-mail the LyX developers' mailing list (lyx-devel 
diff --git a/status.23x b/status.23x
index de5aac7..c6b4b76 100644
--- a/status.23x
+++ b/status.23x
@@ -15,10 +15,6 @@ What's new
 
 * DOCUMENT INPUT/OUTPUT
 
-- Support \bigtimes from the mathtools package (bug 11223).
-
-- Support 0x019b via tipa (bug 12426).
-
 
 * MISCELLANEOUS
 
@@ -30,141 +26,22 @@ What's new
 
 * USER INTERFACE
 
-- If the bibliography processor requested by a document is not available, do 
not
-  silently fall back to default. Rather than that, warn the user, keep the 
requested
-  processor and only fall back to an alternative at processing stage.
-
-- Backspace at the very start of a cell part of eqnarray or align environments
-  does not move the cursor out of the whole equation anymore and is now
-  equivalent to hitting the left arrow key (bug 11678).
-
-- Other than directly inserted, now references can also be pasted as insets
-  into an equation, instead of simply as text (bug 11539).
-
-- Add support for High DPI screens in Windows and Linux (bug 12060).
-
-- Add Qt platform name in About dialog.
-
-- Add new pref variable \draw_strategy to fix some cases where display
-  is blinking (bug 12119).
-
-
 
 * DOCUMENTATION AND LOCALIZATION
 
-- Update the H-P-Statments example document.
-
 
 * BUILD/INSTALLATION
 
-- Add support for macOS 11.x SDKs for macOS builds.
-
-- Improved LyX version extraction from configure.ac for macOS builds.
-
-- Support for different compiler and linker flags for macOS builds.
-
 
 ** Bug fixes:
 *
 
 * DOCUMENT INPUT/OUTPUT
 
-- Fix Open Document (tex4ht) output converter.
-
-- Fix output of bibliography environment to make backref work
-  (bug 12041).
-
-- Fix tables in title.
-
-- Fix issue causing the coalesce of an empty description list item and an
-  immediately following nested itemize environment when loading documents
-  created with version 2.1 or earlier (bug 12148).
-
-- Fix export of the optional argument of \sqrt when it contains other
-  commands with optional arguments (bug 3294).
-
-- Fix loading subscript package with only LaTeX < 2005/12/01 (bug 12387).
-
-- Fix modernCV.lyx for Texlive 2021 (bug 12311).
-
-- Fix validating a macro definitions (bug 12524).
-
-- Fix crashing due to uncodable character in math macro name (bug 11855).
-
 
 
 * USER INTERFACE
 
-- Re-enable input of non-LyX files (e.g., tex, pgf) (bug 12056).
-
-- Fix problem with display of menus on Gnome Wayland (bug 11746).
-
-- Improve error message for VCS file registration when RCS package
-  is not installed.
-
-- Make bibliographies work with grandchildren (bug 12033).
-
-- Do not close spellchecker after "Replace All" action (bug 11310).
-
-- Fix width of collapsible insets with sublabels (bug 12046).
-
-- Fix Hebrew characters overflow in insets (bug 12030).
-
-- Fix unwanted scrolling of window when using "copy". (bug 11225).
-
-- Disable direct insertion of multiple spaces in mathed text (bug 1311).
-
-- Fix crash in tabular when an empty paragraph is removed
-  automatically (bug 12117).
-
-- Fix crash in tabular when resetting font (bug 12566).
-
-- Fix crash when using Hebrew (bug 12464).
-
-- On screen, show upper case greek letters in \mathbf as bold (bug 3751).
-
-- Fix coloring of text-mode material in math equations (bug 11007).
-
-- Fix crash with undo when the document has errors (bug 12163).
-
-- Fix Thesaurus usage with large text selection (#10528).
-
-- Fix wrap-around of spellchecker (#10383).
-
-- Avoid pointless 'undefined flex inset' errors when changing document
-  settings (bug 12163).
-
-- Fix display of emphasize in slanted text (bug 12175).
-
-- Fix copy of multi-cells in table (bug 12196).
-
-- Fix some wrongly initialized internal buffers (bug 12246).
-
-- Fix reverse search on Mac (

[LyX/master] LyXHTML validation tests: explicitly exit the Python script if it fails

2023-01-07 Thread Thibaut Cuvelier
commit 0f8951e7089013e68e47daa148dccfcca7f692fd
Author: Thibaut Cuvelier 
Date:   Sat Jan 7 21:27:50 2023 +0100

LyXHTML validation tests: explicitly exit the Python script if it fails
---
 .../thorough_export_tests/lyxhtml_validity.py  |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/development/thorough_export_tests/lyxhtml_validity.py 
b/development/thorough_export_tests/lyxhtml_validity.py
index 12c0cbd..3d50500 100644
--- a/development/thorough_export_tests/lyxhtml_validity.py
+++ b/development/thorough_export_tests/lyxhtml_validity.py
@@ -23,10 +23,13 @@ import html5validator
 
 if len(sys.argv) != 2:
 print('Expecting one argument, the path to the LyX binary to test')
+sys.exit(-1)
 if not os.path.exists(sys.argv[1]):
 print('The given path does not point to an existing file')
+sys.exit(-1)
 if not os.access(sys.argv[1], os.X_OK):
 print('The given path does not point to an executable file')
+sys.exit(-1)
 
 
 PATH_SCRIPT = os.path.dirname(os.path.realpath(__file__))
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] InsetMathBox: fix strange indentation (mix of spaces and tabs).

2023-01-07 Thread Thibaut Cuvelier
commit d3c81eb2cbdf1c233042c35fe493cc789cc93647
Author: Thibaut Cuvelier 
Date:   Sun Jan 8 00:51:43 2023 +0100

InsetMathBox: fix strange indentation (mix of spaces and tabs).
---
 src/mathed/InsetMathBox.cpp |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mathed/InsetMathBox.cpp b/src/mathed/InsetMathBox.cpp
index a10ede1..f3ba7a7 100644
--- a/src/mathed/InsetMathBox.cpp
+++ b/src/mathed/InsetMathBox.cpp
@@ -403,7 +403,7 @@ void InsetMathBoxed::htmlize(HtmlStream & ms) const
 {
ms << MTag("span", "class='boxed'")
   << cell(0)
-<< ETag("span");
+  << ETag("span");
 }
 
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] MathML test case: fix a typo.

2023-01-07 Thread Thibaut Cuvelier
commit 4412fdf09aa8afe0a53e9380c2bc5a2815d04b03
Author: Thibaut Cuvelier 
Date:   Sun Jan 8 00:50:18 2023 +0100

MathML test case: fix a typo.

It was bugging me when looking at XHTML output: I was wondering if LyX was 
doing anything weird about ligatures! Hopefully not.
---
 autotests/mathmacros/testcases_basic.lyx |   45 --
 1 files changed, 30 insertions(+), 15 deletions(-)

diff --git a/autotests/mathmacros/testcases_basic.lyx 
b/autotests/mathmacros/testcases_basic.lyx
index da70e7e..436cb4a 100644
--- a/autotests/mathmacros/testcases_basic.lyx
+++ b/autotests/mathmacros/testcases_basic.lyx
@@ -1,15 +1,15 @@
 #LyX 2.4 created this file. For more info see https://www.lyx.org/
-\lyxformat 572
+\lyxformat 614
 \begin_document
 \begin_header
 \save_transient_properties true
 \origin unavailable
 \textclass article
 \use_default_options false
-\maintain_unincluded_children false
+\maintain_unincluded_children no
 \language english
 \language_package default
-\inputencoding auto
+\inputencoding auto-legacy
 \fontencoding auto
 \font_roman "default" "default"
 \font_sans "default" "default"
@@ -18,7 +18,9 @@
 \font_default_family default
 \use_non_tex_fonts false
 \font_sc false
-\font_osf false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
 \font_sf_scale 100 100
 \font_tt_scale 100 100
 \use_microtype false
@@ -52,6 +54,7 @@
 \justification true
 \use_refstyle 0
 \use_minted 0
+\use_lineno 0
 \index Index
 \shortcut idx
 \color #008000
@@ -70,9 +73,13 @@
 \tablestyle default
 \tracking_changes false
 \output_changes false
+\change_bars false
+\postpone_fragile_content false
 \html_math_output 0
 \html_css_as_file 0
 \html_be_strict false
+\docbook_table_output 0
+\docbook_mathml_prefix 1
 \end_header
 
 \begin_body
@@ -82,7 +89,8 @@ Macro Testcases
 \end_layout
 
 \begin_layout Enumerate
-Simple macro definitions with position awareness: 
+Simple macro definitions with position awareness:
+ 
 \begin_inset FormulaMacro
 \newcommand{\bla}{42}
 \end_inset
@@ -95,12 +103,13 @@ Simple macro definitions with position awareness:
 
 \end_inset
 
-now redined as 
+now redefined as 
 \begin_inset FormulaMacro
 \renewcommand{\bla}{21}
 \end_inset
 
-, such that
+,
+ such that
 \begin_inset Formula 
 \[
 \bla\mbox{ should look like }21.
@@ -112,7 +121,8 @@ now redined as
 \end_layout
 
 \begin_layout Enumerate
-Redefinitions of macros appearing in the definition of another macro: 
+Redefinitions of macros appearing in the definition of another macro:
+ 
 \begin_inset FormulaMacro
 \newcommand{\fooa}{x}
 \end_inset
@@ -176,7 +186,8 @@ gives the following:
 \end_layout
 
 \begin_layout Enumerate
-Arity change: 
+Arity change:
+ 
 \begin_inset FormulaMacro
 \newcommand{\foo}{-}
 \end_inset
@@ -198,7 +209,8 @@ Arity change:
 \end_layout
 
 \begin_layout Enumerate
-Arity change with incomplete arguments at line end: 
+Arity change with incomplete arguments at line end:
+ 
 \begin_inset FormulaMacro
 \renewcommand{\foo}{-}
 \end_inset
@@ -220,7 +232,8 @@ Arity change with incomplete arguments at line end:
 \end_layout
 
 \begin_layout Enumerate
-Recursion: 
+Recursion:
+ 
 \begin_inset FormulaMacro
 \renewcommand{\foo}[1]{\foo{#1}{}}
 \end_inset
@@ -231,7 +244,8 @@ Recursion:
 \end_layout
 
 \begin_layout Enumerate
-Recursive usage: 
+Recursive usage:
+ 
 \begin_inset FormulaMacro
 \renewcommand{\foo}[3]{\frac{{\displaystyle #1}\,{\displaystyle 
#2}}{{\displaystyle #3}}}
 \end_inset
@@ -254,8 +268,8 @@ Folding/Unfolding:
 \end_inset
 
 .
- Start using Ctrl-+ and Ctrl– when you are inside of the macro to fold and
- unfold, e.g.
+ Start using Ctrl-+ and Ctrl– when you are inside of the macro to fold and 
unfold,
+ e.g.
  here:
 \begin_inset Formula 
 \[
@@ -268,7 +282,8 @@ Folding/Unfolding:
 \end_layout
 
 \begin_layout Enumerate
-Scripts: 
+Scripts:
+ 
 \begin_inset FormulaMacro
 \renewcommand{\foo}[3][A][B]{(#1,#2)#3}
 \end_inset
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] MathML: convert InsetMathBox as .

2023-01-07 Thread Thibaut Cuvelier
commit edcaad2419b70ef1bd96bb1b117b9818187679ba
Author: Thibaut Cuvelier 
Date:   Sun Jan 8 00:50:06 2023 +0100

MathML: convert InsetMathBox as .

The inset represents text (as opposed to maths in formulae).  is 
used to give style to its children, it is not supposed to have any contents on 
its own.
---
 src/mathed/InsetMathBox.cpp |   24 
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/mathed/InsetMathBox.cpp b/src/mathed/InsetMathBox.cpp
index 2b237d8..a10ede1 100644
--- a/src/mathed/InsetMathBox.cpp
+++ b/src/mathed/InsetMathBox.cpp
@@ -64,9 +64,9 @@ void InsetMathBox::mathmlize(MathMLStream & ms) const
// Probably will have to involve deferring them, which
// means returning something from this routine.
SetMode textmode(ms, true);
-   ms << MTag("mstyle", "class='mathbox'")
+   ms << MTag("mtext", "class='mathbox'")
   << cell(0)
-  << ETag("mstyle");
+  << ETag("mtext");
 }
 
 
@@ -105,7 +105,7 @@ void InsetMathBox::validate(LaTeXFeatures & features) const
// It'd be better to be able to get this from an InsetLayout, but at 
present
// InsetLayouts do not seem really to work for things that aren't 
InsetTexts.
if (features.runparams().math_flavor == OutputParams::MathAsMathML)
-   features.addCSSSnippet("mstyle.mathbox { font-style: normal; 
}");
+   features.addCSSSnippet("mtext.mathbox { font-style: normal; }");
else if (features.runparams().math_flavor == OutputParams::MathAsHTML)
features.addCSSSnippet("span.mathbox { font-style: normal; }");
 
@@ -166,9 +166,9 @@ void InsetMathFBox::normalize(NormalStream & os) const
 void InsetMathFBox::mathmlize(MathMLStream & ms) const
 {
SetMode textmode(ms, true);
-   ms << MTag("mstyle", "class='fbox'")
+   ms << MTag("mtext", "class='fbox'")
   << cell(0)
-  << ETag("mstyle");
+  << ETag("mtext");
 }
 
 
@@ -194,7 +194,7 @@ void InsetMathFBox::validate(LaTeXFeatures & features) const
// InsetLayouts do not seem really to work for things that aren't 
InsetTexts.
if (features.runparams().math_flavor == OutputParams::MathAsMathML)
features.addCSSSnippet(
-   "mstyle.fbox { border: 1px solid black; font-style: 
normal; padding: 0.5ex; }");
+   "mtext.fbox { border: 1px solid black; font-style: 
normal; padding: 0.5ex; }");
else if (features.runparams().math_flavor == OutputParams::MathAsHTML)
features.addCSSSnippet(
"span.fbox { border: 1px solid black; font-style: 
normal; padding: 0.5ex; }");
@@ -312,9 +312,9 @@ void InsetMathMakebox::mathmlize(MathMLStream & ms) const
// FIXME We could do something with the other arguments.
std::string const cssclass = framebox_ ? "framebox" : "makebox";
SetMode textmode(ms, true);
-   ms << MTag("mstyle", "class='" + cssclass + "'")
+   ms << MTag("mtext", "class='" + cssclass + "'")
   << cell(2)
-  << ETag("mstyle");
+  << ETag("mtext");
 }
 
 
@@ -335,7 +335,7 @@ void InsetMathMakebox::validate(LaTeXFeatures & features) 
const
// It'd be better to be able to get this from an InsetLayout, but at 
present
// InsetLayouts do not seem really to work for things that aren't 
InsetTexts.
if (features.runparams().math_flavor == OutputParams::MathAsMathML)
-   features.addCSSSnippet("mstyle.framebox { border: 1px solid 
black; }");
+   features.addCSSSnippet("mtext.framebox { border: 1px solid 
black; }");
else if (features.runparams().math_flavor == OutputParams::MathAsHTML)
features.addCSSSnippet("span.framebox { border: 1px solid 
black; }");
InsetMathNest::validate(features);
@@ -393,9 +393,9 @@ void InsetMathBoxed::infoize(odocstream & os) const
 
 void InsetMathBoxed::mathmlize(MathMLStream & ms) const
 {
-   ms << MTag("mstyle", "class='boxed'")
+   ms << MTag("mtext", "class='boxed'")
   << cell(0)
-  << ETag("mstyle");
+  << ETag("mtext");
 }
 
 
@@ -415,7 +415,7 @@ void InsetMathBoxed::validate(LaTeXFeatures & features) 
const
// It'd be better to be able to get this from an InsetLayout, but at 
present
// InsetLayouts do not seem really to work for things that aren't 
InsetTexts.
if (features.runparams().math_flavor == OutputParams::MathAsMathML)
-   features.addCSSSnippet("mstyle.boxed { border: 1px solid black; 
}");
+   features.addCSSSnippet("mtext.boxed { border: 1px solid black; 
}");
else if (features.runparams().math_flavor == OutputParams::MathAsHTML)
features.addCSSSnippet("span.boxed { border: 1px solid black; 
}");
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] InsetMathBox: split the boxed text into and other tags, while boxing the whole inset within an .

2023-01-07 Thread Thibaut Cuvelier
commit e70cdfd3a222f12ab25a8c7296b180018bc06381
Author: Thibaut Cuvelier 
Date:   Sun Jan 8 02:27:36 2023 +0100

InsetMathBox: split the boxed text into  and other tags, while 
boxing the whole inset within an .

Rationales:
- previously,  was used, but it's being deprecated for MathML 4 
Core in favour of CSS and  (not a big deal in itself)
- the whole box cannot be hosted within the same tag, because neither 
 nor  can have text, they need an intermediate container,  
(which cannot hold anything else that pure text)
- new behaviour: always output a container for the whole box that has the 
right attributes, i.e. an ; split the content of the cell to have text 
and other tags set apart (text in , other tags left as they were)

Old behaviour, invalid MathML (2 to 4):
text.

New behaviour, valid MathML:
text.
---
 src/mathed/InsetMathBox.cpp |   89 +++---
 1 files changed, 74 insertions(+), 15 deletions(-)

diff --git a/src/mathed/InsetMathBox.cpp b/src/mathed/InsetMathBox.cpp
index f3ba7a7..30cbd14 100644
--- a/src/mathed/InsetMathBox.cpp
+++ b/src/mathed/InsetMathBox.cpp
@@ -25,6 +25,7 @@
 #include "frontends/Painter.h"
 
 #include 
+#include 
 #include 
 
 using namespace lyx::support;
@@ -57,16 +58,82 @@ void InsetMathBox::normalize(NormalStream & os) const
 }
 
 
+namespace {
+void splitAndWrapInMText(MathMLStream & ms, MathData const & cell,
+const std::string & attributes)
+{
+   // First, generate the inset into a string of its own.
+   docstring inset_contents;
+   {
+   odocstringstream ostmp;
+   MathMLStream mstmp(ostmp, ms.xmlns());
+
+   SetMode textmode(mstmp, true);
+   mstmp << cell;
+
+   inset_contents = ostmp.str();
+   }
+
+   std::cout << '"' << to_ascii(inset_contents) << '"' << std::endl;
+
+   // No tags are allowed within : split the string if there are 
tags.
+   std::vector parts;
+   while (true) {
+   std::size_t angle_pos = inset_contents.find('<');
+   if (angle_pos == docstring::npos)
+   break;
+
+   // String structure:
+   // - prefix: pure text, no tag
+   // - tag to split: something like 1 or more 
complicated
+   //   (like nested tags), with or without name space
+   // - rest to be taken care of in the next iteration
+
+   // Push the part before the tag.
+   parts.emplace_back(inset_contents.substr(0, angle_pos));
+   inset_contents = inset_contents.substr(angle_pos);
+   // Now, inset_contents starts with the tag to isolate, so that
+   // inset_contents[0] == '<'
+
+   // Push the tag, up to its end. Process: find the tag name 
(either
+   // before > or the first attribute of the tag), then the 
matching end
+   // tag, then proceed with pushing.
+   const std::size_t tag_name_end =
+   std::min(inset_contents.find(' ', 1), 
inset_contents.find('>', 1));
+   const std::size_t tag_name_length = tag_name_end - 1;
+   const docstring tag_name = inset_contents.substr(1, 
tag_name_length);
+
+   const std::size_t end_tag_start =
+   inset_contents.find(tag_name, tag_name_end + 1);
+   const std::size_t end_tag = inset_contents.find('>', 
end_tag_start);
+
+   parts.emplace_back(inset_contents.substr(0, end_tag + 1));
+   inset_contents = inset_contents.substr(end_tag + 1);
+   }
+   parts.emplace_back(inset_contents);
+
+   // Finally, output the complete inset: escape the test in , 
leave
+   // the other tags untouched.
+   ms << MTag("mrow", attributes);
+   for (int i = 0; i < parts.size(); i += 2) {
+   ms << MTag("mtext")
+  << parts[i]
+  << ETag("mtext");
+   if (parts.size() > i + 1)
+   ms << parts[i + 1];
+   }
+   ms << ETag("mrow");
+}
+}
+
+
 void InsetMathBox::mathmlize(MathMLStream & ms) const
 {
// FIXME XHTML
// Need to do something special for tags here.
// Probably will have to involve deferring them, which
// means returning something from this routine.
-   SetMode textmode(ms, true);
-   ms << MTag("mtext", "class='mathbox'")
-  << cell(0)
-  << ETag("mtext");
+   splitAndWrapInMText(ms, cell(0), "class='mathbox'");
 }
 
 
@@ -165,10 +232,7 @@ void InsetMathFBox::normalize(NormalStream & os) const
 
 void InsetMathFBox::mathmlize(MathMLStream & ms) const
 {
-   SetMode textmode(ms, true);
-   ms << MTag("mtext", "class='fbox'")
-  << cell(0)
-  << ETag("mtext");
+   splitAndWrapInMText(ms, cell(0