Function Repository Resource:

WordWeave

Source Notebook

Create an acrostic

Contributed by: Mark Greenberg

ResourceFunction["WordWeave"][wd,list]

gives an acrostic formed by a stack of strings from list centered on the vertical string wd.

Details and Options

The central word wd should be a string.
list should evaluate to a list of strings.
ResourceFunction["WordWeave"] can take the following options:
"Ordered"Falsewhen False, words are chosen randomly from list; when True, the first suitable word is taken
FontSize32size of the font for vertical and horizontal text
"WordColor"Blackcolor of the vertical word
"WeaveColor"Darker[Blue]color of the horizontal words
IgnoreCaseTruewhether horizontal characters can have different capitalization than the vertical word
"Centered"Falsewhether padding is added to keep the vertical word in one place
Changing FontFamily usually ruins the acrostic. If you must change it, use a true monospaced font.
ResourceFunction["WordWeave"] has no appropriateness filter. Using an unfiltered dictionary like WordList[] as list has some risk in a classroom setting. Choose the second argument wisely.

Examples

Basic Examples (1) 

Make a WordWeave acrostic:

In[1]:=
ResourceFunction["WordWeave"]["The Elements", CommonName[EntityList[EntityClass["Element", All]]]]
Out[1]=

Options (6) 

Set the "Ordered" option to true to control the selection of words:

In[2]:=
wordList = {"mathematician", "fractals", "France", "commodities", "self-similarity", "California", "Benoit", "recursion", "chaos", "geometry"};
ResourceFunction["WordWeave"]["Mandelbrot", wordList, "Ordered" -> True]
Out[3]=

Compare to the default:

In[4]:=
ResourceFunction["WordWeave"]["Mandelbrot", wordList]
Out[4]=

Change the font size:

In[5]:=
ResourceFunction["WordWeave"]["adverbs", WordList["Adverb"], FontSize -> 18]
Out[5]=

Change the color of the main vertical text:

In[6]:=
ResourceFunction["WordWeave"]["red", Synonyms["red"], "WordColor" -> Red]
Out[6]=

Change the color of the horizontal text:

In[7]:=
ResourceFunction["WordWeave"]["green", Synonyms["green"], "WeaveColor" -> Green]
Out[7]=

Setting the IgnoreCase option to False ensures vertical and horizontal capitalizations coincide:

In[8]:=
ResourceFunction["WordWeave"]["WOLFRAM LANGUAGE", CommonName[WolframLanguageData[]], IgnoreCase -> False]
Out[8]=

Set the "Centered" option to True to keep the vertical text a consistent distance from the left:

In[9]:=
wordList = Select[CommonName[CountryData[]], StringLength[#] < 20 &];
Column[{
  ResourceFunction["WordWeave"]["world ", wordList, "WeaveColor" -> Red, "Centered" -> True],
  ResourceFunction["WordWeave"]["peace", wordList, "WeaveColor" -> Blue, "Centered" -> True]}]
Out[9]=

Applications (2) 

Randomly generate ideas for character development in creative writing:

In[10]:=
ResourceFunction["WordWeave"]["character", WordList["Adjective"]]
Out[10]=

Sample for analysis of the words in a particular document:

In[11]:=
wordList = Select[TextWords[ExampleData[{"Text", "GettysburgAddress"}]], StringLength[#] > 6 &];
ResourceFunction["WordWeave"]["Gettysburg", wordList, "WeaveColor" -> Darker[Red]]
Out[11]=

Neat Examples (1) 

Animate a WordWeave:

In[12]:=
wordList = RandomSample[
   Select[CommonName[WolframLanguageData[]], StringLength[#] < 20 &]];
Dynamic[ResourceFunction["WordWeave"]["Wolfram", wordList, "Ordered" -> True, "WeaveColor" -> RGBColor["#EB7345"], IgnoreCase -> False, "Centered" -> True]]
Do[(
  Pause[1.8]; wordList = Rest[wordList]
  ), 12]
Out[12]=

Publisher

Mark Greenberg

Version History

  • 1.0.0 – 05 September 2019

License Information