Asciidoctor-pdf color question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Asciidoctor-pdf color question

jnilo
This post was updated on .
Hello all
I am trying to use asciidoctor-pdf to translate my asciidoctor documentation into pdf. But so far I am unable to translate the colors.
In a test.adoc file if I have a single line:
[red]#this is printed in red#
then
asciidoctor test.adoc
will generate an test.html page which is displaying the red but:
asciidoctor-pdf test.adoc
won't generate a test.pdf file displaying the red

What am I missing here ?

NB. Post update
I understand how to use a yml theme and I was successfull to change the color or the size of the Base key but my problem is that I want only to change the color of certain words (i.e. those between the # in [red]#this will be red#).
In the html I have a "red" class used together with a css span tag:
<div id="content">
<div class="paragraph">
<p><span class="red">this is printed in red</span>
this is not</p>
</div>
</div>
But I do not understand how to modify my asciidoctor-pdf theme to process this "red" class...
Thank you for your help
Jacques
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-pdf color question

mojavelinux
Administrator
Color roles are not implemented in Asciidoctor PDF. We likely won't implement them out of the box, but we will provide a way to define roles in the theme so you can control the style of the text (such as color).

For discussion on this topic, please see https://github.com/asciidoctor/asciidoctor-pdf/issues/368

(The reason I don't want to support color names out of the box is because they are not at all semantic and therefore a bad practice. However, we may define some built-in role names as discussed in https://github.com/asciidoctor/asciidoctor/issues/1664).

-Dan

On Sun, Feb 14, 2016 at 6:40 AM, jnilo [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello all
I am trying to use asciidoctor-pdf to translate my asciidoctor documentation into pdf. But so far I am unable to translate the colors.
In a test.adoc file if I have a single line:
[red]#this is printed in red#
then
asciidoctor test.adoc
will generate an test.html page which is displaying the red but:
asciidoctor-pdf test.adoc
won't generate a test.pdf file displaying the red

What am I missing here ?
Thank you for your help
Jacques


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



--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-pdf color question

jnilo
Thanks for your reply Dan. I was suspecting this answer ...
I will therefore eagerly wait for the 1.5.0 beta 1 release of asciidoctor-pdf.
And thank you for the great work !
Jacques
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-pdf color question

IlliteratePhD
In reply to this post by mojavelinux
So, just to make sure I understand this correctly. At the moment, for pdfs, there is no way of highlighting certain words with color in the text using asciidoctor? We are constrained to the styles given to the parent text container.

If so, I assume that this also extends to attempts to change the background color of individual words, e.g., [lime-background]#Allowed#

Regards
// Patrik
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-pdf color question

mojavelinux
Administrator
That's correct. This is not yet available in a release. However, we know how to do it and there's an open PR that contains a proposal. There are still some changes I'd like to see in that code before merging it and I haven't had time yet to review thoroughly.


-Dan

On Fri, Aug 11, 2017 at 12:35 AM, IlliteratePhD [via Asciidoctor :: Discussion] <[hidden email]> wrote:
So, just to make sure I understand this correctly. At the moment, for pdfs, there is no way of highlighting certain words with color in the text using asciidoctor? We are constrained to the styles given to the parent text container.

If so, I assume that this also extends to attempts to change the background color of individual words, e.g., [lime-background]#Allowed#

Regards
// Patrik


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Asciidoctor-pdf-color-question-tp4313p5825.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
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor-pdf color question

IlliteratePhD
Ok, cheers. I'll just hold out for a while then :)