texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:Re: [Texmacs-dev] Solution environment


From: Sam Liddicott
Subject: Re:Re: [Texmacs-dev] Solution environment
Date: Sat, 25 Dec 2010 08:20:09 -0000

To me this suggests the possibility to have non-core packages to be able to be 
automatically cached and updated in the pre-amble; to aid sharing dependent 
docs.

Sam

Zou Hu <address@hidden> wrote:

>Thanks. To share document with others, I think I need to add the macros to the 
>preamble of my document. But I tried several ways to do this without success. 
>Could you give me an example texmacs file? I could not find this kind of 
>things in texmacs document.&nbsp;At 
>2010-12-24,"Miguel&nbsp;de&nbsp;Benito&nbsp;Delgado"&nbsp;&lt;address@hidden&gt;
> wrote: I agree this would be nice and it ought not to be too hard to achieve, 
>at least for your own personal documents: to the file 
>src/TeXmacs/progs/text/text-menu.scm you can add the line
>
>&nbsp;("Solution" (make 'solution))
>
>(a good place might be after the exercise and problem environments). Then all 
>you have to do is add something like the following to your style file:
>
>
>
>
>
>p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo}
>p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px}
>
>
>
>&lt;assign|solution-text|&lt;macro|&lt;localize|Solution&gt;&gt;&gt;
>&nbsp;&nbsp;
>&nbsp; &lt;assign|render-solution|&lt;\macro|which|body&gt;
>&nbsp; &nbsp; &lt;\render-remark|&lt;arg|which&gt;&gt;
>&nbsp; &nbsp; &nbsp; 
>&lt;\surround||&lt;htab|0.5fn&gt;&lt;active*|&lt;with|mode|math|\&lt;box\&gt;&gt;&gt;&gt;
>&nbsp; &nbsp; &nbsp; &nbsp; &lt;arg|body&gt;
>&nbsp; &nbsp; &nbsp; &lt;/surround&gt;
>&nbsp; &nbsp; &lt;/render-remark&gt;
>&nbsp; &lt;/macro&gt;&gt;
>
>&nbsp; &lt;assign|solution|&lt;\macro|body&gt;
>&nbsp; &nbsp; &lt;render-solution|&lt;solution-text&gt;|&lt;arg|body&gt;&gt;
>&nbsp; &lt;/macro&gt;&gt;I tried adding this to 
>packages/environment/env-theorem.ts but it wasn't enough, maybe someone can 
>shed some light here? Adding the macros to the preamble of the document (hide 
>it with &lt;hide-preamble&gt;) did of course work as expected (i.e. when 
>clicking on the "solution" item inside the menu, I got a new Solution 
>environment).
>
>The problem with adding the environment to the TeXmacs source could be that 
>there are already many styles that don't implement it, as well as latex 
>conversion to be done and lots of translations, all of which adds up to some 
>40 files. Of course all this can always be done if the others agree.
>
>Regards,________________Miguel de&nbsp; Benito.
>On Fri, Dec 24, 2010 at 06:12, Zou&nbsp;Hu &lt;address@hidden&gt; wrote:
>
>Hi all,Currently in TeXmacs there are "theorem" and "proof" environments; and 
>also there is a "problem" environment, but I can not find a "solution" 
>environment. I think it would be better to add a "solution" environment to 
>texmacs.
>
>Best.        
>_______________________________________________
>Texmacs-dev mailing list
>address@hidden
>http://lists.gnu.org/mailman/listinfo/texmacs-dev
>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]