彩色框文本格式

彩色框文本格式

我使用 LaTeX Overleaf (overleaf.com) 已经快一年了。我需要突出显示一些内容,所以我使用了该xcolor软件包。但是后来,我的文本格式变得有点奇怪,所以我不得不\\多次使用。还有没有办法让文本块的两边都是直的?谢谢你的帮助!代码如下:

\colorbox{yellow}{Setting in the opening chapters of ``Skellig" is representative of a dark and suspenseful atmosphere.} \colorbox{ForestGreen}{David Almond} \colorbox{ForestGreen}{has established this through utilising the effects of different types of imagery to appeal to the sense of the reader.}\\
\colorbox{red}{This is demonstrated in the line ``The place stank of rot and dust."} \colorbox{ForestGreen}{Here, Almond has used olfactory imagery to} \colorbox{ForestGreen}{encourage an authentic setting that the reader can empathise with. This has helped to create a dark and suspenseful} \colorbox{ForestGreen}{atmosphere.} \colorbox{red}{Another example of this is seen in the sentence ``There were old chests of drawers and broken}\\ \colorbox{red}{wash-basins and bags of cement,} \colorbox{red}{ancient doors leaning against the walls, deck chairs with the cloth seats rotted away."} \colorbox{ForestGreen}{Here, Almond has used visual imagery to stimulate the reader's visual senses. This contributes to the dark and}\\ \colorbox{ForestGreen}{suspenseful atmosphere by giving the reader an idea of the ancient garage.} \colorbox{RoyalBlue}{David Almond has successfully}\\ \colorbox{RoyalBlue}{created a dark and suspenseful atmosphere by using different types of imagery in the opening chapters.}\\

相关内容