[LyX/master] Support new German babelshorthand ".
Juergen Spitzmueller <[email protected]>
| Newsgroups | gmane.editors.lyx.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 60d634110e41a182c778436a3b474f476dabc30e Author: Juergen Spitzmueller <[email protected]> Date: Sat Apr 18 09:19:32 2026 +0200 Support new German babelshorthand ". --- development/FORMAT | 4 +-- lib/languages | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++ lib/lyx2lyx/lyx_2_6.py | 19 ++++++++++++ 3 files changed, 99 insertions(+), 2 deletions(-) diff --git a/development/FORMAT b/development/FORMAT index 4b23733887..36c75337c8 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -9,9 +9,9 @@ changes happened in particular if possible. A good example would be 2026-02-18 Jürgen Spitzmüller <[email protected]> * Format incremented to 649: - New (language-specific) SpecialChars gendermark, + New (language-specific) SpecialChars gendermark, abbrvdot, thinspacebreakpoint and splithyphen that are supported in some languages - via babelshorthands ("x, ", and "=). + via babelshorthands ("x, "., ", and "=). 2025-11-25 Jürgen Spitzmüller <[email protected]> * Format incremented to 648: diff --git a/lib/languages b/lib/languages index 3567063e3f..ab30e767ed 100644 --- a/lib/languages +++ b/lib/languages @@ -431,6 +431,19 @@ Language austrian LaTeXOutput \"| LaTeXOutputUTF8 \"| End + SpecialChar abbrvdot + Type specialchar + MenuString "Abbreviation Dot|o" + Tooltip "Abbreviation punctuation with appropriate ensuing space" + LyXOutput "0x002e 0x2009" + LatexOutput \". + IsLetter 1 + PlaintextOutput "0x002e 0x2009" + XHTMLOutput .  + Font + Color latex + EndFont + End SpecialChar gendermark Type specialchar MenuString "Gender Mark|G" @@ -511,6 +524,19 @@ Language naustrian LaTeXOutput \"| LaTeXOutputUTF8 \"| End + SpecialChar abbrvdot + Type specialchar + MenuString "Abbreviation Dot|o" + Tooltip "Abbreviation punctuation with appropriate ensuing space" + LyXOutput "0x002e 0x2009" + LatexOutput \". + IsLetter 1 + PlaintextOutput "0x002e 0x2009" + XHTMLOutput .  + Font + Color latex + EndFont + End SpecialChar gendermark Type specialchar MenuString "Gender Mark|G" @@ -1310,6 +1336,19 @@ Language german LaTeXOutput \"| LaTeXOutputUTF8 \"| End + SpecialChar abbrvdot + Type specialchar + MenuString "Abbreviation Dot|o" + Tooltip "Abbreviation punctuation with appropriate ensuing space" + LyXOutput "0x002e 0x2009" + LatexOutput \". + IsLetter 1 + PlaintextOutput "0x002e 0x2009" + XHTMLOutput .  + Font + Color latex + EndFont + End SpecialChar gendermark Type specialchar MenuString "Gender Mark|G" @@ -1391,6 +1430,19 @@ Language ngerman LaTeXOutput \"| LaTeXOutputUTF8 \"| End + SpecialChar abbrvdot + Type specialchar + MenuString "Abbreviation Dot|o" + Tooltip "Abbreviation punctuation with appropriate ensuing space" + LyXOutput "0x002e 0x2009" + LatexOutput \". + IsLetter 1 + PlaintextOutput "0x002e 0x2009" + XHTMLOutput .  + Font + Color latex + EndFont + End SpecialChar gendermark Type specialchar MenuString "Gender Mark|G" @@ -1474,6 +1526,19 @@ Language german-ch LaTeXOutput \"| LaTeXOutputUTF8 \"| End + SpecialChar abbrvdot + Type specialchar + MenuString "Abbreviation Dot|o" + Tooltip "Abbreviation punctuation with appropriate ensuing space" + LyXOutput "0x002e 0x2009" + LatexOutput \". + IsLetter 1 + PlaintextOutput "0x002e 0x2009" + XHTMLOutput .  + Font + Color latex + EndFont + End SpecialChar gendermark Type specialchar MenuString "Gender Mark|G" @@ -1556,6 +1621,19 @@ Language german-ch-old LaTeXOutput \"| LaTeXOutputUTF8 \"| End + SpecialChar abbrvdot + Type specialchar + MenuString "Abbreviation Dot|o" + Tooltip "Abbreviation punctuation with appropriate ensuing space" + LyXOutput "0x002e 0x2009" + LatexOutput \". + IsLetter 1 + PlaintextOutput "0x002e 0x2009" + XHTMLOutput .  + Font + Color latex + EndFont + End SpecialChar gendermark Type specialchar MenuString "Gender Mark|G" diff --git a/lib/lyx2lyx/lyx_2_6.py b/lib/lyx2lyx/lyx_2_6.py index 9c9b52699c..507086648f 100644 --- a/lib/lyx2lyx/lyx_2_6.py +++ b/lib/lyx2lyx/lyx_2_6.py @@ -805,6 +805,25 @@ def revert_shorthands2(document): i += 1 continue + i = 0 + while True: + i = find_substring(document.body, "\\SpecialChar abbrvdot", i) + if i == -1: + break + document.body[i] = document.body[i].replace("\\SpecialChar abbrvdot", "") + lang = mainlang + l = find_token_backwards(document.body, "\\lang", i) != -1 + if l > 0: + line = document.body[l] + tokenend = len("\\lang ") + lang = line[tokenend:].strip() + # abbrvdot and gendermark are featured by the same langs (german) + if lang in langs_gendermark: + cmd = put_cmd_in_ert("\".") + document.body[i + 1 : i + 1] = cmd + i += 1 + continue + i = 0 while True: i = find_substring(document.body, "\\SpecialChar thinspacebreakpoint", i) -- lyx-cvs mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-cvs