DocBook: implement svglobal.

This commit is contained in:
Thibaut Cuvelier 2020-11-16 20:15:34 +01:00
parent 9b55d2f71e
commit c6fe1fbe5f
6 changed files with 51 additions and 6 deletions

View File

@ -460,7 +460,7 @@ export/export/docbook/Hollywood_docbook5
export/templates/Letters/French_Letter_%28lettre%29_docbook5 export/templates/Letters/French_Letter_%28lettre%29_docbook5
# - Letter, elements at the end of the document that should be in <info>. # - Letter, elements at the end of the document that should be in <info>.
export/templates/Letters/Letter_%28Standard_Class%29_docbook5 export/templates/Letters/Letter_%28Standard_Class%29_docbook5
# - G-Brief: too far from the other classes. # - G-Brief: too far from the other classes, not implemented.
export/templates/Letters/G-Brief_%28V._2%29_docbook5 export/templates/Letters/G-Brief_%28V._2%29_docbook5
export/templates/Obsolete/G-Brief_%28V._1,_Obsolete%29/.*_docbook5 export/templates/Obsolete/G-Brief_%28V._1,_Obsolete%29/.*_docbook5
# - KOMA-Script Letter: too hard to output phone and fax numbers at the right place (need two levels of wrapping). # - KOMA-Script Letter: too hard to output phone and fax numbers at the right place (need two levels of wrapping).
@ -514,6 +514,8 @@ export/examples/Modules/Variable-width_Minipages_docbook5
export/examples/(es|fr)/Modules/Linguistics_docbook5 export/examples/(es|fr)/Modules/Linguistics_docbook5
# - Inlines in inlines (<code> within <personname>), double sidebar. # - Inlines in inlines (<code> within <personname>), double sidebar.
export/examples/ko/cjk-ko-doc_docbook5 export/examples/ko/cjk-ko-doc_docbook5
# - Metadata in abstract paragraph.
export/templates/Articles/Springers_Global_Journal_Template_%28V._3%29_docbook5
Sublabel: docbook poster Sublabel: docbook poster
# Posters cannot be properly exported, the LyX documents are too far from # Posters cannot be properly exported, the LyX documents are too far from

View File

@ -1,5 +1,5 @@
# Regular expressions for tests that are most likely "wontfix" # Regular expressions for tests that are most likely "wontfix"
# or "sep" (someone elses problem) # or "sep" (someone else's problem)
# #
# Tests matching here AND in "invertedTests" get the label "suspended" # Tests matching here AND in "invertedTests" get the label "suspended"
# and the test-feature 'inverted', i.e. they are reported as failing if # and the test-feature 'inverted', i.e. they are reported as failing if
@ -23,3 +23,11 @@ export/examples/(|fr/)Presentations/Foils_pdf[45]_systemF
# Files in the attic are kept for reference and conversion tests. # Files in the attic are kept for reference and conversion tests.
# Failures are usually due to new package versions and "wontfix". # Failures are usually due to new package versions and "wontfix".
.*/attic/(eu|id|it|pl|sk)_.* .*/attic/(eu|id|it|pl|sk)_.*
# DocBook export is still work-in-progress for many layouts: the output
# is already viable, but not yet valid.
export/(templates|examples)/Scripts/Hollywood_docbook5
export/export/docbook/Hollywood_docbook5
export/templates/Letters/French_Letter_%28lettre%29_docbook5
export/templates/Letters/Letter_%28Standard_Class%29_docbook5
export/templates/Articles/Springers_Global_Journal_Template_%28V._3%29_docbook5

View File

@ -446,7 +446,12 @@ Style Running_Author
CopyStyle Running_Title CopyStyle Running_Title
LatexName authorrunning LatexName authorrunning
LabelString "Running author:" LabelString "Running author:"
DocBookTag NONE # Still TODO DocBookTag personname
DocBookTagType paragraph
DocBookWrapperTag author
DocBookWrapperAttr role='abbrev'
DocBookWrapperTagType block
DocBookInInfo always
End End
Style Running_Chapter Style Running_Chapter

View File

@ -116,6 +116,10 @@ InsetLayout Flex:Keywords
Color green Color green
Size Small Size Small
EndFont EndFont
DocBookTag keyword
DocBookTagType paragraph
DocBookWrapperTag keywordset
DocBookInInfo always
End End
@ -141,6 +145,12 @@ Style Offprints
LatexName offprints LatexName offprints
LeftMargin "Offprints:xx." LeftMargin "Offprints:xx."
LabelString "Offprints:" LabelString "Offprints:"
DocBookTag personname
DocBookTagType paragraph
DocBookWrapperTag author
DocBookWrapperAttr role='offprint'
DocBookWrapperTagType inline
DocBookInInfo always
End End
@ -163,4 +173,9 @@ Style Abstract
LabelFont LabelFont
Series Bold Series Bold
EndFont EndFont
DocBookAbstract true
DocBookInInfo always
DocBookWrapperTag abstract
DocBookWrapperMergeWithPrevious true
DocBookTag para
End End

View File

@ -62,12 +62,21 @@ InsetLayout Flex:Keywords
Color green Color green
Size Small Size Small
EndFont EndFont
DocBookTag keyword
DocBookTagType paragraph
DocBookWrapperTag keywordset
DocBookInInfo always
End End
InsetLayout Flex:PACS InsetLayout Flex:PACS
CopyStyle Flex:Keywords CopyStyle Flex:Keywords
LatexName PACS LatexName PACS
LabelString "PACS" LabelString "PACS"
DocBookTag subject
DocBookTagType paragraph
DocBookWrapperTag subjectset
DocBookWrapperAttr role='pacs'
DocBookInInfo always
End End
InsetLayout Flex:Subclass InsetLayout Flex:Subclass
@ -80,6 +89,11 @@ InsetLayout Flex:CRSC
CopyStyle Flex:PACS CopyStyle Flex:PACS
LatexName CRclass LatexName CRclass
LabelString "CR Subject Classification" LabelString "CR Subject Classification"
DocBookTag subject
DocBookTagType paragraph
DocBookWrapperTag subjectset
DocBookWrapperAttr role='crsc'
DocBookInInfo always
End End
# this label has no dot at the end # this label has no dot at the end

View File

@ -452,9 +452,10 @@ void makeParagraph(
size_t nInsets = std::distance(par->insetList().begin(), par->insetList().end()); size_t nInsets = std::distance(par->insetList().begin(), par->insetList().end());
auto parSize = (size_t) par->size(); auto parSize = (size_t) par->size();
auto isLyxCodeToIgnore = [](InsetCode x) { return x == TOC_CODE; }; // If this LyX code does not produce any output, // If this LyX code does not produce any output, it can be safely ignored in the following checks: if this thing
// it can be safely ignored in the following checks: if this thing is present in the paragraph, it has no impact // is present in the paragraph, it has no impact on the definition of the special case (i.e. whether or not
// on the definition of the special case (i.e. whether or not a <para> tag should be output). // a <para> tag should be output).
auto isLyxCodeToIgnore = [](InsetCode x) { return x == TOC_CODE || x == NOTE_CODE; };
// TODO: if a paragraph *only* contains floats, listings, bibliographies, etc., should this be considered as a // TODO: if a paragraph *only* contains floats, listings, bibliographies, etc., should this be considered as a
// special case? If so, the code could be largely simplifies (all the calls to all_of, basically) and optimised // special case? If so, the code could be largely simplifies (all the calls to all_of, basically) and optimised