mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 05:55:34 +00:00
Allow Insetlayout for Branch inset (#8106).
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg173659.html
This commit is contained in:
parent
1845b310aa
commit
dce6c8875c
@ -132,6 +132,7 @@ End
|
|||||||
\html_css_as_file 0
|
\html_css_as_file 0
|
||||||
\html_be_strict true
|
\html_be_strict true
|
||||||
\author -195340706 "Georg Baum"
|
\author -195340706 "Georg Baum"
|
||||||
|
\author 5863208 "ab"
|
||||||
\end_header
|
\end_header
|
||||||
|
|
||||||
\begin_body
|
\begin_body
|
||||||
@ -14037,7 +14038,12 @@ status collapsed
|
|||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
indicates the inset whose layout is being defined, and here there are two
|
indicates the inset whose layout is being defined, and here there are
|
||||||
|
\change_inserted 5863208 1334489266
|
||||||
|
three
|
||||||
|
\change_deleted 5863208 1334489267
|
||||||
|
two
|
||||||
|
\change_unchanged
|
||||||
cases.
|
cases.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
@ -14314,6 +14320,65 @@ LyXType
|
|||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
entry, declaring which type of inset it defines.
|
entry, declaring which type of inset it defines.
|
||||||
|
\change_inserted 5863208 1334489312
|
||||||
|
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Enumerate
|
||||||
|
|
||||||
|
\change_inserted 5863208 1334492248
|
||||||
|
The layout for user specific branch is being defined.
|
||||||
|
In this case,
|
||||||
|
\begin_inset Flex Code
|
||||||
|
status collapsed
|
||||||
|
|
||||||
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
\change_inserted 5863208 1334489384
|
||||||
|
<Type>
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
must be of the form
|
||||||
|
\begin_inset Quotes eld
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
|
||||||
|
\begin_inset Flex Code
|
||||||
|
status collapsed
|
||||||
|
|
||||||
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
\change_inserted 5863208 1334489392
|
||||||
|
Branch:<name>
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
|
||||||
|
\begin_inset Quotes erd
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
, where
|
||||||
|
\begin_inset Flex Code
|
||||||
|
status collapsed
|
||||||
|
|
||||||
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
\change_inserted 5863208 1334489384
|
||||||
|
name
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
may be be any valid identifier of branch defined in user's document.
|
||||||
|
The identifier may include spaces, but in that case the whole thing must
|
||||||
|
be wrapped in quotes.
|
||||||
|
The main purpose of this feature is to allow LaTeX wrapping around specific
|
||||||
|
branches as user needs.
|
||||||
|
\change_unchanged
|
||||||
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
|
@ -134,7 +134,7 @@ enumitem
|
|||||||
\html_math_output 0
|
\html_math_output 0
|
||||||
\html_css_as_file 0
|
\html_css_as_file 0
|
||||||
\html_be_strict true
|
\html_be_strict true
|
||||||
\author 424524441 "rgheck"
|
\author 5863208 "ab"
|
||||||
\author 2090807402 "usti"
|
\author 2090807402 "usti"
|
||||||
\end_header
|
\end_header
|
||||||
|
|
||||||
@ -29285,6 +29285,28 @@ Inside math, the same effect can be achieved using math macros, see the
|
|||||||
Math
|
Math
|
||||||
\emph default
|
\emph default
|
||||||
manual.
|
manual.
|
||||||
|
\change_inserted 5863208 1334492666
|
||||||
|
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Standard
|
||||||
|
|
||||||
|
\change_inserted 5863208 1334493356
|
||||||
|
Each type of branch is allowed to have its specific style defined in layout
|
||||||
|
files (e.g.
|
||||||
|
any branch inset can be automatically wrapped by your own LaTeX commands.).
|
||||||
|
For this advanced usage, please study Customization manual (in particular
|
||||||
|
section
|
||||||
|
\begin_inset Quotes eld
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
Flex insets and InsetLayout
|
||||||
|
\begin_inset Quotes erd
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
).
|
||||||
|
\change_unchanged
|
||||||
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Section
|
\begin_layout Section
|
||||||
|
@ -132,6 +132,9 @@ import os, re, string, sys
|
|||||||
# Incremented to format 38, 08 April 2012 by gb
|
# Incremented to format 38, 08 April 2012 by gb
|
||||||
# Introduce LangPreamble and BabelPreamble for InsetLayout.
|
# Introduce LangPreamble and BabelPreamble for InsetLayout.
|
||||||
|
|
||||||
|
# Incremented to format 39, 15 April 2012 by sanda
|
||||||
|
# Introduce styling of branches via "InsetLayout Branch:".
|
||||||
|
|
||||||
# Do not forget to document format change in Customization
|
# Do not forget to document format change in Customization
|
||||||
# Manual (section "Declaring a new text class").
|
# Manual (section "Declaring a new text class").
|
||||||
|
|
||||||
@ -139,7 +142,7 @@ import os, re, string, sys
|
|||||||
# development/tools/updatelayouts.sh script to update all
|
# development/tools/updatelayouts.sh script to update all
|
||||||
# layout files to the new format.
|
# layout files to the new format.
|
||||||
|
|
||||||
currentFormat = 38
|
currentFormat = 39
|
||||||
|
|
||||||
|
|
||||||
def usage(prog_name):
|
def usage(prog_name):
|
||||||
@ -325,6 +328,10 @@ def convert(lines):
|
|||||||
i += 1
|
i += 1
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if format == 38:
|
||||||
|
i += 1
|
||||||
|
continue
|
||||||
|
|
||||||
if format == 37:
|
if format == 37:
|
||||||
i += 1
|
i += 1
|
||||||
continue
|
continue
|
||||||
|
@ -60,7 +60,7 @@ namespace lyx {
|
|||||||
// development/tools/updatelayouts.sh script, to update the format of
|
// development/tools/updatelayouts.sh script, to update the format of
|
||||||
// all of our layout files.
|
// all of our layout files.
|
||||||
//
|
//
|
||||||
int const LAYOUT_FORMAT = 38; //gb : LangPreamble and BabelPreamble for InsetLayout
|
int const LAYOUT_FORMAT = 39; //sanda branch styling
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ private:
|
|||||||
///
|
///
|
||||||
void doDispatch(Cursor & cur, FuncRequest & cmd);
|
void doDispatch(Cursor & cur, FuncRequest & cmd);
|
||||||
///
|
///
|
||||||
docstring layoutName() const { return from_ascii("Branch"); }
|
docstring layoutName() const { return from_ascii("Branch:") + branch(); }
|
||||||
///
|
///
|
||||||
Inset * clone() const { return new InsetBranch(*this); }
|
Inset * clone() const { return new InsetBranch(*this); }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user