It seems to me that examples in expex have no effect on the length of \linewidth, which is especially annoying if you want to put two things next to each other with a minipage, or you include a table.
I have already found out about the existence of zref-abspos, however, the values I get from this are also strange, and tabu doesn't seem to heed them anyway for some reason. Here is a MWE:
\documentclass{article}
\usepackage{expex}
\usepackage{lipsum}
\usepackage{tabu}
\usepackage{zref-abspos}
\newlength{\remaining}
\newcommand{\remain}[1]{%
\zsavepos{#1}%
\setlength{\remaining}{\linewidth minus \zposx{#1}sp}%
}
\begin{document}
The linewidth: \the\linewidth. \lipsum[1]
\pex
\a \remain{test}%
\begin{tabu} to \linewidth {| X | X |}
\hline
Linewidth & \the\linewidth \\
\hline
\end{tabu}
\a \begin{tabu} to \remaining {| X | X |}
\hline
Remaining & \the\remaining \\
\hline
\end{tabu}
\xe
\begin{itemize}
\item Linewidth: \the\linewidth
\begin{itemize}
\item Linewidth: \the\linewidth
\end{itemize}
\end{itemize}
\end{document}
This is what I get when I try to calculate the distance between the example text and the left page margin. expex doesn't seem to provide this distance as a length, at least the documentation doesn't mention it explicitly, only numoffset (distance between page margin and example number) and textoffset (distance between example number and text). 174pt seems way too much, however, since the text even for the second-level bullet point is just 47.0003pt in.
It also does not seem to be possible to access the indentation length for examples with enumitem's textoffset.


minusdoes not subtract the two lengths, which I think might be the intention. – David Carlisle Jun 23 '17 at 20:51\the\lengths in this format – Jipí Jun 23 '17 at 22:435pt plus 2pt minus 1ptis a stretchy length with natural size 5pt which can shrink to 4pt and stretch to 7pt. to do 5pt - 1pt use\dimexpr 5pt - 1pt \relax.– David Carlisle Jun 23 '17 at 22:57