Cleanthesis TeX Theme wont create pdf - pdf

Im trying to build a (the thesis-example.tex) PDF with the cleanthesis theme (http://cleanthesis.der-ric.de/) and it wont work
The last failure is:
! pdfTeX error (font expansion): auto expansion is only possible with scalable
fonts.
\AtBegShi#Output ...ipout \box \AtBeginShipoutBox
\fi \fi
l.107 \cleardoublepage
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on thesis-example.log.
Im currently on a Fed26 System with 5928 installed texlive packages.
(dnf install texlive-scheme-full, dnf install texlive-*)
If i try this with a complete stock Ubuntu 16.04 and texlive-publisher and texlive-full packages it works. So i guess there is no missing package.
I you need specific parts of thesis-example.log, let me know i cant paste it because its too large

So i installed a clean Fed26 and loaded all texlive packages i had on the main pc. I compared /etc/texlive/web2c/updmap.cfg and i saw that my updmap.cfg was currupted.
I copied the working updmap.cfg to my main system and did a "updmap-sys --force" and now it works

Related

Library not loaded: #rpath/libtbb.dylib in Prophet / Python

I'm on a Mac X1, Monterey.
I've installed prophet and run into this issue when trying to fit a model.
RuntimeError: Error during optimization: console log output:
dyld[90668]: Library not loaded: #rpath/libtbb.dylib
Referenced from: /Users/{username}/opt/anaconda3/lib/python3.9/site-packages/prophet/stan_model/prophet_model.bin
Reason: tried: '/private/var/folders/cd/dfrqgp4s4ll55cwb7rtgccbw0000gq/T/pip-install-rjpuj450/prophet_d7e4cce10e414c89a572fe3605ae9269/build/lib.macosx-11.1-arm64-cpython-39/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/private/var/folders/cd/dfrqgp4s4ll55cwb7rtgccbw0000gq/T/pip-install-rjpuj450/prophet_d7e4cce10e414c89a572fe3605ae9269/build/lib.macosx-11.1-arm64-cpython-39/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/usr/local/lib/libtbb.dylib' (no such file), '/usr/lib/libtbb.dylib' (no such file)
I know this has to do with the wrong paths being searched. I can find the dylib in
/Users/{user}/opt/anaconda3/lib/python3.9/site-packages/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/
But, it seems prophet doesn't know to look there. I'm curious how I can update/fix either the rpath variable or find another solution?
I tried to create a symbolic link with sudo ln -s, but don't have permissions on the laptop.
TIA!
I got it to work on Apple Silicon (M1 Max in my case) by installing older versions of both pystan and prophet:
pip install pystan==2.19.1.1
pip install prophet==1.0
The other important piece of the puzzle is that you should use Python 3.8 to get it working.
Installing older versions of the libraries and using Python 3.8 are both talked about in issue #2002 on Github, but there's not really an explanation of the libtbb.dylib error message.

pdflatex is not installed in google colab

I'm trying to use lcapy's python library to draw some electrical circuits in google colab. Unfortunately, I'm always getting an error:
RuntimeError: pdflatex is not installed
Even though I did pip install pdflatex
I couldn't find anything related to this error in lcapy's docs.
the notebook can be found here
I experienced a similar issue/error trying to render PDFs from latex output generated by pandas in google colab recently. The error I got was complaining about a file (Error Code 2), listed 'pdflatex' as the missing file, but I confirmed the install had completed as you reported. This led me to realize there were missing LaTex dependencies that were generating the error; the traceback seemed a bit misleading to me. Here is the solution that worked for me:
First, install components and dependencies in colab notebook:
!pip install folium==0.2.1
!pip install pdflatex
!sudo apt-get install texlive-latex-recommended
!sudo apt install texlive-latex-extra
!sudo apt install dvipng
In my first attempt, There was an error buried in the install of pdflatex with an incompatible version of folium 0.8.x, so the first command rolls it back to the compatible version from the error trace. Probably not totally necessary to roll back folium, but I haven't tested.
The latex install commands were shamelessly lifted from this answer for latex-equations-do-not-render-in-google-colaboratory-when-using-matplotlib, where they offer a bit more explanation. The whole install process produced quite a bit of output and took some time.
After completed, I was able to generate a pdf file from my LaTex string similar to the example from the package docs:
import pdflatex as ptex
pdfl = ptex.PDFLaTeX.from_texfile(r'/content/my_tex_string_file.tex')
pdf, log, completed_process = pdfl.create_pdf()
with open('testPDF.pdf', 'wb') as pdfout:
pdfout.write(pdf)
my_tex_string_file.tex was generated from pandas in my test case, and I added a preamble manually (string concatenation) to include the correct latex packages for my desired output, but a quick look through the github page for lcapy shows the same approach may work for lcapy as well.
I ran into the same issue myself and after verifying pdflatex is installed with !pdflatex -help, I looked into Lcapy's code. The easiest workaround I found is to comment out line 73 of system.py. I only need schematic tools, so this solution is adequate for me. If you need a proper solution, all the relevant functions are in the same file and it seems that import pdflatex is unnecessary as the library searches for the binary.

Library not loaded - ogr2ogr - topojson (Mike Bostock's d3.js map tutorial)

I'm trying to use ogr2ogr to filter a shapefile. I'm working through Mike Bostock's Let's Make a Map tutorial. A bit of googling - including here - hasn't led to any solutions yet. I'm also VERY new to topojson (and shapefiles in general; my background is in economics/statistical software like Stata), so I'm not sure what I'm doing and where things are going wrong. Either way - here's the error result I'm getting:
dyld: Library not loaded: /usr/local/lib/liblwgeom-2.1.1.dylib
Referenced from: /usr/local/Cellar/libspatialite/4.1.1/lib/libspatialite.5.dylib
Reason: image not found
Trace/BPT trap: 5
No idea what liblwgeom-2.1.1.dylib is, what it does, where I get it, etc. Google hasn't helped much on defining it either.
FWIW, I'm on a Mac, I brew installed npm and gdal, and then npm installed topojson.
Thanks,
a
Edited to add: I just brew reinstalled gdal, because I remembered getting a warning (Caveats). See below:
==> Caveats
For non-homebrew python (2.x), you need to amend your PYTHONPATH like so:
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
This version of GDAL was built with Python support. In addition to providing
modules that makes GDAL functions available to Python scripts, the Python
binding provides additional command line tools.
I actually tried to run export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH literally as-is, and it returned nothing. (Not sure if something happened in the background?) Basically fumbling in the dark!

casperjs.bat on windows fails with cannot find module cli.js error

I'm trying out casperJS to run some automated tests. On windows. I followed this installation guide but am stuck.
when I try to run a simple test from the command line like this:
casperjs.bat smoketest.js
I get the following error:
Error: Cannot find module 'C:/code/base/main/Shared/casperjs\modules\cli.js'
I checked, and the file cli.js does exist under the specified path.
I thought the problem could be the mixture of forward and backward slashes in the path, but I edited the bootstrap.js casper code to hard code the path and it made no difference - it still the cannot find module.
I'm have tried this using phantomJS version 1.9.0, and 1.8.2.
Anyone know what I am doing wrong?
Has anyone had success running casper on Windows?
This is due to a bug in PhantomJS 1.9.0 that does not allow for absolute path loading in Windows. Afaik, this should only be apparent if you are using a master build of CasperJS (v1.1).
This bug has been fixed, but is not yet in the Windows binary. You can compile it yourself if you'd like, but that can take quite a bit of time.
I was using the master build of casper. With the latest released version, 1.0.2, it works fine.

Not getting TBB to compile test examples

I am not getting TBB to work. I am following the steps in the "Getting started" document.
I am doing the following steps:
downloading the linux files + the sources files.
extracting them in 1 directory
calling make
going to tbb.../bin calling source tbbvars.sh intel64
going to examples/Getting_started/sub_string_finder
calling make
I then get the error:
sub_string_finder.cpp:32:30: fatal error: tbb/parallel_for.h: No such file or directory
I really googled a lot but can't find any related stuff.
I did also try to add some -I statement but it didnt help
I assume it is kind of a including/linking problem but I dont know how to fix.
This is all done on fedora 16 64bit. (kernel 3.1.4) // TBB version 4.0
The solution was to install tbb-devel package.