1. Choose any preparation method. When finished, select the location where the directory needs to be generated, switch to the References tab, and then click the "Automatic Directory 1" option in the Directory group.
2. When you return to the document, you can see that the directory has been generated, and the effect is as follows.
Note: Although there are level restrictions in the preparation steps, the first method will not change the attributes of the text, including color and font size, before setting the level, while the second method is just the opposite.