Escribí un libro aproximadamente en el año 2010. Ahora quiero agregar (actualizar) algunos ejercicios y contar todos los ejercicios actualizados. Pero sólo puedo Update 2014
. ¿Cómo puedo hacer Update 0ne 2014
, Update two 2014
, ... o Update_01_2014
, Update_02_2014
, ...?
\documentclass{book}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\newtheorem{ex}{Exercise}[chapter]
\newenvironment{ex*}
{\renewcommand\theex{\thechapter.\arabic{ex}\rlap{$^*$}}\ex}
{\endex}
\newenvironment{New}
{\renewcommand\theex{\thechapter.\arabic{ex}{$^{\text{(Update 2014)}}$}}\ex}
{\endex}
\begin{document}
\chapter{First Chapter}
\section{First section}
\begin{ex}
This is an Exercise
\end{ex}
\begin{ex}
This is an Exercise
\end{ex}
\begin{ex*}
This is a difficult Exercise
\end{ex*}
\begin{New}
This is an update Exercise
\end{New}
\end{document}
Respuesta1
Utilice un contador. Puede ajustar el formato como desee.
\documentclass{book}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\newtheorem{ex}{Exercise}[chapter]
\newenvironment{ex*}
{\renewcommand\theex{\thechapter.\arabic{ex}\rlap{$^*$}}\ex}
{\endex}
\newcounter{updatecounter}
\newenvironment{New}
{\stepcounter{updatecounter}
\renewcommand\theex{\thechapter.\arabic{ex}{$^{\text{(Update
\arabic{updatecounter}, 2014)}}$}}\ex}
{\endex}
\begin{document}
\chapter{First Chapter}
\section{First section}
\begin{ex}
This is an Exercise
\end{ex}
\begin{ex}
This is an Exercise
\end{ex}
\begin{ex*}
This is a difficult Exercise
\end{ex*}
\begin{New}
This is an updated Exercise
\end{New}
\begin{New}
This is another updated Exercise
\end{New}
\end{document}