[texhax] tabularx and titletoc/titlesec: harmful interaction?

Donald Arseneau asnd at triumf.ca
Thu Jul 19 22:25:40 CEST 2012


Susan Dittmar <Susan.Dittmar at gmx.de> writes:

> All this works fine with ordinary text. But as soon as I add a tabularx
> inside such a section, the depth tracking breaks down! Even though the
> enclosing section reaches its end, and a new section on the same level as
> the one containing the tabularx is started, this new section appears to be
> a subsection of the one containing the tabularx!
> 
> I have the impression that using tabularx somehow changes the local change
> of the counter mysecdepth into a global change. Is that the case? How can I
> countermand this automatically?

LaTeX counters are meant to be global always, so commands/packages
that manipulate counters may go wrong if you increment them locally.
For example \include with \includeonly manages counter values, and 
also tabularx does (tabularx needs to restore counters to original
settings after each test-formatting used to measure column widths).



Donald Arseneau                          asnd at triumf.ca


More information about the texhax mailing list