[Tugindia] Auto generation of two pdfs

S. venkataraman svenkat at ignou.ac.in
Mon Jan 24 05:30:21 CET 2011


On Fri, Jan 21, 2011 at 10:52 AM, Shashi Kumar <
shashi.kumar at glyphinternational.com> wrote:

>
> Hi,
>
> Is there any way how to make generation of the exercises and their
> solutions automatic?
> An ideal situation would be if we could have just one LaTeX file where
> we would somehow specify
> the question of the exercise (possibly with a hint) as well as the
> complete solution of it.
> And after running it through the LaTeX, we would get  two pdf files,
> one with the book itself (which would contain apart from the main text
> in each chapter
> the questions with hints but no solutions) and another file that would
> contain only the exercises (either the questions and the complete
> solutions, or just automatic numbers and solutions only).
>
> Best,
> Shashi
>
>
> -
> Disclaimer And Confidentiality Notice- This e-mail transmission and any
> attached
> documents, files, or previous e- mail messages attached to it, may contain
> information that is confidential. It is for the use of the intended
> recipient(s) only. If you have received this e-mail in error, please notify
> the sender immediately and then delete it. If you are not the intended
> recipient, you must not use, disclose, or distribute this e-mail without
> the
> senders prior permission. We have taken precautions to minimize the risk of
> transmitting software viruses, but we advise you to carry out your own
> virus
> checks on any attachment to this message. We do not accept liability for
> any
> loss or damage caused by software viruses.
>
>
> _______________________________________________
> Home:        http://www.tug.org.in/
> TeX FAQ:     http://www.tex.ac.uk/faq
> unsubscribe: http://tug.org/mailman/listinfo/tugindia
>
Take a look at the package answers.
http://www.ctan.org/tex-archive/macros/latex/contrib/answers/
I have used it quite a lot and it is a very useful package.
When I make the assignments, I type in the solution also so
that I can check the solutions easily when I am proof reading.
I then load the package with `nosolutionfiles' option.
\usepackage[nosolutionfiles]{answer}.
If I want the solutions in a separate file which I then input,
I load the package without this option:
\usepackage{answers}
Typically, I have both the lines in my file and comment out
whichever is not needed.
Best,
S. Venkataraman


More information about the tugindia mailing list