[LyX/master] fix documentation of --enable-cxx-mode

2024-03-21 Thread Jean-Marc Lasgouttes
commit 44c0b4e4cc1827d38dcc5284513a62cc62a54362
Author: Jean-Marc Lasgouttes 
Date:   Thu Mar 21 22:50:38 2024 +0100

fix documentation of --enable-cxx-mode
---
 INSTALL | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/INSTALL b/INSTALL
index 7a44ad8896..5c9c4d7489 100644
--- a/INSTALL
+++ b/INSTALL
@@ -208,8 +208,8 @@ precisely (see the description of --enable-build-type for 
the default
 values):
 
   o --enable-cxx-mode=VALUE can be used to select a C++ standard, for
-example --enable-cxx-mode=11. The default is to try C++14, and then
-C++11.
+example --enable-cxx-mode=11. The default is to try C++17, C++14, and
+C++11, in this order.
 
   o --enable-optimization=VALUE enables you to set optimization to a
 higher level than the default, for example --enable-optimization=-O3.
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] * cs.po

2024-03-21 Thread Pavel Sanda
commit 210ea66d2d1113cddcc1b0f3547c1063b7dc4d47
Author: Pavel Sanda 
Date:   Thu Mar 21 22:47:31 2024 +0100

* cs.po

 po/cs.po | 1244 --
 1 file changed, 634 insertions(+), 610 deletions(-)
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] typo

2024-03-21 Thread Jean-Marc Lasgouttes
commit b659d7e3bdb26ed9c862cdb6dcfeb6dcb8cfb89b
Author: Jean-Marc Lasgouttes 
Date:   Thu Mar 21 22:40:19 2024 +0100

typo
---
 INSTALL | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/INSTALL b/INSTALL
index 8f2836c742..7a44ad8896 100644
--- a/INSTALL
+++ b/INSTALL
@@ -60,7 +60,7 @@ This means that gcc users will have to install the relevant 
libstdc++
 library to be able to compile this version of LyX.
 
 For full LyX usability we suggest to use Qt 5.6 and higher, or at the
-very least Qt 5.4. It is also possible to compile against Qt 6.The
+very least Qt 5.4. It is also possible to compile against Qt 6. The
 only special point to make is that you must ensure that both LyX and
 the Qt libraries are compiled with the same C++ compiler.
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Amend 16660d12.

2024-03-21 Thread Thibaut Cuvelier
commit fd378450755b698cc3ddb1a8d14e8b78d19c57a2
Author: Thibaut Cuvelier 
Date:   Thu Mar 21 21:32:45 2024 +0100

Amend 16660d12.

The previous commit introduced wrong behaviours for <>. The new code 
carefully escapes what needs to be escaped from LaTeX, using the now-standard 
XML tools (XMLStream).
---
 autotests/export/xhtml/math_output_latex.lyx   |  2 +-
 autotests/export/xhtml/math_output_latex.xhtml |  2 +-
 src/insets/InsetLabel.cpp  |  2 +
 src/mathed/InsetMathHull.cpp   | 62 --
 src/mathed/InsetMathHull.h |  4 +-
 5 files changed, 45 insertions(+), 27 deletions(-)

diff --git a/autotests/export/xhtml/math_output_latex.lyx 
b/autotests/export/xhtml/math_output_latex.lyx
index 59d77d2f9b..7c49de59f6 100644
--- a/autotests/export/xhtml/math_output_latex.lyx
+++ b/autotests/export/xhtml/math_output_latex.lyx
@@ -100,7 +100,7 @@ The problem occurs when adding a label.
 \begin_layout Standard
 \begin_inset Formula 
 \begin{equation}
-x^{2}\label{eq:1}
+x^{2}<\log x\label{eq:1}
 \end{equation}
 
 \end_inset
diff --git a/autotests/export/xhtml/math_output_latex.xhtml 
b/autotests/export/xhtml/math_output_latex.xhtml
index cec2d5ba0d..713def3459 100644
--- a/autotests/export/xhtml/math_output_latex.xhtml
+++ b/autotests/export/xhtml/math_output_latex.xhtml
@@ -22,7 +22,7 @@ div.standard {
 Math formula output as raw LaTeX
 The problem occurs when adding a 
label. https://www.lyx.org/trac/ticket/13048
 
-x^{2}(1)
+x^{2}<\log 
x(1)
 
 
 
diff --git a/src/insets/InsetLabel.cpp b/src/insets/InsetLabel.cpp
index 1ca8ea08ae..ab5a5e1716 100644
--- a/src/insets/InsetLabel.cpp
+++ b/src/insets/InsetLabel.cpp
@@ -380,6 +380,8 @@ void InsetLabel::docbook(XMLStream & xs, OutputParams const 
& runparams) const
 
 docstring InsetLabel::xhtml(XMLStream & xs, OutputParams const &) const
 {
+   // Print the label as an HTML anchor, so that an external link can 
point to this equation.
+   // (URL: FILE.html#EQ-ID.)
// FIXME XHTML
// Unfortunately, the name attribute has been deprecated, so we have to 
use
// id here to get the document to validate as XHTML 1.1. This will 
cause a
diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index bb368b3b93..94d293870d 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -2574,35 +2574,56 @@ void InsetMathHull::mathmlize(MathMLStream & ms) const
 }
 
 
-void InsetMathHull::mathAsLatex(TeXMathStream & os) const
+docstring InsetMathHull::mathAsLatex() const
 {
-   MathEnsurer ensurer(os, false);
bool const havenumbers = haveNumbers();
bool const havetable = havenumbers || nrows() > 1 || ncols() > 1;
 
if (!havetable) {
+   odocstringstream ls;
+   otexrowstream ots(ls);
+   TeXMathStream os(ots, false, true, TeXMathStream::wsPreview);
+   ModeSpecifier specifier(os, MATH_MODE);
+   MathEnsurer ensurer(os, false);
+
os << cell(index(0, 0));
-   return;
+   return ls.str();
}
 
-   os << "";
+   odocstringstream ods;
+   XMLStream xs(ods);
+
+   xs << xml::StartTag("table", "class='mathtable'");
for (row_type row = 0; row < nrows(); ++row) {
-   os << "";
+   xs << xml::StartTag("tr");
for (col_type col = 0; col < ncols(); ++col) {
-   os << "";
-   os << cell(index(row, col));
-   os << "";
+   xs << xml::StartTag("td", "class='math'");
+
+   odocstringstream ls;
+   otexrowstream ots(ls);
+   TeXMathStream os(ots, false, true, 
TeXMathStream::wsPreview);
+   ModeSpecifier specifier(os, MATH_MODE);
+   MathEnsurer ensurer(os, false);
+
+   os << cell(index(0, 0));
+   // ls.str() contains a raw LaTeX string, which might 
require some encoding before being valid XML.
+   xs << ls.str();
+
+   xs << xml::EndTag("td");
}
if (havenumbers) {
-   os << "";
+   xs << xml::StartTag("td");
docstring const & num = numbers_[row];
-   if (!num.empty())
-   os << '(' << num << ')';
-   os << "";
+   if (!num.empty()) {
+   xs << '(' << num << ')';
+   }
+   xs << xml::EndTag("td");
}
-   os << "";
+   xs << xml::EndTag("tr");
}
-   os << "";
+   xs << xml::EndTag("table");
+
+   return ods.str();
 }
 
 
@@ -2703,7 +2724,7 @@ docstring InsetMathHull::xhtml(XMLStream & xs,