git.iko.soy/typeable/pandoc
on master help sign in
DocBook reader: Supported bibliography, bibliodiv.
commitdab6a36585fc7e9ef1e8f1bc2789fa91f66b5d43 authorJohn MacFarlane <fiddlosopher@gmail.com> dateThu 10 May 2012, 19:50 (14 years ago) parent15ef1a1
1 file changed+16−8
src/Text/Pandoc/Readers/DocBook.hs+16−8
src/Text/Pandoc/Readers/DocBook.hs+16−8
@@ -26,11 +26,11 @@ List of all DocBook tags, with [x] indicating implemented,
2626[o] address - A real-world address, generally a postal address
2727[ ] affiliation - The institutional affiliation of an individual
2828[ ] alt - Text representation for a graphical element
29−[ ] anchor - A spot in the document
29+[o] anchor - A spot in the document
3030[x] answer - An answer to a question posed in a QandASet
3131[x] appendix - An appendix in a Book or Article
32−[ ] appendixinfo - Meta-information for an Appendix
33−[ ] application - The name of a software program
32+[x] appendixinfo - Meta-information for an Appendix
33+[o] application - The name of a software program
3434[x] area - A region defined for a Callout in a graphic or code example
3535[x] areaset - A set of related areas in a graphic or code example
3636[x] areaspec - A collection of regions in a graphic or code example
@@ -46,14 +46,14 @@ List of all DocBook tags, with [x] indicating implemented,
4646[ ] authorgroup - Wrapper for author information when a document has
4747 multiple authors or collabarators
4848[x] authorinitials - The initials or other short identifier for an author
49−[ ] beginpage - The location of a page break in a print version of the document
49+[o] beginpage - The location of a page break in a print version of the document
5050[ ] bibliocoverage - The spatial or temporal coverage of a document
51−[ ] bibliodiv - A section of a Bibliography
52−[ ] biblioentry - An entry in a Bibliography
53−[ ] bibliography - A bibliography
51+[x] bibliodiv - A section of a Bibliography
52+[x] biblioentry - An entry in a Bibliography
53+[x] bibliography - A bibliography
5454[ ] bibliographyinfo - Meta-information for a Bibliography
5555[ ] biblioid - An identifier for a document
56−[ ] bibliolist - A wrapper for a set of bibliography entries
56+[o] bibliolist - A wrapper for a set of bibliography entries
5757[ ] bibliomisc - Untyped bibliographic information
5858[ ] bibliomixed - An entry in a Bibliography
5959[ ] bibliomset - A cooked container for related bibliographic information
@@ -593,6 +593,13 @@ parseBlock (Elem e) =
593593 "titleabbrev" -> return mempty
594594 "authorinitials" -> return mempty
595595 "title" -> return mempty -- handled by getTitle or sect
596+ "bibliography" -> do
597+ book <- gets dbBook
598+ if book then sect 0 else sect 1
599+ "bibliodiv" -> do
600+ book <- gets dbBook
601+ if book then sect 1 else sect 2
602+ "biblioentry" -> para <$> getInlines e
596603 "chapter" -> sect 0
597604 "appendix" -> sect 0
598605 "preface" -> sect 0
@@ -644,6 +651,7 @@ parseBlock (Elem e) =
644651 "info" -> getTitle >> getAuthors >> getDate >> return mempty
645652 "articleinfo" -> getTitle >> getAuthors >> getDate >> return mempty
646653 "chapterinfo" -> return mempty -- keywords & other metadata
654+ "appendixinfo" -> return mempty -- keywords & other metadata
647655 "bookinfo" -> getTitle >> getAuthors >> getDate >> return mempty
648656 "article" -> modify (\st -> st{ dbBook = False }) >>
649657 getTitle >> getBlocks e