Skip to content

Conversation

yugaego
Copy link
Contributor

@yugaego yugaego commented Nov 21, 2020

Asciidoctor documentation suggests solution to properly render a possessive monospaced phrase by using unconstrained formatting.
However, this approach does not work when one more monospaced phrase follows in the same paragraph.
The simplest workaround was suggested by the Asciidoctor project lead Dan Allen.

Before:
PDF
before-pdf

HTML
before-html

EPUB
before-epub

After:
PDF
after-pdf

HTML
after-html

EPUB
after-epub

Asciidoctor documentation suggests solution to properly render
a possessive monospaced phrase by using unconstrained formatting.
However, this approach does not work when one more monospaced phrase
follows in the same paragraph.
The simplest workaround was suggested by the Asciidoctor project lead:
Dan Allen.
@ben
Copy link
Member

ben commented Nov 25, 2020

Kind of sad, I really don't like to put non-ASCII characters into the source code like this. Is there no other way?

@jnavila
Copy link
Member

jnavila commented Nov 25, 2020

Come on, the world is UTF-8 nowadays.

Personal taste, but I strongly dislike these “macro” things that can replace characters. They always end up colliding with perfectly admissible use of the reserved sequences, and require more ugly escaping.

@yugaego
Copy link
Contributor Author

yugaego commented Nov 25, 2020

Is there no other way?

These were the other options suggested on Gitter earlier:

Abel Salgado Romero @abelsromero Nov 21 22:35
You could just passtrough "Text with HEADpass:[']s reference."
Or use the special attribute {apos} instead

So, I have tested the options, and the following ones gave expected results (screenshots are shown below):

`HEAD`pass:[’]s with pass.

`HEAD`{rsquo}s curly brackets.

`HEAD`’s html entity. 

Note that the right single quote (not apostrophe) would have to be set explicitly to be consistent with the rest of the text.

So, to me inserting the quote directly seems to be a more straightforward option in this case.

Some code context
https://github.com/asciidoctor/asciidoctor/blob/dd843d59b1e49f29d68386bfdf0438ce11b42577/lib/asciidoctor.rb#L393
https://github.com/asciidoctor/asciidoctor/blob/dd843d59b1e49f29d68386bfdf0438ce11b42577/lib/asciidoctor.rb#L507

HTML
options-html
EPUB
options-epub
PDF
options-pdf

@ben
Copy link
Member

ben commented Nov 25, 2020

Personal taste, but I strongly dislike these “macro” things that can replace characters.

I mean, I'm kind of with you here. If it were a 😛 emoji, I would totally advocate to include the literal. But punctuation is a weird thing where semantics and display really are separate things (i.e. German-style „lower quotation marks”, but also perhaps a particular format wants &lquo; entities).

to me inserting the quote directly seems to be a more straightforward option in this case.

Okay. In this case it seems like the right thing to do, but I worry that translation projects might end up with rendering issues because this character wasn't re-typed exactly correctly.

Thanks for catching and fixing this!

@ben ben merged commit 019a33b into progit:master Nov 25, 2020
@jnavila
Copy link
Member

jnavila commented Nov 25, 2020

🙇

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

Successfully merging this pull request may close these issues.

3 participants