This only concerns the Windows version of KLatexFormula.
MiKTeX alredy provides a portable version (http://miktex.org/portable) to install on a USB drive and I think KLatexFormula would be a great match for that. Especially since it seems that KLatexFormula's entanglement with Windows is minimal already (no settings are stored in the registry, it accepts relative paths for 'latex', 'dvips' and 'gs' etc.).
As far as I can see the only thing that would need to be added, is a way to point KLatexFormula to a custom data directory where the settings and databases are stored. Popular solutions therefor are
a) an empty dummy file in the app directory (e.g. named 'portable') that causes (upon its existence) KLatexFormula to use a subdirectory of the app directory as its data directory.
b) a command line option where a custom data directory can be specified. E.g. 'klatexformula --datadir \App\KLatexFormula\data' or short 'klatexformula --datadir data'
Bonus benefit: It would make it easier to try new beta versions without compromising the configuration of an installed stable version.
For your consideration.
lujomu
This should be fairly easy to implement, thanks for the suggestion. I'll do this when I find a little time.
Just a quick correction: If the temp path is provided as a relative path (e.g. '\Temp') it breaks the drag and drop functionality for some apps. I suggest to internally complete all relative paths to absolute ones.
Starting from KLatexFormula 4.0, application paths may be set at compile-time and at run-time, which should make KLatexFormula fully portable. KLatexFormula needs to locate the following directories:
the shared data directory, such as
/usr/share/klatexformula, which only has to be read-only;the home config directory, such as
~/.klatexformula, which stores the user configuration and which should be writeable.At compile-time, the preprocessor defines
KLF_SHARE_DIRandKLF_HOME_CONFIG_DIRmay be used to override defaults. CMake already setsKLF_SHARE_DIRbased on the installation paths.At run-time, the environment variables
KLF_SHARE_DIRandKLF_HOME_CONFIG_DIRmay be set to override any paths set at compile time or any other default paths.Paths may start with
~/, which expands to the user's home directory (on all platforms). Non-absolute paths are interpreted as relative to the application executable location, and not relative to the current working directory.Works great! Thanks for this addition!