如何使用 tikzmark 包自定义高度突出显示?

如何使用 tikzmark 包自定义高度突出显示?

如何使用 tikzmark 包自定义突出显示的高度? 在此处输入图片描述

在文档的第 17-18 页中,您可以看到解释(在此消息的下部)https://ctan.javinator9889.com/graphics/pgf/contrib/tikzmark/tikzmark.pdf 但无法改变突出显示的高度(偏移,...)

\documentclass{article}
\usepackage{graphicx}
\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]
 And this was very odd because it was the middle of the night.
 \StopHighlighting
\StartHighlighting[fill=cyan!20]
 And this was very odd because it was the middle of the night.
\StopHighlighting

The moon was up there sulkily because she thought the sun had no
business to be there after the day was done.
\StartHighlighting[fill=magenta!50]
‘‘It’s very rude of him,’’ she said, ‘‘to come and spoil the fun.’’
\StopHighlighting

\end{document}

该问题在 Alan Munn 的第一个评论中得到了解决。

在此处输入图片描述

相关内容