Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] More on TeXmacs Footnote behaviour

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] More on TeXmacs Footnote behaviour


Chronological Thread 
  • From: Sam Liddicott <address@hidden>
  • To: Miguel de Benito Delgado <address@hidden>
  • Cc: "address@hidden" <address@hidden>
  • Subject: Re: [TeXmacs] More on TeXmacs Footnote behaviour
  • Date: Mon, 21 Jan 2013 16:55:57 +0000

Thanks Miguel, you have identified for me the concern that I think François Poulain must have, so I will address this further down the response



On Mon, Jan 21, 2013 at 4:23 PM, Miguel de Benito Delgado <address@hidden> wrote:
On 21 Jan, 2013, at 12:06, Sam Liddicott <address@hidden> wrote:

This is the smallest solution that exactly matches the definition of the problem which is how to remove formatting specifications that have been added since the document started - answer: render in that environment.

+1 for precision.

For sequential; what good would the pre-amble be if it wasn't guaranteed to be executed after the styles and packages but before the rest of the document? At what other point can we know what the documents actual default text style is?

I'm quite ignorant about styles, but this seems a sound argument to me.

As to the solution, I'm not sure I understand: isn't the requirement to execute a macro after the preamble going to couple the typesetter to one specific style file? Unless you code the general system you mention to register macros for execution, that is. (That'd be better I guess)

I have an incomplete system to do such a thing, but of course texmacs has such a system already.

If you saw how I overrode the render-footnote macro but allowed to to still call the old macro, it will be clear that this single after-preamble macro can be overridden the same way and so many styles could make use of this feature without problem.

 

Wouldn't it be easier to code this in C++ or scheme? The initial environment is already captured by the typesetter, so all that's needed is to write this with-default-style in C++. Or as a secure script in scheme, then define render-footnote using it.

For Joris, for you, but not for me :-) My knowledge of texmacs internals is too light
 

 * Either to implement the system to register a macro for delayed execution at the end of the preamble (and maybe some other points, come to think of it…) Then add the closure idea to the default style. (I like this one best because of the added functionality with the call hooks)

I need these hooks also to generalise another style sheet I have called fake-page. (For a single document of course I don't need hooks).

Fake-page allows the creation of documents that talk about the creation of documents and allow one to show a rendering of a page; describe some steps and then show the updated rendering of the page, and so on.

So it is useful to create a mini tutorial on use of certain style sheets. My using closures in this way it allows each mini-page (or additions to it) to have their own page numbers, section numbers, and so on. Otherwise faking this values is too hard to get right.
 

 * Or to write a little bit of scheme/c++ that retrieves the relevant variables and alter render-footnote to use it.

For the second one, this might have been it:

            (tm-define (get-init* s)
              (:secure #t)
              (get-init (tree->string  s)))

            <assign|get-init|<macro|s|<extern|get-init*|<quote-arg|s>>>>

Then:

            <assign|render-footnote|<macro|nr|body|<with|font-family|<get-init|font-family>|<render-footnote*|<arg|nr>|<arg|nr>|<arg|body>>>>>

However, (get-init "font-family") returns "rm" instead of "normal", so this doesn't work and more changes would be needed.

I would think you would need to do all of these variables:  

color|bg-color|info-flag|font|math-font|prog-font|font-family|math-font-family|prog-font-family|font-series|math-font-series|prog-font-series|font-base-size|font-size|math-level|math-display|math-condensed|math-vpos|par-mode|par-hyphen


===

Regarding "enclose.ts": a quick scan was a bit confusing because of the big difference with the rest of the packages I've seen. Finding the active macros was a bit hard in all that text, until I realised I shouldn't be "viewing as source". Maybe a small old fashioned yellow comment block explaining that would help.


Good point. I will look at how to better present that.

Thanks for your enlightenment.

Sam
 
--
Miguel de Benito.




Archive powered by MHonArc 2.6.19.

Top of Page