mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Introduce the InToc tag for InsetLayout.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28377 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a3ea7fab35
commit
5ee35ace6f
@ -12395,6 +12395,46 @@ reference "des:FreeSpacing"
|
||||
\begin_inset Flex CharStyle:Code
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
InToc
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
[
|
||||
\begin_inset Flex CharStyle:Code
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
\emph on
|
||||
0
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
,
|
||||
\begin_inset Flex CharStyle:Code
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
1
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
] Whether to include the contents of this inset in the strings generated
|
||||
for the `Outline' pane.
|
||||
One would not, for example, want the content of a footnote in a section
|
||||
header to be included in the TOC displayed in the outline, but one would
|
||||
normally want the content of a character style displayed.
|
||||
Default is false: not to include.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
\begin_inset Flex CharStyle:Code
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
KeepEmpty
|
||||
\end_layout
|
||||
|
@ -87,6 +87,7 @@ InsetLayout Custom:Glosse
|
||||
\gll #1}
|
||||
{\glend}}{}
|
||||
EndPreamble
|
||||
InToc true
|
||||
End
|
||||
|
||||
|
||||
@ -106,6 +107,7 @@ InsetLayout Custom:Tri-Glosse
|
||||
ForcePlain true
|
||||
PassThru true
|
||||
FreeSpacing true
|
||||
InToc true
|
||||
Requires covington
|
||||
Preamble
|
||||
\@ifundefined{lingglosss}{%
|
||||
@ -128,6 +130,7 @@ InsetLayout CharStyle:Expression
|
||||
Preamble
|
||||
\newcommand{\lingexpr}[1]{\emph{#1}}
|
||||
EndPreamble
|
||||
InToc true
|
||||
End
|
||||
|
||||
|
||||
@ -142,6 +145,7 @@ InsetLayout CharStyle:Concepts
|
||||
Preamble
|
||||
\newcommand{\lingconcept}[1]{\textsc{#1}}
|
||||
EndPreamble
|
||||
InToc true
|
||||
End
|
||||
|
||||
|
||||
@ -150,10 +154,11 @@ InsetLayout CharStyle:Meaning
|
||||
LabelString meaning
|
||||
LatexType command
|
||||
LatexName lingmeaning
|
||||
Requires csquotes
|
||||
Requires csquotes
|
||||
Preamble
|
||||
\newcommand{\lingmeaning}[1]{\enquote*{#1}}
|
||||
EndPreamble
|
||||
InToc true
|
||||
End
|
||||
|
||||
|
||||
|
@ -16,6 +16,7 @@ InsetLayout CharStyle:Noun
|
||||
Shape Smallcaps
|
||||
EndFont
|
||||
Requires noun
|
||||
InToc true
|
||||
End
|
||||
|
||||
|
||||
@ -27,6 +28,7 @@ InsetLayout CharStyle:Emph
|
||||
Font
|
||||
Shape Italic
|
||||
EndFont
|
||||
InToc true
|
||||
End
|
||||
|
||||
|
||||
@ -41,6 +43,7 @@ InsetLayout CharStyle:Strong
|
||||
Preamble
|
||||
\newcommand{\strong}[1]{\textbf{#1}}
|
||||
EndPreamble
|
||||
InToc true
|
||||
End
|
||||
|
||||
|
||||
@ -55,5 +58,5 @@ InsetLayout CharStyle:Code
|
||||
Preamble
|
||||
\newcommand{\code}[1]{\texttt{#1}}
|
||||
EndPreamble
|
||||
InToc true
|
||||
End
|
||||
|
||||
|
@ -193,6 +193,7 @@ InsetLayout Branch
|
||||
Size Small
|
||||
EndFont
|
||||
MultiPar true
|
||||
InToc true
|
||||
End
|
||||
|
||||
InsetLayout Index
|
||||
|
@ -42,7 +42,10 @@ import os, re, string, sys
|
||||
# Incremented to format 12, 10 January 2009 by gb
|
||||
# Add I18NPreamble tag
|
||||
|
||||
currentFormat = 12
|
||||
# Incremented to format 13, 5 February 2009 by rgh
|
||||
# Add InToc tag for InsetLayout
|
||||
|
||||
currentFormat = 13
|
||||
|
||||
|
||||
def usage(prog_name):
|
||||
@ -202,8 +205,8 @@ def convert(lines):
|
||||
i += 1
|
||||
continue
|
||||
|
||||
# This just involved new features, not any changes to old ones
|
||||
if format == 11:
|
||||
# These just involved new features, not any changes to old ones
|
||||
if format == 11 or format == 12:
|
||||
i += 1
|
||||
continue
|
||||
|
||||
|
@ -61,7 +61,7 @@ private:
|
||||
};
|
||||
|
||||
// Keep the changes documented in the Customization manual.
|
||||
int const FORMAT = 12;
|
||||
int const FORMAT = 13;
|
||||
|
||||
|
||||
bool layout2layout(FileName const & filename, FileName const & tempfile)
|
||||
|
@ -37,7 +37,7 @@ InsetLayout::InsetLayout() :
|
||||
labelfont_(sane_font), bgcolor_(Color_error),
|
||||
multipar_(false), custompars_(false), forceplain_(true),
|
||||
passthru_(false), needprotect_(false), freespacing_(false),
|
||||
keepempty_(false), forceltr_(false)
|
||||
keepempty_(false), forceltr_(false), intoc_(false)
|
||||
{
|
||||
labelfont_.setColor(Color_error);
|
||||
}
|
||||
@ -81,6 +81,7 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
|
||||
IL_FORCELTR,
|
||||
IL_FORCEPLAIN,
|
||||
IL_FREESPACING,
|
||||
IL_INTOC,
|
||||
IL_LABELFONT,
|
||||
IL_LABELSTRING,
|
||||
IL_LATEXNAME,
|
||||
@ -107,6 +108,7 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
|
||||
{ "forceltr", IL_FORCELTR },
|
||||
{ "forceplain", IL_FORCEPLAIN },
|
||||
{ "freespacing", IL_FREESPACING },
|
||||
{ "intoc", IL_INTOC },
|
||||
{ "keepempty", IL_KEEPEMPTY },
|
||||
{ "labelfont", IL_LABELFONT },
|
||||
{ "labelstring", IL_LABELSTRING },
|
||||
@ -182,6 +184,9 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
|
||||
case IL_FORCELTR:
|
||||
lex >> forceltr_;
|
||||
break;
|
||||
case IL_INTOC:
|
||||
lex >> intoc_;
|
||||
break;
|
||||
case IL_MULTIPAR:
|
||||
lex >> multipar_;
|
||||
// the defaults for these depend upon multipar_
|
||||
|
@ -96,6 +96,8 @@ public:
|
||||
bool isKeepEmpty() const { return keepempty_; };
|
||||
///
|
||||
bool isForceLtr() const { return forceltr_; };
|
||||
///
|
||||
bool isInToc() const { return intoc_; };
|
||||
private:
|
||||
///
|
||||
docstring name_;
|
||||
@ -141,6 +143,8 @@ private:
|
||||
bool keepempty_;
|
||||
///
|
||||
bool forceltr_;
|
||||
/// should the contents be written to TOC strings?
|
||||
bool intoc_;
|
||||
};
|
||||
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user