version 1.1, 2014/04/02 10:06:14 |
version 1.2, 2019/03/08 10:13:12 |
|
|
|
|
Here's a quick note on how to add new DocBook elements. |
Here's a quick note on how to add new DocBook elements. |
|
|
First, look up the element in the DocBook reference. For element <foo>, this is usually: |
First, look up the element in the DocBook reference. |
|
For element <foo>, this is usually: |
|
|
http://docbook.org/tdg51/en/html/foo.html |
https://tdg.docbook.org/tdg/5.1/foo.html |
|
|
|
Some elements are no longer defined in DocBook 5. |
|
For these, you will have to look at 4.5 documentation instead: |
|
|
|
https://tdg.docbook.org/tdg/4.5/foo.html |
|
|
Add the alpha-ordered node (NODE_FOO) to extern.h. |
Add the alpha-ordered node (NODE_FOO) to extern.h. |
|
|
Next, add rules.c isparent() rule. This is the hard part. First, |
Next, add rules.c isparent() rule. This is the hard part. First, |
Line 30 Now the hard work is finished! |
|
Line 36 Now the hard work is finished! |
|
Next, add the name and whether it admits text to docbook2mdoc.c's |
Next, add the name and whether it admits text to docbook2mdoc.c's |
"nodes" structure array. |
"nodes" structure array. |
|
|
Finally, modify print_pnode() with your new entry. Use similar nodes as |
Finally, modify pnode_print() with your new entry. Use similar nodes as |
a reference. (NOTE: if it's an inline like, say, NODE_EMPHASIS, then |
a reference. (NOTE: if it's an inline like, say, NODE_EMPHASIS, then |
remember to add the node to the postfix switch statement!) |
remember to add the node to the postfix switch statement!) |