version 1.5, 2019/04/11 04:23:22 |
version 1.7, 2019/04/14 12:38:33 |
Line 13 For these, you will have to look at 4.5 documentation |
|
Line 13 For these, you will have to look at 4.5 documentation |
|
https://tdg.docbook.org/tdg/4.5/foo.html |
https://tdg.docbook.org/tdg/4.5/foo.html |
|
|
|
|
Add one "struct element" initializer to the elements[] array in the |
Add one "struct alias" initializer to the aliases[] array in the |
file parse.c, containing the name of element as it appears in DocBook |
file parse.c *or* one "struct nodeprop" initializer to the properties[] |
documents and the "enum nodeid" constant of the node to be generated. |
array in the file node.c, but not both. The first struct member is |
|
the name of the element as it appears in DocBook documents. |
There are several special cases: |
There are several special cases: |
|
|
* If docbook2mdoc(1) never needs to produce any output for the |
* If docbook2mdoc(1) never needs to produce any output for the |
Line 47 There are several special cases: |
|
Line 48 There are several special cases: |
|
one explicit formatting decision based on the presence, absence, |
one explicit formatting decision based on the presence, absence, |
or content of the element - add an enum constant for the new |
or content of the element - add an enum constant for the new |
node to the declaration of "enum nodeid" in the file node.h. |
node to the declaration of "enum nodeid" in the file node.h. |
Preserve the alphabetic ordering. |
Use properties[] in node.c and preserve the alphabetic ordering. |
Add such a constant if only if the code will use it at least at |
Add such a constant if only if the code will use it at least at |
one place in addition to the definition of the elements[] array. |
one place. |
|
|
|
|
In the latter case, implement formatting in the file docbook2mdoc.c. |
In the latter case, implement formatting in the file docbook2mdoc.c. |
|
|
|
|
* Nodes with complex formatting requirements call their own, |
* Nodes with complex formatting requirements call their own, |
dedicated pnode_print*() formatting functions. |
dedicated pnode_print*() formatting functions. |
These functions are ordered roughly as follows: |
For historical reasons, these functions are ordered roughly as follows: |
1. paragraphs |
1. paragraphs |
2. sections |
2. sections |
3. functions and mathematics |
3. functions and mathematics |
4. semantic markup for command line utilities |
4. semantic markup for command line utilities |
5. various semantic markup |
5. various semantic markup |
6. structural markup like lists and tables |
6. prologue and top level structures |
|
7. structural markup like lists and tables |
Such functions often contain their own loops over children and |
Such functions often contain their own loops over children and |
remove the children with pnode_unlinksub() at the end. But in |
remove the children with pnode_unlinksub() at the end. But in |
some cases, it is alternatively possible to let the common loop |
some cases, it is alternatively possible to let the common loop |