commit e4a85d0d291ce03ec2c163ae3eddfadbc99c3f52
Author: Juergen Spitzmueller <[email protected]>
Date:   Fri Feb 20 14:25:40 2026 +0100

    SpecialChar: allow multiple hex values (comma-separated)
---
 lib/doc/Customization.lyx    | 151 +++++++++++++++++++++++++++++++++++++++++--
 lib/doc/de/Customization.lyx |  99 +++++++++++++++++++++++++++-
 src/SpecialChar.cpp          |  70 ++++++++++++++------
 3 files changed, 291 insertions(+), 29 deletions(-)

diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx
index 0ed91fd900..685aedff91 100644
--- a/lib/doc/Customization.lyx
+++ b/lib/doc/Customization.lyx
@@ -21726,6 +21726,8 @@ status collapsed
 
 \change_inserted -712698321 1771319164
 SimpleCommand
+\change_unchanged
+
 \end_layout
 
 \end_inset
@@ -21743,6 +21745,8 @@ status collapsed
 
 \emph on
 LatexName
+\change_unchanged
+
 \end_layout
 
 \end_inset
@@ -21756,6 +21760,8 @@ status collapsed
 
 \change_inserted -712698321 1771319266
 Argument
+\change_unchanged
+
 \end_layout
 
 \end_inset
@@ -24882,7 +24888,7 @@ status collapsed
 
 \begin_layout Description
 
-\change_inserted -712698321 1761640200
+\change_inserted -712698321 1771593735
 \begin_inset Flex Code
 status collapsed
 
@@ -24978,6 +24984,51 @@ status collapsed
 \end_inset
 
 
