Escrevi um livro por volta do ano 2010. Agora quero adicionar (atualizar) alguns exercícios e contar todos os exercícios atualizados. Mas eu só posso Update 2014
. Como posso fazer Update 0ne 2014
, Update two 2014
, ... ou 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}
Responder1
Use um contador. Você pode ajustar a formatação como desejar.
\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}