-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
The purpose of this feature is to let odd- and even lines have different highlight colors. I have committed a demo implementation to my forked repo. Only sty file is changed in that commit.
Some Explanations
- Now
highlightcolorcan be used ashighlightcolor = SingleColor | {<OddLineColor>, <EvenLineColor>}. - New option
highlightlinenumbercolorchanges the highlight color of line number, and this option can be used the same ashighlightcolor. - Since calculating the max width of actual line number (
\arabic{FancyVerbLine}) is hard, a new optionlinenumberwidth=<dimen>is defined. - If
breaklines=true, the total heigh of a line is not determined until\FV@SaveLineBox. Therefore\FV@LeftListNumber(with its background) is typeset after\FancyVerbFormatLine.
Shortcut:
\def\FV@LineNumberBackground{}is a compromise since\def\FV@LineNumberBackground\@emptyand\def\FV@LineNumberBackground\relaxboth raise error. I guess it is a problem of order of macro expanding.- The
\pickTwomacro may have nicer implementation.
I am not fully understood about packages fancyvrb and fvextra, so any suggestions are helpful. And, more test is needed of course.
Metadata
Metadata
Assignees
Labels
No labels