in Ubuntu:
- Open Ubuntu’s terminal
- Update APT packages list:
sudo apt update - In this step you need to install LaTex, you can install the complete texlive package, but his will be rather large, you will need large amount of disk space (5GB) and good download speed. As an alternative you can only install the common packages. Follow one of the following
- Opation A: install LaTex full (takes a while and is large):
sudo apt install texlive-full - Option B: install common packages one by one:
sudo apt install texlive-binaries
sudo apt install texlive-base
sudo apt install texlive-latex-base
sudo apt install texlive-latex-recommended
sudo apt install texlive-bibtex-extra
- Opation A: install LaTex full (takes a while and is large):
- Installing Latex2html (required library):
sudo apt install latex2html - User and Theory manuals require Sphinx:
sudo apt install python3-sphinx - Sometimes latexmk is needed for Sphinx to work correctly (optional):
sudo apt install latexmk
if you don’t install latexmk you may get the following error when making some PDF files that require Sphinx:
“latexmk: Command not found“ - Install Texmaker (this is for editing and not required for generating):
sudo apt install texmaker
(this will take a while to download)
You can now start Texmaker by “texmaker” command on terminal.
Please note that even though you can generate the PDF inside the Texmaker, the generated images may not look correctly. Make sure to generate the final files using the terminal.
Generating the manuals outside of Texmaker using terminal:
Make sure you have copied the doc file in another place that is different from the cloned directory to avoid changing the source files.
For making each manual open that directory in terminal.
For some manuals you can use “make pdf” command.
For some others that use Sphinx, such as “oofem input“, “theorymanual 2” and the “user manual” you have to use “make latexpdf“.
If you get error contents.rst not found, you have to explicitly tell Sphinx to use index file. To do that you have to open conf.py and add the following line:
master_doc = 'index'
Issue with “input manual” generation:
You may encounter this error:
convert-im6.q16: attempt to perform an operation not allowed by the security policy `PDF’
This issue is caused by security policy defined in “/etc/ImageMagick-6/policy.xml”.
It is required to add “read|write” permission to “PDF” pattern in “coder” domain of “policymap” tags. Since this may compromise the device security I will not cover this any further.
For more information see:
Contents.rst not found error on Stackoverflow
ReadMe file in the doc directory of OOFEM
OOFEM officially rendered documentations
OOFEM Manuals that I compiled on April 8th 2021