I am attempting to create documentation using sphinx. I do not have sudo permissions, but do have anaconda installed in my environment. I can successfully build HTML, but when I build PDF I am receiving errors and no PDF.
Steps
conda create --name jeff-sphinx
conda activate jeff-sphinx
conda install sphinx texlive-core
There is more, but the versions that get installed by default:
sphinx: 1.8.2-py37_0
sphinxcontrib: 1.0-py37_1
sphinxcontrib-websupport: 1.1.0-py37_1
texlive-core: 20180414-hc8d0b01_0
I can successfully build HTML with make html
Having HTML is half my battle. We also need some bundled format that can be sent to users that do not have access to HTML (because the instructions for setting up your network are in the documentation)... Acrobat and MS Word are the only readers available.
When I attempt to run make latexpdf
, I receive an error:
------------
Running 'pdflatex -recorder "UserGuide.tex"'
------------
warning: kpathsea: configuration file texmf.cnf not found in these directories:
... many directories ...
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex)
Is there some other configuration I need to do get texlive-core
installed and working in my environment?
Attempts at Self-Help
I did do a search for texmf.cnf
in the environment and found that it is present, but not on any of the configured paths. To try to circumvent the problem, I tried creating a symlink to remap the folders:
cd ~/.conda/envs/jeff-sphinx/share
ln -s ./texlive/texmf-dist texmf-dist
Runs after this resulted in error messages about
------------
Running 'pdflatex -recorder "UserGuide.tex"'
------------
warning: ~/.conda/envs/jeff-sphinx/share/texmf-dist/web2c/texmf.cnf:540: (kpathsea) No cnf value on line: $SELFAUTOLOC ...more paths ...
At this point I assumed this was an invalid path to follow and backed out.
I also tried changing the sphinx
and texlive
versions that were installed. Generally, this resulted in worse results (missing pdflatex
for example). This could be because I had invalid combinations.
More Detail
Full Output
Based on some feedback in the comments, I am including a output. I have sanitized paths.
The LaTeX files are in _build/latex.
Run 'make' in that directory to run these through (pdf)latex
(use `make latexpdf' here to do that automatically).
make[1]: Entering directory `/home/jeff/Documents/projects/docs/doc/_build/latex'
latexmk -pdf -dvi- -ps- 'UserGuide.tex'
Latexmk: This is Latexmk, John Collins, 17 Jan. 2018, version: 4.55.
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex': File changes, etc:
Non-existent destination files:
'UserGuide.pdf'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'pdflatex -recorder "UserGuide.tex"'
------------
warning: kpathsea: configuration file texmf.cnf not found in these directories: <many directories>.
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex)
kpathsea: Running mktexfmt pdflatex.fmt
warning: kpathsea: configuration file texmf.cnf not found in these directories: <many directories>.
/home/jeff/.conda/envs/jeff-sphinx/bin/mktexfmt: kpsewhich -var-value=TEXMFROOT failed, aborting early.
BEGIN failed--compilation aborted at /home/jeff/.conda/envs/jeff-sphinx/bin/mktexfmt line 25.
I can't find the format file `pdflatex.fmt'!
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
pdflatex: (Pdf)LaTeX failed to generate the expected log file 'UserGuide.log'
Latexmk: Did not finish processing file 'UserGuide.tex':
(Pdf)LaTeX failed to generate the expected log file 'UserGuide.log'
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs of latex/pdflatex.
make[1]: *** [UserGuide.pdf] Error 12
make[1]: Leaving directory `/home/jeff/Documents/projects/docs/doc/_build/latex'
make: *** [latexpdf] Error 2
Bin Paths
Running which
on some utilities
$ echo perl pdflatex latexmk | xargs "which"
/bin/perl
/home/jeff/.conda/envs/jeff-sphinx/bin/pdflatex
/home/jeff/.conda/envs/jeff-sphinx/bin/latexmk