txa / cftlfp

0 stars 0 forks source link

Move exercises and answers to end of chapter #18

Closed jacobneu closed 3 months ago

jacobneu commented 3 months ago

Closes #8. Exercises appear in-text, and then are re-stated with answer (if the answer was given) at the end of the chapter.

Note: the environments are called exercise and answer (not Exercise and Answer) now; if the capitalized environment names are used, then the answer won't contain a re-statement of the problem.

jacobneu commented 3 months ago

@txa The exercise package allows for the answers to appear at the end of the chapter (this is implemented in https://github.com/txa/cftlfp/pull/18/commits/edca8f3f0fa193c8d1f18e55eed256beefe9824b), but not for restating the problem too. Bases on (what I understand of) the exercise package's implementation, it's not even possible to automatically include a link to the problem statement from the answer. I couldn't find a LaTeX package which has the desired behavior. So if we want the statement of the problem to occur both in the text and at the end of the chapter with the answer, I think we'll need to store the exercise statements in separate files so that they can be included twice.

txa commented 3 months ago

Ok then just leave it in the moment. I.e. do not repeat the question.

jacobneu commented 3 months ago

Ok then just leave it in the moment. I.e. do not repeat the question.

Ok. I'll see if I can come up with another solution that's not too hacky.

jacobneu commented 3 months ago

@txa I figured it out (little hacky but not too bad). It works as desired now. Ready to merge.