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

Number sign is put in the wrong place in certain circumstances #12

Open
dkager opened this issue Dec 3, 2015 · 5 comments
Open

Number sign is put in the wrong place in certain circumstances #12

dkager opened this issue Dec 3, 2015 · 5 comments

Comments

@dkager
Copy link

dkager commented Dec 3, 2015

Convert the attached DTBook (rename to .xml) with the test server, adding no custom CSS/transform options.
The number sign is incorrectly placed before the comma (in BRF):

.AMSTERDAM#1
ABCD ^AB
@dkager
Copy link
Author

dkager commented Dec 3, 2015

test.txt

<dtbook xml:lang="nl" version="2005-3">
  <head/>
  <book>
    <bodymatter>
      <level1>
        <p>Amsterdam,<br/>1234 AB</p>
      </level1>
    </bodymatter>
  </book>
</dtbook>

@bertfrees
Copy link
Member

OK, I think know what went wrong here. Let me try to explain. Because What liblouis sees here is "Amsterdam,1234 AB", without any spacing between the comma and the "1234". The newline that is generated by the br element is only inserted after the translation has been done. It's more or less the same problem as in snaekobbi/pipeline-mod-dedicon#2 (comment). I see several possible solutions:

  • Make sure there is a space or newline in the XML on at least one side of the br.
  • Depending on how "Amsterdam,1234" must be translated, fix the liblouis table so that the numsign ends up right before the "1".
  • Insert ::before and ::after pseudo-elements before translation.

@dkager
Copy link
Author

dkager commented Dec 3, 2015

I think the issue with the comma might be a bug in nl-NL-g0.utb (which might in turn warrant keeping numericmode around). I will investigate.

@dkager
Copy link
Author

dkager commented Dec 3, 2015

Also, adding a space after the
seems easy enough in CSS, so that’s a good safety net.

@dkager
Copy link
Author

dkager commented Dec 3, 2015

This is an issue in the Dutch table and also occurs in liblouis 2.6.5. Likely something in the handling of the decpoint and midnum opcodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants