7

The following minimal example produce the typical "Something's wrong--perhaps a missing \item" error. I can't understand what's wrong with loading xgalley together with the use of \addvspace...

\documentclass{article}

\usepackage{xgalley}

\makeatletter
\newenvironment{test}
  {\par}
  {\par
   \addvspace{\baselineskip}% <--- error...
   %\@endpetrue
  }
\makeatother
\begin{document}

\begin{test}
  abc
\end{test}

\end{document}

Adding \@endpetrue didn't help, as suggested in \addvspace{x}\noindent ... \addvspace{x} doesn't work.

The above example can be made smaller by just making a call to \addvspace rather than placing it in an environment.

7

The reason xgalley is considered experimental, and can't be loaded in documents in general, is that it only works with constructs that are specifically designed or modified to work with it. The entire mechanism for vertical mode material is different from the LaTeX2e one. Currently, \addvspace isn't modified to work with xgalley so an error is unsurprising. A fix at least covering the normal us case is

\ExplSyntaxOn
\RenewDocumentCommand \addvspace { m }
  { \galley_vspace_set_single:n {#1} }
\ExplSyntaxOff

This will be added to the release version later today.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.