jspitz / covington

Maintenance of the covington LaTeX package
9 stars 0 forks source link

"Title" for \subexample #5

Closed HJMitchley closed 5 years ago

HJMitchley commented 5 years ago

For \subexample, if I add a bit of text before introducing \item (e.g. to 'title' the phenomenon that the data exemplify, for ease of reference), the subexample counters (a, b, etc) are no long at secondary list level, and instead they almost align with the example counter (See 1). Additionally, if the first example is a table, the (a) will get pushed down into the (b) (see 2).

Would it be possible to add an option for including a line of text before the first \item of the subexample environment?

minimal working example:

\documentclass{article} \usepackage{covington}

\begin{document}

\begin{subexamples} \textit{vP-selecting Cause: Non-agent-oriented modification allowed below Cause}

\item \gll Here is some data here is a gloss \glt The (a,b) alignment is off \glend \item \gll Here is some data here is a gloss \glt The (a,b) alignment is off \glend \end{subexamples}

\begin{subexamples} \textit{Transitivizer-induced gemination}

\item Root-final segment eligible for gemination\ \begin{tabular}{|c|c|c|}\hline Translation & Unacc-Past & Trans-Past \ \hline X & X & x \ Y & Y & Y\ \hline \end{tabular}

\item Root-final segment not eligible for gemination \

\begin{tabular}{|c|c|c|}\hline Translation & Unacc-Past & Trans-Past \ \hline Z & Z & Z\ V & V & V \\hline \end{tabular} \end{subexamples} \end{document}

subex.pdf

jspitz commented 5 years ago

Thanks for the suggestion. I have added an option "preamble" to the subexamples environment. So your example would read like this:

\documentclass{article}
\usepackage{covington}

\renewcommand*{\subexpreamblefs}{\itshape}

\begin{document}

\begin{subexamples}[preamble={vP-selecting Cause: Non-agent-oriented modification allowed below Cause}]
\item\gll Here is some data
          here is a gloss
     \glt The (a,b) alignment is off \glend
\end{subexamples}

\begin{subexamples}[preamble={vP-selecting Cause: Non-agent-oriented modification allowed below Cause}]
\item\gll Here is some data
          here is a gloss
      \glt The (a,b) alignment is off \glend
\item\gll Here is some data
          here is a gloss
     \glt The (a,b) alignment is off \glend
\end{subexamples}

\begin{subexamples}[preamble={Transitivizer-induced gemination}]
\item Root-final segment eligible for gemination

       \begin{tabular}{|c|c|c|}\hline
       Translation & Unacc-Past & Trans-Past \\ \hline
        X & X & x \\
        Y & Y & Y\\ \hline
        \end{tabular}

\item Root-final segment not eligible for gemination

       \begin{tabular}{|c|c|c|}\hline
       Translation & Unacc-Past & Trans-Past \\ \hline
       Z & Z & Z\\
       V & V & V \\\hline
       \end{tabular}
\end{subexamples}
\end{document}

Please try the development version from this repo and report back.

HJMitchley commented 5 years ago

Thank you! works perfectly

jspitz commented 5 years ago

Good. The new version will be released today.