Thanks for looking into it! It might be hard-coded, I don't see any reference to `.sourceCode` here: https://github.com/jgm/pandoc/blob/master/data/epub.css On Thu, 17 Oct 2019 at 11:04, BPJ wrote: > I'll have to look into the default epub template. Probably Pandoc's > default rule is hard-coded in such a way that it overrides the CSS you add > with `--css`. Possibly you will have to use a custom template. > > Meanwhile try changing ` white-space: pre-wrap;` into ` white-space: > pre-wrap !important;` > > Den tors 17 okt. 2019 17:19Gabriel Volpe skrev: > >> Thank you very much, that worked! >> >> Now I need to figure out how to override it directly in the CSS before >> generating the EPUB with Pandoc :D >> >> I have this in my custom CSS that I pass to Pandoc as an argument of --css >> >> code.sourceCode { >> white-space: pre-wrap; >> position: relative; >> } >> >> But the generated EPUB doesn't seem to pick it up, any ideas? >> >> On Thu, 17 Oct 2019 at 10:04, BPJ wrote: >> >>> I'm not at a computer at the moment but I think that if you change `pre` >>> into `pre-wrap` on line 13 you will be good. >>> >>> Den tors 17 okt. 2019 14:41Gabriel Volpe skrev: >>> >>>> It seems to be caused by the CSS supplied by Pandoc. >>>> >>>> I found this SO Thread >>>> >>>> about it but none of the suggested solutions worked for me. >>>> >>>> Here's one single small HTML page taken from the Pandoc generated EPUB >>>> file that has the relevant `sourceCode` CSS. >>>> >>>> https://pastebin.com/DPczzLar >>>> >>>> Thanks for helping! >>>> Gabriel. >>>> >>>> On Thu, 17 Oct 2019 at 03:19, BPJ wrote: >>>> >>>>> Do you think it is caused by some CSS which is supplied by Pandoc or >>>>> do you add any CSS of your own? If the latter would you mind sending the >>>>> CSS so we can have a look at it? (Off list is OK but be warned that my CSS >>>>> knowledge is a bit stale. It is probably nothing complicated though.) >>>>> >>>>> Den tors 17 okt. 2019 03:17Gabriel Volpe >>>>> skrev: >>>>> >>>>>> It is definitely CSS related but I'm just really dumb when it comes >>>>>> to manipulate CSS, would appreciate any help. >>>>>> >>>>>> On Wed, Oct 16, 2019, 18:25 Gabriel Volpe >>>>>> wrote: >>>>>> >>>>>>> I have converted the Pandoc generated EPUB to EPUB once again using >>>>>>> Calibre and it renders properly. When I resize the screen there's no >>>>>>> scrollbar. >>>>>>> >>>>>>> On Wed, 16 Oct 2019 at 18:20, Gabriel Volpe >>>>>>> wrote: >>>>>>> >>>>>>>> It might be. I'm not really sure, to be honest. >>>>>>>> >>>>>>>> On Wed, 16 Oct 2019 at 18:18, BPJ wrote: >>>>>>>> >>>>>>>>> Isn't that an issue with the way your epub reader displays things >>>>>>>>> rather than with Pandoc? >>>>>>>>> >>>>>>>>> Den ons 16 okt. 2019 23:41Gabriel Volpe >>>>>>>>> skrev: >>>>>>>>> >>>>>>>>>> Hi, is there any way to avoid having horizontal scrollbars in >>>>>>>>>> code highlightings? I would prefer the text to be rendered in different >>>>>>>>>> lines instead like MOBI does it. >>>>>>>>>> >>>>>>>>>> [image: scrollbar.png] >>>>>>>>>> >>>>>>>>>> I couldn't find anything related information in Pandoc's manual. >>>>>>>>>> While searching on Google, I stumbled upon this blog post >>>>>>>>>> >>>>>>>>>> which advices to convert first to HTML and then use Calibre to convert to >>>>>>>>>> EPUB but I've tried it and I didn't like it. >>>>>>>>>> >>>>>>>>>> Thanks, >>>>>>>>>> Gabriel. >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> 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/93a42423-c2c0-4350-b59c-42722cc2dd2e%40googlegroups.com >>>>>>>>>> >>>>>>>>>> . >>>>>>>>>> >>>>>>>>> -- >>>>>>>>> You received this message because you are subscribed to a topic in >>>>>>>>> the Google Groups "pandoc-discuss" group. >>>>>>>>> To unsubscribe from this topic, visit >>>>>>>>> https://groups.google.com/d/topic/pandoc-discuss/LSJ4WHOki-k/unsubscribe >>>>>>>>> . >>>>>>>>> To unsubscribe from this group and all its topics, 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/CADAJKhDTGLozWoY3KnJNEQ%3DQFSrsRt07JoKHprf-hm6rehCzpQ%40mail.gmail.com >>>>>>>>> >>>>>>>>> . >>>>>>>>> >>>>>>>> -- >>>>>> 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/CAJReL34Kv%2Bhj8yZeajmGLoLdXonSYs0jtx8RRAU3x98wXucYwA%40mail.gmail.com >>>>>> >>>>>> . >>>>>> >>>>> -- >>>>> You received this message because you are subscribed to a topic in the >>>>> Google Groups "pandoc-discuss" group. >>>>> To unsubscribe from this topic, visit >>>>> https://groups.google.com/d/topic/pandoc-discuss/LSJ4WHOki-k/unsubscribe >>>>> . >>>>> To unsubscribe from this group and all its topics, 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/CADAJKhBz_QZwY%3DtADQLVm_HdUSicEo8g10BPHu2esVKi7Fb7AQ%40mail.gmail.com >>>>> >>>>> . >>>>> >>>> -- >>>> 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/CAJReL34fkofrhE2xys-z%3DLS1NGOg65zO7ydpvOeq7qeqd-BquA%40mail.gmail.com >>>> >>>> . >>>> >>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "pandoc-discuss" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/pandoc-discuss/LSJ4WHOki-k/unsubscribe >>> . >>> To unsubscribe from this group and all its topics, 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/CADAJKhBLfROtLxFbqQMAHeTTNNf972XVY%2BUKiPcBR8HW7KiiLA%40mail.gmail.com >>> >>> . >>> >> -- >> 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/CAJReL34K8E9UuBg5iQJhDRhev__S0LFwFBi5LTdd5j231JRiWw%40mail.gmail.com >> >> . >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "pandoc-discuss" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/pandoc-discuss/LSJ4WHOki-k/unsubscribe. > To unsubscribe from this group and all its topics, 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/CADAJKhAf9_yqjT6ayEDpz7UEB_tmXLRUSoK6WiEYPUDgcEG9ww%40mail.gmail.com > > . > -- 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/CAJReL37QpX0Shh6rbu7huDEucOGvB%3DHQSbfdeJaKW1981FCRrQ%40mail.gmail.com.