Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
0 votes

Hi community.

Short question.

Is there a CLI way of feeding cadabra2 with a notebook and obtain the $\LaTeX$ output?

Something like

$ cadabra2 < in.cnb > out.tex
in General questions by (15.1k points)

1 Answer

+2 votes
 
Best answer

There wasn't, but there is now ;-) Check out the latest commit on github/master, build/install, and you will have a cadabra2latex command, which does

cadabra2latex in.cnb out.tex

This will create out.tex from your notebook in.cnb, plus any outnnn.png files if your notebook contains plots. You should then be able to do e.g.

pdflatex out.tex

to build a PDF.

by (83.8k points)
selected by

GREAT!!!! Thank you @kasper

Hi again @kasper. It seems that a source file is missing in the repository, I looked on the client_server folder, but is not there!

I got this error:

CMake Error at client_server/CMakeLists.txt:166 (add_executable):
  No SOURCES given to target: cadabra2latex

Sorry, forgot to check that in. Now fixed.

...