\end_inset
, while keeping backward compatibility.
+\change_inserted -712698321 1559491850
+
+\end_layout
+
+\begin_layout Description
+
+\change_inserted -712698321 1559492002
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1559491854
+ParbreakIgnored
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1559491850
+
+\emph on
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset space \thinspace{}
+\end_inset
+
+
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1559491850
+1
+\end_layout
+
+\end_inset
+
+] If this is set to
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1559491881
+1
+\change_unchanged
+
+\end_layout
+
+\end_inset
+
+, paragraph breaks will be ignored in the output.
+ This might be useful for insets where the content should be alignable on
+ different lines only in the \SpecialChar LyX
+ workarea, without any effect in the output.
+\change_unchanged
+
\end_layout
\begin_layout Description
\begin_inset Flex Code
status collapsed
+\begin_layout Plain Layout
+ParbreakIgnored
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+] Wenn dies auf
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+ gesetzt wird, werden Absatzwechsel in der Ausgabe ignoriert.
+ Das kann dann sinnvoll sein, wenn der Inhalt von Einfügungen im \SpecialChar LyX
+-Arbeitsbereich
+ auf verschiedenen Zeilen angeordnet werden soll, ohne dass dies eine Wirkung
+ in der Ausgabe hat.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex Code
+status collapsed
+
\begin_layout Plain Layout
ParbreakIsNewline
\end_layout
# Incremented to format 75, 2 June 2019 by spitz
# New Argument tags FreeSpacing, InsertOnNewline
+# New InsetLayout tag ParbreakIgnored
# Do not forget to document format change in Customization
# Manual (section "Declaring a new text class").
docstring parbreak(CursorData const * cur)
{
+ if (cur->inset().getLayout().parbreakIgnored())
+ return docstring();
odocstringstream os;
os << '\n';
// only add blank line if we're not in a ParbreakIsNewline situation
fixedwidthpreambleencoding_(false), htmlforcecss_ (false),
htmlisblock_(true), multipar_(true), custompars_(true),
forceplain_(false), passthru_(false), parbreakisnewline_(false),
- freespacing_(false), keepempty_(false), forceltr_(false),
+ parbreakignored_(false), freespacing_(false), keepempty_(false), forceltr_(false),
forceownlines_(false), needprotect_(false), needcprotect_(false),
needmboxprotect_(false), intoc_(false), spellcheck_(true),
resetsfont_(false), display_(true), forcelocalfontswitch_(false),
IL_NEWLINE_CMD,
IL_PASSTHRU,
IL_PASSTHRU_CHARS,
+ IL_PARBREAKIGNORED,
IL_PARBREAKISNEWLINE,
IL_PREAMBLE,
IL_REQUIRES,
{ "needprotect", IL_NEEDPROTECT },
{ "newlinecmd", IL_NEWLINE_CMD },
{ "obsoletedby", IL_OBSOLETEDBY },
+ { "parbreakignored", IL_PARBREAKIGNORED },
{ "parbreakisnewline", IL_PARBREAKISNEWLINE },
{ "passthru", IL_PASSTHRU },
{ "passthruchars", IL_PASSTHRU_CHARS },
case IL_NEWLINE_CMD:
lex >> newline_cmd_;
break;
+ case IL_PARBREAKIGNORED:
+ lex >> parbreakignored_;
+ break;
case IL_PARBREAKISNEWLINE:
lex >> parbreakisnewline_;
break;
///
bool parbreakIsNewline() const { return parbreakisnewline_; }
///
+ bool parbreakIgnored() const { return parbreakignored_; }
+ ///
bool isNeedProtect() const { return needprotect_; }
///
bool needsCProtect() const { return needcprotect_; }
///
bool parbreakisnewline_;
///
+ bool parbreakignored_;
+ ///
bool freespacing_;
///
bool keepempty_;
Font const outerfont = text.outerFont(pit);
// No newline before first paragraph in this lyxtext
- if (pit > 0) {
+ if (pit > 0 && !text.inset().getLayout().parbreakIgnored()) {
os << '\n';
if (!text.inset().getLayout().parbreakIsNewline())
os << '\n';
&& nextpar->getDepth() < par.getDepth()))
close_lang_switch = using_begin_end;
if (nextpar && par.params().depth() < nextpar->params().depth())
- pending_newline = true;
+ pending_newline = !text.inset().getLayout().parbreakIgnored();
break;
case LATEX_ENVIRONMENT: {
// if it's the last paragraph of the current environment
default:
// we don't need it for the last paragraph and in InTitle commands!!!
if (nextpar && !intitle_command)
- pending_newline = true;
+ pending_newline = !text.inset().getLayout().parbreakIgnored();
}
// InTitle commands use switches (not environments) for space settings
localswitch)
: subst(lang_begin_command, "$$lang", current_lang);
os << bc;
- pending_newline = !localswitch;
+ pending_newline = !localswitch
+ && !text.inset().getLayout().parbreakIgnored();
unskip_newline = !localswitch;
if (using_begin_end)
pushLanguageName(current_lang, localswitch);
lang_end_command,
"$$lang",
par_lang));
- pending_newline = !localswitch;
+ pending_newline = !localswitch
+ && !text.inset().getLayout().parbreakIgnored();
unskip_newline = !localswitch;
if (using_begin_end)
popLanguageName();
// Note from JMarc: we will re-add a \n explicitly in
// TeXEnvironment, because it is needed in this case
if (nextpar && !os.afterParbreak() && !last_was_separator) {
- // Make sure to start a new line
- os << breakln;
Layout const & next_layout = nextpar->layout();
+ if (!text.inset().getLayout().parbreakIgnored())
+ // Make sure to start a new line
+ os << breakln;
// A newline '\n' is always output before a command,
// so avoid doubling it.
if (!next_layout.isCommand()) {
if ((style == next_layout
&& !style.parbreak_is_newline
&& !text.inset().getLayout().parbreakIsNewline()
+ && !text.inset().getLayout().parbreakIgnored()
&& style.latextype != LATEX_ITEM_ENVIRONMENT
&& style.latextype != LATEX_LIST_ENVIRONMENT
&& style.align == par.getAlign()