Не удается найти способ задать стиль абзаца в оглавлении с помощью Phpword.
Я пытался поместить оглавление в textRun, но не работает.
$this->phpWord->getSettings()->setUpdateFields(true);
$section = $this->phpWord->addSection($this->defaultSectionStyle);
$section->addText("目 录", array_merge($this->defaultFontStyle, [
"size" => 16,
"bold" => true,
]), array_merge($this->defaultParagraphStyle, $this->defaultParagraphSpacingStyle, [
"alignment" => Jc::CENTER,
"indentation" => null,
]));
$section->addTOC($this->defaultFontStyle, [
"tabLeader" => TOC::TAB_LEADER_DOT,
"indent" => Converter::pt2twip(12*4),
]);
Я хочу знатькак установить параграф графа spaceBefore или spaceAfter в TOC.