Adding a contour
When text is printed over a background, it is much more with a contour present to overprint the background. This contour may be white. This way, there would be a nice clearance around the text.
Another utilization would be to improve the visibility of text with very light colors for better reading on a white background.
Let’s see how to achieve that.
How to do it...
Our example will use the color yellow for chapter headings in a book. This is hardly readable, so we will add a black contour to improve the readability:
- We will use the scrbook class, which supports chapter headings, so start your document with the following:
\documentclass{scrbook}
- Load the contour package. Use the outline option to print a real outline; otherwise, copies of the original text will be used to create a contour. Specify the thickness of the contour as a length, as follows:
\usepackage[outline]{contour} \contourlength{1.5pt}
- Define a macro for the new chapter...