mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] Permanently setting an environment variable


Chronological Thread 
  • From: Miguel de Benito Delgado <address@hidden>
  • To: texmacs-users <address@hidden>
  • Subject: Re: [TeXmacs] Permanently setting an environment variable
  • Date: Mon, 29 Sep 2014 21:52:40 +0200

Sure! This will add the package "custom-stuff" (which you'd save as custom-stuff.ts inside ~/.TeXmacs/packages) to any newly created buffer:

(if (url-scratch? (current-buffer)) 
    (set-style-list (append (get-style-list) '("custom-stuff"))))

But it will tag the document as modified so, you might want to tell TeXmacs to fake a save with  buffer-pretend-saved. That is, you'd change the code above to:

(if (url-scratch? (current-buffer)) 
    (begin
       (set-style-list (append (get-style-list) '("custom-stuff")))
       (buffer-pretend-saved (current-buffer))))

You could do other things like only add the package if you save the document in a specific folder for instance.

Hth,
--
Miguel de  Benito.

On Mon, Sep 29, 2014 at 8:41 PM, Michael Shea <address@hidden> wrote:
Well I tried to put "assign math-condensed := true" in the my-init-buffer.scm and it did not work, then I realized that is not really a scheme _expression_. I did work years ago with lisp, but I find TeXMacs documentation a little hard to follow. 

Could you give me some explicit code to this?

Thanks. 

On Mon, Sep 29, 2014 at 3:40 AM, Miguel de Benito Delgado <address@hidden> wrote:
Use your my-init-buffer.scm to create a preamble and add the variable assignment to it for every new document. Or create a package file with that assignment and any other customizations, then use your my-init-buffer.scm to add this package by default to any new document.

--
Miguel de  Benito.

On Mon, Sep 29, 2014 at 5:26 AM, Michael Shea <address@hidden> wrote:
I want to permanently set math-condensed := true for any document style I work with. How do I do that?






Archive powered by MHonArc 2.6.19.

Top of page