[Cuis-dev] Erudite Help file system for Cuis -> Can it read Docbook files? PetitParser version?
H. Hirzel
hannes.hirzel at gmail.com
Mon Mar 17 02:14:08 PDT 2025
Hi Mariano
On 13/03/2025 10:22 pm, Mariano Montone wrote:
> El 13/3/25 a las 17:58, H. Hirzel escribió:
>>
>> *Program listing code can not be selected and copied.*
>>
>> The Docbook XML snippet
>>
>> <programlisting>
>> pandoc -f markdown -t docbook MyDocBookTest1.md -o MyDocBookTest1.xml
>> </programlisting>
>>
>> 2. A better solution would be to have a 'copy' button which copies
>> the content to the clipboard.
>
> I've added this button.
>
Thank you for adding the button, I can now start making use of my
hundreds of markdown files converted by pandoc to DocBook XML format!
Another rendering feature would be nice as I would like to go into
Literate programming with this: If I mark literal code in markdown with
back ticks it is converted to <literal>....</literal> by pandoc in
DocBook XML. And Erudite parses this element into an EruditeStyledText
node element. Parsing it as an EruditeDocCode is probably better. But
that node would need to keep track of if the DocBook tag was
<literal>...</literal> or <programlisting>...</programlisting>. In the
<literal> case the content is rendered in-line, in the <programlisting>
case as a paragraph.
Maybe it is better to create another node type EruditeInlineDocCode and
use that for the <literal> element.
My main aim is to arrive at a solution where I can click on a class name
and get a Smalltalk system browser opened on the class.
It probably needs the convention that the literal element is marked with
'class' at the end is suppressed when rendering but make clickable to
open a browser if we have
Markdown snippet:
The `EruditeDocBookParser class` parses DocBook XML files and builds a
document tree consisting of `EruditeDocNode class` nodes.
Converted by pandoc into the DocBook XML snippet
<para>
The <literal>EruditeDocBookParser class</literal> parses DocBook
XML files and builds a document tree consisting of
<literal>EruditeDocNode class</literal> nodes.
</para>
I attach 3 MyDocBookTest2 files to test this including the current
Morphic rendering which illustrate the issue.
Kind regards
Hannes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250317/b9ac3cc3/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MyDocBookTest2-book.xml
Type: text/xml
Size: 173 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250317/b9ac3cc3/attachment-0003.xml>
-------------- next part --------------
# My DocBook Test 2
## Introduction
This is a test to find out the minimal features supported by the Cuis Erudite Help System. The text is given in Markdown and converted to DocBook XML with pandoc.
## Markdown examples
The `EruditeDocBookParser class` parses DocBook XML files and builds a document tree consisting of `EruditeDocNode class` nodes.
A bullet list
- Buenos Aires
- Johannesburg
- Geneva
A numbered list
1. Identify the gaps
2. Find a solution
3. Implement
## Data conversion
Markdown to DocBook conversion
````
pandoc -f markdown -t docbook MyDocBookTest2section.md -o MyDocBookTest2section.xml
````
Options for pandoc
````
pandoc --help
````
## Conclusion
The elements above are supported but references to classes are not yet clickable to open a Smalltalk browser.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MyDocBookTest2section.xml
Type: text/xml
Size: 2163 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250317/b9ac3cc3/attachment-0004.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MorphicEruditeDocRenderer__MyDocBookTest2.xml
Type: text/xml
Size: 354078 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250317/b9ac3cc3/attachment-0005.xml>
More information about the Cuis-dev
mailing list