0
phpwordで脚注を作成した文書に挿入しようとしています。 この仮定:phpwordで脚注を挿入
$phpWord = new \PhpOffice\PhpWord\PhpWord();
$content= "Line\r\nAnother Line\r\nYet another [and my footnote] line\r\nfinal line";
$section = $phpWord->addSection();
$textlines = preg_split("/(\r\n|\r|\n)/", $content);
foreach($textlines as $line) {
$section->addText(htmlspecialchars($line));
}
をそして今、私は、括弧内のテキストは「[]」脚注として挿入したいと思います。私はどのようにこれを処理するか考えていない。おそらくあなたはここでそれを理解しているでしょう: http://phpword.readthedocs.org/en/latest/elements.html#footnotes-endnotes