Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] exporting to html: prompt for overwriting existing file

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] exporting to html: prompt for overwriting existing file


Chronological Thread 
  • From: Henri Lesourd <address@hidden>
  • To: Kai Sattler <address@hidden>
  • Cc: address@hidden
  • Subject: Re: [TeXmacs] exporting to html: prompt for overwriting existing file
  • Date: Fri, 05 May 2006 14:34:33 +0200

Kai Sattler wrote:

Hi,

When exporting to HTML, texmacs allways asks whether to overwrite
an existing file, and it even presets the answer "no". I find this
very anoying and would like to preset "yes" instead.
I had a look into
/usr/share/texmacs/TeXmacs/progs/texmacs/texmacs/tm-files.scm
assuming that this could probably be the place where to change the behaviour.
However, I am not a scheme expert, and I cannot really find where
"no" is defined, neither in the other .scm files. Can anybody help?


The simpler way to do such things is to use an external script,
instead of operating from inside TeXmacs. This way, you only
need to save your .tm file, and then you run the script externally.

To solve the problem you describe, just start your script
by removing the offending .html file. To use TeXmacs in a
script, you need to use the option -c to tell TeXmacs that
you want him to convert a file, and -q to tell him that you
want to quit immediately afterwards. Overall, your script
should look loke this :
<<
#!/bin/bash

rm $1.html
texmacs -c $1.tm $1.html -q
... other commands (e.g., running some
perl scripts) to finalize the .html
output file ...
>>




Archive powered by MHonArc 2.6.19.

Top of Page