vincentdoerig/latex-css

source code block too long

ZhangYet opened this issue · 5 comments

When using latex.css to generate html from my org-mode note, the source code sometimes will be too long and out of

 area as below:
example

I tried to solved this problem in this way: #27

I wonder if you had a better way.

This should not be happening I think, because the <pre> element is set to overflow when the content is too big. This means that the element should be scrollable when the content exceeds its width. Could you maybe provide the code that caused the issue as well as your browser/OS? Cheers!

Here is the html source code: https://gist.github.com/ZhangYet/13da5cd6041108cb2a95c04c5e680548

I tried it in Google Chrome 81.0.4044.129 and Safari 13.1.1 (14609.2.9.1.3).

My OS is Mac OS 10.14.6.

Thx.

I found the issue. org (probably) is adding this rule pre.src { position: relative; overflow: visible; padding-top: 1.2em; } here to <pre> which disables the x-overflow. You can fix it by overwriting latex.css using pre { overflow: auto !important; }.

It works! thx!