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
# - Letter, elements at the end of the document that should be in <info>.
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/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).
@ -514,6 +514,8 @@ export/examples/Modules/Variable-width_Minipages_docbook5
export/examples/(es|fr)/Modules/Linguistics_docbook5
# - Inlines in inlines (<code> within <personname>), double sidebar.
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
# 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"
# or "sep" (someone elses problem)
# or "sep" (someone else's problem)
#
# Tests matching here AND in "invertedTests" get the label "suspended"
# 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.
# Failures are usually due to new package versions and "wontfix".
.*/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
LatexName authorrunning
LabelString "Running author:"
DocBookTag NONE # Still TODO
DocBookTag personname
DocBookTagType paragraph
DocBookWrapperTag author
DocBookWrapperAttr role='abbrev'
DocBookWrapperTagType block
DocBookInInfo always
End
Style Running_Chapter

View File

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

View File

@ -62,12 +62,21 @@ InsetLayout Flex:Keywords
Color green
Size Small
EndFont
DocBookTag keyword
DocBookTagType paragraph
DocBookWrapperTag keywordset
DocBookInInfo always
End
InsetLayout Flex:PACS
CopyStyle Flex:Keywords
LatexName PACS
LabelString "PACS"
DocBookTag subject
DocBookTagType paragraph
DocBookWrapperTag subjectset
DocBookWrapperAttr role='pacs'
DocBookInInfo always
End
InsetLayout Flex:Subclass
@ -80,6 +89,11 @@ InsetLayout Flex:CRSC
CopyStyle Flex:PACS
LatexName CRclass
LabelString "CR Subject Classification"
DocBookTag subject
DocBookTagType paragraph
DocBookWrapperTag subjectset
DocBookWrapperAttr role='crsc'
DocBookInInfo always
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());
auto parSize = (size_t) par->size();
auto isLyxCodeToIgnore = [](InsetCode x) { return x == TOC_CODE; }; // If this LyX code does not produce any output,
// it can be safely ignored in the following checks: if this thing is present in the paragraph, it has no impact
// on the definition of the special case (i.e. whether or not a <para> tag should be output).
// If this LyX code does not produce any output, it can be safely ignored in the following checks: if this thing
// is present in the paragraph, it has no impact on the definition of the special case (i.e. whether or not
// 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
// special case? If so, the code could be largely simplifies (all the calls to all_of, basically) and optimised