1. Set the title style of all titles that need to enter the directory: Select the title, Start-Style-Title X, where X is the title level;
2. Generate Directory: position the cursor at the directory insertion point, and reference-Directory-Directory-Insert Directory.