admin管理员组文章数量:1315822
I am using the LateXSwiftUI package. I want to set the background color of part of the text. However, using \colorbox
does not seem to set the background to the desired color of red, resulting in a black box being put over "Hello." I have tried other colors, RGB colors, and hex colors, none of which have helped.
Code:
LaTeX("\\colorbox{red}{Hello}, World!")
.parsingMode(.all)
I am using the LateXSwiftUI package. I want to set the background color of part of the text. However, using \colorbox
does not seem to set the background to the desired color of red, resulting in a black box being put over "Hello." I have tried other colors, RGB colors, and hex colors, none of which have helped.
Code:
LaTeX("\\colorbox{red}{Hello}, World!")
.parsingMode(.all)
Share
Improve this question
asked Jan 30 at 6:07
Churro the DuckChurro the Duck
1511 silver badge10 bronze badges
1 Answer
Reset to default 0try this:
LaTeX("\\colorbox{red}{Hello}, World!")
.imageRenderingMode(.original) // <--- here
.parsingMode(.all)
本文标签: swiftHow can I set background color of text with LaTeXSwiftUIStack Overflow
版权声明:本文标题:swift - How can I set background color of text with LaTeXSwiftUI? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741982861a2408501.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论