-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
line numbers are not shown in revealjs format - CSS issue #7634
Comments
Probably the best place for this is in the default reveal.js template:
|
Just a warning here - we just saw that, if this solve the issue for simple code block, this will prevent scrolling in revealjs slide when code block have more lines.
I am just not sure yet if both are compatible considering how the line numbers are set with Pandoc highlighter. I'll play with the CSS. |
best solution we add was to moved the numbers for line inside the pre block This requires .reveal pre.numberSource code>span {
left: -2em;
} instead of the default pre.numberSource code>span {
left: -4em;
} introduced by skylighting Maybe this is better for revealjs output. |
Not sure which is better. Aesthetically I prefer the numbers to be outside of the pre, where it's obvious they're not part of the code. On the other hand losing scroll will be an issue for some people. The css used by skylighting could use an overhaul: |
Yes I agree. This is some CSS tweaks to come with. We may try improve that - I'll share the result we may come with. Hopefully someone will see your call in jgm/skylighting#104 (comment) |
Example:
If you create a reveal presentation using
pandoc -t revealjs -s -o reveal.html test.md
, the resulting HTML source will have correctly the<a>
tags with number line but there are not shown in the browser.I believe there is a CSS issue / conflict betwenn the one of Pandoc (skylighting?) and RevealJS.
I think this is similar to #6625 and
is necessary for numberLines to work.
However, in reveal format, it will be overwritten by revealjs CSS rules. Especially
which has a higher precedence
I think there should be a specific rule for reveal format
I don't know if it should be in Pandoc or in skylighting (which I think introduce the css)
Locally, inserted this rules, fix the issue.

The text was updated successfully, but these errors were encountered: