Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As discussed in #11698, for PDF output, nested fenced code blocks no longer allow for page break and you can create color leakage. As this is an inherent problem with the LaTeX treatment of floating environments and the
tcolorbox
package (currently) used to create the background color for fenced code blocks in PDF documents a workaround is included.The variable
code-block-bg
can be set to a HTML color tag or to a boolean. The booleanfalse
has no particular effect as this will create no background color. Therefore, I selected this variable to explicitly deactivate thetcolorbox
when set to false. The potential conflict withcode-block-border-left
is avoided by only applying the behavior ifcode-block-border-left
isfalse
or not set. Line numbers an annotations can be combined without any problems.I included the example from the #11698 as a test as well but from my point of view this is not extremely helpful. I would need to test the resulting
tex
file for certain content and I could not find out how this is done. If you can hint me in the right direction I'm happy to extend this.Note on implementation
This could also be implemented as a
elseif
but from my point of view it is cleaner this way, happy to change if you think differently.I tried to argue why I reused a variable instead of creating a new variable but if this multi use is not wanted I can change it to a specific variable.
Miscellaneous
I also found two typos on the way. If I should create a separate PR from them please let me know.
Checklist
I have (if applicable):
.callout
environments #11698