phd_thesis_markdown icon indicating copy to clipboard operation
phd_thesis_markdown copied to clipboard

Make pdf Error 43

Open zejunyao opened this issue 4 years ago • 9 comments

All 'sudo tlmgr ...' are installed following on the readme instructions. However, at present the 'Error 43' still shows as below:

make pdf pandoc "/Users/phd/phd_thesis_markdown/source"/*.md
-o "/Users/phd/phd_thesis_markdown/output/"z0000000"-"Last"-"First"-Thesis.pdf"
-H "/Users/phd/phd_thesis_markdown/style/preamble.tex"
--template="/Users/phd/phd_thesis_markdown/style/template.tex"
--bibliography="/Users/phd/phd_thesis_markdown/source/references.bib" 2>pandoc.log
--csl="/Users/phd/phd_thesis_markdown/style/ref_format.csl"
--highlight-style pygments
-V fontsize=12pt
-V papersize=a4paper
-V documentclass:report
-N
--pdf-engine=xelatex
--filter pandoc-crossref make: *** [pdf] Error 43

zejunyao avatar Aug 15 '19 15:08 zejunyao

Hi, I recently reinstalled the entire texlive and pandoc and had this error and error 47. By reinstalling a clean and recent version (2019) of both packages, every thing works like a charm. So, maybe upgrade the packages to the latest?

BioinfoTongLI avatar Nov 14 '19 15:11 BioinfoTongLI

Also here with the error 43. On mac osx 15.7. I first needed to run tlmgr update --self, then edited install.sh to the following:

brew install --cask mactex
brew install pandoc
# pandoc-citeproc is depreciated - pandoc is distributied with citeproc see:
# - https://github.com/jgm/citeproc
# - https://github.com/jgm/pandoc-citeproc
# apt-get install pandoc-citeproc &&
sudo tlmgr install truncate &&
sudo tlmgr install tocloft &&
sudo tlmgr install wallpaper &&
sudo tlmgr install morefloats &&
sudo tlmgr install sectsty &&
sudo tlmgr install siunitx &&
sudo tlmgr install threeparttable &&
sudo tlmgr update l3packages &&
sudo tlmgr update l3kernel &&
sudo tlmgr update l3experimental &&
pip install pandoc-fignos pandoc-eqnos pandoc-tablenos \
            pandoc-secnos pandoc-shortcaption

I'm running this with python 3.9.1. Perhaps this is the issue (the original script wants me to sudo pip3 install..., and presumably on the built in python distro that comes with the mac)?

For me, when I run make pdf I get:

(phd) jfowers@MacBook-Pro phd_thesis_markdown % make pdf
pandoc  \
	--filter=pandoc-shortcaption \
	--filter=pandoc-xnos \
	--template="/Users/jfowers/git/phd_thesis_markdown/style/template.tex" \
	"/Users/jfowers/git/phd_thesis_markdown/source"/*.md \
	"/Users/jfowers/git/phd_thesis_markdown/source/metadata.yml" \
	-o "/Users/jfowers/git/phd_thesis_markdown/output/thesis.pdf" \
	-H "/Users/jfowers/git/phd_thesis_markdown/style/preamble.tex" \
	--bibliography="/Users/jfowers/git/phd_thesis_markdown/source/references.bib" 2>pandoc.log \
	--csl="/Users/jfowers/git/phd_thesis_markdown/style/ref_format.csl" \
	-V fontsize=12pt \
	-V papersize=a4paper \
	-V documentclass=report \
	--pdf-engine=xelatex \
	--verbose
make: *** [pdf] Error 43

Will update - I'm trying to fix: https://github.com/tompollard/phd_thesis_markdown/pull/100

JamesOwers avatar Jan 11 '21 07:01 JamesOwers

OK. It might be a python version issue. Here's one way to fix:

# make python venv and install pandoc
conda create -n phd -y python=3.6 pandoc
conda activate phd

# Install required python packages
pip install pandoc-fignos pandoc-eqnos pandoc-tablenos \
            pandoc-secnos pandoc-shortcaption

# get texlive
brew install --cask mactex

# update tlmgr and get required packages for tex
tlmgr update --self

sudo tlmgr install truncate &&
sudo tlmgr install tocloft &&
sudo tlmgr install wallpaper &&
sudo tlmgr install morefloats &&
sudo tlmgr install sectsty &&
sudo tlmgr install siunitx &&
sudo tlmgr install threeparttable &&
sudo tlmgr update l3packages &&
sudo tlmgr update l3kernel &&
sudo tlmgr update l3experimental

JamesOwers avatar Jan 11 '21 07:01 JamesOwers

This is fixed by #100

JamesOwers avatar Jan 14 '21 07:01 JamesOwers

The error occurred on Ubuntu 20.10 too and could be solved by adding some lines to the install_linux.sh (or install manually), as these packages were not installed by default and not installed by the steps in quickstart or script:

sudo tlmgr install xltxtra
sudo tlmgr install realscripts
sudo tlmgr install eso-pic
sudo tlmgr install ctable
sudo tlmgr install listings
sudo tlmgr install pdfpages
sudo tlmgr install bbold
sudo tlmgr install cleveref

This is probably related to the installation of TexLive on Ubuntu, which was not done using apt (causing problems on Ubuntu with user mode for tlmgr). TexLive was installed with https://github.com/scottkosty/install-tl-ubuntu with default settings. In this case (and probably for others who installed TexLive like this) an alias needs to be set in .bashrc alias tlmgr='/opt/texbin/tlmgr' and in the install script the path variable needs to be set like this for all tlmgr commands:

sudo env PATH=$PATH tlmgr install truncate
sudo env PATH=$PATH tlmgr install tocloft
sudo env PATH=$PATH tlmgr install wallpaper
sudo env PATH=$PATH tlmgr install morefloats
sudo env PATH=$PATH tlmgr install sectsty
sudo env PATH=$PATH tlmgr install siunitx
sudo env PATH=$PATH tlmgr install threeparttable
sudo env PATH=$PATH tlmgr update l3packages
sudo env PATH=$PATH tlmgr update l3kernel
sudo env PATH=$PATH tlmgr update l3experimental
sudo env PATH=$PATH tlmgr update l3backend
sudo env PATH=$PATH tlmgr install mathspec
sudo env PATH=$PATH tlmgr install xltxtra
sudo env PATH=$PATH tlmgr install realscripts
sudo env PATH=$PATH tlmgr install eso-pic
sudo env PATH=$PATH tlmgr install ctable
sudo env PATH=$PATH tlmgr install listings
sudo env PATH=$PATH tlmgr install pdfpages
sudo env PATH=$PATH tlmgr install bbold
sudo env PATH=$PATH tlmgr install cleveref

rob-cr avatar Feb 25 '21 09:02 rob-cr

Cheers Rob. It would be amazing if you could raise a PR, like #100, where you develop and fix the Travis install for Linux. I would be delighted to review that PR (@dendrondal - I think I may need additional permissions for this repo to review?).

JamesOwers avatar Mar 01 '21 08:03 JamesOwers

Hi, I just figured out that there are some other factors influencing the installation success and have to correct some of my findings above. In my case I also had a TinyTex installation which I wasn't aware of. They did interfere and with the TexLive installation it actually didn't work and only the TinyTex installation could be used without problems. So I removed everything from the full TexLive. The good news is, you don't need the full TexLive installation, but only the small TinyTex one with the needed packages installed in the install script. I adapted the script and added an Ubuntu part in the Readme which should work now, as tested on another machine with a fresh install of Ubuntu 20.10 without problems now. The travis.yml is adapted for that, but probably needs some more adjustments, not familiar with this. Will get back to it and raise a PR if you like.

rob-cr avatar Mar 03 '21 15:03 rob-cr

Oh great stuff, well done! Please do share a link to the code with your fixed changes if you don’t have time/inclination to PR. I’m sure that would help many people get going.

jamesowers-ch avatar Mar 03 '21 17:03 jamesowers-ch

Same error as OP for me after a fresh clone / fork of the repo. With some tinkering I narrowed the problem to the pdf template in style/template.tex. By changing the declaration of the euro symbol and deleting the university logo image the pdf rendering passes:

  1. line 44: change $if(euro)$ to \mathbf{$if(euro)$}
  2. line 205: comment out (or delete) % \ThisULCornerWallPaper{1.0}{style/univ_logo.eps}

Bild 10 07 21 um 16 20

A patch file resp. pull request will follow.

Edit: The 1st edited line 44 did contain a typo (missing closing bracket "}" at the end) which is now added above.

krueschi avatar Jul 10 '21 14:07 krueschi