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

adding attributes to regulate QUOTE_TAGS #410

Open
JurTam opened this issue Nov 28, 2021 · 0 comments
Open

adding attributes to regulate QUOTE_TAGS #410

JurTam opened this issue Nov 28, 2021 · 0 comments

Comments

@JurTam
Copy link

JurTam commented Nov 28, 2021

Dear fellow Asciidoctors :).

I've come across a few epub reading apps that render different font thicknesses and styles based on HTML tags, not strictly adhering to CSS-set parameters.
For example, Moon Reader Plus for Android, makes <strong> text bold by adding a border around each character, while for <b>, it uses a true bold font from the selected family.
Similarly "<em>phasized" text is created by slanting original font characters sideways, while <i> makes the reader use the actual italic font.
I also remember my friend's Kobo reader doing something similar.
That can be quite a nuisance, for example when regular text ends up looking exactly the same or almost the same as the one in bold or italics.

For my own use, I just modified the converter.rb file by replacing <strong></strong> and <em></em> with <b><b/> and <i></i>, respectively, in the "QUOTE_TAGS" section.
I think it would be usable though, for on the fly changes, to include attributes that allow modifying the generated HTML tags.
For example, :strong-tag:, with :strong-tag: strong being used by default.

I know the desired effect can be achieved manually, by using pass:[<b>]some text blah blah blahpass:[</b>] for example, but it's not really the Asciidoctor way, is it :).

I'd love to help, but I'll need some pointers as to how Asciidoctor's attributes are implemented.
Thanks, All the best, JT

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

No branches or pull requests

2 participants