Skip to content

highlighting keys don't work as expected #16

@amunn

Description

@amunn

Hi Andrew, this issue is based on this Stackexchange question.

It seems there are two problems, at least as I understand the documentation: first, the highlighting keys seem to require the highlighter/ prefix rather than just being specified by name alone. Second, the scope of setting the keys in this way is global, so keys set in one \Start ... \StopHighligting domain persist into the the next one.

\documentclass{article}
\usepackage[x11names,dvipsnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\usetikzmarklibrary{highlighting}

\begin{document}

The sun was shining on the sea, shining with all its might.
\StartHighlighting[
fill=cyan!50,
highlighter/initial height=.5ex,
%initial height=1ex, % fails
highlighter/final height=.5ex,
% final height=1ex % fails
]
 And this was very odd because it was the middle of the night.
 \StopHighlighting
 
\bigskip
\StartHighlighting[fill=cyan!20] % keys are not local as a result
 And this was very odd because it was the middle of the night.
\StopHighlighting
\end{document}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions