1

I am working on a longer document with different reliabilities of the sources. At first, I wanted to change the font color to indicate the different levels (red - low, yellow - medium, green - high confidence). Not surprisingly, this made the text colorful and less readable. A second idea was to change the background of the text, offering a bit more readability, but it is still more hindering than useful.

Now, I would like to add a fingerprint-like visualization/marking next to the text. The confidence of the text is given rather on a paragraph than a sentence level, hence, little inaccuracies are not an issue.

Please consider this very professional sketch of how I would imagine it: enter image description here

Since my LaTeX experience with anything other than "standard texts" is quite low, I am not even sure how to begin with trying something like this. Especially when I need to somehow "sync" between both parts. My first idea here was to use minipages, but then I had no idea how to indicate up to which height the "red part" should go. Right now, the document has 50 pages and I expect it to double its number of pages until I am finished and about 90% of them will need such a marking. Therefore, a method that does not require any kind of pixel values or much manual correction would be great.

I am very open to other useful ideas of how to indicate "levels" of the text passages visually, without hindering readability. Just now, I had the idea that it may be easier to color the first (few pixels?) part of each line with the "current" color, which may be easier.

Thanks a lot for your ideas and help,

Raubwurst

PS: If useful/needed: I am mainly working with overleaf

Update: After using the great solution by Sandy G., I have an issue with footnotes. They appear on the end of the enclosed text block, but no longer on the footer of the page. I use the (standard) \footnote{} enter image description here

2 Answers2

3

Here is a possibility using tcolorbox.

enter image description here

\documentclass{article}

\usepackage{tcolorbox} \usepackage{lipsum}

\tcbuselibrary{skins, breakable}

\newtcolorbox{fprint}[1]{% blankest, breakable, before upper={\parindent15pt}, beforeafter skip balanced=0.2\baselineskip plus 2pt, borderline west={8mm}{-20mm}{#1} }

\begin{document}

\lipsum[2]

\begin{fprint}{red} \lipsum[3] \end{fprint}

\begin{fprint}{yellow} \lipsum[4] \end{fprint}

\begin{fprint}{green} \lipsum[5] \end{fprint}

\lipsum[6]

\end{document}

Sandy G
  • 42,558
1

Here's a simple example using \marginpar:

enter image description here

\documentclass[10pt,a4paper]{article}
\usepackage{lipsum}
\usepackage{fourier}

\begin{document} \marginpar{\warning}\lipsum[1-2]

For some embedding \dots \marginpar{\leafNE\leafNE\leafNE}\lipsum[4] \end{document}

MS-SPO
  • 11,519