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

add support for big and small roles on phrases #459

Closed
igagis opened this issue May 26, 2016 · 8 comments
Closed

add support for big and small roles on phrases #459

igagis opened this issue May 26, 2016 · 8 comments
Assignees
Milestone

Comments

@igagis
Copy link

igagis commented May 26, 2016

For example:

[small]#some small text#
[big]#some big text#

in PDF appears as a regular sized text.

Adding

base:
  font_size_large: $base_font_size * 1.5
  font_size_small: $base_font_size * 0.75

to theme description did not help

@veeg
Copy link

veeg commented May 26, 2016

PR #350 addresses this issue. I do not know what is stopping it from being merged.

@mojavelinux
Copy link
Member

There are some things in the PR I like, others I don't. I think it's going to need to be split up into smaller chunks. I just haven't had a chance to get to it yet.

@mojavelinux
Copy link
Member

Specifically, I don't want to support any built-in behavior. The role should be mapped back to settings in the theme to give it meaning. This encourages proper semantics. The big and small were something we implemented in core to be compliant with AsciiDoc Python, but I think these built-in names are a very bad idea.

In other words, the focus is adding support for custom roles that you define yourself in the theme. We won't support any roles for colors or named sizes out of the box.

@mojavelinux
Copy link
Member

I imagine something like:

stress:
  font_size: $base_font_size * 1.5

And

[stress]#key word#

I'm still thinking about the best way to categorize these roles in the theme (should they be put inside a category?)

@igagis
Copy link
Author

igagis commented May 26, 2016

custom roles sound great! But supporting big and small are necessary in my opinion, to be compliant with asciidoc

@mojavelinux
Copy link
Member

If you want to define big and small roles in your theme, you absolutely can do that.

@igagis
Copy link
Author

igagis commented May 26, 2016

Ok, for me. But just a suggestion to pre-define them and allow overriding, I think it will help to avoid confusion in many cases when people read asciidoc manual and surprise why big and small do not work with asciidoctor-pdf

@mojavelinux mojavelinux self-assigned this Dec 19, 2016
@mojavelinux mojavelinux modified the milestones: v1.5.0.alpha.18, v1.5.0 Jun 1, 2019
@mojavelinux mojavelinux changed the title text size attributes are ignored add support for big and small roles on phrases Jul 29, 2019
@mojavelinux mojavelinux modified the milestones: v1.5.0, v1.5.0.beta.2 Jul 29, 2019
@mojavelinux
Copy link
Member

While we're still debating how to handle generic roles in #368, a case can be made that the big and small roles are central enough to the semantics of AsciiDoc to support out of the box. In addition to working in the HTML converter, there's already a concept of large and small base font sizes in Asciidoctor PDF, as pointed out in the description of this issue. So the big and small roles can simply be wired to these keys.

In order to support big and small in any context, the relative size (e.g., em value) should be computed from the concrete base values in the theme and used.

mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Jul 29, 2019
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Jul 30, 2019
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Jul 30, 2019
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

3 participants