Closed roberthechtletex closed 3 days ago
\ccaStructStart{P}…\ccaStructEnd{P}
create a group around its content. The same issue occurs, with and without a11y-Option, once you replace those macros with {
and }
, resp., so technically, it is no bug with CoCoTeX's accessibility features, per se:
(...)
\begin{document}
\begin{quote}
\ccaStructStart{P}Quote\ccaStructEnd{P}.
\end{quote}
{Der erster Absatz nach quote soll nicht eingerückt sein, daher setzt quote zum Ende “\texttt{\textbackslash{}tpListNoIndent}” und damit klappt das.}
{Folgende Absätze sollen eingerückt sein. Mit angeschaltener a11y-Option sind sie jedoch nicht eingerückt.}
\begin{border}
Ein Kasten „border“
\end{border}
{Der erster Absatz nach border soll nicht eingerückt sein, daher setzt border zum Ende “\texttt{\textbackslash{}@afterbox}” und damit klappt das.}
{Folgende Absätze sollen eingerückt sein. Mit angeschaltener a11y-Option sind sie jedoch nicht eingerückt.}
One workaround would be to use \ccaVstructStart{P}
and \ccaVstructEnd{P}
for paragraph tagging, which do not create a local group.
Hm, i gave it another night of thought; the low-level problem is that \@aftergroup
as well as \@doendpe
both change \everypar
to suppress the indent in subsequent paragraphs. Thing is that changes to \everypar
need to reset themselves within \everypar or the changes count for, well, every \par
.
Since \ccaStructStart
creates a \begingroup
and \ccaStructEnd
an \endgroup
, the resetting of \everypar
happens within this local semi-group and after the group, the "old" \everypar
(as set by \@aftergroup
and \@doendpe
) is restored.
Another workaround would be to reset \everypar
globally:
\def\cc@afterbox{%
\everypar{%
\if@nobreak
\@nobreakfalse
\clubpenalty \@M
\if@afterindent \else
{\setbox\z@\lastbox}%
- \everypar{}%
+ \global\everypar{}%
\fi
\else
\clubpenalty \@clubpenalty
{\setbox\z@\lastbox}%
- \everypar{}%
+ \global\everypar{}%
\fi}}
but this would need to be done everywhere where \everypar
is set.
I'll check if \ccaStructEnd
could be defined in such a way that it becomes transparent to \everypar
…
After talking to the ltpdfa maintainer, we stick with \ccaVstruct… for paragraph tagging.
The alternative would be to go into each and every macro that sets \everypar
and make them \global
, which could have unforseeable side-effects.
I'll close the issue.
Iff class-option
ally
is set, then some special use of one-time/local indent-suppression results in incorrect global indent-suppression.MWE: