allow linebreak in argument delimiter string

This commit is contained in:
Juergen Spitzmueller 2012-11-30 09:13:38 +01:00
parent 3931331b56
commit ecf18084ff
3 changed files with 109 additions and 7 deletions

View File

@ -10583,7 +10583,7 @@ Argument 2
\begin_layout Itemize \begin_layout Itemize
\change_inserted -712698321 1353681145 \change_inserted -712698321 1354263104
\begin_inset Flex Code \begin_inset Flex Code
status collapsed status collapsed
@ -10638,11 +10638,26 @@ status collapsed
\end_inset \end_inset
). ).
A line break in the output can be indicated by
\begin_inset Flex Code
status collapsed
\begin_layout Plain Layout
\change_inserted -712698321 1354263104
<br/>
\end_layout
\end_inset
.
\change_unchanged
\end_layout \end_layout
\begin_layout Itemize \begin_layout Itemize
\change_inserted -712698321 1353917319 \change_inserted -712698321 1354263106
\begin_inset Flex Code \begin_inset Flex Code
status collapsed status collapsed
@ -10691,6 +10706,21 @@ status collapsed
\end_inset \end_inset
). ).
A line break in the output can be indicated by
\begin_inset Flex Code
status collapsed
\begin_layout Plain Layout
\change_inserted -712698321 1354263106
<br/>
\end_layout
\end_inset
.
\change_unchanged
\end_layout \end_layout
\begin_layout Itemize \begin_layout Itemize
@ -12642,7 +12672,7 @@ depending upon the LaTeX type.
\end_deeper \end_deeper
\begin_layout Description \begin_layout Description
\change_inserted -712698321 1353866861 \change_inserted -712698321 1354263086
\begin_inset Flex Code \begin_inset Flex Code
status collapsed status collapsed
@ -12667,6 +12697,21 @@ string
\end_inset \end_inset
] A string that is put at the beginning of the style content. ] A string that is put at the beginning of the style content.
A line break in the output can be indicated by
\begin_inset Flex Code
status collapsed
\begin_layout Plain Layout
\change_inserted -712698321 1354263086
<br/>
\end_layout
\end_inset
.
\change_unchanged
\end_layout \end_layout
\begin_layout Description \begin_layout Description
@ -13671,7 +13716,7 @@ CopyStyle
\begin_layout Description \begin_layout Description
\change_inserted -712698321 1353866881 \change_inserted -712698321 1354263074
\begin_inset Flex Code \begin_inset Flex Code
status collapsed status collapsed
@ -13696,6 +13741,21 @@ string
\end_inset \end_inset
] A string that is put at the end of the layout content. ] A string that is put at the end of the layout content.
A line break in the output can be indicated by
\begin_inset Flex Code
status collapsed
\begin_layout Plain Layout
\change_inserted -712698321 1354263069
<br/>
\change_unchanged
\end_layout
\end_inset
.
\end_layout \end_layout
\begin_layout Description \begin_layout Description
@ -16792,7 +16852,7 @@ depending upon the LaTeX type.
\end_deeper \end_deeper
\begin_layout Description \begin_layout Description
\change_inserted -712698321 1353866797 \change_inserted -712698321 1354263128
\begin_inset Flex Code \begin_inset Flex Code
status collapsed status collapsed
@ -16819,7 +16879,20 @@ string
\end_inset \end_inset
] A string that is put at the beginning of the layout content. ] A string that is put at the beginning of the layout content.
\change_inserted 155139281 1354130509 A line break in the output can be indicated by
\begin_inset Flex Code
status collapsed
\begin_layout Plain Layout
\change_inserted -712698321 1354263128
<br/>
\end_layout
\end_inset
.
\change_unchanged
\end_layout \end_layout
@ -17292,7 +17365,7 @@ status collapsed
\begin_layout Description \begin_layout Description
\change_inserted -712698321 1353866814 \change_inserted -712698321 1354263134
\begin_inset Flex Code \begin_inset Flex Code
status collapsed status collapsed
@ -17317,6 +17390,19 @@ string
\end_inset \end_inset
] A string that is put at the end of the layout content. ] A string that is put at the end of the layout content.
A line break in the output can be indicated by
\begin_inset Flex Code
status collapsed
\begin_layout Plain Layout
\change_inserted -712698321 1354263134
<br/>
\end_layout
\end_inset
.
\change_unchanged \change_unchanged
\end_layout \end_layout

