2

I am using gb4e for glossing examples in my thesis. I would like to set the example number back to zero for an appendix. I assume some variation of Alan Munn's solution at gb4e enumeration format might work for me, but but how to format it so that it only affects the one chapter, rather than all chapters.

ToddAO
  • 569

1 Answers1

5

You can simply reset the exx counter just after the \appendix command:

\appendix
\setcounter{exx}{0}

MWE (borrowed from linked answer)

\documentclass{book}
\usepackage{gb4e}

\begin{document}
\chapter{}

\begin{exe}
\ex
\gll born be?ettef\={a}q.e yek.i ?az aqv\={a}m.a\v{s} be \v{s}ahr.e per\={a}g moh\={a}jerat kard\\
     Born with.EZ one.INDEF from relatives.CL-3SG to city.EZ Prague move did.3SG \\
\glt `Born moved to the city of Prague with one of his relatives.'
\end{exe}

\begin{exe}
\ex
\gll born be?ettef\={a}q.e yek.i ?az aqv\={a}m.a\v{s} be \v{s}ahr.e per\={a}g moh\={a}jerat kard\\
     Born with.EZ one.INDEF from relatives.CL-3SG to city.EZ Prague move did.3SG \\
\glt `Born moved to the city of Prague with one of his relatives.'
\end{exe}

\chapter{}

\begin{exe}
\ex
\gll born be?ettef\={a}q.e yek.i ?az aqv\={a}m.a\v{s} be \v{s}ahr.e per\={a}g moh\={a}jerat kard\\
     Born with.EZ one.INDEF from relatives.CL-3SG to city.EZ Prague move did.3SG \\
\glt `Born moved to the city of Prague with one of his relatives.'
\end{exe}

\appendix
\setcounter{exx}{0}

\chapter{}

\begin{exe}
\ex
\gll born be?ettef\={a}q.e yek.i ?az aqv\={a}m.a\v{s} be \v{s}ahr.e per\={a}g moh\={a}jerat kard\\
     Born with.EZ one.INDEF from relatives.CL-3SG to city.EZ Prague move did.3SG \\
\glt `Born moved to the city of Prague with one of his relatives.'
\end{exe}

\end{document} 

Output:

enter image description here

karlkoeller
  • 124,410