From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: docbook2mdoc: The is no perfect way to render <footnote> in mdoc(7).
Date: Sun, 14 Apr 2019 16:11:34 -0500 (EST) [thread overview]
Message-ID: <e3fdd57802d4559b@fantadrom.bsd.lv> (raw)
Log Message:
-----------
The is no perfect way to render <footnote> in mdoc(7).
For now, use .Bo/.Bc as a full block.
Modified Files:
--------------
docbook2mdoc:
docbook2mdoc.c
node.c
statistics.c
Revision Data
-------------
Index: statistics.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/statistics.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -Lstatistics.c -Lstatistics.c -u -p -r1.30 -r1.31
--- statistics.c
+++ statistics.c
@@ -426,6 +426,7 @@ main(int argc, char *argv[])
table_add("filename", "TEXT");
table_add("firstname", "TEXT");
table_add("firstterm", "TEXT");
+ table_add("footnote", "para");
table_add("funcdef", "function");
table_add("funcdef", "TEXT");
table_add("funcprototype", "funcdef");
Index: docbook2mdoc.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/docbook2mdoc.c,v
retrieving revision 1.124
retrieving revision 1.125
diff -Ldocbook2mdoc.c -Ldocbook2mdoc.c -u -p -r1.124 -r1.125
--- docbook2mdoc.c
+++ docbook2mdoc.c
@@ -140,6 +140,7 @@ pnode_printpara(struct format *f, struct
switch (np->node) {
case NODE_ENTRY:
+ case NODE_FOOTNOTE:
case NODE_GLOSSTERM:
case NODE_LISTITEM:
case NODE_TERM:
@@ -1096,6 +1097,9 @@ pnode_print(struct format *f, struct pno
case NODE_FILENAME:
macro_open(f, "Pa");
break;
+ case NODE_FOOTNOTE:
+ macro_line(f, "Bo");
+ break;
case NODE_FUNCTION:
macro_open(f, "Fn");
break;
@@ -1279,6 +1283,9 @@ pnode_print(struct format *f, struct pno
case NODE_TEXT:
/* Accept more arguments to the previous macro. */
return;
+ case NODE_FOOTNOTE:
+ macro_line(f, "Bc");
+ break;
case NODE_INFORMALEQUATION:
macro_line(f, "EN");
macro_line(f, "Ed");
Index: node.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/node.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -Lnode.c -Lnode.c -u -p -r1.16 -r1.17
--- node.c
+++ node.c
@@ -58,7 +58,7 @@ static const struct nodeprop properties[
{ "fieldsynopsis", CLASS_TRANS },
{ "filename", CLASS_LINE },
{ "firstterm", CLASS_LINE },
- { "footnote", CLASS_TRANS },
+ { "footnote", CLASS_BLOCK },
{ "funcdef", CLASS_BLOCK },
{ "funcprototype", CLASS_BLOCK },
{ "funcsynopsis", CLASS_TRANS },
--
To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv
reply other threads:[~2019-04-14 21:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e3fdd57802d4559b@fantadrom.bsd.lv \
--to=schwarze@mandoc.bsd.lv \
--cc=source@mandoc.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).