Skip to Content.
Sympa Menu

texmacs-users - [TeXmacs] Problems including tm files

Subject: mailing-list for TeXmacs Users

List archive

[TeXmacs] Problems including tm files


Chronological Thread 
  • From: Sam Wilson <address@hidden>
  • To: address@hidden
  • Subject: [TeXmacs] Problems including tm files
  • Date: Sun, 5 Mar 2017 08:18:15 -0800

Hello.  I am putting together homework problems for an algebra book written by some colleagues.  I want to have the problems in the book, and an answer key in a separate document.

"problem-answers.ts" defines a few macros to package up problems and answers.

"problems and answers.tm" contains the actual problems and answers.

"problems.tm" and "answers.tm" set an environment variable "printanswers" to true or false, then include "problems and answers.tm"

I'm running into two problems:
1) If I move or rename one of these files, the macros stop working.  It looks like Texmacs is still finding my "problem-answers.ts" package file, but the macros aren't being processed.  Rather than showing just the problem or the answer, it shows "<\make-problem|this is the problem|this is the answer>" (and the macro name "make-problem" is the same pink color as the two following strings).  Removing the style package and adding it again doesn't fix this.  Am I applying my style package incorrectly somehow?  It work some of the time, but not others, with no apparent pattern.

2) When the style package is working, I have a problem when there are lots of problems.  When I include long lists of problems in "problems.tm", the problems overflow the edges of a page, rather than a page-break being inserted at the appropriate.  See "page overflow.png" to see what I mean.  Also, the problems were set in two columns in "problem ans answers.tm", but they show up in only one column when included in "problem.tm".  Is there some way to more finely control how included files are displayed?

Thanks.

Sam Wilson

<TeXmacs|1.99.5>

<style|source>

<\body>

<assign|ifnoanswers|<macro|toshow|<if|<provides|printanswers>|<if|<printanswers>||<arg|toshow>>|<arg|toshow>>>>


<assign|ifanswers|<macro|toshow|<if|<provides|printanswers>|<if|<printanswers>|<arg|toshow>>|<arg|toshow>>>>

<assign|make-problem|<\macro|prob|ans>

<if|<provides|printanswers>|<if|<printanswers>|<arg|ans>|<arg|prob>>|<compound|<arg|prob>|<arg|ans>>>

\;
</macro>>
</body>

<\initial>
<\collection>
<associate|preamble|true>
<associate|src-compact|none>
</collection>
</initial>

Attachment: answers.tm
Description: Binary data

Attachment: page overflow.png
Description: PNG image

Attachment: problems and answers.tm
Description: Binary data

Attachment: problems.tm
Description: Binary data



  • [TeXmacs] Problems including tm files, Sam Wilson, 03/05/2017

Archive powered by MHonArc 2.6.19.

Top of Page