\end_inset
+\change_inserted -712698321 1555579782
+
+\end_layout
+
+\begin_layout Itemize
+
+\change_inserted -712698321 1555579780
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1555579780
+NewlineCmd
+\end_layout
+
+\end_inset
+
+
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1555579780
+[string]
+\end_layout
+
+\end_inset
+
+ Option to define a different command (from the default
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1555579780
+
+\backslash
+
+\backslash
+
+\end_layout
+
+\end_inset
+
+) to be used for line breaks.
+ The initial backslash must not be specified.
+\change_unchanged
+
\end_layout
\begin_layout Itemize
\begin_layout Description
-\change_inserted -712698321 1552395824
+\change_inserted -712698321 1555579651
\begin_inset Flex Code
status collapsed
\family default
commands which parse their content in complex ways.
Default is false.
+\end_layout
+
+\begin_layout Description
+
+\change_inserted -712698321 1555579742
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1555579658
+NewlineCmd
+\end_layout
+
+\end_inset
+
+
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1555579651
+[string]
+\end_layout
+
+\end_inset
+
+ Option to define a different command (from the default
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1555579742
+
+\backslash
+
+\backslash
+
+\change_unchanged
+
+\end_layout
+
+\end_inset
+
+) to be used for line breaks.
+ The initial backslash must not be specified.
\change_unchanged
\end_layout
\begin_inset Flex Code
status collapsed
+\begin_layout Plain Layout
+NewlineCmd
+\end_layout
+
+\end_inset
+
+
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+[string]
+\end_layout
+
+\end_inset
+
+ erlaubt es, ein (von
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+
+\backslash
+
+\end_layout
+
+\end_inset
+
+) abweichendes Makro für Zeilenumbrüche zu verwenden.
+ Das
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+
+\end_layout
+
+\end_inset
+
+ am Anfang des Makros müssen Sie bei der Spezifizierung nicht eingeben.
+
+\end_layout
+
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
\begin_layout Plain Layout
Tooltip
\end_layout
\begin_inset Flex Code
status collapsed
+\begin_layout Plain Layout
+NewlineCmd
+\end_layout
+
+\end_inset
+
+
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+[string]
+\end_layout
+
+\end_inset
+
+ erlaubt es, ein (von
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+
+\backslash
+
+\end_layout
+
+\end_inset
+
+) abweichendes Makro für Zeilenumbrüche zu verwenden.
+ Das
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+
+\end_layout
+
+\end_inset
+
+ am Anfang des Makros müssen Sie bei der Spezifizierung nicht eingeben.
+
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex Code
+status collapsed
+
\begin_layout Plain Layout
NoInsetLayout
\end_layout
# Author: Juergen Spitzmueller <spitz@lyx.org>
# Uwe Stöhr <uwestoehr@lyx.org>
-Format 72
+Format 74
#
# helper commands
Size Small
EndFont
MultiPar false
+ NewlineCmd textCR
Argument 1
MenuString "PDFComment Options"
LabelString "Opts"
LabelString "PDF (Markup)"
LatexName pdfmarkupcomment
NeedMBoxProtect 1
+ NewlineCmd ""
Argument post:1
LabelString "Comment"
Mandatory 1
ToolTip "Insert the comment to the marked-up text here"
+ NewlineCmd textCR
EndArgument
End
CopyStyle "Flex:PDF-Margin"
LabelString "PDF (Freetext)"
LatexName pdffreetextcomment
+ NewlineCmd ""
End
InsetLayout "Flex:PDF-Square"
CopyStyle "Flex:PDF-Margin"
LabelString "PDF (Square)"
LatexName pdfsquarecomment
+ NewlineCmd ""
End
InsetLayout "Flex:PDF-Circle"
CopyStyle "Flex:PDF-Margin"
LabelString "PDF (Circle)"
LatexName pdfcirclecomment
+ NewlineCmd ""
End
InsetLayout "Flex:PDF-Line"
CopyStyle "Flex:PDF-Margin"
LabelString "PDF (Line)"
LatexName pdflinecomment
+ NewlineCmd ""
End
InsetLayout "Flex:PDF-Sideline"
LatexType environment
LatexName pdfsidelinecomment
MultiPar true
+ NewlineCmd ""
Argument 2
LabelString "Comment"
Mandatory 1
ToolTip "Insert the comment here"
+ NewlineCmd textCR
EndArgument
End
LabelString "PDF (Tooltip)"
LatexName pdftooltip
NeedMBoxProtect 0
+ NewlineCmd ""
LabelFont
Color red
Size Small
# This script will update a .layout file to current format
# The latest layout format is also defined in src/TextClass.cpp
-currentFormat = 73
+currentFormat = 74
# Incremented to format 4, 6 April 2007, lasgouttes
# Incremented to format 73, 18 April 2019 by spitz
# New InsetLayout tag MenuString
+# Incremented to format 74, 18 April 2019 by spitz
+# New InsetLayout and Argument tag NewlineCmd
+
# Do not forget to document format change in Customization
# Manual (section "Declaring a new text class").
i += 1
continue
- if format >= 65 and format <= 72:
+ if format >= 65 and format <= 73:
# nothing to do.
i += 1
continue
} else if (tok == "decoration") {
lex.next();
arg.decoration = lex.getString();
+ } else if (tok == "newlinecmd") {
+ lex.next();
+ arg.newlinecmd = lex.getString();
} else if (tok == "font") {
arg.font = lyxRead(lex, arg.font);
} else if (tok == "labelfont") {
os << "\t\tRequires \"" << arg.requires << "\"\n";
if (!arg.decoration.empty())
os << "\t\tDecoration \"" << arg.decoration << "\"\n";
+ if (!arg.newlinecmd.empty())
+ os << "\t\tNewlineCmd \"" << arg.newlinecmd << "\"\n";
if (arg.font != inherit_font)
lyxWrite(os, arg.font, "Font", 2);
if (arg.labelfont != inherit_font)
ArgPassThru passthru;
docstring pass_thru_chars;
bool is_toc_caption;
+ std::string newlinecmd;
};
///
typedef std::map<std::string, latexarg> LaTeXArgMap;
/// Should we output verbatim specific chars?
docstring pass_thru_chars;
+ /// A specific newline macro
+ std::string newlinecmd;
+
/// Should we output captions?
bool html_disable_captions;
// You should also run the development/tools/updatelayouts.py script,
// to update the format of all of our layout files.
//
-int const LAYOUT_FORMAT = 73; // spitz: MenuString
+int const LAYOUT_FORMAT = 74; // spitz: NewlineCmd
// Layout format for the current lyx file format. Controls which format is
: InsetCollapsible(buf), name_(name), labelstring_(docstring()),
font_(inherit_font), labelfont_(inherit_font), decoration_(string()),
pass_thru_context_(false), pass_thru_local_(false), pass_thru_(false),
- pass_thru_chars_(docstring()), is_toc_caption_(false)
+ pass_thru_chars_(docstring()), is_toc_caption_(false), newline_cmd_(string())
{}
labelfont_ = (*lait).second.labelfont;
decoration_ = (*lait).second.decoration;
pass_thru_chars_ = (*lait).second.pass_thru_chars;
+ newline_cmd_ = (*lait).second.newlinecmd;
pass_thru_local_ = false;
if (lait->second.is_toc_caption) {
is_toc_caption_ = true;
OutputParams runparams = runparams_in;
if (!pass_thru_chars_.empty())
runparams.pass_thru_chars += pass_thru_chars_;
+ if (!newline_cmd_.empty())
+ runparams.newlinecmd = newline_cmd_;
runparams.pass_thru = isPassThru();
InsetText::latex(ots, runparams);
TexString ts = ots.release();
bool is_toc_caption_;
/// The type of Toc this is the caption of, empty otherwise.
std::string caption_of_toc_;
+ /// Specific line break macro
+ std::string newline_cmd_;
protected:
/// \name Protected functions inherited from Inset class
IL_NEEDCPROTECT,
IL_NEEDMBOXPROTECT,
IL_NEEDPROTECT,
+ IL_NEWLINE_CMD,
IL_PASSTHRU,
IL_PASSTHRU_CHARS,
IL_PARBREAKISNEWLINE,
{ "needcprotect", IL_NEEDCPROTECT },
{ "needmboxprotect", IL_NEEDMBOXPROTECT },
{ "needprotect", IL_NEEDPROTECT },
+ { "newlinecmd", IL_NEWLINE_CMD },
{ "obsoletedby", IL_OBSOLETEDBY },
{ "parbreakisnewline", IL_PARBREAKISNEWLINE },
{ "passthru", IL_PASSTHRU },
case IL_PASSTHRU_CHARS:
lex >> passthru_chars_;
break;
+ case IL_NEWLINE_CMD:
+ lex >> newline_cmd_;
+ break;
case IL_PARBREAKISNEWLINE:
lex >> parbreakisnewline_;
break;
} else if (tok == "decoration") {
lex.next();
arg.decoration = lex.getString();
+ } else if (tok == "newlinecmd") {
+ lex.next();
+ arg.newlinecmd = lex.getString();
} else if (tok == "font") {
arg.font = lyxRead(lex, arg.font);
} else if (tok == "labelfont") {
///
docstring passThruChars() const { return passthru_chars_; }
///
+ std::string newlineCmd() const { return newline_cmd_; }
+ ///
bool parbreakIsNewline() const { return parbreakisnewline_; }
///
bool isNeedProtect() const { return needprotect_; }
///
docstring passthru_chars_;
///
+ std::string newline_cmd_;
+ ///
bool parbreakisnewline_;
///
bool freespacing_;
{
switch (params_.kind) {
case InsetNewlineParams::NEWLINE:
- if (rp.inTableCell == OutputParams::PLAIN)
+ if (!rp.newlinecmd.empty())
+ os << "\\" << rp.newlinecmd << "\n";
+ else if (rp.inTableCell == OutputParams::PLAIN)
os << "\\newline\n";
else
os << "\\\\\n";
++rp.inulemcmd;
if (!il.passThruChars().empty())
rp.pass_thru_chars += il.passThruChars();
+ if (!il.newlineCmd().empty())
+ rp.newlinecmd = il.newlineCmd();
rp.par_begin = 0;
rp.par_end = paragraphs().size();