DocBook: add the DocBookRenderAsImage tag.

This commit is contained in:
Thibaut Cuvelier 2021-09-27 03:30:45 +02:00
parent b59eed3846
commit e93e50bf56
5 changed files with 16 additions and 3 deletions

View File

@ -276,6 +276,7 @@ InsetLayout Flex:Structure_Tree
\useforestlibrary*{linguistics}
}{}
EndPreamble
DocBookRenderAsImage true
End

View File

@ -11,7 +11,7 @@
# This script will update a .layout file to current format
# The latest layout format is also defined in src/TextClass.cpp
currentFormat = 94
currentFormat = 95
# Incremented to format 4, 6 April 2007, lasgouttes
@ -319,6 +319,9 @@ currentFormat = 94
# Incremented to format 94, 19 September 2021 by tcuvelier
# Add DocBookFloatType, DocBookCaption
# Incremented to format 95, 27 September 2021 by tcuvelier
# Add DocBookRenderAsImage
# Do not forget to document format change in Customization
# Manual (section "Declaring a new text class").
@ -569,7 +572,7 @@ def convert(lines, end_format):
i += 1
continue
if 87 <= format <= 94:
if 87 <= format <= 95:
# nothing to do.
i += 1
continue

View File

@ -59,7 +59,7 @@ namespace lyx {
// You should also run the development/tools/updatelayouts.py script,
// to update the format of all of our layout files.
//
int const LAYOUT_FORMAT = 94; // tcuvelier: DocBookFloatType, DocBookCaption
int const LAYOUT_FORMAT = 95; // tcuvelier: DocBookRenderAsImage
// Layout format for the current lyx file format. Controls which format is

View File

@ -111,6 +111,7 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass,
IL_DOCBOOKINNERTAGTYPE,
IL_DOCBOOKINNERATTR,
IL_DOCBOOKNOFONTINSIDE,
IL_DOCBOOKRENDERASIMAGE,
IL_INTOC,
IL_ISTOCCAPTION,
IL_LABELFONT,
@ -170,6 +171,7 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass,
{ "docbookitemwrappertagtype", IL_DOCBOOKITEMWRAPPERTAGTYPE },
{ "docbooknofontinside", IL_DOCBOOKNOFONTINSIDE },
{ "docbooknotinpara", IL_DOCBOOKNOTINPARA },
{ "docbookrenderasimage", IL_DOCBOOKRENDERASIMAGE },
{ "docbooksection", IL_DOCBOOKSECTION },
{ "docbooktag", IL_DOCBOOKTAG },
{ "docbooktagtype", IL_DOCBOOKTAGTYPE },
@ -580,6 +582,9 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass,
break;
case IL_DOCBOOKNOFONTINSIDE:
lex >> docbooknofontinside_;
break;
case IL_DOCBOOKRENDERASIMAGE:
lex >> docbookrenderasimage_;
break;
case IL_REQUIRES: {
lex.eatLine();

View File

@ -192,6 +192,8 @@ public:
///
bool docbooknofontinside() const { return docbooknofontinside_; }
///
bool docbookrenderasimage() const { return docbookrenderasimage_; }
///
std::set<std::string> required() const { return required_; }
///
bool isMultiPar() const { return multipar_; }
@ -361,6 +363,8 @@ private:
///
bool docbooknofontinside_ = false;
///
bool docbookrenderasimage_ = false;
///
std::set<std::string> required_;
///
bool multipar_ = true;