Hello, I use portable texmacs on windows on a usb key because I change computers regularly in my establishment.
Then ,I read this article.
I want to store my my-init-texmacs file and my personal packages on my key.
I would therefore like to have my TeXmacs_path_home on my usb key.
I created a folder called “share” with the subfolders (bin,docs,font,langs,misc,etc…)
Since I don’t want to use the my-init-texmacs file when starting texmacs (if I change computers it’s not there anymore), I place the following scheme command directly at the end
of the init-texmacs.scm file.
Good morning,
I did escape the slashes.
It is by pasting the code that the slashes have disappeared.
I am testing well in scheme sessions.
Here is what it gives:
I found my mistake and now I can load the my-init-texmacs file from my “share” folder.
I thought I could use this command by putting it at the end of the init-texmacs file but it doesn’t work.
In fact, I have to go through a session scheme and it’s not convenient.
I would like to launch this “new” my-init-texmacs when starting texmacs…
and if possible, I would also like to launch the “preferences.scm” file otherwise when I restart on another computer with my usb key the my-init-texmacs and preferences.scm files are not recognized.
Your description looks interesting but I did not understand it
If you give me a bit of time I will try myself and tell you what happens.
I also would be interested in knowing what is the mistake you found: was it in line 20 of my-init-texmacs?
My error was simply an error in forgetting parentheses with a standard function to test the command.
I’m sure that having a texmacs -portable that works on a usb key and that is completely independent of the computer would be interesting. This might lead some math teachers around me to try it.
I managed to make it work with a python-portable on the same usb-key…
The python plugin then works fine
I also think we could connect it to a Miktex-portable.
I will do other tests but I am not an expert…
Thus, we would have everything in the USB key.
I think using a my-init-texmacs at a custom location must work. The end of init-texmacs.scm does not seem the right place where to load my-init-texmacs. Setting the environment variable TEXMACS_HOME_PATH before launching TeXmacs (reference Texmacs_home_path) maybe is not possible or convenient on Windows.
I did not yet figure out how TeXmacs finds and reads my-init-texmacs.
Let us see what someone else says.
Yes, sorry. I will correct it.
Btw, if you just want to change TEXMACS_PATH TeXmacs accepts it as an argument in the command invocation with the option -p .... But there is no flag to set TEXMACS_HOME_PATH.
THANKS.
I already have bootable usb keys with xubuntu. I installed texmacs and all the plugins work as well as on a standard installation.
If I persist in wanting to use a portable version of texmacs on windows, it is because in my establishment the network managers have prevented the computers from booting using a USB key.
it’s my problem.
The last version of the batch file I tried (includes attempts at diagnosing the failure) is
:: type "C:\Users\admin\Dati\Test\Test TeXmacs\launch_texmacs.bat"
@ECHO OFF
SETLOCAL
SET TEXMACS_HOME_PATH="C:\Users\admin\Dati\Test\Test TeXmacs home dir"
cd "C:\Program Files (x86)\TeXmacs\bin"
if exist "texmacs.exe" (echo texmacs exists)
if not exist "texmacs.exe" (echo texmacs does not exists)
start /b /wait "" "texmacs.exe" > "C:\Users\admin\Dati\Test\Test TeXmacs\launch_texmacs.txt" 2>&1
if not %errorlevel% == 0 exit /b
else echo %errorlevel%
and it fails with the output that I paste below (copying from launch_texmacs.txt). Perhaps someone knows what happens.
TeXmacs] std-warning, Couldn't concretize ? (concat, "C:, ? (concat, Users, ? (concat, admin, ? (concat, Dati, ? (concat, Test, Test TeXmacs home dir")))))
... many lines like this
TeXmacs] std-warning, Couldn't concretize "C:
TeXmacs] std-warning, Couldn't concretize ? (concat, "C:, Users)
TeXmacs] std-warning, Couldn't concretize ? (concat, "C:, ? (concat, Users, admin))
TeXmacs] std-warning, Couldn't concretize ? (concat, "C:, ? (concat, Users, ? (concat, admin, Dati)))
... many lines like this
TeXmacs] std-warning, Couldn't concretize ? (concat, "C:, ? (concat, Users, ? (concat, admin, ? (concat, Dati, ? (concat, Test, ? (concat, Test TeXmacs home dir", users))))))
TeXmacs] std-warning, Save error for C:\Program Files (x86)\TeXmacs\bin\"C:\Users\admin\Dati\Test\Test TeXmacs home dir"\system\boot_lock, Invalid argument
Welcome to TeXmacs 2.1.1
------------------------------------------------------------------------------
kpsewhich works with your TeX distribution
maketfm works with your TeX distribution
makepk works with your TeX distribution
texhash works with your TeX distribution
attempt install of inkscape extension
TeXmacs] std-warning, Save error for C:\Program Files (x86)\TeXmacs\bin\"C:\Users\admin\Dati\Test\Test TeXmacs home dir"\system\settings.scm, Invalid argument
TeXmacs] failed-error, ------------------------------------------------------------------------------
TeXmacs] failed-error, I could not save or reload the file
TeXmacs] failed-error,
TeXmacs] failed-error, "C:\Users\admin\Dati\Test\Test TeXmacs home dir"\system\settings.scm
TeXmacs] failed-error,
TeXmacs] failed-error, Please give me full access control over this file and
TeXmacs] failed-error, rerun 'TeXmacs'.
TeXmacs] failed-error, ------------------------------------------------------------------------------
Throwing unable to write settings
-------------------------------------------------
Error message:
unable to write settings
System information:
TeXmacs version : 2.1.1
Built by : magix
Building date : Mon Dec 13 10:36:58 CET 2021
Operating system : mingw32
Vendor : w64
Processor : @CONFIG_HOST_CPU@
Crash date :
TeXmacs server not yet started
Backtrace of C++ stack not supported
-------------------------------------------------
terminate called after throwing an instance of 'string'
As an aside, if your school (I assume that) administrator doesn’t fully ban boot from usb, you can open the case and disconnect their shipped disk. Then your usb becomes the first bootable medium.
because it may help with debugging in case debugging is needed (it has to be substituted to the line start "" "texmacs.exe" which in turn needs to be commented).
Once that you have the batch file, double click on it and TeXmacs should start with the home path that you set.
Good morning,
thank you very much for the time spent.
Here is my file to start texmacs on my usb key.
@ECHO OFF
SETLOCAL
SET “TEXMACS_HOME_PATH=%~d0%~p0TeXmacs-p\partage”
cd “%~d0%~p0TeXmacs-p\bin”
start “” “texmacs.exe”
It works with a key labeled with any letter. It works very well!
I can now use my packages, my file my-init-texmacs.scm, my-preferences.scm etc… by changing computer…