Subject: mailing-list for TeXmacs Users
List archive
From : Vincent Douce Mathoscope <address@hidden>- To: address@hidden
- Subject: Re: [TeXmacs] exporting package
- Date: Fri, 27 Jul 2018 22:38:04 +0200
hello
i have written this bash script
it is a step towards my former demand
it takes as argment a .tm file that has been formerly opened and where the users has made [command-P] and just closed the opened pdf
as the pdf generated by a tm always goes in the same folder, this script takes it, renames it with the name of the tm file and moves it in the same folder as the tm file
it also zips the tm file and the pictures folder because in my case each tm file is associated with a folder containing the pictures linked to the tm
it can be easily personalised
what strongly misses for me is any automatic process to get the html version of my tm file
if it interests somebody...
Vincent
----
#!/bin/bash
fichier=${1:?"Vous devez fournir un path"}
#je mets le / à la fin des variables contenant un path
lepdf=/Users/[me]/.TeXmacs/system/tmp/preview.pdf
#l'emplacement du pdf tel que par défaut by TeXmacs
lepath=${fichier%/*}/
cd $lepath
lenom=${fichier##*/}
lenomsanslextension=${lenom%.*}
lesimages=${lenomsanslextension}!images/
if [ -e ${lepathdupdf}${lenomdupdf} ]
then
#apparemment le then doit être à la ligne sinon erreur...
mv -f ${lepdf} ${lenomsanslextension}.pdf
#prend le pdf preview dans /tmp et le renomme puis le met à côté du tm
else
echo "-----------------------------"
echo "attention, le pdf n'y est pas" >&2
fi
rm ${lenomsanslextension}.zip
#vire l'archive existante
echo $lesimages
zip -r ${lenomsanslextension}.zip \
${lenomsanslextension}.tm \
${lesimages} \
----
Le 20 juin 2018 à 23:04, Vincent Douce Mathoscope <address@hidden> a écrit :hii dont feel having the knowledge to become a scheme programmer & texmacs commiterso i can notdo this by myselfthought, it would be very useful, according to me :creating an "export package" menu item that would export simultaneously pdf,html,tex..(1) versions of the opened texmacs document directly in some folder (2)the choice of the export formats should be made in some pref pane, as well as the choice of the folder (with the possibility of the options "in the same folder as the .tm file" and "with replacing yes without alarm message")in the past i worked a lot for some french private editor for whom i used to type in texmacs, and export manually in .tex in order to pandoc it to wordin the present, i work on my maths exercises database, and in the php programm i wrote, i decided to put a link to an html and to a pdf version of the tm file.in both case, the suggestion i make would have been and would be an important gain of time and of fluidity...––––––––––––––––––––––––––
Vincent Douce:=: Mathoscope :=:06°13°11°07°26Bagnères de Bigorre 65200
––––––––––––––––––––––––––
Vincent Douce
Vincent Douce
:=: Mathoscope :=:
06°13°11°07°26
Bagnères de Bigorre 65200
- Re: [TeXmacs] exporting package, Vincent Douce Mathoscope, 07/27/2018
Archive powered by MHonArc 2.6.19.