View File

@ -372,10 +372,14 @@ bool Layout::read(Lexer & lex, TextClass const & tclass)
case LT_LEFTDELIM: case LT_LEFTDELIM:
lex >> leftdelim_; lex >> leftdelim_;
leftdelim_ = support::subst(leftdelim_, from_ascii("<br/>"),
from_ascii("\n"));
break; break;
case LT_RIGHTDELIM: case LT_RIGHTDELIM:
lex >> rightdelim_; lex >> rightdelim_;
rightdelim_ = support::subst(rightdelim_, from_ascii("<br/>"),
from_ascii("\n"));
break; break;
case LT_INNERTAG: case LT_INNERTAG:
@ -902,9 +906,13 @@ void Layout::readArgument(Lexer & lex)
} else if (tok == "leftdelim") { } else if (tok == "leftdelim") {
lex.next(); lex.next();
arg.ldelim = lex.getDocString(); arg.ldelim = lex.getDocString();
arg.ldelim = support::subst(arg.ldelim, from_ascii("<br/>"),
from_ascii("\n"));
} else if (tok == "rightdelim") { } else if (tok == "rightdelim") {
lex.next(); lex.next();
arg.rdelim = lex.getDocString(); arg.rdelim = lex.getDocString();
arg.rdelim = support::subst(arg.rdelim, from_ascii("<br/>"),
from_ascii("\n"));
} else if (tok == "tooltip") { } else if (tok == "tooltip") {
lex.next(); lex.next();
arg.tooltip = lex.getDocString(); arg.tooltip = lex.getDocString();

View File

@ -237,12 +237,16 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
break; break;
case IL_LEFTDELIM: case IL_LEFTDELIM:
lex >> leftdelim_; lex >> leftdelim_;
leftdelim_ = support::subst(leftdelim_, from_ascii("<br/>"),
from_ascii("\n"));
break; break;
case IL_FORCE_LOCAL_FONT_SWITCH: case IL_FORCE_LOCAL_FONT_SWITCH:
lex >> forcelocalfontswitch_; lex >> forcelocalfontswitch_;
break; break;
case IL_RIGHTDELIM: case IL_RIGHTDELIM:
lex >> rightdelim_; lex >> rightdelim_;
rightdelim_ = support::subst(rightdelim_, from_ascii("<br/>"),
from_ascii("\n"));
break; break;
case IL_LABELFONT: case IL_LABELFONT:
labelfont_ = lyxRead(lex, inherit_font); labelfont_ = lyxRead(lex, inherit_font);
@ -522,9 +526,13 @@ void InsetLayout::readArgument(Lexer & lex)
} else if (tok == "leftdelim") { } else if (tok == "leftdelim") {
lex.next(); lex.next();
arg.ldelim = lex.getDocString(); arg.ldelim = lex.getDocString();
arg.ldelim = support::subst(arg.ldelim,
from_ascii("<br/>"), from_ascii("\n"));
} else if (tok == "rightdelim") { } else if (tok == "rightdelim") {
lex.next(); lex.next();
arg.rdelim = lex.getDocString(); arg.rdelim = lex.getDocString();
arg.rdelim = support::subst(arg.rdelim,
from_ascii("<br/>"), from_ascii("\n"));
} else if (tok == "tooltip") { } else if (tok == "tooltip") {
lex.next(); lex.next();
arg.tooltip = lex.getDocString(); arg.tooltip = lex.getDocString();