#LyX 2.1 created this file. For more info see http://www.lyx.org/
-\lyxformat 452
+\lyxformat 453
\begin_document
\begin_header
\textclass scrbook
\use_package mathdots 1
\use_package mathtools 0
\use_package mhchem 0
+\use_package stmaryrd 0
\use_package undertilde 0
\cite_engine basic
\cite_engine_type numerical
\begin_layout Itemize
-\change_inserted -712698321 1353917320
+\change_inserted -712698321 1355661048
\begin_inset Flex Code
status collapsed
\end_inset
.
+\end_layout
+
+\begin_layout Itemize
+
+\change_inserted -712698321 1355661160
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1355661057
+AutoInsert
+\end_layout
+
+\end_inset
+
+
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1355661049
+[int=0]
+\end_layout
+
+\end_inset
+
+ If this is set to
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1355661077
+1
+\change_unchanged
+
+\end_layout
+
+\end_inset
+
+, this argument is automatically inserted when the respective style is selected.
+ This option is currently only available for paragraph styles, not for InsetLayo
+uts.
\change_inserted 155139281 1354198988
\end_layout
Color blue
Size large
EndFont
+ AutoInsert 1
EndArgument
End
{
latexarg arg;
arg.mandatory = false;
+ arg.autoinsert = false;
bool error = false;
bool finished = false;
arg.font = inherit_font;
} else if (tok == "mandatory") {
lex.next();
arg.mandatory = lex.getBool();
+ } else if (tok == "autoinsert") {
+ lex.next();
+ arg.autoinsert = lex.getBool();
} else if (tok == "leftdelim") {
lex.next();
arg.ldelim = lex.getDocString();
std::string decoration;
FontInfo font;
FontInfo labelfont;
+ bool autoinsert;
};
///
typedef std::map<std::string, latexarg> LaTeXArgMap;
if (change_layout)
setLayout(cur, layout);
+ Layout::LaTeXArgMap args = tclass[layout].latexargs();
+ Layout::LaTeXArgMap itemargs = tclass[layout].itemargs();
+ if (!itemargs.empty())
+ args.insert(itemargs.begin(), itemargs.end());
+ Layout::LaTeXArgMap::const_iterator lait = args.begin();
+ Layout::LaTeXArgMap::const_iterator const laend = args.end();
+ for (; lait != laend; ++lait) {
+ Layout::latexarg arg = (*lait).second;
+ if (arg.autoinsert) {
+ FuncRequest cmd(LFUN_ARGUMENT_INSERT, (*lait).first);
+ lyx::dispatch(cmd);
+ }
+ }
+
break;
}