This question about : Asked
Docker and LatexModePlugin
I have installed
FosWiki using the docker container written by
TimothyLegge.
This is for personal use with Ubuntu.
I now want to install
LatexModePlugin. I have not used docker before so I wanted to check whether the installation instructions need to be modified.
For example, the first step is to download and unzip a file. Do I need to do this inside the container?
--
BruceWestbury - 23 Oct 2019
I don't have any experience with Docker but I think it's safe to assure everything must be done inside the container. The step you refer to of unzipping a file will not be your challenge, if you're referring to the LatexModePlugin itself. That's because that step can be done from within Foswiki's Configure interface. Assuming your installation can access the internet, Configure's plugin installation mechanism will download and unpack the plugin for you.
However, I suspect the bigger challenge will be installing the required server dependencies. E.g. the referenced perl modules, LaTeX itself, plus ImageMagic. I don't know how this is done in Docker containers. Good luck!
--
LynnwoodBrown - 24 Oct 2019
Hi
When you spin up the Docker image you need to use a docker volume to ensure that you are able to save changes to the wiki content. With my default process I use:
docker run --rm --name docker-foswiki -idt -p 80:80 -v foswiki_www:/var/www/foswiki:z timlegge/docker-foswiki
So anything under /var/www/foswiki: including any new plugins installed are saved.
However, as Lynnwood mentions any server dependencies are separate.
I don't mind adding
LatexPlugin and any requirements to an updated Docker Image or accepting a Pull Request for the updates. I can likely look at it tonight
--
TimothyLegge - 24 Oct 2019
okay, no one said
LatexModePlugin had not been updated in a while. It will take a day or so..
--
TimothyLegge - 25 Oct 2019
I pushed a new version
docker run --rm --name docker-foswiki -idt -p 80:80 -v foswiki_www:/var/www/foswiki:z timlegge/docker-foswiki:v1.04ou will need to install the
LatexModePlugin and fix the current
RegEx Left Bracket issue as seen in the support page. I can take a look at how to patch it as part of the installer for the Docker container but it will take a few days
--
TimothyLegge - 25 Oct 2019
docker run --rm --name docker-foswiki -idt -p 80:80 -v foswiki_www:/var/www/foswiki:z timlegge/docker-foswiki:v1.04
--
TimothyLegge - 25 Oct 2019
I have had a closer look at
LatexModePlugin after the comment by
LynnwoodBrown
It is discouraging. Installation is complicated; it appears not to be maintained; the installation instructions are for mime.tex which I don't use.
It seems to me that a better solution would be a
MathJax (
https://www.mathjax.org/) plugin. There is a
MathJax plugin for
WordPress,
DocuWiki and Instiki. Instiki (
https://golem.ph.utexas.edu/wiki/instiki/show/HomePage) is used on the websites nLab (
https://ncatlab.org/nlab/show/HomePage) (and mLab) and nCafe which I read.
I don't have the skills to write a plugin, so this is a feature request. I also don't know how much work would be involved in writing this plugin so I don't know if this is a reasonable request.
I appreciate
TimothyLegge spending an evening putting the Latex files in the container. I hope to try this out but it is going to take time and courage.
--
BruceWestbury - 25 Oct 2019
MathJax is really nice! And you don't need any plugin to make it work. I just tested the following code (
source &
reference) in one of my own installations and it worked like a gem. It won't run on Foswiki.org because security settings block loading external js libraries.
%ADDTOZONE{"script" text="<script src='https://polyfill.io/v3/polyfill.min.js?features=es6'></script><script id='MathJax-script' async src='https://cdn.jsdelivr.net/npm/mathjax@3.0.0/es5/tex-mml-chtml.js'></script>"}%
When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are \[x = {-b \pm \sqrt{b^2-4ac} \over 2a}.\]
--
LynnwoodBrown - 25 Oct 2019