-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
To improve the usability of the feature suggested in #8 , I am re-thinking the options and the beneath logic of the general highlight feature. The re-designed options
- use option
highlight-linesto choose which highlight mode is used - use option
highlight-line-numbersto toggle whether highlight the line number part - use three color options to specify corresponding colors, and these color options all have default values
This is only a design- and pseudo-level discussion, therefore the actual package code in my forked repo is not modified yet.
Original
Options
- highlight-lines = <empty> | <selected lines>
- default value <empty>
- highlight-color = <color>
- default value `LightCyan`Logic
if (hightlight-lines is <empty>) then
normal
else
highlight <selected lines> in <color>
fiFinal
Options
(Modified)
- highlight-lines = <empty> | <selected lines> | <alternate>
- default value <empty>
- highlight-color = <line color> | {<line color>, <line number color>}
- default value `{LightCyan, LightYellow}`
(Added)
- highlight-line-numbers = <boolean value>
- default value `false`
- highlight-odd-line-color = <odd line color>
| {<odd line color>, <odd line number color>}
- default value `{LightCyan, LightYellow}`
- highlight-even-line-color = <even line color>
| {<even line color>, <even line number color>}
- default value `{LightCyan!60, LightYellow!60}`Logic
if (highlight-lines is <empty>) then
normal
else if (highlight-lines is <selected lines>) then
if (line-number is typeset && highlight-line-numbers is `true`) then
highlight <selected lines> in <line color>,
with line numbers in <line-number-color>
else
highlight line of <selected lines> in <line color>
fi
else // (highlight-lines is <alternate>)
if (line-number is typeset && highlight-line-numbers is `true`) then
highlight odd lines in <odd-line-color>, even lines in <even-line-color>,
with line numbers in corresponding colors
else
highlight odd lines in <odd-line-color>, even lines in <even-line-color>
fi
fiNotes
- To keep names of options clear, inter-word dashes are used.
- By some searching, I think the phrase
alternate rowsis more popular thanzebra effect, the following one is used in issue minted/#211. - We still need option
linenumbersep, but its function is off-topic to this issue, so it's absent in the current issue.
Metadata
Metadata
Assignees
Labels
No labels