2

My MWE is shown below:

\documentclass{article}
\usepackage{verse}
\usepackage{csquotes}
% \usepackage{lua-widow-control}
\begin{document}
\begin{verse}
\enquote{And has thou slain the Jabberwock?\\
Come to my arms, my beamish boy!\\
O frabjous day! Callooh! Callay!}\\
He chortled in his joy.
\end{verse}
\end{document}

If the line \usepackage{lua-widow-control} is uncommented, and the file compiled with lualatex, I get the error:

! Package csquotes Error: Unbalanced groups or invalid nesting.

See the csquotes package documentation for explanation. Type H for immediate help. ...

                                               l.9 O frabjous day! Callooh! Callay!}
                               \\

I think there is some conflict between the csquote and lua-widow-contrl packages and would appreciate it if those best qualified to, do address it.

chandra
  • 3,084
  • 2
    This is due to a bad interaction between csquotes and the microtype package (loaded by lua-widow-control), which has already been fixed in the dev version. – Robert May 16 '22 at 23:56

1 Answers1

1

Robert is correct, there is a conflict between csquotes and microtype. You can block microtype from loading with \RemoveFromHook{begindocument/before}[lua-widow-control]:

\documentclass{article}
\usepackage{verse}
\usepackage{csquotes}
\usepackage{lua-widow-control}
\RemoveFromHook{begindocument/before}[lua-widow-control]
\begin{document}
\begin{verse}
\enquote{And has thou slain the Jabberwock?\\
Come to my arms, my beamish boy!\\
O frabjous day! Callooh! Callay!}\\
He chortled in his joy.
\end{verse}
\end{document}

However, lua-widow-control tends to not work very well without microtype, so you should only prevent it from loading until the fixed microtype is released.

Max Chernoff
  • 4,667
  • 1
    A less drastic workaround would be \PassOptionsToPackage{nopatch=item}{microtype} instead of removing microtype altogether. – Robert May 18 '22 at 11:38