Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] pdf save auto

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] pdf save auto


Chronological Thread 
  • From: Henri Lesourd <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] pdf save auto
  • Date: Thu, 04 Sep 2008 19:40:35 +0200

el.douwen wrote:

salut à tous

i want to know i according to you, it would be possible, that each time i save a document, or "save as..", then teXmacs save also a pdf copy of the file i am working on, in the same folder as the (tm) one.

Do you think, that it would be simple to configurate ?

There is probably a not-that-difficult way to do
it by means of hacking the init Scheme file to hook
the save command, and insert supplementary actions
in between, but it would probably not be very stable,
i.e., when work on TeXmacs will resume, you can
expect than sooner or later, changes will break
your code.

There is also a much more simple way to do it,
which it much more fragile (i.e.: it breaks as
soon as you update your version of TeXmacs), it
is to directly change the code of TeXmacs in order
to always save the corresponding pdf when you save
a document.

More precisely, if you look in:
TeXmacs/src/TeXmacs/progs/texmacs/texmacs/tm-files.scm

, you will see that ultimately, all the save functions
branch to "texmacs-save-buffer" (which is a C++ function).

Thus what you could do is replace all the occurrences
of "texmacs-save-buffer" everywhere in the Scheme code
of TeXmacs by e.g. "texmacs-save-buffer2" (there are
not that many such occurrences), and then implement
this function as something like:
[[
(tm-define (texmacs-save-buffer2 file fm)
(texmacs-save-buffer file fm)
... Here add your own code to
save a pdf version of the
file ...
)
]]




Archive powered by MHonArc 2.6.19.

Top of Page