Menu

#6 Keep with next formalpara title

open
nobody
None
5
2009-04-27
2001-08-07
No

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.)

Discussion

  • Nick Nicholas

    Nick Nicholas - 2001-08-07

    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))

    ))

     
  • Adam Di Carlo

    Adam Di Carlo - 2001-10-25

    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.....

     
  • Nick Nicholas

    Nick Nicholas - 2001-10-25
    • labels: 321158 --> 321156
    • assigned_to: nobody --> adicarlo
     
  • Nick Nicholas

    Nick Nicholas - 2001-10-25

    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.

     
  • Michael(tm) Smith

    • labels: 321156 --> 321158
     
  • Peter Eisentraut

    • milestone: --> 447635
     
  • Robert Stayton

    Robert Stayton - 2009-04-27
    • labels: 321158 -->
    • assigned_to: adicarlo --> nobody
    • milestone: 447635 -->
     

Log in to post a comment.

MongoDB Logo MongoDB