Word clouds

While a word cloud is a pretty picture made of words, it’s a tool that can visualize the importance of topics or keywords, or how often a word appears in a text. Bigger words indicate higher frequency. Word clouds can be used to enhance presentations or to get a rapid grasp of the main themes in a text. Colors, shapes, and sizes can be adjusted to make it look just right.

You can easily create one in LaTeX by using the wordcloud package developed by Maxime Chupin. Here, we do it with sans-serif text and rotated by 45 degrees, with selected words and weights:

\textsf{\wordcloud[scale=1,rotate=45,margin=0.5pt,usecolor]{(\textrm{\LaTeX},10);(graphics,6);
(fonts,7);(images,5);(tables,5);(bibliographies,2);(mathematics,3);(PDF,5);(headings,4);(paragraphs,3);
(diagrams,3);(commands,4);(packages,5);(classes,6);(hyphenation,2);(macros,6);(justification,2);
(footnotes,4);(cross-references,2);(spacing,3);(lines,4);(colors,5);(captions,5);(hyperlinks,3);
(chapters,5)}}

This gives us the following:

Simple word cloud

But let’s do this in real text. I chose the tutorial called “Formatting information” written by Peter Flynn with the file name “beginlatex.pdf”, converted it to text, and run the following command:

\wordcloudFile[usecolor]{beginlatex.txt}{80}

This generates a word cloud with 80 words:

Big word cloud

The full explanation is in LaTeX Cookbook, Chapter 7, Creating Beautiful Designs.