I am creating a hidden text function in my template.Hide text by setting its color to match the background color.
#let theme_style = state("theme", "abyss")
#let hidden-text(
body
) = {
text(fill: themes(theme: theme_style.at("theme"), setting: "background-color"))[#body] // 使用背景色填充文本 / Fill text with background color
}
The background color is set by defining a theme in the main function and retrieving the corresponding color.
#let twlight-book(
// ...
theme: "abyss"
// ...
) = {
// 全局化主题设置 / Globalize theme settings
theme_style = theme
}
However, the following error occurred: text is not locatable