Login  Register

Re: [small] not working with asciidoctr-pdf

Posted by mojavelinux on Feb 10, 2019; 10:01pm
URL: https://discuss.asciidoctor.org/small-not-working-with-asciidoctr-pdf-tp6702p6718.html

If you want to understand what's possible and what's not with the inline pseudo-HTML, see this code:

https://github.com/asciidoctor/asciidoctor-pdf/blob/master/lib/asciidoctor-pdf/formatted_text/transform.rb#L118-L248

The font tag doesn't support color. But the color tag does.

Remember there's no actual HTML renderer here. We're doing all this with custom code.

-Dan

On Sun, Feb 10, 2019 at 2:55 PM 1marc1 [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Dan,

I wasn't aware of that possibility. I tried to extend it to colours, but the following does not work:

Attempt to provide +++<font color="#d3173c">some colour</font>+++ in a line of text.
Attempt to provide +++<font color=#d3173c>some colour</font>+++ in a line of text.

I also had a look at making life easier when working with changing font sizes, by doing this:

:smallfont: +++<font size=".5em">
:largefont: +++<font size="1.5em">
:endfont: </font>+++

The word {smallfont}small{endfont} is smaller than the rest of the line. 
The word {largefont}big{endfont} is bigger than the rest of the line.

Unfortunately, the above does not work.

Marc.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/small-not-working-with-asciidoctr-pdf-tp6702p6717.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux