Closed Earthwater closed 8 months ago
请尝试xeCJKfntef
包。
请尝试
xeCJKfntef
包。
请教一下大佬,我试了一下但是LLM提示xeCJKfntef
包下能够给文字添加背景色的是\colorbox命令,但是这个命令并不支持文字换行,会使得加了背景色的文字直接超出页面宽度,相应这个包下其他命令也搜索了一下,但是没有找到合适的,不知道大佬是否方便分享一下
\colorbox不支持换行的效果如下:
请去看官方手册,Ctrl+F CJKsout
。
感谢大佬!已解决!
解决方案:
\usepackage{xeCJKfntef} %引入该包
\CJKsout*[thickness=2.5ex, format=\color{yellow}]{你要高亮背景的文字} % 颜色可以自定
本身出于的目的是想使用soul包的\hl命令,来实现对段落内特定文字的凸显。
使用的模板就是overleaf默认模板,但是提示package soul error: construction failed
网上搜到的一些原因暂时未能解决,平替的方案尝试了\colorbox但是不支持自动换行,\tcolorbox等是画了个框加背景色然后文字放入其中的效果,并不是原本的需求,麻烦大佬帮忙瞅瞅,万分感谢!