I’m producing syntax-highlighted LaTeX via fancyvrb. It all works well – unless styles cross lines. I have a workaround but the output would be more concise if there were a LaTeX command for underlining across multiple paragraphs:

  • Package soul didn’t work and was generally brittle for me (especially when I mixed styles, added colors, etc.).
  • The closest I got was the code shown below. Alas, paragraph 1 & 2 are displayed in a single line. The italics in P3 and P4 works as desired.
  • I’m using Tectonic (=XeLaTeX).

    Paragraph 1

    paragraph 2
    Paragraph 3

    Paragraph 4


You must log in to answer this question.

Browse other questions tagged .