Skip to content

Typesetting material injected via "start" or "finish" parts of etoc line style are directly under <TOC> struct, not <TOCI> and then \emph in particular causes problem #25

@jfbu

Description

@jfbu
\DocumentMetadata{
 uncompress,
 pdfversion=1.7,
 lang=en-US,
 testphase=phase-III
}
\documentclass{article}
\usepackage{etoc}

\begin{document}
    
\etocsetlinestyle{section}
  {This is not in a TOCI}
  {}
  {}
  {this neither thus \emph{CAUSES A PROBLEM}}

\tableofcontents

\section{One}

\section{Two}

\section{Three}

\section{Four}

\end{document}

raises on second compilation

Package tagpdf Warning: Parent-Child 'TOC/' --> 'Em/pdf2'.
(tagpdf)                Relation is not allowed (struct 6, /TOC --> struct 15)
(tagpdf)                on line 19

Very tempting to add a wont-fix. On the other hand it may be occasion to use the existing etoc internal stack of begins and ens to completely change current tagging strategy and invoke the contentsline upstream hooks from these begins and ends (starts and finishes) parts rather than from where they are currently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    at-2024-01-122024-01-12 has the issuetaggingRelative to support of the `LaTeX tagged PDF` project

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions