sile-typesetter / sile

The SILE Typesetter — Simon’s Improved Layout Engine
https://sile-typesetter.org
MIT License
1.63k stars 96 forks source link

docbook support is far from complete... #1338

Open Omikhleia opened 2 years ago

Omikhleia commented 2 years ago

SILE 0.12.2

As a follow-up to #1336, still wanting to process the same markdown file, I went another path... Since we have a dockbook class, let's start a new journey!

pandoc -s -t docbook markdown.md -o markdown.db

Let's start a new journey, with the provided preamble,

sile -I docbook.sil markdown.db

! Unknown command literal at markdown.db:17:5: in \literal

Erm? Oh this might be a long journey across weird oceans. Ok, let's not bother yet and replace "literal" tags by "emphasis" in the docbook file, and keep things rolling...

! Unknown command blockquote at markdown.db:40:3: in \blockquote

Ok, let's remove the blockquote manually, and keep things rolling...

! Unknown command docbook-section-3-title at markdown.db: in \docbook-section-3-title near 104:5: in \sectiontable: 0x55cb82609f30

Ok let's add a dumb docbook-section-3-title command to that preamble, and keep things rolling...

! Unknown command footnote at markdown.db:163:62: in \footnote

Ok let's load the footnote package in that preamble. That's plain wrong (the class might not have support at all for footnotes I guess), but that should skip the issue anyway. Roll, baby. roll.

! Unknown command colspec at markdown.db:177:11: in \colspectable: 0x55eb834b7f30

Ok, I had the feeling that tables would be an issue... Let's keep rolling by removing them for now in the docbook file...

! Unknown command variablelist at markdown.db:184:7: in \variablelisttable: 0x5608c6a07030

Doh, let's kill the variablelist for now...

! Unknown command literallayout at markdown.db:193:1: in \literallayout

Let's kill it too and see what comes next. Ah my bad at last, I need to have that JPEG file. Let's provide it and re-run...

! Unknown command textobject at markdown.db:203:11: in \textobject

Darn. Removing it too in the dockbook file, I want to see the end of it.

! Unknown command superscript at markdown.db:211:79: in \superscript

What? By Jove. Ok, let's have an emphasis there, and go on, my merry mariner, on that troubled sea in your frail ship.

Wow. "Land, land, land in sight!". Erm. Sorry. "Output, output, output generated!"

Yay! Yippee-ki-yay. Let's look at it and wonder over the wonders of the new-found lands.

Uh. Ah. Am I authorized to think that It's not really the promised land?

image

simoncozens commented 2 years ago

This is very true and not unexpected. The docbook class was written as an illustration of the fact that you don't have to write "SILE documents" but SILE should be able to be used as a document processor on whatever XML you feed it, given appropriate processing expectations for each tag.

This is something I consider a really important aspect of SILE, but I was more focused on getting the basic typesetting functionality working than developing macros for DocBook, particularly since (a) it's really big and (b) I don't personally use it. Of course that means it's not necessarily a very good demonstration of the principle... I put it in on the stone-soup principle that someone who tried to use it in anger would make it better...