+\change_unchanged
+
+\end_layout
+
+\end_inset
+
+).
+ Allowed are also unicode hex values,
+ one (e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.,
+ 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1771593676
+0x002e
+\end_layout
+
+\end_inset
+
+) or a space-separated series (e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.,
+ 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1771593726
+\begin_inset Quotes qld
+\end_inset
+
+0x2009 0x2014 0x2009
+\begin_inset Quotes qld
+\end_inset
+
+
 \change_unchanged
 
 \end_layout
@@ -24991,7 +25042,7 @@ status collapsed
 
 \begin_layout Description
 
-\change_inserted -712698321 1762761714
+\change_inserted -712698321 1771593740
 \begin_inset Flex Code
 status collapsed
 
@@ -25108,6 +25159,49 @@ status collapsed
 
 \change_unchanged
 
+\end_layout
+
+\end_inset
+
+).
+ Allowed are also unicode hex values,
+ one (e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.,
+ 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1771593739
+0x002e
+\end_layout
+
+\end_inset
+
+) or a space-separated series (e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.,
+ 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1771593739
+\begin_inset Quotes qld
+\end_inset
+
+0x2009 0x2014 0x2009
+\begin_inset Quotes qld
+\end_inset
+
+
 \end_layout
 
 \end_inset
@@ -25119,7 +25213,7 @@ status collapsed
 
 \begin_layout Description
 
-\change_inserted -712698321 1762780991
+\change_inserted -712698321 1771593742
 \begin_inset Flex Code
 status collapsed
 
@@ -25236,6 +25330,49 @@ status collapsed
 
 \change_unchanged
 
+\end_layout
+
+\end_inset
+
+).
+ Allowed are also unicode hex values,
+ one (e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.,
+ 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1771593742
+0x002e
+\end_layout
+
+\end_inset
+
+) or a space-separated series (e.
+\begin_inset space \thinspace{}
+\end_inset
+
+g.,
+ 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1771593742
+\begin_inset Quotes qld
+\end_inset
+
+0x2009 0x2014 0x2009
+\begin_inset Quotes qld
+\end_inset
+
+
 \end_layout
 
 \end_inset
@@ -25247,7 +25384,7 @@ status collapsed
 
 \begin_layout Description
 
-\change_inserted -712698321 1761553134
+\change_inserted -712698321 1771593615
 \begin_inset Flex Code
 status collapsed
 
@@ -25276,7 +25413,7 @@ status collapsed
 \end_inset
 
  The text that is output in the workarea.
- This might be verbatim text or a unicode hex value (e.
+ This might be verbatim text or one or a space-separated series of unicode hex 
values (e.
 \begin_inset space \thinspace{}
 \end_inset
 
@@ -25369,7 +25506,7 @@ protect
 
 \begin_layout Description
 
-\change_inserted -712698321 1761552888
+\change_inserted -712698321 1771593634
 \begin_inset Flex Code
 status collapsed
 
@@ -25398,7 +25535,7 @@ status collapsed
 \end_inset
 
  The text that is output in plain text export.
- This might be verbatim text or a unicode hex value (e.
+ This might be verbatim text or one or a space-separated series of unicode hex 
values (e.
 \begin_inset space \thinspace{}
 \end_inset
 
diff --git a/lib/doc/de/Customization.lyx b/lib/doc/de/Customization.lyx
index 0ba8d09267..9853ca9883 100644
--- a/lib/doc/de/Customization.lyx
+++ b/lib/doc/de/Customization.lyx
@@ -23870,6 +23870,37 @@ status collapsed
 \end_inset
 
 
+\end_layout
+
+\end_inset
+
+).
+ Erlaubt sind auch Unicode-Hex-Werte,
+ einzeln (bspw.
+ 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+0x002e
+\end_layout
+
+\end_inset
+
+) oder als durch Leerzeichen getrennte Kette (bspw.
+ 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+\begin_inset Quotes qld
+\end_inset
+
+0x2009 0x2014 0x2009
+\begin_inset Quotes qld
+\end_inset
+
+
 \end_layout
 
 \end_inset
@@ -23962,6 +23993,37 @@ status collapsed
 \end_inset
 
 
+\end_layout
+
+\end_inset
+
+).
+ Erlaubt sind auch Unicode-Hex-Werte,
+ einzeln (bspw.
+ 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+0x002e
+\end_layout
+
+\end_inset
+
+) oder als durch Leerzeichen getrennte Kette (bspw.
+ 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+\begin_inset Quotes qld
+\end_inset
+
+0x2009 0x2014 0x2009
+\begin_inset Quotes qld
+\end_inset
+
+
 \end_layout
 
 \end_inset
@@ -24054,6 +24116,37 @@ status collapsed
 \end_inset
 
 
+\end_layout
+
+\end_inset
+
+).
+ Erlaubt sind auch Unicode-Hex-Werte,
+ einzeln (bspw.
+ 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+0x002e
+\end_layout
+
+\end_inset
+
+) oder als durch Leerzeichen getrennte Kette (bspw.
+ 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+\begin_inset Quotes qld
+\end_inset
+
+0x2009 0x2014 0x2009
+\begin_inset Quotes qld
+\end_inset
+
+
 \end_layout
 
 \end_inset
@@ -24083,7 +24176,8 @@ status collapsed
 
  Der Text,
  der im Arbeitsbereich ausgegeben wird.
- Das kann normaler Text sein oder ein Unicode-Hex-Wert (bspw.
+ Das kann normaler Text sein,
+ ein einzelner oder mehrere durch Leerzeichen getrennte Unicode-Hex-Werte 
(bspw.
  
 \begin_inset Flex Code
 status collapsed
@@ -24171,7 +24265,8 @@ status collapsed
 
  Der Text,
  der im einfachen Textmodus ausgegeben wird.
- Das kann normaler Text sein oder ein Unicode-Hex-Wert (bspw.
+ Das kann normaler Text sein,
+ ein einzelner oder mehrere durch Leerzeichen getrennte Unicode-Hex-Werte 
(bspw.
  
 \begin_inset Flex Code
 status collapsed
diff --git a/src/SpecialChar.cpp b/src/SpecialChar.cpp
index 12669ec932..2770b352e2 100644
--- a/src/SpecialChar.cpp
+++ b/src/SpecialChar.cpp
@@ -161,50 +161,80 @@ SpecialChar SpecialChars::readSpecialChars(Lexer & lexrc, 
SpecialChar & sc) cons
                        break;
                case SC_LATEX_OUTPUT: {
                        lexrc.next(true);
-                       docstring const res = rtrim(lexrc.getDocString());
-                       if (isHex(res))
-                               sc.latex_output = docstring(1, hexToInt(res));
-                       else
+                       vector<docstring> const results =
+                               
getVectorFromString(rtrim(lexrc.getDocString()), from_ascii(" "));
+                       bool was_hex = false;
+                       for (auto const & res : results) {
+                               was_hex = isHex(res);
+                               if (!was_hex)
+                                       break;
+                               sc.latex_output += docstring(1, hexToInt(res));
+                       }
+                       if (!was_hex)
                                sc.latex_output = rtrim(lexrc.getDocString());
                        sc.latex_output_default = false;
                        break;
                }
                case SC_LATEX_OUTPUT_RTL: {
                        lexrc.next(true);
-                       docstring const res = rtrim(lexrc.getDocString());
-                       if (isHex(res))
-                               sc.latex_output_rtl = docstring(1, 
hexToInt(res));
-                       else
+                       vector<docstring> const results =
+                               
getVectorFromString(rtrim(lexrc.getDocString()), from_ascii(" "));
+                       bool was_hex = false;
+                       for (auto const & res : results) {
+                               was_hex = isHex(res);
+                               if (!was_hex)
+                                       break;
+                               sc.latex_output_rtl += docstring(1, 
hexToInt(res));
+                       }
+                       if (!was_hex)
                                sc.latex_output_rtl = 
rtrim(lexrc.getDocString());
                        sc.latex_output_rtl_default = false;
                        break;
                }
                case SC_LATEX_OUTPUT_UTF8: {
                        lexrc.next(true);
-                       docstring const res = rtrim(lexrc.getDocString());
-                       if (isHex(res))
-                               sc.latex_output_utf8 = docstring(1, 
hexToInt(res));
-                       else
+                       vector<docstring> const results =
+                               
getVectorFromString(rtrim(lexrc.getDocString()), from_ascii(" "));
+                       bool was_hex = false;
+                       for (auto const & res : results) {
+                               was_hex = isHex(res);
+                               if (!was_hex)
+                                       break;
+                               sc.latex_output_utf8 += docstring(1, 
hexToInt(res));
+                       }
+                       if (!was_hex)
                                sc.latex_output_utf8 = 
rtrim(lexrc.getDocString());
                        sc.latex_output_utf8_default = false;
                        break;
                }
                case SC_LYX_OUTPUT: {
                        lexrc.next();
-                       docstring const res = rtrim(lexrc.getDocString());
-                       if (isHex(res))
-                               sc.lyx_output = docstring(1, hexToInt(res));
-                       else
+                       vector<docstring> const results =
+                               
getVectorFromString(rtrim(lexrc.getDocString()), from_ascii(" "));
+                       bool was_hex = false;
+                       for (auto const & res : results) {
+                               was_hex = isHex(res);
+                               if (!was_hex)
+                                       break;
+                               sc.lyx_output += docstring(1, hexToInt(res));
+                       }
+                       if (!was_hex)
                                sc.lyx_output = rtrim(lexrc.getDocString());
                        sc.lyx_output_default = false;
                        break;
                }
                case SC_PLAINTEXT_OUTPUT: {
                        lexrc.next();
-                       docstring const res = rtrim(lexrc.getDocString());
-                       if (isHex(res))
-                               sc.plaintext_output = docstring(1, 
hexToInt(res));
-                       else
+                       vector<docstring> const results =
+                               
getVectorFromString(rtrim(lexrc.getDocString()), from_ascii(" "));
+                       bool was_hex = false;
+                       for (auto const & res : results) {
+                               was_hex = isHex(res);
+                               if (!was_hex)
+                                       break;
+                               sc.plaintext_output += docstring(1, 
hexToInt(res));
+                       }
+                       if (!was_hex)
                                sc.plaintext_output = 
rtrim(lexrc.getDocString());
                        sc.plaintext_output_default = false;
                        break;
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to