mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 05:55:34 +00:00
New layout tags specifically for CSS information.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40411 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b0601b540e
commit
157319b3f6
@ -129,7 +129,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 = 35
|
currentFormat = 36
|
||||||
|
|
||||||
|
|
||||||
def usage(prog_name):
|
def usage(prog_name):
|
||||||
@ -314,6 +314,10 @@ def convert(lines):
|
|||||||
i += 1
|
i += 1
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if format == 35:
|
||||||
|
i += 1
|
||||||
|
continue
|
||||||
|
|
||||||
if format == 34:
|
if format == 34:
|
||||||
match = re_InsetLayout2.match(lines[i])
|
match = re_InsetLayout2.match(lines[i])
|
||||||
if not match:
|
if not match:
|
||||||
|
@ -1121,10 +1121,13 @@ docstring const LaTeXFeatures::getTClassHTMLPreamble() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
docstring const LaTeXFeatures::getTClassHTMLStyles() const {
|
docstring const LaTeXFeatures::getTClassHTMLStyles() const
|
||||||
|
{
|
||||||
DocumentClass const & tclass = params_.documentClass();
|
DocumentClass const & tclass = params_.documentClass();
|
||||||
odocstringstream tcpreamble;
|
odocstringstream tcpreamble;
|
||||||
|
|
||||||
|
tcpreamble << tclass.htmlstyles();
|
||||||
|
|
||||||
list<docstring>::const_iterator cit = usedLayouts_.begin();
|
list<docstring>::const_iterator cit = usedLayouts_.begin();
|
||||||
list<docstring>::const_iterator end = usedLayouts_.end();
|
list<docstring>::const_iterator end = usedLayouts_.end();
|
||||||
for (; cit != end; ++cit)
|
for (; cit != end; ++cit)
|
||||||
|
@ -60,7 +60,7 @@ namespace lyx {
|
|||||||
// development/updatelayouts.sh script, to update the format of
|
// development/updatelayouts.sh script, to update the format of
|
||||||
// all of our layout files.
|
// all of our layout files.
|
||||||
//
|
//
|
||||||
int const LAYOUT_FORMAT = 35;
|
int const LAYOUT_FORMAT = 36;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@ -190,6 +190,7 @@ enum TextClassTags {
|
|||||||
TC_CLASSOPTIONS,
|
TC_CLASSOPTIONS,
|
||||||
TC_PREAMBLE,
|
TC_PREAMBLE,
|
||||||
TC_HTMLPREAMBLE,
|
TC_HTMLPREAMBLE,
|
||||||
|
TC_HTMLSTYLES,
|
||||||
TC_PROVIDES,
|
TC_PROVIDES,
|
||||||
TC_REQUIRES,
|
TC_REQUIRES,
|
||||||
TC_LEFTMARGIN,
|
TC_LEFTMARGIN,
|
||||||
@ -204,6 +205,7 @@ enum TextClassTags {
|
|||||||
TC_FORMAT,
|
TC_FORMAT,
|
||||||
TC_ADDTOPREAMBLE,
|
TC_ADDTOPREAMBLE,
|
||||||
TC_ADDTOHTMLPREAMBLE,
|
TC_ADDTOHTMLPREAMBLE,
|
||||||
|
TC_ADDTOHTMLSTYLES,
|
||||||
TC_DEFAULTMODULE,
|
TC_DEFAULTMODULE,
|
||||||
TC_PROVIDESMODULE,
|
TC_PROVIDESMODULE,
|
||||||
TC_EXCLUDESMODULE,
|
TC_EXCLUDESMODULE,
|
||||||
@ -216,6 +218,7 @@ namespace {
|
|||||||
|
|
||||||
LexerKeyword textClassTags[] = {
|
LexerKeyword textClassTags[] = {
|
||||||
{ "addtohtmlpreamble", TC_ADDTOHTMLPREAMBLE },
|
{ "addtohtmlpreamble", TC_ADDTOHTMLPREAMBLE },
|
||||||
|
{ "addtohtmlstyles", TC_ADDTOHTMLSTYLES },
|
||||||
{ "addtopreamble", TC_ADDTOPREAMBLE },
|
{ "addtopreamble", TC_ADDTOPREAMBLE },
|
||||||
{ "citeformat", TC_CITEFORMAT },
|
{ "citeformat", TC_CITEFORMAT },
|
||||||
{ "classoptions", TC_CLASSOPTIONS },
|
{ "classoptions", TC_CLASSOPTIONS },
|
||||||
@ -228,6 +231,7 @@ namespace {
|
|||||||
{ "float", TC_FLOAT },
|
{ "float", TC_FLOAT },
|
||||||
{ "format", TC_FORMAT },
|
{ "format", TC_FORMAT },
|
||||||
{ "htmlpreamble", TC_HTMLPREAMBLE },
|
{ "htmlpreamble", TC_HTMLPREAMBLE },
|
||||||
|
{ "htmlstyles", TC_HTMLSTYLES },
|
||||||
{ "htmltocsection", TC_HTMLTOCSECTION },
|
{ "htmltocsection", TC_HTMLTOCSECTION },
|
||||||
{ "ifcounter", TC_IFCOUNTER },
|
{ "ifcounter", TC_IFCOUNTER },
|
||||||
{ "ifstyle", TC_IFSTYLE },
|
{ "ifstyle", TC_IFSTYLE },
|
||||||
@ -568,6 +572,10 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
|
|||||||
htmlpreamble_ = from_utf8(lexrc.getLongString("EndPreamble"));
|
htmlpreamble_ = from_utf8(lexrc.getLongString("EndPreamble"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case TC_HTMLSTYLES:
|
||||||
|
htmlstyles_ = from_utf8(lexrc.getLongString("EndStyles"));
|
||||||
|
break;
|
||||||
|
|
||||||
case TC_HTMLTOCSECTION:
|
case TC_HTMLTOCSECTION:
|
||||||
html_toc_section_ = from_utf8(trim(lexrc.getString()));
|
html_toc_section_ = from_utf8(trim(lexrc.getString()));
|
||||||
break;
|
break;
|
||||||
@ -580,6 +588,10 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
|
|||||||
htmlpreamble_ += from_utf8(lexrc.getLongString("EndPreamble"));
|
htmlpreamble_ += from_utf8(lexrc.getLongString("EndPreamble"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case TC_ADDTOHTMLSTYLES:
|
||||||
|
htmlstyles_ += from_utf8(lexrc.getLongString("EndStyles"));
|
||||||
|
break;
|
||||||
|
|
||||||
case TC_PROVIDES: {
|
case TC_PROVIDES: {
|
||||||
lexrc.next();
|
lexrc.next();
|
||||||
string const feature = lexrc.getString();
|
string const feature = lexrc.getString();
|
||||||
|
@ -264,6 +264,8 @@ protected:
|
|||||||
/// same, but for HTML output
|
/// same, but for HTML output
|
||||||
/// this is output as is to the header
|
/// this is output as is to the header
|
||||||
docstring htmlpreamble_;
|
docstring htmlpreamble_;
|
||||||
|
/// same, but specifically for CSS information
|
||||||
|
docstring htmlstyles_;
|
||||||
/// the paragraph style to use for TOCs, Bibliography, etc
|
/// the paragraph style to use for TOCs, Bibliography, etc
|
||||||
mutable docstring html_toc_section_;
|
mutable docstring html_toc_section_;
|
||||||
/// latex packages loaded by document class.
|
/// latex packages loaded by document class.
|
||||||
@ -401,6 +403,8 @@ public:
|
|||||||
docstring const & preamble() const { return preamble_; }
|
docstring const & preamble() const { return preamble_; }
|
||||||
///
|
///
|
||||||
docstring const & htmlpreamble() const { return htmlpreamble_; }
|
docstring const & htmlpreamble() const { return htmlpreamble_; }
|
||||||
|
///
|
||||||
|
docstring const & htmlstyles() const { return htmlstyles_; }
|
||||||
/// the paragraph style to use for TOCs, Bibliography, etc
|
/// the paragraph style to use for TOCs, Bibliography, etc
|
||||||
/// we will attempt to calculate this if it was not given
|
/// we will attempt to calculate this if it was not given
|
||||||
Layout const & htmlTOCLayout() const;
|
Layout const & htmlTOCLayout() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user