xml2rfc icon indicating copy to clipboard operation
xml2rfc copied to clipboard

one extraneous space in text output of figure name

Open alicerusso opened this issue 2 years ago • 2 comments

Describe the issue

input:

        <figure anchor="Reply_message">
          <name>Reply Message Consisting of a Fixed Header, a Request Block TLV, Report     
Block TLV(s), a Name TLV, a Reply Block TLV, and Reply Sub-Block TLV(s)</name>

Text output:

      Figure 8: Reply Message Consisting of a Fixed Header, a Request
       Block TLV, Report Block TLV(s), a Name TLV, a Reply Block TLV,
                        and Reply Sub- Block TLV(s)

Desired output (no space after the hyphen):

      Figure 8: Reply Message Consisting of a Fixed Header, a Request
       Block TLV, Report Block TLV(s), a Name TLV, a Reply Block TLV,
                        and Reply Sub-Block TLV(s)

files: https://www.rfc-editor.org/v3test/test9344.xml https://www.rfc-editor.org/v3test/test9344.txt (PDF and HTML are not affected.)

Code of Conduct

alicerusso avatar Jan 24 '23 07:01 alicerusso

I have two code change proposals for this:

  1. #965 Avoid breaking lines by hyphens. - This affects all text elements. I prefer this but this may have undesirable changes. See the text changes in the PR.
  2. #966 Include the figure prefix before rending the name text. - This only affects figure > name. Note this change will also change how Figure names are wrapped in the past. See the text changes in the PR.

Other work around is to use non-breaking hyphen (&#8209;). This doesn't need any code changes.

kesara avatar Feb 02 '23 08:02 kesara

The part that I don't understand is why the figure name (apparently) is formatted to a width and then reflowed for a different width. NBHY indeed is a workaround until we figure that out.

cabo avatar Feb 02 '23 12:02 cabo