I have been using LaTeX Overleaf (overleaf.com) for nearly one year now. I need to highlight some things, so I used the xcolor package. But then, my text became a bit weirdly formatted, so I had to use \\ numerous times. Is there also a way to make the text block have both sides being straight? Thank you for helping! The code is below:
\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.}\\
\colorboxalone doesn't work well if you want wrapping. – frabjous May 09 '22 at 17:01tcolorbox? E.g. https://tex.stackexchange.com/a/505718/133968 – Zxcvasdf May 10 '22 at 05:01