Typesetting an algorithm
An algorithm constitutes a fundamental concept within computer science. It represents a systematic set of step-by-step operations executed to accomplish specific tasks, such as calculations or data processing, e.g., sorting.
Algorithms can be visualized using a flow chart, which we made in Chapter 6, Creating Graphics. In this recipe, we will print an algorithm using pseudocode with syntax highlighting. Our example will show the calculations that display the Mandelbrot set, a visually stunning classic fractal generated by computations involving complex numbers.
How to do it...
We will utilize the algorithmicx package written by Szász János. We will break down the process into several small steps for more transparent comprehension. As usual, the complete code is available for download from https://latex-cookbook.net, eliminating the need for manual typing. At the end, you will see an image with the output. Consider switching between the output...