Related to the long running problem of keeping bullet with next, if there is a formalpara with a title,
and the para then contains something that forces a carriage return in output (e.g. a table), the
title should be keep-with-next. This shuld be solvable by searching through the descendants of the
para in a formalpara, and seeing if there's a table, example, or variant thereof. If there is, the title
is *not* going to be run-in, so the keep-with-next attribute should be turned on for it. Example:
<formalpara><title>XXX</title><para><informaltable>AAA : XXX will not keep-with-next with AAA
<formalpara><title>XXX</title><para><informalexample>AAA : XXX will not keep-with-next with
AAA
(I know it's a little silly to have informaltable within formalpara, rather than just formal table; but
this is a more general malaise with keep-with-next not showing up when it should.)
Logged In: YES
user_id=203410
This works for me, though obviously it'll need expanding:
(element (formalpara title)
(let* (
(informalexample (node-list-first (select-elements (descendants (parent (current-node)))
(normalize "informalexample"))))
(example (node-list-first (select-elements (descendants (parent (current-node)))
(normalize "example"))))
(informaltable (node-list-first (select-elements (descendants (parent (current-node)))
(normalize "informaltable"))))
(table (node-list-first (select-elements (descendants (parent (current-node)))
(normalize "table"))))
)
(if (and (node-list-empty? informalexample)
(node-list-empty? example)
(node-list-empty? informaltable)
(node-list-empty? table)
)
($runinhead$) ($lowtitle$ 2 4))
))
Logged In: YES
user_id=18375
This seems to be overdone. Shouldn't formalpara titles
*always* keep with next for the para contents? I don't
see why a formalpara title should ever be followed by a
line break before the contents.....
Logged In: YES
user_id=203410
Formalpara titles should indeed always keep with next; but with the current stylesheet in RTF at least, they
don't.