How to get syntax highlighter's CSS ?

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

How to get syntax highlighter's CSS ?

mecanix
Hello,

Currenlty I use asciidoctor with option -s to suppress output of header and footer because I insert the result of asciidoctor in my own layout.

But, if I use a syntax highlighter (-a source-highlighter=pygments) with option -s, no CSS is ouputted, even with -a linkcss.

So, is there any way to get the highlighter's stylesheet with option -s ?
Thanks in advance,

Regards,
Victor
Reply | Threaded
Open this post in threaded view
|

Re: How to get syntax highlighter's CSS ?

asotobu
I am not sure that currently this is possible, because I think that if you suppress the headers, then the included scripts are also skipped. As a workaround I suggest you add them manually, and open an issue explaining this problem.
Reply | Threaded
Open this post in threaded view
|

Re: How to get syntax highlighter's CSS ?

mecanix
For now I will manually copy-paste the CSS but I don't like that :/
Where can I open this issue (github) ?

Thanks for you answer !
Reply | Threaded
Open this post in threaded view
|

Re: How to get syntax highlighter's CSS ?

asotobu
Yes on github 

El dissabte 4 de gener de 2014, mecanix [via Asciidoctor :: Discussion] ha escrit:
For now I will manually copy-paste the CSS but I don't like that :/
Where can I open this issue (github) ?

Thanks for you answer !


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/How-to-get-syntax-highlighter-s-CSS-tp1247p1249.html
To unsubscribe from How to get syntax highlighter's CSS ?, click here.
NAML


--
Enviat amb Gmail Mobile
Reply | Threaded
Open this post in threaded view
|

Re: How to get syntax highlighter's CSS ?

ch007m
In reply to this post by mecanix
I confirm that if you select the option '-s', then the header (including css/js scripts) is removed.
Until now, the only option that we suggest you is to change the asciidoctor backend (https://github.com/asciidoctor/asciidoctor-backends). You can fork the project, change it and select it during the rendering :

asciidoctor -T ../asciidoctor-backends/haml/... -b HTML5
... = html5 or name of your backend

Depending which template language you prefer to use you can select slim (http://slim-lang.com/), haml (http://haml.info/) or erb (http://www.ruby-doc.org/stdlib-2.1.0/libdoc/erb/rdoc/ERB.html).
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard
Reply | Threaded
Open this post in threaded view
|

Re: How to get syntax highlighter's CSS ?

asotobu
Really good point!!! Anyway I think it would be a good idea to wait until Dan shows his view about -s option

El diumenge 5 de gener de 2014, ch007m [via Asciidoctor :: Discussion] ha escrit:
I confirm that if you select the option '-s', then the header (including css/js scripts) is removed.
Until now, the only option that we suggest you is to change the asciidoctor backend (https://github.com/asciidoctor/asciidoctor-backends). You can fork the project, change it and select it during the rendering :

asciidoctor -T ../asciidoctor-backends/haml/... -b HTML5
... = html5 or name of your backend

Depending which template language you prefer to use you can select slim (http://slim-lang.com/), haml (http://haml.info/) or erb (http://www.ruby-doc.org/stdlib-2.1.0/libdoc/erb/rdoc/ERB.html).


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/How-to-get-syntax-highlighter-s-CSS-tp1247p1252.html
To unsubscribe from How to get syntax highlighter's CSS ?, click here.
NAML


--
Enviat amb Gmail Mobile
Reply | Threaded
Open this post in threaded view
|

Re: How to get syntax highlighter's CSS ?

mecanix
In reply to this post by ch007m
I do not know enough these languages to fork your backends :)

But is it possible to talk about an option/value to force to output CSS (and JS?) when -s is selected with source hightlighter ?
Reply | Threaded
Open this post in threaded view
|

Re: How to get syntax highlighter's CSS ?

ch007m
In this case, we need a new option to use your own CSS/JS javascript file but with the header/footer generated by asciidoctor.

What I suggest for the moment if you are not familiar with haml/slim/erb is that you have a look to the ascidoctor-stylesheet-factory which let's you to extend asciidoctor css/js and add what you would like to do : http://asciidoctor.org/docs/user-manual/#stylesheet-factory. You can create a new stylesheet, compile it using sass and use the css file created : asciidoctor -a stylesheet=colony.css -a stylesdir=../stylesheets sample.adoc


On Sun, Jan 5, 2014 at 6:53 PM, mecanix [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I do not know enough these languages to fork your backends :)

But is it possible to talk about an option/value to force to output CSS (and JS?) when -s is selected with source hightlighter ?


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/How-to-get-syntax-highlighter-s-CSS-tp1247p1256.html
To unsubscribe from How to get syntax highlighter's CSS ?, click here.
NAML



--
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard
Reply | Threaded
Open this post in threaded view
|

Re: How to get syntax highlighter's CSS ?

asotobu
Yes well I think that this should be discussedcwith Dan too, anyway take a look to one backend you will see it is do intuitive and you only have to override the things to be change them but not all elements

El diumenge 5 de gener de 2014, ch007m [via Asciidoctor :: Discussion] ha escrit:
In this case, we need a new option to use your own CSS/JS javascript file but with the header/footer generated by asciidoctor.

What I suggest for the moment if you are not familiar with haml/slim/erb is that you have a look to the ascidoctor-stylesheet-factory which let's you to extend asciidoctor css/js and add what you would like to do : http://asciidoctor.org/docs/user-manual/#stylesheet-factory. You can create a new stylesheet, compile it using sass and use the css file created : asciidoctor -a stylesheet=colony.css -a stylesdir=../stylesheets sample.adoc


On Sun, Jan 5, 2014 at 6:53 PM, mecanix [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I do not know enough these languages to fork your backends :)

But is it possible to talk about an option/value to force to output CSS (and JS?) when -s is selected with source hightlighter ?


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/How-to-get-syntax-highlighter-s-CSS-tp1247p1256.html
To unsubscribe from How to get syntax highlighter's CSS ?, click here.
NAML



--
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/How-to-get-syntax-highlighter-s-CSS-tp1247p1257.html
To unsubscribe from How to get syntax highlighter's CSS ?, click here.
NAML


--
Enviat amb Gmail Mobile