0

How do I get the following output using linguex:

(2) a. James sang to himself
    b. James didn't sing to himself.

"Lorem ipsum dolor sit amet, consectetur adipiscing elit.

(2) c. James would not sing to himself

I want to write an example with the same numbering as before the text, but with the new sub-numbering scheme.

1
  • 1
    Please don't just show the desired output when you ask a question. Instead give a minimal compilable document using the relevant package (in this case linguex) showing the output you can get.
    – Alan Munn
    Sep 17 '19 at 3:29
0

This is basically a duplicate of Is there a way to restate linguistic examples in linguex? but with the added complication of the resumed sublabel number. There's no simple way to do this other than supplying the sublabel manually, as in the the following example:

\documentclass{article}
\usepackage{linguex}
\makeatletter
\newif\if@repeated\@repeatedfalse
\newcounter{savedExNo}
\renewcommand{\NormalEx}{\ifExWarning 
     \PackageWarning{linguex}{Check example numbering (screwed up?), 
     check number of empty lines at end of examples.  
     Detected}\fi\ExWarningtrue
     \if@repeated
        \Exformat[\ref{\tmp@ref}]
        \setcounter{ExNo}{\value{savedExNo}}
        \global\@repeatedfalse
     \else
     \if@noftnote\refstepcounter{ExNo}%
        \Exformat[\ExLBr\Exarabic{ExNo}\ExRBr]%
     \else
         \refstepcounter{FnExNo}\Exformat[\FnExLBr\Exroman{FnExNo}\FnExRBr]%
     \fi
     \fi}
\newcommand{\exr}[1]{%
\@repeatedtrue
\setcounter{savedExNo}{\value{ExNo}}
\def\tmp@ref{#1}
\ex.}



\makeatother
\begin{document}
\ex. This is an example.

\ex. This example will be repeated.\label{r1}

\ex.  \label{r2}
\a. An subexample.
\b. Another subexample.

\ex. Another example.

\exr{r1} This is the first repeated example.

\exr{r2}
\a.[c.] A repeated subexample.
\b.[d.] Another subexample.

\ex. Another example showing that the numbering continues correctly.

\ex. Another one.

\end{document}

output of code

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.