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

Plutus book: mapsto #1397

Closed
kwxm opened this issue Aug 31, 2019 · 1 comment
Closed

Plutus book: mapsto #1397

kwxm opened this issue Aug 31, 2019 · 1 comment
Assignees

Comments

@kwxm
Copy link
Contributor

kwxm commented Aug 31, 2019

This is a tiny subset of #1228.

There are a number of places in the book where the mapsto symbol appears. In the source it appears as |->, but in the output it appears as |→, which looks very strange. It turns out that asciidoctor translates certain sequences of characters ("replacements") at an early stage in its processing pipeline, and that one of these sequences is ->, which it turns into the right-arrow character entity, → or → (see https://asciidoctor.org/docs/user-manual/#replacements). So it's managing to deal with part of "|->", but not all of it. What actually appears in the HTML output is |→.

Now HTML5 (but not HTML4) has an entity ↦ or ↦: this appears as and would be ideal for the job, but unfortunately it doesn't quite work. The basic asciidoctor program handles both ↦ and ↦ perfectly well, producing correct HTML output. However, asciidoctor-pdf can't deal with either of these. If you put ↦ in the source then it produces a pdf with a space where the arrow should be (without complaining). If you use ↦ then you get ERROR: failed to pass formatted text.

I think the problem is just that asciidoctor-pdf just can't handle complicated characters well, and it looks as if this would be something that it would be difficult to fix: see asciidoctor/asciidoctor-pdf#1129 and https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc#fonts

Presumably this problem would go away if we solved #1228, and I don't think there's anything we can do to fix it quickly. However it took me a while to work out what was going on, so I thought I'd record it here for posterity. I only looked at the pdf and html output, so I don't know what happens with other formats.

@michaelpj
Copy link
Contributor

I don't have much intention to fix #1228. It would be quite a lot of work, and I don't think we really need much mathematics in the book (TBH, I think we could get rid of of a lot of the stuff that's there at the moment).

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

4 participants