commit f5ac0580ff8f4f1fd34d792f7952fb05d182e162
Author: Günter Milde <[email protected]>
Date: Mon Mar 6 14:49:30 2017 +0100
special character "allowbreak" (ZWSP), fileformat change
New special character to mark an optional line break
without inserting a hyphen (ZWSP). See #10585.
Corresponds to the Unicode character U+200B ZERO WIDTH SPACE
This isn't a “space”. It is an invisible character that can be used
to provide line break opportunities.
http://unicode.org/notes/tn27/
While the literal Unicode character can be used in the LyX
file, it is invisible in the GUI.
For visible feedback, the patch adds a new special character "allowbreak".
The small mark is inspired by LibereOffice.
A tooltip is added.
---
development/FORMAT | 4 +
lib/lyx2lyx/lyx_2_3.py | 32 ++++++++--
lib/ui/stdmenus.inc | 1 +
src/LaTeXFeatures.cpp | 12 ++++
src/LyXAction.cpp | 5 +-
src/Text3.cpp | 2 +
src/insets/InsetSpecialChar.cpp | 68 +++++++++++++++++++-
src/insets/InsetSpecialChar.h | 4 +
src/tex2lyx/TODO.txt | 9 +++
src/tex2lyx/test/CJK.lyx.lyx | 2 +-
src/tex2lyx/test/CJKutf8.lyx.lyx | 2 +-
src/tex2lyx/test/DummyDocument.lyx.lyx | 2 +-
src/tex2lyx/test/Dummy~Document.lyx.lyx | 2 +-
src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx | 2 +-
src/tex2lyx/test/algo2e.lyx.lyx | 2 +-
.../test/box-color-size-space-align.lyx.lyx | 4 +-
src/tex2lyx/test/test-insets-basic.lyx.lyx | 2 +-
src/tex2lyx/test/test-insets.lyx.lyx | 2 +-
src/tex2lyx/test/test-memoir.lyx.lyx | 2 +-
src/tex2lyx/test/test-modules.lyx.lyx | 2 +-
src/tex2lyx/test/test-refstyle-theorems.lyx.lyx | 2 +-
src/tex2lyx/test/test-scr.lyx.lyx | 2 +-
src/tex2lyx/test/test-structure.lyx.lyx | 2 +-
src/tex2lyx/test/test.lyx.lyx | 2 +-
src/tex2lyx/test/verbatim.lyx.lyx | 2 +-
src/version.h | 4 +-
26 files changed, 145 insertions(+), 30 deletions(-)
diff --git a/development/FORMAT b/development/FORMAT
index 7c55968..252c393 100644
--- a/development/FORMAT
+++ b/development/FORMAT
@@ -6,6 +6,10 @@ changes happened in particular if possible. A good example
would be
2010-01-10 entry.
-----------------------
+2017-04-19 Günter Milde <[email protected]>
+ * Format incremented to 541: changes \SpecialChar:
+ - new argument "allowbreak" to mark an optional line break
+ without inserting a hyphen (= ZWSP). See #10585.
2017-04-15 Uwe Stöhr <[email protected]>
* Format incremented to 540: support for rotated float placements
diff --git a/lib/lyx2lyx/lyx_2_3.py b/lib/lyx2lyx/lyx_2_3.py
index e03b2b9..dc7e2f0 100644
--- a/lib/lyx2lyx/lyx_2_3.py
+++ b/lib/lyx2lyx/lyx_2_3.py
@@ -2074,7 +2074,7 @@ def revert_baselineskip(document):
return
else:
document.body[hspaceLine: endInset + 1] = put_cmd_in_ert("\\hspace" +
star + '{' + baselineskip + "\\baselineskip}")
-
+
i = i + 1
@@ -2101,7 +2101,7 @@ def revert_rotfloat(document):
placement = document.body[i-2][beg+1:]
# check if the option'H' is used
if placement.find("H") != -1:
- add_to_preamble(document, ["\\usepackage{float}"])
+ add_to_preamble(document, ["\\usepackage{float}"])
# now check if it is a starred type
if document.body[i-1].find("wide true") != -1:
star = '*'
@@ -2118,10 +2118,28 @@ def revert_rotfloat(document):
else:
document.body[endInset-2: endInset+1] = put_cmd_in_ert("\\end{sideways"
+ fType + star + '}')
document.body[i-3: i+2] = put_cmd_in_ert("\\begin{sideways" + fType +
star + "}[" + placement + ']')
- add_to_preamble(document, ["\\usepackage{rotfloat}"])
-
+ add_to_preamble(document, ["\\usepackage{rotfloat}"])
+
i = i + 1
+def convert_allowbreak(document):
+ " Zero widths Space-inset -> \SpecialChar allowbreak. "
+ body = "\n".join(document.body)
+ body = body.replace("\\begin_inset space \hspace{}\n"
+ "\\length 0dd\n"
+ "\\end_inset\n\n",
+ "\\SpecialChar allowbreak\n")
+ document.body = body.split("\n")
+
+def revert_allowbreak(document):
+ " \SpecialChar allowbreak -> Zero widths Space-inset. "
+ body = "\n".join(document.body)
+ body = body.replace("\\SpecialChar allowbreak\n",
+ "\\begin_inset space \hspace{}\n"
+ "\\length 0dd\n"
+ "\\end_inset\n\n")
+ document.body = body.split("\n")
+
##
# Conversion hub
@@ -2160,10 +2178,12 @@ convert = [
[537, []],
[538, [convert_mathindent]],
[539, []],
- [540, []]
- ]
+ [540, []],
+ [541, [convert_allowbreak]],
+ ]
revert = [
+ [540, [revert_allowbreak]],
[539, [revert_rotfloat]],
[538, [revert_baselineskip]],
[537, [revert_mathindent]],
diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc
index 01499af..a392ba5 100644
--- a/lib/ui/stdmenus.inc
+++ b/lib/ui/stdmenus.inc
@@ -433,6 +433,7 @@ Menuset
Separator
Item "Hyphenation Point|H" "specialchar-insert hyphenation"
Item "Ligature Break|k" "specialchar-insert ligature-break"
+ Item "Optional Line Break|B" "specialchar-insert allowbreak"
Item "Ragged Line Break|R" "newline-insert newline"
Item "Justified Line Break|J" "newline-insert linebreak"
Separator
diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index e19e771..55db953 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -79,6 +79,15 @@ static docstring const lyxarrow_def = from_ascii(
"{\\leavevmode\\,$\\triangleleft$\\,\\allowbreak}\n"
"{\\leavevmode\\,$\\triangleright$\\,\\allowbreak}}");
+// ZERO WIDTH SPACE (ZWSP) is actually not a space character
+// but marks a line break opportunity. Several commands provide a
+// line break opportunity. They differ in side-effects:
+// \allowbreak prevents hyphenation after hyphen or dash + ZWSP
+// \linebreak[<n>] takes an optional argument denoting "urgency".
+// The \LyXZeroWidthSpace wrapper allows customization in the preamble.
+static docstring const lyxZWSP_def = from_ascii(
+ "\\newcommand*\\LyXZeroWidthSpace{\\hspace{0pt}}");
+
// for quotes without babel. This does not give perfect results, but
// anybody serious about non-english quotes should use babel (JMarc).
@@ -1317,6 +1326,9 @@ TexString LaTeXFeatures::getMacros() const
if (mustProvide("lyxarrow"))
macros << lyxarrow_def << '\n';
+ if (mustProvide("lyxzerowidthspace"))
+ macros << lyxZWSP_def << '\n';
+
if (!usePolyglossia() && mustProvide("textgreek")) {
// ensure LGR font encoding is defined also if fontenc is not
loaded by LyX
if (params_.main_font_encoding() == "default")
diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp
index 5223d4a..e9f45f5 100644
--- a/src/LyXAction.cpp
+++ b/src/LyXAction.cpp
@@ -3532,8 +3532,9 @@ void LyXAction::init()
* \var lyx::FuncCode lyx::LFUN_SPECIALCHAR_INSERT
* \li Action: Inserts various characters into the document.
* \li Syntax: specialchar-insert <CHAR>
- * \li Params: <CHAR>: hyphenation, ligature-break, slash, nobreakdash, dots,
- end-of-sentence, menu-separator, lyx, tex, latex,
latex2e.
+ * \li Params: <CHAR>: hyphenation, allowbreak, ligature-break, slash,
+ nobreakdash, dots, end-of-sentence,
menu-separator,
+ lyx, tex, latex, latex2e.
* \li Origin: JSpitzm, 6 Dec 2007
* \endvar
*/
diff --git a/src/Text3.cpp b/src/Text3.cpp
index 8cd6021..533afd2 100644
--- a/src/Text3.cpp
+++ b/src/Text3.cpp
@@ -1243,6 +1243,8 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
string const name = to_utf8(cmd.argument());
if (name == "hyphenation")
specialChar(cur, InsetSpecialChar::HYPHENATION);
+ else if (name == "allowbreak")
+ specialChar(cur, InsetSpecialChar::ALLOWBREAK);
else if (name == "ligature-break")
specialChar(cur, InsetSpecialChar::LIGATURE_BREAK);
else if (name == "slash")
diff --git a/src/insets/InsetSpecialChar.cpp b/src/insets/InsetSpecialChar.cpp
index 2dd695a..4d41984 100644
--- a/src/insets/InsetSpecialChar.cpp
+++ b/src/insets/InsetSpecialChar.cpp
@@ -86,6 +86,32 @@ int logoWidth(FontInfo const & font, InsetSpecialChar::Kind
kind) {
}
+docstring InsetSpecialChar::toolTip(BufferView const &, int, int) const
+{
+ docstring message;
+ switch (kind_) {
+ case ALLOWBREAK:
+ message = from_ascii("Optional Line Break (ZWSP)");
+ break;
+ case LIGATURE_BREAK:
+ message = from_ascii("Ligature Break (ZWNJ)");
+ break;
+ case END_OF_SENTENCE:
+ message = from_ascii("End of Sentence");
+ break;
+ case HYPHENATION:
+ message = from_ascii("Hyphenation Point");
+ break;
+ case SLASH:
+ message = from_ascii("Breakable Slash");
+ break;
+ case NOBREAKDASH:
+ message = from_ascii("Protected Hyphen (SHY)");
+ break;
+ }
+ return message;
+}
+
void InsetSpecialChar::metrics(MetricsInfo & mi, Dimension & dim) const
{
@@ -97,6 +123,9 @@ void InsetSpecialChar::metrics(MetricsInfo & mi, Dimension &
dim) const
docstring s;
switch (kind_) {
+ case ALLOWBREAK:
+ dim.wid = fm.em() / 8;
+ break;
case LIGATURE_BREAK:
s = from_ascii("|");
break;
@@ -224,6 +253,18 @@ void InsetSpecialChar::draw(PainterInfo & pi, int x, int
y) const
pi.pain.text(x, y, char_type('-'), font);
break;
}
+ case ALLOWBREAK:
+ {
+ // A small vertical line
+ int const asc = theFontMetrics(pi.base.font).ascent('x');
+ int const desc = theFontMetrics(pi.base.font).descent('g');
+ int const x0 = x; // x + 1; // FIXME: incline,
+ int const x1 = x; // x - 1; // similar to LibreOffice?
+ int const y0 = y + desc;
+ int const y1 = y - asc / 3;
+ pi.pain.line(x0, y1, x1, y0, Color_special);
+ break;
+ }
case LIGATURE_BREAK:
{
font.setColor(Color_special);
@@ -292,6 +333,9 @@ void InsetSpecialChar::write(ostream & os) const
case HYPHENATION:
command = "softhyphen";
break;
+ case ALLOWBREAK:
+ command = "allowbreak";
+ break;
case LIGATURE_BREAK:
command = "ligaturebreak";
break;
@@ -334,6 +378,8 @@ void InsetSpecialChar::read(Lexer & lex)
if (command == "softhyphen")
kind_ = HYPHENATION;
+ else if (command == "allowbreak")
+ kind_ = ALLOWBREAK;
else if (command == "ligaturebreak")
kind_ = LIGATURE_BREAK;
else if (command == "endofsentence")
@@ -366,6 +412,9 @@ void InsetSpecialChar::latex(otexstream & os,
case HYPHENATION:
os << "\\-";
break;
+ case ALLOWBREAK:
+ os << "\\LyXZeroWidthSpace" << termcmd;
+ break;
case LIGATURE_BREAK:
os << "\\textcompwordmark" << termcmd;
break;
@@ -420,6 +469,9 @@ int InsetSpecialChar::plaintext(odocstringstream & os,
switch (kind_) {
case HYPHENATION:
return 0;
+ case ALLOWBREAK:
+ os.put(0x200b);
+ return 1;
case LIGATURE_BREAK:
os.put(0x200c);
return 1;
@@ -460,6 +512,10 @@ int InsetSpecialChar::docbook(odocstream & os,
OutputParams const &) const
{
switch (kind_) {
case HYPHENATION:
+ break;
+ case ALLOWBREAK:
+ os.put(0x200b);
+ break;
case LIGATURE_BREAK:
break;
case END_OF_SENTENCE:
@@ -500,6 +556,9 @@ docstring InsetSpecialChar::xhtml(XHTMLStream & xs,
OutputParams const &) const
switch (kind_) {
case HYPHENATION:
break;
+ case ALLOWBREAK:
+ xs << XHTMLStream::ESCAPE_NONE << "​";
+ break;
case LIGATURE_BREAK:
xs << XHTMLStream::ESCAPE_NONE << "‌";
break;
@@ -538,8 +597,9 @@ docstring InsetSpecialChar::xhtml(XHTMLStream & xs,
OutputParams const &) const
void InsetSpecialChar::toString(odocstream & os) const
{
switch (kind_) {
+ case ALLOWBREAK:
case LIGATURE_BREAK:
- // Do not output ZERO WIDTH NON JOINER here
+ // Do not output ZERO WIDTH SPACE and ZERO WIDTH NON JOINER here
// Spell checker would choke on it.
return;
default:
@@ -562,6 +622,8 @@ void InsetSpecialChar::forOutliner(docstring & os, size_t
const,
void InsetSpecialChar::validate(LaTeXFeatures & features) const
{
+ if (kind_ == ALLOWBREAK)
+ features.require("lyxzerowidthspace");
if (kind_ == MENU_SEPARATOR)
features.require("lyxarrow");
if (kind_ == NOBREAKDASH)
@@ -591,8 +653,8 @@ bool InsetSpecialChar::isLineSeparator() const
// Paragraph::stripLeadingSpaces nukes the characters which
// have this property. I leave the code here, since it should
// eventually be made to work. (JMarc 20020327)
- return kind_ == HYPHENATION || kind_ == MENU_SEPARATOR
- || kind_ == SLASH;
+ return kind_ == HYPHENATION || kind_ == ALLOWBREAK
+ || kind_ == MENU_SEPARATOR || kind_ == SLASH;
#else
return false;
#endif
diff --git a/src/insets/InsetSpecialChar.h b/src/insets/InsetSpecialChar.h
index 6474c57..fd3f6cd 100644
--- a/src/insets/InsetSpecialChar.h
+++ b/src/insets/InsetSpecialChar.h
@@ -30,6 +30,8 @@ public:
enum Kind {
/// Optional hyphenation point (\-)
HYPHENATION,
+ /// Optional line wrap point without hyphen (ZWSP)
+ ALLOWBREAK,
/// Ligature break point (\textcompwordmark)
LIGATURE_BREAK,
/// ... (\ldots)
@@ -59,6 +61,8 @@ public:
///
Kind kind() const;
///
+ docstring toolTip(BufferView const & bv, int x, int y) const;
+ ///
void metrics(MetricsInfo &, Dimension &) const;
///
void draw(PainterInfo & pi, int x, int y) const;
diff --git a/src/tex2lyx/TODO.txt b/src/tex2lyx/TODO.txt
index 111d6b3..2c835dd 100644
--- a/src/tex2lyx/TODO.txt
+++ b/src/tex2lyx/TODO.txt
@@ -159,3 +159,12 @@ General
* Use the language information provided by Language.cpp and the languages file
(for babel/lyx/polyglossia name, quote style etc.)
instead of hardcoding this information in Preamble.cpp.
+
+* Store alias commands for characters in a file with
+ "lib/unicodesymbols"-format, e.g.
+
+ 0x200b "\\dots" "" "" "" # HORIZONTAL ELLIPSIS
+ 0x200b "\\ldots" "" "" "\\ldots" # HORIZONTAL ELLIPSIS
+ 0x200b "\\textellipsis" "" "" "" # HORIZONTAL ELLIPSIS
+
+ Look up LaTeX->Unicode conversion in the combined files.
diff --git a/src/tex2lyx/test/CJK.lyx.lyx b/src/tex2lyx/test/CJK.lyx.lyx
index d35a55f..2346e3f 100644
--- a/src/tex2lyx/test/CJK.lyx.lyx
+++ b/src/tex2lyx/test/CJK.lyx.lyx
@@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3
-\lyxformat 540
+\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
diff --git a/src/tex2lyx/test/CJKutf8.lyx.lyx b/src/tex2lyx/test/CJKutf8.lyx.lyx
index 43ac4af..6074793 100644
--- a/src/tex2lyx/test/CJKutf8.lyx.lyx
+++ b/src/tex2lyx/test/CJKutf8.lyx.lyx
@@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3
-\lyxformat 540
+\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
diff --git a/src/tex2lyx/test/DummyDocument.lyx.lyx
b/src/tex2lyx/test/DummyDocument.lyx.lyx
index a9c2826..e309751 100644
--- a/src/tex2lyx/test/DummyDocument.lyx.lyx
+++ b/src/tex2lyx/test/DummyDocument.lyx.lyx
@@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3
-\lyxformat 540
+\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
diff --git a/src/tex2lyx/test/Dummy~Document.lyx.lyx
b/src/tex2lyx/test/Dummy~Document.lyx.lyx
index 3c423d8..72e7489 100644
--- a/src/tex2lyx/test/Dummy~Document.lyx.lyx
+++ b/src/tex2lyx/test/Dummy~Document.lyx.lyx
@@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3
-\lyxformat 540
+\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
diff --git a/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx
b/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx
index 108dfc7..874656c 100644
--- a/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx
+++ b/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx
@@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3
-\lyxformat 540
+\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
diff --git a/src/tex2lyx/test/algo2e.lyx.lyx b/src/tex2lyx/test/algo2e.lyx.lyx
index 30d36ce..fd5ff26 100644
--- a/src/tex2lyx/test/algo2e.lyx.lyx
+++ b/src/tex2lyx/test/algo2e.lyx.lyx
@@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3
-\lyxformat 540
+\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
diff --git a/src/tex2lyx/test/box-color-size-space-align.lyx.lyx
b/src/tex2lyx/test/box-color-size-space-align.lyx.lyx
index 06c6878..4270939 100644
--- a/src/tex2lyx/test/box-color-size-space-align.lyx.lyx
+++ b/src/tex2lyx/test/box-color-size-space-align.lyx.lyx
@@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3
-\lyxformat 540
+\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
@@ -2876,7 +2876,7 @@ Characters
\begin_layout Standard
\size normal
-from package "ascii" and "ifsym": ®↨◻◼◙
+from package "ascii" and "ifsym": �↨◻◼◙
\end_layout
\begin_layout Standard
diff --git a/src/tex2lyx/test/test-insets-basic.lyx.lyx
b/src/tex2lyx/test/test-insets-basic.lyx.lyx
index 72ce7c0..3bcfeca 100644
--- a/src/tex2lyx/test/test-insets-basic.lyx.lyx
+++ b/src/tex2lyx/test/test-insets-basic.lyx.lyx
@@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3
-\lyxformat 540
+\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
diff --git a/src/tex2lyx/test/test-insets.lyx.lyx
b/src/tex2lyx/test/test-insets.lyx.lyx
index e1bf1b5..0456439 100644
--- a/src/tex2lyx/test/test-insets.lyx.lyx
+++ b/src/tex2lyx/test/test-insets.lyx.lyx
@@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3
-\lyxformat 540
+\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
diff --git a/src/tex2lyx/test/test-memoir.lyx.lyx
b/src/tex2lyx/test/test-memoir.lyx.lyx
index c4e4530..de21e4e 100644
--- a/src/tex2lyx/test/test-memoir.lyx.lyx
+++ b/src/tex2lyx/test/test-memoir.lyx.lyx
@@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3
-\lyxformat 540
+\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
diff --git a/src/tex2lyx/test/test-modules.lyx.lyx
b/src/tex2lyx/test/test-modules.lyx.lyx
index d4c3830..a67248a 100644
--- a/src/tex2lyx/test/test-modules.lyx.lyx
+++ b/src/tex2lyx/test/test-modules.lyx.lyx
@@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3
-\lyxformat 540
+\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
diff --git a/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx
b/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx
index 01168b3..7d2a160 100644
--- a/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx
+++ b/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx
@@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3
-\lyxformat 540
+\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
diff --git a/src/tex2lyx/test/test-scr.lyx.lyx
b/src/tex2lyx/test/test-scr.lyx.lyx
index 7b180eb..0af8261 100644
--- a/src/tex2lyx/test/test-scr.lyx.lyx
+++ b/src/tex2lyx/test/test-scr.lyx.lyx
@@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3
-\lyxformat 540
+\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
diff --git a/src/tex2lyx/test/test-structure.lyx.lyx
b/src/tex2lyx/test/test-structure.lyx.lyx
index 5d15e1b..5281f89 100644
--- a/src/tex2lyx/test/test-structure.lyx.lyx
+++ b/src/tex2lyx/test/test-structure.lyx.lyx
@@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3
-\lyxformat 540
+\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
diff --git a/src/tex2lyx/test/test.lyx.lyx b/src/tex2lyx/test/test.lyx.lyx
index d12e4e4..720e937 100644
--- a/src/tex2lyx/test/test.lyx.lyx
+++ b/src/tex2lyx/test/test.lyx.lyx
@@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3
-\lyxformat 540
+\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
diff --git a/src/tex2lyx/test/verbatim.lyx.lyx
b/src/tex2lyx/test/verbatim.lyx.lyx
index 6ce72e5..2897b65 100644
--- a/src/tex2lyx/test/verbatim.lyx.lyx
+++ b/src/tex2lyx/test/verbatim.lyx.lyx
@@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.3
-\lyxformat 540
+\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
diff --git a/src/version.h b/src/version.h
index ff15d4d..84690c4 100644
--- a/src/version.h
+++ b/src/version.h
@@ -32,8 +32,8 @@ extern char const * const lyx_version_info;
// Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own.
-#define LYX_FORMAT_LYX 540 // uwestoehr: enable placement for rotated floats
-#define LYX_FORMAT_TEX2LYX 540
+#define LYX_FORMAT_LYX 541 // milde: \SpecialChar allowbreak
+#define LYX_FORMAT_TEX2LYX 541
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
#ifndef _MSC_VER