
Entonces, estoy escribiendo mi tesis (en lingüística) usando book
documentclass
para hacer esto. Para mis ejemplos numerados estoy usando el linguex
paquete.
\documentclass[12pt, a4paper, oneside]{book}
\usepackage{linguex}
\begin{document}
\chapter{This is chapter one}
I have a nice sentence here:
\ex. This is an example.
And a nice additional example:
\ex. This is another example.
\chapter{This is chapter two}
This is the most important example in the thesis and I will refer to it often!
\ex.\label{important} This is a very important example.
\chapter{This is chapter three}
As you can see, \Next and \NNext are very different from \ref{important}.
\ex. This is an example.
\ex. This is another example.
\end{document}
El contador de los ejemplos numerados ahora se reinicia al comienzo de cada capítulo. Así que el primer ejemplo de cada capítulo ahora lleva el número (1). Esto no es lo que me gustaría ya que a veces necesito hacer referencia a un ejemplo de otro capítulo y luego no queda claro a qué ejemplo me refiero exactamente. El resultado del capítulo 3 ahora se ve así. Como puede ver, las referencias se vuelven confusas.
¿Alguien sabe cómo solucionar/alterar esto? Lo ideal sería que el capítulo tres se viera así:
Como puede ver (4) y (5) son muy diferentes de (3).
(4) Este es un ejemplo.
(5) Este es otro ejemplo.
Leí el linguex
manual pero no pude encontrar ninguna sugerencia sobre una solución y no pude encontrar una respuesta en Internet.
Respuesta1
Tienes que incluir el remreset
paquete que permite eliminar contadores de la lista de reinicio (con el comando \@removefromreset
)
El contador responsable se llama ExNo
.
\documentclass[12pt, a4paper, oneside]{book}
\usepackage{linguex}
\usepackage{remreset}
\makeatletter
\@removefromreset{ExNo}{chapter}
\makeatother
\begin{document}
\chapter{This is chapter one} I have a nice sentence here:
\ex. This is an example.
And a nice additional example: \ex. This is another example.
\chapter{This is chapter two} This is the most important example in the thesis and I will refer to it often! \ex.\label{important} This is a very important example.
\chapter{This is chapter three} As you can see, \Next and \NNext are very different from \ref{important}. \ex. This is an example.
\ex. This is another example.
\end{document}
\begin{document}
\chapter{Chapter One}
\ex. Ex. One
\ex. Ex. Two
\chapter{Chapter Two}
\ex. Ex. Three
\end{document}
Supongo que la numeración de los subejemplos debería restablecerse en cada capítulo de todos modos.
Respuesta2
También puedes usar \counterwithout{<counter>)(<block>}
del chngcntr
paquete:
\documentclass[12pt, a4paper, oneside]{book}
\usepackage{linguex}
\usepackage{chngcntr}
\counterwithout{ExNo}{chapter}
\begin{document}
\chapter{This is chapter one} I have a nice sentence here:
\ex. This is an example.
And a nice additional example: \ex. This is another example.
\chapter{This is chapter two} This is the most important example in the thesis and I will refer to it often! \ex.\label{important} This is a very important example.
\chapter{This is chapter three} As you can see, \Next and \NNext are very different from \ref{important}. \ex. This is an example.
\ex. This is another example.
\end{document}