Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

one extraneous space in text output of figure name #961

Open
1 task done
alicerusso opened this issue Jan 24, 2023 · 2 comments
Open
1 task done

one extraneous space in text output of figure name #961

alicerusso opened this issue Jan 24, 2023 · 2 comments
Labels
bug Something isn't working rpat Issues needing attention from RFC Production Advisory Team text Issues in text output

Comments

@alicerusso
Copy link

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 alicerusso added the bug Something isn't working label Jan 24, 2023
@kesara kesara added the text Issues in text output label Jan 24, 2023
kesara added a commit to kesara/xml2rfc that referenced this issue Feb 2, 2023
kesara added a commit to kesara/xml2rfc that referenced this issue Feb 2, 2023
@kesara
Copy link
Member

kesara commented Feb 2, 2023

I have two code change proposals for this:

  1. fix: Avoid breaking text on hyphens  #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. fix: Include figure prefix in name before rendering text #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 kesara added the rpat Issues needing attention from RFC Production Advisory Team label Feb 2, 2023
@cabo
Copy link
Contributor

cabo commented Feb 2, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rpat Issues needing attention from RFC Production Advisory Team text Issues in text output
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants