Need suggestions
From: David Arnold (darnold_at_northcoast.com)
Date: 06/30/04
- Next message: Jeff 'Japhy' Pinyan: "Regexp::Parser v0.01"
- Previous message: Brian Gerard: "Re: Favorite email parser?"
- Next in thread: greger: "Re: Need suggestions"
- Reply: greger: "Re: Need suggestions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 29 Jun 2004 18:12:49 -0700 To: beginners@perl.org
All,
Being only moderately comfortable with Perl, I find myself in need of some
direction on a more complex task. I have a tex file containing a large
number of exercises shaped as follows:
\ex This is the text of the exercise as it appears in the book. The
exercise may have several parts.
\pt This is the first part.
\ans This is the solution to the first part.
\endans
\backans{This is the answer to the first part that goes in the back of
the book. These are present only for the odd-numbered exercises.}
\pt This is the second part.
\ans This is the solution to the second part.
\endans
\backans{This is the answer to the second part that goes in the back
of the book.}
I need to change each of these into the following form:
\begin{exer}
\begin{exertext}
This is the text of the exercise as it appears in the book. The
exercise may have several parts.
\begin{subenumerate}
\item This is the first part.
\item This is the second part.
\end{subenumerate}
\end{exertext}
\begin{soln}
\begin{subsoln}
\item This is the solution to the first part.
\item This is the solution to the second part.
\end{subsoln}
\end{soln}
\begin{answer}
\begin{subanswer}
\item This is the answer to the first part that goes in the back of
the book. These are present only for the odd-numbered exercises.
\item This is the answer to the second part that goes in the back
of the book.
\end{subanswer}
\end{answer}
\end{exer}
I am looking for suggestions on how to attack this assignment. Perhaps
there are modules on CPAN that would help me of which I am not aware. Or,
perhaps a kind soul will suggest an attack.
Thanks. Any help appreciated.
- Next message: Jeff 'Japhy' Pinyan: "Regexp::Parser v0.01"
- Previous message: Brian Gerard: "Re: Favorite email parser?"
- Next in thread: greger: "Re: Need suggestions"
- Reply: greger: "Re: Need suggestions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|