I usually type up my notes for school in LaTeX, and I find it easier to focus on text where the color changes between paragraphs, which is easy to do with old fashioned pen and paper.
On LaTeX, however, is there a way where the compiler can automatically do this while rendering my pdf changing the color of random paragraphs?
Best Answer
You need no external package (except for
xcolor
) if you use pdfTeX or LuaTeX (not XeTeX) as engine.The primitive
\pdfuniformdeviate
must be followed by an integer and expands to a uniformly distributed random integer between 0 (included) and the given number (excluded).Using
everyhook
is safer than playing directly with\everypar
.