* External syntax highlghter CSS @ 2020-08-29 12:58 arnold...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [not found] ` <472847d1-1058-4f1f-a13e-b1464c6f6065n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: arnold...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2020-08-29 12:58 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 778 bytes --] Hey folks! Can someone elaborate on why syntax highlighter CSS is embedded into html markup for EPUB files (as opposed to the default epub.css which is linked)? I want to customize the syntax highlighter CSS a bit (not just colors). What are the downsides of specifying -V highlighting-css="" and appending the customized syntax CSS to default epub.css instead? -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/472847d1-1058-4f1f-a13e-b1464c6f6065n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 1201 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <472847d1-1058-4f1f-a13e-b1464c6f6065n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: External syntax highlghter CSS [not found] ` <472847d1-1058-4f1f-a13e-b1464c6f6065n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2020-08-30 1:20 ` John MacFarlane [not found] ` <m2o8mtx72n.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: John MacFarlane @ 2020-08-30 1:20 UTC (permalink / raw) To: arnold...@gmail.com, pandoc-discuss You can do that, of course, but if you want to customize, a more robust solution is to use --highlight-style with a JSON .theme file -- see manual under --highlight-style. Unlike fiddling with CSS, this will work for every output format that supports highlighting. "arnold...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <arnold.maxim-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > Hey folks! > > Can someone elaborate on why syntax highlighter CSS is embedded into html > markup for EPUB files (as opposed to the default epub.css which is linked)? > > I want to customize the syntax highlighter CSS a bit (not just colors). > What are the downsides of specifying -V highlighting-css="" and appending > the customized syntax CSS to default epub.css instead? > > -- > You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/472847d1-1058-4f1f-a13e-b1464c6f6065n%40googlegroups.com. ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <m2o8mtx72n.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>]
* Re: External syntax highlghter CSS [not found] ` <m2o8mtx72n.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org> @ 2020-08-30 4:21 ` arnold...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [not found] ` <5ecceacc-2a83-4783-8014-435d0c2872d9n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: arnold...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2020-08-30 4:21 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 1713 bytes --] I already use --highlight-style, but unfortunately still need to do some CSS tweaks to improve the EPUB -> MOBI conversion result. Still, are there any reasons why syntax highlighter CSS is embedded into html markup for EPUB files? Isn't it simpler to link it instead of embedding into each chapter? Does it affect how highlighting styles are applied due to some non-obvious CSS precedence issues on some devices? Is it safe to append it at the end of epub.css, or it is better to prepend it to keep the existing order? On Sunday, August 30, 2020 at 8:21:05 AM UTC+7 John MacFarlane wrote: > > You can do that, of course, but if you want to customize, > a more robust solution is to use --highlight-style with a > JSON .theme file -- see manual under --highlight-style. > > Unlike fiddling with CSS, this will work for every output > format that supports highlighting. > > > > Hey folks! > > > > Can someone elaborate on why syntax highlighter CSS is embedded into > html > > markup for EPUB files (as opposed to the default epub.css which is > linked)? > > > > I want to customize the syntax highlighter CSS a bit (not just colors). > > What are the downsides of specifying -V highlighting-css="" and > appending > > the customized syntax CSS to default epub.css instead? > > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/5ecceacc-2a83-4783-8014-435d0c2872d9n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 2314 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <5ecceacc-2a83-4783-8014-435d0c2872d9n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: External syntax highlghter CSS [not found] ` <5ecceacc-2a83-4783-8014-435d0c2872d9n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2020-08-31 17:12 ` John MacFarlane 0 siblings, 0 replies; 4+ messages in thread From: John MacFarlane @ 2020-08-31 17:12 UTC (permalink / raw) To: arnold...@gmail.com, pandoc-discuss Pandoc's HTML writer actually keeps track of whether a page contains highlighted code, and it only inserts the highlighting-css into the HTML if it does. In an epub, this means that the highlighting CSS will only be included in chapters that actually have highlighted code. It probably would be better in EPUB just to add the highlighting CSS as a separate file. If you think that would have advantages, go ahead and submit a request on the issue tracker. I don't think it should matter much whether you put it at the beginning or the end, but of course it depends on what rules you have in your CSS. "arnold...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <arnold.maxim-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > I already use --highlight-style, but unfortunately still need to do some > CSS tweaks to improve the EPUB -> MOBI conversion result. > > Still, are there any reasons why syntax highlighter CSS is embedded into > html markup for EPUB files? Isn't it simpler to link it instead of > embedding into each chapter? Does it affect how highlighting styles are > applied due to some non-obvious CSS precedence issues on some devices? Is > it safe to append it at the end of epub.css, or it is better to prepend it > to keep the existing order? > > On Sunday, August 30, 2020 at 8:21:05 AM UTC+7 John MacFarlane wrote: > >> >> You can do that, of course, but if you want to customize, >> a more robust solution is to use --highlight-style with a >> JSON .theme file -- see manual under --highlight-style. >> >> Unlike fiddling with CSS, this will work for every output >> format that supports highlighting. >> >> >> > Hey folks! >> > >> > Can someone elaborate on why syntax highlighter CSS is embedded into >> html >> > markup for EPUB files (as opposed to the default epub.css which is >> linked)? >> > >> > I want to customize the syntax highlighter CSS a bit (not just colors). >> > What are the downsides of specifying -V highlighting-css="" and >> appending >> > the customized syntax CSS to default epub.css instead? >> >> > > -- > You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/5ecceacc-2a83-4783-8014-435d0c2872d9n%40googlegroups.com. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-08-31 17:12 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-08-29 12:58 External syntax highlghter CSS arnold...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [not found] ` <472847d1-1058-4f1f-a13e-b1464c6f6065n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2020-08-30 1:20 ` John MacFarlane [not found] ` <m2o8mtx72n.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org> 2020-08-30 4:21 ` arnold...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [not found] ` <5ecceacc-2a83-4783-8014-435d0c2872d9n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2020-08-31 17:12 ` John MacFarlane
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).