mailing-list for TeXmacs Users

Text archives Help


Re: tm<-> html [was :Re: suggestion]


Chronological Thread 
  • From: Massimiliano Gubinelli <address@hidden>
  • To: Vincent Douce Mathoscope <address@hidden>
  • Cc: address@hidden
  • Subject: Re: tm<-> html [was :Re: suggestion]
  • Date: Fri, 10 Apr 2020 09:29:30 +0200

Vincent,
 you can run from the shell a command like


texmacs.bin -x "(tmweb-convert-dir \"$HOME/t/lab/web/web\" \"$HOME/t/website2\")" -q

where you adjust the paths accodingly. This will use the files in the first dir to make a website in the second. I think you can give the same dir. -q will quit texmacs at the end.

You can look at tmweb-convert-dir and try to guess what to do to add also the other conversions. Look into tmweb.scm

If could be an interesting scheme exercise to figure out what to do. Probably you will just have to write appropriate versions of the function

(define (tmweb-convert-file tm-file html-file)
  (with-aux tm-file
    (if (url? html-file) (set! current-save-target html-file))
    (export-buffer-main (current-buffer) html-file "html" (list :overwrite))))

do perform the other conversions and call it with all the files in your directory, see e.g. the function tmweb-convert-directory


Let me know if you need some help. 

Max



On 10. Apr 2020, at 09:11, Vincent Douce Mathoscope <address@hidden> wrote:


Hi Max & Joris

i have tried the tool "website" :
- very intersting and efficient
- but i am obliged to select each time the source and the destination, could there be a means to record some couple of (source/dest) paths somewhere in order to update in one click the website ?
- i find intersting tthe possibility to selecct the same folder as source and dest, because, for example, in my website, the php page automatically list the files and give a link to html version, and a link to download the tm version
- what i am missing, is the pdf and tex version; Indeed, i find interesting to offer this possibility to visotors to see the typographic version without being obliged to discover texmacs ; because if they are obliged, some 50% will leave the page and search somewhere else. So, i update manually the pdf version of each of my pages. And some math teacher are disciples of gourou latex and wont' download anything else than a tex version. Since texmacs can convert automatically, would it be possible to have inside texmacs the possibility to update a website wiht not ony html version but also tex/pdf version ?

something else :
in my trials i have encountered a bug that i had  never met before among all the pages of my site (http://www.mathoscope.ouvaton.org/mathoscope_xyz/Prepa/distributeur.php?mot=) (end of this mail)

thanks Max for you scheme suggestion ; when i am more familiar with guile i come back to your suggestions

Vincent

------------- the bug file ----------
here two screenhots :
the html version :
<html_aj.jpg>
the tm version :
<tm_aj.jpg>




<series.tm>






Archive powered by MHonArc 2.6.19.

Top of page